@malloy-publisher/sdk 0.0.198-dev → 0.0.198-dev1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/{ServerProvider-DDScRRDc.es.js → ServerProvider-BuM1usxf.es.js} +181 -177
  2. package/dist/{ServerProvider-IhQ4aYBm.cjs.js → ServerProvider-C_Mnvmgc.cjs.js} +1 -1
  3. package/dist/client/api.d.ts +61 -4
  4. package/dist/client/index.cjs.js +1 -1
  5. package/dist/client/index.es.js +1 -1
  6. package/dist/components/Package/ContentTypeIcon.d.ts +16 -0
  7. package/dist/components/Package/index.d.ts +0 -1
  8. package/dist/components/styles.d.ts +16 -0
  9. package/dist/{core-w79IMXAG.es.js → core-DfcpQGVP.es.js} +1 -1
  10. package/dist/{core-7-3Jcsb0.cjs.js → core-yDgxkpo0.cjs.js} +1 -1
  11. package/dist/index-CMA8U4-B.cjs.js +228 -0
  12. package/dist/{index-CN0_kZSF.es.js → index-Y4ooZDYA.es.js} +17654 -20603
  13. package/dist/index.cjs.js +1 -1
  14. package/dist/index.es.js +33 -34
  15. package/package.json +5 -5
  16. package/src/components/Environment/AddPackageDialog.tsx +116 -79
  17. package/src/components/Environment/DeletePackageDialog.tsx +3 -2
  18. package/src/components/Environment/Environment.tsx +44 -23
  19. package/src/components/Environment/Packages.tsx +164 -156
  20. package/src/components/Home/DeleteEnvironmentDialog.tsx +3 -2
  21. package/src/components/Home/Home.tsx +272 -389
  22. package/src/components/Model/Model.tsx +2 -2
  23. package/src/components/Model/ModelCell.tsx +1 -1
  24. package/src/components/Model/ModelExplorerDialog.tsx +1 -1
  25. package/src/components/Model/SourcesExplorer.tsx +4 -4
  26. package/src/components/Notebook/Notebook.tsx +4 -9
  27. package/src/components/Notebook/NotebookCell.tsx +10 -7
  28. package/src/components/Package/ContentTypeIcon.tsx +79 -0
  29. package/src/components/Package/Package.tsx +387 -55
  30. package/src/components/Package/index.ts +0 -1
  31. package/src/components/QueryResult/QueryResult.tsx +1 -1
  32. package/src/components/RenderedResult/RenderedResult.tsx +9 -8
  33. package/src/components/ResultsDialog.tsx +1 -1
  34. package/src/components/styles.ts +28 -15
  35. package/dist/components/Package/Config.d.ts +0 -5
  36. package/dist/components/Package/Databases.d.ts +0 -5
  37. package/dist/components/Package/FileTreeView.d.ts +0 -9
  38. package/dist/components/Package/Models.d.ts +0 -6
  39. package/dist/components/Package/Notebooks.d.ts +0 -6
  40. package/dist/index-Xo_ADux9.cjs.js +0 -233
  41. package/src/components/Package/Config.tsx +0 -97
  42. package/src/components/Package/Databases.tsx +0 -228
  43. package/src/components/Package/FileTreeView.tsx +0 -241
  44. package/src/components/Package/Models.tsx +0 -68
  45. package/src/components/Package/Notebooks.tsx +0 -77
@@ -0,0 +1,228 @@
1
+ "use strict";var Jb=Object.create;var Gd=Object.defineProperty;var ey=Object.getOwnPropertyDescriptor;var ty=Object.getOwnPropertyNames;var ny=Object.getPrototypeOf,ry=Object.prototype.hasOwnProperty;var oy=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ty(t))!ry.call(e,o)&&o!==n&&Gd(e,o,{get:()=>t[o],enumerable:!(r=ey(t,o))||r.enumerable});return e};var Fl=(e,t,n)=>(n=e!=null?Jb(ny(e)):{},oy(t||!e||!e.__esModule?Gd(n,"default",{value:e,enumerable:!0}):n,e));const c=require("react/jsx-runtime"),P=require("@mui/material"),z=require("react"),Dr=require("@tanstack/react-query"),it=require("./ServerProvider-C_Mnvmgc.cjs.js"),Cs=require("markdown-to-jsx"),vn=require("@mui/icons-material"),Rt=require("@mui/system"),ay=require("@emotion/styled"),iy=require("@emotion/react"),ja=require("react-dom"),sy=require("react-router-dom");function Em(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 I=Em(z),ly=Em(ja),Qd=e=>e,uy=()=>{let e=Qd;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Qd}}},Cm=uy();function Er(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 De(e){if(typeof e!="string")throw new Error(Er(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Xd(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _l={exports:{}},Bl,Zd;function cy(){if(Zd)return Bl;Zd=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bl=e,Bl}var jl,Jd;function dy(){if(Jd)return jl;Jd=1;var e=cy();function t(){}function n(){}return n.resetWarningCache=t,jl=function(){function r(i,s,l,u,d,f){if(f!==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 a={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 a.PropTypes=a,a},jl}var ef;function fy(){return ef||(ef=1,_l.exports=dy()()),_l.exports}var py=fy();const ue=qn(py);function Tm(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=Tm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ie(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Tm(e))&&(r&&(r+=" "),r+=t);return r}function _e(e,t,n=void 0){const r={};for(const o in e){const a=e[o];let i="",s=!0;for(let l=0;l<a.length;l+=1){const u=a[l];u&&(i+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(i+=" "+n[u]))}r[o]=i}return r}var $l={exports:{}},ht={};/**
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 tf;function hy(){if(tf)return ht;tf=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"),a=Symbol.for("react.consumer"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function m(b){if(typeof b=="object"&&b!==null){var y=b.$$typeof;switch(y){case e:switch(b=b.type,b){case n:case o:case r:case l:case u:case h:return b;default:switch(b=b&&b.$$typeof,b){case i:case s:case f:case d:return b;case a:return b;default:return y}}case t:return y}}}return ht.ContextConsumer=a,ht.ContextProvider=i,ht.Element=e,ht.ForwardRef=s,ht.Fragment=n,ht.Lazy=f,ht.Memo=d,ht.Portal=t,ht.Profiler=o,ht.StrictMode=r,ht.Suspense=l,ht.SuspenseList=u,ht.isContextConsumer=function(b){return m(b)===a},ht.isContextProvider=function(b){return m(b)===i},ht.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ht.isForwardRef=function(b){return m(b)===s},ht.isFragment=function(b){return m(b)===n},ht.isLazy=function(b){return m(b)===f},ht.isMemo=function(b){return m(b)===d},ht.isPortal=function(b){return m(b)===t},ht.isProfiler=function(b){return m(b)===o},ht.isStrictMode=function(b){return m(b)===r},ht.isSuspense=function(b){return m(b)===l},ht.isSuspenseList=function(b){return m(b)===u},ht.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===l||b===u||typeof b=="object"&&b!==null&&(b.$$typeof===f||b.$$typeof===d||b.$$typeof===i||b.$$typeof===a||b.$$typeof===s||b.$$typeof===p||b.getModuleId!==void 0)},ht.typeOf=m,ht}var nf;function my(){return nf||(nf=1,$l.exports=hy()),$l.exports}var vm=my();function ar(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 Sm(e){if(I.isValidElement(e)||vm.isValidElementType(e)||!ar(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Sm(e[n])}),t}function tn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return ar(e)&&ar(t)&&Object.keys(t).forEach(o=>{I.isValidElement(t[o])||vm.isValidElementType(t[o])?r[o]=t[o]:ar(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&ar(e[o])?r[o]=tn(e[o],t[o],n):n.clone?r[o]=ar(t[o])?Sm(t[o]):t[o]:r[o]=t[o]}),r}function Va(e,t){return t?tn(e,t,{clone:!1}):e}function rf(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{const a=/min-width:\s*([0-9.]+)/;return+(r.match(a)?.[1]||0)-+(o.match(a)?.[1]||0)});return n.length?n.reduce((r,o)=>{const a=t[o];return delete r[o],r[o]=a,r},{...t}):t}function gy(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function by(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(a)}function yy(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function n(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const l=t(e.breakpoints.not(...s),i);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=a=>(n(r,a),r);return n(o),{...e,containerQueries:o}}const Ks={xs:0,sm:600,md:900,lg:1200,xl:1536},of={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ks[e]}px)`},xy={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Ks[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Cr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||of;return t.reduce((i,s,l)=>(i[a.up(a.keys[l])]=n(t[l]),i),{})}if(typeof t=="object"){const a=r.breakpoints||of;return Object.keys(t).reduce((i,s)=>{if(gy(a.keys,s)){const l=by(r.containerQueries?r:xy,s);l&&(i[l]=n(t[s],s))}else if(Object.keys(a.values||Ks).includes(s)){const l=a.up(s);i[l]=n(t[s],s)}else{const l=s;i[l]=t[l]}return i},{})}return n(t)}function Ey(e={}){return e.keys?.reduce((n,r)=>{const o=e.up(r);return n[o]={},n},{})||{}}function af(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Gs(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Ts(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=Gs(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,a=i=>{if(i[t]==null)return null;const s=i[t],l=i.theme,u=Gs(l,r)||{};return Cr(i,s,f=>{let h=Ts(u,o,f);return f===h&&typeof f=="string"&&(h=Ts(u,o,`${t}${f==="default"?"":De(f)}`,f)),n===!1?h:{[n]:h}})};return a.propTypes={},a.filterProps=[t],a}function Cy(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Ty={m:"margin",p:"padding"},vy={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},sf={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Sy=Cy(e=>{if(e.length>2)if(sf[e])e=sf[e];else return[e];const[t,n]=e.split(""),r=Ty[t],o=vy[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),vc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Sc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...vc,...Sc];function Ei(e,t,n,r){const o=Gs(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?o.startsWith("var(")&&a===0?0:o.startsWith("var(")&&a===1?o:`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function kc(e){return Ei(e,"spacing",8)}function Ci(e,t){return typeof t=="string"||t==null?t:e(t)}function ky(e,t){return n=>e.reduce((r,o)=>(r[o]=Ci(t,n),r),{})}function Dy(e,t,n,r){if(!t.includes(n))return null;const o=Sy(n),a=ky(o,r),i=e[n];return Cr(e,i,a)}function km(e,t){const n=kc(e.theme);return Object.keys(e).map(r=>Dy(e,t,r,n)).reduce(Va,{})}function Lt(e){return km(e,vc)}Lt.propTypes={};Lt.filterProps=vc;function Ft(e){return km(e,Sc)}Ft.propTypes={};Ft.filterProps=Sc;function Qs(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?Va(o,t[a](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Mn(e){return typeof e!="number"?e:`${e}px solid`}function $n(e,t){return jt({prop:e,themeKey:"borders",transform:t})}const wy=$n("border",Mn),Ay=$n("borderTop",Mn),Iy=$n("borderRight",Mn),Py=$n("borderBottom",Mn),Ry=$n("borderLeft",Mn),My=$n("borderColor"),Oy=$n("borderTopColor"),Ny=$n("borderRightColor"),Ly=$n("borderBottomColor"),Fy=$n("borderLeftColor"),_y=$n("outline",Mn),By=$n("outlineColor"),Xs=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ei(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ci(t,r)});return Cr(e,e.borderRadius,n)}return null};Xs.propTypes={};Xs.filterProps=["borderRadius"];Qs(wy,Ay,Iy,Py,Ry,My,Oy,Ny,Ly,Fy,Xs,_y,By);const Zs=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ei(e.theme,"spacing",8),n=r=>({gap:Ci(t,r)});return Cr(e,e.gap,n)}return null};Zs.propTypes={};Zs.filterProps=["gap"];const Js=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ei(e.theme,"spacing",8),n=r=>({columnGap:Ci(t,r)});return Cr(e,e.columnGap,n)}return null};Js.propTypes={};Js.filterProps=["columnGap"];const el=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ei(e.theme,"spacing",8),n=r=>({rowGap:Ci(t,r)});return Cr(e,e.rowGap,n)}return null};el.propTypes={};el.filterProps=["rowGap"];const jy=jt({prop:"gridColumn"}),$y=jt({prop:"gridRow"}),Hy=jt({prop:"gridAutoFlow"}),Uy=jt({prop:"gridAutoColumns"}),zy=jt({prop:"gridAutoRows"}),Vy=jt({prop:"gridTemplateColumns"}),Wy=jt({prop:"gridTemplateRows"}),qy=jt({prop:"gridTemplateAreas"}),Yy=jt({prop:"gridArea"});Qs(Zs,Js,el,jy,$y,Hy,Uy,zy,Vy,Wy,qy,Yy);function $o(e,t){return t==="grey"?t:e}const Ky=jt({prop:"color",themeKey:"palette",transform:$o}),Gy=jt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:$o}),Qy=jt({prop:"backgroundColor",themeKey:"palette",transform:$o});Qs(Ky,Gy,Qy);function En(e){return e<=1&&e!==0?`${e*100}%`:e}const Xy=jt({prop:"width",transform:En}),Dc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||Ks[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:En(n)}};return Cr(e,e.maxWidth,t)}return null};Dc.filterProps=["maxWidth"];const Zy=jt({prop:"minWidth",transform:En}),Jy=jt({prop:"height",transform:En}),ex=jt({prop:"maxHeight",transform:En}),tx=jt({prop:"minHeight",transform:En});jt({prop:"size",cssProperty:"width",transform:En});jt({prop:"size",cssProperty:"height",transform:En});const nx=jt({prop:"boxSizing"});Qs(Xy,Dc,Zy,Jy,ex,tx,nx);const Ti={border:{themeKey:"borders",transform:Mn},borderTop:{themeKey:"borders",transform:Mn},borderRight:{themeKey:"borders",transform:Mn},borderBottom:{themeKey:"borders",transform:Mn},borderLeft:{themeKey:"borders",transform:Mn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Mn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Xs},color:{themeKey:"palette",transform:$o},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:$o},backgroundColor:{themeKey:"palette",transform:$o},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:Lt},mt:{style:Lt},mr:{style:Lt},mb:{style:Lt},ml:{style:Lt},mx:{style:Lt},my:{style:Lt},margin:{style:Lt},marginTop:{style:Lt},marginRight:{style:Lt},marginBottom:{style:Lt},marginLeft:{style:Lt},marginX:{style:Lt},marginY:{style:Lt},marginInline:{style:Lt},marginInlineStart:{style:Lt},marginInlineEnd:{style:Lt},marginBlock:{style:Lt},marginBlockStart:{style:Lt},marginBlockEnd:{style:Lt},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:Zs},rowGap:{style:el},columnGap:{style:Js},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:En},maxWidth:{style:Dc},minWidth:{transform:En},height:{transform:En},maxHeight:{transform:En},minHeight:{transform:En},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 rx(...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 ox(e,t){return typeof e=="function"?e(t):e}function ax(){function e(n,r,o,a){const i={[n]:r,theme:o},s=a[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:d,style:f}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=Gs(o,u)||{};return f?f(i):Cr(i,r,m=>{let b=Ts(h,d,m);return m===b&&typeof m=="string"&&(b=Ts(h,d,`${n}${m==="default"?"":De(m)}`,m)),l===!1?b:{[l]:b}})}function t(n){const{sx:r,theme:o={},nested:a}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Ti;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 d=Ey(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(u).forEach(p=>{const m=ox(u[p],o);if(m!=null)if(typeof m=="object")if(i[p])h=Va(h,e(p,m,o,i));else{const b=Cr({theme:o},m,y=>({[p]:y}));rx(b,m)?h[p]=t({sx:m,theme:o,nested:!0}):h=Va(h,b)}else h=Va(h,e(p,m,o,i))}),!a&&o.modularCssLayers?{"@layer sx":rf(o,af(f,h))}:rf(o,af(f,h))}return Array.isArray(r)?r.map(s):s(r)}return t}const Ko=ax();Ko.filterProps=["sx"];const ix=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Ti;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function sx(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=ix(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...i)=>{const s=t(...i);return ar(s)?{...r,...s}:r}:a={...r,...t},{...o,sx:a}}function lx(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 lx(e,t,n)}function ux(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 Ur(e){if(e.type)return e;if(e.charAt(0)==="#")return Ur(ux(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Er(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(Er(10,o))}else r=r.split(",");return r=r.map(a=>parseFloat(a)),{type:n,values:r,colorSpace:o}}const cx=e=>{const t=Ur(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},$a=(e,t)=>{try{return cx(e)}catch{return e}};function tl(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,a)=>a<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 Dm(e){e=Ur(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,a=r*Math.min(o,1-o),i=(u,d=(u+n/30)%12)=>o-a*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),tl({type:s,values:l})}function Mu(e){e=Ur(e);let t=e.type==="hsl"||e.type==="hsla"?Ur(Dm(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 dx(e,t){const n=Mu(e),r=Mu(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function vs(e,t){return e=Ur(e),t=wc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,tl(e)}function Kr(e,t,n){try{return vs(e,t)}catch{return e}}function nl(e,t){if(e=Ur(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 tl(e)}function dt(e,t,n){try{return nl(e,t)}catch{return e}}function rl(e,t){if(e=Ur(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 tl(e)}function ft(e,t,n){try{return rl(e,t)}catch{return e}}function Ou(e,t=.15){return Mu(e)>.5?nl(e,t):rl(e,t)}function ji(e,t,n){try{return Ou(e,t)}catch{return e}}const si={black:"#000",white:"#fff"},fx={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"},ko={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Do={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ca={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},wo={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ao={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Io={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function wm(){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:si.white,default:si.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 Am=wm();function Im(){return{text:{primary:si.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:si.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 Nu=Im();function lf(e,t,n,r){const o=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=rl(e.main,o):t==="dark"&&(e.dark=nl(e.main,a)))}function uf(e,t,n,r,o){const a=o.light||o,i=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 ${(a*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(i*100).toFixed(0)}%)`))}function px(e="light"){return e==="dark"?{main:wo[200],light:wo[50],dark:wo[400]}:{main:wo[700],light:wo[400],dark:wo[800]}}function hx(e="light"){return e==="dark"?{main:ko[200],light:ko[50],dark:ko[400]}:{main:ko[500],light:ko[300],dark:ko[700]}}function mx(e="light"){return e==="dark"?{main:Do[500],light:Do[300],dark:Do[700]}:{main:Do[700],light:Do[400],dark:Do[800]}}function gx(e="light"){return e==="dark"?{main:Ao[400],light:Ao[300],dark:Ao[700]}:{main:Ao[700],light:Ao[500],dark:Ao[900]}}function bx(e="light"){return e==="dark"?{main:Io[400],light:Io[300],dark:Io[700]}:{main:Io[800],light:Io[500],dark:Io[900]}}function yx(e="light"){return e==="dark"?{main:Ca[400],light:Ca[300],dark:Ca[700]}:{main:"#ed6c02",light:Ca[500],dark:Ca[900]}}function xx(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Ac(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...a}=e,i=e.primary||px(t),s=e.secondary||hx(t),l=e.error||mx(t),u=e.info||gx(t),d=e.success||bx(t),f=e.warning||yx(t);function h(y){return o?xx(y):dx(y,Nu.text.primary)>=n?Nu.text.primary:Am.text.primary}const p=({color:y,name:x,mainShade:T=500,lightShade:C=300,darkShade:k=700})=>{if(y={...y},!y.main&&y[T]&&(y.main=y[T]),!y.hasOwnProperty("main"))throw new Error(Er(11,x?` (${x})`:"",T));if(typeof y.main!="string")throw new Error(Er(12,x?` (${x})`:"",JSON.stringify(y.main)));return o?(uf(o,y,"light",C,r),uf(o,y,"dark",k,r)):(lf(y,"light",C,r),lf(y,"dark",k,r)),y.contrastText||(y.contrastText=h(y.main)),y};let m;return t==="light"?m=wm():t==="dark"&&(m=Im()),tn({common:{...si},mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:d,name:"success"}),grey:fx,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r,...m},a)}function Ex(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 Cx={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 Tx(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var vx=/[A-Z]|^ms/g,Sx=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pm=function(t){return t.charCodeAt(1)===45},cf=function(t){return t!=null&&typeof t!="boolean"},Hl=Tx(function(e){return Pm(e)?e:e.replace(vx,"-$&").toLowerCase()}),df=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Sx,function(r,o,a){return $r={name:o,styles:a,next:$r},o})}return Cx[t]!==1&&!Pm(t)&&typeof n=="number"&&n!==0?n+"px":n};function Ss(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 $r={name:o.name,styles:o.styles,next:$r},o.name;var a=n;if(a.styles!==void 0){var i=a.next;if(i!==void 0)for(;i!==void 0;)$r={name:i.name,styles:i.styles,next:$r},i=i.next;var s=a.styles+";";return s}return kx(e,t,n)}}var l=n;return l}function kx(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ss(e,t,n[o])+";";else for(var a in n){var i=n[a];if(typeof i!="object"){var s=i;cf(s)&&(r+=Hl(a)+":"+df(a,s)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var l=0;l<i.length;l++)cf(i[l])&&(r+=Hl(a)+":"+df(a,i[l])+";");else{var u=Ss(e,t,i);switch(a){case"animation":case"animationName":{r+=Hl(a)+":"+u+";";break}default:r+=a+"{"+u+"}"}}}return r}var ff=/label:\s*([^\s;{]+)\s*(;|$)/g,$r;function Dx(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="";$r=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,o+=Ss(n,t,a);else{var i=a;o+=i[0]}for(var s=1;s<e.length;s++)if(o+=Ss(n,t,e[s]),r){var l=a;o+=l[s]}ff.lastIndex=0;for(var u="",d;(d=ff.exec(o))!==null;)u+="-"+d[1];var f=Ex(o)+u;return{name:f,styles:o,next:$r}}function wx(e,t){return ay(e,t)}function Ax(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const pf=[];function ao(e){return pf[0]=e,Dx(pf)}const Wt=typeof window<"u"?I.useLayoutEffect:I.useEffect;function Ix(e){return Object.keys(e).length===0}function Rm(e=null){const t=I.useContext(iy.ThemeContext);return!t||Ix(t)?e:t}const Px=I.createContext(),Yn=()=>I.useContext(Px)??!1;function li(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const a=o;if(a==="components"||a==="slots")r[a]={...e[a],...r[a]};else if(a==="componentsProps"||a==="slotProps"){const i=e[a],s=t[a];if(!s)r[a]=i||{};else if(!i)r[a]=s;else{r[a]={...s};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const u=l;r[a][u]=li(i[u],s[u],n)}}}else a==="className"&&n&&t.className?r.className=Ie(e?.className,t?.className):a==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}const Rx=I.createContext(void 0);function Mx(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?li(o.defaultProps,r,t.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?li(o,r,t.components.mergeClassNameAndStyle):r}function Ox({props:e,name:t}){const n=I.useContext(Rx);return Mx({props:e,name:t,theme:{components:n}})}let hf=0;function Nx(e){const[t,n]=I.useState(e),r=e||t;return I.useEffect(()=>{t==null&&(hf+=1,n(`mui-${hf}`))},[t]),r}const Lx={...I},mf=Lx.useId;function Kn(e){if(mf!==void 0){const t=mf();return e??t}return Nx(e)}const Fx=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 _x(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,a=Fx(t),i=Object.keys(a);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,p){const m=i.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[i[m]]=="number"?t[i[m]]:p)-r/100}${n})`}function d(h){return i.indexOf(h)+1<i.length?u(h,i[i.indexOf(h)+1]):s(h)}function f(h){const p=i.indexOf(h);return p===0?s(i[1]):p===i.length-1?l(i[p]):u(h,i[i.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:i,values:a,up:s,down:l,between:u,only:d,not:f,unit:n,...o}}const Bx={borderRadius:4};function jx(e=8,t=kc({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(a=>{const i=t(a);return typeof i=="number"?`${i}px`:i}).join(" ");return n.mui=!0,n}function $x(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 Ic(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:a={},...i}=e,s=_x(n),l=jx(o);let u=tn({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...Bx,...a}},i);return u=yy(u),u.applyStyles=$x,u=t.reduce((d,f)=>tn(d,f),u),u.unstable_sxConfig={...Ti,...i?.unstable_sxConfig},u.unstable_sx=function(f){return Ko({sx:f,theme:this})},u}const Hx=Ic();function Ux(e=Hx){return Rm(e)}const gf=(e,t,n,r=[])=>{let o=e;t.forEach((a,i)=>{i===t.length-1?Array.isArray(o)?o[Number(a)]=n:o&&typeof o=="object"&&(o[a]=n):o&&typeof o=="object"&&(o[a]||(o[a]=r.includes(a)?[]:{}),o=o[a])})},zx=(e,t,n)=>{function r(o,a=[],i=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...a,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...a,s],Array.isArray(l)?[...i,s]:i):t([...a,s],l,i))})}r(e)},Vx=(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 Ul(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},a={},i={};return zx(e,(s,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`,f=Vx(s,l);Object.assign(o,{[d]:f}),gf(a,s,`var(${d})`,u),gf(i,s,`var(${d}, ${f})`,u)}},s=>s[0]==="vars"),{css:o,vars:a,varsWithDefaults:i}}function Wx(e,t={}){const{getSelector:n=x,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:a}=t,{colorSchemes:i={},components:s,defaultColorScheme:l="light",...u}=e,{vars:d,css:f,varsWithDefaults:h}=Ul(u,t);let p=h;const m={},{[l]:b,...y}=i;if(Object.entries(y||{}).forEach(([k,S])=>{const{vars:v,css:_,varsWithDefaults:O}=Ul(S,t);p=tn(p,O),m[k]={css:_,vars:v}}),b){const{css:k,vars:S,varsWithDefaults:v}=Ul(b,t);p=tn(p,v),m[l]={css:k,vars:S}}function x(k,S){let v=o;if(o==="class"&&(v=".%s"),o==="data"&&(v="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(v=`[${o}="%s"]`),k){if(v==="media")return e.defaultColorScheme===k?":root":{[`@media (prefers-color-scheme: ${i[k]?.palette?.mode||k})`]:{":root":S}};if(v)return e.defaultColorScheme===k?`:root, ${v.replace("%s",String(k))}`:v.replace("%s",String(k))}return":root"}return{vars:p,generateThemeVars:()=>{let k={...d};return Object.entries(m).forEach(([,{vars:S}])=>{k=tn(k,S)}),k},generateStyleSheets:()=>{const k=[],S=e.defaultColorScheme||"light";function v(B,R){Object.keys(R).length&&k.push(typeof B=="string"?{[B]:{...R}}:B)}v(n(void 0,{...f}),f);const{[S]:_,...O}=m;if(_){const{css:B}=_,R=i[S]?.palette?.mode,L=!r&&R?{colorScheme:R,...B}:{...B};v(n(S,{...L}),L)}return Object.entries(O).forEach(([B,{css:R}])=>{const L=i[B]?.palette?.mode,E=!r&&L?{colorScheme:L,...R}:{...R};v(n(B,{...E}),E)}),a&&k.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)"}}),k}}}function qx(e){const t={};return Object.entries(e).forEach(r=>{const[o,a]=r;typeof a=="object"&&(t[o]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function Yx(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 Kx={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 Be(e,t,n="Mui"){const r=Kx[t];return r?`${n}-${r}`:`${Cm.generate(e)}-${t}`}function Gx(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Qx(e){return Math.round(e*1e5)/1e5}const bf={textTransform:"uppercase"},yf='"Roboto", "Helvetica", "Arial", sans-serif';function Xx(e,t){const{fontFamily:n=yf,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:i=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:u,pxToRem:d,...f}=typeof t=="function"?t(e):t,h=r/14,p=d||(y=>`${y/l*h}rem`),m=(y,x,T,C,k)=>({fontFamily:n,fontWeight:y,fontSize:p(x),lineHeight:T,...n===yf?{letterSpacing:`${Qx(C/x)}em`}:{},...k,...u}),b={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(i,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(i,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(i,14,1.75,.4,bf),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,bf),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return tn({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:i,fontWeightBold:s,...b},f,{clone:!1})}const Zx=.2,Jx=.14,e2=.12;function It(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Zx})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Jx})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${e2})`].join(",")}const t2=["none",It(0,2,1,-1,0,1,1,0,0,1,3,0),It(0,3,1,-2,0,2,2,0,0,1,5,0),It(0,3,3,-2,0,3,4,0,0,1,8,0),It(0,2,4,-1,0,4,5,0,0,1,10,0),It(0,3,5,-1,0,5,8,0,0,1,14,0),It(0,3,5,-1,0,6,10,0,0,1,18,0),It(0,4,5,-2,0,7,10,1,0,2,16,1),It(0,5,5,-3,0,8,10,1,0,3,14,2),It(0,5,6,-3,0,9,12,1,0,3,16,2),It(0,6,6,-3,0,10,14,1,0,4,18,3),It(0,6,7,-4,0,11,15,1,0,4,20,3),It(0,7,8,-4,0,12,17,2,0,5,22,4),It(0,7,8,-4,0,13,19,2,0,5,24,4),It(0,7,9,-4,0,14,21,2,0,5,26,4),It(0,8,9,-5,0,15,22,2,0,6,28,5),It(0,8,10,-5,0,16,24,2,0,6,30,5),It(0,8,11,-5,0,17,26,2,0,6,32,5),It(0,9,11,-5,0,18,28,2,0,7,34,6),It(0,9,12,-6,0,19,29,2,0,7,36,6),It(0,10,13,-6,0,20,31,3,0,8,38,7),It(0,10,13,-6,0,21,33,3,0,8,40,7),It(0,10,14,-6,0,22,35,3,0,8,42,7),It(0,11,14,-7,0,23,36,3,0,9,44,8),It(0,11,15,-7,0,24,38,3,0,9,46,8)],n2={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)"},r2={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function xf(e){return`${Math.round(e)}ms`}function o2(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function a2(e){const t={...n2,...e.easing},n={...r2,...e.duration};return{getAutoHeightDuration:o2,create:(o=["all"],a={})=>{const{duration:i=n.standard,easing:s=t.easeInOut,delay:l=0,...u}=a;return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:xf(i)} ${s} ${typeof l=="string"?l:xf(l)}`).join(",")},...e,easing:t,duration:n}}const i2={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function s2(e){return ar(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Mm(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let a=0;a<o.length;a++){const[i,s]=o[a];!s2(s)||i.startsWith("unstable_")?delete r[i]:ar(s)&&(r[i]={...s},n(r[i]))}}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 Ef(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const l2=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 u2(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})`:vs(t,l2(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Ef(n)})`:rl(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Ef(n)})`:nl(t,n)}})}function Lu(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:a={},transitions:i={},typography:s={},shape:l,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Er(20));const f=Ac({...a,colorSpace:u}),h=Ic(e);let p=tn(h,{mixins:Gx(h.breakpoints,r),palette:f,shadows:t2.slice(),typography:Xx(f,s),transitions:a2(i),zIndex:{...i2}});return p=tn(p,d),p=t.reduce((m,b)=>tn(m,b),p),p.unstable_sxConfig={...Ti,...d?.unstable_sxConfig},p.unstable_sx=function(b){return Ko({sx:b,theme:this})},p.toRuntimeSource=Mm,u2(p),p}function Fu(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 c2=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Fu(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Om(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Nm(e){return e==="dark"?c2:[]}function d2(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...a}=e,i=Ac({...t,colorSpace:o});return{palette:i,opacity:{...Om(i.mode),...n},overlays:r||Nm(i.mode),...a}}function f2(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 p2=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],h2=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let a=o;if(o==="class"&&(a=".%s"),o==="data"&&(a="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(a=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return p2(e.cssVarPrefix).forEach(s=>{i[s]=n[s],delete n[s]}),a==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace("%s",t)]:i,[`${r}, ${a.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!=="media")return`${r}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace("%s",String(t))}return r};function m2(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function he(e,t,n){!e[t]&&n&&(e[t]=n)}function Ha(e){return typeof e!="string"||!e.startsWith("hsl")?e:Dm(e)}function mr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=$a(Ha(e[t])))}function g2(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Zn=e=>{try{return e()}catch{}},b2=(e="mui")=>Rt.unstable_createGetCssVar(e);function zl(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const a=o==="dark"?"dark":"light";if(!r){t[o]=d2({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}const{palette:i,...s}=Lu({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[o]={...n,palette:i,opacity:{...Om(a),...n?.opacity},overlays:n?.overlays||Nm(a)},s}function y2(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:a="mui",nativeColor:i=!1,shouldSkipGeneratingVar:s=f2,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...d}=e,f=Object.keys(n)[0],h=r||(n.light&&f!=="light"?"light":f),p=b2(a),{[h]:m,light:b,dark:y,...x}=n,T={...x};let C=m;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(Er(21,h));let k;i&&(k="oklch");const S=zl(k,T,C,d,h);b&&!T.light&&zl(k,T,b,void 0,"light"),y&&!T.dark&&zl(k,T,y,void 0,"dark");let v={defaultColorScheme:h,...S,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:u,getCssVar:p,colorSchemes:T,font:{...qx(S.typography),...S.font},spacing:g2(d.spacing)};Object.keys(v.colorSchemes).forEach(L=>{const E=v.colorSchemes[L].palette,N=A=>{const M=A.split("-"),W=M[1],H=M[2];return p(A,E[W][H])};E.mode==="light"&&(he(E.common,"background","#fff"),he(E.common,"onBackground","#000")),E.mode==="dark"&&(he(E.common,"background","#000"),he(E.common,"onBackground","#fff"));function w(A,M,W){if(k){let H;return A===Kr&&(H=`transparent ${((1-W)*100).toFixed(0)}%`),A===dt&&(H=`#000 ${(W*100).toFixed(0)}%`),A===ft&&(H=`#fff ${(W*100).toFixed(0)}%`),`color-mix(in ${k}, ${M}, ${H})`}return A(M,W)}if(m2(E,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),E.mode==="light"){he(E.Alert,"errorColor",w(dt,E.error.light,.6)),he(E.Alert,"infoColor",w(dt,E.info.light,.6)),he(E.Alert,"successColor",w(dt,E.success.light,.6)),he(E.Alert,"warningColor",w(dt,E.warning.light,.6)),he(E.Alert,"errorFilledBg",N("palette-error-main")),he(E.Alert,"infoFilledBg",N("palette-info-main")),he(E.Alert,"successFilledBg",N("palette-success-main")),he(E.Alert,"warningFilledBg",N("palette-warning-main")),he(E.Alert,"errorFilledColor",Zn(()=>E.getContrastText(E.error.main))),he(E.Alert,"infoFilledColor",Zn(()=>E.getContrastText(E.info.main))),he(E.Alert,"successFilledColor",Zn(()=>E.getContrastText(E.success.main))),he(E.Alert,"warningFilledColor",Zn(()=>E.getContrastText(E.warning.main))),he(E.Alert,"errorStandardBg",w(ft,E.error.light,.9)),he(E.Alert,"infoStandardBg",w(ft,E.info.light,.9)),he(E.Alert,"successStandardBg",w(ft,E.success.light,.9)),he(E.Alert,"warningStandardBg",w(ft,E.warning.light,.9)),he(E.Alert,"errorIconColor",N("palette-error-main")),he(E.Alert,"infoIconColor",N("palette-info-main")),he(E.Alert,"successIconColor",N("palette-success-main")),he(E.Alert,"warningIconColor",N("palette-warning-main")),he(E.AppBar,"defaultBg",N("palette-grey-100")),he(E.Avatar,"defaultBg",N("palette-grey-400")),he(E.Button,"inheritContainedBg",N("palette-grey-300")),he(E.Button,"inheritContainedHoverBg",N("palette-grey-A100")),he(E.Chip,"defaultBorder",N("palette-grey-400")),he(E.Chip,"defaultAvatarColor",N("palette-grey-700")),he(E.Chip,"defaultIconColor",N("palette-grey-700")),he(E.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),he(E.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),he(E.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),he(E.LinearProgress,"primaryBg",w(ft,E.primary.main,.62)),he(E.LinearProgress,"secondaryBg",w(ft,E.secondary.main,.62)),he(E.LinearProgress,"errorBg",w(ft,E.error.main,.62)),he(E.LinearProgress,"infoBg",w(ft,E.info.main,.62)),he(E.LinearProgress,"successBg",w(ft,E.success.main,.62)),he(E.LinearProgress,"warningBg",w(ft,E.warning.main,.62)),he(E.Skeleton,"bg",k?w(Kr,E.text.primary,.11):`rgba(${N("palette-text-primaryChannel")} / 0.11)`),he(E.Slider,"primaryTrack",w(ft,E.primary.main,.62)),he(E.Slider,"secondaryTrack",w(ft,E.secondary.main,.62)),he(E.Slider,"errorTrack",w(ft,E.error.main,.62)),he(E.Slider,"infoTrack",w(ft,E.info.main,.62)),he(E.Slider,"successTrack",w(ft,E.success.main,.62)),he(E.Slider,"warningTrack",w(ft,E.warning.main,.62));const A=k?w(dt,E.background.default,.6825):ji(E.background.default,.8);he(E.SnackbarContent,"bg",A),he(E.SnackbarContent,"color",Zn(()=>k?Nu.text.primary:E.getContrastText(A))),he(E.SpeedDialAction,"fabHoverBg",ji(E.background.paper,.15)),he(E.StepConnector,"border",N("palette-grey-400")),he(E.StepContent,"border",N("palette-grey-400")),he(E.Switch,"defaultColor",N("palette-common-white")),he(E.Switch,"defaultDisabledColor",N("palette-grey-100")),he(E.Switch,"primaryDisabledColor",w(ft,E.primary.main,.62)),he(E.Switch,"secondaryDisabledColor",w(ft,E.secondary.main,.62)),he(E.Switch,"errorDisabledColor",w(ft,E.error.main,.62)),he(E.Switch,"infoDisabledColor",w(ft,E.info.main,.62)),he(E.Switch,"successDisabledColor",w(ft,E.success.main,.62)),he(E.Switch,"warningDisabledColor",w(ft,E.warning.main,.62)),he(E.TableCell,"border",w(ft,w(Kr,E.divider,1),.88)),he(E.Tooltip,"bg",w(Kr,E.grey[700],.92))}if(E.mode==="dark"){he(E.Alert,"errorColor",w(ft,E.error.light,.6)),he(E.Alert,"infoColor",w(ft,E.info.light,.6)),he(E.Alert,"successColor",w(ft,E.success.light,.6)),he(E.Alert,"warningColor",w(ft,E.warning.light,.6)),he(E.Alert,"errorFilledBg",N("palette-error-dark")),he(E.Alert,"infoFilledBg",N("palette-info-dark")),he(E.Alert,"successFilledBg",N("palette-success-dark")),he(E.Alert,"warningFilledBg",N("palette-warning-dark")),he(E.Alert,"errorFilledColor",Zn(()=>E.getContrastText(E.error.dark))),he(E.Alert,"infoFilledColor",Zn(()=>E.getContrastText(E.info.dark))),he(E.Alert,"successFilledColor",Zn(()=>E.getContrastText(E.success.dark))),he(E.Alert,"warningFilledColor",Zn(()=>E.getContrastText(E.warning.dark))),he(E.Alert,"errorStandardBg",w(dt,E.error.light,.9)),he(E.Alert,"infoStandardBg",w(dt,E.info.light,.9)),he(E.Alert,"successStandardBg",w(dt,E.success.light,.9)),he(E.Alert,"warningStandardBg",w(dt,E.warning.light,.9)),he(E.Alert,"errorIconColor",N("palette-error-main")),he(E.Alert,"infoIconColor",N("palette-info-main")),he(E.Alert,"successIconColor",N("palette-success-main")),he(E.Alert,"warningIconColor",N("palette-warning-main")),he(E.AppBar,"defaultBg",N("palette-grey-900")),he(E.AppBar,"darkBg",N("palette-background-paper")),he(E.AppBar,"darkColor",N("palette-text-primary")),he(E.Avatar,"defaultBg",N("palette-grey-600")),he(E.Button,"inheritContainedBg",N("palette-grey-800")),he(E.Button,"inheritContainedHoverBg",N("palette-grey-700")),he(E.Chip,"defaultBorder",N("palette-grey-700")),he(E.Chip,"defaultAvatarColor",N("palette-grey-300")),he(E.Chip,"defaultIconColor",N("palette-grey-300")),he(E.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),he(E.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),he(E.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),he(E.LinearProgress,"primaryBg",w(dt,E.primary.main,.5)),he(E.LinearProgress,"secondaryBg",w(dt,E.secondary.main,.5)),he(E.LinearProgress,"errorBg",w(dt,E.error.main,.5)),he(E.LinearProgress,"infoBg",w(dt,E.info.main,.5)),he(E.LinearProgress,"successBg",w(dt,E.success.main,.5)),he(E.LinearProgress,"warningBg",w(dt,E.warning.main,.5)),he(E.Skeleton,"bg",k?w(Kr,E.text.primary,.13):`rgba(${N("palette-text-primaryChannel")} / 0.13)`),he(E.Slider,"primaryTrack",w(dt,E.primary.main,.5)),he(E.Slider,"secondaryTrack",w(dt,E.secondary.main,.5)),he(E.Slider,"errorTrack",w(dt,E.error.main,.5)),he(E.Slider,"infoTrack",w(dt,E.info.main,.5)),he(E.Slider,"successTrack",w(dt,E.success.main,.5)),he(E.Slider,"warningTrack",w(dt,E.warning.main,.5));const A=k?w(ft,E.background.default,.985):ji(E.background.default,.98);he(E.SnackbarContent,"bg",A),he(E.SnackbarContent,"color",Zn(()=>k?Am.text.primary:E.getContrastText(A))),he(E.SpeedDialAction,"fabHoverBg",ji(E.background.paper,.15)),he(E.StepConnector,"border",N("palette-grey-600")),he(E.StepContent,"border",N("palette-grey-600")),he(E.Switch,"defaultColor",N("palette-grey-300")),he(E.Switch,"defaultDisabledColor",N("palette-grey-600")),he(E.Switch,"primaryDisabledColor",w(dt,E.primary.main,.55)),he(E.Switch,"secondaryDisabledColor",w(dt,E.secondary.main,.55)),he(E.Switch,"errorDisabledColor",w(dt,E.error.main,.55)),he(E.Switch,"infoDisabledColor",w(dt,E.info.main,.55)),he(E.Switch,"successDisabledColor",w(dt,E.success.main,.55)),he(E.Switch,"warningDisabledColor",w(dt,E.warning.main,.55)),he(E.TableCell,"border",w(dt,w(Kr,E.divider,1),.68)),he(E.Tooltip,"bg",w(Kr,E.grey[700],.92))}mr(E.background,"default"),mr(E.background,"paper"),mr(E.common,"background"),mr(E.common,"onBackground"),mr(E,"divider"),Object.keys(E).forEach(A=>{const M=E[A];A!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&he(E[A],"mainChannel",$a(Ha(M.main))),M.light&&he(E[A],"lightChannel",$a(Ha(M.light))),M.dark&&he(E[A],"darkChannel",$a(Ha(M.dark))),M.contrastText&&he(E[A],"contrastTextChannel",$a(Ha(M.contrastText))),A==="text"&&(mr(E[A],"primary"),mr(E[A],"secondary")),A==="action"&&(M.active&&mr(E[A],"active"),M.selected&&mr(E[A],"selected")))})}),v=t.reduce((L,E)=>tn(L,E),v);const _={prefix:a,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:h2(v),enableContrastVars:i},{vars:O,generateThemeVars:B,generateStyleSheets:R}=Wx(v,_);return v.vars=O,Object.entries(v.colorSchemes[v.defaultColorScheme]).forEach(([L,E])=>{v[L]=E}),v.generateThemeVars=B,v.generateStyleSheets=R,v.generateSpacing=function(){return Rt.createSpacing(d.spacing,kc(this))},v.getColorSchemeSelector=Yx(l),v.spacing=v.generateSpacing(),v.shouldSkipGeneratingVar=s,v.unstable_sxConfig={...Ti,...d?.unstable_sxConfig},v.unstable_sx=function(E){return Ko({sx:E,theme:this})},v.toRuntimeSource=Mm,v}function Cf(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Ac({...n===!0?{}:n.palette,mode:t})})}function Lm(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...i}=e,s=a||"light",l=o?.[s],u={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Lu(e,...t);let d=n;"palette"in e||u[s]&&(u[s]!==!0?d=u[s].palette:s==="dark"&&(d={mode:"dark"}));const f=Lu({...e,palette:d},...t);return f.defaultColorScheme=s,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},Cf(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},Cf(f,"light",u.light)),f}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),y2({...i,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const ol=Lm(),oa="$$material";function yo(){const e=Rt.useTheme(ol);return e[oa]||e}function x2(e){return c.jsx(Rt.GlobalStyles,{...e,defaultTheme:ol,themeId:oa})}function E2(e){const{variants:t,...n}=e,r={variants:t,style:ao(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=ao(o.style))}),r}const C2=Ic();function Vl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function no(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function T2(e){return e?(t,n)=>n[e]:null}function v2(e,t,n){e.theme=D2(e.theme)?n:e.theme[t]||e.theme}function ts(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>ts(e,o,n));if(Array.isArray(r?.variants)){let o;if(r.isProcessed)o=n?no(r.style,n):r.style;else{const{variants:a,...i}=r;o=n?no(ao(i),n):i}return Fm(e,r.variants,[o],n)}return r?.isProcessed?n?no(ao(r.style),n):r.style:n?no(ao(r),n):r}function Fm(e,t,n=[],r=void 0){let o;e:for(let a=0;a<t.length;a+=1){const i=t[a];if(typeof i.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(o))continue}else for(const s in i.props)if(e[s]!==i.props[s]&&e.ownerState?.[s]!==i.props[s])continue e;typeof i.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?no(ao(i.style(o)),r):i.style(o))):n.push(r?no(ao(i.style),r):i.style)}return n}function S2(e={}){const{themeId:t,defaultTheme:n=C2,rootShouldForwardProp:r=Vl,slotShouldForwardProp:o=Vl}=e;function a(s){v2(s,t,n)}return(s,l={})=>{Ax(s,v=>v.filter(_=>_!==Ko));const{name:u,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=T2(A2(d)),...m}=l,b=u&&u.startsWith("Mui")||d?"components":"custom",y=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,x=h||!1;let T=Vl;d==="Root"||d==="root"?T=r:d?T=o:w2(s)&&(T=void 0);const C=wx(s,{shouldForwardProp:T,label:k2(),...m}),k=v=>{if(v.__emotion_real===v)return v;if(typeof v=="function")return function(O){return ts(O,v,O.theme.modularCssLayers?b:void 0)};if(ar(v)){const _=E2(v);return function(B){return _.variants?ts(B,_,B.theme.modularCssLayers?b:void 0):B.theme.modularCssLayers?no(_.style,b):_.style}}return v},S=(...v)=>{const _=[],O=v.map(k),B=[];if(_.push(a),u&&p&&B.push(function(N){const A=N.theme.components?.[u]?.styleOverrides;if(!A)return null;const M={};for(const W in A)M[W]=ts(N,A[W],N.theme.modularCssLayers?"theme":void 0);return p(N,M)}),u&&!y&&B.push(function(N){const A=N.theme?.components?.[u]?.variants;return A?Fm(N,A,[],N.theme.modularCssLayers?"theme":void 0):null}),x||B.push(Ko),Array.isArray(O[0])){const E=O.shift(),N=new Array(_.length).fill(""),w=new Array(B.length).fill("");let A;A=[...N,...E,...w],A.raw=[...N,...E.raw,...w],_.unshift(A)}const R=[..._,...O,...B],L=C(...R);return s.muiName&&(L.muiName=s.muiName),L};return C.withConfig&&(S.withConfig=C.withConfig),S}}function k2(e,t){return void 0}function D2(e){for(const t in e)return!1;return!0}function w2(e){return typeof e=="string"&&e.charCodeAt(0)>96}function A2(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function _m(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Dn=e=>_m(e)&&e!=="classes",se=S2({themeId:oa,defaultTheme:ol,rootShouldForwardProp:Dn});function I2(e){return function(n){return c.jsx(x2,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function P2(){return sx}const nt=Rt.unstable_memoTheme;function Xe(e){return Ox(e)}function Le(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Be(e,o,n)}),r}function R2(e){return Be("MuiSvgIcon",e)}Le("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const M2=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${De(t)}`,`fontSize${De(n)}`]};return _e(o,R2,r)},O2=se("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${De(n.color)}`],t[`fontSize${De(n.fontSize)}`]]}})(nt(({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}}]}))),ks=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:i="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",...p}=r,m=I.isValidElement(o)&&o.type==="svg",b={...r,color:i,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m},y={};d||(y.viewBox=h);const x=M2(b);return c.jsxs(O2,{as:s,className:Ie(x.root,a),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...y,...p,...m&&o.props,ownerState:b,children:[m?o.props.children:o,f?c.jsx("title",{children:f}):null]})});ks.muiName="SvgIcon";function kt(e,t){function n(r,o){return c.jsx(ks,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=ks.muiName,I.memo(I.forwardRef(n))}function Bm(e,t=166){let n;function r(...o){const a=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(a,t)}return r.clear=()=>{clearTimeout(n)},r}function ns(e,t){return I.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function Vt(e){return e&&e.ownerDocument||document}function Tr(e){return Vt(e).defaultView||window}function _u(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Ln(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:a}=I.useRef(t!==void 0),[i,s]=I.useState(n),l=a?t:i,u=I.useCallback(d=>{a||s(d)},[]);return[l,u]}function Pe(e){const t=I.useRef(e);return Wt(()=>{t.current=e}),I.useRef((...n)=>(0,t.current)(...n)).current}function lt(...e){const t=I.useRef(void 0),n=I.useCallback(r=>{const o=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const i=a,s=i(r);return typeof s=="function"?s:()=>{i(null)}}return a.current=r,()=>{a.current=null}});return()=>{o.forEach(a=>a?.())}},e);return I.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function N2(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function L2(e,t){if(!e)return t;function n(i,s){const l={};return Object.keys(s).forEach(u=>{N2(u,s[u])&&typeof i[u]=="function"&&(l[u]=(...d)=>{i[u](...d),s[u](...d)})}),l}if(typeof e=="function"||typeof t=="function")return i=>{const s=typeof t=="function"?t(i):t,l=typeof e=="function"?e({...i,...s}):e,u=Ie(i?.className,s?.className,l?.className),d=n(l,s);return{...s,...l,...d,...!!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),a=Ie(r?.className,e?.className);return{...t,...e,...o,...!!a&&{className:a},...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 Pc=kt(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),Po=Rt.createStack({createStyledComponent:se("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Xe({props:e,name:"MuiStack"})});class Ho{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 Ho(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 Ho(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 Ho(t,r)}}const io={teal:"#14b3cb",orange:"#e47404",darkBlue:"#1474a4"},F2='"JetBrains Mono", "ui-monospace", "SFMono-Regular", "Menlo", monospace',Ds=P.styled(P.Card)({display:"flex",flexDirection:"column",height:"100%",boxShadow:"none",border:"none",backgroundColor:"transparent"}),jm=P.styled(P.CardContent)({display:"flex",flexDirection:"column",padding:"0",flexGrow:1}),Rc=P.styled(P.CardMedia)({padding:"0"}),_2=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 B2=P.styled("div")({marginBottom:"48px",padding:"0",backgroundColor:"transparent",border:"none",boxShadow:"none"}),Bu=P.styled("div")({marginBottom:"0",padding:"0",backgroundColor:"transparent",border:"none",boxShadow:"none"}),rs=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 j2=P.styled("div")({height:"100%"});P.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const $m=P.styled("div")({height:"75vh",width:"100%",overflowY:"auto"});P.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const Hm=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)"}}),Um=P.styled(P.CardContent)({padding:"0","&:last-child":{paddingBottom:"0"}}),zm=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 $i=kt(c.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Vm=kt(c.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"})),Tf=kt(c.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"})),Mc=kt(c.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 Y(){return Y=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},Y.apply(null,arguments)}function Ue(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 ju(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const i=n.slice(o,r).trim();(i||!a)&&t.push(i),o=r+1,r=n.indexOf(",",o)}return t}function al(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,H2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,U2={};function vf(e,t){return(U2.jsx?H2:$2).test(e)}const z2=/[ \t\n\f\r]/g;function Oc(e){return typeof e=="object"?e.type==="text"?Sf(e.value):!1:Sf(e)}function Sf(e){return e.replace(z2,"")===""}let vi=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};vi.prototype.normal={};vi.prototype.property={};vi.prototype.space=void 0;function Wm(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new vi(n,r,t)}function ui(e){return e.toLowerCase()}let mn=class{constructor(t,n){this.attribute=n,this.property=t}};mn.prototype.attribute="";mn.prototype.booleanish=!1;mn.prototype.boolean=!1;mn.prototype.commaOrSpaceSeparated=!1;mn.prototype.commaSeparated=!1;mn.prototype.defined=!1;mn.prototype.mustUseProperty=!1;mn.prototype.number=!1;mn.prototype.overloadedBoolean=!1;mn.prototype.property="";mn.prototype.spaceSeparated=!1;mn.prototype.space=void 0;let V2=0;const Ge=xo(),$t=xo(),$u=xo(),Se=xo(),Et=xo(),Uo=xo(),gn=xo();function xo(){return 2**++V2}const Hu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:$t,commaOrSpaceSeparated:gn,commaSeparated:Uo,number:Se,overloadedBoolean:$u,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Wl=Object.keys(Hu);let Nc=class extends mn{constructor(t,n,r,o){let a=-1;if(super(t,n),kf(this,"space",o),typeof r=="number")for(;++a<Wl.length;){const i=Wl[a];kf(this,Wl[a],(r&Hu[i])===Hu[i])}}};Nc.prototype.defined=!0;function kf(e,t,n){n&&(e[t]=n)}function aa(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Nc(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ui(r)]=r,n[ui(a.attribute)]=r}return new vi(t,n,e.space)}const qm=aa({properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:Et,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:Se,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:Et,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:$t,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ym(e,t){return t in e?e[t]:t}function Km(e,t){return Ym(e,t.toLowerCase())}const W2=aa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Uo,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Et,autoFocus:Ge,autoPlay:Ge,blocking:Et,capture:null,charSet:null,checked:Ge,cite:null,className:Et,cols:Se,colSpan:null,content:null,contentEditable:$t,controls:Ge,controlsList:Et,coords:Se|Uo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:$u,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Et,height:Se,hidden:$u,high:Se,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ge,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,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:Se,pattern:null,ping:Et,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Et,required:Ge,reversed:Ge,rows:Se,rowSpan:Se,sandbox:Et,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:$t,width:Se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,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:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:Se,security:null,unselectable:null},space:"html",transform:Km}),q2=aa({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:gn,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:Et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,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:Uo,g2:Uo,glyphName:Uo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,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:Se,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:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,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:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ym}),Gm=aa({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()}}),Qm=aa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Km}),Xm=aa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Y2={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"},K2=/[A-Z]/g,Df=/-[a-z]/g,G2=/^data[-\w.:]+$/i;function Si(e,t){const n=ui(t);let r=t,o=mn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&G2.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Df,X2);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Df.test(a)){let i=a.replace(K2,Q2);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=Nc}return new o(r,t)}function Q2(e){return"-"+e.toLowerCase()}function X2(e){return e.charAt(1).toUpperCase()}const ia=Wm([qm,W2,Gm,Qm,Xm],"html"),zr=Wm([qm,q2,Gm,Qm,Xm],"svg");function Uu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function il(e){return e.join(" ").trim()}var Ro={},ql,wf;function Z2(){if(wf)return ql;wf=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
22
+ `,u="/",d="*",f="",h="comment",p="declaration";ql=function(b,y){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];y=y||{};var x=1,T=1;function C(N){var w=N.match(t);w&&(x+=w.length);var A=N.lastIndexOf(l);T=~A?N.length-A:T+N.length}function k(){var N={line:x,column:T};return function(w){return w.position=new S(N),O(),w}}function S(N){this.start=N,this.end={line:x,column:T},this.source=y.source}S.prototype.content=b;function v(N){var w=new Error(y.source+":"+x+":"+T+": "+N);if(w.reason=N,w.filename=y.source,w.line=x,w.column=T,w.source=b,!y.silent)throw w}function _(N){var w=N.exec(b);if(w){var A=w[0];return C(A),b=b.slice(A.length),w}}function O(){_(n)}function B(N){var w;for(N=N||[];w=R();)w!==!1&&N.push(w);return N}function R(){var N=k();if(!(u!=b.charAt(0)||d!=b.charAt(1))){for(var w=2;f!=b.charAt(w)&&(d!=b.charAt(w)||u!=b.charAt(w+1));)++w;if(w+=2,f===b.charAt(w-1))return v("End of comment missing");var A=b.slice(2,w-2);return T+=2,C(A),b=b.slice(w),T+=2,N({type:h,comment:A})}}function L(){var N=k(),w=_(r);if(w){if(R(),!_(o))return v("property missing ':'");var A=_(a),M=N({type:p,property:m(w[0].replace(e,f)),value:A?m(A[0].replace(e,f)):f});return _(i),M}}function E(){var N=[];B(N);for(var w;w=L();)w!==!1&&(N.push(w),B(N));return N}return O(),E()};function m(b){return b?b.replace(s,f):f}return ql}var Af;function J2(){if(Af)return Ro;Af=1;var e=Ro&&Ro.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.default=n;var t=e(Z2());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var i=(0,t.default)(r),s=typeof o=="function";return i.forEach(function(l){if(l.type==="declaration"){var u=l.property,d=l.value;s?o(u,d,l):d&&(a=a||{},a[u]=d)}}),a}return Ro}var Ta={},If;function eE(){if(If)return Ta;If=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(u){return!u||n.test(u)||e.test(u)},i=function(u,d){return d.toUpperCase()},s=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),a(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(o,s):u=u.replace(r,s),u.replace(t,i))};return Ta.camelCase=l,Ta}var va,Pf;function tE(){if(Pf)return va;Pf=1;var e=va&&va.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(J2()),n=eE();function r(o,a){var i={};return!o||typeof o!="string"||(0,t.default)(o,function(s,l){s&&l&&(i[(0,n.camelCase)(s,a)]=l)}),i}return r.default=r,va=r,va}var nE=tE();const rE=qn(nE),sl=Zm("end"),cr=Zm("start");function Zm(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 oE(e){const t=cr(e),n=sl(e);if(t&&n)return{start:t,end:n}}function Wa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rf(e.position):"start"in e||"end"in e?Rf(e):"line"in e||"column"in e?zu(e):""}function zu(e){return Mf(e&&e.line)+":"+Mf(e&&e.column)}function Rf(e){return zu(e&&e.start)+"-"+zu(e&&e.end)}function Mf(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="",a={},i=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(i=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=Wa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.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 Lc={}.hasOwnProperty,aE=new Map,iE=/[A-Z]/g,sE=new Set(["table","tbody","thead","tfoot","tr"]),lE=new Set(["td","th"]),Jm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function uE(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=bE(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=gE(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"?zr:ia,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=e0(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function e0(e,t,n){if(t.type==="element")return cE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return dE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pE(e,t,n);if(t.type==="mdxjsEsm")return fE(e,t);if(t.type==="root")return hE(e,t,n);if(t.type==="text")return mE(e,t)}function cE(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=zr,e.schema=o),e.ancestors.push(t);const a=n0(e,t.tagName,!1),i=yE(e,t);let s=_c(e,t);return sE.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Oc(l):!0})),t0(e,i,a,t),Fc(i,s),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}function dE(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)}ci(e,t.position)}function fE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ci(e,t.position)}function pE(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=zr,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:n0(e,t.name,!0),i=xE(e,t),s=_c(e,t);return t0(e,i,a,t),Fc(i,s),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}function hE(e,t,n){const r={};return Fc(r,_c(e,t)),e.create(t,e.Fragment,r,n)}function mE(e,t){return t.value}function t0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Fc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function gE(e,t,n){return r;function r(o,a,i,s){const u=Array.isArray(i.children)?n:t;return s?u(a,i,s):u(a,i)}}function bE(e,t){return n;function n(r,o,a,i){const s=Array.isArray(a.children),l=cr(r);return t(o,a,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function yE(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Lc.call(t.properties,o)){const a=EE(e,o,t.properties[o]);if(a){const[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&lE.has(t.tagName)?r=s:n[i]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function xE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const i=a.expression;i.type;const s=i.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else ci(e,t.position);else{const o=r.name;let a;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,a=e.evaluater.evaluateExpression(s.expression)}else ci(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function _c(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:aE;for(;++r<t.children.length;){const a=t.children[r];let i;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const u=o.get(l)||0;i=l+"-"+u,o.set(l,u+1)}}const s=e0(e,a,i);s!==void 0&&n.push(s)}return n}function EE(e,t,n){const r=Si(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?al(n):il(n)),r.property==="style"){let o=typeof n=="object"?n:CE(e,String(n));return e.stylePropertyNameCase==="css"&&(o=TE(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Y2[r.property]||r.property:r.attribute,n]}}function CE(e,t){try{return rE(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=Jm+"#cannot-parse-style-attribute",o}}function n0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,i;for(;++a<o.length;){const s=vf(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=i}else r=vf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Lc.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ci(e)}function ci(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=Jm+"#cannot-handle-mdx-estrees-without-createevaluater",n}function TE(e){const t={};let n;for(n in e)Lc.call(e,n)&&(t[vE(n)]=e[n]);return t}function vE(e){let t=e.replace(iE,SE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function SE(e){return"-"+e.toLowerCase()}const Yl={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"]},kE={};function Bc(e,t){const n=kE,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return r0(e,r,o)}function r0(e,t,n){if(DE(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 Of(e.children,t,n)}return Array.isArray(e)?Of(e,t,n):""}function Of(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=r0(e[o],t,n);return r.join("")}function DE(e){return!!(e&&typeof e=="object")}const Nf=document.createElement("i");function jc(e){const t="&"+e+";";Nf.innerHTML=t;const n=Nf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Tn(e,t,n,r){const o=e.length;let a=0,i;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function On(e,t){return e.length>0?(Tn(e,e.length,0,t),e):t}const Lf={}.hasOwnProperty;function o0(e){const t={};let n=-1;for(;++n<e.length;)wE(t,e[n]);return t}function wE(e,t){let n;for(n in t){const o=(Lf.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let i;if(a)for(i in a){Lf.call(o,i)||(o[i]=[]);const s=a[i];AE(o[i],Array.isArray(s)?s:s?[s]:[])}}}function AE(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Tn(e,0,0,r)}function a0(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 Wn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const on=Vr(/[A-Za-z]/),en=Vr(/[\dA-Za-z]/),IE=Vr(/[#-'*+\--9=?A-Z^-~]/);function ws(e){return e!==null&&(e<32||e===127)}const Vu=Vr(/\d/),PE=Vr(/[\dA-Fa-f]/),RE=Vr(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function tt(e){return e===-2||e===-1||e===32}const ll=Vr(/\p{P}|\p{S}/u),fo=Vr(/\s/);function Vr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function sa(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let i="";if(a===37&&en(e.charCodeAt(n+1))&&en(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),o=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function at(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return i;function i(l){return tt(l)?(e.enter(n),s(l)):t(l)}function s(l){return tt(l)&&a++<o?(e.consume(l),s):(e.exit(n),t(l))}}const ME={tokenize:OE};function OE(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"),at(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),a(s)}function a(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return $e(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}const NE={tokenize:LE},Ff={tokenize:FE};function LE(e){const t=this,n=[];let r=0,o,a,i;return s;function s(C){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,u)(C)}return u(C)}function l(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&T();const k=t.events.length;let S=k,v;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){v=t.events[S][1].end;break}x(r);let _=k;for(;_<t.events.length;)t.events[_][1].end={...v},_++;return Tn(t.events,S+1,0,t.events.slice(k)),t.events.length=_,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(Ff,d,f)(C)}function d(C){return o&&T(),x(r),h(C)}function f(C){return t.parser.lazy[t.now().line]=r!==n.length,i=t.now().offset,m(C)}function h(C){return t.containerState={},e.attempt(Ff,p,m)(C)}function p(C){return r++,n.push([t.currentConstruct,t.containerState]),h(C)}function m(C){if(C===null){o&&T(),x(0),e.consume(C);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),b(C)}function b(C){if(C===null){y(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return $e(C)?(e.consume(C),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(C),b)}function y(C,k){const S=t.sliceStream(C);if(k&&S.push(null),C.previous=a,a&&(a.next=C),a=C,o.defineSkip(C.start),o.write(S),t.parser.lazy[C.start.line]){let v=o.events.length;for(;v--;)if(o.events[v][1].start.offset<i&&(!o.events[v][1].end||o.events[v][1].end.offset>i))return;const _=t.events.length;let O=_,B,R;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(B){R=t.events[O][1].end;break}B=!0}for(x(r),v=_;v<t.events.length;)t.events[v][1].end={...R},v++;Tn(t.events,O+1,0,t.events.slice(_)),t.events.length=v}}function x(C){let k=n.length;for(;k-- >C;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=C}function T(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function FE(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Go(e){if(e===null||yt(e)||fo(e))return 1;if(ll(e))return 2}function ul(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Wu={name:"attention",resolveAll:_E,tokenize:BE};function _E(e,t){let n=-1,r,o,a,i,s,l,u,d;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 f={...e[r][1].end},h={...e[n][1].start};_f(f,-l),_f(h,l),i={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},a={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...i.start},end:{...s.end}},e[r][1].end={...i.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=On(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=On(u,[["enter",o,t],["enter",i,t],["exit",i,t],["enter",a,t]]),u=On(u,ul(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=On(u,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=On(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Tn(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function BE(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Go(r);let a;return i;function i(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;const u=e.exit("attentionSequence"),d=Go(l),f=!d||d===2&&o||n.includes(l),h=!o||o===2&&d||n.includes(r);return u._open=!!(a===42?f:f&&(o||!h)),u._close=!!(a===42?h:h&&(d||!f)),t(l)}}function _f(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jE={name:"autolink",tokenize:$E};function $E(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return on(p)?(e.consume(p),i):p===64?n(p):u(p)}function i(p){return p===43||p===45||p===46||en(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||en(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ws(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),d):IE(p)?(e.consume(p),u):n(p)}function d(p){return en(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||en(p))&&r++<63){const m=p===45?h:f;return e.consume(p),m}return n(p)}}const ki={partial:!0,tokenize:HE};function HE(e,t,n){return r;function r(a){return tt(a)?at(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||$e(a)?t(a):n(a)}}const i0={continuation:{tokenize:zE},exit:VE,name:"blockQuote",tokenize:UE};function UE(e,t,n){const r=this;return o;function o(i){if(i===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return n(i)}function a(i){return tt(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function zE(e,t,n){const r=this;return o;function o(i){return tt(i)?at(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(i0,t,n)(i)}}function VE(e){e.exit("blockQuote")}const s0={name:"characterEscape",tokenize:WE};function WE(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return RE(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const l0={name:"characterReference",tokenize:qE};function qE(e,t,n){const r=this;let o=0,a,i;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,i=en,d(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=PE,d):(e.enter("characterReferenceValue"),a=7,i=Vu,d(f))}function d(f){if(f===59&&o){const h=e.exit("characterReferenceValue");return i===en&&!jc(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(f)&&o++<a?(e.consume(f),d):n(f)}}const Bf={partial:!0,tokenize:KE},jf={concrete:!0,name:"codeFenced",tokenize:YE};function YE(e,t,n){const r=this,o={partial:!0,tokenize:S};let a=0,i=0,s;return l;function l(v){return u(v)}function u(v){const _=r.events[r.events.length-1];return a=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,s=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(v)}function d(v){return v===s?(i++,e.consume(v),d):i<3?n(v):(e.exit("codeFencedFenceSequence"),tt(v)?at(e,f,"whitespace")(v):f(v))}function f(v){return v===null||$e(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(Bf,b,k)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===null||$e(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(v)):tt(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,p,"whitespace")(v)):v===96&&v===s?n(v):(e.consume(v),h)}function p(v){return v===null||$e(v)?f(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||$e(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(v)):v===96&&v===s?n(v):(e.consume(v),m)}function b(v){return e.attempt(o,k,y)(v)}function y(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),x}function x(v){return a>0&&tt(v)?at(e,T,"linePrefix",a+1)(v):T(v)}function T(v){return v===null||$e(v)?e.check(Bf,b,k)(v):(e.enter("codeFlowValue"),C(v))}function C(v){return v===null||$e(v)?(e.exit("codeFlowValue"),T(v)):(e.consume(v),C)}function k(v){return e.exit("codeFenced"),t(v)}function S(v,_,O){let B=0;return R;function R(A){return v.enter("lineEnding"),v.consume(A),v.exit("lineEnding"),L}function L(A){return v.enter("codeFencedFence"),tt(A)?at(v,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):E(A)}function E(A){return A===s?(v.enter("codeFencedFenceSequence"),N(A)):O(A)}function N(A){return A===s?(B++,v.consume(A),N):B>=i?(v.exit("codeFencedFenceSequence"),tt(A)?at(v,w,"whitespace")(A):w(A)):O(A)}function w(A){return A===null||$e(A)?(v.exit("codeFencedFence"),_(A)):O(A)}}}function KE(e,t,n){const r=this;return o;function o(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}const Kl={name:"codeIndented",tokenize:QE},GE={partial:!0,tokenize:XE};function QE(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),at(e,a,"linePrefix",5)(u)}function a(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(u):n(u)}function i(u){return u===null?l(u):$e(u)?e.attempt(GE,i,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||$e(u)?(e.exit("codeFlowValue"),i(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function XE(e,t,n){const r=this;return o;function o(i){return r.parser.lazy[r.now().line]?n(i):$e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):at(e,a,"linePrefix",5)(i)}function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):$e(i)?o(i):n(i)}}const ZE={name:"codeText",previous:eC,resolve:JE,tokenize:tC};function JE(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 eC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tC(e,t,n){let r=0,o,a;return i;function i(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(a=e.enter("codeTextSequence"),o=0,d(f)):$e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||$e(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",u(f))}}class nC{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 a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Sa(this.left,r),a.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),Sa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Sa(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);Sa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Sa(this.left,n.reverse())}}}function Sa(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 u0(e){const t={};let n=-1,r,o,a,i,s,l,u;const d=new nC(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,rC(d,n)),n=t[n],u=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(i=d.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(o&&(d.get(o)[1].type="lineEndingBlank"),i[1].type="lineEnding",o=a);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;o&&(r[1].end={...d.get(o)[1].start},s=d.slice(o,n),s.unshift(r),d.splice(o,n-o+1,s))}}return Tn(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function rC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],u={};let d,f,h=-1,p=n,m=0,b=0;const y=[b];for(;p;){for(;e.get(++o)[1]!==p;);a.push(o),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),f&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(d),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=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&&(b=h+1,y.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),h=y.length;h--;){const x=s.slice(y[h],y[h+1]),T=a.pop();l.push([T,T+x.length-1]),e.splice(T,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 oC={resolve:iC,tokenize:sC},aC={partial:!0,tokenize:lC};function iC(e){return u0(e),e}function sC(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?a(s):$e(s)?e.check(aC,i,a)(s):(e.consume(s),o)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function lC(e,t,n){const r=this;return o;function o(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),at(e,a,"linePrefix")}function a(i){if(i===null||$e(i))return n(i);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(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function c0(e,t,n,r,o,a,i,s,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return f;function f(x){return x===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(x),e.exit(a),h):x===null||x===32||x===41||ws(x)?n(x):(e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),b(x))}function h(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(s),h(x)):x===null||x===60||$e(x)?n(x):(e.consume(x),x===92?m:p)}function m(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function b(x){return!d&&(x===null||x===41||yt(x))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(x)):d<u&&x===40?(e.consume(x),d++,b):x===41?(e.consume(x),d--,b):x===null||x===32||x===40||ws(x)?n(x):(e.consume(x),x===92?y:b)}function y(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function d0(e,t,n,r,o,a){const i=this;let s=0,l;return u;function u(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(a),d}function d(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?n(p):p===93?(e.exit(a),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||$e(p)||s++>999?(e.exit("chunkString"),d(p)):(e.consume(p),l||(l=!tt(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function f0(e,t,n,r,o,a){let i;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),i=h===40?41:h,l):n(h)}function l(h){return h===i?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),t):(e.enter(a),u(h))}function u(h){return h===i?(e.exit(a),l(i)):h===null?n(h):$e(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),at(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===i||h===null||$e(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?f:d)}function f(h){return h===i||h===92?(e.consume(h),d):d(h)}}function qa(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):tt(o)?at(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const uC={name:"definition",tokenize:dC},cC={partial:!0,tokenize:fC};function dC(e,t,n){const r=this;let o;return a;function a(p){return e.enter("definition"),i(p)}function i(p){return d0.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=Wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return yt(p)?qa(e,u)(p):u(p)}function u(p){return c0(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(cC,f,f)(p)}function f(p){return tt(p)?at(e,h,"whitespace")(p):h(p)}function h(p){return p===null||$e(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function fC(e,t,n){return r;function r(s){return yt(s)?qa(e,o)(s):n(s)}function o(s){return f0(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return tt(s)?at(e,i,"whitespace")(s):i(s)}function i(s){return s===null||$e(s)?t(s):n(s)}}const pC={name:"hardBreakEscape",tokenize:hC};function hC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return $e(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const mC={name:"headingAtx",resolve:gC,tokenize:bC};function gC(e,t){let n=e.length-2,r=3,o,a;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},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Tn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function bC(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&r++<6?(e.consume(d),i):d===null||yt(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||$e(d)?(e.exit("atxHeading"),t(d)):tt(d)?at(e,s,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),s(d))}function u(d){return d===null||d===35||yt(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),u)}}const yC=["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"],$f=["pre","script","style","textarea"],xC={concrete:!0,name:"htmlFlow",resolveTo:TC,tokenize:vC},EC={partial:!0,tokenize:kC},CC={partial:!0,tokenize:SC};function TC(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 vC(e,t,n){const r=this;let o,a,i,s,l;return u;function u(F){return d(F)}function d(F){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(F),f}function f(F){return F===33?(e.consume(F),h):F===47?(e.consume(F),a=!0,b):F===63?(e.consume(F),o=3,r.interrupt?t:D):on(F)?(e.consume(F),i=String.fromCharCode(F),y):n(F)}function h(F){return F===45?(e.consume(F),o=2,p):F===91?(e.consume(F),o=5,s=0,m):on(F)?(e.consume(F),o=4,r.interrupt?t:D):n(F)}function p(F){return F===45?(e.consume(F),r.interrupt?t:D):n(F)}function m(F){const fe="CDATA[";return F===fe.charCodeAt(s++)?(e.consume(F),s===fe.length?r.interrupt?t:E:m):n(F)}function b(F){return on(F)?(e.consume(F),i=String.fromCharCode(F),y):n(F)}function y(F){if(F===null||F===47||F===62||yt(F)){const fe=F===47,J=i.toLowerCase();return!fe&&!a&&$f.includes(J)?(o=1,r.interrupt?t(F):E(F)):yC.includes(i.toLowerCase())?(o=6,fe?(e.consume(F),x):r.interrupt?t(F):E(F)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(F):a?T(F):C(F))}return F===45||en(F)?(e.consume(F),i+=String.fromCharCode(F),y):n(F)}function x(F){return F===62?(e.consume(F),r.interrupt?t:E):n(F)}function T(F){return tt(F)?(e.consume(F),T):R(F)}function C(F){return F===47?(e.consume(F),R):F===58||F===95||on(F)?(e.consume(F),k):tt(F)?(e.consume(F),C):R(F)}function k(F){return F===45||F===46||F===58||F===95||en(F)?(e.consume(F),k):S(F)}function S(F){return F===61?(e.consume(F),v):tt(F)?(e.consume(F),S):C(F)}function v(F){return F===null||F===60||F===61||F===62||F===96?n(F):F===34||F===39?(e.consume(F),l=F,_):tt(F)?(e.consume(F),v):O(F)}function _(F){return F===l?(e.consume(F),l=null,B):F===null||$e(F)?n(F):(e.consume(F),_)}function O(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||yt(F)?S(F):(e.consume(F),O)}function B(F){return F===47||F===62||tt(F)?C(F):n(F)}function R(F){return F===62?(e.consume(F),L):n(F)}function L(F){return F===null||$e(F)?E(F):tt(F)?(e.consume(F),L):n(F)}function E(F){return F===45&&o===2?(e.consume(F),M):F===60&&o===1?(e.consume(F),W):F===62&&o===4?(e.consume(F),V):F===63&&o===3?(e.consume(F),D):F===93&&o===5?(e.consume(F),$):$e(F)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(EC,Q,N)(F)):F===null||$e(F)?(e.exit("htmlFlowData"),N(F)):(e.consume(F),E)}function N(F){return e.check(CC,w,Q)(F)}function w(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),A}function A(F){return F===null||$e(F)?N(F):(e.enter("htmlFlowData"),E(F))}function M(F){return F===45?(e.consume(F),D):E(F)}function W(F){return F===47?(e.consume(F),i="",H):E(F)}function H(F){if(F===62){const fe=i.toLowerCase();return $f.includes(fe)?(e.consume(F),V):E(F)}return on(F)&&i.length<8?(e.consume(F),i+=String.fromCharCode(F),H):E(F)}function $(F){return F===93?(e.consume(F),D):E(F)}function D(F){return F===62?(e.consume(F),V):F===45&&o===2?(e.consume(F),D):E(F)}function V(F){return F===null||$e(F)?(e.exit("htmlFlowData"),Q(F)):(e.consume(F),V)}function Q(F){return e.exit("htmlFlow"),t(F)}}function SC(e,t,n){const r=this;return o;function o(i){return $e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):n(i)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}function kC(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ki,t,n)}}const DC={name:"htmlText",tokenize:wC};function wC(e,t,n){const r=this;let o,a,i;return s;function s(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),l}function l(D){return D===33?(e.consume(D),u):D===47?(e.consume(D),S):D===63?(e.consume(D),C):on(D)?(e.consume(D),O):n(D)}function u(D){return D===45?(e.consume(D),d):D===91?(e.consume(D),a=0,m):on(D)?(e.consume(D),T):n(D)}function d(D){return D===45?(e.consume(D),p):n(D)}function f(D){return D===null?n(D):D===45?(e.consume(D),h):$e(D)?(i=f,W(D)):(e.consume(D),f)}function h(D){return D===45?(e.consume(D),p):f(D)}function p(D){return D===62?M(D):D===45?h(D):f(D)}function m(D){const V="CDATA[";return D===V.charCodeAt(a++)?(e.consume(D),a===V.length?b:m):n(D)}function b(D){return D===null?n(D):D===93?(e.consume(D),y):$e(D)?(i=b,W(D)):(e.consume(D),b)}function y(D){return D===93?(e.consume(D),x):b(D)}function x(D){return D===62?M(D):D===93?(e.consume(D),x):b(D)}function T(D){return D===null||D===62?M(D):$e(D)?(i=T,W(D)):(e.consume(D),T)}function C(D){return D===null?n(D):D===63?(e.consume(D),k):$e(D)?(i=C,W(D)):(e.consume(D),C)}function k(D){return D===62?M(D):C(D)}function S(D){return on(D)?(e.consume(D),v):n(D)}function v(D){return D===45||en(D)?(e.consume(D),v):_(D)}function _(D){return $e(D)?(i=_,W(D)):tt(D)?(e.consume(D),_):M(D)}function O(D){return D===45||en(D)?(e.consume(D),O):D===47||D===62||yt(D)?B(D):n(D)}function B(D){return D===47?(e.consume(D),M):D===58||D===95||on(D)?(e.consume(D),R):$e(D)?(i=B,W(D)):tt(D)?(e.consume(D),B):M(D)}function R(D){return D===45||D===46||D===58||D===95||en(D)?(e.consume(D),R):L(D)}function L(D){return D===61?(e.consume(D),E):$e(D)?(i=L,W(D)):tt(D)?(e.consume(D),L):B(D)}function E(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),o=D,N):$e(D)?(i=E,W(D)):tt(D)?(e.consume(D),E):(e.consume(D),w)}function N(D){return D===o?(e.consume(D),o=void 0,A):D===null?n(D):$e(D)?(i=N,W(D)):(e.consume(D),N)}function w(D){return D===null||D===34||D===39||D===60||D===61||D===96?n(D):D===47||D===62||yt(D)?B(D):(e.consume(D),w)}function A(D){return D===47||D===62||yt(D)?B(D):n(D)}function M(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):n(D)}function W(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),H}function H(D){return tt(D)?at(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):$(D)}function $(D){return e.enter("htmlTextData"),i(D)}}const $c={name:"labelEnd",resolveAll:RC,resolveTo:MC,tokenize:OC},AC={tokenize:NC},IC={tokenize:LC},PC={tokenize:FC};function RC(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&&Tn(e,0,e.length,n),e}function MC(e,t){let n=e.length,r=0,o,a,i,s;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(i=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[i][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[i-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=On(s,e.slice(a+1,a+r+3)),s=On(s,[["enter",d,t]]),s=On(s,ul(t.parser.constructs.insideSpan.null,e.slice(a+r+4,i-3),t)),s=On(s,[["exit",d,t],e[i-2],e[i-1],["exit",u,t]]),s=On(s,e.slice(i+1)),s=On(s,[["exit",l,t]]),Tn(e,a,e.length,s),e}function OC(e,t,n){const r=this;let o=r.events.length,a,i;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return s;function s(h){return a?a._inactive?f(h):(i=r.parser.defined.includes(Wn(r.sliceSerialize({start:a.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(AC,d,i?d:f)(h):h===91?e.attempt(IC,d,i?u:f)(h):i?d(h):f(h)}function u(h){return e.attempt(PC,d,f)(h)}function d(h){return t(h)}function f(h){return a._balanced=!0,n(h)}}function NC(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return yt(f)?qa(e,a)(f):a(f)}function a(f){return f===41?d(f):c0(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function i(f){return yt(f)?qa(e,l)(f):d(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?f0(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return yt(f)?qa(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function LC(e,t,n){const r=this;return o;function o(s){return d0.call(r,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(Wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function i(s){return n(s)}}function FC(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const _C={name:"labelStartImage",resolveAll:$c.resolveAll,tokenize:BC};function BC(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):n(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const jC={name:"labelStartLink",resolveAll:$c.resolveAll,tokenize:$C};function $C(e,t,n){const r=this;return o;function o(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}const Gl={name:"lineEnding",tokenize:HC};function HC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),at(e,t,"linePrefix")}}const os={name:"thematicBreak",tokenize:UC};function UC(e,t,n){let r=0,o;return a;function a(u){return e.enter("thematicBreak"),i(u)}function i(u){return o=u,s(u)}function s(u){return u===o?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||$e(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===o?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),tt(u)?at(e,s,"whitespace")(u):s(u))}}const ln={continuation:{tokenize:qC},exit:KC,name:"list",tokenize:WC},zC={partial:!0,tokenize:GC},VC={partial:!0,tokenize:YC};function WC(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,i=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Vu(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(os,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return Vu(p)&&++i<10?(e.consume(p),l):(!r.interrupt||i<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ki,r.interrupt?n:d,e.attempt(zC,h,f))}function d(p){return r.containerState.initialBlankLine=!0,a++,h(p)}function f(p){return tt(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function qC(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ki,o,a);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,at(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!tt(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(VC,t,i)(s))}function i(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,at(e,e.attempt(ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function YC(e,t,n){const r=this;return at(e,o,"listItemIndent",r.containerState.size+1);function o(a){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(a):n(a)}}function KC(e){e.exit(this.containerState.type)}function GC(e,t,n){const r=this;return at(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const i=r.events[r.events.length-1];return!tt(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Hf={name:"setextUnderline",resolveTo:QC,tokenize:XC};function QC(e,t){let n=e.length,r,o,a;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),!a&&e[n][1].type==="definition"&&(a=n);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",i,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=i,e.push(["exit",i,t]),e}function XC(e,t,n){const r=this;let o;return a;function a(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=u,i(u)):n(u)}function i(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===o?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),tt(u)?at(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||$e(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const ZC={tokenize:JC};function JC(e){const t=this,n=e.attempt(ki,r,e.attempt(this.parser.constructs.flowInitial,o,at(e,e.attempt(this.parser.constructs.flow,o,e.attempt(oC,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const eT={resolveAll:h0()},tT=p0("string"),nT=p0("text");function p0(e){return{resolveAll:h0(e==="text"?rT:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,i,s);return i;function i(d){return u(d)?a(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),a(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const f=o[d];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function h0(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function rT(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 a=o.length,i=-1,s=0,l;for(;a--;){const u=o[a];if(typeof u=="string"){for(i=u.length;u.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(u===-2)l=!0,s++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?i:r.start._bufferIndex+i,_index:r.start._index+a,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 oT={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:i0},aT={91:uC},iT={[-2]:Kl,[-1]:Kl,32:Kl},sT={35:mC,42:os,45:[Hf,os],60:xC,61:Hf,95:os,96:jf,126:jf},lT={38:l0,92:s0},uT={[-5]:Gl,[-4]:Gl,[-3]:Gl,33:_C,38:l0,42:Wu,60:[jE,DC],91:jC,92:[pC,s0],93:$c,95:Wu,96:ZE},cT={null:[Wu,eT]},dT={null:[42,95]},fT={null:[]},pT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dT,contentInitial:aT,disable:fT,document:oT,flow:sT,flowInitial:iT,insideSpan:cT,string:lT,text:uT},Symbol.toStringTag,{value:"Module"}));function hT(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={},a=[];let i=[],s=[];const l={attempt:_(S),check:_(v),consume:T,enter:C,exit:k,interrupt:_(v,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let d=t.tokenize.call(u,l);return t.resolveAll&&a.push(t),u;function f(L){return i=On(i,L),y(),i[i.length-1]!==null?[]:(O(t,0),u.events=ul(a,u.events,u),u.events)}function h(L,E){return gT(p(L),E)}function p(L){return mT(i,L)}function m(){const{_bufferIndex:L,_index:E,line:N,column:w,offset:A}=r;return{_bufferIndex:L,_index:E,line:N,column:w,offset:A}}function b(L){o[L.line]=L.column,R()}function y(){let L;for(;r._index<i.length;){const E=i[r._index];if(typeof E=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<E.length;)x(E.charCodeAt(r._bufferIndex));else x(E)}}function x(L){d=d(L)}function T(L){$e(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,R()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=L}function C(L,E){const N=E||{};return N.type=L,N.start=m(),u.events.push(["enter",N,u]),s.push(N),N}function k(L){const E=s.pop();return E.end=m(),u.events.push(["exit",E,u]),E}function S(L,E){O(L,E.from)}function v(L,E){E.restore()}function _(L,E){return N;function N(w,A,M){let W,H,$,D;return Array.isArray(w)?Q(w):"tokenize"in w?Q([w]):V(w);function V(X){return ee;function ee(K){const te=K!==null&&X[K],oe=K!==null&&X.null,re=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(oe)?oe:oe?[oe]:[]];return Q(re)(K)}}function Q(X){return W=X,H=0,X.length===0?M:F(X[H])}function F(X){return ee;function ee(K){return D=B(),$=X,X.partial||(u.currentConstruct=X),X.name&&u.parser.constructs.disable.null.includes(X.name)?J():X.tokenize.call(E?Object.assign(Object.create(u),E):u,l,fe,J)(K)}}function fe(X){return L($,D),A}function J(X){return D.restore(),++H<W.length?F(W[H]):M}}}function O(L,E){L.resolveAll&&!a.includes(L)&&a.push(L),L.resolve&&Tn(u.events,E,u.events.length-E,L.resolve(u.events.slice(E),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function B(){const L=m(),E=u.previous,N=u.currentConstruct,w=u.events.length,A=Array.from(s);return{from:w,restore:M};function M(){r=L,u.previous=E,u.currentConstruct=N,u.events.length=w,s=A,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function mT(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,a)];else{if(i=e.slice(n,o),r>-1){const s=i[0];typeof s=="string"?i[0]=s.slice(r):i.shift()}a>0&&i.push(e[o].slice(0,a))}return i}function gT(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
23
+ `;break}case-3:{i=`\r
24
+ `;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&o)continue;i=" ";break}default:i=String.fromCharCode(a)}o=a===-2,r.push(i)}return r.join("")}function bT(e){const r={constructs:o0([pT,...(e||{}).extensions||[]]),content:o(ME),defined:[],document:o(NE),flow:o(ZC),lazy:{},string:o(tT),text:o(nT)};return r;function o(a){return i;function i(s){return hT(r,a,s)}}}function yT(e){for(;!u0(e););return e}const Uf=/[\0\t\n\r]/g;function xT(){let e=1,t="",n=!0,r;return o;function o(a,i,s){const l=[];let u,d,f,h,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(i||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Uf.lastIndex=f,u=Uf.exec(a),h=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(h),!u){t=a.slice(f);break}if(p===10&&f===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<h&&(l.push(a.slice(f,h)),e+=h-f),p){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const ET=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function CT(e){return e.replace(ET,TT)}function TT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return a0(n.slice(a?2:1),a?16:10)}return jc(n)||e}const m0={}.hasOwnProperty;function vT(e,t,n){return typeof t!="string"&&(n=t,t=void 0),ST(n)(yT(bT(n).document().write(xT()(e,t,!0))))}function ST(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ae),autolinkProtocol:B,autolinkEmail:B,atxHeading:a(xe),blockQuote:a(oe),characterEscape:B,characterReference:B,codeFenced:a(re),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(re,i),codeText:a(pe,i),codeTextData:B,data:B,codeFlowValue:B,definition:a(G),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(Z),hardBreakEscape:a(de),hardBreakTrailing:a(de),htmlFlow:a(be,i),htmlFlowData:B,htmlText:a(be,i),htmlTextData:B,image:a(ie),label:i,link:a(Ae),listItem:a(Ve),listItemValue:h,listOrdered:a(ve,f),listUnordered:a(ve),paragraph:a(we),reference:F,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(xe),strong:a(At),thematicBreak:a(Ye)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:te,autolinkProtocol:K,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:X,characterReference:ee,codeFenced:l(y),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:l(x),codeText:l(A),codeTextData:R,data:R,definition:l(),definitionDestinationString:k,definitionLabelString:T,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(E),hardBreakTrailing:l(E),htmlFlow:l(N),htmlFlowData:R,htmlText:l(w),htmlTextData:R,image:l(W),label:$,labelText:H,lineEnding:L,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:fe,resourceDestinationString:D,resourceTitleString:V,resource:Q,setextHeading:l(O),setextHeadingLineSequence:_,setextHeadingText:v,strong:l(),thematicBreak:l()}};g0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(le){let Ce={type:"root",children:[]};const Oe={stack:[Ce],tokenStack:[],config:t,enter:s,exit:u,buffer:i,resume:d,data:n},He=[];let je=-1;for(;++je<le.length;)if(le[je][1].type==="listOrdered"||le[je][1].type==="listUnordered")if(le[je][0]==="enter")He.push(je);else{const Ne=He.pop();je=o(le,Ne,je)}for(je=-1;++je<le.length;){const Ne=t[le[je][0]];m0.call(Ne,le[je][1].type)&&Ne[le[je][1].type].call(Object.assign({sliceSerialize:le[je][2].sliceSerialize},Oe),le[je][1])}if(Oe.tokenStack.length>0){const Ne=Oe.tokenStack[Oe.tokenStack.length-1];(Ne[1]||zf).call(Oe,void 0,Ne[0])}for(Ce.position={start:Lr(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:Lr(le.length>0?le[le.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(le,Ce,Oe){let He=Ce-1,je=-1,Ne=!1,ot,xt,pt,ae;for(;++He<=Oe;){const ye=le[He];switch(ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ye[0]==="enter"?je++:je--,ae=void 0;break}case"lineEndingBlank":{ye[0]==="enter"&&(ot&&!ae&&!je&&!pt&&(pt=He),ae=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ae=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(ot){let Re=He;for(xt=void 0;Re--;){const Fe=le[Re];if(Fe[1].type==="lineEnding"||Fe[1].type==="lineEndingBlank"){if(Fe[0]==="exit")continue;xt&&(le[xt][1].type="lineEndingBlank",Ne=!0),Fe[1].type="lineEnding",xt=Re}else if(!(Fe[1].type==="linePrefix"||Fe[1].type==="blockQuotePrefix"||Fe[1].type==="blockQuotePrefixWhitespace"||Fe[1].type==="blockQuoteMarker"||Fe[1].type==="listItemIndent"))break}pt&&(!xt||pt<xt)&&(ot._spread=!0),ot.end=Object.assign({},xt?le[xt][1].start:ye[1].end),le.splice(xt||He,0,["exit",ot,ye[2]]),He++,Oe++}if(ye[1].type==="listItemPrefix"){const Re={type:"listItem",_spread:!1,start:Object.assign({},ye[1].start),end:void 0};ot=Re,le.splice(He,0,["enter",Re,ye[2]]),He++,Oe++,pt=void 0,ae=!0}}}return le[Ce][1]._spread=Ne,Oe}function a(le,Ce){return Oe;function Oe(He){s.call(this,le(He),He),Ce&&Ce.call(this,He)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(le,Ce,Oe){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([Ce,Oe||void 0]),le.position={start:Lr(Ce.start),end:void 0}}function l(le){return Ce;function Ce(Oe){le&&le.call(this,Oe),u.call(this,Oe)}}function u(le,Ce){const Oe=this.stack.pop(),He=this.tokenStack.pop();if(He)He[0].type!==le.type&&(Ce?Ce.call(this,le,He[0]):(He[1]||zf).call(this,le,He[0]));else throw new Error("Cannot close `"+le.type+"` ("+Wa({start:le.start,end:le.end})+"): it’s not open");Oe.position.end=Lr(le.end)}function d(){return Bc(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(le){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function p(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=le}function m(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=le}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=le.replace(/(\r?\n|\r)$/g,"")}function T(le){const Ce=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=Ce,Oe.identifier=Wn(this.sliceSerialize(le)).toLowerCase()}function C(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=le}function k(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=le}function S(le){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const Oe=this.sliceSerialize(le).length;Ce.depth=Oe}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function _(le){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function B(le){const Oe=this.stack[this.stack.length-1].children;let He=Oe[Oe.length-1];(!He||He.type!=="text")&&(He=rt(),He.position={start:Lr(le.start),end:void 0},Oe.push(He)),this.stack.push(He)}function R(le){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(le),Ce.position.end=Lr(le.end)}function L(le){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=Ce.children[Ce.children.length-1];Oe.position.end=Lr(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ce.type)&&(B.call(this,le),R.call(this,le))}function E(){this.data.atHardBreak=!0}function N(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=le}function w(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=le}function A(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=le}function M(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=Ce,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function W(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=Ce,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function H(le){const Ce=this.sliceSerialize(le),Oe=this.stack[this.stack.length-2];Oe.label=CT(Ce),Oe.identifier=Wn(Ce).toLowerCase()}function $(){const le=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=le.children;Oe.children=He}else Oe.alt=Ce}function D(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=le}function V(){const le=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=le}function Q(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function fe(le){const Ce=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=Ce,Oe.identifier=Wn(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function J(le){this.data.characterReferenceType=le.type}function X(le){const Ce=this.sliceSerialize(le),Oe=this.data.characterReferenceType;let He;Oe?(He=a0(Ce,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):He=jc(Ce);const je=this.stack[this.stack.length-1];je.value+=He}function ee(le){const Ce=this.stack.pop();Ce.position.end=Lr(le.end)}function K(le){R.call(this,le);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(le)}function te(le){R.call(this,le);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(le)}function oe(){return{type:"blockquote",children:[]}}function re(){return{type:"code",lang:null,meta:null,value:""}}function pe(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Z(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function de(){return{type:"break"}}function be(){return{type:"html",value:""}}function ie(){return{type:"image",title:null,url:"",alt:null}}function Ae(){return{type:"link",title:null,url:"",children:[]}}function ve(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function Ve(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function we(){return{type:"paragraph",children:[]}}function At(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function Ye(){return{type:"thematicBreak"}}}function Lr(e){return{line:e.line,column:e.column,offset:e.offset}}function g0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?g0(e,r):kT(e,r)}}function kT(e,t){let n;for(n in t)if(m0.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 zf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Wa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Wa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Wa({start:t.start,end:t.end})+") is still open")}function DT(e){const t=this;t.parser=n;function n(r){return vT(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function wT(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 AT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
25
+ `}]}function IT(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 PT(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RT(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MT(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=sa(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=a+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(i)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function OT(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 NT(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function b0(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),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&i.type==="text"?i.value+=r:o.push({type:"text",value:r}),o}function LT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return b0(e,t);const o={src:sa(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function FT(e,t){const n={src:sa(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 _T(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 BT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return b0(e,t);const o={href:sa(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function jT(e,t){const n={href:sa(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 $T(e,t,n){const r=e.all(t),o=n?HT(n):y0(t),a={},i=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const d=r[s];(o||s!==0||d.type!=="element"||d.tagName!=="p")&&i.push({type:"text",value:`
27
+ `}),d.type==="element"&&d.tagName==="p"&&!o?i.push(...d.children):i.push(d)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&i.push({type:"text",value:`
28
+ `});const u={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,u),e.applyData(t,u)}function HT(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=y0(n[r])}return t}function y0(e){const t=e.spread;return t??e.children.length>1}function UT(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 i=r[o];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function zT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function WT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qT(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const i={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],i),o.push(i)}if(n.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=cr(t.children[1]),l=sl(t.children[t.children.length-1]);s&&l&&(i.position={start:s,end:l}),o.push(i)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function YT(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,s=i?i.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const f=t.children[l],h={},p=i?i[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:a,properties:h,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),u.push(m)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function KT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Vf=9,Wf=32;function GT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(qf(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(qf(t.slice(o),o>0,!1)),a.join("")}function qf(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===Vf||a===Wf;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===Vf||a===Wf;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function QT(e,t){const n={type:"text",value:GT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function XT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ZT={blockquote:wT,break:AT,code:IT,delete:PT,emphasis:RT,footnoteReference:MT,heading:OT,html:NT,imageReference:LT,image:FT,inlineCode:_T,linkReference:BT,link:jT,listItem:$T,list:UT,paragraph:zT,root:VT,strong:WT,table:qT,tableCell:KT,tableRow:YT,text:QT,thematicBreak:XT,toml:Hi,yaml:Hi,definition:Hi,footnoteDefinition:Hi};function Hi(){}const x0=-1,cl=0,Ya=1,As=2,Hc=3,Uc=4,zc=5,Vc=6,E0=7,C0=8,Yf=typeof self=="object"?self:globalThis,JT=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,i]=t[o];switch(a){case cl:case x0:return n(i,o);case Ya:{const s=n([],o);for(const l of i)s.push(r(l));return s}case As:{const s=n({},o);for(const[l,u]of i)s[r(l)]=r(u);return s}case Hc:return n(new Date(i),o);case Uc:{const{source:s,flags:l}=i;return n(new RegExp(s,l),o)}case zc:{const s=n(new Map,o);for(const[l,u]of i)s.set(r(l),r(u));return s}case Vc:{const s=n(new Set,o);for(const l of i)s.add(r(l));return s}case E0:{const{name:s,message:l}=i;return n(new Yf[s](l),o)}case C0:return n(BigInt(i),o);case"BigInt":return n(Object(BigInt(i)),o);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:s}=new Uint8Array(i);return n(new DataView(s),i)}}return n(new Yf[a](i),o)};return r},Kf=e=>JT(new Map,e)(0),Mo="",{toString:ev}={},{keys:tv}=Object,ka=e=>{const t=typeof e;if(t!=="object"||!e)return[cl,t];const n=ev.call(e).slice(8,-1);switch(n){case"Array":return[Ya,Mo];case"Object":return[As,Mo];case"Date":return[Hc,Mo];case"RegExp":return[Uc,Mo];case"Map":return[zc,Mo];case"Set":return[Vc,Mo];case"DataView":return[Ya,n]}return n.includes("Array")?[Ya,n]:n.includes("Error")?[E0,n]:[As,n]},Ui=([e,t])=>e===cl&&(t==="function"||t==="symbol"),nv=(e,t,n,r)=>{const o=(i,s)=>{const l=r.push(i)-1;return n.set(s,l),l},a=i=>{if(n.has(i))return n.get(i);let[s,l]=ka(i);switch(s){case cl:{let d=i;switch(l){case"bigint":s=C0,d=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return o([x0],i)}return o([s,d],i)}case Ya:{if(l){let h=i;return l==="DataView"?h=new Uint8Array(i.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(i)),o([l,[...h]],i)}const d=[],f=o([s,d],i);for(const h of i)d.push(a(h));return f}case As:{if(l)switch(l){case"BigInt":return o([l,i.toString()],i);case"Boolean":case"Number":case"String":return o([l,i.valueOf()],i)}if(t&&"toJSON"in i)return a(i.toJSON());const d=[],f=o([s,d],i);for(const h of tv(i))(e||!Ui(ka(i[h])))&&d.push([a(h),a(i[h])]);return f}case Hc:return o([s,i.toISOString()],i);case Uc:{const{source:d,flags:f}=i;return o([s,{source:d,flags:f}],i)}case zc:{const d=[],f=o([s,d],i);for(const[h,p]of i)(e||!(Ui(ka(h))||Ui(ka(p))))&&d.push([a(h),a(p)]);return f}case Vc:{const d=[],f=o([s,d],i);for(const h of i)(e||!Ui(ka(h)))&&d.push(a(h));return f}}const{message:u}=i;return o([s,{name:l,message:u}],i)};return a},Gf=(e,{json:t,lossy:n}={})=>{const r=[];return nv(!(t||n),!!t,new Map,r)(e),r},po=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Kf(Gf(e,t)):structuredClone(e):(e,t)=>Kf(Gf(e,t));function rv(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 ov(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function av(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||rv,r=e.options.footnoteBackLabel||ov,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=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 d=e.all(u),f=String(u.identifier).toUpperCase(),h=sa(f.toLowerCase());let p=0;const m=[],b=e.footnoteCounts.get(f);for(;b!==void 0&&++p<=b;){m.length>0&&m.push({type:"text",value:" "});let T=typeof n=="string"?n:n(l,p);typeof T=="string"&&(T={type:"text",value:T}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const T=y.children[y.children.length-1];T&&T.type==="text"?T.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else d.push(...m);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!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:a,properties:{...po(i),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 dl=(function(e){if(e==null)return uv;if(typeof e=="function")return fl(e);if(typeof e=="object")return Array.isArray(e)?iv(e):sv(e);if(typeof e=="string")return lv(e);throw new Error("Expected function, string, or object as test")});function iv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=dl(e[n]);return fl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function sv(e){const t=e;return fl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function lv(e){return fl(t);function t(n){return n&&n.type===e}}function fl(e){return t;function t(n,r,o){return!!(cv(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function uv(){return!0}function cv(e){return e!==null&&typeof e=="object"&&"type"in e}const T0=[],dv=!0,Is=!1,Ka="skip";function v0(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=dl(o),i=r?-1:1;s(e,void 0,[])();function s(l,u,d){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=T0,m,b,y;if((!t||a(l,u,d[d.length-1]||void 0))&&(p=fv(n(l,d)),p[0]===Is))return p;if("children"in l&&l.children){const x=l;if(x.children&&p[0]!==Ka)for(b=(r?x.children.length:-1)+i,y=d.concat(x);b>-1&&b<x.children.length;){const T=x.children[b];if(m=s(T,b,y)(),m[0]===Is)return m;b=typeof m[1]=="number"?m[1]:b+i}}return p}}}function fv(e){return Array.isArray(e)?e:typeof e=="number"?[dv,e]:e==null?T0:[e]}function fn(e,t,n,r){let o,a,i;typeof t=="function"&&typeof n!="function"?(a=void 0,i=t,o=n):(a=t,i=n,o=r),v0(e,a,s,o);function s(l,u){const d=u[u.length-1],f=d?d.children.indexOf(l):void 0;return i(l,f,d)}}const qu={}.hasOwnProperty,pv={};function hv(e,t){const n=t||pv,r=new Map,o=new Map,a=new Map,i={...ZT,...n.handlers},s={all:u,applyData:gv,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:i,one:l,options:n,patch:mv,wrap:yv};return fn(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:o,h=String(d.identifier).toUpperCase();f.has(h)||f.set(h,d)}}),s;function l(d,f){const h=d.type,p=s.handlers[h];if(qu.call(s.handlers,h)&&p)return p(s,d,f);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in d){const{children:b,...y}=d,x=po(y);return x.children=s.all(d),x}return po(d)}return(s.options.unknownHandler||bv)(s,d,f)}function u(d){const f=[];if("children"in d){const h=d.children;let p=-1;for(;++p<h.length;){const m=s.one(h[p],d);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Qf(m.value)),!Array.isArray(m)&&m.type==="element")){const b=m.children[0];b&&b.type==="text"&&(b.value=Qf(b.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function mv(e,t){e.position&&(t.position=oE(e))}function gv(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const i="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:i}}n.type==="element"&&a&&Object.assign(n.properties,po(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function bv(e,t){const n=t.data||{},r="value"in t&&!(qu.call(n,"hProperties")||qu.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 yv(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 Qf(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=hv(e,t),r=n.one(e,void 0),o=av(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
34
+ `},o),a}function xv(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 Zf(e){if(e)throw e}var Ql,Jf;function Ev(){if(Jf)return Ql;Jf=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]"},a=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!f)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},i=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},s=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return Ql=function l(){var u,d,f,h,p,m,b=arguments[0],y=1,x=arguments.length,T=!1;for(typeof b=="boolean"&&(T=b,b=arguments[1]||{},y=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});y<x;++y)if(u=arguments[y],u!=null)for(d in u)f=s(b,d),h=s(u,d),b!==h&&(T&&h&&(a(h)||(p=o(h)))?(p?(p=!1,m=f&&o(f)?f:[]):m=f&&a(f)?f:{},i(b,{name:d,newValue:l(T,m,h)})):typeof h<"u"&&i(b,{name:d,newValue:h}));return b},Ql}var Cv=Ev();const Xl=qn(Cv);function Yu(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 Tv(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const i=o.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);s(null,...o);function s(l,...u){const d=e[++a];let f=-1;if(l){i(l);return}for(;++f<o.length;)(u[f]===null||u[f]===void 0)&&(u[f]=o[f]);o=u,d?vv(d,s)(...u):i(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 vv(e,t){let n;return r;function r(...i){const s=e.length>i.length;let l;s&&i.push(o);try{l=e.apply(this,i)}catch(u){const d=u;if(s&&n)throw d;return o(d)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,o):l instanceof Error?o(l):a(l))}function o(i,...s){n||(n=!0,t(i,...s))}function a(i){o(null,i)}}const nr={basename:Sv,dirname:kv,extname:Dv,join:wv,sep:"/"};function Sv(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Di(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else i<0&&(a=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=i));return n===r?r=i:r<0&&(r=e.length),e.slice(n,r)}function kv(e){if(Di(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 Dv(e){Di(e);let t=e.length,n=-1,r=0,o=-1,a=0,i;for(;t--;){const s=e.codePointAt(t);if(s===47){if(i){r=t+1;break}continue}n<0&&(i=!0,n=t+1),s===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function wv(...e){let t=-1,n;for(;++t<e.length;)Di(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Av(n)}function Av(e){Di(e);const t=e.codePointAt(0)===47;let n=Iv(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Iv(e,t){let n="",r=0,o=-1,a=0,i=-1,s,l;for(;++i<=e.length;){if(i<e.length)s=e.codePointAt(i);else{if(s===47)break;s=47}if(s===47){if(!(o===i-1||a===1))if(o!==i-1&&a===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=i,a=0;continue}}else if(n.length>0){n="",r=0,o=i,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,i):n=e.slice(o+1,i),r=i-o-1;o=i,a=0}else s===46&&a>-1?a++:a=-1}return n}function Di(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Pv={cwd:Rv};function Rv(){return"/"}function Ku(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Mv(e){if(typeof e=="string")e=new URL(e);else if(!Ku(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 Ov(e)}function Ov(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 Zl=["history","path","basename","stem","extname","dirname"];class S0{constructor(t){let n;t?Ku(t)?n={path:t}:typeof t=="string"||Nv(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Pv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Zl.length;){const a=Zl[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)Zl.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?nr.basename(this.path):void 0}set basename(t){eu(t,"basename"),Jl(t,"basename"),this.path=nr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?nr.dirname(this.path):void 0}set dirname(t){ep(this.basename,"dirname"),this.path=nr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?nr.extname(this.path):void 0}set extname(t){if(Jl(t,"extname"),ep(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=nr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ku(t)&&(t=Mv(t)),eu(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?nr.basename(this.path,this.extname):void 0}set stem(t){eu(t,"stem"),Jl(t,"stem"),this.path=nr.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 Jl(e,t){if(e&&e.includes(nr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+nr.sep+"`")}function eu(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ep(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Nv(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Lv=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Fv={}.hasOwnProperty;class Wc extends Lv{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=Tv()}copy(){const t=new Wc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ru("data",this.frozen),this.namespace[t]=n,this):Fv.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ru("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=zi(t),r=this.parser||this.Parser;return tu("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),tu("process",this.parser||this.Parser),nu("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,i){const s=zi(t),l=r.parse(s);r.run(l,s,function(d,f,h){if(d||!f||!h)return u(d);const p=f,m=r.stringify(p,h);jv(m)?h.value=m:h.result=m,u(d,h)});function u(d,f){d||!f?i(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),tu("processSync",this.parser||this.Parser),nu("processSync",this.compiler||this.Compiler),this.process(t,o),np("processSync","process",n),r;function o(a,i){n=!0,Zf(a),r=i}}run(t,n,r){tp(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(i,s){const l=zi(n);o.run(t,l,u);function u(d,f,h){const p=f||t;d?s(d):i?i(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),np("runSync","run",r),o;function a(i,s){Zf(i),o=s,r=!0}}stringify(t,n){this.freeze();const r=zi(n),o=this.compiler||this.Compiler;return nu("stringify",o),tp(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(ru("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...f]=u;l(d,f)}else i(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function i(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=Xl(!0,o.settings,u.settings))}function s(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const f=u[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===u){h=f;break}if(h===-1)r.push([u,...d]);else if(d.length>0){let[p,...m]=d;const b=r[h][1];Yu(b)&&Yu(p)&&(p=Xl(!0,b,p)),r[h]=[u,p,...m]}}}}const _v=new Wc().freeze();function tu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function nu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ru(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 tp(e){if(!Yu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function np(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function zi(e){return Bv(e)?e:new S0(e)}function Bv(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function jv(e){return typeof e=="string"||$v(e)}function $v(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Hv="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",rp=[],op={allowDangerousHtml:!0},Uv=/^(https?|ircs?|mailto|xmpp)$/i,zv=[{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 Vv(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,a=e.components,i=e.disallowedElements,s=e.rehypePlugins||rp,l=e.remarkPlugins||rp,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...op}:op,d=e.skipHtml,f=e.unwrapDisallowed,h=e.urlTransform||Wv,p=_v().use(DT).use(l).use(xv,u).use(s),m=new S0;typeof r=="string"&&(m.value=r);for(const T of zv)Object.hasOwn(e,T.from)&&(""+T.from+(T.to?"use `"+T.to+"` instead":"remove it")+Hv+T.id,void 0);const b=p.parse(m);let y=p.runSync(b,m);return o&&(y={type:"element",tagName:"div",properties:{className:o},children:y.type==="root"?y.children:[y]}),fn(y,x),uE(y,{Fragment:c.Fragment,components:a,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function x(T,C,k){if(T.type==="raw"&&k&&typeof C=="number")return d?k.children.splice(C,1):k.children[C]={type:"text",value:T.value},C;if(T.type==="element"){let S;for(S in Yl)if(Object.hasOwn(Yl,S)&&Object.hasOwn(T.properties,S)){const v=T.properties[S],_=Yl[S];(_===null||_.includes(T.tagName))&&(T.properties[S]=h(String(v||""),S,T))}}if(T.type==="element"){let S=t?!t.includes(T.tagName):i?i.includes(T.tagName):!1;if(!S&&n&&typeof C=="number"&&(S=!n(T,C,k)),S&&k&&typeof C=="number")return f&&T.children?k.children.splice(C,1,...T.children):k.children.splice(C,1),C}}}function Wv(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||Uv.test(e.slice(0,t))?e:""}function Gu(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 qv(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Yv(e,t,n){const o=dl((n||{}).ignore||[]),a=Kv(t);let i=-1;for(;++i<a.length;)v0(e,"text",s);function s(u,d){let f=-1,h;for(;++f<d.length;){const p=d[f],m=h?h.children:void 0;if(o(p,m?m.indexOf(p):void 0,h))return;h=p}if(h)return l(u,d)}function l(u,d){const f=d[d.length-1],h=a[i][0],p=a[i][1];let m=0;const y=f.children.indexOf(u);let x=!1,T=[];h.lastIndex=0;let C=h.exec(u.value);for(;C;){const k=C.index,S={index:C.index,input:C.input,stack:[...d,u]};let v=p(...C,S);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?h.lastIndex=k+1:(m!==k&&T.push({type:"text",value:u.value.slice(m,k)}),Array.isArray(v)?T.push(...v):v&&T.push(v),m=k+C[0].length,x=!0),!h.global)break;C=h.exec(u.value)}return x?(m<u.value.length&&T.push({type:"text",value:u.value.slice(m)}),f.children.splice(y,1,...T)):T=[u],y+T.length}}function Kv(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([Gv(o[0]),Qv(o[1])])}return t}function Gv(e){return typeof e=="string"?new RegExp(qv(e),"g"):e}function Qv(e){return typeof e=="function"?e:function(){return e}}const ou="phrasing",au=["autolink","link","image","label"];function Xv(){return{transforms:[oS],enter:{literalAutolink:Jv,literalAutolinkEmail:iu,literalAutolinkHttp:iu,literalAutolinkWww:iu},exit:{literalAutolink:rS,literalAutolinkEmail:nS,literalAutolinkHttp:eS,literalAutolinkWww:tS}}}function Zv(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ou,notInConstruct:au},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ou,notInConstruct:au},{character:":",before:"[ps]",after:"\\/",inConstruct:ou,notInConstruct:au}]}}function Jv(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function iu(e){this.config.enter.autolinkProtocol.call(this,e)}function eS(e){this.config.exit.autolinkProtocol.call(this,e)}function tS(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 nS(e){this.config.exit.autolinkEmail.call(this,e)}function rS(e){this.exit(e)}function oS(e){Yv(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,iS]],{ignore:["link","linkReference"]})}function aS(e,t,n,r,o){let a="";if(!k0(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!sS(n)))return!1;const i=lS(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function iS(e,t,n,r){return!k0(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function sS(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 lS(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=Gu(e,"(");let a=Gu(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function k0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||fo(n)||ll(n))&&(!t||n!==47)}D0.peek=bS;function uS(){this.buffer()}function cS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dS(){this.buffer()}function fS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function pS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hS(e){this.exit(e)}function mS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gS(e){this.exit(e)}function bS(){return"["}function D0(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),i(),a+=o.move("]"),a}function yS(){return{enter:{gfmFootnoteCallString:uS,gfmFootnoteCall:cS,gfmFootnoteDefinitionLabelString:dS,gfmFootnoteDefinition:fS},exit:{gfmFootnoteCallString:pS,gfmFootnoteCall:hS,gfmFootnoteDefinitionLabelString:mS,gfmFootnoteDefinition:gS}}}function xS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:D0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,i){const s=a.createTracker(i);let l=s.move("[^");const u=a.enter("footnoteDefinition"),d=a.enter("label");return l+=s.move(a.safe(a.associationId(r),{before:l,after:"]"})),d(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
35
+ `:" ")+a.indentLines(a.containerFlow(r,s.current()),t?w0:ES))),u(),l}}function ES(e,t,n){return t===0?e:w0(e,t,n)}function w0(e,t,n){return(n?"":" ")+e}const CS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];A0.peek=DS;function TS(){return{canContainEols:["delete"],enter:{strikethrough:SS},exit:{strikethrough:kS}}}function vS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:CS}],handlers:{delete:A0}}}function SS(e){this.enter({type:"delete",children:[]},e)}function kS(e){this.exit(e)}function A0(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let i=o.move("~~");return i+=n.containerPhrasing(e,{...o.current(),before:i,after:"~"}),i+=o.move("~~"),a(),i}function DS(){return"~"}function wS(e){return e.length}function AS(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||wS,a=[],i=[],s=[],l=[];let u=0,d=-1;for(;++d<e.length;){const b=[],y=[];let x=-1;for(e[d].length>u&&(u=e[d].length);++x<e[d].length;){const T=IS(e[d][x]);if(n.alignDelimiters!==!1){const C=o(T);y[x]=C,(l[x]===void 0||C>l[x])&&(l[x]=C)}b.push(T)}i[d]=b,s[d]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)a[f]=ap(r[f]);else{const b=ap(r);for(;++f<u;)a[f]=b}f=-1;const h=[],p=[];for(;++f<u;){const b=a[f];let y="",x="";b===99?(y=":",x=":"):b===108?y=":":b===114&&(x=":");let T=n.alignDelimiters===!1?1:Math.max(1,l[f]-y.length-x.length);const C=y+"-".repeat(T)+x;n.alignDelimiters!==!1&&(T=y.length+T+x.length,T>l[f]&&(l[f]=T),p[f]=T),h[f]=C}i.splice(1,0,h),s.splice(1,0,p),d=-1;const m=[];for(;++d<i.length;){const b=i[d],y=s[d];f=-1;const x=[];for(;++f<u;){const T=b[f]||"";let C="",k="";if(n.alignDelimiters!==!1){const S=l[f]-(y[f]||0),v=a[f];v===114?C=" ".repeat(S):v===99?S%2?(C=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(C=" ".repeat(S/2),k=C):k=" ".repeat(S)}n.delimiterStart!==!1&&!f&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||f)&&x.push(" "),n.alignDelimiters!==!1&&x.push(C),x.push(T),n.alignDelimiters!==!1&&x.push(k),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||f!==u-1)&&x.push("|")}m.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return m.join(`
36
+ `)}function IS(e){return e==null?"":String(e)}function ap(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 ip={}.hasOwnProperty;function pl(e,t){const n=t||{};function r(o,...a){let i=r.invalid;const s=r.handlers;if(o&&ip.call(o,e)){const l=String(o[e]);i=ip.call(s,l)?s[l]:r.unknown}if(i)return i.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function PS(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const i=n.indentLines(n.containerFlow(e,a.current()),RS);return o(),i}function RS(e,t,n){return">"+(n?"":" ")+e}function MS(e,t){return sp(e,t.inConstruct,!0)&&!sp(e,t.notInConstruct,!1)}function sp(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 lp(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
37
+ `&&MS(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
38
+ `}function OS(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,i=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>i&&(i=a):a=1,o=r+t.length,r=n.indexOf(t,o);return i}function NS(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 LS(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 FS(e,t,n,r){const o=LS(n),a=e.value||"",i=o==="`"?"GraveAccent":"Tilde";if(NS(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(a,_S);return f(),h}const s=n.createTracker(r),l=o.repeat(Math.max(OS(a,o)+1,3)),u=n.enter("codeFenced");let d=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${i}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${i}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
39
+ `,encode:["`"],...s.current()})),f()}return d+=s.move(`
40
+ `),a&&(d+=s.move(a+`
41
+ `)),d+=s.move(l),u(),d}function _S(e,t,n){return(n?"":" ")+e}function qc(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 BS(e,t,n,r){const o=qc(n),a=o==='"'?"Quote":"Apostrophe",i=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${a}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),i(),u}function jS(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 di(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ps(e,t,n){const r=Go(e),o=Go(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}}I0.peek=$S;function I0(e,t,n,r){const o=jS(n),a=n.enter("emphasis"),i=n.createTracker(r),s=i.move(o);let l=i.move(n.containerPhrasing(e,{after:o,before:s,...i.current()}));const u=l.charCodeAt(0),d=Ps(r.before.charCodeAt(r.before.length-1),u,o);d.inside&&(l=di(u)+l.slice(1));const f=l.charCodeAt(l.length-1),h=Ps(r.after.charCodeAt(0),f,o);h.inside&&(l=l.slice(0,-1)+di(f));const p=i.move(o);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+p}function $S(e,t,n){return n.options.emphasis||"*"}function HS(e,t){let n=!1;return fn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Is}),!!((!e.depth||e.depth<3)&&Bc(e)&&(t.options.setext||n))}function US(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(HS(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...a.current(),before:`
43
+ `,after:`
44
+ `});return f(),d(),h+`
45
+ `+(o===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
46
+ `))+1))}const i="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");a.move(i+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
47
+ `,...a.current()});return/^[\t ]/.test(u)&&(u=di(u.charCodeAt(0))+u.slice(1)),u=u?i+" "+u:i,n.options.closeAtx&&(u+=" "+i),l(),s(),u}P0.peek=zS;function P0(e){return e.value||""}function zS(){return"<"}R0.peek=VS;function R0(e,t,n,r){const o=qc(n),a=o==='"'?"Quote":"Apostrophe",i=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${a}`),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(")"),i(),u}function VS(){return"!"}M0.peek=WS;function M0(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let i=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+"]["),i();const d=n.stack;n.stack=[],i=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=d,a(),o==="full"||!u||u!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function WS(){return"!"}O0.peek=qS;function O0(e,t,n){let r=e.value||"",o="`",a=-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+" ");++a<n.unsafe.length;){const i=n.unsafe[a],s=n.compilePattern(i);let l;if(i.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 qS(){return"`"}function N0(e,t){const n=Bc(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))}L0.peek=YS;function L0(e,t,n,r){const o=qc(n),a=o==='"'?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(N0(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let f=i.move("<");return f+=i.move(n.containerPhrasing(e,{before:f,after:">",...i.current()})),f+=i.move(">"),s(),n.stack=d,f}s=n.enter("link"),l=n.enter("label");let u=i.move("[");return u+=i.move(n.containerPhrasing(e,{before:u,after:"](",...i.current()})),u+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=i.move("<"),u+=i.move(n.safe(e.url,{before:u,after:">",...i.current()})),u+=i.move(">")):(l=n.enter("destinationRaw"),u+=i.move(n.safe(e.url,{before:u,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=i.move(" "+o),u+=i.move(n.safe(e.title,{before:u,after:o,...i.current()})),u+=i.move(o),l()),u+=i.move(")"),s(),u}function YS(e,t,n){return N0(e,n)?"<":"["}F0.peek=KS;function F0(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let i=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+"]["),i();const d=n.stack;n.stack=[],i=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=d,a(),o==="full"||!u||u!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function KS(){return"["}function Yc(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 GS(e){const t=Yc(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 QS(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 _0(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 XS(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let i=e.ordered?QS(n):Yc(n);const s=e.ordered?i==="."?")":".":GS(n);let l=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&d&&(!d.children||!d.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),_0(n)===i&&d){let f=-1;for(;++f<e.children.length;){const h=e.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const u=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=a,o(),u}function ZS(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 JS(e,t,n,r){const o=ZS(n);let a=n.bulletCurrent||Yc(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let i=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(i-a.length)),s.shift(i);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),d);return l(),u;function d(f,h,p){return h?(p?"":" ".repeat(i))+f:(p?a:a+" ".repeat(i-a.length))+f}}function e3(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,r);return a(),o(),i}const t3=dl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function n3(e,t,n,r){return(e.children.some(function(i){return t3(i)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function r3(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}B0.peek=o3;function B0(e,t,n,r){const o=r3(n),a=n.enter("strong"),i=n.createTracker(r),s=i.move(o+o);let l=i.move(n.containerPhrasing(e,{after:o,before:s,...i.current()}));const u=l.charCodeAt(0),d=Ps(r.before.charCodeAt(r.before.length-1),u,o);d.inside&&(l=di(u)+l.slice(1));const f=l.charCodeAt(l.length-1),h=Ps(r.after.charCodeAt(0),f,o);h.inside&&(l=l.slice(0,-1)+di(f));const p=i.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+p}function o3(e,t,n){return n.options.strong||"*"}function a3(e,t,n,r){return n.safe(e.value,r)}function i3(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 s3(e,t,n){const r=(_0(n)+(n.options.ruleSpaces?" ":"")).repeat(i3(n));return n.options.ruleSpaces?r.slice(0,-1):r}const j0={blockquote:PS,break:lp,code:FS,definition:BS,emphasis:I0,hardBreak:lp,heading:US,html:P0,image:R0,imageReference:M0,inlineCode:O0,link:L0,linkReference:F0,list:XS,listItem:JS,paragraph:e3,root:n3,strong:B0,text:a3,thematicBreak:s3};function l3(){return{enter:{table:u3,tableData:up,tableHeader:up,tableRow:d3},exit:{codeText:f3,table:c3,tableData:su,tableHeader:su,tableRow:su}}}function u3(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 c3(e){this.exit(e),this.data.inTable=void 0}function d3(e){this.enter({type:"tableRow",children:[]},e)}function su(e){this.exit(e)}function up(e){this.enter({type:"tableCell",children:[]},e)}function f3(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,p3));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function p3(e,t){return t==="|"?t:e}function h3(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=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:i,tableCell:l,tableRow:s}};function i(p,m,b,y){return u(d(p,b,y),p.align)}function s(p,m,b,y){const x=f(p,b,y),T=u([x]);return T.slice(0,T.indexOf(`
49
+ `))}function l(p,m,b,y){const x=b.enter("tableCell"),T=b.enter("phrasing"),C=b.containerPhrasing(p,{...y,before:a,after:a});return T(),x(),C}function u(p,m){return AS(p,{align:m,alignDelimiters:r,padding:n,stringLength:o})}function d(p,m,b){const y=p.children;let x=-1;const T=[],C=m.enter("table");for(;++x<y.length;)T[x]=f(y[x],m,b);return C(),T}function f(p,m,b){const y=p.children;let x=-1;const T=[],C=m.enter("tableRow");for(;++x<y.length;)T[x]=l(y[x],p,m,b);return C(),T}function h(p,m,b){let y=j0.inlineCode(p,m,b);return b.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function m3(){return{exit:{taskListCheckValueChecked:cp,taskListCheckValueUnchecked:cp,paragraph:b3}}}function g3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:y3}}}function cp(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function b3(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 a=-1,i;for(;++a<o.length;){const s=o[a];if(s.type==="paragraph"){i=s;break}}i===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 y3(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(i);let l=j0.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+i}}function x3(){return[Xv(),yS(),TS(),l3(),m3()]}function E3(e){return{extensions:[Zv(),xS(e),vS(),h3(e),g3()]}}const C3={tokenize:w3,partial:!0},$0={tokenize:A3,partial:!0},H0={tokenize:I3,partial:!0},U0={tokenize:P3,partial:!0},T3={tokenize:R3,partial:!0},z0={name:"wwwAutolink",tokenize:k3,previous:W0},V0={name:"protocolAutolink",tokenize:D3,previous:q0},wr={name:"emailAutolink",tokenize:S3,previous:Y0},dr={};function v3(){return{text:dr}}let Gr=48;for(;Gr<123;)dr[Gr]=wr,Gr++,Gr===58?Gr=65:Gr===91&&(Gr=97);dr[43]=wr;dr[45]=wr;dr[46]=wr;dr[95]=wr;dr[72]=[wr,V0];dr[104]=[wr,V0];dr[87]=[wr,z0];dr[119]=[wr,z0];function S3(e,t,n){const r=this;let o,a;return i;function i(f){return!Qu(f)||!Y0.call(r,r.previous)||Kc(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Qu(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(T3,d,u)(f):f===45||f===95||en(f)?(a=!0,e.consume(f),l):d(f)}function u(f){return e.consume(f),o=!0,l}function d(f){return a&&o&&on(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function k3(e,t,n){const r=this;return o;function o(i){return i!==87&&i!==119||!W0.call(r,r.previous)||Kc(r.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(C3,e.attempt($0,e.attempt(H0,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function D3(e,t,n){const r=this;let o="",a=!1;return i;function i(f){return(f===72||f===104)&&q0.call(r,r.previous)&&!Kc(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(on(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),a?u:(a=!0,l)):n(f)}function u(f){return f===null||ws(f)||yt(f)||fo(f)||ll(f)?n(f):e.attempt($0,e.attempt(H0,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function w3(e,t,n){let r=0;return o;function o(i){return(i===87||i===119)&&r<3?(r++,e.consume(i),o):i===46&&r===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function A3(e,t,n){let r,o,a;return i;function i(u){return u===46||u===95?e.check(U0,l,s)(u):u===null||yt(u)||fo(u)||u!==45&&ll(u)?l(u):(a=!0,e.consume(u),i)}function s(u){return u===95?r=!0:(o=r,r=void 0),e.consume(u),i}function l(u){return o||r||!a?n(u):t(u)}}function I3(e,t){let n=0,r=0;return o;function o(i){return i===40?(n++,e.consume(i),o):i===41&&r<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(U0,t,a)(i):i===null||yt(i)||fo(i)?t(i):(e.consume(i),o)}function a(i){return i===41&&r++,e.consume(i),o}}function P3(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),a):s===93?(e.consume(s),o):s===60||s===null||yt(s)||fo(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||yt(s)||fo(s)?t(s):r(s)}function a(s){return on(s)?i(s):n(s)}function i(s){return s===59?(e.consume(s),r):on(s)?(e.consume(s),i):n(s)}}function R3(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return en(a)?n(a):t(a)}}function W0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function q0(e){return!on(e)}function Y0(e){return!(e===47||Qu(e))}function Qu(e){return e===43||e===45||e===46||e===95||en(e)}function Kc(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 M3={tokenize:$3,partial:!0};function O3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_3,continuation:{tokenize:B3},exit:j3}},text:{91:{name:"gfmFootnoteCall",tokenize:F3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:N3,resolveTo:L3}}}}function N3(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){i=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(!i||!i._balanced)return n(l);const u=Wn(r.sliceSerialize({start:i.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function L3(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 a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function F3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,i;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(a>999||f===93&&!i||f===null||f===91||yt(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(Wn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return yt(f)||(i=!0),a++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,u):u(f)}}function _3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i=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",d):n(m)}function d(m){if(i>999||m===93&&!s||m===null||m===91||yt(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=Wn(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return yt(m)||(s=!0),i++,e.consume(m),m===92?f:d}function f(m){return m===91||m===92||m===93?(e.consume(m),i++,d):d(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(a)||o.push(a),at(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function B3(e,t,n){return e.check(ki,t,e.attempt(M3,t,n))}function j3(e){e.exit("gfmFootnoteDefinition")}function $3(e,t,n){const r=this;return at(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function H3(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(i,s){let l=-1;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._close){let u=l;for(;u--;)if(i[u][0]==="exit"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._open&&i[l][1].end.offset-i[l][1].start.offset===i[u][1].end.offset-i[u][1].start.offset){i[l][1].type="strikethroughSequence",i[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},i[u][1].start),end:Object.assign({},i[l][1].end)},f={type:"strikethroughText",start:Object.assign({},i[u][1].end),end:Object.assign({},i[l][1].start)},h=[["enter",d,s],["enter",i[u][1],s],["exit",i[u][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&Tn(h,h.length,0,ul(p,i.slice(u+1,l),s)),Tn(h,h.length,0,[["exit",f,s],["enter",i[l][1],s],["exit",i[l][1],s],["exit",d,s]]),Tn(i,u-1,l-u+3,h),l=u+h.length-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="strikethroughSequenceTemporary"&&(i[l][1].type="data");return i}function a(i,s,l){const u=this.previous,d=this.events;let f=0;return h;function h(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(i.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const b=Go(u);if(m===126)return f>1?l(m):(i.consume(m),f++,p);if(f<2&&!n)return l(m);const y=i.exit("strikethroughSequenceTemporary"),x=Go(m);return y._open=!x||x===2&&!!b,y._close=!b||b===2&&!!x,s(m)}}}class U3{constructor(){this.map=[]}add(t,n,r){z3(this,t,n,r)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[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 a of o)t.push(a);o=r.pop()}this.map.length=0}}function z3(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 V3(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 a=r.length-1;r[a]=r[a]==="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 W3(){return{flow:{null:{name:"table",tokenize:q3,resolveAll:Y3}}}}function q3(e,t,n){const r=this;let o=0,a=0,i;return s;function s(R){let L=r.events.length-1;for(;L>-1;){const w=r.events[L][1].type;if(w==="lineEnding"||w==="linePrefix")L--;else break}const E=L>-1?r.events[L][1].type:null,N=E==="tableHead"||E==="tableRow"?v:l;return N===v&&r.parser.lazy[r.now().line]?n(R):N(R)}function l(R){return e.enter("tableHead"),e.enter("tableRow"),u(R)}function u(R){return R===124||(i=!0,a+=1),d(R)}function d(R){return R===null?n(R):$e(R)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),p):n(R):tt(R)?at(e,d,"whitespace")(R):(a+=1,i&&(i=!1,o+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),i=!0,d):(e.enter("data"),f(R)))}function f(R){return R===null||R===124||yt(R)?(e.exit("data"),d(R)):(e.consume(R),R===92?h:f)}function h(R){return R===92||R===124?(e.consume(R),f):f(R)}function p(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),i=!1,tt(R)?at(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?(i=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),b):S(R)}function b(R){return tt(R)?at(e,y,"whitespace")(R):y(R)}function y(R){return R===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),x):R===45?(a+=1,x(R)):R===null||$e(R)?k(R):S(R)}function x(R){return R===45?(e.enter("tableDelimiterFiller"),T(R)):S(R)}function T(R){return R===45?(e.consume(R),T):R===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(R))}function C(R){return tt(R)?at(e,k,"whitespace")(R):k(R)}function k(R){return R===124?m(R):R===null||$e(R)?!i||o!==a?S(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):S(R)}function S(R){return n(R)}function v(R){return e.enter("tableRow"),_(R)}function _(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),_):R===null||$e(R)?(e.exit("tableRow"),t(R)):tt(R)?at(e,_,"whitespace")(R):(e.enter("data"),O(R))}function O(R){return R===null||R===124||yt(R)?(e.exit("data"),_(R)):(e.consume(R),R===92?B:O)}function B(R){return R===92||R===124?(e.consume(R),O):O(R)}}function Y3(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],i=[0,0,0,0],s=!1,l=0,u,d,f;const h=new U3;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(dp(h,t,l,u,d),d=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,f=void 0,a=[0,0,0,0],i=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",d,t]])),o=m.type==="tableDelimiterRow"?2:d?3:1):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(a[1]!==0&&(i[0]=i[1],f=Vi(h,t,a,o,void 0,f),a=[0,0,0,0]),i[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(i[0]=i[1],f=Vi(h,t,a,o,void 0,f)),a=i,i=[a[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,a[1]!==0?(i[0]=i[1],f=Vi(h,t,a,o,n,f)):i[1]!==0&&(f=Vi(h,t,i,o,n,f)),o=0):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(i[3]=n)}for(l!==0&&dp(h,t,l,u,d),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=V3(t.events,n))}return e}function Vi(e,t,n,r,o,a){const i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Fo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=Fo(t.events,n[1]);if(a={type:i,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const u=Fo(t.events,n[2]),d=Fo(t.events,n[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,b=n[3]-n[2]-1;e.add(m,b,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(a.end=Object.assign({},Fo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function dp(e,t,n,r,o){const a=[],i=Fo(t.events,n);o&&(o.end=Object.assign({},i),a.push(["exit",o,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function Fo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const K3={name:"tasklistCheck",tokenize:Q3};function G3(){return{text:{91:K3}}}function Q3(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"),a)}function a(l){return yt(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),i):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),i):n(l)}function i(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return $e(l)?t(l):tt(l)?e.check({tokenize:X3},t,n)(l):n(l)}}function X3(e,t,n){return at(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function Z3(e){return o0([v3(),O3(),H3(e),W3(),G3()])}const J3={};function ek(e){const t=this,n=e||J3,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(Z3(n)),a.push(x3()),i.push(E3(n))}const fp=/[#.]/g;function tk(e,t){const n=e||"",r={};let o=0,a,i;for(;o<n.length;){fp.lastIndex=o;const s=fp.exec(n),l=n.slice(o,s?s.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:i=l,o+=l.length),s&&(a=s[0],o++)}return{type:"element",tagName:i||t||"div",properties:r,children:[]}}function K0(e,t,n){const r=n?ak(n):void 0;function o(a,i,...s){let l;if(a==null){l={type:"root",children:[]};const u=i;s.unshift(u)}else{l=tk(a,t);const u=l.tagName.toLowerCase(),d=r?r.get(u):void 0;if(l.tagName=d||u,nk(i))s.unshift(i);else for(const[f,h]of Object.entries(i))rk(e,l.properties,f,h)}for(const u of s)Xu(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return o}function nk(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 a=o;for(const i of a)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function rk(e,t,n,r){const o=Si(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=Uu(r):o.commaSeparated?a=ju(r):o.commaOrSpaceSeparated?a=Uu(ju(r).join(" ")):a=pp(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?ok(r):String(r);if(Array.isArray(a)){const i=[];for(const s of a)i.push(pp(o,o.property,s));a=i}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Xu(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)Xu(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Xu(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function pp(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ui(n)===ui(t)))return!0}return n}function ok(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function ak(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const ik=["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"],sk=K0(ia,"div"),lk=K0(zr,"g",ik);function uk(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let i=0;for(;;){let s=n[i];if(s===void 0){const l=hp(t,n[i-1]);s=l===-1?t.length+1:l+1,n[i]=s}if(s>a)return{line:i+1,column:a-(i>0?n[i-1]:0)+1,offset:a};i++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const s=n[n.length-1],l=hp(t,s),u=l===-1?t.length+1:l+1;if(s===u)break;n.push(u)}const i=(a.line>1?n[a.line-2]:0)+a.column-1;if(i<n[a.line-1])return i}}}function hp(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 ro={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/"},G0={}.hasOwnProperty,ck=Object.prototype;function dk(e,t){const n=t||{};return Gc({file:n.file||void 0,location:!1,schema:n.space==="svg"?zr:ia,verbose:n.verbose||!1},e)}function Gc(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},as(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:Q0(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),i=uk(a),s=i.toPoint(0),l=i.toPoint(a.length);n.position={start:s,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},as(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},as(e,r,n),n}default:return n=fk(e,t),n}}function Q0(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Gc(e,t[n]);r.push(o)}return r}function fk(e,t){const n=e.schema;e.schema=t.namespaceURI===ro.svg?zr:ia;let r=-1;const o={};for(;++r<t.attrs.length;){const s=t.attrs[r],l=(s.prefix?s.prefix+":":"")+s.name;G0.call(ck,l)||(o[l]=s.value)}const i=(e.schema.space==="svg"?lk:sk)(t.tagName,o,Q0(e,t.childNodes));if(as(e,t,i),i.tagName==="template"){const s=t,l=s.sourceCodeLocation,u=l&&l.startTag&&Bo(l.startTag),d=l&&l.endTag&&Bo(l.endTag),f=Gc(e,s.content);u&&d&&e.file&&(f.position={start:u.end,end:d.start}),i.content=f}return e.schema=n,i}function as(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=pk(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function pk(e,t,n){const r=Bo(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 a={};let i;if(n.attrs)for(i in n.attrs)G0.call(n.attrs,i)&&(a[Si(e.schema,i).property]=Bo(n.attrs[i]));n.startTag;const s=Bo(n.startTag),l=n.endTag?Bo(n.endTag):void 0,u={opening:s};l&&(u.closing=l),u.properties=a,t.data={position:u}}}return r}function Bo(e){const t=mp({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=mp({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function mp(e){return e.line&&e.column?e:void 0}class wi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}wi.prototype.property={};wi.prototype.normal={};wi.prototype.space=null;function X0(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 wi(n,r,t)}function Zu(e){return e.toLowerCase()}class Hn{constructor(t,n){this.property=t,this.attribute=n}}Hn.prototype.space=null;Hn.prototype.boolean=!1;Hn.prototype.booleanish=!1;Hn.prototype.overloadedBoolean=!1;Hn.prototype.number=!1;Hn.prototype.commaSeparated=!1;Hn.prototype.spaceSeparated=!1;Hn.prototype.commaOrSpaceSeparated=!1;Hn.prototype.mustUseProperty=!1;Hn.prototype.defined=!1;let hk=0;const Ke=Eo(),Ht=Eo(),Z0=Eo(),ke=Eo(),Ct=Eo(),zo=Eo(),bn=Eo();function Eo(){return 2**++hk}const Ju=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:Ht,commaOrSpaceSeparated:bn,commaSeparated:zo,number:ke,overloadedBoolean:Z0,spaceSeparated:Ct},Symbol.toStringTag,{value:"Module"})),lu=Object.keys(Ju);class Qc extends Hn{constructor(t,n,r,o){let a=-1;if(super(t,n),gp(this,"space",o),typeof r=="number")for(;++a<lu.length;){const i=lu[a];gp(this,lu[a],(r&Ju[i])===Ju[i])}}}Qc.prototype.defined=!0;function gp(e,t,n){n&&(e[t]=n)}const mk={}.hasOwnProperty;function la(e){const t={},n={};let r;for(r in e.properties)if(mk.call(e.properties,r)){const o=e.properties[r],a=new Qc(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Zu(r)]=r,n[Zu(a.attribute)]=r}return new wi(t,n,e.space)}const J0=la({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}}),eg=la({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function tg(e,t){return t in e?e[t]:t}function ng(e,t){return tg(e,t.toLowerCase())}const rg=la({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ng,properties:{xmlns:null,xmlnsXLink:null}}),og=la({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:Ct,ariaCurrent:null,ariaDescribedBy:Ct,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:Ct,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:Ct,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ct,ariaLevel:ke,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:Ct,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:Ct,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:Ht,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null}}),gk=la({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ng,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zo,acceptCharset:Ct,accessKey:Ct,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:Ct,autoFocus:Ke,autoPlay:Ke,blocking:Ct,capture:null,charSet:null,checked:Ke,cite:null,className:Ct,cols:ke,colSpan:null,content:null,contentEditable:Ht,controls:Ke,controlsList:Ct,coords:ke|zo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:Z0,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:Ct,height:ke,hidden:Ke,high:ke,href:null,hrefLang:null,htmlFor:Ct,httpEquiv:Ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:Ct,itemRef:Ct,itemScope:Ke,itemType:Ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,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:Ke,optimum:ke,pattern:null,ping:Ct,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:Ct,required:Ke,reversed:Ke,rows:ke,rowSpan:ke,sandbox:Ct,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:Ht,width:ke,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ct,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ke,disableRemotePlayback:Ke,prefix:null,property:null,results:ke,security:null,unselectable:null}}),bk=la({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:tg,properties:{about:bn,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:Ct,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:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,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:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:bn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,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:ke,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:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bn,rev:bn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bn,requiredFeatures:bn,requiredFonts:bn,requiredFormats:bn,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:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:bn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bn,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),yk=/^data[-\w.:]+$/i,bp=/-[a-z]/g,xk=/[A-Z]/g;function Ek(e,t){const n=Zu(t);let r=t,o=Hn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(bp,Tk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!bp.test(a)){let i=a.replace(xk,Ck);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=Qc}return new o(r,t)}function Ck(e){return"-"+e.toLowerCase()}function Tk(e){return e.charAt(1).toUpperCase()}const vk=X0([eg,J0,rg,og,gk],"html"),ag=X0([eg,J0,rg,og,bk],"svg"),Sk={},kk={}.hasOwnProperty,ig=pl("type",{handlers:{root:wk,element:Mk,text:Pk,comment:Rk,doctype:Ik}});function Dk(e,t){const r=(t||Sk).space;return ig(e,r==="svg"?ag:vk)}function wk(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Xc(e.children,n,t),ua(e,n),n}function Ak(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Xc(e.children,n,t),ua(e,n),n}function Ik(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ua(e,t),t}function Pk(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ua(e,t),t}function Rk(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ua(e,t),t}function Mk(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ag);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&kk.call(e.properties,a)){const l=Ok(r,a,e.properties[a]);l&&o.push(l)}}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:ro[i],childNodes:[],parentNode:null};return s.childNodes=Xc(e.children,s,r),ua(e,s),e.tagName==="template"&&e.content&&(s.content=Ak(e.content,r)),s}function Ok(e,t,n){const r=Ek(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?al(n):il(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=ro[r.space]}return o}function Xc(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=ig(e[r],n);a.parentNode=t,o.push(a)}return o}function ua(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 sg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Nk=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]),Pt="�";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 sn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function lg(e){return e>=55296&&e<=57343}function Lk(e){return e>=56320&&e<=57343}function Fk(e,t){return(e-55296)*1024+9216+t}function ug(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function cg(e){return e>=64976&&e<=65007||Nk.has(e)}var ce;(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"})(ce||(ce={}));const _k=65536;class Bk{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=_k,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:a}=this,i=o+n,s=a+n;return{code:t,startLine:r,endLine:r,startCol:i,endCol:i,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(Lk(n))return this.pos++,this._addGap(),Fk(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,j.EOF;return this._err(ce.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,lg(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){ug(t)?this._err(ce.controlCharacterInInputStream):cg(t)&&this._err(ce.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ze;(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"})(Ze||(Ze={}));function dg(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 jk=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))),$k=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 Hk(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=$k.get(e))!==null&&t!==void 0?t:e}var Gt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Gt||(Gt={}));const Uk=32;var Hr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Hr||(Hr={}));function ec(e){return e>=Gt.ZERO&&e<=Gt.NINE}function zk(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_F||e>=Gt.LOWER_A&&e<=Gt.LOWER_F}function Vk(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_Z||e>=Gt.LOWER_A&&e<=Gt.LOWER_Z||ec(e)}function Wk(e){return e===Gt.EQUALS||Vk(e)}var Kt;(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"})(Kt||(Kt={}));var yr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(yr||(yr={}));class qk{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Kt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yr.Strict}startEntity(t){this.decodeMode=t,this.state=Kt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Kt.EntityStart:return t.charCodeAt(n)===Gt.NUM?(this.state=Kt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Kt.NamedEntity,this.stateNamedEntity(t,n));case Kt.NumericStart:return this.stateNumericStart(t,n);case Kt.NumericDecimal:return this.stateNumericDecimal(t,n);case Kt.NumericHex:return this.stateNumericHex(t,n);case Kt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Uk)===Gt.LOWER_X?(this.state=Kt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Kt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(ec(o)||zk(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(ec(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===Gt.SEMI)this.consumed+=1;else if(this.decodeMode===yr.Strict)return 0;return this.emitCodePoint(Hk(this.result),this.consumed),this.errors&&(t!==Gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Hr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const i=t.charCodeAt(n);if(this.treeIndex=Yk(r,o,this.treeIndex+Math.max(1,a),i),this.treeIndex<0)return this.result===0||this.decodeMode===yr.Attribute&&(a===0||Wk(i))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Hr.VALUE_LENGTH)>>14,a!==0){if(i===Gt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==yr.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]&Hr.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]&~Hr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Kt.NamedEntity:return this.result!==0&&(this.decodeMode!==yr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Kt.NumericDecimal:return this.emitNumericEntity(0,2);case Kt.NumericHex:return this.emitNumericEntity(0,3);case Kt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Kt.EntityStart:return 0}}}function Yk(e,t,n,r){const o=(t&Hr.BRANCH_LENGTH)>>7,a=t&Hr.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const l=r-a;return l<0||l>=o?-1:e[n+l]-1}let i=n,s=i+o-1;for(;i<=s;){const l=i+s>>>1,u=e[l];if(u<r)i=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 so;(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"})(so||(so={}));var Nn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Nn||(Nn={}));var ne;(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"})(ne||(ne={}));var g;(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"})(g||(g={}));const Kk=new Map([[ne.A,g.A],[ne.ADDRESS,g.ADDRESS],[ne.ANNOTATION_XML,g.ANNOTATION_XML],[ne.APPLET,g.APPLET],[ne.AREA,g.AREA],[ne.ARTICLE,g.ARTICLE],[ne.ASIDE,g.ASIDE],[ne.B,g.B],[ne.BASE,g.BASE],[ne.BASEFONT,g.BASEFONT],[ne.BGSOUND,g.BGSOUND],[ne.BIG,g.BIG],[ne.BLOCKQUOTE,g.BLOCKQUOTE],[ne.BODY,g.BODY],[ne.BR,g.BR],[ne.BUTTON,g.BUTTON],[ne.CAPTION,g.CAPTION],[ne.CENTER,g.CENTER],[ne.CODE,g.CODE],[ne.COL,g.COL],[ne.COLGROUP,g.COLGROUP],[ne.DD,g.DD],[ne.DESC,g.DESC],[ne.DETAILS,g.DETAILS],[ne.DIALOG,g.DIALOG],[ne.DIR,g.DIR],[ne.DIV,g.DIV],[ne.DL,g.DL],[ne.DT,g.DT],[ne.EM,g.EM],[ne.EMBED,g.EMBED],[ne.FIELDSET,g.FIELDSET],[ne.FIGCAPTION,g.FIGCAPTION],[ne.FIGURE,g.FIGURE],[ne.FONT,g.FONT],[ne.FOOTER,g.FOOTER],[ne.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[ne.FORM,g.FORM],[ne.FRAME,g.FRAME],[ne.FRAMESET,g.FRAMESET],[ne.H1,g.H1],[ne.H2,g.H2],[ne.H3,g.H3],[ne.H4,g.H4],[ne.H5,g.H5],[ne.H6,g.H6],[ne.HEAD,g.HEAD],[ne.HEADER,g.HEADER],[ne.HGROUP,g.HGROUP],[ne.HR,g.HR],[ne.HTML,g.HTML],[ne.I,g.I],[ne.IMG,g.IMG],[ne.IMAGE,g.IMAGE],[ne.INPUT,g.INPUT],[ne.IFRAME,g.IFRAME],[ne.KEYGEN,g.KEYGEN],[ne.LABEL,g.LABEL],[ne.LI,g.LI],[ne.LINK,g.LINK],[ne.LISTING,g.LISTING],[ne.MAIN,g.MAIN],[ne.MALIGNMARK,g.MALIGNMARK],[ne.MARQUEE,g.MARQUEE],[ne.MATH,g.MATH],[ne.MENU,g.MENU],[ne.META,g.META],[ne.MGLYPH,g.MGLYPH],[ne.MI,g.MI],[ne.MO,g.MO],[ne.MN,g.MN],[ne.MS,g.MS],[ne.MTEXT,g.MTEXT],[ne.NAV,g.NAV],[ne.NOBR,g.NOBR],[ne.NOFRAMES,g.NOFRAMES],[ne.NOEMBED,g.NOEMBED],[ne.NOSCRIPT,g.NOSCRIPT],[ne.OBJECT,g.OBJECT],[ne.OL,g.OL],[ne.OPTGROUP,g.OPTGROUP],[ne.OPTION,g.OPTION],[ne.P,g.P],[ne.PARAM,g.PARAM],[ne.PLAINTEXT,g.PLAINTEXT],[ne.PRE,g.PRE],[ne.RB,g.RB],[ne.RP,g.RP],[ne.RT,g.RT],[ne.RTC,g.RTC],[ne.RUBY,g.RUBY],[ne.S,g.S],[ne.SCRIPT,g.SCRIPT],[ne.SEARCH,g.SEARCH],[ne.SECTION,g.SECTION],[ne.SELECT,g.SELECT],[ne.SOURCE,g.SOURCE],[ne.SMALL,g.SMALL],[ne.SPAN,g.SPAN],[ne.STRIKE,g.STRIKE],[ne.STRONG,g.STRONG],[ne.STYLE,g.STYLE],[ne.SUB,g.SUB],[ne.SUMMARY,g.SUMMARY],[ne.SUP,g.SUP],[ne.TABLE,g.TABLE],[ne.TBODY,g.TBODY],[ne.TEMPLATE,g.TEMPLATE],[ne.TEXTAREA,g.TEXTAREA],[ne.TFOOT,g.TFOOT],[ne.TD,g.TD],[ne.TH,g.TH],[ne.THEAD,g.THEAD],[ne.TITLE,g.TITLE],[ne.TR,g.TR],[ne.TRACK,g.TRACK],[ne.TT,g.TT],[ne.U,g.U],[ne.UL,g.UL],[ne.SVG,g.SVG],[ne.VAR,g.VAR],[ne.WBR,g.WBR],[ne.XMP,g.XMP]]);function ca(e){var t;return(t=Kk.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Te=g,Gk={[Ee.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[Ee.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[Ee.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[Ee.XLINK]:new Set,[Ee.XML]:new Set,[Ee.XMLNS]:new Set},tc=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6]);ne.STYLE,ne.SCRIPT,ne.XMP,ne.IFRAME,ne.NOEMBED,ne.NOFRAMES,ne.PLAINTEXT;var U;(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"})(U||(U={}));const Bt={DATA:U.DATA,RCDATA:U.RCDATA,RAWTEXT:U.RAWTEXT,SCRIPT_DATA:U.SCRIPT_DATA,PLAINTEXT:U.PLAINTEXT,CDATA_SECTION:U.CDATA_SECTION};function Qk(e){return e>=j.DIGIT_0&&e<=j.DIGIT_9}function Ua(e){return e>=j.LATIN_CAPITAL_A&&e<=j.LATIN_CAPITAL_Z}function Xk(e){return e>=j.LATIN_SMALL_A&&e<=j.LATIN_SMALL_Z}function _r(e){return Xk(e)||Ua(e)}function yp(e){return _r(e)||Qk(e)}function Wi(e){return e+32}function fg(e){return e===j.SPACE||e===j.LINE_FEED||e===j.TABULATION||e===j.FORM_FEED}function xp(e){return fg(e)||e===j.SOLIDUS||e===j.GREATER_THAN_SIGN}function Zk(e){return e===j.NULL?ce.nullCharacterReference:e>1114111?ce.characterReferenceOutsideUnicodeRange:lg(e)?ce.surrogateCharacterReference:cg(e)?ce.noncharacterCharacterReference:ug(e)||e===j.CARRIAGE_RETURN?ce.controlCharacterReference:null}class Jk{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=U.DATA,this.returnState=U.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Bk(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new qk(jk,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ce.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ce.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=Zk(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:Ze.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ze.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ze.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ze.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(dg(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(ce.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=ca(t.tagName),t.type===Ze.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ce.endTagWithAttributes),t.selfClosing&&this._err(ce.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 Ze.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ze.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ze.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:Ze.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=fg(t)?Ze.WHITESPACE_CHARACTER:t===j.NULL?Ze.NULL_CHARACTER:Ze.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ze.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=U.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?yr.Attribute:yr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===U.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===U.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===U.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case U.DATA:{this._stateData(t);break}case U.RCDATA:{this._stateRcdata(t);break}case U.RAWTEXT:{this._stateRawtext(t);break}case U.SCRIPT_DATA:{this._stateScriptData(t);break}case U.PLAINTEXT:{this._statePlaintext(t);break}case U.TAG_OPEN:{this._stateTagOpen(t);break}case U.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case U.TAG_NAME:{this._stateTagName(t);break}case U.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case U.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case U.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case U.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case U.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case U.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case U.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case U.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case U.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case U.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case U.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case U.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case U.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case U.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case U.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case U.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case U.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case U.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case U.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case U.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case U.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case U.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case U.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case U.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case U.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case U.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case U.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case U.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case U.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case U.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case U.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case U.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case U.BOGUS_COMMENT:{this._stateBogusComment(t);break}case U.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case U.COMMENT_START:{this._stateCommentStart(t);break}case U.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case U.COMMENT:{this._stateComment(t);break}case U.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case U.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case U.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case U.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case U.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case U.COMMENT_END:{this._stateCommentEnd(t);break}case U.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case U.DOCTYPE:{this._stateDoctype(t);break}case U.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case U.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case U.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case U.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case U.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case U.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case U.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case U.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case U.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case U.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case U.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case U.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case U.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case U.CDATA_SECTION:{this._stateCdataSection(t);break}case U.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case U.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case U.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case U.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case j.LESS_THAN_SIGN:{this.state=U.TAG_OPEN;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.NULL:{this._err(ce.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=U.RCDATA_LESS_THAN_SIGN;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case j.LESS_THAN_SIGN:{this.state=U.RAWTEXT_LESS_THAN_SIGN;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case j.LESS_THAN_SIGN:{this.state=U.SCRIPT_DATA_LESS_THAN_SIGN;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case j.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(_r(t))this._createStartTagToken(),this.state=U.TAG_NAME,this._stateTagName(t);else switch(t){case j.EXCLAMATION_MARK:{this.state=U.MARKUP_DECLARATION_OPEN;break}case j.SOLIDUS:{this.state=U.END_TAG_OPEN;break}case j.QUESTION_MARK:{this._err(ce.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=U.BOGUS_COMMENT,this._stateBogusComment(t);break}case j.EOF:{this._err(ce.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ce.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=U.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(_r(t))this._createEndTagToken(),this.state=U.TAG_NAME,this._stateTagName(t);else switch(t){case j.GREATER_THAN_SIGN:{this._err(ce.missingEndTagName),this.state=U.DATA;break}case j.EOF:{this._err(ce.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ce.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=U.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=U.BEFORE_ATTRIBUTE_NAME;break}case j.SOLIDUS:{this.state=U.SELF_CLOSING_START_TAG;break}case j.GREATER_THAN_SIGN:{this.state=U.DATA,this.emitCurrentTagToken();break}case j.NULL:{this._err(ce.unexpectedNullCharacter),n.tagName+=Pt;break}case j.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ua(t)?Wi(t):t)}}_stateRcdataLessThanSign(t){t===j.SOLIDUS?this.state=U.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=U.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){_r(t)?(this.state=U.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=U.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=U.BEFORE_ATTRIBUTE_NAME,!1;case j.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=U.SELF_CLOSING_START_TAG,!1;case j.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=U.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=U.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===j.SOLIDUS?this.state=U.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=U.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){_r(t)?(this.state=U.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=U.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=U.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case j.SOLIDUS:{this.state=U.SCRIPT_DATA_END_TAG_OPEN;break}case j.EXCLAMATION_MARK:{this.state=U.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=U.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){_r(t)?(this.state=U.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=U.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=U.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===j.HYPHEN_MINUS?(this.state=U.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=U.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===j.HYPHEN_MINUS?(this.state=U.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=U.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case j.HYPHEN_MINUS:{this.state=U.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=U.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case j.HYPHEN_MINUS:{this.state=U.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=U.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this.state=U.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case j.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=U.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case j.HYPHEN_MINUS:{this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=U.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case j.GREATER_THAN_SIGN:{this.state=U.SCRIPT_DATA,this._emitChars(">");break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this.state=U.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case j.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=U.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===j.SOLIDUS?this.state=U.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:_r(t)?(this._emitChars("<"),this.state=U.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=U.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){_r(t)?(this.state=U.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=U.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=U.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(sn.SCRIPT,!1)&&xp(this.preprocessor.peek(sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=U.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case j.HYPHEN_MINUS:{this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this._emitChars(Pt);break}case j.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case j.HYPHEN_MINUS:{this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case j.LESS_THAN_SIGN:{this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case j.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=U.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=U.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case j.GREATER_THAN_SIGN:{this.state=U.SCRIPT_DATA,this._emitChars(">");break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case j.EOF:{this._err(ce.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===j.SOLIDUS?(this.state=U.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=U.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(sn.SCRIPT,!1)&&xp(this.preprocessor.peek(sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=U.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=U.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=U.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case j.EQUALS_SIGN:{this._err(ce.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=U.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=U.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=U.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case j.EQUALS_SIGN:{this._leaveAttrName(),this.state=U.BEFORE_ATTRIBUTE_VALUE;break}case j.QUOTATION_MARK:case j.APOSTROPHE:case j.LESS_THAN_SIGN:{this._err(ce.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.name+=Pt;break}default:this.currentAttr.name+=String.fromCodePoint(Ua(t)?Wi(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=U.SELF_CLOSING_START_TAG;break}case j.EQUALS_SIGN:{this.state=U.BEFORE_ATTRIBUTE_VALUE;break}case j.GREATER_THAN_SIGN:{this.state=U.DATA,this.emitCurrentTagToken();break}case j.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=U.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=U.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this.state=U.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(ce.missingAttributeValue),this.state=U.DATA,this.emitCurrentTagToken();break}default:this.state=U.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case j.QUOTATION_MARK:{this.state=U.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case j.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case j.APOSTROPHE:{this.state=U.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case j.EOF:{this._err(ce.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=U.BEFORE_ATTRIBUTE_NAME;break}case j.AMPERSAND:{this._startCharacterReference();break}case j.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=U.DATA,this.emitCurrentTagToken();break}case j.NULL:{this._err(ce.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case j.QUOTATION_MARK:case j.APOSTROPHE:case j.LESS_THAN_SIGN:case j.EQUALS_SIGN:case j.GRAVE_ACCENT:{this._err(ce.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case j.EOF:{this._err(ce.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=U.BEFORE_ATTRIBUTE_NAME;break}case j.SOLIDUS:{this._leaveAttrValue(),this.state=U.SELF_CLOSING_START_TAG;break}case j.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=U.DATA,this.emitCurrentTagToken();break}case j.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._err(ce.missingWhitespaceBetweenAttributes),this.state=U.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case j.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=U.DATA,this.emitCurrentTagToken();break}case j.EOF:{this._err(ce.eofInTag),this._emitEOFToken();break}default:this._err(ce.unexpectedSolidusInTag),this.state=U.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case j.GREATER_THAN_SIGN:{this.state=U.DATA,this.emitCurrentComment(n);break}case j.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case j.NULL:{this._err(ce.unexpectedNullCharacter),n.data+=Pt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(sn.DASH_DASH,!0)?(this._createCommentToken(sn.DASH_DASH.length+1),this.state=U.COMMENT_START):this._consumeSequenceIfMatch(sn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(sn.DOCTYPE.length+1),this.state=U.DOCTYPE):this._consumeSequenceIfMatch(sn.CDATA_START,!0)?this.inForeignNode?this.state=U.CDATA_SECTION:(this._err(ce.cdataInHtmlContent),this._createCommentToken(sn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=U.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ce.incorrectlyOpenedComment),this._createCommentToken(2),this.state=U.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case j.HYPHEN_MINUS:{this.state=U.COMMENT_START_DASH;break}case j.GREATER_THAN_SIGN:{this._err(ce.abruptClosingOfEmptyComment),this.state=U.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=U.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{this.state=U.COMMENT_END;break}case j.GREATER_THAN_SIGN:{this._err(ce.abruptClosingOfEmptyComment),this.state=U.DATA,this.emitCurrentComment(n);break}case j.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=U.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{this.state=U.COMMENT_END_DASH;break}case j.LESS_THAN_SIGN:{n.data+="<",this.state=U.COMMENT_LESS_THAN_SIGN;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),n.data+=Pt;break}case j.EOF:{this._err(ce.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=U.COMMENT_LESS_THAN_SIGN_BANG;break}case j.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=U.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===j.HYPHEN_MINUS?this.state=U.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=U.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===j.HYPHEN_MINUS?this.state=U.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=U.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==j.GREATER_THAN_SIGN&&t!==j.EOF&&this._err(ce.nestedComment),this.state=U.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{this.state=U.COMMENT_END;break}case j.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=U.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case j.GREATER_THAN_SIGN:{this.state=U.DATA,this.emitCurrentComment(n);break}case j.EXCLAMATION_MARK:{this.state=U.COMMENT_END_BANG;break}case j.HYPHEN_MINUS:{n.data+="-";break}case j.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=U.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case j.HYPHEN_MINUS:{n.data+="--!",this.state=U.COMMENT_END_DASH;break}case j.GREATER_THAN_SIGN:{this._err(ce.incorrectlyClosedComment),this.state=U.DATA,this.emitCurrentComment(n);break}case j.EOF:{this._err(ce.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=U.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case j.SPACE:case j.LINE_FEED:case j.TABULATION:case j.FORM_FEED:{this.state=U.BEFORE_DOCTYPE_NAME;break}case j.GREATER_THAN_SIGN:{this.state=U.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case j.EOF:{this._err(ce.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingWhitespaceBeforeDoctypeName),this.state=U.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ua(t))this._createDoctypeToken(String.fromCharCode(Wi(t))),this.state=U.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(ce.unexpectedNullCharacter),this._createDoctypeToken(Pt),this.state=U.DOCTYPE_NAME;break}case j.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=U.DATA;break}case j.EOF:{this._err(ce.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=U.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=U.AFTER_DOCTYPE_NAME;break}case j.GREATER_THAN_SIGN:{this.state=U.DATA,this.emitCurrentDoctype(n);break}case j.NULL:{this._err(ce.unexpectedNullCharacter),n.name+=Pt;break}case j.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ua(t)?Wi(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=U.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(sn.PUBLIC,!1)?this.state=U.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(sn.SYSTEM,!1)?this.state=U.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ce.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=U.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=U.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case j.QUOTATION_MARK:{this._err(ce.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=U.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this._err(ce.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=U.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(ce.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=U.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=U.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=U.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{n.publicId="",this.state=U.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(ce.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=U.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case j.QUOTATION_MARK:{this.state=U.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),n.publicId+=Pt;break}case j.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=U.DATA;break}case j.EOF:{this._err(ce.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=U.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),n.publicId+=Pt;break}case j.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=U.DATA;break}case j.EOF:{this._err(ce.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=U.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case j.GREATER_THAN_SIGN:{this.state=U.DATA,this.emitCurrentDoctype(n);break}case j.QUOTATION_MARK:{this._err(ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this._err(ce.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=U.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=U.DATA;break}case j.QUOTATION_MARK:{n.systemId="",this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{n.systemId="",this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=U.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=U.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case j.QUOTATION_MARK:{this._err(ce.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{this._err(ce.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=U.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=U.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=U.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case j.APOSTROPHE:{n.systemId="",this.state=U.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case j.GREATER_THAN_SIGN:{this._err(ce.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=U.DATA,this.emitCurrentDoctype(n);break}case j.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case j.QUOTATION_MARK:{this.state=U.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),n.systemId+=Pt;break}case j.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=U.DATA;break}case j.EOF:{this._err(ce.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=U.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case j.NULL:{this._err(ce.unexpectedNullCharacter),n.systemId+=Pt;break}case j.GREATER_THAN_SIGN:{this._err(ce.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=U.DATA;break}case j.EOF:{this._err(ce.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=U.DATA;break}case j.EOF:{this._err(ce.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ce.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=U.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case j.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=U.DATA;break}case j.NULL:{this._err(ce.unexpectedNullCharacter);break}case j.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case j.RIGHT_SQUARE_BRACKET:{this.state=U.CDATA_SECTION_BRACKET;break}case j.EOF:{this._err(ce.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===j.RIGHT_SQUARE_BRACKET?this.state=U.CDATA_SECTION_END:(this._emitChars("]"),this.state=U.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case j.GREATER_THAN_SIGN:{this.state=U.DATA;break}case j.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=U.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()&&yp(this.preprocessor.peek(1))?U.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){yp(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===j.SEMICOLON&&this._err(ce.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const pg=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Ep=new Set([...pg,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Rs=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),e6=new Set([...Rs,g.OL,g.UL]),t6=new Set([...Rs,g.BUTTON]),Cp=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Tp=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),n6=new Set([g.TR,g.TEMPLATE,g.HTML]),r6=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),o6=new Set([g.TABLE,g.TEMPLATE,g.HTML]),a6=new Set([g.TD,g.TH]);class i6{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=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.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(tc,Ee.HTML)}popUntilTableCellPopped(){this.popUntilPopped(a6,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(o6,Ee.HTML)}clearBackToTableBodyContext(){this.clearBackTo(r6,Ee.HTML)}clearBackToTableRowContext(){this.clearBackTo(n6,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]===g.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]===g.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(Tp.has(o))return!1;break}case Ee.MATHML:{if(Cp.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Rs)}hasInListItemScope(t){return this.hasInDynamicScope(t,e6)}hasInButtonScope(t){return this.hasInDynamicScope(t,t6)}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(tc.has(n))return!0;if(Rs.has(n))return!1;break}case Ee.SVG:{if(Tp.has(n))return!1;break}case Ee.MATHML:{if(Cp.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 g.TABLE:case g.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 g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.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 g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&pg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ep.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ep.has(this.currentTagId);)this.pop()}}const uu=3;var rr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(rr||(rr={}));const vp={type:rr.Marker};class s6{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===rr.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===a&&this.treeAdapter.getNamespaceURI(u)===i){const d=this.treeAdapter.getAttrList(u);d.length===o&&r.push({idx:s,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<uu)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<uu)return;const o=new Map(n.map(i=>[i.name,i.value]));let a=0;for(let i=0;i<r.length;i++){const s=r[i];s.attrs.every(l=>o.get(l.name)===l.value)&&(a+=1,a>=uu&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(vp)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:rr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:rr.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(vp);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===rr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===rr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===rr.Element&&n.element===t)}}const Br={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(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Br.appendChild(e,a)}},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(Br.isTextNode(n)){n.value+=t;return}}Br.appendChild(e,Br.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Br.isTextNode(r)?r.value+=t:Br.insertBefore(e,Br.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",l6="about:legacy-compat",u6="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",mg=["+//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//"],c6=[...mg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],d6=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),gg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],f6=[...gg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Sp(e,t){return t.some(n=>e.startsWith(n))}function p6(e){return e.name===hg&&e.publicId===null&&(e.systemId===null||e.systemId===l6)}function h6(e){if(e.name!==hg)return Nn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===u6)return Nn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),d6.has(n))return Nn.QUIRKS;let r=t===null?c6:mg;if(Sp(n,r))return Nn.QUIRKS;if(r=t===null?gg:f6,Sp(n,r))return Nn.LIMITED_QUIRKS}return Nn.NO_QUIRKS}const kp={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},m6="definitionurl",g6="definitionURL",b6=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])),y6=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}]]),x6=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])),E6=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function C6(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===so.COLOR||r===so.SIZE||r===so.FACE)||E6.has(t)}function bg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===m6){e.attrs[t].name=g6;break}}function yg(e){for(let t=0;t<e.attrs.length;t++){const n=b6.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Zc(e){for(let t=0;t<e.attrs.length;t++){const n=y6.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 T6(e){const t=x6.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ca(e.tagName))}function v6(e,t){return t===Ee.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function S6(e,t,n){if(t===Ee.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===so.ENCODING){const o=n[r].value.toLowerCase();return o===kp.TEXT_HTML||o===kp.APPLICATION_XML}}return t===Ee.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function k6(e,t,n,r){return(!r||r===Ee.HTML)&&S6(e,t,n)||(!r||r===Ee.MATHML)&&v6(e,t)}const D6="hidden",w6=8,A6=3;var q;(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"})(q||(q={}));const I6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},xg=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Dp={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Br,onParseError:null};class wp{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=q.INITIAL,this.originalInsertionMode=q.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={...Dp,...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 Jk(this.options,this),this.activeFormattingElements=new s6(this.treeAdapter),this.fragmentContextID=r?ca(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new i6(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={...Dp,...n};t??(t=r.treeAdapter.createElement(ne.TEMPLATE,Ee.HTML,[]));const o=r.treeAdapter.createElement("documentmock",Ee.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(q.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}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 a=(o=t.location)!==null&&o!==void 0?o:I6,i={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(i)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.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 a,i;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,this._setContextModes(a,i)}}_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=q.TEXT}switchToPlaintextParsing(){this.insertionMode=q.TEXT,this.originalInsertionMode=q.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)===ne.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 g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Bt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Bt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Bt.SCRIPT_DATA;break}case g.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 i=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));i&&this.treeAdapter.setNodeSourceCodeLocation(i,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(ne.HTML,Ee.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.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),a=r?o.lastIndexOf(r):o.length,i=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:l,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:l,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,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),a=n.type===Ze.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,a)}}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===g.SVG&&this.treeAdapter.getTagName(n)===ne.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===Ee.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,Ee.HTML)}_processToken(t){switch(t.type){case Ze.CHARACTER:{this.onCharacter(t);break}case Ze.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ze.COMMENT:{this.onComment(t);break}case Ze.DOCTYPE:{this.onDoctype(t);break}case Ze.START_TAG:{this._processStartTag(t);break}case Ze.END_TAG:{this.onEndTag(t);break}case Ze.EOF:{this.onEof(t);break}case Ze.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return k6(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===rr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=q.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=q.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=q.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=q.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=q.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=q.IN_TABLE;return}case g.BODY:{this.insertionMode=q.IN_BODY;return}case g.FRAMESET:{this.insertionMode=q.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?q.AFTER_HEAD:q.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=q.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=q.IN_HEAD;return}break}}this.insertionMode=q.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=q.IN_SELECT_IN_TABLE;return}}this.insertionMode=q.IN_SELECT}_isElementCausesFosterParenting(t){return xg.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 g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===Ee.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.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 Gk[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aw(this,t);return}switch(this.insertionMode){case q.INITIAL:{Da(this,t);break}case q.BEFORE_HTML:{Ga(this,t);break}case q.BEFORE_HEAD:{Qa(this,t);break}case q.IN_HEAD:{Xa(this,t);break}case q.IN_HEAD_NO_SCRIPT:{Za(this,t);break}case q.AFTER_HEAD:{Ja(this,t);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:{Cg(this,t);break}case q.TEXT:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{cu(this,t);break}case q.IN_TABLE_TEXT:{wg(this,t);break}case q.IN_COLUMN_GROUP:{Ms(this,t);break}case q.AFTER_BODY:{Os(this,t);break}case q.AFTER_AFTER_BODY:{is(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ow(this,t);return}switch(this.insertionMode){case q.INITIAL:{Da(this,t);break}case q.BEFORE_HTML:{Ga(this,t);break}case q.BEFORE_HEAD:{Qa(this,t);break}case q.IN_HEAD:{Xa(this,t);break}case q.IN_HEAD_NO_SCRIPT:{Za(this,t);break}case q.AFTER_HEAD:{Ja(this,t);break}case q.TEXT:{this._insertCharacters(t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{cu(this,t);break}case q.IN_COLUMN_GROUP:{Ms(this,t);break}case q.AFTER_BODY:{Os(this,t);break}case q.AFTER_AFTER_BODY:{is(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){nc(this,t);return}switch(this.insertionMode){case q.INITIAL:case q.BEFORE_HTML:case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_TEMPLATE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{nc(this,t);break}case q.IN_TABLE_TEXT:{wa(this,t);break}case q.AFTER_BODY:{F6(this,t);break}case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{_6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case q.INITIAL:{B6(this,t);break}case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:{this._err(t,ce.misplacedDoctype);break}case q.IN_TABLE_TEXT:{wa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ce.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?iw(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case q.INITIAL:{Da(this,t);break}case q.BEFORE_HTML:{j6(this,t);break}case q.BEFORE_HEAD:{H6(this,t);break}case q.IN_HEAD:{Gn(this,t);break}case q.IN_HEAD_NO_SCRIPT:{V6(this,t);break}case q.AFTER_HEAD:{q6(this,t);break}case q.IN_BODY:{rn(this,t);break}case q.IN_TABLE:{Qo(this,t);break}case q.IN_TABLE_TEXT:{wa(this,t);break}case q.IN_CAPTION:{UD(this,t);break}case q.IN_COLUMN_GROUP:{td(this,t);break}case q.IN_TABLE_BODY:{gl(this,t);break}case q.IN_ROW:{bl(this,t);break}case q.IN_CELL:{WD(this,t);break}case q.IN_SELECT:{Pg(this,t);break}case q.IN_SELECT_IN_TABLE:{YD(this,t);break}case q.IN_TEMPLATE:{GD(this,t);break}case q.AFTER_BODY:{XD(this,t);break}case q.IN_FRAMESET:{ZD(this,t);break}case q.AFTER_FRAMESET:{ew(this,t);break}case q.AFTER_AFTER_BODY:{nw(this,t);break}case q.AFTER_AFTER_FRAMESET:{rw(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?sw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case q.INITIAL:{Da(this,t);break}case q.BEFORE_HTML:{$6(this,t);break}case q.BEFORE_HEAD:{U6(this,t);break}case q.IN_HEAD:{z6(this,t);break}case q.IN_HEAD_NO_SCRIPT:{W6(this,t);break}case q.AFTER_HEAD:{Y6(this,t);break}case q.IN_BODY:{ml(this,t);break}case q.TEXT:{MD(this,t);break}case q.IN_TABLE:{fi(this,t);break}case q.IN_TABLE_TEXT:{wa(this,t);break}case q.IN_CAPTION:{zD(this,t);break}case q.IN_COLUMN_GROUP:{VD(this,t);break}case q.IN_TABLE_BODY:{rc(this,t);break}case q.IN_ROW:{Ig(this,t);break}case q.IN_CELL:{qD(this,t);break}case q.IN_SELECT:{Rg(this,t);break}case q.IN_SELECT_IN_TABLE:{KD(this,t);break}case q.IN_TEMPLATE:{QD(this,t);break}case q.AFTER_BODY:{Og(this,t);break}case q.IN_FRAMESET:{JD(this,t);break}case q.AFTER_FRAMESET:{tw(this,t);break}case q.AFTER_AFTER_BODY:{is(this,t);break}}}onEof(t){switch(this.insertionMode){case q.INITIAL:{Da(this,t);break}case q.BEFORE_HTML:{Ga(this,t);break}case q.BEFORE_HEAD:{Qa(this,t);break}case q.IN_HEAD:{Xa(this,t);break}case q.IN_HEAD_NO_SCRIPT:{Za(this,t);break}case q.AFTER_HEAD:{Ja(this,t);break}case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{kg(this,t);break}case q.TEXT:{OD(this,t);break}case q.IN_TABLE_TEXT:{wa(this,t);break}case q.IN_TEMPLATE:{Mg(this,t);break}case q.AFTER_BODY:case q.IN_FRAMESET:case q.AFTER_FRAMESET:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{ed(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 q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.TEXT:case q.IN_COLUMN_GROUP:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{this._insertCharacters(t);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:case q.AFTER_BODY:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{Eg(this,t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{cu(this,t);break}case q.IN_TABLE_TEXT:{Dg(this,t);break}}}}function P6(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):Sg(e,t),n}function R6(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 M6(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,i=o;i!==n;a++,i=o){o=e.openElements.getCommonAncestor(i);const s=e.activeFormattingElements.getElementEntry(i),l=s&&a>=A6;!s||l?(l&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(i)):(i=O6(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function O6(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 N6(e,t,n){const r=e.treeAdapter.getTagName(t),o=ca(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===Ee.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function L6(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function Jc(e,t){for(let n=0;n<w6;n++){const r=P6(e,t);if(!r)break;const o=R6(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=M6(e,o,r.element),i=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),i&&N6(e,i,a),L6(e,o,r)}}function nc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function F6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function _6(e,t){e._appendCommentNode(t,e.document)}function ed(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 a=e.openElements.items[1],i=e.treeAdapter.getNodeSourceCodeLocation(a);i&&!i.endTag&&e._setEndLocation(a,t)}}}}function B6(e,t){e._setDocumentType(t);const n=t.forceQuirks?Nn.QUIRKS:h6(t);p6(t)||e._err(t,ce.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=q.BEFORE_HTML}function Da(e,t){e._err(t,ce.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Nn.QUIRKS),e.insertionMode=q.BEFORE_HTML,e._processToken(t)}function j6(e,t){t.tagID===g.HTML?(e._insertElement(t,Ee.HTML),e.insertionMode=q.BEFORE_HEAD):Ga(e,t)}function $6(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ga(e,t)}function Ga(e,t){e._insertFakeRootElement(),e.insertionMode=q.BEFORE_HEAD,e._processToken(t)}function H6(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.HEAD:{e._insertElement(t,Ee.HTML),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD;break}default:Qa(e,t)}}function U6(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Qa(e,t):e._err(t,ce.endTagWithoutMatchingOpenElement)}function Qa(e,t){e._insertFakeElement(ne.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD,e._processToken(t)}function Gn(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Bt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Bt.RAWTEXT):(e._insertElement(t,Ee.HTML),e.insertionMode=q.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Bt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Bt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=q.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(q.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ce.misplacedStartTagForHeadElement);break}default:Xa(e,t)}}function z6(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=q.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Xa(e,t);break}case g.TEMPLATE:{Co(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function Co(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ce.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ce.endTagWithoutMatchingOpenElement)}function Xa(e,t){e.openElements.pop(),e.insertionMode=q.AFTER_HEAD,e._processToken(t)}function V6(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Gn(e,t);break}case g.NOSCRIPT:{e._err(t,ce.nestedNoscriptInHead);break}default:Za(e,t)}}function W6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=q.IN_HEAD;break}case g.BR:{Za(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function Za(e,t){const n=t.type===Ze.EOF?ce.openElementsLeftAfterEof:ce.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=q.IN_HEAD,e._processToken(t)}function q6(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.BODY:{e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=q.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,Ee.HTML),e.insertionMode=q.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,ce.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Gn(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ce.misplacedStartTagForHeadElement);break}default:Ja(e,t)}}function Y6(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ja(e,t);break}case g.TEMPLATE:{Co(e,t);break}default:e._err(t,ce.endTagWithoutMatchingOpenElement)}}function Ja(e,t){e._insertFakeElement(ne.BODY,g.BODY),e.insertionMode=q.IN_BODY,hl(e,t)}function hl(e,t){switch(t.type){case Ze.CHARACTER:{Cg(e,t);break}case Ze.WHITESPACE_CHARACTER:{Eg(e,t);break}case Ze.COMMENT:{nc(e,t);break}case Ze.START_TAG:{rn(e,t);break}case Ze.END_TAG:{ml(e,t);break}case Ze.EOF:{kg(e,t);break}}}function Eg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Cg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function K6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function G6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Q6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Ee.HTML),e.insertionMode=q.IN_FRAMESET)}function X6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML)}function Z6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&tc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Ee.HTML)}function J6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function eD(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),n||(e.formElement=e.openElements.current))}function tD(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===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML)}function nD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.tokenizer.state=Bt.PLAINTEXT}function rD(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1}function oD(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ne.A);n&&(Jc(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 aD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function iD(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Jc(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function sD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function lD(e,t){e.treeAdapter.getDocumentMode(e.document)!==Nn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=q.IN_TABLE}function Tg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vg(e){const t=dg(e,so.TYPE);return t!=null&&t.toLowerCase()===D6}function uD(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Ee.HTML),vg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function cD(e,t){e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0}function dD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,Ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fD(e,t){t.tagName=ne.IMG,t.tagID=g.IMG,Tg(e,t)}function pD(e,t){e._insertElement(t,Ee.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Bt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=q.TEXT}function hD(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function mD(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Bt.RAWTEXT)}function Ap(e,t){e._switchToTextParsing(t,Bt.RAWTEXT)}function gD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===q.IN_TABLE||e.insertionMode===q.IN_CAPTION||e.insertionMode===q.IN_TABLE_BODY||e.insertionMode===q.IN_ROW||e.insertionMode===q.IN_CELL?q.IN_SELECT_IN_TABLE:q.IN_SELECT}function bD(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function yD(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Ee.HTML)}function xD(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,Ee.HTML)}function ED(e,t){e._reconstructActiveFormattingElements(),bg(t),Zc(t),t.selfClosing?e._appendElement(t,Ee.MATHML):e._insertElement(t,Ee.MATHML),t.ackSelfClosing=!0}function CD(e,t){e._reconstructActiveFormattingElements(),yg(t),Zc(t),t.selfClosing?e._appendElement(t,Ee.SVG):e._insertElement(t,Ee.SVG),t.ackSelfClosing=!0}function Ip(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Ee.HTML)}function rn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{aD(e,t);break}case g.A:{oD(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{Z6(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{X6(e,t);break}case g.LI:case g.DD:case g.DT:{tD(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Tg(e,t);break}case g.HR:{dD(e,t);break}case g.RB:case g.RTC:{yD(e,t);break}case g.RT:case g.RP:{xD(e,t);break}case g.PRE:case g.LISTING:{J6(e,t);break}case g.XMP:{hD(e,t);break}case g.SVG:{CD(e,t);break}case g.HTML:{K6(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Gn(e,t);break}case g.BODY:{G6(e,t);break}case g.FORM:{eD(e,t);break}case g.NOBR:{iD(e,t);break}case g.MATH:{ED(e,t);break}case g.TABLE:{lD(e,t);break}case g.INPUT:{uD(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{cD(e,t);break}case g.IMAGE:{fD(e,t);break}case g.BUTTON:{rD(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{sD(e,t);break}case g.IFRAME:{mD(e,t);break}case g.SELECT:{gD(e,t);break}case g.OPTION:case g.OPTGROUP:{bD(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Ap(e,t);break}case g.FRAMESET:{Q6(e,t);break}case g.TEXTAREA:{pD(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Ap(e,t):Ip(e,t);break}case g.PLAINTEXT:{nD(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:Ip(e,t)}}function TD(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=q.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function vD(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=q.AFTER_BODY,Og(e,t))}function SD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function kD(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function DD(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(ne.P,g.P),e._closePElement()}function wD(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function AD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function ID(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function PD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function RD(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ne.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Sg(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],i=e.openElements.tagIDs[o];if(r===i&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,i))break}}function ml(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Jc(e,t);break}case g.P:{DD(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{SD(e,t);break}case g.LI:{wD(e);break}case g.DD:case g.DT:{AD(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{ID(e);break}case g.BR:{RD(e);break}case g.BODY:{TD(e,t);break}case g.HTML:{vD(e,t);break}case g.FORM:{kD(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{PD(e,t);break}case g.TEMPLATE:{Co(e,t);break}default:Sg(e,t)}}function kg(e,t){e.tmplInsertionModeStack.length>0?Mg(e,t):ed(e,t)}function MD(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function OD(e,t){e._err(t,ce.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function cu(e,t){if(e.openElements.currentTagId!==void 0&&xg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=q.IN_TABLE_TEXT,t.type){case Ze.CHARACTER:{wg(e,t);break}case Ze.WHITESPACE_CHARACTER:{Dg(e,t);break}}else Ai(e,t)}function ND(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Ee.HTML),e.insertionMode=q.IN_CAPTION}function LD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=q.IN_COLUMN_GROUP}function FD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ne.COLGROUP,g.COLGROUP),e.insertionMode=q.IN_COLUMN_GROUP,td(e,t)}function _D(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Ee.HTML),e.insertionMode=q.IN_TABLE_BODY}function BD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ne.TBODY,g.TBODY),e.insertionMode=q.IN_TABLE_BODY,gl(e,t)}function jD(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $D(e,t){vg(t)?e._appendElement(t,Ee.HTML):Ai(e,t),t.ackSelfClosing=!0}function HD(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Ee.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Qo(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{BD(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Gn(e,t);break}case g.COL:{FD(e,t);break}case g.FORM:{HD(e,t);break}case g.TABLE:{jD(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{_D(e,t);break}case g.INPUT:{$D(e,t);break}case g.CAPTION:{ND(e,t);break}case g.COLGROUP:{LD(e,t);break}default:Ai(e,t)}}function fi(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Co(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ai(e,t)}}function Ai(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,hl(e,t),e.fosterParentingEnabled=n}function Dg(e,t){e.pendingCharacterTokens.push(t)}function wg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ai(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ag=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function UD(e,t){const n=t.tagID;Ag.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,Qo(e,t)):rn(e,t)}function zD(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,n===g.TABLE&&fi(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:ml(e,t)}}function td(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.COL:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Gn(e,t);break}default:Ms(e,t)}}function VD(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE);break}case g.TEMPLATE:{Co(e,t);break}case g.COL:break;default:Ms(e,t)}}function Ms(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE,e._processToken(t))}function gl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Ee.HTML),e.insertionMode=q.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(ne.TR,g.TR),e.insertionMode=q.IN_ROW,bl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,Qo(e,t));break}default:Qo(e,t)}}function rc(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,fi(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:fi(e,t)}}function bl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Ee.HTML),e.insertionMode=q.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,gl(e,t));break}default:Qo(e,t)}}function Ig(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,rc(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,rc(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:fi(e,t)}}function WD(e,t){const n=t.tagID;Ag.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),bl(e,t)):rn(e,t)}function qD(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ig(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:ml(e,t)}}function Pg(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Ee.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Gn(e,t);break}}}function Rg(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Co(e,t);break}}}function YD(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Pg(e,t)}function KD(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Rg(e,t)}function GD(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Gn(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=q.IN_TABLE,e.insertionMode=q.IN_TABLE,Qo(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=q.IN_COLUMN_GROUP,e.insertionMode=q.IN_COLUMN_GROUP,td(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=q.IN_TABLE_BODY,e.insertionMode=q.IN_TABLE_BODY,gl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=q.IN_ROW,e.insertionMode=q.IN_ROW,bl(e,t);break}default:e.tmplInsertionModeStack[0]=q.IN_BODY,e.insertionMode=q.IN_BODY,rn(e,t)}}function QD(e,t){t.tagID===g.TEMPLATE&&Co(e,t)}function Mg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ed(e,t)}function XD(e,t){t.tagID===g.HTML?rn(e,t):Os(e,t)}function Og(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=q.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.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 Os(e,t)}function Os(e,t){e.insertionMode=q.IN_BODY,hl(e,t)}function ZD(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.FRAMESET:{e._insertElement(t,Ee.HTML);break}case g.FRAME:{e._appendElement(t,Ee.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Gn(e,t);break}}}function JD(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=q.AFTER_FRAMESET))}function ew(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.NOFRAMES:{Gn(e,t);break}}}function tw(e,t){t.tagID===g.HTML&&(e.insertionMode=q.AFTER_AFTER_FRAMESET)}function nw(e,t){t.tagID===g.HTML?rn(e,t):is(e,t)}function is(e,t){e.insertionMode=q.IN_BODY,hl(e,t)}function rw(e,t){switch(t.tagID){case g.HTML:{rn(e,t);break}case g.NOFRAMES:{Gn(e,t);break}}}function ow(e,t){t.chars=Pt,e._insertCharacters(t)}function aw(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ng(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 iw(e,t){if(C6(t))Ng(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Ee.MATHML?bg(t):r===Ee.SVG&&(T6(t),yg(t)),Zc(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function sw(e,t){if(t.tagID===g.P||t.tagID===g.BR){Ng(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}}}ne.AREA,ne.BASE,ne.BASEFONT,ne.BGSOUND,ne.BR,ne.COL,ne.EMBED,ne.FRAME,ne.HR,ne.IMG,ne.INPUT,ne.KEYGEN,ne.LINK,ne.META,ne.PARAM,ne.SOURCE,ne.TRACK,ne.WBR;const lw=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,uw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Pp={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Lg(e,t){const n=xw(e),r=pl("type",{handlers:{root:cw,element:dw,text:fw,comment:_g,doctype:pw,raw:mw},unknown:gw}),o={parser:n?new wp(Pp):wp.getFragmentParser(void 0,Pp),handle(s){r(s,o)},stitches:!1,options:t||{}};r(e,o),da(o,cr());const a=n?o.parser.document:o.parser.getFragment(),i=dk(a,{file:o.options.file});return o.stitches&&fn(i,"comment",function(s,l,u){const d=s;if(d.value.stitch&&u&&l!==void 0){const f=u.children;return f[l]=d.value.stitch,l}}),i.type==="root"&&i.children.length===1&&i.children[0].type===e.type?i.children[0]:i}function Fg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function cw(e,t){Fg(e.children,t)}function dw(e,t){bw(e,t),Fg(e.children,t),yw(e,t)}function fw(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ze.CHARACTER,chars:e.value,location:Ii(e)};da(t,cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function pw(e,t){const n={type:Ze.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ii(e)};da(t,cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function hw(e,t){t.stitches=!0;const n=Ew(e);if("children"in e&&"children"in n){const r=Lg({type:"root",children:e.children},t.options);n.children=r.children}_g({type:"comment",value:{stitch:n}},t)}function _g(e,t){const n=e.value,r={type:Ze.COMMENT,data:n,location:Ii(e)};da(t,cr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function mw(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,Bg(t,cr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(lw,"&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 gw(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))hw(n,t);else{let r="";throw uw.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 da(e,t){Bg(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 Bg(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 bw(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Bt.PLAINTEXT)return;da(t,cr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:ro.html;o===ro.html&&n==="svg"&&(o=ro.svg);const a=Dk({...e,children:[]},{space:o===ro.svg?"svg":"html"}),i={type:Ze.START_TAG,tagName:n,tagID:ca(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ii(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function yw(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&sg.includes(n)||t.parser.tokenizer.state===Bt.PLAINTEXT)return;da(t,sl(e));const r={type:Ze.END_TAG,tagName:n,tagID:ca(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ii(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 xw(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ii(e){const t=cr(e)||{line:void 0,column:void 0,offset:void 0},n=sl(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 Ew(e){return"children"in e?po({...e,children:[]}):po(e)}function Cw(e){return function(t,n){return Lg(t,{...e,file:n})}}const Tw=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,vw=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,Sw=({legacyTitle:e=!1,tagName:t="div"}={})=>n=>{fn(n,"blockquote",(r,o,a)=>{let i="",s="",l=!0,u=r.children.map(d=>{if(l&&d.type==="paragraph"){const f=d.children[0],h=f.type==="text"?f.value:"",p=e?vw:Tw,m=h.match(p);if(m&&(l=!1,i=m[1].toLocaleLowerCase(),s=e&&m[2]||i.toLocaleUpperCase(),h.includes(`
51
+ `)&&(d.children[0]={type:"text",value:h.replace(p,"").replace(/^\n+/,"")}),!h.includes(`
52
+ `))){const b=[];d.children.forEach((y,x)=>{x!=0&&(x==1&&y.type==="break"||b.push(y))}),d.children=[...b]}}return d});i&&(r.data={hName:t,hProperties:{class:`markdown-alert markdown-alert-${i}`,dir:"auto"}},u.unshift({type:"paragraph",children:[kw(i),{type:"text",value:s.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...u]})};function kw(e){let t=Dw[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 Dw={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 ww(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 jg(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?jg(t.parentElement):null}function Aw(e){var t=n=>{var r=jg(n.target);r&&(r.classList.add("active"),ww(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};z.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 Iw=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],Pw=e=>e;const Rw=z.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:o,style:a,disableCopy:i=!1,skipHtml:s=!0,onScroll:l,onMouseOver:u,pluginsFilter:d,wrapperElement:f={},warpperElement:h={},urlTransform:p}=e,m=Ue(e,Iw),b=z.useRef(null);z.useImperativeHandle(t,()=>Y({},e,{mdp:b}),[b,e]);var y=(n||"")+" "+(r||"");Aw(b);var x=[...m.rehypePlugins||[]],T={allowElement:(S,v,_)=>m.allowElement?m.allowElement(S,v,_):/^[A-Za-z0-9]+$/.test(S.tagName)};s||x.push(Cw);var C=[Sw,...m.remarkPlugins||[],ek],k=Y({},h,f);return c.jsx("div",Y({ref:b,onScroll:l,onMouseOver:u},k,{className:y,style:a,children:c.jsx(Vv,Y({},T,m,{skipHtml:!s,urlTransform:p||Pw,rehypePlugins:d?d("rehype",x):x,remarkPlugins:d?d("remark",C):C,children:o||""}))}))});var ss={},oc={};function Mw(e,t){for(var n=t,r=0;r<e.length;r++){var o=r===e.length-1,a=e.charAt(r),i=n[a]||(n[a]={chars:{}});o&&(i.self=e),n=i.chars}}function Rp(e){if(e.length===0)return ss;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];Mw(o,t)}return t}function Ow(e){if(e.length===0)return oc;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];t[o]=!0}return t}var qi={},Mp={type:"String",optional:!0};function Nw(e){var t={type:"NoArgument",optional:!1};function n(i){if(t.type&&t.type!==i&&t.type!=="NoArgument")throw new Error('Conflicting pseudo-class argument type: "'.concat(t.type,'" vs "').concat(i,'".'));t.type=i}for(var r=0,o=e;r<o.length;r++){var a=o[r];a==="NoArgument"&&(t.optional=!0),a==="Formula"&&n("Formula"),a==="FormulaOfSelector"&&(n("Formula"),t.ofSelector=!0),a==="String"&&n("String"),a==="Selector"&&n("Selector")}return t}function Lw(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var o=r[n],a=e[o];if(a)for(var i=0,s=a;i<s.length;i++){var l=s[i];(t[l]||(t[l]=[])).push(o)}}return t}function Op(e){for(var t=Lw(e),n={},r=0,o=Object.keys(t);r<o.length;r++){var a=o[r],i=t[a];i&&(n[a]=Nw(i))}return n}var Xo=function(){return Xo=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},Xo.apply(this,arguments)},Fw={},ac={wildcard:!0};function _w(e){return e?typeof e=="boolean"?ac:e:Fw}function Bw(e,t){return function(n,r){return t(e(n),e(r))}}function jw(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 Np(e,t){return function(n,r){return r===!0?e:t(n===!0?e:n,r)}}function Oo(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=Xo({},t),o=0,a=Object.entries(n);o<a.length;o++){var i=a[o],s=i[0],l=i[1];if(s!=="latest"){var u=e[s];r[s]=u(t[s],l)}}return r}}function gr(e,t){return t!==void 0?t:e}function Yi(e,t){return t?e?e.concat(t):t:e}function Lp(e,t){if(!t)return e;if(!e)return t;for(var n=Xo({},e),r=0,o=Object.entries(t);r<o.length;r++){var a=o[r],i=a[0],s=a[1];if(!s){delete n[i];continue}var l=e[i];if(!l){n[i]=s;continue}n[i]=l.concat(s)}return n}var lo=jw(Oo({baseSyntax:gr,modules:Yi,tag:Np(ac,Oo({wildcard:gr})),ids:gr,classNames:gr,namespace:Np(ac,Oo({wildcard:gr})),combinators:Yi,attributes:Oo({operators:Yi,caseSensitivityModifiers:Yi,unknownCaseSensitivityModifiers:gr}),pseudoClasses:Oo({unknown:gr,definitions:Lp}),pseudoElements:Oo({unknown:gr,notation:gr,definitions:Bw(function(e){return Array.isArray(e)?{NoArgument:e}:e},Lp)})})),$g={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},Hg=lo($g,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),ic=lo(Hg,{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"]}}}),Ug=lo(ic,{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"]}}}),Ns={"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"]}}}},zg=Xo(Xo({},Ug),{modules:Object.entries(Ns).filter(function(e){var t=e[1].latest;return t}).map(function(e){var t=e[0];return t})}),$w=lo(zg,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}}),sc={css1:$g,css2:Hg,css3:ic,"selectors-3":ic,"selectors-4":Ug,latest:zg,progressive:$w};function Hw(){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],a=sc[o];if(a.pseudoClasses&&typeof a.pseudoClasses=="object"){var i=a.pseudoClasses.definitions;if(i)for(var s=0,l=Object.entries(i);s<l.length;s++)for(var u=l[s],d=u[1],f=0,h=d;f<h.length;f++){var p=h[f];e.pseudoClasses[p]||(e.pseudoClasses[p]=[]),e.pseudoClasses[p].includes(o)||e.pseudoClasses[p].push(o)}}if(a.pseudoElements&&typeof a.pseudoElements=="object"){var i=a.pseudoElements.definitions;if(i)if(Array.isArray(i))for(var m=0,b=i;m<b.length;m++){var y=b[m];e.pseudoElements[y]||(e.pseudoElements[y]=[]),e.pseudoElements[y].includes(o)||e.pseudoElements[y].push(o)}else for(var x=0,T=Object.values(i);x<T.length;x++)for(var d=T[x],C=0,k=d;C<k.length;C++){var S=k[C];e.pseudoElements[S]||(e.pseudoElements[S]=[]),e.pseudoElements[S].includes(o)||e.pseudoElements[S].push(o)}}}for(var v=0,_=Object.entries(Ns);v<_.length;v++){var O=_[v],B=O[0],R=O[1];if(R.pseudoClasses&&typeof R.pseudoClasses=="object"){var i=R.pseudoClasses.definitions;if(i)for(var L=0,E=Object.values(i);L<E.length;L++)for(var d=E[L],N=0,w=d;N<w.length;N++){var A=w[N];e.pseudoClasses[A]||(e.pseudoClasses[A]=[]),e.pseudoClasses[A].includes(B)||e.pseudoClasses[A].push(B)}}if(R.pseudoElements&&typeof R.pseudoElements=="object"){var i=R.pseudoElements.definitions;if(i)if(Array.isArray(i))for(var M=0,W=i;M<W.length;M++){var H=W[M];e.pseudoElements[H]||(e.pseudoElements[H]=[]),e.pseudoElements[H].includes(B)||e.pseudoElements[H].push(B)}else for(var $=0,D=Object.values(i);$<D.length;$++)for(var d=D[$],V=0,Q=d;V<Q.length;V++){var F=Q[V];e.pseudoElements[F]||(e.pseudoElements[F]=[]),e.pseudoElements[F].includes(B)||e.pseudoElements[F].push(B)}}}return e}var Fp=Hw();function Aa(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="-"||e==="_"||e==="\\"||e>=" "}function _p(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="-"||e==="_"||e>=" "}function Ia(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var Uw={" ":!0," ":!0,"\n":!0,"\r":!0,"\f":!0},zw={'"':!0,"'":!0},du={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},Vw=6,fu="css-selector-parser parse error: ";function Ww(e){e===void 0&&(e={});var t=e.syntax,n=t===void 0?"latest":t,r=e.substitutes,o=e.strict,a=o===void 0?!0:o,i=e.modules,s=typeof n=="object"?n:sc[n];if(s.baseSyntax&&(s=lo(sc[s.baseSyntax],s)),s.modules&&s.modules.length>0)for(var l=0,u=s.modules;l<u.length;l++){var d=u[l],f=Ns[d];f&&(s=lo(f,s))}if(i&&i.length>0)for(var h=0,p=i;h<p.length;h++){var m=p[h],f=Ns[m];f&&(s=lo(f,s))}var b=s.tag?[!0,!!_w(s.tag).wildcard]:[!1,!1],y=b[0],x=b[1],T=!!s.ids,C=!!s.classNames,k=!!s.namespace,S=s.namespace&&(s.namespace===!0||s.namespace.wildcard===!0);if(k&&!y)throw new Error("".concat(fu,"Namespaces cannot be enabled while tags are disabled."));var v=!!r,_=s.combinators?Rp(s.combinators):ss,O=s.attributes?[!0,s.attributes.operators?Rp(s.attributes.operators):ss,s.attributes.caseSensitivityModifiers?Ow(s.attributes.caseSensitivityModifiers):oc,s.attributes.unknownCaseSensitivityModifiers==="accept"]:[!1,ss,oc,!1],B=O[0],R=O[1],L=O[2],E=O[3],N=E||Object.keys(L).length>0,w=s.pseudoClasses?[!0,s.pseudoClasses.definitions?Op(s.pseudoClasses.definitions):qi,s.pseudoClasses.unknown==="accept"]:[!1,qi,!1],A=w[0],M=w[1],W=w[2],H=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?Op(Array.isArray(s.pseudoElements.definitions)?{NoArgument:s.pseudoElements.definitions}:s.pseudoElements.definitions):qi,s.pseudoElements.unknown==="accept"]:[!1,!1,!1,qi,!1],$=H[0],D=H[1],V=H[2],Q=H[3],F=H[4],fe="",J=fe.length,X=0,ee="",K=function(ae){return ee===ae},te=function(){return K("*")||Aa(ee)},oe=function(ae){X=ae,ee=fe.charAt(X)},re=function(){X++,ee=fe.charAt(X)},pe=function(){var ae=ee;return X++,ee=fe.charAt(X),ae};function G(ae){var ye=Math.min(J-1,X),Re=new Error("".concat(fu).concat(ae," Pos: ").concat(ye,"."));throw Re.position=ye,Re.name="ParserError",Re}function Z(ae,ye){if(!ae)return G(ye)}var xe=function(){Z(X<J,"Unexpected end of input.")},de=function(){return X>=J},be=function(ae){Z(X<J,'Expected "'.concat(ae,'" but end of input reached.')),Z(ee===ae,'Expected "'.concat(ae,'" but "').concat(ee,'" found.')),X++,ee=fe.charAt(X)};function ie(ae){var ye=Ae(ae,X);if(ye)return X+=ye.length,ee=fe.charAt(X),ye}function Ae(ae,ye){var Re=fe.charAt(ye),Fe=ae[Re];if(Fe){var We=Ae(Fe.chars,ye+1);if(We)return We;if(Fe.self)return Fe.self}}function ve(){for(var ae=pe(),ye=1;Ia(ee)&&ye<Vw;)ae+=pe(),ye++;return rt(),String.fromCharCode(parseInt(ae,16))}function Ve(ae){var ye="";for(be(ae);X<J;){if(K(ae))return re(),ye;K("\\")?(re(),K(ae)?(ye+=ae,re()):ee===`
53
+ `||ee==="\f"?re():ee==="\r"?(re(),K(`
54
+ `)&&re()):Ia(ee)?ye+=ve():(ye+=ee,re())):(ye+=ee,re())}return ye}function we(){if(!Aa(ee))return null;for(var ae="";K("-");)ae+=ee,re();for(ae==="-"&&!_p(ee)&&!K("\\")&&G("Identifiers cannot consist of a single hyphen."),a&&ae.length>=2&&G("Identifiers cannot start with two hyphens with strict mode on."),du[ee]&&G("Identifiers cannot start with hyphens followed by digits.");X<J;)if(_p(ee))ae+=pe();else if(K("\\"))re(),xe(),Ia(ee)?ae+=ve():ae+=pe();else break;return ae}function At(){for(var ae="";X<J&&!K(")");)if(K("\\")){if(re(),de()&&!a)return(ae+"\\").trim();xe(),Ia(ee)?ae+=ve():ae+=pe()}else ae+=pe();return ae.trim()}function rt(){if(ee===" "||ee===" "||ee==="\f"||ee===`
55
+ `){re();return}ee==="\r"&&re(),ee===`
56
+ `&&re()}function Ye(){for(;Uw[ee];)re()}function le(ae){ae===void 0&&(ae=!1),Ye();for(var ye=[pt(ae)];K(",");)re(),Ye(),ye.push(pt(ae));return{type:"Selector",rules:ye}}function Ce(){be("["),Ye();var ae;if(K("|")){Z(k,"Namespaces are not enabled."),re();var ye=we();Z(ye,"Expected attribute name."),ae={type:"Attribute",name:ye,namespace:{type:"NoNamespace"}}}else if(K("*")){Z(k,"Namespaces are not enabled."),Z(S,"Wildcard namespace is not enabled."),re(),be("|");var Re=we();Z(Re,"Expected attribute name."),ae={type:"Attribute",name:Re,namespace:{type:"WildcardNamespace"}}}else{var Fe=we();if(Z(Fe,"Expected attribute name."),ae={type:"Attribute",name:Fe},K("|")){var We=X;if(re(),Aa(ee)){Z(k,"Namespaces are not enabled.");var Tt=we();Z(Tt,"Expected attribute name."),ae={type:"Attribute",name:Tt,namespace:{type:"NamespaceName",name:Fe}}}else oe(We)}}if(Z(ae.name,"Expected attribute name."),Ye(),de()&&!a)return ae;if(K("]"))re();else{if(ae.operator=ie(R),Z(ae.operator,"Expected a valid attribute selector operator."),Ye(),xe(),zw[ee])ae.value={type:"String",value:Ve(ee)};else if(v&&K("$")){re();var Mt=we();Z(Mt,"Expected substitute name."),ae.value={type:"Substitution",name:Mt}}else{var gt=we();Z(gt,"Expected attribute value."),ae.value={type:"String",value:gt}}if(Ye(),de()&&!a)return ae;if(!K("]")){var Ut=we();if(Z(Ut,"Expected end of attribute selector."),ae.caseSensitivityModifier=Ut,Z(N,"Attribute case sensitivity modifiers are not enabled."),Z(E||L[ae.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),Ye(),de()&&!a)return ae}be("]")}return ae}function Oe(){for(var ae="";du[ee];)ae+=pe();return Z(ae!=="","Formula parse error."),parseInt(ae)}var He=function(){return K("-")||K("+")||du[ee]};function je(){if(K("e")||K("o")){var ae=we();if(ae==="even")return Ye(),[2,0];if(ae==="odd")return Ye(),[2,1]}var ye=null,Re=1;if(K("-")&&(re(),Re=-1),He()&&(K("+")&&re(),ye=Oe(),!K("\\")&&!K("n")))return[0,ye*Re];ye===null&&(ye=1),ye*=Re;var Fe;if(K("\\")?(re(),Ia(ee)?Fe=ve():Fe=pe()):Fe=pe(),Z(Fe==="n",'Formula parse error: expected "n".'),Ye(),K("+")||K("-")){var We=K("+")?1:-1;return re(),Ye(),[ye,We*Oe()]}else return[ye,0]}function Ne(ae,ye,Re){var Fe;if(K("(")){if(re(),Ye(),v&&K("$")){re();var We=we();Z(We,"Expected substitute name."),Fe={type:"Substitution",name:We}}else if(Re.type==="String")Fe={type:"String",value:At()},Z(Fe.value,"Expected ".concat(ye," argument value."));else if(Re.type==="Selector")Fe=le(!0);else if(Re.type==="Formula"){var Tt=je(),Mt=Tt[0],gt=Tt[1];if(Fe={type:"Formula",a:Mt,b:gt},Re.ofSelector&&(Ye(),K("o")||K("\\"))){var Ut=we();Z(Ut==="of","Formula of selector parse error."),Ye(),Fe={type:"FormulaOfSelector",a:Mt,b:gt,selector:pt()}}}else return G("Invalid ".concat(ye," signature."));if(Ye(),de()&&!a)return Fe;be(")")}else Z(Re.optional,"Argument is required for ".concat(ye,' "').concat(ae,'".'));return Fe}function ot(){if(K("*"))return Z(x,"Wildcard tag name is not enabled."),re(),{type:"WildcardTag"};if(Aa(ee)){Z(y,"Tag names are not enabled.");var ae=we();return Z(ae,"Expected tag name."),{type:"TagName",name:ae}}else return G("Expected tag name.")}function xt(){if(K("*")){var ae=X;if(re(),!K("|")||(re(),!te()))return oe(ae),ot();Z(k,"Namespaces are not enabled."),Z(S,"Wildcard namespace is not enabled.");var ye=ot();return ye.namespace={type:"WildcardNamespace"},ye}else if(K("|")){Z(k,"Namespaces are not enabled."),re();var ye=ot();return ye.namespace={type:"NoNamespace"},ye}else if(Aa(ee)){var Re=we();if(Z(Re,"Expected tag name."),!K("|"))return Z(y,"Tag names are not enabled."),{type:"TagName",name:Re};var ae=X;if(re(),!te())return oe(ae),{type:"TagName",name:Re};Z(k,"Namespaces are not enabled.");var ye=ot();return ye.namespace={type:"NamespaceName",name:Re},ye}else return G("Expected tag name.")}function pt(ae){var ye,Re;ae===void 0&&(ae=!1);var Fe={type:"Rule",items:[]};if(ae){var We=ie(_);We&&(Fe.combinator=We,Ye())}for(;X<J;)if(te())Z(Fe.items.length===0,"Unexpected tag/namespace start."),Fe.items.push(xt());else if(K("|")){var Tt=X;if(re(),te())Z(Fe.items.length===0,"Unexpected tag/namespace start."),oe(Tt),Fe.items.push(xt());else{oe(Tt);break}}else if(K(".")){Z(C,"Class names are not enabled."),re();var Mt=we();Z(Mt,"Expected class name."),Fe.items.push({type:"ClassName",name:Mt})}else if(K("#")){Z(T,"IDs are not enabled."),re();var gt=we();Z(gt,"Expected ID name."),Fe.items.push({type:"Id",name:gt})}else if(K("["))Z(B,"Attributes are not enabled."),Fe.items.push(Ce());else if(K(":")){var Ut=!1,wn=!1;re(),K(":")&&(Z($,"Pseudo elements are not enabled."),Z(V,"Pseudo elements double colon notation is not enabled."),Ut=!0,re());var vt=we();if(Z(Ut||vt,"Expected pseudo-class name."),Z(!Ut||vt,"Expected pseudo-element name."),Z(vt,"Expected pseudo-class name."),!(!Ut||F||Object.prototype.hasOwnProperty.call(Q,vt))){var Zt=Fp.pseudoElements[vt],pr='Unknown pseudo-element "'.concat(vt,'"');Zt&&Zt.length>0&&(pr+=". It is defined in: ".concat(Zt.join(", "))),G(pr+".")}if(wn=$&&(Ut||!Ut&&D&&Object.prototype.hasOwnProperty.call(Q,vt)),wn){var An=(ye=Q[vt])!==null&&ye!==void 0?ye:F&&Mp,Yr={type:"PseudoElement",name:vt},Un=Ne(vt,"pseudo-element",An);Un&&(Z(Un.type!=="Formula"&&Un.type!=="FormulaOfSelector","Pseudo-elements cannot have formula argument."),Yr.argument=Un),Fe.items.push(Yr)}else{Z(A,"Pseudo-classes are not enabled.");var An=(Re=M[vt])!==null&&Re!==void 0?Re:W&&Mp;if(!An){var Zt=Fp.pseudoClasses[vt],pr='Unknown pseudo-class: "'.concat(vt,'"');Zt&&Zt.length>0&&(pr+=". It is defined in: ".concat(Zt.join(", "))),G(pr+".")}var Un=Ne(vt,"pseudo-class",An),hr={type:"PseudoClass",name:vt};Un&&(hr.argument=Un),Fe.items.push(hr)}}else break;if(Fe.items.length===0)return de()?G("Expected rule but end of input reached."):G('Expected rule but "'.concat(ee,'" found.'));if(Ye(),!de()&&!K(",")&&!K(")")){var We=ie(_);Ye(),Fe.nestedRule=pt(),Fe.nestedRule.combinator=We}return Fe}return function(ae){if(typeof ae!="string")throw new Error("".concat(fu,"Expected string input."));return fe=ae,J=fe.length,X=0,ee=fe.charAt(0),le()}}const qw=Ww({syntax:"selectors-4"});function Yw(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return qw(e)}const Vg="֑-߿יִ-﷽ﹰ-ﻼ",Wg="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Kw=new RegExp("^[^"+Wg+"]*["+Vg+"]"),Gw=new RegExp("^[^"+Vg+"]*["+Wg+"]");function Qw(e){const t=String(e||"");return Kw.test(t)?"rtl":Gw.test(t)?"ltr":"neutral"}function qg(e){return"children"in e?Yg(e):"value"in e?e.value:""}function Xw(e){return e.type==="text"?e.value:"children"in e?Yg(e):""}function Yg(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=Xw(e.children[t]);return n.join("")}function Zw(e,t){const n=e.schema,r=e.language,o=e.direction,a=e.editableOrEditingHost;let i;if(t.type==="element"){const u=t.properties.xmlLang||t.properties.lang,d=t.properties.type||"text",f=Bp(t);u!=null&&(e.language=String(u)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=zr),f==="rtl"?i=f:f==="ltr"||f!=="auto"&&t.tagName==="html"||f!=="auto"&&t.tagName==="input"&&d==="tel"?i="ltr":(f==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?i=pu(qg(t)):t.tagName==="input"&&(d==="email"||d==="search"||d==="tel"||d==="text")?i=t.properties.value?pu(String(t.properties.value)):"ltr":fn(t,l)),i&&(e.direction=i)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return s;function s(){e.schema=n,e.language=r,e.direction=o,e.editableOrEditingHost=a}function l(u){if(u.type==="text")return i=pu(u.value),i?Is:void 0;if(u!==t&&u.type==="element"&&(u.tagName==="bdi"||u.tagName==="script"||u.tagName==="style"||u.tagName==="textare"||Bp(u)))return Ka}}function pu(e){const t=Qw(e);return t==="neutral"?void 0:t}function Bp(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 Jw(e,t,n){const r=Si(n,e.name),o=t.properties[r.property];let a=eA(o,r);if(!e.value)return a!==void 0;e.value.type;let i=e.value.value;if(e.caseSensitivityModifier==="i"&&(i=i.toLowerCase(),a&&(a=a.toLowerCase())),a!==void 0)switch(e.operator){case"=":return i===a;case"$=":return i===a.slice(-i.length);case"*=":return a.includes(i);case"^=":return i===a.slice(0,i.length);case"|=":return i===a||i===a.slice(0,i.length)&&a.charAt(i.length)==="-";case"~=":return i===a||Uu(a).includes(i)}return!1}function eA(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?al:il)(e)}else return String(e)}const tA=[];function nA(e,t){return(t.properties.className||tA).includes(e.name)}function rA(e,t){return t.properties.id===e.name}function oA(e,t){return e.name===t.tagName}function aA(e,t){return function(n,r){let o=jp(n,"tag");const a=jp(r??"*","range"),i=[];let s=-1;for(;++s<a.length;){const l=a[s].toLowerCase();if(!t&&l==="*")continue;let u=-1;const d=[];for(;++u<o.length;)if(e(o[u].toLowerCase(),l)){if(!t)return o[u];i.push(o[u])}else d.push(o[u]);o=d}return t?i:void 0}}const iA=aA(function(e,t){const n=e.split("-"),r=t.split("-");let o=0,a=0;if(r[a]!=="*"&&n[o]!==r[a])return!1;for(o++,a++;a<r.length;){if(r[a]==="*"){a++;continue}if(!n[o])return!1;if(n[o]===r[a]){o++,a++;continue}if(n[o].length===1)return!1;o++}return!0},!0);function jp(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 sA={}.hasOwnProperty;function ho(e,t){const n=e.type==="element"&&sA.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}const lA=new Set([9,10,12,13,32]),$p=48,uA=57;function cA(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=a(),o=i();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(o??1),s(),t<e.length?(r=a(),s(),o=i()):r=o=0),o===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*o];function a(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function i(){const l=t;let u=0;for(;t<e.length&&e.charCodeAt(t)>=$p&&e.charCodeAt(t)<=uA;)u=u*10+(e.charCodeAt(t)-$p),t++;return t===l?null:u}function s(){for(;t<e.length&&lA.has(e.charCodeAt(t));)t++}}var hu,Hp;function dA(){return Hp||(Hp=1,hu={trueFunc:function(){return!0},falseFunc:function(){return!1}}),hu}var fA=dA();const Up=qn(fA);function pA(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return Up.falseFunc;if(t===-1)return a=>a<=n;if(t===0)return a=>a===n;if(t===1)return n<0?Up.trueFunc:a=>a>=n;const r=Math.abs(t),o=(n%r+r)%r;return t>1?a=>a>=n&&a%r===o:a=>a<=n&&a%r===o}function zp(e){return pA(cA(e))}const hA=zp.default||zp,mA=pl("name",{handlers:{"any-link":gA,blank:bA,checked:yA,dir:xA,disabled:Kg,empty:EA,enabled:CA,"first-child":TA,"first-of-type":vA,has:SA,is:Gg,lang:DA,"last-child":wA,"last-of-type":AA,not:IA,"nth-child":PA,"nth-last-child":RA,"nth-last-of-type":MA,"nth-of-type":OA,"only-child":NA,"only-of-type":LA,optional:FA,"read-only":_A,"read-write":Qg,required:Xg,root:BA,scope:jA},invalid:kA,unknown:$A});function gA(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&ho(t,"href")}function fr(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function bA(e,t){return!Zg(t,n);function n(r){return r.type==="element"||r.type==="text"&&!Oc(r)}}function yA(e,t){return t.tagName==="input"||t.tagName==="menuitem"?!!((t.properties.type==="checkbox"||t.properties.type==="radio")&&ho(t,"checked")):t.tagName==="option"?ho(t,"selected"):!1}function xA(e,t,n,r,o){return e.argument,e.argument.type,o.direction===e.argument.value}function Kg(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")&&ho(t,"disabled")}function EA(e,t){return!Zg(t,n);function n(r){return r.type==="element"||r.type==="text"}}function CA(e,t){return!Kg(e,t)}function TA(e,t,n,r,o){return fr(o,e),o.elementIndex===0}function vA(e,t,n,r,o){return fr(o,e),o.typeIndex===0}function yl(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=hA(n.a+"n+"+n.b),e._cachedFn=t}return t}function SA(e,t,n,r,o){e.argument,e.argument.type;const a={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return nd(a,{type:"root",children:t.children}),a.results.length>0}function kA(){}function Gg(e,t,n,r,o){e.argument,e.argument.type;const a={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return nd(a,t),a.results[0]===t}function DA(e,t,n,r,o){return e.argument,e.argument.type,o.language!==""&&o.language!==void 0&&iA(o.language,ju(e.argument.value)).length>0}function wA(e,t,n,r,o){return fr(o,e),!!(o.elementCount&&o.elementIndex===o.elementCount-1)}function AA(e,t,n,r,o){return fr(o,e),typeof o.typeIndex=="number"&&typeof o.typeCount=="number"&&o.typeIndex===o.typeCount-1}function IA(e,t,n,r,o){return!Gg(e,t,n,r,o)}function PA(e,t,n,r,o){const a=yl(e);return fr(o,e),typeof o.elementIndex=="number"&&a(o.elementIndex)}function RA(e,t,n,r,o){const a=yl(e);return fr(o,e),!!(typeof o.elementCount=="number"&&typeof o.elementIndex=="number"&&a(o.elementCount-o.elementIndex-1))}function MA(e,t,n,r,o){const a=yl(e);return fr(o,e),typeof o.typeCount=="number"&&typeof o.typeIndex=="number"&&a(o.typeCount-1-o.typeIndex)}function OA(e,t,n,r,o){const a=yl(e);return fr(o,e),typeof o.typeIndex=="number"&&a(o.typeIndex)}function NA(e,t,n,r,o){return fr(o,e),o.elementCount===1}function LA(e,t,n,r,o){return fr(o,e),o.typeCount===1}function FA(e,t){return!Xg(e,t)}function _A(e,t,n,r,o){return!Qg(e,t,n,r,o)}function Qg(e,t,n,r,o){return t.tagName==="input"||t.tagName==="textarea"?!ho(t,"readOnly")&&!ho(t,"disabled"):!!o.editableOrEditingHost}function Xg(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&ho(t,"required")}function BA(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 jA(e,t,n,r,o){return o.scopeElements.includes(t)}function Zg(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 HA(e,t,n,r,o){for(const a of e.items)if(a.type==="Attribute"){if(!Jw(a,t,o.schema))return!1}else if(a.type==="Id"){if(!rA(a,t))return!1}else if(a.type==="ClassName"){if(!nA(a,t))return!1}else if(a.type==="PseudoClass"){if(!mA(a,t,n,r,o))return!1}else{if(a.type==="PseudoElement")throw new Error("Invalid selector: `::"+a.name+"`");if(a.type==="TagName"&&!oA(a,t))return!1}return!0}const UA=[];function nd(e,t){t&&Jg(e,[],t,void 0,void 0,t)}function mu(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function zA(e,t,n,r){const o=ls(t.descendant,t.directChild);let a,i=-1;const s={count:0,types:new Map},l={count:0,types:new Map};for(;++i<n.children.length;)Vp(s,n.children[i]);for(i=-1;++i<n.children.length;){const u=n.children[i],d=u.type==="element"?u.tagName.toUpperCase():void 0;if(e.elementIndex=l.count,e.typeIndex=d&&l.types.get(d)||0,e.elementCount=s.count,e.typeCount=d?s.types.get(d):0,"children"in u){const f=ls(o,a),h=Jg(e,f,n.children[i],i,n,r);a=ls(h.generalSibling,h.adjacentSibling)}if(e.one&&e.found)break;Vp(l,n.children[i])}}function VA(e,t,n,r,o){const a={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};let i=-1;for(;++i<t.length;){const s=t[i];if(e.one&&e.found)break;if(e.shallow&&s.nestedRule)throw new Error("Expected selector without nesting");if(HA(s,n,r,o,e)){const l=s.nestedRule;if(l){const u=l.combinator==="+"?"adjacentSibling":l.combinator==="~"?"generalSibling":l.combinator===">"?"directChild":"descendant";mu(a,u,l)}else e.found=!0,e.results.includes(n)||e.results.push(n)}s.combinator===void 0?mu(a,"descendant",s):s.combinator==="~"&&mu(a,"generalSibling",s)}return a}function ls(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:UA}function Vp(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 Jg(e,t,n,r,o,a){let i={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};const s=Zw(e,n);if(n.type==="element"){let l=e.rootQuery.rules;o&&o!==a&&(l=e.rootQuery.rules.filter(u=>u.combinator===void 0||u.combinator===">"&&o===a)),i=VA(e,ls(t,l),n,r,o)}return"children"in n&&!e.shallow&&!(e.one&&e.found)&&zA(e,i,n,a),s(),i}function WA(e,t,n){const r=qA(e,t);return nd(r,t||void 0),r.results}function qA(e,t,n){return{direction:"ltr",editableOrEditingHost:!1,elementCount:void 0,elementIndex:void 0,found:!1,language:void 0,one:!1,results:[],rootQuery:Yw(e),schema:ia,scopeElements:t?t.type==="root"?t.children:[t]:[],shallow:!1,typeIndex:void 0,typeCount:void 0}}const e1=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=e1(n.children))}),t),YA=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const o=WA(t,r);o&&o.length>0&&fn(r,o,(a,i,s)=>{n(a,i,s)});return}fn(r,(o,a,i)=>{n(o,a,i)})}}},KA=(e="")=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce((t,n)=>(t[n.slice(0,n.indexOf("="))]=n.slice(n.indexOf("=")+1),t),{}),GA=(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]}},t1=(e=[],t,n,r)=>{let o=t;for(;o<e.length;)if(o++,n){const a=e[o];if(a&&a.value&&a.value.replace(/(\n|\s)/g,"")!==""||e[o]&&e[o].type==="element")return a.tagName===n?a:void 0}else{const a=e[o];if(!a||a.type==="element"||a.type==="text"&&a.value.replace(/(\n|\s)/g,"")!=="")return;if(a.type&&/^(comment|raw)$/ig.test(a.type))return a.value&&!/^rehype:/.test(a.value.replace(/^(\s+)?<!--(.*?)-->/,"$2")||"")?void 0:r?t1(e,o,"pre",r)?void 0:(a.value=(a.value||"").replace(/^(\n|\s)+/,""),a):(a.value=(a.value||"").replace(/^(\n|\s)+/,""),a)}},Wp=({value:e=""})=>{const t=KA(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},qp=(e,t,n)=>n==="string"?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:n==="attr"?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},QA=(e={})=>{const{properties:t="data",codeBlockParames:n=!0}=e;return r=>{fn(r,"element",(o,a,i)=>{if(n&&o.tagName==="pre"&&o&&Array.isArray(o.children)&&i&&Array.isArray(i.children)&&i.children.length>1){const s=o.children[0];if(s&&s.tagName==="code"&&typeof a=="number"){const l=GA(i.children,a);if(l){const u=Wp(l);Object.keys(u).length>0&&(o.properties={...o.properties,"data-type":"rehyp"},s.properties=qp(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)&&i&&Array.isArray(i.children)&&typeof a=="number"){const s=t1(i.children,a,"",n);if(s){const l=Wp(s);Object.keys(l).length>0&&(o.properties=qp(o.properties,l,t))}}})}};var XA=function(t){return n=>{fn(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=Y({},r.properties,{"data-meta":String(r.data.meta)}))})}},ZA=function(t){return n=>{fn(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 JA=/[\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,e5=Object.hasOwnProperty;class t5{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let o=n5(t,n===!0);const a=o;for(;e5.call(r.occurrences,o);)r.occurrences[a]++,o=a+"-"+r.occurrences[a];return r.occurrences[o]=0,o}reset(){this.occurrences=Object.create(null)}}function n5(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(JA,"").replace(/ /g,"-"))}function n1(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 r5={},Yp=new t5;function o5(e){const n=(e||r5).prefix||"";return function(r){Yp.reset(),fn(r,"element",function(o){n1(o)&&!o.properties.id&&(o.properties.id=n+Yp.slug(qg(o)))})}}const r1=(function(e){if(e==null)return s5;if(typeof e=="string")return i5(e);if(typeof e=="object")return a5(e);if(typeof e=="function")return rd(e);throw new Error("Expected function, string, or array as `test`")});function a5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=r1(e[n]);return rd(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function i5(e){return rd(t);function t(n){return n.tagName===e}}function rd(e){return t;function t(n,r,o){return!!(l5(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function s5(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function l5(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Kp={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},u5={};function c5(e){const t=e||u5;let n=t.properties;const r=t.headingProperties,o=t.behavior||"prepend",a=t.content,i=t.group,s=r1(t.test);let l;return o==="after"||o==="before"?l=d:o==="wrap"?l=f:(l=u,n||(n={ariaHidden:"true",tabIndex:-1})),function(h){fn(h,"element",function(p,m,b){if(n1(p)&&p.properties.id&&s(p,m,b))return Object.assign(p.properties,Ki(r,p)),l(p,m,b)})};function u(h){const p=Gp(a||Kp,h);return h.children[o==="prepend"?"unshift":"push"](gu(h,Ki(n,h),p)),[Ka]}function d(h,p,m){if(typeof p!="number"||!m)return;const b=Gp(a||Kp,h),y=gu(h,Ki(n,h),b);let x=o==="before"?[y,h]:[h,y];if(i){const T=o1(i,h);T&&!Array.isArray(T)&&T.type==="element"&&(T.children=x,x=[T])}return m.children.splice(p,1,...x),[Ka,p+x.length]}function f(h){let p=h.children,m=[];return typeof a=="function"?(p=[],m=a(h)):a&&(m=od(a)),h.children=[gu(h,Ki(n,h),Array.isArray(m)?[...p,...m]:[...p,m])],[Ka]}}function od(e){return po(e)}function gu(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function Gp(e,t){const n=o1(e,t);return Array.isArray(n)?n:[n]}function o1(e,t){return typeof e=="function"?e(t):od(e)}function Ki(e,t){return typeof e=="function"?e(t):e?od(e):{}}const d5=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{fn(r,(o,a,i)=>{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 f5={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 p5(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 h5=(e,t)=>(n,r,o)=>{if(n.type==="element"&&o&&o.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var a=n.children&&n.children[0];a&&a.properties&&a.properties.ariaHidden==="true"&&(a.properties=Y({class:"anchor"},a.properties),a.children=[f5])}if(n.type==="element"&&n.tagName==="pre"&&!e){var i=e1(n.children);n.children.push(p5(i))}t&&t(n,r===null?void 0:r,o===null?void 0:o)},m5=[o5,c5,d5];const a1=z.forwardRef((e,t)=>{var n,r=[XA,ZA,...m5,[YA,{rewrite:h5((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[QA,{properties:"attr"}],...e.rehypePlugins||[]];return c.jsx(Rw,Y({},e,{rehypePlugins:r,ref:t}))});function g5(e,t){return Y({},e,t)}var fa=z.createContext({markdown:""});function i1(e,t){return e===void 0&&(e=[]),t===void 0&&(t={}),e.forEach(n=>{n.children&&Array.isArray(n.children)?t=Y({},t,i1(n.children||[])):n.keyCommand&&n.shortcuts&&n.execute&&(t[n.shortcuts.toLocaleLowerCase()]=n)}),t}function s1(e,t,n,r,o){t===void 0&&(t=[]);var a=i1(t||[]),i=[];if(e.altKey&&i.push("alt"),e.shiftKey&&i.push("shift"),e.metaKey&&i.push("cmd"),e.ctrlKey&&i.push("ctrl"),i.length>0&&!/(control|alt|meta|shift)/.test(e.key.toLocaleLowerCase())&&i.push(e.key.toLocaleLowerCase()),/escape/.test(e.key.toLocaleLowerCase())&&i.push("escape"),!(i.length<1)){var s=!!a[i.join("+")],l=s?a[i.join("+")]:void 0;if(Object.keys(a).forEach(u=>{var d=u.split("+").every(f=>/ctrlcmd/.test(f)?i.includes("ctrl")||i.includes("cmd"):i.includes(f));d&&(l=a[u])}),l&&n){e.stopPropagation(),e.preventDefault(),n.executeCommand(l,r,o,i);return}}}var bu;function Qp(e){if(e.nodeName!=="TEXTAREA")return!1;if(typeof bu>"u"){var t=document.createElement("textarea");t.value="1",bu=!!t.firstChild}return bu}function Vo(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,a=e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t);else{var i=document.createRange(),s=document.createTextNode(t);if(Qp(e)){var l=e.firstChild;if(!l)e.appendChild(s);else{for(var u=0,d=null,f=null;l&&(d===null||f===null);){var h=l.nodeValue.length;o>=u&&o<=u+h&&i.setStart(d=l,o-u),a>=u&&a<=u+h&&i.setEnd(f=l,a-u),u+=h,l=l.nextSibling}o!==a&&i.deleteContents()}}if(Qp(e)&&i.commonAncestorContainer.nodeName==="#text")i.insertNode(s);else{var p=e.value;e.value=p.slice(0,o)+t+p.slice(a)}}e.setSelectionRange(o+t.length,o+t.length);var m=document.createEvent("UIEvent");m.initEvent("input",!0,!1),e.dispatchEvent(m)}}function an(e){var{text:t,selection:n,prefix:r,suffix:o=r}=e,a=n;if(t&&t.length&&n.start===n.end&&(a=b5(t,n.start)),a.start>=r.length&&a.end<=t.length-o.length){var i=t.slice(a.start-r.length,a.end+o.length);if(i.startsWith(r)&&i.endsWith(o))return{start:a.start-r.length,end:a.end+o.length}}return a}function ei(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 l1(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 u1(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 b5(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,a=t;a-1>-1;a--)if(n(e[a-1])){r=a;break}for(var i=t;i<e.length;i++)if(n(e[i])){o=i;break}return{start:r,end:o}}function Xt(e){var{api:t,selectedText:n,selection:r,prefix:o,suffix:a=o}=e;n.length>=o.length+a.length&&n.startsWith(o)&&n.endsWith(a)?(t.replaceSelection(n.slice(o.length,a.length?-a.length:void 0)),t.setSelectionRange({start:r.start-o.length,end:r.end-o.length})):(t.replaceSelection(""+o+n+a),t.setSelectionRange({start:r.start+o.length,end:r.end+o.length}))}function ad(e,t){var n=e.split(/\n/),r=0,o=n.map((a,i)=>{if(typeof t=="string")return a.startsWith(t)?(r-=t.length,a.slice(t.length)):(r+=t.length,t+a);if(typeof t=="function"){if(a.startsWith(t(a,i)))return r-=t(a,i).length,a.slice(t(a,i).length);var s=t(a,i);return r+=s.length,t(a,i)+a}throw Error("insertion is expected to be either a string or a function")}).join(`
59
+ `);return{modifiedText:o,insertionLength:r}}var y5={name:"bold",keyCommand:"bold",shortcuts:"ctrlcmd+b",prefix:"**",buttonProps:{"aria-label":"Add bold text (ctrl + b)",title:"Add bold text (ctrl + b)"},icon:c.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 384 512",children:c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},c1={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:c.jsx("svg",{width:"13",height:"13",role:"img",viewBox:"0 0 156 156",children:c.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=an({text:e.text,selection:e.selection,prefix:"```\n",suffix:"\n```"}),r=t.setSelectionRange(n),o="\n```\n",a="\n```\n";r.selectedText.length>=o.length+a.length-2&&r.selectedText.startsWith(o)&&r.selectedText.endsWith(a)?(o="```\n",a="\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)&&(a="\n```"));var i=an({text:e.text,selection:e.selection,prefix:o,suffix:a}),s=t.setSelectionRange(i);Xt({api:t,selectedText:s.selectedText,selection:e.selection,prefix:o,suffix:a})}},x5={name:"code",keyCommand:"code",shortcuts:"ctrlcmd+j",prefix:"`",buttonProps:{"aria-label":"Insert code (ctrl + j)",title:"Insert code (ctrl + j)"},icon:c.jsx("svg",{width:"14",height:"14",role:"img",viewBox:"0 0 640 512",children:c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}else c1.execute(e,t)}},E5={name:"comment",keyCommand:"comment",shortcuts:"ctrlcmd+/",prefix:"<!-- ",suffix:" -->",buttonProps:{"aria-label":"Insert comment (ctrl + /)",title:"Insert comment (ctrl + /)"},icon:c.jsx("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:c.jsxs("g",{fill:"none",fillRule:"evenodd",children:[c.jsx("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),c.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"}),c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},us={keyCommand:"divider"},C5={name:"fullscreen",keyCommand:"fullscreen",shortcuts:"ctrlcmd+0",value:"fullscreen",buttonProps:{"aria-label":"Toggle fullscreen (ctrl + 0)",title:"Toggle fullscreen (ctrl+ 0)"},icon:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:c.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 T5(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var v5=(e,t)=>{var n=Y({children:e,icon:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:c.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=Y({},(T5(r),r));return o.parent=n,Y({},o)})),n},S5={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:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 175 175",children:c.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=an({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)?Xt({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}),Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},k5={name:"image",keyCommand:"image",shortcuts:"ctrlcmd+k",prefix:"![image](",suffix:")",buttonProps:{"aria-label":"Add image (ctrl + k)",title:"Add image (ctrl + k)"},icon:c.jsx("svg",{width:"13",height:"13",viewBox:"0 0 20 20",children:c.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=an({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")?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(n=an({text:e.text,selection:e.selection,prefix:"![",suffix:"]()"}),r=t.setSelectionRange(n),r.selectedText.length===0?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![image",suffix:"](url)"}):Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![",suffix:"]()"}))}},D5={name:"italic",keyCommand:"italic",shortcuts:"ctrlcmd+i",prefix:"*",buttonProps:{"aria-label":"Add italic text (ctrl + i)",title:"Add italic text (ctrl + i)"},icon:c.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},w5={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:c.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 520 520",children:c.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=an({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=an({text:e.text,selection:e.selection,prefix:"[](",suffix:")"}),r=t.setSelectionRange(n),Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[](",suffix:")"})):r.selectedText.length===0?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[title",suffix:"](url)"}):Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},id=(e,t,n)=>{var r=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),o=t.setSelectionRange(r),a=l1(o.text,o.selection.start),i=Array(a+1).join(`
66
+ `),s=u1(o.text,o.selection.end),l=Array(s+1).join(`
67
+ `),{modifiedText:u,insertionLength:d}=ad(o.selectedText,n);if(d<0){var f=o.selection.start,h=o.selection.end;o.selection.start>0&&e.text.slice(o.selection.start-1,o.selection.start)===`
68
+ `&&(f-=1),o.selection.end<e.text.length-1&&e.text.slice(o.selection.end,o.selection.end+1)===`
69
+ `&&(h+=1),t.setSelectionRange({start:f,end:h}),t.replaceSelection(""+u),t.setSelectionRange({start:f,end:f+u.length})}else{t.replaceSelection(""+i+u+l);var p=o.selection.start+a,m=p+u.length;t.setSelectionRange({start:p,end:m})}},A5={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:c.jsx("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:c.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)=>{id(e,t,"- ")}},I5={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:c.jsx("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:c.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)=>{id(e,t,(n,r)=>r+1+". ")}},P5={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:c.jsx("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:c.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)=>{id(e,t,(n,r)=>"- [ ] ")}},R5={name:"preview",keyCommand:"preview",value:"preview",shortcuts:"ctrlcmd+9",buttonProps:{"aria-label":"Preview code (ctrl + 9)",title:"Preview code (ctrl + 9)"},icon:c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[c.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"}),c.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"})}},M5={name:"edit",keyCommand:"preview",value:"edit",shortcuts:"ctrlcmd+7",buttonProps:{"aria-label":"Edit code (ctrl + 7)",title:"Edit code (ctrl + 7)"},icon:c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[c.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"}),c.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"})}},O5={name:"live",keyCommand:"preview",value:"live",shortcuts:"ctrlcmd+8",buttonProps:{"aria-label":"Live code (ctrl + 8)",title:"Live code (ctrl + 8)"},icon:c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[c.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"}),c.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"})}},N5={name:"quote",keyCommand:"quote",shortcuts:"ctrlcmd+q",prefix:"> ",buttonProps:{"aria-label":"Insert a quote (ctrl + q)",title:"Insert a quote (ctrl + q)"},icon:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n),o=l1(r.text,r.selection.start),a=Array(o+1).join(`
70
+ `),i=u1(r.text,r.selection.end),s=Array(i+1).join(`
71
+ `),l=ad(r.selectedText,e.command.prefix);t.replaceSelection(""+a+l.modifiedText+s);var u=r.selection.start+o,d=u+l.modifiedText.length;t.setSelectionRange({start:u,end:d})}},L5={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:c.jsx("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:c.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=an({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},d1={name:"heading1",keyCommand:"heading1",shortcuts:"ctrlcmd+1",prefix:"# ",suffix:"",buttonProps:{"aria-label":"Insert Heading 1 (ctrl + 1)",title:"Insert Heading 1 (ctrl + 1)"},icon:c.jsx("div",{style:{fontSize:18,textAlign:"left"},children:"Heading 1"}),execute:(e,t)=>{pa({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},F5=d1;function pa(e){var{state:t,api:n,prefix:r,suffix:o=r}=e,a=ei({text:t.text,selection:t.selection}),i=n.setSelectionRange(a);Xt({api:n,selectedText:i.selectedText,selection:t.selection,prefix:r,suffix:o})}Y({},d1,{icon:c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:c.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 _5={name:"heading2",keyCommand:"heading2",shortcuts:"ctrlcmd+2",prefix:"## ",suffix:"",buttonProps:{"aria-label":"Insert Heading 2 (ctrl + 2)",title:"Insert Heading 2 (ctrl + 2)"},icon:c.jsx("div",{style:{fontSize:16,textAlign:"left"},children:"Heading 2"}),execute:(e,t)=>{pa({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},B5=_5,j5={name:"heading3",keyCommand:"heading3",shortcuts:"ctrlcmd+3",prefix:"### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 3 (ctrl + 3)",title:"Insert Heading 3 (ctrl + 3)"},icon:c.jsx("div",{style:{fontSize:15,textAlign:"left"},children:"Heading 3"}),execute:(e,t)=>{pa({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},$5=j5,H5={name:"heading4",keyCommand:"heading4",shortcuts:"ctrlcmd+4",prefix:"#### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 4 (ctrl + 4)",title:"Insert Heading 4 (ctrl + 4)"},icon:c.jsx("div",{style:{fontSize:14,textAlign:"left"},children:"Heading 4"}),execute:(e,t)=>{pa({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},U5=H5,z5={name:"heading5",keyCommand:"heading5",shortcuts:"ctrlcmd+5",prefix:"##### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 5 (ctrl + 5)",title:"Insert Heading 5 (ctrl + 5)"},icon:c.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Heading 5"}),execute:(e,t)=>{pa({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},V5=z5,W5={name:"heading6",keyCommand:"heading6",shortcuts:"ctrlcmd+6",prefix:"###### ",suffix:"",buttonProps:{"aria-label":"Insert Heading 6 (ctrl + 6)",title:"Insert Heading 6 (ctrl + 6)"},icon:c.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Heading 6"}),execute:(e,t)=>{pa({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},q5=W5,Y5={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:c.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:c.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=an({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)?Xt({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}),Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},K5={name:"help",keyCommand:"help",buttonProps:{"aria-label":"Open help",title:"Open help"},icon:c.jsx("svg",{viewBox:"0 0 16 16",width:"12px",height:"12px",children:c.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")}},G5=()=>[y5,D5,L5,S5,v5([F5,B5,$5,U5,V5,q5],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title",title:"Insert title"}}),us,w5,N5,x5,c1,E5,k5,Y5,us,A5,I5,P5,us,K5],Q5=()=>[M5,O5,R5,us,C5];function Ls(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 sd{constructor(t){this.textArea=void 0,this.textArea=t}replaceSelection(t){return Vo(this.textArea,t),Ls(this.textArea)}setSelectionRange(t){return this.textArea.focus(),this.textArea.selectionStart=t.start,this.textArea.selectionEnd=t.end,Ls(this.textArea)}}class ld{constructor(t){this.textArea=void 0,this.textApi=void 0,this.textArea=t,this.textApi=new sd(t)}getState(){return this.textArea?Ls(this.textArea):!1}executeCommand(t,n,r,o){t.execute&&t.execute(Y({command:t},Ls(this.textArea)),this.textApi,n,r,o)}}function cs(e){e.stopPropagation(),e.preventDefault()}function Xp(e,t){cs(e);var n=e.target,r=new sd(n),o={start:n.selectionStart,end:n.selectionEnd};if(o=ei({text:n.value,selection:o}),!(t<0&&o.start<=0||t>0&&o.end>=n.value.length)){var a=n.value.slice(o.start,o.end);if(t<0){var i=ei({text:n.value,selection:{start:o.start-1,end:o.start-1}}),s=n.value.slice(i.start,i.end);r.setSelectionRange({start:i.start,end:o.end}),Vo(n,a+`
79
+ `+s),r.setSelectionRange({start:i.start,end:i.start+a.length})}else{var l=ei({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}),Vo(n,u+`
80
+ `+a),r.setSelectionRange({start:l.end-a.length,end:l.end})}}}function X5(e,t,n){t===void 0&&(t=2),n===void 0&&(n=!1);var r=e.target,o=r.value.substr(0,r.selectionStart),a=o.split(`
81
+ `),i=a[a.length-1],s=new sd(r);if(!n&&e.code&&e.code.toLowerCase()==="tab"){cs(e);var l=new Array(t+1).join(" ");if(r.selectionStart!==r.selectionEnd){var u=r.value.substring(0,r.selectionStart).split(`
82
+ `),d=r.value.substring(0,r.selectionEnd).split(`
83
+ `),f=[];d.forEach((_,O)=>{_!==u[O]&&f.push(_)});var h=f.join(`
84
+ `),p=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 b=ad(h,e.shiftKey?"":l),y=b.modifiedText;e.shiftKey&&(y=y.split(`
85
+ `).map(_=>_.replace(new RegExp("^"+l),"")).join(`
86
+ `)),s.replaceSelection(y);var x=e.shiftKey?-t:t,T=e.shiftKey?-f.length*t:f.length*t;s.setSelectionRange({start:m+x,end:m+p.length+T})}else return Vo(r,l)}else if(e.keyCode===13&&e.code.toLowerCase()==="enter"&&(/^(-|\*)\s/.test(i)||/^\d+.\s/.test(i))&&!e.shiftKey){cs(e);var C=`
87
+ - `;return i.startsWith("*")&&(C=`
88
+ * `),(i.startsWith("- [ ]")||i.startsWith("- [X]")||i.startsWith("- [x]"))&&(C=`
89
+ - [ ] `),/^\d+.\s/.test(i)&&(C=`
90
+ `+(parseInt(i)+1)+". "),Vo(r,C)}else if(e.code&&e.code.toLowerCase()==="keyd"&&e.ctrlKey){cs(e);var k={start:r.selectionStart,end:r.selectionEnd},S=k;k=ei({text:r.value,selection:k});var v=r.value.slice(k.start,k.end);s.setSelectionRange({start:k.end,end:k.end}),Vo(r,`
91
+ `+v),s.setSelectionRange({start:S.start,end:S.end})}else e.code&&e.code.toLowerCase()==="arrowup"&&e.altKey?Xp(e,-1):e.code&&e.code.toLowerCase()==="arrowdown"&&e.altKey&&Xp(e,1)}var Z5=["prefixCls","onChange"],J5=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","autoFocusEnd","textareaWarp","dispatch"];function e4(e){var{prefixCls:t,onChange:n}=e,r=Ue(e,Z5),o=z.useContext(fa),{markdown:a,commands:i,fullscreen:s,preview:l,highlightEnable:u,extraCommands:d,tabSize:f,defaultTabEnable:h,autoFocusEnd:p,textareaWarp:m,dispatch:b}=o;Ue(o,J5);var y=z.useRef(null),x=z.useRef(),T=z.useRef({fullscreen:s,preview:l});z.useEffect(()=>{T.current={fullscreen:s,preview:l,highlightEnable:u}},[s,l,u]),z.useEffect(()=>{if(y.current&&b){var k=new ld(y.current);x.current=k,b({textarea:y.current,commandOrchestrator:k})}},[]),z.useEffect(()=>{if(p&&y.current&&m){y.current.focus();var k=y.current.value.length;y.current.setSelectionRange(k,k),setTimeout(()=>{m&&(m.scrollTop=m.scrollHeight),y.current&&(y.current.scrollTop=y.current.scrollHeight)},0)}},[m]);var C=k=>{X5(k,f,h),s1(k,[...i||[],...d||[]],x.current,b,T.current)};return z.useEffect(()=>(y.current&&y.current.addEventListener("keydown",C),()=>{y.current&&y.current.removeEventListener("keydown",C)}),[]),c.jsx("textarea",Y({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:y,className:t+"-text-input "+(r.className?r.className:""),value:a,onChange:k=>{b&&b({markdown:k.target.value}),n&&n(k)}}))}var t4=["prefixCls","className","onScroll","renderTextarea"];function n4(e){var t=e||{},{prefixCls:n,className:r,onScroll:o,renderTextarea:a}=t,i=Ue(t,t4),{markdown:s,scrollTop:l,commands:u,extraCommands:d,dispatch:f}=z.useContext(fa),h=z.useRef(null),p=z.useRef(),m=z.createRef();z.useEffect(()=>{var y={};m.current&&(y.textareaWarp=m.current||void 0,m.current.scrollTop=l||0),f&&f(Y({},y))},[]),z.useEffect(()=>{if(h.current&&f){var y=new ld(h.current);p.current=y,f({textarea:h.current,commandOrchestrator:y})}},[]);var b={WebkitTextFillColor:"initial",overflow:"auto"};return c.jsx("div",{ref:m,className:n+"-area "+(r||""),onScroll:o,children:c.jsx("div",{className:n+"-text",children:a?z.cloneElement(a(Y({},i,{value:s,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:f,onChange:i.onChange,shortcuts:s1,useContext:{commands:u,extraCommands:d,commandOrchestrator:p.current}}),{ref:h}):c.jsx(z.Fragment,{children:c.jsx(e4,Y({prefixCls:n},i,{style:b}))})})})}function r4(e){var{prefixCls:t,groupName:n,commands:r,children:o}=e||{},{barPopup:a={}}=z.useContext(fa);return z.useMemo(()=>c.jsx("div",{className:t+"-toolbar-child "+(n&&a[n]?"active":""),onClick:i=>i.stopPropagation(),children:Array.isArray(r)?c.jsx(f1,Y({commands:r},e,{isChild:!0})):o}),[r,a,n,t])}function Zp(e){var{prefixCls:t,overflow:n}=e,{fullscreen:r,preview:o,barPopup:a={},components:i,commandOrchestrator:s,dispatch:l}=z.useContext(fa),u=z.useRef("");function d(f,h){if(l){var p={barPopup:Y({},a)};f.keyCommand==="preview"&&(p.preview=f.value),f.keyCommand==="fullscreen"&&(p.fullscreen=!r),e.commands&&f.keyCommand==="group"?e.commands.forEach(m=>{h===m.groupName?p.barPopup[h]=!0:m.keyCommand&&(p.barPopup[m.groupName]=!1)}):(h||f.parent)&&Object.keys(p.barPopup||{}).forEach(m=>{p.barPopup[m]=!1}),Object.keys(p).length&&l(Y({},p)),s&&s.executeCommand(f)}}return z.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]),c.jsx("ul",{children:(e.commands||[]).map((f,h)=>{if(f.keyCommand==="divider")return c.jsx("li",Y({},f.liProps,{className:t+"-toolbar-divider"}),h);if(!f.keyCommand)return c.jsx(z.Fragment,{},h);var p=r&&f.keyCommand==="fullscreen"||f.keyCommand==="preview"&&o===f.value,m=f.children&&typeof f.children=="function"?f.children({getState:()=>s.getState(),textApi:s?s.textApi:void 0,close:()=>d({},f.groupName),execute:()=>d({execute:f.execute}),dispatch:l}):void 0,b=a&&o&&o==="preview"&&!/(preview|fullscreen)/.test(f.keyCommand),y=i?.toolbar||f.render,x=y&&typeof y=="function"?y(f,!!b,d,h):null;return c.jsxs("li",Y({},f.liProps,{className:p?"active":"",children:[x&&z.isValidElement(x)&&x,!x&&!f.buttonProps&&f.icon,!x&&f.buttonProps&&z.createElement("button",Y({type:"button",key:h,disabled:b,"data-name":f.name},f.buttonProps,{onClick:T=>{T.stopPropagation(),d(f,f.groupName)}}),f.icon),f.children&&c.jsx(r4,{overflow:n,groupName:f.groupName,prefixCls:t,children:m,commands:Array.isArray(f.children)?f.children:void 0})]}),h)})})}function f1(e){e===void 0&&(e={});var{prefixCls:t,isChild:n,className:r}=e,{commands:o,extraCommands:a}=z.useContext(fa);return c.jsxs("div",{className:t+"-toolbar "+r,children:[c.jsx(Zp,Y({},e,{commands:e.commands||o||[]})),!n&&c.jsx(Zp,Y({},e,{commands:a||[]}))]})}function Jp(e){var{hideToolbar:t,toolbarBottom:n,placement:r,overflow:o,prefixCls:a}=e;if(t||r==="bottom"&&!n||r==="top"&&n)return null;var i=n?"bottom":"";return c.jsx(f1,{prefixCls:a,overflow:o,className:i})}var o4=e=>{var{prefixCls:t,onChange:n}=e||{},r=z.useRef(null),o=z.useRef(),a=z.useRef(e.height);z.useEffect(()=>{a.current!==e.height&&(a.current=e.height)},[e.height]);function i(d){if(o.current){var f,h=d.clientY||((f=d.changedTouches[0])==null?void 0:f.clientY),p=o.current.height+h-o.current.dragY;p>=e.minHeight&&p<=e.maxHeight&&n&&n(o.current.height+(h-o.current.dragY))}}function s(){var d,f;o.current=void 0,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",s),(d=r.current)==null||d.removeEventListener("touchmove",i),(f=r.current)==null||f.removeEventListener("touchend",s)}function l(d){var f,h,p;d.preventDefault();var m=d.clientY||((f=d.changedTouches[0])==null?void 0:f.clientY);o.current={height:a.current,dragY:m},document.addEventListener("mousemove",i),document.addEventListener("mouseup",s),(h=r.current)==null||h.addEventListener("touchmove",i,{passive:!1}),(p=r.current)==null||p.addEventListener("touchend",s,{passive:!1})}z.useEffect(()=>{if(document){var d,f;(d=r.current)==null||d.addEventListener("touchstart",l,{passive:!1}),(f=r.current)==null||f.addEventListener("mousedown",l)}return()=>{if(document){var h;(h=r.current)==null||h.removeEventListener("touchstart",l),document.removeEventListener("mousemove",i)}}},[]);var u=z.useMemo(()=>c.jsx("svg",{viewBox:"0 0 512 512",height:"100%",children:c.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 c.jsx("div",{className:t+"-bar",ref:r,children:u})},a4=["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 i4(e){return e===void 0&&(e={}),Object.keys(e).forEach(t=>{e[t]=!1}),e}var s4=z.forwardRef((e,t)=>{var n=e||{},{prefixCls:r="w-md-editor",className:o,value:a,commands:i=G5(),commandsFilter:s,direction:l,extraCommands:u=Q5(),height:d=200,enableScroll:f=!0,visibleDragbar:h=typeof e.visiableDragbar=="boolean"?e.visiableDragbar:!0,highlightEnable:p=!0,preview:m="live",fullscreen:b=!1,overflow:y=!0,previewOptions:x={},textareaProps:T,maxHeight:C=1200,minHeight:k=100,autoFocus:S,autoFocusEnd:v=!1,tabSize:_=2,defaultTabEnable:O=!1,onChange:B,onStatistics:R,onHeightChange:L,hideToolbar:E,toolbarBottom:N=!1,components:w,renderTextarea:A}=n,M=Ue(n,a4),W=i.map(be=>s?s(be,!1):be).filter(Boolean),H=u.map(be=>s?s(be,!0):be).filter(Boolean),[$,D]=z.useReducer(g5,{markdown:a,preview:m,components:w,height:d,minHeight:k,highlightEnable:p,tabSize:_,defaultTabEnable:O,scrollTop:0,scrollTopPreview:0,commands:W,extraCommands:H,fullscreen:b,barPopup:{}}),V=z.useRef(null),Q=z.useRef(null),F=z.useRef(f);z.useImperativeHandle(t,()=>Y({},$,{container:V.current,dispatch:D})),z.useMemo(()=>F.current=f,[f]),z.useEffect(()=>{var be={};V.current&&(be.container=V.current||void 0),be.markdown=a||"",be.barPopup={},D&&D(Y({},$,be))},[]);var fe=[o,"wmde-markdown-var",l?r+"-"+l:null,r,$.preview?r+"-show-"+$.preview:null,$.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();z.useMemo(()=>a!==$.markdown&&D({markdown:a||""}),[a,$.markdown]),z.useMemo(()=>m!==$.preview&&D({preview:m}),[m]),z.useMemo(()=>_!==$.tabSize&&D({tabSize:_}),[_]),z.useMemo(()=>p!==$.highlightEnable&&D({highlightEnable:p}),[p]),z.useMemo(()=>S!==$.autoFocus&&D({autoFocus:S}),[S]),z.useMemo(()=>v!==$.autoFocusEnd&&D({autoFocusEnd:v}),[v]),z.useMemo(()=>b!==$.fullscreen&&D({fullscreen:b}),[b]),z.useMemo(()=>d!==$.height&&D({height:d}),[d]),z.useMemo(()=>d!==$.height&&L&&L($.height,d,$),[d,L,$]),z.useMemo(()=>i!==$.commands&&D({commands:W}),[e.commands]),z.useMemo(()=>u!==$.extraCommands&&D({extraCommands:H}),[e.extraCommands]);var J=z.useRef(),X=z.useRef("preview"),ee=z.useRef(!1);z.useMemo(()=>{J.current=$.textareaWarp,$.textareaWarp&&($.textareaWarp.addEventListener("mouseover",()=>{X.current="text"}),$.textareaWarp.addEventListener("mouseleave",()=>{X.current="preview"}))},[$.textareaWarp]);var K=(be,ie)=>{if(F.current){var Ae=J.current,ve=Q.current?Q.current:void 0;if(ee.current||(X.current=ie,ee.current=!0),Ae&&ve){var Ve=(Ae.scrollHeight-Ae.offsetHeight)/(ve.scrollHeight-ve.offsetHeight);be.target===Ae&&X.current==="text"&&(ve.scrollTop=Ae.scrollTop/Ve),be.target===ve&&X.current==="preview"&&(Ae.scrollTop=ve.scrollTop*Ve);var we=0;X.current==="text"?we=Ae.scrollTop||0:X.current==="preview"&&(we=ve.scrollTop||0),D({scrollTop:we})}}},te=r+"-preview "+(x.className||""),oe=be=>K(be,"preview"),re=z.useMemo(()=>c.jsx("div",{ref:Q,className:te,children:c.jsx(a1,Y({},x,{onScroll:oe,source:$.markdown||""}))}),[te,x,$.markdown]),pe=w?.preview&&w?.preview($.markdown||"",$,D);pe&&z.isValidElement(pe)&&(re=c.jsx("div",{className:te,ref:Q,onScroll:oe,children:pe}));var G=Y({},M.style,{height:$.height||"100%"}),Z=()=>D({barPopup:Y({},i4($.barPopup))}),xe=be=>D({height:be}),de=be=>{if(B&&B(be.target.value,be,$),T&&T.onChange&&T.onChange(be),$.textarea&&$.textarea instanceof HTMLTextAreaElement&&R){var ie=new ld($.textarea),Ae=ie.getState()||{};R(Y({},Ae,{lineCount:be.target.value.split(`
92
+ `).length,length:be.target.value.length}))}};return c.jsx(fa.Provider,{value:Y({},$,{dispatch:D}),children:c.jsxs("div",Y({ref:V,className:fe},M,{onClick:Z,style:G,children:[c.jsx(Jp,{hideToolbar:E,toolbarBottom:N,prefixCls:r,overflow:y,placement:"top"}),c.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test($.preview||"")&&c.jsx(n4,Y({className:r+"-input",prefixCls:r,autoFocus:S},T,{onChange:de,renderTextarea:w?.textarea||A,onScroll:be=>K(be,"text")})),/(live|preview)/.test($.preview||"")&&re]}),h&&!$.fullscreen&&c.jsx(o4,{prefixCls:r,height:$.height,maxHeight:C,minHeight:k,onChange:xe}),c.jsx(Jp,{hideToolbar:E,toolbarBottom:N,prefixCls:r,overflow:y,placement:"bottom"})]}))})}),p1=s4;p1.Markdown=a1;const yu={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"}]}}},l4={...yu,patterns:[...yu.patterns,{include:"#docvar"}],repository:{...yu.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},u4={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"}]}}},c4="github-light";let xu;function d4(){return xu||(xu=(async()=>{const[{createHighlighterCore:e},{createOnigurumaEngine:t},{default:n},{default:r},{default:o},{default:a}]=await Promise.all([Promise.resolve().then(()=>require("./core-yDgxkpo0.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:[a],langs:[n,r,o,{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...l4},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...u4}]})})()),xu}async function Fs(e,t){return(await d4()).codeToHtml(e,{lang:t,theme:c4})}function Qt(e){const{server:t}=it.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 a=new Error(o.response.data.message||o.message);throw a.status=o.response.status,a.data=o.response.data,a}}throw r}},retry:!1,throwOnError:!1};return Dr.useQuery(n,it.globalQueryClient)}function ir(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 a=new Error(o.response.data.message||o.message);throw a.status=o.response.status,a.data=o.response.data,a}}throw r}},retry:!1,throwOnError:!1};return Dr.useMutation(t,it.globalQueryClient)}const Nt=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 a=r[o];a==="environments"?n.environmentName=decodeURI(r[o+1])||void 0:a==="packages"?n.packageName=decodeURI(r[o+1])||void 0:a==="connections"?n.connectionName=decodeURI(r[o+1])||void 0:a==="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},Pi=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 ud({sourceAndPaths:e,selectedSourceIndex:t,existingQuery:n,onQueryChange:r,onSourceChange:o,resourceUri:a}){return z.useEffect(()=>{o&&o(t)},[t,o]),c.jsx(Rc,{children:c.jsxs(Rt.Stack,{spacing:2,component:"section",children:[c.jsx(h1,{sourceAndPath:e[t],existingQuery:n,onChange:i=>{r&&r(i)},resourceUri:a}),c.jsx(Rt.Box,{height:"5px"})]})})}function ds(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function f4({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:o,resourceUri:a}){const[i,s]=z.useState(n||ds()),[l,u]=z.useState(void 0);z.useEffect(()=>{n&&s(n)},[n]);const[d,f]=z.useState([]),{MalloyExplorerProvider:h,QueryPanel:p,ResizableCollapsiblePanel:m,ResultPanel:b,SourcePanel:y}=r;z.useEffect(()=>{t&&t(i)},[t,i]);const{environmentName:x,packageName:T,versionId:C}=Nt(a),{apiClients:k}=it.useServer(),S=ir({mutationFn:()=>{const B=typeof i?.malloyQuery=="string"?i.malloyQuery:new o.ASTQuery({source:e.sourceInfo,query:i?.malloyQuery}).toMalloy();return u({executionState:"running",query:i?.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:()=>{S.reset(),u(void 0)},response:{result:{}}}),s({...i,query:B}),k.models.executeQueryModel(x,T,e.modelPath,{query:B,sourceName:void 0,queryName:void 0,versionId:C})},onSuccess:B=>{if(B){const R=JSON.parse(B.data.result);s({...i,malloyResult:R}),u(L=>L?{...L,executionState:"finished",response:{result:R}}:void 0)}},onError:B=>{u(void 0),console.error("Query execution error:",B)}}),[v,_]=z.useState(e.sourceInfo.name);z.useEffect(()=>{v!==e.sourceInfo.name&&(_(e.sourceInfo.name),s(ds()),u(void 0))},[e,v]);const O=z.useCallback(B=>{s({...i,malloyQuery:B,malloyResult:void 0})},[i]);return v!==e.sourceInfo.name?c.jsx("div",{children:"Loading..."}):c.jsx($m,{sx:{border:"1px solid #e0e0e0",borderRadius:"8px",overflow:"hidden"},children:c.jsx(h,{source:e.sourceInfo,query:i?.malloyQuery,topValues:[],onFocusedNestViewPathChange:f,focusedNestViewPath:d,onQueryChange:O,children:c.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[c.jsx(m,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:c.jsx(y,{onRefresh:()=>s(ds())})}),c.jsx(m,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:c.jsx(p,{runQuery:()=>{console.log(`running query with: ${i?.malloyQuery}`);try{S.mutate()}catch(B){console.error("Error running query:",B)}}})}),c.jsx(b,{source:e.sourceInfo,draftQuery:i?.malloyQuery,setDraftQuery:B=>s({...i,malloyQuery:B}),submittedQuery:l,options:{showRawQuery:!0}})]})})},e.sourceInfo.name)}function h1(e){const[t,n]=z.useState(null),[r,o]=z.useState(null),[a,i]=z.useState(!0);return z.useEffect(()=>{let s=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([l,u])=>{s&&(n(l),o(u),i(!1))}).catch(l=>{console.error("Failed to load Malloy components:",l),s&&i(!1)}),()=>{s=!1}},[]),a||!t||!r?c.jsx(j2,{children:c.jsx($m,{children:c.jsx(Rt.Box,{sx:{alignItems:"center",justifyContent:"center",height:"200px",color:"text.secondary"},children:"Loading explorer..."})})}):c.jsx(f4,{...e,explorerComponents:t,QueryBuilder:r,resourceUri:e.resourceUri})}function pn({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:o=!0,spacing:a=2,textVariant:i="body2"}){const s=c.jsxs(P.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:a},children:[c.jsx(P.CircularProgress,{size:t,color:n,thickness:r}),e&&c.jsx(P.Typography,{variant:i,color:"text.secondary",children:e})]});return o?c.jsx(P.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:s}):s}const p4=z.lazy(()=>Promise.resolve().then(()=>e9));function ha({result:e,maxHeight:t,maxResultSize:n=0}){const r=z.useRef(null),[o,a]=z.useState(t),[i,s]=z.useState(!1);if(!e)return null;if(n>0&&e.length>n&&!i)return c.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:[c.jsx(vn.Warning,{sx:{fontSize:48,color:"#757575"}}),c.jsx(P.Typography,{variant:"h6",color:"text.secondary",align:"center",children:"Processing large results may cause browser performance issues. Proceed?"}),c.jsx(P.Button,{variant:"contained",color:"primary",onClick:()=>s(!0),children:"Proceed"})]});const u=c.jsx(pn,{text:"Loading...",centered:!0,size:32}),d=Math.min(t,o);return c.jsx(P.Box,{ref:r,sx:{position:"relative",height:"auto",border:"0px",borderRadius:0,overflow:"hidden"},children:e&&c.jsx(z.Suspense,{fallback:u,children:c.jsx(p4,{result:e,height:d,onSizeChange:a})})})}function h4({cell:e,sourceAndPaths:t,resourceUri:n,onQueryChange:r,onSourceChange:o}){const a={query:e.value,malloyResult:e.result?JSON.parse(e.result):void 0,malloyQuery:e.queryInfo?JSON.parse(e.queryInfo):void 0},i=t.findIndex(s=>s.sourceInfo.name===e.sourceName);return c.jsx(ud,{resourceUri:n,sourceAndPaths:t,selectedSourceIndex:i>=0?i:0,existingQuery:a,onQueryChange:r,onSourceChange:o})}function m4({cell:e,editingMalloy:t,editingMarkdown:n,sourceAndPaths:r,resourceUri:o,onCellChange:a,onClose:i,onEdit:s,onDelete:l,addButtonCallback:u}){const[d,f]=z.useState(e.value),[h,p]=z.useState(!1),[m,b]=z.useState(!1),[y,x]=z.useState(),[T]=z.useState(),[C,k]=z.useState(ds()),[S,v]=z.useState(!1),[_,O]=z.useState(e.sourceName?r.findIndex(V=>V.sourceInfo.name===e.sourceName):0);z.useEffect(()=>{e.isMarkdown||Fs(e.value,"malloy").then(V=>{x(V)})},[e]),z.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const[B,R]=z.useState(!1),L=()=>{l(),R(!1)},E=r.length===0,N=z.useCallback(()=>{const V=r[_],Q=V?.modelPath||e.modelPath||"",F=V?.sourceInfo.name||e.sourceName||"";a({...e,value:e.isMarkdown?d:C.query,result:C.malloyResult?JSON.stringify(C.malloyResult):void 0,queryInfo:C.malloyQuery?JSON.stringify(C.malloyQuery):void 0,sourceName:F,modelPath:Q})},[e,d,C,a,_,r]),w=c.jsx(P.Tooltip,{title:"Delete Cell",children:c.jsx(P.IconButton,{size:"small",onClick:()=>R(!0),children:c.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.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=c.jsxs(P.Dialog,{open:B,onClose:()=>R(!1),children:[c.jsx(P.DialogTitle,{children:"Confirm Delete"}),c.jsx(P.DialogContent,{children:c.jsx(P.Typography,{children:"Are you sure you want to delete this cell?"})}),c.jsxs(P.DialogActions,{children:[c.jsx(P.Button,{onClick:()=>R(!1),children:"Cancel"}),c.jsx(P.Button,{onClick:L,color:"error",children:"Delete"})]})]}),M=()=>{N(),i()},W=e.isMarkdown?c.jsxs(c.Fragment,{children:[n?c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx($i,{})})}):c.jsx(P.Tooltip,{title:"Edit",children:c.jsx(P.IconButton,{size:"small",onClick:s,children:c.jsx(Tf,{})})}),!n&&w]}):c.jsxs(c.Fragment,{children:[!t&&c.jsx(P.Tooltip,{title:h?"Hide Code":"View Code",children:c.jsx(P.IconButton,{size:"small",onClick:()=>{p(!h)},children:c.jsx(Vm,{})})}),!t&&e.result&&c.jsx(P.Tooltip,{title:m?"Hide Embedding":"View Embedding",children:c.jsx(P.IconButton,{size:"small",onClick:()=>{b(!m)},children:c.jsx(Mc,{})})}),t&&c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx($i,{})})}),!t&&c.jsx(P.Tooltip,{title:"Edit",children:c.jsx(P.IconButton,{size:"small",onClick:s,children:c.jsx(Tf,{})})}),!t&&w]}),H=t||n,$=n?c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx($i,{})})}):t?c.jsx(P.Tooltip,{title:"Save",children:c.jsx(P.IconButton,{size:"small",onClick:M,children:c.jsx($i,{})})}):null,D=S&&c.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:!H&&c.jsxs(c.Fragment,{children:[u(!0),u(!1),W]})||$});return c.jsxs(Ds,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>v(!0),onMouseLeave:()=>{v(!1)},children:[D,e.isMarkdown?c.jsx(c.Fragment,{children:n?c.jsx(p1,{value:d,preview:"edit",autoFocus:!0,onChange:V=>{f(V),a({...e,value:V})},onBlur:()=>{N(),S||M()}}):c.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?c.jsx(P.Box,{onClick:s,sx:{cursor:"pointer"},children:c.jsx(Cs,{children:e.value})}):c.jsxs(P.Box,{onClick:s,sx:{cursor:"pointer"},children:[c.jsx(P.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Markdown is empty"}),c.jsx(P.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})})}):c.jsxs(c.Fragment,{children:[c.jsx(P.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:c.jsx(P.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:c.jsx(P.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:T}})})}),c.jsx(P.Collapse,{in:h,timeout:"auto",unmountOnExit:!0,children:c.jsx(P.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:c.jsx(P.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:y}})})}),t&&(E?c.jsxs(c.Fragment,{children:[c.jsx(P.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"No Model Imports"}),c.jsx(P.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Please add a model import above."})]}):c.jsx(h4,{sourceAndPaths:r,resourceUri:o,onQueryChange:V=>{k(V)},onSourceChange:V=>{O(V)},cell:e})),!t&&e.result&&c.jsx(Ds,{variant:"outlined",sx:{borderRadius:0},children:c.jsx(ha,{result:e.result,maxHeight:800})}),!t&&!e.result&&c.jsxs(P.Box,{onClick:s,sx:{cursor:"pointer"},children:[c.jsx(P.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Explore is empty"}),c.jsx(P.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})]}),B&&A]})}const m1=z.createContext(void 0);function g4({children:e,workbookStorage:t}){const n=z.useMemo(()=>({workbookStorage:t}),[t]);return c.jsx(m1.Provider,{value:n,children:e})}function cd(){const e=z.useContext(m1);if(!e)throw new Error("useWorkbookStorage must be used within a WorkbookStorageProvider");return e}const vr=kt(c.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"})),b4=kt(c.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 hn({error:e,context:t}){const n=e.data?.message||"Unknown Error";return c.jsxs(c.Fragment,{children:[t&&c.jsx(P.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),c.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}function y4({initialSelectedModels:e,onModelChange:t,resourceUri:n}){const{environmentName:r,packageName:o,versionId:a}=Nt(n),{apiClients:i}=it.useServer(),{data:s,isLoading:l,isSuccess:u,isError:d,error:f}=Qt({queryKey:["models",r,o,a],queryFn:()=>i.models.listModels(r,o,a)}),[h,p]=z.useState(e||[]),[m,b]=z.useState(null);z.useEffect(()=>{p(e||[])},[e]);const y=C=>{const k=h.filter(S=>S!==C);p(k),t(k)},x=C=>{const k=[...h,C];p(k),t(k),b(null)};let T=[];return u&&s?.data&&(T=s.data.filter(C=>!h.includes(C.path)).map(C=>C.path)),d?c.jsx(hn,{error:f,context:`${r} > ${o} > Model Picker`}):c.jsxs(c.Fragment,{children:[c.jsxs(P.FormControl,{fullWidth:!0,children:[l&&c.jsx(P.Typography,{children:"Loading..."}),c.jsxs(P.Stack,{direction:"row",spacing:1,children:[h.map(C=>c.jsx(P.Chip,{label:C,onDelete:()=>y(C),deleteIcon:c.jsx(vr,{}),sx:{marginBottom:"5px"}},C)),c.jsx(P.Button,{size:"small",startIcon:c.jsx(b4,{}),onClick:C=>b(C.currentTarget),disabled:l||d||T.length===0,children:"Add Model"})]})]}),c.jsxs(P.Menu,{anchorEl:m,open:!!m,onClose:()=>b(null),children:[c.jsx(P.Typography,{variant:"subtitle2",sx:{ml:1},children:"Models"}),c.jsx(P.Divider,{}),T.length===0?c.jsx(P.MenuItem,{disabled:!0,children:"No models available"}):T.map(C=>c.jsx(P.MenuItem,{onClick:()=>x(C),children:c.jsx(P.Typography,{variant:"body2",children:C})},C))]})]})}function g1(){const e=sy.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 x4({workbookPath:e,resourceUri:t}){const n=g1(),{server:r,getAccessToken:o}=it.useServer(),{apiClients:a}=it.useServer(),{workbookStorage:i}=cd(),{environmentName:s,packageName:l}=Nt(t),[u,d]=z.useState(void 0),[f,h]=z.useState(void 0);if(!i)throw new Error("Workbook storage be provided via WorkbookStorageProvider");const[p,m]=z.useState(),[b,y]=z.useState(),[x,T]=z.useState(),[C,k]=z.useState([]),[S,v]=z.useState(null),[_,O]=z.useState(null),B=!!S,R=()=>{v(null),O(null)},L=(V,Q)=>{p&&(m(p.insertCell(Q,{isMarkdown:V,value:""})),V?T(Q):y(Q),R(),console.log("handleAddCell",V,Q))},[E,N]=z.useState(!1),w=()=>{N(!0)},A=async()=>{e&&i&&await i.deleteWorkbook(e).then(()=>{h(void 0),d(void 0)}).catch(V=>{h(`Error deleting workbook: ${V.message}`),d(void 0)}),N(!1),n(`/${s}/${l}`)},M=()=>{N(!1)},W=z.useCallback(async()=>{if(!p){console.log("No workbook data ref");return}try{m(await p.saveWorkbook()),h(void 0),d("Workbook saved")}catch(V){h(`Error saving workbook: ${V.message}`),d(void 0)}},[p]);if(z.useEffect(()=>{if(!p)return;(async()=>{const Q=new Map(C.map(({modelPath:J,sourceInfos:X})=>[J,X])),F=[],fe=[];for(const J of p.getModels())Q.has(J)?F.push({modelPath:J,sourceInfos:Q.get(J)}):(console.log("Fetching model from Publisher",J),fe.push(a.models.getModel(s,l,J,void 0).then(X=>({modelPath:J,sourceInfos:X.data.sourceInfos.map(ee=>JSON.parse(ee))}))));if(fe.length>0){const J=await Promise.all(fe);k([...F,...J])}else k(F)})()},[o,p,l,s,r]),z.useEffect(()=>{e&&Ho.loadWorkbook(i,e).then(V=>{m(V)})},[e,i]),!p)return c.jsx("div",{children:"Loading..."});const H=V=>{const Q=[];for(const F of V)for(const fe of F.sourceInfos)Q.push({modelPath:F.modelPath,sourceInfo:fe});return Q},$=(V,Q)=>c.jsx(P.Button,{size:"small",startIcon:c.jsx(Pc,{}),onClick:()=>L(V,Q),variant:"contained",sx:{backgroundColor:"#fff",color:F=>F.palette.mode==="dark"?F.palette.grey[100]:F.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:F=>F.palette.mode==="dark"?F.palette.grey[500]:F.palette.grey[300],boxShadow:"none"}},children:V?"Markdown":"Explore"}),D=c.jsxs(P.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[$(!1,p.getCells().length),$(!0,p.getCells().length)]});return c.jsxs(Ds,{variant:"outlined",children:[c.jsxs(jm,{children:[c.jsx(P.Box,{sx:{mb:2},children:c.jsx(P.Box,{sx:{minHeight:"24px"},children:f?c.jsx(P.Typography,{color:"error",variant:"body2",children:f}):u?c.jsx(P.Typography,{color:"success",variant:"body2",children:u}):c.jsx("span",{children:" "})})}),c.jsxs(Po,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[c.jsxs(Po,{direction:"row",spacing:1,alignItems:"center",children:[c.jsx(P.Typography,{variant:"overline",sx:{fontSize:"13px",fontWeight:"bold",verticalAlign:"middle"},children:"Workbook"}),c.jsx(P.Typography,{variant:"subtitle2",sx:{fontSize:"13px",fontWeight:"normal",verticalAlign:"middle",ml:1},children:`${e.workspace} > ${e.path}`})]}),c.jsxs(Po,{sx:{display:"flex",flexDirection:"row",gap:1},children:[c.jsx(P.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:c.jsx(E4,{workbookData:p})}),c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[c.jsx(P.Button,{color:"error",onClick:w,size:"small",children:"Delete"}),c.jsxs(P.Dialog,{open:E,onClose:M,children:[c.jsx(P.DialogTitle,{children:"Delete Workbook"}),c.jsx(P.DialogContent,{children:c.jsxs(P.DialogContentText,{children:['Are you sure you want to delete the workbook "',e.path,'"? This action cannot be undone.']})}),c.jsxs(P.DialogActions,{children:[c.jsx(P.Button,{onClick:M,color:"primary",size:"small",children:"Cancel"}),c.jsx(P.Button,{onClick:A,color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),c.jsx(P.Divider,{}),c.jsxs(Po,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[c.jsx(P.Box,{sx:{flex:1},children:c.jsx(y4,{initialSelectedModels:p.getModels(),onModelChange:V=>{m(p.setModels(V)),W()},resourceUri:t})}),c.jsx(P.Box,{sx:{flex:1}})]})]}),c.jsx(Rc,{children:c.jsxs(Po,{children:[p.getCells().length===0&&c.jsxs(c.Fragment,{children:[c.jsx(P.Typography,{sx:{textAlign:"center",p:2,variant:"subtitle2",fontWeight:"medium"},children:"Workbook is empty"}),c.jsx(P.Typography,{variant:"body2",sx:{textAlign:"center",mb:2,variant:"body2"},children:"Click the + buttons to add a markdown or code cell."})]}),p.getCells().map((V,Q)=>c.jsx(z.Fragment,{children:c.jsx(m4,{cell:V,resourceUri:t,addButtonCallback:F=>$(F,Q),sourceAndPaths:H(C),editingMarkdown:x===Q,editingMalloy:b===Q,onDelete:()=>{m(p.deleteCell(Q)),W()},onCellChange:F=>{m(p.setCell(Q,F))},onEdit:()=>{V.isMarkdown?T(Q):y(Q)},onClose:()=>{V.isMarkdown?T(void 0):y(void 0),W()}},`${Q}-${V.isMarkdown}-${e.workspace}-${e.path}`)},`${Q}-${p.getCells().length}`)),D,c.jsxs(P.Menu,{anchorEl:S,open:B,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(P.MenuItem,{onClick:()=>L(!0,_??0),children:"Add Markdown"}),c.jsx(P.MenuItem,{onClick:()=>L(!1,_??0),children:"Add Malloy"})]}),c.jsx(Po,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function E4({workbookData:e}){const[t,n]=z.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 c.jsx(P.Button,{color:"primary",onClick:r,size:"small",children:t?"Copied!":"Export"})}function b1({onWorkbookClick:e}){const{workbookStorage:t}=cd(),[n,r]=z.useState([]),[o,a]=z.useState(void 0);return z.useEffect(()=>{t&&t.listWorkspaces(!1).then(i=>{const s=[];Promise.all(i.map(async l=>{await t.listWorkbooks(l).then(u=>{s.push(...u)}).catch(u=>{a(`Error listing workbooks: ${u.message}`)})})).then(()=>{r(s),a(void 0)})})},[t]),c.jsxs(c.Fragment,{children:[o&&c.jsx(P.Box,{sx:{mb:2},children:c.jsx(P.Typography,{color:"error",variant:"body2",children:o})}),c.jsx(P.Divider,{}),c.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:c.jsxs(P.List,{dense:!0,children:[n.length===0&&c.jsx(P.ListItem,{children:c.jsx(P.ListItemText,{primary:"No workbooks found.",sx:{textAlign:"center"}})}),n.map(i=>c.jsx(P.ListItem,{onClick:s=>e(i,s),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:c.jsx(P.ListItemText,{primary:i.path})},i.path))]})})]})}const eh="Local";class C4{async listWorkspaces(t){return Promise.resolve([{name:eh,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:eh})}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 T4({onWorkbookSelect:e}){const{workbookStorage:t}=cd(),[n,r]=z.useState(""),[o,a]=z.useState(""),[i,s]=z.useState([]),[l,u]=z.useState(null),[d,f]=z.useState(!1),[h,p]=z.useState(!1),m=!!l,b=v=>{u(v.currentTarget)},y=()=>{u(null)},x=()=>{p(!1)},T=()=>{f(!1),r(""),a("")};z.useEffect(()=>{t&&(console.log("fetching workspaces"),t.listWorkspaces(!0).then(v=>{s(v),v.length===1&&a(v[0].name)}).catch(v=>{console.error("Error fetching workspaces:",v),s([])}))},[t]);const C=(v,_)=>{p(!1),e(v,_)},k=v=>{f(!1),e({path:n,workspace:o},v),r(""),a("")},S=i.length===0;return c.jsxs(c.Fragment,{children:[c.jsx(P.Button,{"aria-controls":m?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":m?"true":void 0,onClick:b,variant:"contained",sx:{height:"40px",px:2,backgroundColor:"#fbbb04","&:hover":{backgroundColor:"#eab308"}},children:"Analyze Package"}),c.jsxs(P.Menu,{id:"basic-menu",anchorEl:l,open:m,onClose:y,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[c.jsxs(P.MenuItem,{onClick:()=>{f(!0),y()},sx:{py:1,px:2},disabled:S,children:[c.jsx(P.ListItemIcon,{children:c.jsx(vn.Add,{fontSize:"small"})}),c.jsxs(P.ListItemText,{children:[c.jsx(P.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),S?c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"No workspaces available"}):c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"Create a new analysis workbook"})]})]}),c.jsxs(P.MenuItem,{onClick:()=>{p(!0),y()},sx:{py:1,px:2},children:[c.jsx(P.ListItemIcon,{children:c.jsx(vn.Launch,{fontSize:"small"})}),c.jsxs(P.ListItemText,{children:[c.jsx(P.Typography,{variant:"body2",fontWeight:500,children:"Open Workbook"}),c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:"Open an existing workbook"})]})]})]}),c.jsxs(P.Dialog,{open:d,onClose:T,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[c.jsx(P.Typography,{fontWeight:600,sx:{fontSize:"1.5rem",mb:.5},children:"Create New Workbook"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Start a new analysis workbook to explore your data"})]}),c.jsx(P.DialogContent,{sx:{px:2,pb:2},children:c.jsxs(P.Stack,{spacing:2,sx:{mt:1},children:[i.length>1?c.jsxs(P.FormControl,{fullWidth:!0,size:"small",children:[c.jsx(P.InputLabel,{children:"Workspace"}),c.jsx(P.Select,{value:o,label:"Workspace",onChange:v=>a(v.target.value),children:i.map(v=>c.jsx(P.MenuItem,{value:v.name,children:c.jsxs(P.Box,{children:[c.jsx(P.Typography,{variant:"body2",fontWeight:500,children:v.name}),c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:v.description})]})},v.name))})]}):i.length===1?c.jsxs(P.Box,{sx:{p:2,border:1,borderColor:"divider",borderRadius:1,backgroundColor:"grey.50"},children:[c.jsxs(P.Typography,{variant:"body2",fontWeight:500,gutterBottom:!0,children:["Workspace: ",i[0].name]}),c.jsx(P.Typography,{variant:"caption",color:"text.secondary",children:i[0].description})]}):null,c.jsx(P.FormControl,{fullWidth:!0,children:c.jsx(P.TextField,{label:"Workbook Name",value:n,onChange:v=>r(v.target.value),placeholder:"Enter workbook name...",fullWidth:!0,autoFocus:!0,size:"small"})}),c.jsxs(P.Stack,{direction:"row",spacing:1,justifyContent:"flex-end",children:[c.jsx(P.Button,{onClick:T,variant:"outlined",size:"small",children:"Cancel"}),c.jsx(P.Button,{onClick:v=>k(v),variant:"contained",disabled:!n.trim()||i.length>1&&!o,size:"small",children:"Create Workbook"})]})]})})]}),c.jsxs(P.Dialog,{open:h,onClose:x,maxWidth:"md",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[c.jsx(P.Typography,{fontWeight:600,sx:{mb:.5,fontSize:"1.5rem"},children:"Open Workbook"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Select an existing workbook to continue your analysis"})]}),c.jsx(P.DialogContent,{sx:{px:2,pb:2},children:c.jsx(b1,{onWorkbookClick:C})})]})]})}function v4({resourceUri:e}){const{environmentName:t}=Nt(e),{apiClients:n}=it.useServer(),[r,o]=z.useState(!1),a=90,{data:i,isSuccess:s,isError:l,error:u}=Qt({queryKey:["about",t],queryFn:()=>n.environments.getEnvironment(t,!1)}),d=i?.data?.readme||"",f=d.split(/\s+/),h=f.length>a,p=f.slice(0,a).join(" ");return c.jsxs(c.Fragment,{children:[!s&&!l&&c.jsx(pn,{text:"Fetching About..."}),s&&d&&c.jsx(Hm,{children:c.jsxs(Um,{children:[c.jsx(zm,{children:"Readme"}),c.jsxs(P.Box,{sx:{mt:1,fontSize:"0.875rem",lineHeight:1.6},children:[c.jsx(Cs,{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?d:p}),h&&c.jsxs(P.Box,{sx:{mt:1},children:[" ",c.jsx(P.Button,{variant:"text",size:"small",onClick:()=>o(!r),children:r?"Read less":"Read more"})]})]})]})}),l&&c.jsx(hn,{error:u,context:`${t} > About`})]})}function S4({resourceUri:e}){const[t,n]=z.useState(!1),{apiClients:r}=it.useServer(),o=Dr.useQueryClient(),[a,i]=z.useState(""),{environmentName:s}=Nt(e),l=ir({async mutationFn(d){return r.packages.createPackage(s,{name:d.name,description:d.description,location:d.location})},onSuccess(){n(!1),i("Package created successfully"),o.invalidateQueries({queryKey:["packages",s]})},onError(d){i(d instanceof Error?d.message:"An unknown error occurred")}}),u=d=>{d.preventDefault();const f=new FormData(d.currentTarget),h=f.get("name")?.toString(),p=f.get("description")?.toString(),m=f.get("location")?.toString();l.mutate({name:h,description:p,location:m})};return c.jsxs(c.Fragment,{children:[c.jsx(P.Button,{onClick:()=>n(!0),variant:"contained",color:"primary",startIcon:c.jsx(vn.Add,{}),children:"Add Package"}),c.jsxs(P.Dialog,{open:t,onClose:()=>n(!1),maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{borderRadius:2}},children:[c.jsx(P.DialogTitle,{sx:{fontSize:"1.25rem",fontWeight:600,letterSpacing:"-0.025em",pt:3,pb:1,px:3},children:"Create New Package"}),c.jsxs(P.DialogContent,{sx:{px:3,pb:0},children:[c.jsxs(P.Box,{sx:{mb:3},children:[c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1.5},children:"Create a new Malloy package to start exploring your data."}),c.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."}),c.jsxs(P.Typography,{variant:"body2",color:"text.secondary",children:["Make sure to conform to the"," ",c.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"}),"."]})]}),c.jsx("form",{onSubmit:u,id:"package-form",children:c.jsxs(P.Stack,{spacing:2.5,children:[c.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}}),c.jsx(P.TextField,{id:"description",name:"description",label:"Description",multiline:!0,rows:3,fullWidth:!0,variant:"outlined",size:"small",InputLabelProps:{shrink:!0}}),c.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}})]})})]}),c.jsxs(P.DialogActions,{sx:{px:3,pt:2,pb:3,gap:1},children:[c.jsx(P.Button,{variant:"outlined",disabled:l.isPending,onClick:()=>n(!1),children:"Cancel"}),c.jsx(P.Button,{type:"submit",form:"package-form",variant:"contained",loading:l.isPending,children:"Save Changes"})]})]}),c.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>i(""),message:a})]})}const k4=kt([c.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"),c.jsx("path",{d:"M9 12h6v2H9z"},"1")]),y1=ue.oneOfType([ue.func,ue.object]);function th(e){try{return e.matches(":focus-visible")}catch{}return!1}const nh={};function x1(e,t){const n=I.useRef(nh);return n.current===nh&&(n.current=e(t)),n}class _s{static create(){return new _s}static use(){const t=x1(_s.create).current,[n,r]=I.useState(!1);return t.shouldMount=n,t.setShouldMount=r,I.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 _s.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 lc(e,t){return lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},lc(e,t)}function dd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,lc(e,t)}function A4(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function I4(e,t){e.classList?e.classList.add(t):A4(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function rh(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=rh(e.className,t):e.setAttribute("class",rh(e.className&&e.className.baseVal||"",t))}const oh={disabled:!1},Bs=z.createContext(null);var E1=function(t){return t.scrollTop},za="unmounted",eo="exited",to="entering",_o="entered",uc="exiting",Qn=(function(e){dd(t,e);function t(r,o){var a;a=e.call(this,r,o)||this;var i=o,s=i&&!i.isMounting?r.enter:r.appear,l;return a.appearStatus=null,r.in?s?(l=eo,a.appearStatus=to):l=_o:r.unmountOnExit||r.mountOnEnter?l=za:l=eo,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var i=o.in;return i&&a.status===za?{status:eo}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var a=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==to&&i!==_o&&(a=to):(i===to||i===_o)&&(a=uc)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,a,i,s;return a=i=s=o,o!=null&&typeof o!="number"&&(a=o.exit,i=o.enter,s=o.appear!==void 0?o.appear:i),{exit:a,enter:i,appear:s}},n.updateStatus=function(o,a){if(o===void 0&&(o=!1),a!==null)if(this.cancelNextCallback(),a===to){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:ja.findDOMNode(this);i&&E1(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===eo&&this.setState({status:za})},n.performEnter=function(o){var a=this,i=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[ja.findDOMNode(this),s],u=l[0],d=l[1],f=this.getTimeouts(),h=s?f.appear:f.enter;if(!o&&!i||oh.disabled){this.safeSetState({status:_o},function(){a.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:to},function(){a.props.onEntering(u,d),a.onTransitionEnd(h,function(){a.safeSetState({status:_o},function(){a.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,a=this.props.exit,i=this.getTimeouts(),s=this.props.nodeRef?void 0:ja.findDOMNode(this);if(!a||oh.disabled){this.safeSetState({status:eo},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:uc},function(){o.props.onExiting(s),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:eo},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,a){a=this.setNextCallback(a),this.setState(o,a)},n.setNextCallback=function(o){var a=this,i=!0;return this.nextCallback=function(s){i&&(i=!1,a.nextCallback=null,o(s))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,a){this.setNextCallback(a);var i=this.props.nodeRef?this.props.nodeRef.current:ja.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!i||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=l[0],d=l[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===za)return null;var a=this.props,i=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var s=Ue(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return z.createElement(Bs.Provider,{value:null},typeof i=="function"?i(o,s):z.cloneElement(z.Children.only(i),s))},t})(z.Component);Qn.contextType=Bs;Qn.propTypes={};function No(){}Qn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:No,onEntering:No,onEntered:No,onExit:No,onExiting:No,onExited:No};Qn.UNMOUNTED=za;Qn.EXITED=eo;Qn.ENTERING=to;Qn.ENTERED=_o;Qn.EXITING=uc;var R4=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return I4(t,r)})},Eu=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return P4(t,r)})},fd=(function(e){dd(t,e);function t(){for(var r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=e.call.apply(e,[this].concat(a))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var u=r.resolveArguments(s,l),d=u[0],f=u[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var u=r.resolveArguments(s,l),d=u[0],f=u[1],h=f?"appear":"enter";r.addClass(d,h,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var u=r.resolveArguments(s,l),d=u[0],f=u[1],h=f?"appear":"enter";r.removeClasses(d,h),r.addClass(d,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",d=u&&l?l+"-":"",f=u?""+d+s:l[s],h=u?f+"-active":l[s+"Active"],p=u?f+"-done":l[s+"Done"];return{baseClassName:f,activeClassName:h,doneClassName:p}},r}var n=t.prototype;return n.addClass=function(o,a,i){var s=this.getClassNames(a)[i+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;a==="appear"&&i==="done"&&u&&(s+=" "+u),i==="active"&&o&&E1(o),s&&(this.appliedClasses[a][i]=s,R4(o,s))},n.removeClasses=function(o,a){var i=this.appliedClasses[a],s=i.base,l=i.active,u=i.done;this.appliedClasses[a]={},s&&Eu(o,s),l&&Eu(o,l),u&&Eu(o,u)},n.render=function(){var o=this.props;o.classNames;var a=Ue(o,["classNames"]);return z.createElement(Qn,Y({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(z.Component);fd.defaultProps={classNames:""};fd.propTypes={};function M4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pd(e,t){var n=function(a){return t&&z.isValidElement(a)?t(a):a},r=Object.create(null);return e&&z.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(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var a in e)a in t?o.length&&(r[a]=o,o=[]):o.push(a);var i,s={};for(var l in t){if(r[l])for(i=0;i<r[l].length;i++){var u=r[l][i];s[r[l][i]]=n(u)}s[l]=n(l)}for(i=0;i<o.length;i++)s[o[i]]=n(o[i]);return s}function oo(e,t,n){return n[t]!=null?n[t]:e.props[t]}function N4(e,t){return pd(e.children,function(n){return z.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:oo(n,"appear",e),enter:oo(n,"enter",e),exit:oo(n,"exit",e)})})}function L4(e,t,n){var r=pd(e.children),o=O4(t,r);return Object.keys(o).forEach(function(a){var i=o[a];if(z.isValidElement(i)){var s=a in t,l=a in r,u=t[a],d=z.isValidElement(u)&&!u.props.in;l&&(!s||d)?o[a]=z.cloneElement(i,{onExited:n.bind(null,i),in:!0,exit:oo(i,"exit",e),enter:oo(i,"enter",e)}):!l&&s&&!d?o[a]=z.cloneElement(i,{in:!1}):l&&s&&z.isValidElement(u)&&(o[a]=z.cloneElement(i,{onExited:n.bind(null,i),in:u.props.in,exit:oo(i,"exit",e),enter:oo(i,"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}},Ri=(function(e){dd(t,e);function t(r,o){var a;a=e.call(this,r,o)||this;var i=a.handleExited.bind(M4(a));return a.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},a}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,a){var i=a.children,s=a.handleExited,l=a.firstRender;return{children:l?N4(o,s):L4(o,i,s),firstRender:!1}},n.handleExited=function(o,a){var i=pd(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(a),this.mounted&&this.setState(function(s){var l=Y({},s.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,a=o.component,i=o.childFactory,s=Ue(o,["component","childFactory"]),l=this.state.contextValue,u=F4(this.state.children).map(i);return delete s.appear,delete s.enter,delete s.exit,a===null?z.createElement(Bs.Provider,{value:l},u):z.createElement(Bs.Provider,{value:l},z.createElement(a,s,u))},t})(z.Component);Ri.propTypes={};Ri.defaultProps=_4;const B4=[];function j4(e){I.useEffect(e,B4)}class hd{static create(){return new hd}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 md(){const e=x1(hd.create).current;return j4(e.disposeEffect),e}function $4(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:a,rippleSize:i,in:s,onExited:l,timeout:u}=e,[d,f]=I.useState(!1),h=Ie(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:i,height:i,top:-(i/2)+a,left:-(i/2)+o},m=Ie(n.child,d&&n.childLeaving,r&&n.childPulsate);return!s&&!d&&f(!0),I.useEffect(()=>{if(!s&&l!=null){const b=setTimeout(l,u);return()=>{clearTimeout(b)}}},[l,s,u]),c.jsx("span",{className:h,style:p,children:c.jsx("span",{className:m})})}const Rn=Le("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),cc=550,H4=80,U4=Rt.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=Rt.keyframes`
103
+ 0% {
104
+ opacity: 1;
105
+ }
106
+
107
+ 100% {
108
+ opacity: 0;
109
+ }
110
+ `,V4=Rt.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=se("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),q4=se($4,{name:"MuiTouchRipple",slot:"Ripple"})`
123
+ opacity: 0;
124
+ position: absolute;
125
+
126
+ &.${Rn.rippleVisible} {
127
+ opacity: 0.3;
128
+ transform: scale(1);
129
+ animation-name: ${U4};
130
+ animation-duration: ${cc}ms;
131
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
132
+ }
133
+
134
+ &.${Rn.ripplePulsate} {
135
+ animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
136
+ }
137
+
138
+ & .${Rn.child} {
139
+ opacity: 1;
140
+ display: block;
141
+ width: 100%;
142
+ height: 100%;
143
+ border-radius: 50%;
144
+ background-color: currentColor;
145
+ }
146
+
147
+ & .${Rn.childLeaving} {
148
+ opacity: 0;
149
+ animation-name: ${z4};
150
+ animation-duration: ${cc}ms;
151
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
152
+ }
153
+
154
+ & .${Rn.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=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:a={},className:i,...s}=r,[l,u]=I.useState([]),d=I.useRef(0),f=I.useRef(null);I.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const h=I.useRef(!1),p=md(),m=I.useRef(null),b=I.useRef(null),y=I.useCallback(k=>{const{pulsate:S,rippleX:v,rippleY:_,rippleSize:O,cb:B}=k;u(R=>[...R,c.jsx(q4,{classes:{ripple:Ie(a.ripple,Rn.ripple),rippleVisible:Ie(a.rippleVisible,Rn.rippleVisible),ripplePulsate:Ie(a.ripplePulsate,Rn.ripplePulsate),child:Ie(a.child,Rn.child),childLeaving:Ie(a.childLeaving,Rn.childLeaving),childPulsate:Ie(a.childPulsate,Rn.childPulsate)},timeout:cc,pulsate:S,rippleX:v,rippleY:_,rippleSize:O},d.current)]),d.current+=1,f.current=B},[a]),x=I.useCallback((k={},S={},v=()=>{})=>{const{pulsate:_=!1,center:O=o||S.pulsate,fakeElement:B=!1}=S;if(k?.type==="mousedown"&&h.current){h.current=!1;return}k?.type==="touchstart"&&(h.current=!0);const R=B?null:b.current,L=R?R.getBoundingClientRect():{width:0,height:0,left:0,top:0};let E,N,w;if(O||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)E=Math.round(L.width/2),N=Math.round(L.height/2);else{const{clientX:A,clientY:M}=k.touches&&k.touches.length>0?k.touches[0]:k;E=Math.round(A-L.left),N=Math.round(M-L.top)}if(O)w=Math.sqrt((2*L.width**2+L.height**2)/3),w%2===0&&(w+=1);else{const A=Math.max(Math.abs((R?R.clientWidth:0)-E),E)*2+2,M=Math.max(Math.abs((R?R.clientHeight:0)-N),N)*2+2;w=Math.sqrt(A**2+M**2)}k?.touches?m.current===null&&(m.current=()=>{y({pulsate:_,rippleX:E,rippleY:N,rippleSize:w,cb:v})},p.start(H4,()=>{m.current&&(m.current(),m.current=null)})):y({pulsate:_,rippleX:E,rippleY:N,rippleSize:w,cb:v})},[o,y,p]),T=I.useCallback(()=>{x({},{pulsate:!0})},[x]),C=I.useCallback((k,S)=>{if(p.clear(),k?.type==="touchend"&&m.current){m.current(),m.current=null,p.start(0,()=>{C(k,S)});return}m.current=null,u(v=>v.length>0?v.slice(1):v),f.current=S},[p]);return I.useImperativeHandle(n,()=>({pulsate:T,start:x,stop:C}),[T,x,C]),c.jsx(W4,{className:Ie(Rn.root,a.root,i),ref:b,...s,children:c.jsx(Ri,{component:null,exit:!0,children:l})})});function K4(e){return Be("MuiButtonBase",e)}const G4=Le("MuiButtonBase",["root","disabled","focusVisible"]),Q4=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=_e({root:["root",t&&"disabled",n&&"focusVisible"]},K4,o);return n&&r&&(i.root+=` ${r}`),i},X4=se("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"}}),Zo=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:a=!1,children:i,className:s,component:l="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:h=!1,focusVisibleClassName:p,LinkComponent:m="a",onBlur:b,onClick:y,onContextMenu:x,onDragLeave:T,onFocus:C,onFocusVisible:k,onKeyDown:S,onKeyUp:v,onMouseDown:_,onMouseLeave:O,onMouseUp:B,onTouchEnd:R,onTouchMove:L,onTouchStart:E,tabIndex:N=0,TouchRippleProps:w,touchRippleRef:A,type:M,...W}=r,H=I.useRef(null),$=D4(),D=lt($.ref,A),[V,Q]=I.useState(!1);u&&V&&Q(!1),I.useImperativeHandle(o,()=>({focusVisible:()=>{Q(!0),H.current.focus()}}),[]);const F=$.shouldMount&&!d&&!u;I.useEffect(()=>{V&&h&&!d&&$.pulsate()},[d,h,V,$]);const fe=br($,"start",_,f),J=br($,"stop",x,f),X=br($,"stop",T,f),ee=br($,"stop",B,f),K=br($,"stop",we=>{V&&we.preventDefault(),O&&O(we)},f),te=br($,"start",E,f),oe=br($,"stop",R,f),re=br($,"stop",L,f),pe=br($,"stop",we=>{th(we.target)||Q(!1),b&&b(we)},!1),G=Pe(we=>{H.current||(H.current=we.currentTarget),th(we.target)&&(Q(!0),k&&k(we)),C&&C(we)}),Z=()=>{const we=H.current;return l&&l!=="button"&&!(we.tagName==="A"&&we.href)},xe=Pe(we=>{h&&!we.repeat&&V&&we.key===" "&&$.stop(we,()=>{$.start(we)}),we.target===we.currentTarget&&Z()&&we.key===" "&&we.preventDefault(),S&&S(we),we.target===we.currentTarget&&Z()&&we.key==="Enter"&&!u&&(we.preventDefault(),y&&y(we))}),de=Pe(we=>{h&&we.key===" "&&V&&!we.defaultPrevented&&$.stop(we,()=>{$.pulsate(we)}),v&&v(we),y&&we.target===we.currentTarget&&Z()&&we.key===" "&&!we.defaultPrevented&&y(we)});let be=l;be==="button"&&(W.href||W.to)&&(be=m);const ie={};be==="button"?(ie.type=M===void 0?"button":M,ie.disabled=u):(!W.href&&!W.to&&(ie.role="button"),u&&(ie["aria-disabled"]=u));const Ae=lt(n,H),ve={...r,centerRipple:a,component:l,disabled:u,disableRipple:d,disableTouchRipple:f,focusRipple:h,tabIndex:N,focusVisible:V},Ve=Q4(ve);return c.jsxs(X4,{as:be,className:Ie(Ve.root,s),ownerState:ve,onBlur:pe,onClick:y,onContextMenu:J,onFocus:G,onKeyDown:xe,onKeyUp:de,onMouseDown:fe,onMouseLeave:K,onMouseUp:ee,onDragLeave:X,onTouchEnd:oe,onTouchMove:re,onTouchStart:te,ref:Ae,tabIndex:u?-1:N,type:M,...ie,...W,children:[i,F?c.jsx(Y4,{ref:D,center:a,...w}):null]})});function br(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 Cn(e=[]){return([,t])=>t&&J4(t,e)}function eI(e){return Be("MuiCircularProgress",e)}Le("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Fr=44,dc=Rt.keyframes`
166
+ 0% {
167
+ transform: rotate(0deg);
168
+ }
169
+
170
+ 100% {
171
+ transform: rotate(360deg);
172
+ }
173
+ `,fc=Rt.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
+ `,tI=typeof dc!="string"?Rt.css`
189
+ animation: ${dc} 1.4s linear infinite;
190
+ `:null,nI=typeof fc!="string"?Rt.css`
191
+ animation: ${fc} 1.4s ease-in-out infinite;
192
+ `:null,rI=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,a={root:["root",n,`color${De(r)}`],svg:["svg"],circle:["circle",`circle${De(n)}`,o&&"circleDisableShrink"]};return _e(a,eI,t)},oI=se("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${De(n.color)}`]]}})(nt(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:tI||{animation:`${dc} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Cn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),aI=se("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),iI=se("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${De(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(nt(({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:nI||{animation:`${fc} 1.4s ease-in-out infinite`}}]}))),gd=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiCircularProgress"}),{className:o,color:a="primary",disableShrink:i=!1,size:s=40,style:l,thickness:u=3.6,value:d=0,variant:f="indeterminate",...h}=r,p={...r,color:a,disableShrink:i,size:s,thickness:u,value:d,variant:f},m=rI(p),b={},y={},x={};if(f==="determinate"){const T=2*Math.PI*((Fr-u)/2);b.strokeDasharray=T.toFixed(3),x["aria-valuenow"]=Math.round(d),b.strokeDashoffset=`${((100-d)/100*T).toFixed(3)}px`,y.transform="rotate(-90deg)"}return c.jsx(oI,{className:Ie(m.root,o),style:{width:s,height:s,...y,...l},ownerState:p,ref:n,role:"progressbar",...x,...h,children:c.jsx(aI,{className:m.svg,ownerState:p,viewBox:`${Fr/2} ${Fr/2} ${Fr} ${Fr}`,children:c.jsx(iI,{className:m.circle,style:b,ownerState:p,cx:Fr,cy:Fr,r:(Fr-u)/2,fill:"none",strokeWidth:u})})})});function sI(e){return Be("MuiButton",e)}const Qr=Le("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"]),lI=I.createContext({}),uI=I.createContext(void 0),cI=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:a,loading:i,loadingPosition:s,classes:l}=e,u={root:["root",i&&"loading",a,`${a}${De(t)}`,`size${De(o)}`,`${a}Size${De(o)}`,`color${De(t)}`,n&&"disableElevation",r&&"fullWidth",i&&`loadingPosition${De(s)}`],startIcon:["icon","startIcon",`iconSize${De(o)}`],endIcon:["icon","endIcon",`iconSize${De(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=_e(u,sI,l);return{...l,...d}},C1=[{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}}}],dI=se(Zo,{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}${De(n.color)}`],t[`size${De(n.size)}`],t[`${n.variant}Size${De(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(nt(({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"},[`&.${Qr.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]},[`&.${Qr.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Qr.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)",[`&.${Qr.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(Cn()).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"},[`&.${Qr.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Qr.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}),[`&.${Qr.loading}`]:{color:"transparent"}}}]}})),fI=se("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${De(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}},...C1]})),pI=se("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${De(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}},...C1]})),hI=se("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}}]})),ah=se("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Ot=I.forwardRef(function(t,n){const r=I.useContext(lI),o=I.useContext(uI),a=li(r,t),i=Xe({props:a,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:d,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:p=!1,endIcon:m,focusVisibleClassName:b,fullWidth:y=!1,id:x,loading:T=null,loadingIndicator:C,loadingPosition:k="center",size:S="medium",startIcon:v,type:_,variant:O="text",...B}=i,R=Kn(x),L=C??c.jsx(gd,{"aria-labelledby":R,color:"inherit",size:16}),E={...i,color:l,component:u,disabled:f,disableElevation:h,disableFocusRipple:p,fullWidth:y,loading:T,loadingIndicator:L,loadingPosition:k,size:S,type:_,variant:O},N=cI(E),w=(v||T&&k==="start")&&c.jsx(fI,{className:N.startIcon,ownerState:E,children:v||c.jsx(ah,{className:N.loadingIconPlaceholder,ownerState:E})}),A=(m||T&&k==="end")&&c.jsx(pI,{className:N.endIcon,ownerState:E,children:m||c.jsx(ah,{className:N.loadingIconPlaceholder,ownerState:E})}),M=o||"",W=typeof T=="boolean"?c.jsx("span",{className:N.loadingWrapper,style:{display:"contents"},children:T&&c.jsx(hI,{className:N.loadingIndicator,ownerState:E,children:L})}):null;return c.jsxs(dI,{ownerState:E,className:Ie(r.className,N.root,d,M),component:u,disabled:f||T,focusRipple:!p,focusVisibleClassName:Ie(N.focusVisible,b),ref:n,type:_,id:T?R:x,...B,classes:N,children:[w,k!=="end"&&W,s,k==="end"&&W,A]})});function T1(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function mI(e){const t=Vt(e);return t.body===e?Tr(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ti(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ih(e){return parseInt(Tr(e).getComputedStyle(e).paddingRight,10)||0}function gI(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 sh(e,t,n,r,o){const a=[t,n,...r];[].forEach.call(e.children,i=>{const s=!a.includes(i),l=!gI(i);s&&l&&ti(i,o)})}function Cu(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function bI(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(mI(r)){const i=T1(Tr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${ih(r)+i}px`;const s=Vt(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${ih(l)+i}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=Vt(r).body;else{const i=r.parentElement,s=Tr(r);a=i?.nodeName==="HTML"&&s.getComputedStyle(i).overflowY==="scroll"?i:r}n.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{n.forEach(({value:a,el:i,property:s})=>{a?i.style.setProperty(s,a):i.style.removeProperty(s)})}}function yI(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class xI{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&&ti(t.modalRef,!1);const o=yI(n);sh(n,t.mount,t.modalRef,o,!0);const a=Cu(this.containers,i=>i.container===n);return a!==-1?(this.containers[a].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Cu(this.containers,a=>a.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=bI(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Cu(this.containers,i=>i.modals.includes(t)),a=this.containers[o];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&ti(t.modalRef,n),sh(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(o,1);else{const i=a.modals[a.modals.length-1];i.modalRef&&ti(i.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function ma(e){return parseInt(I.version,10)>=19?e?.props?.ref||null:e?.ref||null}const EI=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function CI(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 TI(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 vI(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||TI(e))}function SI(e){const t=[],n=[];return Array.from(e.querySelectorAll(EI)).forEach((r,o)=>{const a=CI(r);a===-1||!vI(r)||(a===0?t.push(r):n.push({documentOrder:o,tabIndex:a,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 kI(){return!0}function v1(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:a=SI,isEnabled:i=kI,open:s}=e,l=I.useRef(!1),u=I.useRef(null),d=I.useRef(null),f=I.useRef(null),h=I.useRef(null),p=I.useRef(!1),m=I.useRef(null),b=lt(ma(t),m),y=I.useRef(null);I.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),I.useEffect(()=>{if(!s||!m.current)return;const C=Vt(m.current);return m.current.contains(C.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),p.current&&m.current.focus()),()=>{o||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[s]),I.useEffect(()=>{if(!s||!m.current)return;const C=Vt(m.current),k=_=>{y.current=_,!(r||!i()||_.key!=="Tab")&&C.activeElement===m.current&&_.shiftKey&&(l.current=!0,d.current&&d.current.focus())},S=()=>{const _=m.current;if(_===null)return;if(!C.hasFocus()||!i()||l.current){l.current=!1;return}if(_.contains(C.activeElement)||r&&C.activeElement!==u.current&&C.activeElement!==d.current)return;if(C.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!p.current)return;let O=[];if((C.activeElement===u.current||C.activeElement===d.current)&&(O=a(m.current)),O.length>0){const B=!!(y.current?.shiftKey&&y.current?.key==="Tab"),R=O[0],L=O[O.length-1];typeof R!="string"&&typeof L!="string"&&(B?L.focus():R.focus())}else _.focus()};C.addEventListener("focusin",S),C.addEventListener("keydown",k,!0);const v=setInterval(()=>{C.activeElement&&C.activeElement.tagName==="BODY"&&S()},50);return()=>{clearInterval(v),C.removeEventListener("focusin",S),C.removeEventListener("keydown",k,!0)}},[n,r,o,i,s,a]);const x=C=>{f.current===null&&(f.current=C.relatedTarget),p.current=!0,h.current=C.target;const k=t.props.onFocus;k&&k(C)},T=C=>{f.current===null&&(f.current=C.relatedTarget),p.current=!0};return c.jsxs(I.Fragment,{children:[c.jsx("div",{tabIndex:s?0:-1,onFocus:T,ref:u,"data-testid":"sentinelStart"}),I.cloneElement(t,{ref:b,onFocus:x}),c.jsx("div",{tabIndex:s?0:-1,onFocus:T,ref:d,"data-testid":"sentinelEnd"})]})}function DI(e){return typeof e=="function"?e():e}const S1=I.forwardRef(function(t,n){const{children:r,container:o,disablePortal:a=!1}=t,[i,s]=I.useState(null),l=lt(I.isValidElement(r)?ma(r):null,n);if(Wt(()=>{a||s(DI(o)||document.body)},[o,a]),Wt(()=>{if(i&&!a)return _u(n,i),()=>{_u(n,null)}},[n,i,a]),a){if(I.isValidElement(r)){const u={ref:l};return I.cloneElement(r,u)}return r}return i&&ly.createPortal(r,i)});function Jo(e){return typeof e=="string"}function k1(e,t,n){return e===void 0||Jo(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function xl(e,t,n){return typeof e=="function"?e(t,n):e}function js(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 lh(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 D1(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:a}=e;if(!t){const p=Ie(n?.className,a,o?.className,r?.className),m={...n?.style,...o?.style,...r?.style},b={...n,...o,...r};return p.length>0&&(b.className=p),Object.keys(m).length>0&&(b.style=m),{props:b,internalRef:void 0}}const i=js({...o,...r}),s=lh(r),l=lh(o),u=t(i),d=Ie(u?.className,n?.className,a,o?.className,r?.className),f={...u?.style,...n?.style,...o?.style,...r?.style},h={...u,...n,...l,...s};return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:u.ref}}function ct(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:a,internalForwardedProps:i,shouldForwardComponentProp:s=!1,...l}=t,{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0},...h}=a,p=d[e]||r,m=xl(f[e],o),{props:{component:b,...y},internalRef:x}=D1({className:n,...l,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m}),T=lt(x,m?.ref,t.ref),C=e==="root"?b||u:b,k=k1(p,{...e==="root"&&!u&&!d[e]&&i,...e!=="root"&&!d[e]&&i,...y,...C&&!s&&{as:C},...C&&s&&{component:C},ref:T},o);return[p,k]}const w1=e=>e.scrollTop;function $s(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 wI={entering:{opacity:1},entered:{opacity:1}},mo=I.forwardRef(function(t,n){const r=yo(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:i=!0,children:s,easing:l,in:u,onEnter:d,onEntered:f,onEntering:h,onExit:p,onExited:m,onExiting:b,style:y,timeout:x=o,TransitionComponent:T=Qn,...C}=t,k=I.useRef(null),S=lt(k,ma(s),n),v=w=>A=>{if(w){const M=k.current;A===void 0?w(M):w(M,A)}},_=v(h),O=v((w,A)=>{w1(w);const M=$s({style:y,timeout:x,easing:l},{mode:"enter"});w.style.webkitTransition=r.transitions.create("opacity",M),w.style.transition=r.transitions.create("opacity",M),d&&d(w,A)}),B=v(f),R=v(b),L=v(w=>{const A=$s({style:y,timeout:x,easing:l},{mode:"exit"});w.style.webkitTransition=r.transitions.create("opacity",A),w.style.transition=r.transitions.create("opacity",A),p&&p(w)}),E=v(m),N=w=>{a&&a(k.current,w)};return c.jsx(T,{appear:i,in:u,nodeRef:k,onEnter:O,onEntered:B,onEntering:_,onExit:L,onExited:E,onExiting:R,addEndListener:N,timeout:x,...C,children:(w,{ownerState:A,...M})=>I.cloneElement(s,{style:{opacity:0,visibility:w==="exited"&&!u?"hidden":void 0,...wI[w],...y,...s.props.style},ref:S,...M})})});function AI(e){return Be("MuiBackdrop",e)}Le("MuiBackdrop",["root","invisible"]);const II=e=>{const{classes:t,invisible:n}=e;return _e({root:["root",n&&"invisible"]},AI,t)},PI=se("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"}}]}),A1=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiBackdrop"}),{children:o,className:a,component:i="div",invisible:s=!1,open:l,components:u={},componentsProps:d={},slotProps:f={},slots:h={},TransitionComponent:p,transitionDuration:m,...b}=r,y={...r,component:i,invisible:s},x=II(y),T={transition:p,root:u.Root,...h},C={...d,...f},k={component:i,slots:T,slotProps:C},[S,v]=ct("root",{elementType:PI,externalForwardedProps:k,className:Ie(x.root,a),ownerState:y}),[_,O]=ct("transition",{elementType:mo,externalForwardedProps:k,ownerState:y});return c.jsx(_,{in:l,timeout:m,...b,...O,children:c.jsx(S,{"aria-hidden":!0,...v,classes:x,ref:n,children:o})})});function RI(e){return typeof e=="function"?e():e}function MI(e){return e?e.props.hasOwnProperty("in"):!1}const uh=()=>{},Gi=new xI;function OI(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:i,children:s,onClose:l,open:u,rootRef:d}=e,f=I.useRef({}),h=I.useRef(null),p=I.useRef(null),m=lt(p,d),[b,y]=I.useState(!u),x=MI(s);let T=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(T=!1);const C=()=>Vt(h.current),k=()=>(f.current.modalRef=p.current,f.current.mount=h.current,f.current),S=()=>{Gi.mount(k(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},v=Pe(()=>{const A=RI(t)||C().body;Gi.add(k(),A),p.current&&S()}),_=()=>Gi.isTopModal(k()),O=Pe(A=>{h.current=A,A&&(u&&_()?S():p.current&&ti(p.current,T))}),B=I.useCallback(()=>{Gi.remove(k(),T)},[T]);I.useEffect(()=>()=>{B()},[B]),I.useEffect(()=>{u?v():(!x||!o)&&B()},[u,B,x,o,v]);const R=A=>M=>{A.onKeyDown?.(M),!(M.key!=="Escape"||M.which===229||!_())&&(n||(M.stopPropagation(),l&&l(M,"escapeKeyDown")))},L=A=>M=>{A.onClick?.(M),M.target===M.currentTarget&&l&&l(M,"backdropClick")};return{getRootProps:(A={})=>{const M=js(e);delete M.onTransitionEnter,delete M.onTransitionExited;const W={...M,...A};return{role:"presentation",...W,onKeyDown:R(W),ref:m}},getBackdropProps:(A={})=>{const M=A;return{"aria-hidden":!0,...M,onClick:L(M),open:u}},getTransitionProps:()=>{const A=()=>{y(!1),a&&a()},M=()=>{y(!0),i&&i(),o&&B()};return{onEnter:Xd(A,s?.props.onEnter??uh),onExited:Xd(M,s?.props.onExited??uh)}},rootRef:m,portalRef:O,isTopModal:_,exited:b,hasTransition:x}}function NI(e){return Be("MuiModal",e)}Le("MuiModal",["root","hidden","backdrop"]);const LI=e=>{const{open:t,exited:n,classes:r}=e;return _e({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},NI,r)},FI=se("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(nt(({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"}}]}))),_I=se(A1,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),I1=I.forwardRef(function(t,n){const r=Xe({name:"MuiModal",props:t}),{BackdropComponent:o=_I,BackdropProps:a,classes:i,className:s,closeAfterTransition:l=!1,children:u,container:d,component:f,components:h={},componentsProps:p={},disableAutoFocus:m=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:y=!1,disablePortal:x=!1,disableRestoreFocus:T=!1,disableScrollLock:C=!1,hideBackdrop:k=!1,keepMounted:S=!1,onClose:v,onTransitionEnter:_,onTransitionExited:O,open:B,slotProps:R={},slots:L={},theme:E,...N}=r,w={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:b,disableEscapeKeyDown:y,disablePortal:x,disableRestoreFocus:T,disableScrollLock:C,hideBackdrop:k,keepMounted:S},{getRootProps:A,getBackdropProps:M,getTransitionProps:W,portalRef:H,isTopModal:$,exited:D,hasTransition:V}=OI({...w,rootRef:n}),Q={...w,exited:D},F=LI(Q),fe={};if(u.props.tabIndex===void 0&&(fe.tabIndex="-1"),V){const{onEnter:oe,onExited:re}=W();fe.onEnter=oe,fe.onExited=re}const J={slots:{root:h.Root,backdrop:h.Backdrop,...L},slotProps:{...p,...R}},[X,ee]=ct("root",{ref:n,elementType:FI,externalForwardedProps:{...J,...N,component:f},getSlotProps:A,ownerState:Q,className:Ie(s,F?.root,!Q.open&&Q.exited&&F?.hidden)}),[K,te]=ct("backdrop",{ref:a?.ref,elementType:o,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:a,getSlotProps:oe=>M({...oe,onClick:re=>{oe?.onClick&&oe.onClick(re)}}),className:Ie(a?.className,F?.backdrop),ownerState:Q});return!S&&!B&&(!V||D)?null:c.jsx(S1,{ref:H,container:d,disablePortal:x,children:c.jsxs(X,{...ee,children:[!k&&o?c.jsx(K,{...te}):null,c.jsx(v1,{disableEnforceFocus:b,disableAutoFocus:m,disableRestoreFocus:T,isEnabled:$,open:B,children:I.cloneElement(u,fe)})]})})});function BI(e){return Be("MuiPaper",e)}Le("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 jI=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,a={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return _e(a,BI,o)},$I=se("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}`]]}})(nt(({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)"}}]}))),To=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiPaper"}),o=yo(),{className:a,component:i="div",elevation:s=1,square:l=!1,variant:u="elevation",...d}=r,f={...r,component:i,elevation:s,square:l,variant:u},h=jI(f);return c.jsx($I,{as:i,ownerState:f,className:Ie(h.root,a),ref:n,...d,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(${vs("#fff",Fu(s))}, ${vs("#fff",Fu(s))})`}},...d.style}})});function HI(e){return Be("MuiDialog",e)}const ni=Le("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),P1=I.createContext({}),UI=se(A1,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),zI=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e,i={root:["root"],container:["container",`scroll${De(n)}`],paper:["paper",`paperScroll${De(n)}`,`paperWidth${De(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return _e(i,HI,t)},VI=se(I1,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),WI=se("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${De(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"}}}]}),qI=se(To,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${De(n.scroll)}`],t[`paperWidth${De(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(nt(({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)`,[`&.${ni.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}`,[`&.${ni.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,[`&.${ni.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),Ar=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialog"}),o=yo(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:p=!1,fullScreen:m=!1,fullWidth:b=!1,maxWidth:y="sm",onClick:x,onClose:T,open:C,PaperComponent:k=To,PaperProps:S={},scroll:v="paper",slots:_={},slotProps:O={},TransitionComponent:B=mo,transitionDuration:R=a,TransitionProps:L,...E}=r,N={...r,disableEscapeKeyDown:p,fullScreen:m,fullWidth:b,maxWidth:y,scroll:v},w=zI(N),A=I.useRef(),M=G=>{A.current=G.target===G.currentTarget},W=G=>{x&&x(G),A.current&&(A.current=null,T&&T(G,"backdropClick"))},H=Kn(s),$=I.useMemo(()=>({titleId:H}),[H]),D={transition:B,..._},V={transition:L,paper:S,backdrop:d,...O},Q={slots:D,slotProps:V},[F,fe]=ct("root",{elementType:VI,shouldForwardComponentProp:!0,externalForwardedProps:Q,ownerState:N,className:Ie(w.root,h),ref:n}),[J,X]=ct("backdrop",{elementType:UI,shouldForwardComponentProp:!0,externalForwardedProps:Q,ownerState:N}),[ee,K]=ct("paper",{elementType:qI,shouldForwardComponentProp:!0,externalForwardedProps:Q,ownerState:N,className:Ie(w.paper,S.className)}),[te,oe]=ct("container",{elementType:WI,externalForwardedProps:Q,ownerState:N,className:w.container}),[re,pe]=ct("transition",{elementType:mo,externalForwardedProps:Q,ownerState:N,additionalProps:{appear:!0,in:C,timeout:R,role:"presentation"}});return c.jsx(F,{closeAfterTransition:!0,slots:{backdrop:J},slotProps:{backdrop:{transitionDuration:R,as:u,...X}},disableEscapeKeyDown:p,onClose:T,open:C,onClick:W,...fe,...E,children:c.jsx(re,{...pe,children:c.jsx(te,{onMouseDown:M,...oe,children:c.jsx(ee,{as:k,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":H,"aria-modal":l,...K,children:c.jsx(P1.Provider,{value:$,children:f})})})})})});function YI(e){return Be("MuiTypography",e)}Le("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const KI={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},GI=P2(),QI=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:i}=e,s={root:["root",a,e.align!=="inherit"&&`align${De(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return _e(s,YI,i)},XI=se("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${De(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(nt(({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(Cn()).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${De(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}}]}))),ch={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},mt=I.forwardRef(function(t,n){const{color:r,...o}=Xe({props:t,name:"MuiTypography"}),a=!KI[r],i=GI({...o,...a&&{color:r}}),{align:s="inherit",className:l,component:u,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:p="body1",variantMapping:m=ch,...b}=i,y={...i,align:s,color:r,className:l,component:u,gutterBottom:d,noWrap:f,paragraph:h,variant:p,variantMapping:m},x=u||(h?"p":m[p]||ch[p])||"span",T=QI(y);return c.jsx(XI,{as:x,ref:n,className:Ie(T.root,l),...b,ownerState:y,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...b.style}})});function ZI(e){return Be("MuiDialogTitle",e)}const JI=Le("MuiDialogTitle",["root"]),eP=e=>{const{classes:t}=e;return _e({root:["root"]},ZI,t)},tP=se(mt,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),Wr=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogTitle"}),{className:o,id:a,...i}=r,s=r,l=eP(s),{titleId:u=a}=I.useContext(P1);return c.jsx(tP,{component:"h2",className:Ie(l.root,o),ownerState:s,ref:n,variant:"h6",id:a??u,...i})});function nP(e){return Be("MuiDialogContent",e)}Le("MuiDialogContent",["root","dividers"]);const rP=e=>{const{classes:t,dividers:n}=e;return _e({root:["root",n&&"dividers"]},nP,t)},oP=se("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(nt(({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:{[`.${JI.root} + &`]:{paddingTop:0}}}]}))),Ir=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogContent"}),{className:o,dividers:a=!1,...i}=r,s={...r,dividers:a},l=rP(s);return c.jsx(oP,{className:Ie(l.root,o),ownerState:s,ref:n,...i})});function aP(e){return Be("MuiDialogActions",e)}Le("MuiDialogActions",["root","spacing"]);const iP=e=>{const{classes:t,disableSpacing:n}=e;return _e({root:["root",!n&&"spacing"]},aP,t)},sP=se("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}}}]}),Pr=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:a=!1,...i}=r,s={...r,disableSpacing:a},l=iP(s);return c.jsx(sP,{className:Ie(l.root,o),ownerState:s,ref:n,...i})});function lP(e){return Be("MuiIconButton",e)}const dh=Le("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),uP=e=>{const{classes:t,disabled:n,color:r,edge:o,size:a,loading:i}=e,s={root:["root",i&&"loading",n&&"disabled",r!=="default"&&`color${De(r)}`,o&&`edge${De(o)}`,`size${De(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return _e(s,lP,t)},cP=se(Zo,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${De(n.color)}`],n.edge&&t[`edge${De(n.edge)}`],t[`size${De(n.size)}`]]}})(nt(({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}}]})),nt(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Cn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Cn()).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)}}],[`&.${dh.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${dh.loading}`]:{color:"transparent"}}))),dP=se("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"}}]})),Sn=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiIconButton"}),{edge:o=!1,children:a,className:i,color:s="default",disabled:l=!1,disableFocusRipple:u=!1,size:d="medium",id:f,loading:h=null,loadingIndicator:p,...m}=r,b=Kn(f),y=p??c.jsx(gd,{"aria-labelledby":b,color:"inherit",size:16}),x={...r,edge:o,color:s,disabled:l,disableFocusRipple:u,loading:h,loadingIndicator:y,size:d},T=uP(x);return c.jsxs(cP,{id:h?b:f,className:Ie(T.root,i),centerRipple:!0,focusRipple:!u,disabled:l||h,ref:n,...m,ownerState:x,children:[typeof h=="boolean"&&c.jsx("span",{className:T.loadingWrapper,style:{display:"contents"},children:c.jsx(dP,{className:T.loadingIndicator,ownerState:x,children:h&&y})}),a]})});function fP({resourceUri:e,onCloseDialog:t}){const[n,r]=z.useState(!1),{apiClients:o}=it.useServer(),a=Dr.useQueryClient(),[i,s]=z.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},{environmentName:d,packageName:f}=Nt(e),h=ir({mutationFn:()=>o.packages.deletePackage(d,f),onSuccess(){u(),a.invalidateQueries({queryKey:["packages"]}),s("Package deleted successfully")},onError(p){s(p instanceof Error?p.message:"An unknown error occurred")}});return c.jsxs(z.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:l,children:[c.jsx(P.ListItemIcon,{children:c.jsx(vn.Delete,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Delete"})]}),c.jsxs(Ar,{onClose:u,"aria-labelledby":"customized-dialog-title",open:n,children:[c.jsx(Wr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Package"}),c.jsx(Sn,{"aria-label":"close",onClick:u,sx:p=>({position:"absolute",right:8,top:8,color:p.palette.grey[500]}),children:c.jsx(vr,{})}),c.jsx(Ir,{dividers:!0,children:c.jsxs(mt,{gutterBottom:!0,children:['Are you sure you want to delete "',f,'"? This action cannot be undone.']})}),c.jsxs(Pr,{children:[c.jsx(Ot,{variant:"outlined",onClick:u,style:{borderColor:io.teal,color:io.teal},children:"Cancel"}),c.jsx(Ot,{variant:"contained",autoFocus:!0,onClick:()=>h.mutate(),color:"error",loading:h.isPending,children:"Delete"})]}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>s(""),message:i})]})]})}function pP(e){return Be("MuiDialogContentText",e)}Le("MuiDialogContentText",["root"]);const hP=e=>{const{classes:t}=e,r=_e({root:["root"]},pP,t);return{...t,...r}},mP=se(mt,{shouldForwardProp:e=>Dn(e)||e==="classes",name:"MuiDialogContentText",slot:"Root"})({}),Mi=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiDialogContentText"}),{children:o,className:a,...i}=r,s=hP(i);return c.jsx(mP,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:i,className:Ie(s.root,a),...r,classes:s})});function Qi(e){return parseInt(e,10)||0}const gP={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function bP(e){for(const t in e)return!1;return!0}function fh(e){return bP(e)||e.outerHeightStyle===0&&!e.overflowing}const yP=I.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:a=1,style:i,value:s,...l}=t,{current:u}=I.useRef(s!=null),d=I.useRef(null),f=lt(n,d),h=I.useRef(null),p=I.useRef(null),m=I.useCallback(()=>{const C=d.current,k=p.current;if(!C||!k)return;const v=Tr(C).getComputedStyle(C);if(v.width==="0px")return{outerHeightStyle:0,overflowing:!1};k.style.width=v.width,k.value=C.value||t.placeholder||"x",k.value.slice(-1)===`
193
+ `&&(k.value+=" ");const _=v.boxSizing,O=Qi(v.paddingBottom)+Qi(v.paddingTop),B=Qi(v.borderBottomWidth)+Qi(v.borderTopWidth),R=k.scrollHeight;k.value="x";const L=k.scrollHeight;let E=R;a&&(E=Math.max(Number(a)*L,E)),o&&(E=Math.min(Number(o)*L,E)),E=Math.max(E,L);const N=E+(_==="border-box"?O+B:0),w=Math.abs(E-R)<=1;return{outerHeightStyle:N,overflowing:w}},[o,a,t.placeholder]),b=Pe(()=>{const C=d.current,k=m();if(!C||!k||fh(k))return!1;const S=k.outerHeightStyle;return h.current!=null&&h.current!==S}),y=I.useCallback(()=>{const C=d.current,k=m();if(!C||!k||fh(k))return;const S=k.outerHeightStyle;h.current!==S&&(h.current=S,C.style.height=`${S}px`),C.style.overflow=k.overflowing?"hidden":""},[m]),x=I.useRef(-1);Wt(()=>{const C=Bm(y),k=d?.current;if(!k)return;const S=Tr(k);S.addEventListener("resize",C);let v;return typeof ResizeObserver<"u"&&(v=new ResizeObserver(()=>{b()&&(v.unobserve(k),cancelAnimationFrame(x.current),y(),x.current=requestAnimationFrame(()=>{v.observe(k)}))}),v.observe(k)),()=>{C.clear(),cancelAnimationFrame(x.current),S.removeEventListener("resize",C),v&&v.disconnect()}},[m,y,b]),Wt(()=>{y()});const T=C=>{u||y();const k=C.target,S=k.value.length,v=k.value.endsWith(`
194
+ `),_=k.selectionStart===S;v&&_&&k.setSelectionRange(S,S),r&&r(C)};return c.jsxs(I.Fragment,{children:[c.jsx("textarea",{value:s,onChange:T,ref:f,rows:a,style:i,...l}),c.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...gP.shadow,...i,paddingTop:0,paddingBottom:0}})]})});function ga({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 El=I.createContext(void 0);function Xn(){return I.useContext(El)}function ph(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Hs(e,t=!1){return e&&(ph(e.value)&&e.value!==""||t&&ph(e.defaultValue)&&e.defaultValue!=="")}function xP(e){return e.startAdornment}function EP(e){return Be("MuiInputBase",e)}const yn=Le("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var hh;const Cl=(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${De(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Tl=(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]},CP=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:a,focused:i,formControl:s,fullWidth:l,hiddenLabel:u,multiline:d,readOnly:f,size:h,startAdornment:p,type:m}=e,b={root:["root",`color${De(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",i&&"focused",s&&"formControl",h&&h!=="medium"&&`size${De(h)}`,d&&"multiline",p&&"adornedStart",a&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",d&&"inputMultiline",h==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",p&&"inputAdornedStart",a&&"inputAdornedEnd",f&&"readOnly"]};return _e(b,EP,t)},vl=se("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Cl})(nt(({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",[`&.${yn.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%"}}]}))),Sl=se("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Tl})(nt(({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] + .${yn.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},[`&.${yn.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:a})=>!a.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:a})=>a.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),mh=I2({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),bd=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:a,autoFocus:i,className:s,color:l,components:u={},componentsProps:d={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:p,endAdornment:m,error:b,fullWidth:y=!1,id:x,inputComponent:T="input",inputProps:C={},inputRef:k,margin:S,maxRows:v,minRows:_,multiline:O=!1,name:B,onBlur:R,onChange:L,onClick:E,onFocus:N,onKeyDown:w,onKeyUp:A,placeholder:M,readOnly:W,renderSuffix:H,rows:$,size:D,slotProps:V={},slots:Q={},startAdornment:F,type:fe="text",value:J,...X}=r,ee=C.value!=null?C.value:J,{current:K}=I.useRef(ee!=null),te=I.useRef(),oe=I.useCallback(Ne=>{},[]),re=lt(te,k,C.ref,oe),[pe,G]=I.useState(!1),Z=Xn(),xe=ga({props:r,muiFormControl:Z,states:["color","disabled","error","hiddenLabel","size","required","filled"]});xe.focused=Z?Z.focused:pe,I.useEffect(()=>{!Z&&h&&pe&&(G(!1),R&&R())},[Z,h,pe,R]);const de=Z&&Z.onFilled,be=Z&&Z.onEmpty,ie=I.useCallback(Ne=>{Hs(Ne)?de&&de():be&&be()},[de,be]);Wt(()=>{K&&ie({value:ee})},[ee,ie,K]);const Ae=Ne=>{N&&N(Ne),C.onFocus&&C.onFocus(Ne),Z&&Z.onFocus?Z.onFocus(Ne):G(!0)},ve=Ne=>{R&&R(Ne),C.onBlur&&C.onBlur(Ne),Z&&Z.onBlur?Z.onBlur(Ne):G(!1)},Ve=(Ne,...ot)=>{if(!K){const xt=Ne.target||te.current;if(xt==null)throw new Error(Er(1));ie({value:xt.value})}C.onChange&&C.onChange(Ne,...ot),L&&L(Ne,...ot)};I.useEffect(()=>{ie(te.current)},[]);const we=Ne=>{te.current&&Ne.currentTarget===Ne.target&&te.current.focus(),E&&E(Ne)};let At=T,rt=C;O&&At==="input"&&($?rt={type:void 0,minRows:$,maxRows:$,...rt}:rt={type:void 0,maxRows:v,minRows:_,...rt},At=yP);const Ye=Ne=>{ie(Ne.animationName==="mui-auto-fill-cancel"?te.current:{value:"x"})};I.useEffect(()=>{Z&&Z.setAdornedStart(!!F)},[Z,F]);const le={...r,color:xe.color||"primary",disabled:xe.disabled,endAdornment:m,error:xe.error,focused:xe.focused,formControl:Z,fullWidth:y,hiddenLabel:xe.hiddenLabel,multiline:O,size:xe.size,startAdornment:F,type:fe},Ce=CP(le),Oe=Q.root||u.Root||vl,He=V.root||d.root||{},je=Q.input||u.Input||Sl;return rt={...rt,...V.input??d.input},c.jsxs(I.Fragment,{children:[!p&&typeof mh=="function"&&(hh||(hh=c.jsx(mh,{}))),c.jsxs(Oe,{...He,ref:n,onClick:we,...X,...!Jo(Oe)&&{ownerState:{...le,...He.ownerState}},className:Ie(Ce.root,He.className,s,W&&"MuiInputBase-readOnly"),children:[F,c.jsx(El.Provider,{value:null,children:c.jsx(je,{"aria-invalid":xe.error,"aria-describedby":o,autoComplete:a,autoFocus:i,defaultValue:f,disabled:xe.disabled,id:x,onAnimationStart:Ye,name:B,placeholder:M,readOnly:W,required:xe.required,rows:$,value:ee,onKeyDown:w,onKeyUp:A,type:fe,...rt,...!Jo(je)&&{as:At,ownerState:{...le,...rt.ownerState}},ref:re,className:Ie(Ce.input,rt.className,W&&"MuiInputBase-readOnly"),onBlur:ve,onChange:Ve,onFocus:Ae})}),m,H?H({...xe,startAdornment:F}):null]})]})});function TP(e){return Be("MuiInput",e)}const jr={...yn,...Le("MuiInput",["root","underline","input"])},vP=e=>{const{classes:t,disableUnderline:n}=e,o=_e({root:["root",!n&&"underline"],input:["input"]},TP,t);return{...t,...o}},SP=se(vl,{shouldForwardProp:e=>Dn(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Cl(e,t),!n.disableUnderline&&t.underline]}})(nt(({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"},[`&.${jr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${jr.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(.${jr.disabled}, .${jr.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${jr.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Cn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),kP=se(Sl,{name:"MuiInput",slot:"Input",overridesResolver:Tl})({}),yd=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:a={},componentsProps:i,fullWidth:s=!1,inputComponent:l="input",multiline:u=!1,slotProps:d,slots:f={},type:h="text",...p}=r,m=vP(r),y={root:{ownerState:{disableUnderline:o}}},x=d??i?tn(d??i,y):y,T=f.root??a.Root??SP,C=f.input??a.Input??kP;return c.jsx(bd,{slots:{root:T,input:C},slotProps:x,fullWidth:s,inputComponent:l,multiline:u,ref:n,type:h,...p,classes:m})});yd.muiName="Input";function DP(e){return Be("MuiFilledInput",e)}const xn={...yn,...Le("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},wP=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:a,hiddenLabel:i,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",a==="small"&&`size${De(a)}`,i&&"hiddenLabel",s&&"multiline"],input:["input"]},u=_e(l,DP,t);return{...t,...u}},AP=se(vl,{shouldForwardProp:e=>Dn(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Cl(e,t),!n.disableUnderline&&t.underline]}})(nt(({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)",a=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}},[`&.${xn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${xn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:i})=>!i.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"},[`&.${xn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${xn.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(.${xn.disabled}, .${xn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${xn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Cn()).map(([i])=>({props:{disableUnderline:!1,color:i},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[i]?.main}`}}})),{props:({ownerState:i})=>i.startAdornment,style:{paddingLeft:12}},{props:({ownerState:i})=>i.endAdornment,style:{paddingRight:12}},{props:({ownerState:i})=>i.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:i,size:s})=>i.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel&&i.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),IP=se(Sl,{name:"MuiFilledInput",slot:"Input",overridesResolver:Tl})(nt(({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}}]}))),xd=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:a={},componentsProps:i,fullWidth:s=!1,hiddenLabel:l,inputComponent:u="input",multiline:d=!1,slotProps:f,slots:h={},type:p="text",...m}=r,b={...r,disableUnderline:o,fullWidth:s,inputComponent:u,multiline:d,type:p},y=wP(r),x={root:{ownerState:b},input:{ownerState:b}},T=f??i?tn(x,f??i):x,C=h.root??a.Root??AP,k=h.input??a.Input??IP;return c.jsx(bd,{slots:{root:C,input:k},slotProps:T,fullWidth:s,inputComponent:u,multiline:d,ref:n,type:p,...m,classes:y})});xd.muiName="Input";var gh;const PP=se("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%"}),RP=se("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Dn})(nt(({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 MP(e){const{children:t,classes:n,className:r,label:o,notched:a,...i}=e,s=o!=null&&o!=="",l={...e,notched:a,withLabel:s};return c.jsx(PP,{"aria-hidden":!0,className:r,ownerState:l,...i,children:c.jsx(RP,{ownerState:l,children:s?c.jsx("span",{children:o}):gh||(gh=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}function OP(e){return Be("MuiOutlinedInput",e)}const Pn={...yn,...Le("MuiOutlinedInput",["root","notchedOutline","input"])},NP=e=>{const{classes:t}=e,r=_e({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},OP,t);return{...t,...r}},LP=se(vl,{shouldForwardProp:e=>Dn(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Cl})(nt(({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 .${Pn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Pn.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Pn.focused} .${Pn.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Cn()).map(([n])=>({props:{color:n},style:{[`&.${Pn.focused} .${Pn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Pn.error} .${Pn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Pn.disabled} .${Pn.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"}}]}})),FP=se(MP,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(nt(({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}})),_P=se(Sl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Tl})(nt(({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}}]}))),Ed=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiOutlinedInput"}),{components:o={},fullWidth:a=!1,inputComponent:i="input",label:s,multiline:l=!1,notched:u,slots:d={},slotProps:f={},type:h="text",...p}=r,m=NP(r),b=Xn(),y=ga({props:r,muiFormControl:b,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),x={...r,color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:b,fullWidth:a,hiddenLabel:y.hiddenLabel,multiline:l,size:y.size,type:h},T=d.root??o.Root??LP,C=d.input??o.Input??_P,[k,S]=ct("notchedOutline",{elementType:FP,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:x,externalForwardedProps:{slots:d,slotProps:f},additionalProps:{label:s!=null&&s!==""&&y.required?c.jsxs(I.Fragment,{children:[s," ","*"]}):s}});return c.jsx(bd,{slots:{root:T,input:C},slotProps:f,renderSuffix:v=>c.jsx(k,{...S,notched:typeof u<"u"?u:!!(v.startAdornment||v.filled||v.focused)}),fullWidth:a,inputComponent:i,multiline:l,ref:n,type:h,...p,classes:{...m,notchedOutline:null}})});Ed.muiName="Input";function BP(e){return Be("MuiFormLabel",e)}const ri=Le("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),jP=e=>{const{classes:t,color:n,focused:r,disabled:o,error:a,filled:i,required:s}=e,l={root:["root",`color${De(n)}`,o&&"disabled",a&&"error",i&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",a&&"error"]};return _e(l,BP,t)},$P=se("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(nt(({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(Cn()).map(([t])=>({props:{color:t},style:{[`&.${ri.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${ri.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ri.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),HP=se("span",{name:"MuiFormLabel",slot:"Asterisk"})(nt(({theme:e})=>({[`&.${ri.error}`]:{color:(e.vars||e).palette.error.main}}))),UP=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiFormLabel"}),{children:o,className:a,color:i,component:s="label",disabled:l,error:u,filled:d,focused:f,required:h,...p}=r,m=Xn(),b=ga({props:r,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),y={...r,color:b.color||"primary",component:s,disabled:b.disabled,error:b.error,filled:b.filled,focused:b.focused,required:b.required},x=jP(y);return c.jsxs($P,{as:s,ownerState:y,className:Ie(x.root,a),ref:n,...p,children:[o,b.required&&c.jsxs(HP,{ownerState:y,"aria-hidden":!0,className:x.asterisk,children:[" ","*"]})]})});function zP(e){return Be("MuiInputLabel",e)}Le("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const VP=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:a,variant:i,required:s}=e,l={root:["root",n&&"formControl",!a&&"animated",o&&"shrink",r&&r!=="medium"&&`size${De(r)}`,i],asterisk:[s&&"asterisk"]},u=_e(l,zP,t);return{...t,...u}},WP=se(UP,{shouldForwardProp:e=>Dn(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ri.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]]}})(nt(({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)"}}]}))),Us=I.forwardRef(function(t,n){const r=Xe({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:a,shrink:i,variant:s,className:l,...u}=r,d=Xn();let f=i;typeof f>"u"&&d&&(f=d.filled||d.focused||d.adornedStart);const h=ga({props:r,muiFormControl:d,states:["size","variant","required","focused"]}),p={...r,disableAnimation:o,formControl:d,shrink:f,size:h.size,variant:h.variant,required:h.required,focused:h.focused},m=VP(p);return c.jsx(WP,{"data-shrink":f,ref:n,className:Ie(m.root,l),...u,ownerState:p,classes:m})});function qP(e){return Be("MuiFormControl",e)}Le("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const YP=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${De(n)}`,r&&"fullWidth"]};return _e(o,qP,t)},KP=se("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${De(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%"}}]}),zs=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiFormControl"}),{children:o,className:a,color:i="primary",component:s="div",disabled:l=!1,error:u=!1,focused:d,fullWidth:f=!1,hiddenLabel:h=!1,margin:p="none",required:m=!1,size:b="medium",variant:y="outlined",...x}=r,T={...r,color:i,component:s,disabled:l,error:u,fullWidth:f,hiddenLabel:h,margin:p,required:m,size:b,variant:y},C=YP(T),[k,S]=I.useState(()=>{let A=!1;return o&&I.Children.forEach(o,M=>{if(!ns(M,["Input","Select"]))return;const W=ns(M,["Select"])?M.props.input:M;W&&xP(W.props)&&(A=!0)}),A}),[v,_]=I.useState(()=>{let A=!1;return o&&I.Children.forEach(o,M=>{ns(M,["Input","Select"])&&(Hs(M.props,!0)||Hs(M.props.inputProps,!0))&&(A=!0)}),A}),[O,B]=I.useState(!1);l&&O&&B(!1);const R=d!==void 0&&!l?d:O;let L;I.useRef(!1);const E=I.useCallback(()=>{_(!0)},[]),N=I.useCallback(()=>{_(!1)},[]),w=I.useMemo(()=>({adornedStart:k,setAdornedStart:S,color:i,disabled:l,error:u,filled:v,focused:R,fullWidth:f,hiddenLabel:h,size:b,onBlur:()=>{B(!1)},onFocus:()=>{B(!0)},onEmpty:N,onFilled:E,registerEffect:L,required:m,variant:y}),[k,i,l,u,v,R,f,h,L,N,E,m,b,y]);return c.jsx(El.Provider,{value:w,children:c.jsx(KP,{as:s,ownerState:T,className:Ie(C.root,a),ref:n,...x,children:o})})});function GP(e){return Be("MuiFormHelperText",e)}const bh=Le("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var yh;const QP=e=>{const{classes:t,contained:n,size:r,disabled:o,error:a,filled:i,focused:s,required:l}=e,u={root:["root",o&&"disabled",a&&"error",r&&`size${De(r)}`,n&&"contained",s&&"focused",i&&"filled",l&&"required"]};return _e(u,GP,t)},XP=se("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${De(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(nt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${bh.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${bh.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}}]}))),R1=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiFormHelperText"}),{children:o,className:a,component:i="p",disabled:s,error:l,filled:u,focused:d,margin:f,required:h,variant:p,...m}=r,b=Xn(),y=ga({props:r,muiFormControl:b,states:["variant","size","disabled","error","filled","focused","required"]}),x={...r,component:i,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 T=QP(x);return c.jsx(XP,{as:i,className:Ie(T.root,a),ref:n,...m,ownerState:x,children:o===" "?yh||(yh=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});function ut(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...a}=e,i=o?{}:xl(n,r),{props:s,internalRef:l}=D1({...a,externalSlotProps:i}),u=lt(l,i?.ref,e.additionalProps?.ref);return k1(t,{...s,ref:u},r)}const uo=I.createContext({});function ZP(e){return Be("MuiList",e)}Le("MuiList",["root","padding","dense","subheader"]);const JP=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return _e({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},ZP,t)},e8=se("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}}]}),M1=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiList"}),{children:o,className:a,component:i="ul",dense:s=!1,disablePadding:l=!1,subheader:u,...d}=r,f=I.useMemo(()=>({dense:s}),[s]),h={...r,component:i,dense:s,disablePadding:l},p=JP(h);return c.jsx(uo.Provider,{value:f,children:c.jsxs(e8,{as:i,className:Ie(p.root,a),ref:n,ownerState:h,...d,children:[u,o]})})});function Tu(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function xh(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function O1(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 Pa(e,t,n,r,o,a){let i=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(i)return!1;i=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!O1(s,a)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const t8=I.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:a=!1,children:i,className:s,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:d,variant:f="selectedMenu",...h}=t,p=I.useRef(null),m=I.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Wt(()=>{o&&p.current.focus()},[o]),I.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(C,{direction:k})=>{const S=!p.current.style.width;if(C.clientHeight<p.current.clientHeight&&S){const v=`${T1(Tr(C))}px`;p.current.style[k==="rtl"?"paddingLeft":"paddingRight"]=v,p.current.style.width=`calc(100% + ${v})`}return p.current}}),[]);const b=C=>{const k=p.current,S=C.key;if(C.ctrlKey||C.metaKey||C.altKey){d&&d(C);return}const _=Vt(k).activeElement;if(S==="ArrowDown")C.preventDefault(),Pa(k,_,u,l,Tu);else if(S==="ArrowUp")C.preventDefault(),Pa(k,_,u,l,xh);else if(S==="Home")C.preventDefault(),Pa(k,null,u,l,Tu);else if(S==="End")C.preventDefault(),Pa(k,null,u,l,xh);else if(S.length===1){const O=m.current,B=S.toLowerCase(),R=performance.now();O.keys.length>0&&(R-O.lastTime>500?(O.keys=[],O.repeating=!0,O.previousKeyMatched=!0):O.repeating&&B!==O.keys[0]&&(O.repeating=!1)),O.lastTime=R,O.keys.push(B);const L=_&&!O.repeating&&O1(_,O);O.previousKeyMatched&&(L||Pa(k,_,!1,l,Tu,O))?C.preventDefault():O.previousKeyMatched=!1}d&&d(C)},y=lt(p,n);let x=-1;I.Children.forEach(i,(C,k)=>{if(!I.isValidElement(C)){x===k&&(x+=1,x>=i.length&&(x=-1));return}C.props.disabled||(f==="selectedMenu"&&C.props.selected||x===-1)&&(x=k),x===k&&(C.props.disabled||C.props.muiSkipListHighlight||C.type.muiSkipListHighlight)&&(x+=1,x>=i.length&&(x=-1))});const T=I.Children.map(i,(C,k)=>{if(k===x){const S={};return a&&(S.autoFocus=!0),C.props.tabIndex===void 0&&f==="selectedMenu"&&(S.tabIndex=0),I.cloneElement(C,S)}return C});return c.jsx(M1,{role:"menu",ref:y,className:s,onKeyDown:b,tabIndex:o?0:-1,...h,children:T})});function pc(e){return`scale(${e}, ${e**2})`}const n8={entering:{opacity:1,transform:pc(1)},entered:{opacity:1,transform:"none"}},vu=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),pi=I.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:a,easing:i,in:s,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:h,onExiting:p,style:m,timeout:b="auto",TransitionComponent:y=Qn,...x}=t,T=md(),C=I.useRef(),k=yo(),S=I.useRef(null),v=lt(S,ma(a),n),_=A=>M=>{if(A){const W=S.current;M===void 0?A(W):A(W,M)}},O=_(d),B=_((A,M)=>{w1(A);const{duration:W,delay:H,easing:$}=$s({style:m,timeout:b,easing:i},{mode:"enter"});let D;b==="auto"?(D=k.transitions.getAutoHeightDuration(A.clientHeight),C.current=D):D=W,A.style.transition=[k.transitions.create("opacity",{duration:D,delay:H}),k.transitions.create("transform",{duration:vu?D:D*.666,delay:H,easing:$})].join(","),l&&l(A,M)}),R=_(u),L=_(p),E=_(A=>{const{duration:M,delay:W,easing:H}=$s({style:m,timeout:b,easing:i},{mode:"exit"});let $;b==="auto"?($=k.transitions.getAutoHeightDuration(A.clientHeight),C.current=$):$=M,A.style.transition=[k.transitions.create("opacity",{duration:$,delay:W}),k.transitions.create("transform",{duration:vu?$:$*.666,delay:vu?W:W||$*.333,easing:H})].join(","),A.style.opacity=0,A.style.transform=pc(.75),f&&f(A)}),N=_(h),w=A=>{b==="auto"&&T.start(C.current||0,A),r&&r(S.current,A)};return c.jsx(y,{appear:o,in:s,nodeRef:S,onEnter:B,onEntered:R,onEntering:O,onExit:E,onExited:N,onExiting:L,addEndListener:w,timeout:b==="auto"?null:b,...x,children:(A,{ownerState:M,...W})=>I.cloneElement(a,{style:{opacity:0,transform:pc(.75),visibility:A==="exited"&&!s?"hidden":void 0,...n8[A],...m,...a.props.style},ref:v,...W})})});pi&&(pi.muiSupportAuto=!0);function r8(e){return Be("MuiPopover",e)}Le("MuiPopover",["root","paper"]);function Eh(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Ch(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function Th(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Xi(e){return typeof e=="function"?e():e}const o8=e=>{const{classes:t}=e;return _e({root:["root"],paper:["paper"]},r8,t)},a8=se(I1,{name:"MuiPopover",slot:"Root"})({}),N1=se(To,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),i8=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiPopover"}),{action:o,anchorEl:a,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:u,className:d,container:f,elevation:h=8,marginThreshold:p=16,open:m,PaperProps:b={},slots:y={},slotProps:x={},transformOrigin:T={vertical:"top",horizontal:"left"},TransitionComponent:C,transitionDuration:k="auto",TransitionProps:S={},disableScrollLock:v=!1,..._}=r,O=I.useRef(),B={...r,anchorOrigin:i,anchorReference:l,elevation:h,marginThreshold:p,transformOrigin:T,TransitionComponent:C,transitionDuration:k,TransitionProps:S},R=o8(B),L=I.useCallback(()=>{if(l==="anchorPosition")return s;const oe=Xi(a),pe=(oe&&oe.nodeType===1?oe:Vt(O.current).body).getBoundingClientRect();return{top:pe.top+Eh(pe,i.vertical),left:pe.left+Ch(pe,i.horizontal)}},[a,i.horizontal,i.vertical,s,l]),E=I.useCallback(oe=>({vertical:Eh(oe,T.vertical),horizontal:Ch(oe,T.horizontal)}),[T.horizontal,T.vertical]),N=I.useCallback(oe=>{const re={width:oe.offsetWidth,height:oe.offsetHeight},pe=E(re);if(l==="none")return{top:null,left:null,transformOrigin:Th(pe)};const G=L();let Z=G.top-pe.vertical,xe=G.left-pe.horizontal;const de=Z+re.height,be=xe+re.width,ie=Tr(Xi(a)),Ae=ie.innerHeight-p,ve=ie.innerWidth-p;if(p!==null&&Z<p){const Ve=Z-p;Z-=Ve,pe.vertical+=Ve}else if(p!==null&&de>Ae){const Ve=de-Ae;Z-=Ve,pe.vertical+=Ve}if(p!==null&&xe<p){const Ve=xe-p;xe-=Ve,pe.horizontal+=Ve}else if(be>ve){const Ve=be-ve;xe-=Ve,pe.horizontal+=Ve}return{top:`${Math.round(Z)}px`,left:`${Math.round(xe)}px`,transformOrigin:Th(pe)}},[a,l,L,E,p]),[w,A]=I.useState(m),M=I.useCallback(()=>{const oe=O.current;if(!oe)return;const re=N(oe);re.top!==null&&oe.style.setProperty("top",re.top),re.left!==null&&(oe.style.left=re.left),oe.style.transformOrigin=re.transformOrigin,A(!0)},[N]);I.useEffect(()=>(v&&window.addEventListener("scroll",M),()=>window.removeEventListener("scroll",M)),[a,v,M]);const W=()=>{M()},H=()=>{A(!1)};I.useEffect(()=>{m&&M()}),I.useImperativeHandle(o,()=>m?{updatePosition:()=>{M()}}:null,[m,M]),I.useEffect(()=>{if(!m)return;const oe=Bm(()=>{M()}),re=Tr(Xi(a));return re.addEventListener("resize",oe),()=>{oe.clear(),re.removeEventListener("resize",oe)}},[a,m,M]);let $=k;const D={slots:{transition:C,...y},slotProps:{transition:S,paper:b,...x}},[V,Q]=ct("transition",{elementType:pi,externalForwardedProps:D,ownerState:B,getSlotProps:oe=>({...oe,onEntering:(re,pe)=>{oe.onEntering?.(re,pe),W()},onExited:re=>{oe.onExited?.(re),H()}}),additionalProps:{appear:!0,in:m}});k==="auto"&&!V.muiSupportAuto&&($=void 0);const F=f||(a?Vt(Xi(a)).body:void 0),[fe,{slots:J,slotProps:X,...ee}]=ct("root",{ref:n,elementType:a8,externalForwardedProps:{...D,..._},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:y.backdrop},slotProps:{backdrop:L2(typeof x.backdrop=="function"?x.backdrop(B):x.backdrop,{invisible:!0})},container:F,open:m},ownerState:B,className:Ie(R.root,d)}),[K,te]=ct("paper",{ref:O,className:R.paper,elementType:N1,externalForwardedProps:D,shouldForwardComponentProp:!0,additionalProps:{elevation:h,style:w?void 0:{opacity:0}},ownerState:B});return c.jsx(fe,{...ee,...!Jo(fe)&&{slots:J,slotProps:X,disableScrollLock:v},children:c.jsx(V,{...Q,timeout:$,children:c.jsx(K,{...te,children:u})})})});function s8(e){return Be("MuiMenu",e)}Le("MuiMenu",["root","paper","list"]);const l8={vertical:"top",horizontal:"right"},u8={vertical:"top",horizontal:"left"},c8=e=>{const{classes:t}=e;return _e({root:["root"],paper:["paper"],list:["list"]},s8,t)},d8=se(i8,{shouldForwardProp:e=>Dn(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),f8=se(N1,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),p8=se(t8,{name:"MuiMenu",slot:"List"})({outline:0}),h8=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:i,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:u,open:d,PaperProps:f={},PopoverClasses:h,transitionDuration:p="auto",TransitionProps:{onEntering:m,...b}={},variant:y="selectedMenu",slots:x={},slotProps:T={},...C}=r,k=Yn(),S={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:f,transitionDuration:p,TransitionProps:b,variant:y},v=c8(S),_=o&&!s&&d,O=I.useRef(null),B=($,D)=>{O.current&&O.current.adjustStyleForScrollbar($,{direction:k?"rtl":"ltr"}),m&&m($,D)},R=$=>{$.key==="Tab"&&($.preventDefault(),u&&u($,"tabKeyDown"))};let L=-1;I.Children.map(a,($,D)=>{I.isValidElement($)&&($.props.disabled||(y==="selectedMenu"&&$.props.selected||L===-1)&&(L=D))});const E={slots:x,slotProps:{list:l,transition:b,paper:f,...T}},N=ut({elementType:x.root,externalSlotProps:T.root,ownerState:S,className:[v.root,i]}),[w,A]=ct("paper",{className:v.paper,elementType:f8,externalForwardedProps:E,shouldForwardComponentProp:!0,ownerState:S}),[M,W]=ct("list",{className:Ie(v.list,l.className),elementType:p8,shouldForwardComponentProp:!0,externalForwardedProps:E,getSlotProps:$=>({...$,onKeyDown:D=>{R(D),$.onKeyDown?.(D)}}),ownerState:S}),H=typeof E.slotProps.transition=="function"?E.slotProps.transition(S):E.slotProps.transition;return c.jsx(d8,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:k?"right":"left"},transformOrigin:k?l8:u8,slots:{root:x.root,paper:w,backdrop:x.backdrop,...x.transition&&{transition:x.transition}},slotProps:{root:N,paper:A,backdrop:typeof T.backdrop=="function"?T.backdrop(S):T.backdrop,transition:{...H,onEntering:(...$)=>{B(...$),H?.onEntering?.(...$)}}},open:d,ref:n,transitionDuration:p,ownerState:S,...C,classes:h,children:c.jsx(M,{actions:O,autoFocus:o&&(L===-1||s),autoFocusItem:_,variant:y,...W,children:a})})});function m8(e){return Be("MuiNativeSelect",e)}const Cd=Le("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),g8=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:a,error:i}=e,s={select:["select",n,r&&"disabled",o&&"multiple",i&&"error"],icon:["icon",`icon${De(n)}`,a&&"iconOpen",r&&"disabled"]};return _e(s,m8,t)},L1=se("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Cd.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}}}]})),b8=se(L1,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Dn,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Cd.multiple}`]:t.multiple}]}})({}),F1=se("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Cd.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}}]})),y8=se(F1,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${De(n.variant)}`],n.open&&t.iconOpen]}})({}),x8=I.forwardRef(function(t,n){const{className:r,disabled:o,error:a,IconComponent:i,inputRef:s,variant:l="standard",...u}=t,d={...t,disabled:o,variant:l,error:a},f=g8(d);return c.jsxs(I.Fragment,{children:[c.jsx(b8,{ownerState:d,className:Ie(f.select,r),disabled:o,ref:s||n,...u}),t.multiple?null:c.jsx(y8,{as:i,ownerState:d,className:f.icon})]})});function _1(e){return Be("MuiSelect",e)}const Ra=Le("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var vh;const E8=se(L1,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Ra.select}`]:t.select},{[`&.${Ra.select}`]:t[n.variant]},{[`&.${Ra.error}`]:t.error},{[`&.${Ra.multiple}`]:t.multiple}]}})({[`&.${Ra.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),C8=se(F1,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${De(n.variant)}`],n.open&&t.iconOpen]}})({}),T8=se("input",{shouldForwardProp:e=>_m(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Sh(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function v8(e){return e==null||typeof e=="string"&&!e.trim()}const S8=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:a,error:i}=e,s={select:["select",n,r&&"disabled",o&&"multiple",i&&"error"],icon:["icon",`icon${De(n)}`,a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return _e(s,_1,t)},k8=I.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":o,autoFocus:a,autoWidth:i,children:s,className:l,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:h,error:p=!1,IconComponent:m,inputRef:b,labelId:y,MenuProps:x={},multiple:T,name:C,onBlur:k,onChange:S,onClose:v,onFocus:_,onOpen:O,open:B,readOnly:R,renderValue:L,required:E,SelectDisplayProps:N={},tabIndex:w,type:A,value:M,variant:W="standard",...H}=t,[$,D]=Ln({controlled:M,default:d,name:"Select"}),[V,Q]=Ln({controlled:B,default:u,name:"Select"}),F=I.useRef(null),fe=I.useRef(null),[J,X]=I.useState(null),{current:ee}=I.useRef(B!=null),[K,te]=I.useState(),oe=lt(n,b),re=I.useCallback(ae=>{fe.current=ae,ae&&X(ae)},[]),pe=J?.parentNode;I.useImperativeHandle(oe,()=>({focus:()=>{fe.current.focus()},node:F.current,value:$}),[$]),I.useEffect(()=>{u&&V&&J&&!ee&&(te(i?null:pe.clientWidth),fe.current.focus())},[J,i]),I.useEffect(()=>{a&&fe.current.focus()},[a]),I.useEffect(()=>{if(!y)return;const ae=Vt(fe.current).getElementById(y);if(ae){const ye=()=>{getSelection().isCollapsed&&fe.current.focus()};return ae.addEventListener("click",ye),()=>{ae.removeEventListener("click",ye)}}},[y]);const G=(ae,ye)=>{ae?O&&O(ye):v&&v(ye),ee||(te(i?null:pe.clientWidth),Q(ae))},Z=ae=>{ae.button===0&&(ae.preventDefault(),fe.current.focus(),G(!0,ae))},xe=ae=>{G(!1,ae)},de=I.Children.toArray(s),be=ae=>{const ye=de.find(Re=>Re.props.value===ae.target.value);ye!==void 0&&(D(ye.props.value),S&&S(ae,ye))},ie=ae=>ye=>{let Re;if(ye.currentTarget.hasAttribute("tabindex")){if(T){Re=Array.isArray($)?$.slice():[];const Fe=$.indexOf(ae.props.value);Fe===-1?Re.push(ae.props.value):Re.splice(Fe,1)}else Re=ae.props.value;if(ae.props.onClick&&ae.props.onClick(ye),$!==Re&&(D(Re),S)){const Fe=ye.nativeEvent||ye,We=new Fe.constructor(Fe.type,Fe);Object.defineProperty(We,"target",{writable:!0,value:{value:Re,name:C}}),S(We,ae)}T||G(!1,ye)}},Ae=ae=>{R||[" ","ArrowUp","ArrowDown","Enter"].includes(ae.key)&&(ae.preventDefault(),G(!0,ae))},ve=J!==null&&V,Ve=ae=>{!ve&&k&&(Object.defineProperty(ae,"target",{writable:!0,value:{value:$,name:C}}),k(ae))};delete H["aria-invalid"];let we,At;const rt=[];let Ye=!1;(Hs({value:$})||h)&&(L?we=L($):Ye=!0);const le=de.map(ae=>{if(!I.isValidElement(ae))return null;let ye;if(T){if(!Array.isArray($))throw new Error(Er(2));ye=$.some(Re=>Sh(Re,ae.props.value)),ye&&Ye&&rt.push(ae.props.children)}else ye=Sh($,ae.props.value),ye&&Ye&&(At=ae.props.children);return I.cloneElement(ae,{"aria-selected":ye?"true":"false",onClick:ie(ae),onKeyUp:Re=>{Re.key===" "&&Re.preventDefault(),ae.props.onKeyUp&&ae.props.onKeyUp(Re)},role:"option",selected:ye,value:void 0,"data-value":ae.props.value})});Ye&&(T?rt.length===0?we=null:we=rt.reduce((ae,ye,Re)=>(ae.push(ye),Re<rt.length-1&&ae.push(", "),ae),[]):we=At);let Ce=K;!i&&ee&&J&&(Ce=pe.clientWidth);let Oe;typeof w<"u"?Oe=w:Oe=f?null:0;const He=N.id||(C?`mui-component-select-${C}`:void 0),je={...t,variant:W,value:$,open:ve,error:p},Ne=S8(je),ot={...x.PaperProps,...typeof x.slotProps?.paper=="function"?x.slotProps.paper(je):x.slotProps?.paper},xt={...x.MenuListProps,...typeof x.slotProps?.list=="function"?x.slotProps.list(je):x.slotProps?.list},pt=Kn();return c.jsxs(I.Fragment,{children:[c.jsx(E8,{as:"div",ref:re,tabIndex:Oe,role:"combobox","aria-controls":ve?pt:void 0,"aria-disabled":f?"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":E?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:Ae,onMouseDown:f||R?null:Z,onBlur:Ve,onFocus:_,...N,ownerState:je,className:Ie(N.className,Ne.select,l),id:He,children:v8(we)?vh||(vh=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):we}),c.jsx(T8,{"aria-invalid":p,value:Array.isArray($)?$.join(","):$,name:C,ref:F,"aria-hidden":!0,onChange:be,tabIndex:-1,disabled:f,className:Ne.nativeInput,autoFocus:a,required:E,...H,ownerState:je}),c.jsx(C8,{as:m,className:Ne.icon,ownerState:je}),c.jsx(h8,{id:`menu-${C||""}`,anchorEl:pe,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":T?"true":void 0,disableListWrap:!0,id:pt,...xt},paper:{...ot,style:{minWidth:Ce,...ot!=null?ot.style:null}}},children:le})]})}),B1=kt(c.jsx("path",{d:"M7 10l5 5 5-5z"})),D8=e=>{const{classes:t}=e,r=_e({root:["root"]},_1,t);return{...t,...r}},Td={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Dn(e)&&e!=="variant"},w8=se(yd,Td)(""),A8=se(Ed,Td)(""),I8=se(xd,Td)(""),Vs=I.forwardRef(function(t,n){const r=Xe({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:a,classes:i={},className:s,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:d=B1,id:f,input:h,inputProps:p,label:m,labelId:b,MenuProps:y,multiple:x=!1,native:T=!1,onClose:C,onOpen:k,open:S,renderValue:v,SelectDisplayProps:_,variant:O="outlined",...B}=r,R=T?x8:k8,L=Xn(),E=ga({props:r,muiFormControl:L,states:["variant","error"]}),N=E.variant||O,w={...r,variant:N,classes:i},A=D8(w),{root:M,...W}=A,H=h||{standard:c.jsx(w8,{ownerState:w}),outlined:c.jsx(A8,{label:m,ownerState:w}),filled:c.jsx(I8,{ownerState:w})}[N],$=lt(n,ma(H));return c.jsx(I.Fragment,{children:I.cloneElement(H,{inputComponent:R,inputProps:{children:a,error:E.error,IconComponent:d,variant:N,type:void 0,multiple:x,...T?{id:f}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:b,MenuProps:y,onClose:C,onOpen:k,open:S,renderValue:v,SelectDisplayProps:{id:f,..._}},...p,classes:p?tn(W,p.classes):W,...h?h.props.inputProps:{}},...(x&&T||u)&&N==="outlined"?{notched:!0}:{},ref:$,className:Ie(H.props.className,s,A.root),...!h&&{variant:N},...B})})});Vs.muiName="Select";function P8(e){return Be("MuiTextField",e)}Le("MuiTextField",["root"]);const R8={standard:yd,filled:xd,outlined:Ed},M8=e=>{const{classes:t}=e;return _e({root:["root"]},P8,t)},O8=se(zs,{name:"MuiTextField",slot:"Root"})({}),Je=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:a=!1,children:i,className:s,color:l="primary",defaultValue:u,disabled:d=!1,error:f=!1,FormHelperTextProps:h,fullWidth:p=!1,helperText:m,id:b,InputLabelProps:y,inputProps:x,InputProps:T,inputRef:C,label:k,maxRows:S,minRows:v,multiline:_=!1,name:O,onBlur:B,onChange:R,onFocus:L,placeholder:E,required:N=!1,rows:w,select:A=!1,SelectProps:M,slots:W={},slotProps:H={},type:$,value:D,variant:V="outlined",...Q}=r,F={...r,autoFocus:a,color:l,disabled:d,error:f,fullWidth:p,multiline:_,required:N,select:A,variant:V},fe=M8(F),J=Kn(b),X=m&&J?`${J}-helper-text`:void 0,ee=k&&J?`${J}-label`:void 0,K=R8[V],te={slots:W,slotProps:{input:T,inputLabel:y,htmlInput:x,formHelperText:h,select:M,...H}},oe={},re=te.slotProps.inputLabel;V==="outlined"&&(re&&typeof re.shrink<"u"&&(oe.notched=re.shrink),oe.label=k),A&&((!M||!M.native)&&(oe.id=void 0),oe["aria-describedby"]=void 0);const[pe,G]=ct("root",{elementType:O8,shouldForwardComponentProp:!0,externalForwardedProps:{...te,...Q},ownerState:F,className:Ie(fe.root,s),ref:n,additionalProps:{disabled:d,error:f,fullWidth:p,required:N,color:l,variant:V}}),[Z,xe]=ct("input",{elementType:K,externalForwardedProps:te,additionalProps:oe,ownerState:F}),[de,be]=ct("inputLabel",{elementType:Us,externalForwardedProps:te,ownerState:F}),[ie,Ae]=ct("htmlInput",{elementType:"input",externalForwardedProps:te,ownerState:F}),[ve,Ve]=ct("formHelperText",{elementType:R1,externalForwardedProps:te,ownerState:F}),[we,At]=ct("select",{elementType:Vs,externalForwardedProps:te,ownerState:F}),rt=c.jsx(Z,{"aria-describedby":X,autoComplete:o,autoFocus:a,defaultValue:u,fullWidth:p,multiline:_,name:O,rows:w,maxRows:S,minRows:v,type:$,value:D,id:J,inputRef:C,onBlur:B,onChange:R,onFocus:L,placeholder:E,inputProps:Ae,slots:{input:W.htmlInput?ie:void 0},...xe});return c.jsxs(pe,{...G,children:[k!=null&&k!==""&&c.jsx(de,{htmlFor:J,id:ee,...be,children:k}),A?c.jsx(we,{"aria-describedby":X,id:J,labelId:ee,value:D,input:rt,...At,children:i}):rt,m&&c.jsx(ve,{id:X,...Ve,children:m})]})});function N8({package:e,resourceUri:t,onCloseDialog:n}){const[r,o]=z.useState(!1),{apiClients:a}=it.useServer(),i=Dr.useQueryClient(),[s,l]=z.useState(""),u=()=>{o(!0)},d=()=>{o(!1),n()},{packageName:f,environmentName:h}=Nt(t),p=ir({async mutationFn(b){return a.packages.updatePackage(h,f,{name:f,description:b.description})},onSuccess(){d(),l("Package updated successfully"),i.invalidateQueries({queryKey:["packages",h]})},onError(b){l(b instanceof Error?b.message:"An unknown error occurred")}}),m=b=>{b.preventDefault();const x=new FormData(b.currentTarget).get("description")?.toString();p.mutate({description:x})};return c.jsxs(z.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:u,children:[c.jsx(P.ListItemIcon,{children:c.jsx(vn.Edit,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Edit"})]}),c.jsxs(Ar,{open:r,onClose:d,children:[c.jsx(Wr,{children:"Edit Package"}),c.jsxs(Ir,{children:[c.jsxs(Mi,{children:['Update the details for "',e.name,'".']}),c.jsxs("form",{onSubmit:m,id:"package-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Package Name",disabled:!0,type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),c.jsx(Je,{id:"description",name:"description",label:"Description",multiline:!0,fullWidth:!0,rows:4,defaultValue:e.description,variant:"standard"})]})]}),c.jsxs(Pr,{children:[c.jsx(Ot,{disabled:p.isPending,onClick:d,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"package-form",loading:p.isPending,children:"Save Changes"})]})]}),c.jsx(P.Snackbar,{open:s!=="",autoHideDuration:6e3,onClose:()=>l(""),message:s})]})}function j1({onSelectPackage:e,resourceUri:t}){const{apiClients:n}=it.useServer(),{environmentName:r}=Nt(t),{data:o,isSuccess:a,isError:i,error:s}=Qt({queryKey:["packages",r],queryFn:()=>n.packages.listPackages(r)});if(i)return c.jsx(hn,{error:s,context:`${r} > Packages`});if(!a)return c.jsx(pn,{text:"Fetching Packages..."});const l=[...o.data].sort((u,d)=>u.name.localeCompare(d.name));return c.jsx(P.Grid,{container:!0,spacing:2,children:l.map(u=>{const d=Pi({environmentName:r,packageName:u.name});return c.jsx(P.Grid,{size:{xs:12,sm:6,md:4},children:c.jsx(L8,{pkg:u,packageResourceUri:d,onSelectPackage:e})},u.name)})})}function L8({pkg:e,packageResourceUri:t,onSelectPackage:n}){const{mutable:r}=it.useServer(),[o,a]=z.useState(null),i=!!o,s=f=>{n(e.name,f)},l=f=>{f.stopPropagation(),a(f.currentTarget)},u=()=>{a(null)},d=e.description??"";return c.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:c.jsx(P.CardContent,{sx:{p:2.5,"&:last-child":{pb:2.5}},children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[c.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:c.jsx(k4,{sx:{fontSize:20}})}),c.jsxs(P.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(P.Typography,{variant:"subtitle1",component:"h6",noWrap:!0,sx:{fontWeight:600,mb:.5},children:e.name}),c.jsx(P.Tooltip,{title:d,followCursor:!0,enterDelay:1e3,children:c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.5},children:d})})]}),r&&c.jsxs(c.Fragment,{children:[c.jsx(P.IconButton,{size:"small",onClick:l,"aria-label":`Package actions for ${e.name}`,sx:{flexShrink:0,mt:-.5,mr:-.5},children:c.jsx(vn.MoreVert,{fontSize:"small"})}),c.jsxs(P.Menu,{anchorEl:o,open:i,onClose:u,onClick:f=>f.stopPropagation(),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(N8,{package:e,resourceUri:t,onCloseDialog:u}),c.jsx(fP,{resourceUri:t,onCloseDialog:u})]})]})]})})})}function F8({onSelectPackage:e,resourceUri:t}){const{mutable:n}=it.useServer(),{environmentName:r}=Nt(t);return z.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"})},[]),c.jsxs(P.Container,{maxWidth:!1,sx:{maxWidth:1024,mx:"auto",px:4,py:3},children:[c.jsxs(P.Box,{sx:{mb:5},children:[c.jsx(P.Typography,{variant:"h4",component:"h1",sx:{fontWeight:600,letterSpacing:"-0.025em",mb:.5},children:r}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Manage packages in this environment. Open a package to explore its models, notebooks, and connections."})]}),c.jsxs(P.Box,{sx:{mb:5},children:[c.jsxs(P.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{mb:3},children:[c.jsxs(P.Box,{children:[c.jsx(P.Typography,{variant:"h6",sx:{fontWeight:600,letterSpacing:"-0.025em"},children:"Packages"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Published packages available for use in this environment"})]}),n&&c.jsx(S4,{resourceUri:t})]}),c.jsx(j1,{onSelectPackage:e,resourceUri:t})]}),c.jsx(v4,{resourceUri:t})]})}const _8=e=>{const t=I.useRef({});return I.useEffect(()=>{t.current=e}),t.current};function kh({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 Dh(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function B8(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:a,trim:i=!1}=e;return(s,{inputValue:l,getOptionLabel:u})=>{let d=i?l.trim():l;n&&(d=d.toLowerCase()),t&&(d=Dh(d));const f=d?s.filter(h=>{let p=(a||u)(h);return n&&(p=p.toLowerCase()),t&&(p=Dh(p)),o==="start"?p.startsWith(d):p.includes(d)}):s;return typeof r=="number"?f.slice(0,r):f}}const j8=B8(),wh=5,$8=e=>e.current!==null&&e.current.parentElement?.contains(document.activeElement),H8=[];function Ah(e,t,n,r){if(t||e==null||r)return"";const o=n(e);return typeof o=="string"?o:""}function U8(e){const{unstable_isActiveElementInListbox:t=$8,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:a=!1,blurOnSelect:i=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:u="useAutocomplete",defaultValue:d=e.multiple?H8:null,disableClearable:f=!1,disableCloseOnSelect:h=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:b=!1,filterOptions:y=j8,filterSelectedOptions:x=!1,freeSolo:T=!1,getOptionDisabled:C,getOptionKey:k,getOptionLabel:S=ge=>ge.label??ge,groupBy:v,handleHomeEndKeys:_=!e.freeSolo,id:O,includeInputInList:B=!1,inputValue:R,isOptionEqualToValue:L=(ge,me)=>ge===me,multiple:E=!1,onChange:N,onClose:w,onHighlightChange:A,onInputChange:M,onOpen:W,open:H,openOnFocus:$=!1,options:D,readOnly:V=!1,renderValue:Q,selectOnFocus:F=!e.freeSolo,value:fe}=e,J=Kn(O);let X=S;X=ge=>{const me=S(ge);return typeof me!="string"?String(me):me};const ee=I.useRef(!1),K=I.useRef(!0),te=I.useRef(null),oe=I.useRef(null),[re,pe]=I.useState(null),[G,Z]=I.useState(-1),xe=o?0:-1,de=I.useRef(xe),be=I.useRef(Ah(d??fe,E,X)).current,[ie,Ae]=Ln({controlled:fe,default:d,name:u}),[ve,Ve]=Ln({controlled:R,default:be,name:u,state:"inputValue"}),[we,At]=I.useState(!1),rt=I.useCallback((ge,me,Me)=>{if(!(E?ie.length<me.length:me!==null)&&!s)return;const qe=Ah(me,E,X,Q);ve!==qe&&(Ve(qe),M&&M(ge,qe,Me))},[X,ve,E,M,Ve,s,ie,Q]),[Ye,le]=Ln({controlled:H,default:!1,name:u,state:"open"}),[Ce,Oe]=I.useState(!0),He=!E&&ie!=null&&ve===X(ie),je=Ye&&!V,Ne=je?y(D.filter(ge=>!(x&&(E?ie:[ie]).some(me=>me!==null&&L(ge,me)))),{inputValue:He&&Ce?"":ve,getOptionLabel:X}):[],ot=_8({filteredOptions:Ne,value:ie,inputValue:ve});I.useEffect(()=>{const ge=ie!==ot.value;we&&!ge||T&&!ge||rt(null,ie,"reset")},[ie,rt,we,ot.value,T]);const xt=Ye&&Ne.length>0&&!V,pt=Pe(ge=>{if(ge===-1)te.current.focus();else{const me=Q?"data-item-index":"data-tag-index";re.querySelector(`[${me}="${ge}"]`).focus()}});I.useEffect(()=>{E&&G>ie.length-1&&(Z(-1),pt(-1))},[ie,E,G,pt]);function ae(ge,me){if(!oe.current||ge<0||ge>=Ne.length)return-1;let Me=ge;for(;;){const ze=oe.current.querySelector(`[data-option-index="${Me}"]`),qe=m?!1:!ze||ze.disabled||ze.getAttribute("aria-disabled")==="true";if(ze&&ze.hasAttribute("tabindex")&&!qe)return Me;if(me==="next"?Me=(Me+1)%Ne.length:Me=(Me-1+Ne.length)%Ne.length,Me===ge)return-1}}const ye=Pe(({event:ge,index:me,reason:Me})=>{if(de.current=me,me===-1?te.current.removeAttribute("aria-activedescendant"):te.current.setAttribute("aria-activedescendant",`${J}-option-${me}`),A&&["mouse","keyboard","touch"].includes(Me)&&A(ge,me===-1?null:Ne[me],Me),!oe.current)return;const ze=oe.current.querySelector(`[role="option"].${n}-focused`);ze&&(ze.classList.remove(`${n}-focused`),ze.classList.remove(`${n}-focusVisible`));let qe=oe.current;if(oe.current.getAttribute("role")!=="listbox"&&(qe=oe.current.parentElement.querySelector('[role="listbox"]')),!qe)return;if(me===-1){qe.scrollTop=0;return}const Yt=oe.current.querySelector(`[data-option-index="${me}"]`);if(Yt&&(Yt.classList.add(`${n}-focused`),Me==="keyboard"&&Yt.classList.add(`${n}-focusVisible`),qe.scrollHeight>qe.clientHeight&&Me!=="mouse"&&Me!=="touch")){const _t=Yt,zn=qe.clientHeight+qe.scrollTop,Bi=_t.offsetTop+_t.offsetHeight;Bi>zn?qe.scrollTop=Bi-qe.clientHeight:_t.offsetTop-_t.offsetHeight*(v?1.3:0)<qe.scrollTop&&(qe.scrollTop=_t.offsetTop-_t.offsetHeight*(v?1.3:0))}}),Re=Pe(({event:ge,diff:me,direction:Me="next",reason:ze})=>{if(!je)return;const Yt=ae((()=>{const _t=Ne.length-1;if(me==="reset")return xe;if(me==="start")return 0;if(me==="end")return _t;const zn=de.current+me;return zn<0?zn===-1&&B?-1:b&&de.current!==-1||Math.abs(me)>1?0:_t:zn>_t?zn===_t+1&&B?-1:b||Math.abs(me)>1?_t:0:zn})(),Me);if(ye({index:Yt,reason:ze,event:ge}),r&&me!=="reset")if(Yt===-1)te.current.value=ve;else{const _t=X(Ne[Yt]);te.current.value=_t,_t.toLowerCase().indexOf(ve.toLowerCase())===0&&ve.length>0&&te.current.setSelectionRange(ve.length,_t.length)}}),Fe=!kh({array1:ot.filteredOptions,array2:Ne,parser:X}),We=()=>{const ge=(me,Me)=>{const ze=me?X(me):"",qe=Me?X(Me):"";return ze===qe};if(de.current!==-1&&!kh({array1:ot.filteredOptions,array2:Ne,parser:X})&&ot.inputValue===ve&&(E?ie.length===ot.value.length&&ot.value.every((me,Me)=>X(ie[Me])===X(me)):ge(ot.value,ie))){const me=ot.filteredOptions[de.current];if(me)return Ne.findIndex(Me=>X(Me)===X(me))}return-1},Tt=I.useCallback(()=>{if(!je)return;const ge=We();if(ge!==-1){de.current=ge;return}const me=E?ie[0]:ie;if(Ne.length===0||me==null){Re({diff:"reset"});return}if(oe.current){if(me!=null){const Me=Ne[de.current];if(E&&Me&&ie.findIndex(qe=>L(Me,qe))!==-1)return;const ze=Ne.findIndex(qe=>L(qe,me));ze===-1?Re({diff:"reset"}):ye({index:ze});return}if(de.current>=Ne.length-1){ye({index:Ne.length-1});return}ye({index:de.current})}},[Ne.length,E?!1:ie,x,Re,ye,je,ve,E]),Mt=Pe(ge=>{_u(oe,ge),ge&&Tt()});I.useEffect(()=>{Fe&&Tt()},[Tt,Fe]);const gt=ge=>{Ye||(le(!0),Oe(!0),W&&W(ge))},Ut=(ge,me)=>{Ye&&(le(!1),w&&w(ge,me))},wn=(ge,me,Me,ze)=>{if(E){if(ie.length===me.length&&ie.every((qe,Yt)=>qe===me[Yt]))return}else if(ie===me)return;N&&N(ge,me,Me,ze),Ae(me)},vt=I.useRef(!1),Zt=(ge,me,Me="selectOption",ze="options")=>{let qe=Me,Yt=me;if(E){Yt=Array.isArray(ie)?ie.slice():[];const _t=Yt.findIndex(zn=>L(me,zn));_t===-1?Yt.push(me):ze!=="freeSolo"&&(Yt.splice(_t,1),qe="removeOption")}rt(ge,Yt,qe),wn(ge,Yt,qe,{option:me}),!h&&(!ge||!ge.ctrlKey&&!ge.metaKey)&&Ut(ge,qe),(i===!0||i==="touch"&&vt.current||i==="mouse"&&!vt.current)&&te.current.blur()};function pr(ge,me){if(ge===-1)return-1;let Me=ge;for(;;){if(me==="next"&&Me===ie.length||me==="previous"&&Me===-1)return-1;const ze=Q?"data-item-index":"data-tag-index",qe=re.querySelector(`[${ze}="${Me}"]`);if(!qe||!qe.hasAttribute("tabindex")||qe.disabled||qe.getAttribute("aria-disabled")==="true")Me+=me==="next"?1:-1;else return Me}}const An=(ge,me)=>{if(!E)return;ve===""&&Ut(ge,"toggleInput");let Me=G;G===-1?ve===""&&me==="previous"&&(Me=ie.length-1):(Me+=me==="next"?1:-1,Me<0&&(Me=0),Me===ie.length&&(Me=-1)),Me=pr(Me,me),Z(Me),pt(Me)},Yr=ge=>{ee.current=!0,Ve(""),M&&M(ge,"","clear"),wn(ge,E?[]:null,"clear")},Un=ge=>me=>{if(ge.onKeyDown&&ge.onKeyDown(me),!me.defaultMuiPrevented&&(G!==-1&&!["ArrowLeft","ArrowRight"].includes(me.key)&&(Z(-1),pt(-1)),me.which!==229))switch(me.key){case"Home":je&&_&&(me.preventDefault(),Re({diff:"start",direction:"next",reason:"keyboard",event:me}));break;case"End":je&&_&&(me.preventDefault(),Re({diff:"end",direction:"previous",reason:"keyboard",event:me}));break;case"PageUp":me.preventDefault(),Re({diff:-wh,direction:"previous",reason:"keyboard",event:me}),gt(me);break;case"PageDown":me.preventDefault(),Re({diff:wh,direction:"next",reason:"keyboard",event:me}),gt(me);break;case"ArrowDown":me.preventDefault(),Re({diff:1,direction:"next",reason:"keyboard",event:me}),gt(me);break;case"ArrowUp":me.preventDefault(),Re({diff:-1,direction:"previous",reason:"keyboard",event:me}),gt(me);break;case"ArrowLeft":!E&&Q?pt(0):An(me,"previous");break;case"ArrowRight":!E&&Q?pt(-1):An(me,"next");break;case"Enter":if(de.current!==-1&&je){const Me=Ne[de.current],ze=C?C(Me):!1;if(me.preventDefault(),ze)return;Zt(me,Me,"selectOption"),r&&te.current.setSelectionRange(te.current.value.length,te.current.value.length)}else T&&ve!==""&&He===!1&&(E&&me.preventDefault(),Zt(me,ve,"createOption","freeSolo"));break;case"Escape":je?(me.preventDefault(),me.stopPropagation(),Ut(me,"escape")):l&&(ve!==""||E&&ie.length>0||Q)&&(me.preventDefault(),me.stopPropagation(),Yr(me));break;case"Backspace":if(E&&!V&&ve===""&&ie.length>0){const Me=G===-1?ie.length-1:G,ze=ie.slice();ze.splice(Me,1),wn(me,ze,"removeOption",{option:ie[Me]})}!E&&Q&&!V&&(Ae(null),pt(-1));break;case"Delete":if(E&&!V&&ve===""&&ie.length>0&&G!==-1){const Me=G,ze=ie.slice();ze.splice(Me,1),wn(me,ze,"removeOption",{option:ie[Me]})}!E&&Q&&!V&&(Ae(null),pt(-1));break}},hr=ge=>{At(!0),$&&!ee.current&&gt(ge)},So=ge=>{if(t(oe)){te.current.focus();return}At(!1),K.current=!0,ee.current=!1,a&&de.current!==-1&&je?Zt(ge,Ne[de.current],"blur"):a&&T&&ve!==""?Zt(ge,ve,"blur","freeSolo"):s&&rt(ge,ie,"blur"),Ut(ge,"blur")},ba=ge=>{const me=ge.target.value;ve!==me&&(Ve(me),Oe(!1),M&&M(ge,me,"input")),me===""?!f&&!E&&wn(ge,null,"clear"):gt(ge)},Rl=ge=>{const me=Number(ge.currentTarget.getAttribute("data-option-index"));de.current!==me&&ye({event:ge,index:me,reason:"mouse"})},Ml=ge=>{ye({event:ge,index:Number(ge.currentTarget.getAttribute("data-option-index")),reason:"touch"}),vt.current=!0},Ol=ge=>{const me=Number(ge.currentTarget.getAttribute("data-option-index"));Zt(ge,Ne[me],"selectOption"),vt.current=!1},Nl=ge=>me=>{const Me=ie.slice();Me.splice(ge,1),wn(me,Me,"removeOption",{option:ie[ge]})},ya=ge=>{wn(ge,null,"removeOption",{option:ie})},zt=ge=>{Ye?Ut(ge,"toggleInput"):gt(ge)},qt=ge=>{ge.currentTarget.contains(ge.target)&&ge.target.getAttribute("id")!==J&&ge.preventDefault()},Mr=ge=>{ge.currentTarget.contains(ge.target)&&(te.current.focus(),F&&K.current&&te.current.selectionEnd-te.current.selectionStart===0&&te.current.select(),K.current=!1)},Ll=ge=>{!p&&(ve===""||!Ye)&&zt(ge)};let xa=T&&ve.length>0;xa=xa||(E?ie.length>0:ie!==null);let _i=Ne;return v&&(_i=Ne.reduce((ge,me,Me)=>{const ze=v(me);return ge.length>0&&ge[ge.length-1].group===ze?ge[ge.length-1].options.push(me):ge.push({key:Me,index:Me,group:ze,options:[me]}),ge},[])),p&&we&&So(),{getRootProps:(ge={})=>({...ge,onKeyDown:Un(ge),onMouseDown:qt,onClick:Mr}),getInputLabelProps:()=>({id:`${J}-label`,htmlFor:J}),getInputProps:()=>({id:J,value:ve,onBlur:So,onFocus:hr,onChange:ba,onMouseDown:Ll,"aria-activedescendant":je?"":null,"aria-autocomplete":r?"both":"list","aria-controls":xt?`${J}-listbox`:void 0,"aria-expanded":xt,autoComplete:"off",ref:te,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:p}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Yr}),getItemProps:({index:ge=0}={})=>({...E&&{key:ge},...Q?{"data-item-index":ge}:{"data-tag-index":ge},tabIndex:-1,...!V&&{onDelete:E?Nl(ge):ya}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:zt}),getTagProps:({index:ge})=>({key:ge,"data-tag-index":ge,tabIndex:-1,...!V&&{onDelete:Nl(ge)}}),getListboxProps:()=>({role:"listbox",id:`${J}-listbox`,"aria-labelledby":`${J}-label`,ref:Mt,onMouseDown:ge=>{ge.preventDefault()}}),getOptionProps:({index:ge,option:me})=>{const Me=(E?ie:[ie]).some(qe=>qe!=null&&L(me,qe)),ze=C?C(me):!1;return{key:k?.(me)??X(me),tabIndex:-1,role:"option",id:`${J}-option-${ge}`,onMouseMove:Rl,onClick:Ol,onTouchStart:Ml,"data-option-index":ge,"aria-disabled":ze,"aria-selected":Me}},id:J,inputValue:ve,value:ie,dirty:xa,expanded:je&&re,popupOpen:je,focused:we||G!==-1,anchorEl:re,setAnchorEl:pe,focusedItem:G,focusedTag:G,groupedOptions:_i}}var cn="top",_n="bottom",Bn="right",dn="left",vd="auto",Oi=[cn,_n,Bn,dn],ea="start",hi="end",z8="clippingParents",$1="viewport",Ma="popper",V8="reference",Ih=Oi.reduce(function(e,t){return e.concat([t+"-"+ea,t+"-"+hi])},[]),H1=[].concat(Oi,[vd]).reduce(function(e,t){return e.concat([t,t+"-"+ea,t+"-"+hi])},[]),W8="beforeRead",q8="read",Y8="afterRead",K8="beforeMain",G8="main",Q8="afterMain",X8="beforeWrite",Z8="write",J8="afterWrite",eR=[W8,q8,Y8,K8,G8,Q8,X8,Z8,J8];function lr(e){return e?(e.nodeName||"").toLowerCase():null}function kn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function go(e){var t=kn(e).Element;return e instanceof t||e instanceof Element}function Fn(e){var t=kn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Sd(e){if(typeof ShadowRoot>"u")return!1;var t=kn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function tR(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},a=t.elements[n];!Fn(a)||!lr(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(i){var s=o[i];s===!1?a.removeAttribute(i):a.setAttribute(i,s===!0?"":s)}))})}function nR(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],a=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=i.reduce(function(l,u){return l[u]="",l},{});!Fn(o)||!lr(o)||(Object.assign(o.style,s),Object.keys(a).forEach(function(l){o.removeAttribute(l)}))})}}const rR={name:"applyStyles",enabled:!0,phase:"write",fn:tR,effect:nR,requires:["computeStyles"]};function sr(e){return e.split("-")[0]}var co=Math.max,Ws=Math.min,ta=Math.round;function hc(){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 U1(){return!/^((?!chrome|android).)*safari/i.test(hc())}function na(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&Fn(e)&&(o=e.offsetWidth>0&&ta(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&ta(r.height)/e.offsetHeight||1);var i=go(e)?kn(e):window,s=i.visualViewport,l=!U1()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/o,d=(r.top+(l&&s?s.offsetTop:0))/a,f=r.width/o,h=r.height/a;return{width:f,height:h,top:d,right:u+f,bottom:d+h,left:u,x:u,y:d}}function kd(e){var t=na(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 z1(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Sd(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Sr(e){return kn(e).getComputedStyle(e)}function oR(e){return["table","td","th"].indexOf(lr(e))>=0}function qr(e){return((go(e)?e.ownerDocument:e.document)||window.document).documentElement}function kl(e){return lr(e)==="html"?e:e.assignedSlot||e.parentNode||(Sd(e)?e.host:null)||qr(e)}function Ph(e){return!Fn(e)||Sr(e).position==="fixed"?null:e.offsetParent}function aR(e){var t=/firefox/i.test(hc()),n=/Trident/i.test(hc());if(n&&Fn(e)){var r=Sr(e);if(r.position==="fixed")return null}var o=kl(e);for(Sd(o)&&(o=o.host);Fn(o)&&["html","body"].indexOf(lr(o))<0;){var a=Sr(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function Ni(e){for(var t=kn(e),n=Ph(e);n&&oR(n)&&Sr(n).position==="static";)n=Ph(n);return n&&(lr(n)==="html"||lr(n)==="body"&&Sr(n).position==="static")?t:n||aR(e)||t}function Dd(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function oi(e,t,n){return co(e,Ws(t,n))}function iR(e,t,n){var r=oi(e,t,n);return r>n?n:r}function V1(){return{top:0,right:0,bottom:0,left:0}}function W1(e){return Object.assign({},V1(),e)}function q1(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var sR=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,W1(typeof t!="number"?t:q1(t,Oi))};function lR(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,s=sr(n.placement),l=Dd(s),u=[dn,Bn].indexOf(s)>=0,d=u?"height":"width";if(!(!a||!i)){var f=sR(o.padding,n),h=kd(a),p=l==="y"?cn:dn,m=l==="y"?_n:Bn,b=n.rects.reference[d]+n.rects.reference[l]-i[l]-n.rects.popper[d],y=i[l]-n.rects.reference[l],x=Ni(a),T=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,C=b/2-y/2,k=f[p],S=T-h[d]-f[m],v=T/2-h[d]/2+C,_=oi(k,v,S),O=l;n.modifiersData[r]=(t={},t[O]=_,t.centerOffset=_-v,t)}}function uR(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)||z1(t.elements.popper,o)&&(t.elements.arrow=o))}const cR={name:"arrow",enabled:!0,phase:"main",fn:lR,effect:uR,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ra(e){return e.split("-")[1]}var dR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fR(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:ta(n*o)/o||0,y:ta(r*o)/o||0}}function Rh(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,h=i.x,p=h===void 0?0:h,m=i.y,b=m===void 0?0:m,y=typeof d=="function"?d({x:p,y:b}):{x:p,y:b};p=y.x,b=y.y;var x=i.hasOwnProperty("x"),T=i.hasOwnProperty("y"),C=dn,k=cn,S=window;if(u){var v=Ni(n),_="clientHeight",O="clientWidth";if(v===kn(n)&&(v=qr(n),Sr(v).position!=="static"&&s==="absolute"&&(_="scrollHeight",O="scrollWidth")),v=v,o===cn||(o===dn||o===Bn)&&a===hi){k=_n;var B=f&&v===S&&S.visualViewport?S.visualViewport.height:v[_];b-=B-r.height,b*=l?1:-1}if(o===dn||(o===cn||o===_n)&&a===hi){C=Bn;var R=f&&v===S&&S.visualViewport?S.visualViewport.width:v[O];p-=R-r.width,p*=l?1:-1}}var L=Object.assign({position:s},u&&dR),E=d===!0?fR({x:p,y:b},kn(n)):{x:p,y:b};if(p=E.x,b=E.y,l){var N;return Object.assign({},L,(N={},N[k]=T?"0":"",N[C]=x?"0":"",N.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+b+"px)":"translate3d("+p+"px, "+b+"px, 0)",N))}return Object.assign({},L,(t={},t[k]=T?b+"px":"",t[C]=x?p+"px":"",t.transform="",t))}function pR(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,i=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:sr(t.placement),variation:ra(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,Rh(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Rh(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 hR={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pR,data:{}};var Zi={passive:!0};function mR(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=o===void 0?!0:o,i=r.resize,s=i===void 0?!0:i,l=kn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(d){d.addEventListener("scroll",n.update,Zi)}),s&&l.addEventListener("resize",n.update,Zi),function(){a&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Zi)}),s&&l.removeEventListener("resize",n.update,Zi)}}const gR={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:mR,data:{}};var bR={left:"right",right:"left",bottom:"top",top:"bottom"};function fs(e){return e.replace(/left|right|bottom|top/g,function(t){return bR[t]})}var yR={start:"end",end:"start"};function Mh(e){return e.replace(/start|end/g,function(t){return yR[t]})}function wd(e){var t=kn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ad(e){return na(qr(e)).left+wd(e).scrollLeft}function xR(e,t){var n=kn(e),r=qr(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var u=U1();(u||!u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+Ad(e),y:l}}function ER(e){var t,n=qr(e),r=wd(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=co(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=co(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Ad(e),l=-r.scrollTop;return Sr(o||n).direction==="rtl"&&(s+=co(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}function Id(e){var t=Sr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Y1(e){return["html","body","#document"].indexOf(lr(e))>=0?e.ownerDocument.body:Fn(e)&&Id(e)?e:Y1(kl(e))}function ai(e,t){var n;t===void 0&&(t=[]);var r=Y1(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=kn(r),i=o?[a].concat(a.visualViewport||[],Id(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(ai(kl(i)))}function mc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function CR(e,t){var n=na(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 Oh(e,t,n){return t===$1?mc(xR(e,n)):go(t)?CR(t,n):mc(ER(qr(e)))}function TR(e){var t=ai(kl(e)),n=["absolute","fixed"].indexOf(Sr(e).position)>=0,r=n&&Fn(e)?Ni(e):e;return go(r)?t.filter(function(o){return go(o)&&z1(o,r)&&lr(o)!=="body"}):[]}function vR(e,t,n,r){var o=t==="clippingParents"?TR(e):[].concat(t),a=[].concat(o,[n]),i=a[0],s=a.reduce(function(l,u){var d=Oh(e,u,r);return l.top=co(d.top,l.top),l.right=Ws(d.right,l.right),l.bottom=Ws(d.bottom,l.bottom),l.left=co(d.left,l.left),l},Oh(e,i,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function K1(e){var t=e.reference,n=e.element,r=e.placement,o=r?sr(r):null,a=r?ra(r):null,i=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case cn:l={x:i,y:t.y-n.height};break;case _n:l={x:i,y:t.y+t.height};break;case Bn:l={x:t.x+t.width,y:s};break;case dn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=o?Dd(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(a){case ea:l[u]=l[u]-(t[d]/2-n[d]/2);break;case hi:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function mi(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,a=n.strategy,i=a===void 0?e.strategy:a,s=n.boundary,l=s===void 0?z8:s,u=n.rootBoundary,d=u===void 0?$1:u,f=n.elementContext,h=f===void 0?Ma:f,p=n.altBoundary,m=p===void 0?!1:p,b=n.padding,y=b===void 0?0:b,x=W1(typeof y!="number"?y:q1(y,Oi)),T=h===Ma?V8:Ma,C=e.rects.popper,k=e.elements[m?T:h],S=vR(go(k)?k:k.contextElement||qr(e.elements.popper),l,d,i),v=na(e.elements.reference),_=K1({reference:v,element:C,placement:o}),O=mc(Object.assign({},C,_)),B=h===Ma?O:v,R={top:S.top-B.top+x.top,bottom:B.bottom-S.bottom+x.bottom,left:S.left-B.left+x.left,right:B.right-S.right+x.right},L=e.modifiersData.offset;if(h===Ma&&L){var E=L[o];Object.keys(R).forEach(function(N){var w=[Bn,_n].indexOf(N)>=0?1:-1,A=[cn,_n].indexOf(N)>=0?"y":"x";R[N]+=E[A]*w})}return R}function SR(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?H1:l,d=ra(r),f=d?s?Ih:Ih.filter(function(m){return ra(m)===d}):Oi,h=f.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=f);var p=h.reduce(function(m,b){return m[b]=mi(e,{placement:b,boundary:o,rootBoundary:a,padding:i})[sr(b)],m},{});return Object.keys(p).sort(function(m,b){return p[m]-p[b]})}function kR(e){if(sr(e)===vd)return[];var t=fs(e);return[Mh(e),t,Mh(t)]}function DR(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!0:i,l=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,b=n.allowedAutoPlacements,y=t.options.placement,x=sr(y),T=x===y,C=l||(T||!m?[fs(y)]:kR(y)),k=[y].concat(C).reduce(function(fe,J){return fe.concat(sr(J)===vd?SR(t,{placement:J,boundary:d,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:b}):J)},[]),S=t.rects.reference,v=t.rects.popper,_=new Map,O=!0,B=k[0],R=0;R<k.length;R++){var L=k[R],E=sr(L),N=ra(L)===ea,w=[cn,_n].indexOf(E)>=0,A=w?"width":"height",M=mi(t,{placement:L,boundary:d,rootBoundary:f,altBoundary:h,padding:u}),W=w?N?Bn:dn:N?_n:cn;S[A]>v[A]&&(W=fs(W));var H=fs(W),$=[];if(a&&$.push(M[E]<=0),s&&$.push(M[W]<=0,M[H]<=0),$.every(function(fe){return fe})){B=L,O=!1;break}_.set(L,$)}if(O)for(var D=m?3:1,V=function(J){var X=k.find(function(ee){var K=_.get(ee);if(K)return K.slice(0,J).every(function(te){return te})});if(X)return B=X,"break"},Q=D;Q>0;Q--){var F=V(Q);if(F==="break")break}t.placement!==B&&(t.modifiersData[r]._skip=!0,t.placement=B,t.reset=!0)}}const wR={name:"flip",enabled:!0,phase:"main",fn:DR,requiresIfExists:["offset"],data:{_skip:!1}};function Nh(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 Lh(e){return[cn,Bn,_n,dn].some(function(t){return e[t]>=0})}function AR(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=mi(t,{elementContext:"reference"}),s=mi(t,{altBoundary:!0}),l=Nh(i,r),u=Nh(s,o,a),d=Lh(l),f=Lh(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const IR={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:AR};function PR(e,t,n){var r=sr(e),o=[dn,cn].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[dn,Bn].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}function RR(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=o===void 0?[0,0]:o,i=H1.reduce(function(d,f){return d[f]=PR(f,t.rects,a),d},{}),s=i[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]=i}const MR={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:RR};function OR(e){var t=e.state,n=e.name;t.modifiersData[n]=K1({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const NR={name:"popperOffsets",enabled:!0,phase:"read",fn:OR,data:{}};function LR(e){return e==="x"?"y":"x"}function FR(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!1:i,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,b=m===void 0?0:m,y=mi(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:d}),x=sr(t.placement),T=ra(t.placement),C=!T,k=Dd(x),S=LR(k),v=t.modifiersData.popperOffsets,_=t.rects.reference,O=t.rects.popper,B=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,R=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(v){if(a){var N,w=k==="y"?cn:dn,A=k==="y"?_n:Bn,M=k==="y"?"height":"width",W=v[k],H=W+y[w],$=W-y[A],D=p?-O[M]/2:0,V=T===ea?_[M]:O[M],Q=T===ea?-O[M]:-_[M],F=t.elements.arrow,fe=p&&F?kd(F):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:V1(),X=J[w],ee=J[A],K=oi(0,_[M],fe[M]),te=C?_[M]/2-D-K-X-R.mainAxis:V-K-X-R.mainAxis,oe=C?-_[M]/2+D+K+ee+R.mainAxis:Q+K+ee+R.mainAxis,re=t.elements.arrow&&Ni(t.elements.arrow),pe=re?k==="y"?re.clientTop||0:re.clientLeft||0:0,G=(N=L?.[k])!=null?N:0,Z=W+te-G-pe,xe=W+oe-G,de=oi(p?Ws(H,Z):H,W,p?co($,xe):$);v[k]=de,E[k]=de-W}if(s){var be,ie=k==="x"?cn:dn,Ae=k==="x"?_n:Bn,ve=v[S],Ve=S==="y"?"height":"width",we=ve+y[ie],At=ve-y[Ae],rt=[cn,dn].indexOf(x)!==-1,Ye=(be=L?.[S])!=null?be:0,le=rt?we:ve-_[Ve]-O[Ve]-Ye+R.altAxis,Ce=rt?ve+_[Ve]+O[Ve]-Ye-R.altAxis:At,Oe=p&&rt?iR(le,ve,Ce):oi(p?le:we,ve,p?Ce:At);v[S]=Oe,E[S]=Oe-ve}t.modifiersData[r]=E}}const _R={name:"preventOverflow",enabled:!0,phase:"main",fn:FR,requiresIfExists:["offset"]};function BR(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function jR(e){return e===kn(e)||!Fn(e)?wd(e):BR(e)}function $R(e){var t=e.getBoundingClientRect(),n=ta(t.width)/e.offsetWidth||1,r=ta(t.height)/e.offsetHeight||1;return n!==1||r!==1}function HR(e,t,n){n===void 0&&(n=!1);var r=Fn(t),o=Fn(t)&&$R(t),a=qr(t),i=na(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((lr(t)!=="body"||Id(a))&&(s=jR(t)),Fn(t)?(l=na(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Ad(a))),{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function UR(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function o(a){n.add(a.name);var i=[].concat(a.requires||[],a.requiresIfExists||[]);i.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||o(a)}),r}function zR(e){var t=UR(e);return eR.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function VR(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function WR(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 Fh={placement:"bottom",modifiers:[],strategy:"absolute"};function _h(){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 qR(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,a=o===void 0?Fh:o;return function(s,l,u){u===void 0&&(u=a);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Fh,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],h=!1,p={state:d,setOptions:function(x){var T=typeof x=="function"?x(d.options):x;b(),d.options=Object.assign({},a,d.options,T),d.scrollParents={reference:go(s)?ai(s):s.contextElement?ai(s.contextElement):[],popper:ai(l)};var C=zR(WR([].concat(r,d.options.modifiers)));return d.orderedModifiers=C.filter(function(k){return k.enabled}),m(),p.update()},forceUpdate:function(){if(!h){var x=d.elements,T=x.reference,C=x.popper;if(_h(T,C)){d.rects={reference:HR(T,Ni(C),d.options.strategy==="fixed"),popper:kd(C)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(R){return d.modifiersData[R.name]=Object.assign({},R.data)});for(var k=0;k<d.orderedModifiers.length;k++){if(d.reset===!0){d.reset=!1,k=-1;continue}var S=d.orderedModifiers[k],v=S.fn,_=S.options,O=_===void 0?{}:_,B=S.name;typeof v=="function"&&(d=v({state:d,options:O,name:B,instance:p})||d)}}}},update:VR(function(){return new Promise(function(y){p.forceUpdate(),y(d)})}),destroy:function(){b(),h=!0}};if(!_h(s,l))return p;p.setOptions(u).then(function(y){!h&&u.onFirstUpdate&&u.onFirstUpdate(y)});function m(){d.orderedModifiers.forEach(function(y){var x=y.name,T=y.options,C=T===void 0?{}:T,k=y.effect;if(typeof k=="function"){var S=k({state:d,name:x,instance:p,options:C}),v=function(){};f.push(S||v)}})}function b(){f.forEach(function(y){return y()}),f=[]}return p}}var YR=[gR,NR,hR,rR,MR,wR,_R,cR,IR],KR=qR({defaultModifiers:YR});function GR(e){return Be("MuiPopper",e)}Le("MuiPopper",["root"]);function QR(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 gc(e){return typeof e=="function"?e():e}function XR(e){return e.nodeType!==void 0}const ZR=e=>{const{classes:t}=e;return _e({root:["root"]},GR,t)},JR={},eM=I.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:a,disablePortal:i,modifiers:s,open:l,placement:u,popperOptions:d,popperRef:f,slotProps:h={},slots:p={},TransitionProps:m,ownerState:b,...y}=t,x=I.useRef(null),T=lt(x,n),C=I.useRef(null),k=lt(C,f),S=I.useRef(k);Wt(()=>{S.current=k},[k]),I.useImperativeHandle(f,()=>C.current,[]);const v=QR(u,a),[_,O]=I.useState(v),[B,R]=I.useState(gc(r));I.useEffect(()=>{C.current&&C.current.forceUpdate()}),I.useEffect(()=>{r&&R(gc(r))},[r]),Wt(()=>{if(!B||!l)return;const A=H=>{O(H.placement)};let M=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:H})=>{A(H)}}];s!=null&&(M=M.concat(s)),d&&d.modifiers!=null&&(M=M.concat(d.modifiers));const W=KR(B,x.current,{placement:v,...d,modifiers:M});return S.current(W),()=>{W.destroy(),S.current(null)}},[B,i,s,l,d,v]);const L={placement:_};m!==null&&(L.TransitionProps=m);const E=ZR(t),N=p.root??"div",w=ut({elementType:N,externalSlotProps:h.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:T},ownerState:t,className:E.root});return c.jsx(N,{...w,children:typeof o=="function"?o(L):o})}),tM=I.forwardRef(function(t,n){const{anchorEl:r,children:o,container:a,direction:i="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:u,open:d,placement:f="bottom",popperOptions:h=JR,popperRef:p,style:m,transition:b=!1,slotProps:y={},slots:x={},...T}=t,[C,k]=I.useState(!0),S=()=>{k(!1)},v=()=>{k(!0)};if(!l&&!d&&(!b||C))return null;let _;if(a)_=a;else if(r){const R=gc(r);_=R&&XR(R)?Vt(R).body:Vt(null).body}const O=!d&&l&&(!b||C)?"none":void 0,B=b?{in:d,onEnter:S,onExited:v}:void 0;return c.jsx(S1,{disablePortal:s,container:_,children:c.jsx(eM,{anchorEl:r,direction:i,disablePortal:s,modifiers:u,ref:n,open:b?!C:d,placement:f,popperOptions:h,popperRef:p,slotProps:y,slots:x,...T,style:{position:"fixed",top:0,left:0,display:O,...m},TransitionProps:B,children:o})})}),nM=se(tM,{name:"MuiPopper",slot:"Root"})({}),Pd=I.forwardRef(function(t,n){const r=Yn(),o=Xe({props:t,name:"MuiPopper"}),{anchorEl:a,component:i,components:s,componentsProps:l,container:u,disablePortal:d,keepMounted:f,modifiers:h,open:p,placement:m,popperOptions:b,popperRef:y,transition:x,slots:T,slotProps:C,...k}=o,S=T?.root??s?.Root,v={anchorEl:a,container:u,disablePortal:d,keepMounted:f,modifiers:h,open:p,placement:m,popperOptions:b,popperRef:y,transition:x,...k};return c.jsx(nM,{as:i,direction:r?"rtl":"ltr",slots:{root:S},slotProps:C??l,...v,ref:n})});function rM(e){return Be("MuiListSubheader",e)}Le("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const oM=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:a}=e,i={root:["root",n!=="default"&&`color${De(n)}`,!r&&"gutters",o&&"inset",!a&&"sticky"]};return _e(i,rM,t)},aM=se("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${De(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(nt(({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}}]}))),bc=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListSubheader"}),{className:o,color:a="default",component:i="li",disableGutters:s=!1,disableSticky:l=!1,inset:u=!1,...d}=r,f={...r,color:a,component:i,disableGutters:s,disableSticky:l,inset:u},h=oM(f);return c.jsx(aM,{as:i,className:Ie(h.root,o),ref:n,ownerState:f,...d})});bc&&(bc.muiSkipListHighlight=!0);const iM=kt(c.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 sM(e){return Be("MuiChip",e)}const et=Le("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"]),lM=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:a,onDelete:i,clickable:s,variant:l}=e,u={root:["root",l,n&&"disabled",`size${De(r)}`,`color${De(o)}`,s&&"clickable",s&&`clickableColor${De(o)}`,i&&"deletable",i&&`deletableColor${De(o)}`,`${l}${De(o)}`],label:["label",`label${De(r)}`],avatar:["avatar",`avatar${De(r)}`,`avatarColor${De(o)}`],icon:["icon",`icon${De(r)}`,`iconColor${De(a)}`],deleteIcon:["deleteIcon",`deleteIcon${De(r)}`,`deleteIconColor${De(o)}`,`deleteIcon${De(l)}Color${De(o)}`]};return _e(u,sM,t)},uM=se("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:a,onDelete:i,size:s,variant:l}=n;return[{[`& .${et.avatar}`]:t.avatar},{[`& .${et.avatar}`]:t[`avatar${De(s)}`]},{[`& .${et.avatar}`]:t[`avatarColor${De(r)}`]},{[`& .${et.icon}`]:t.icon},{[`& .${et.icon}`]:t[`icon${De(s)}`]},{[`& .${et.icon}`]:t[`iconColor${De(o)}`]},{[`& .${et.deleteIcon}`]:t.deleteIcon},{[`& .${et.deleteIcon}`]:t[`deleteIcon${De(s)}`]},{[`& .${et.deleteIcon}`]:t[`deleteIconColor${De(r)}`]},{[`& .${et.deleteIcon}`]:t[`deleteIcon${De(l)}Color${De(r)}`]},t.root,t[`size${De(s)}`],t[`color${De(r)}`],a&&t.clickable,a&&r!=="default"&&t[`clickableColor${De(r)})`],i&&t.deletable,i&&r!=="default"&&t[`deletableColor${De(r)}`],t[l],t[`${l}${De(r)}`]]}})(nt(({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",[`&.${et.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${et.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${et.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${et.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${et.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${et.icon}`]:{marginLeft:5,marginRight:-6},[`& .${et.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,[`& .${et.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${et.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Cn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${et.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:{[`& .${et.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${et.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${et.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(Cn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${et.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}`)},[`&.${et.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(Cn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${et.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]}`,[`&.${et.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${et.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${et.avatar}`]:{marginLeft:4},[`& .${et.avatarSmall}`]:{marginLeft:2},[`& .${et.icon}`]:{marginLeft:4},[`& .${et.iconSmall}`]:{marginLeft:2},[`& .${et.deleteIcon}`]:{marginRight:5},[`& .${et.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Cn()).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)}`,[`&.${et.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${et.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${et.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),cM=se("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${De(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 Bh(e){return e.key==="Backspace"||e.key==="Delete"}const G1=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiChip"}),{avatar:o,className:a,clickable:i,color:s="default",component:l,deleteIcon:u,disabled:d=!1,icon:f,label:h,onClick:p,onDelete:m,onKeyDown:b,onKeyUp:y,size:x="medium",variant:T="filled",tabIndex:C,skipFocusWhenDisabled:k=!1,slots:S={},slotProps:v={},..._}=r,O=I.useRef(null),B=lt(O,n),R=X=>{X.stopPropagation(),m&&m(X)},L=X=>{X.currentTarget===X.target&&Bh(X)&&X.preventDefault(),b&&b(X)},E=X=>{X.currentTarget===X.target&&m&&Bh(X)&&m(X),y&&y(X)},N=i!==!1&&p?!0:i,w=N||m?Zo:l||"div",A={...r,component:w,disabled:d,size:x,color:s,iconColor:I.isValidElement(f)&&f.props.color||s,onDelete:!!m,clickable:N,variant:T},M=lM(A),W=w===Zo?{component:l||"div",focusVisibleClassName:M.focusVisible,...m&&{disableRipple:!0}}:{};let H=null;m&&(H=u&&I.isValidElement(u)?I.cloneElement(u,{className:Ie(u.props.className,M.deleteIcon),onClick:R}):c.jsx(iM,{className:M.deleteIcon,onClick:R}));let $=null;o&&I.isValidElement(o)&&($=I.cloneElement(o,{className:Ie(M.avatar,o.props.className)}));let D=null;f&&I.isValidElement(f)&&(D=I.cloneElement(f,{className:Ie(M.icon,f.props.className)}));const V={slots:S,slotProps:v},[Q,F]=ct("root",{elementType:uM,externalForwardedProps:{...V,..._},ownerState:A,shouldForwardComponentProp:!0,ref:B,className:Ie(M.root,a),additionalProps:{disabled:N&&d?!0:void 0,tabIndex:k&&d?-1:C,...W},getSlotProps:X=>({...X,onClick:ee=>{X.onClick?.(ee),p?.(ee)},onKeyDown:ee=>{X.onKeyDown?.(ee),L(ee)},onKeyUp:ee=>{X.onKeyUp?.(ee),E(ee)}})}),[fe,J]=ct("label",{elementType:cM,externalForwardedProps:V,ownerState:A,className:M.label});return c.jsxs(Q,{as:w,...F,children:[$||D,c.jsx(fe,{...J,children:h}),H]})}),dM=kt(c.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 fM(e){return Be("MuiAutocomplete",e)}const Qe=Le("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 jh,$h;const pM=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:a,hasClearIcon:i,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:d}=e,f={root:["root",r&&"expanded",o&&"focused",a&&"fullWidth",i&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${De(d)}`],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 _e(f,fM,t)},hM=se("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:a,inputFocused:i,size:s}=n;return[{[`& .${Qe.tag}`]:t.tag},{[`& .${Qe.tag}`]:t[`tagSize${De(s)}`]},{[`& .${Qe.inputRoot}`]:t.inputRoot},{[`& .${Qe.input}`]:t.input},{[`& .${Qe.input}`]:i&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${Qe.focused} .${Qe.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Qe.clearIndicator}`]:{visibility:"visible"}},[`& .${Qe.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Qe.inputRoot}`]:{[`.${Qe.hasPopupIcon}&, .${Qe.hasClearIcon}&`]:{paddingRight:30},[`.${Qe.hasPopupIcon}.${Qe.hasClearIcon}&`]:{paddingRight:56},[`& .${Qe.input}`]:{width:0,minWidth:30}},[`& .${jr.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${jr.root}.${yn.sizeSmall}`]:{[`& .${jr.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Pn.root}`]:{padding:9,[`.${Qe.hasPopupIcon}&, .${Qe.hasClearIcon}&`]:{paddingRight:39},[`.${Qe.hasPopupIcon}.${Qe.hasClearIcon}&`]:{paddingRight:65},[`& .${Qe.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Qe.endAdornment}`]:{right:9}},[`& .${Pn.root}.${yn.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Qe.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${xn.root}`]:{paddingTop:19,paddingLeft:8,[`.${Qe.hasPopupIcon}&, .${Qe.hasClearIcon}&`]:{paddingRight:39},[`.${Qe.hasPopupIcon}.${Qe.hasClearIcon}&`]:{paddingRight:65},[`& .${xn.input}`]:{padding:"7px 4px"},[`& .${Qe.endAdornment}`]:{right:9}},[`& .${xn.root}.${yn.sizeSmall}`]:{paddingBottom:1,[`& .${xn.input}`]:{padding:"2.5px 4px"}},[`& .${yn.hiddenLabel}`]:{paddingTop:8},[`& .${xn.root}.${yn.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Qe.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${xn.root}.${yn.hiddenLabel}.${yn.sizeSmall}`]:{[`& .${Qe.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Qe.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Qe.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Qe.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Qe.inputRoot}`]:{flexWrap:"wrap"}}}]}),mM=se("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),gM=se(Sn,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),bM=se(Sn,{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)"}}]}),yM=se(Pd,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Qe.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(nt(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),xM=se(To,{name:"MuiAutocomplete",slot:"Paper"})(nt(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),EM=se("div",{name:"MuiAutocomplete",slot:"Loading"})(nt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),CM=se("div",{name:"MuiAutocomplete",slot:"NoOptions"})(nt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),TM=se("ul",{name:"MuiAutocomplete",slot:"Listbox"})(nt(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Qe.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"},[`&.${Qe.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"},[`&.${Qe.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),[`&.${Qe.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}},[`&.${Qe.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),vM=se(bc,{name:"MuiAutocomplete",slot:"GroupLabel"})(nt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),SM=se("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${Qe.option}`]:{paddingLeft:24}}),yc=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:a=!1,autoSelect:i=!1,blurOnSelect:s=!1,ChipProps:l,className:u,clearIcon:d=jh||(jh=c.jsx(dM,{fontSize:"small"})),clearOnBlur:f=!r.freeSolo,clearOnEscape:h=!1,clearText:p="Clear",closeText:m="Close",componentsProps:b,defaultValue:y=r.multiple?[]:null,disableClearable:x=!1,disableCloseOnSelect:T=!1,disabled:C=!1,disabledItemsFocusable:k=!1,disableListWrap:S=!1,disablePortal:v=!1,filterOptions:_,filterSelectedOptions:O=!1,forcePopupIcon:B="auto",freeSolo:R=!1,fullWidth:L=!1,getLimitTagsText:E=st=>`+${st}`,getOptionDisabled:N,getOptionKey:w,getOptionLabel:A,isOptionEqualToValue:M,groupBy:W,handleHomeEndKeys:H=!r.freeSolo,id:$,includeInputInList:D=!1,inputValue:V,limitTags:Q=-1,ListboxComponent:F,ListboxProps:fe,loading:J=!1,loadingText:X="Loading…",multiple:ee=!1,noOptionsText:K="No options",onChange:te,onClose:oe,onHighlightChange:re,onInputChange:pe,onOpen:G,open:Z,openOnFocus:xe=!1,openText:de="Open",options:be,PaperComponent:ie,PopperComponent:Ae,popupIcon:ve=$h||($h=c.jsx(B1,{})),readOnly:Ve=!1,renderGroup:we,renderInput:At,renderOption:rt,renderTags:Ye,renderValue:le,selectOnFocus:Ce=!r.freeSolo,size:Oe="medium",slots:He={},slotProps:je={},value:Ne,...ot}=r,{getRootProps:xt,getInputProps:pt,getInputLabelProps:ae,getPopupIndicatorProps:ye,getClearProps:Re,getItemProps:Fe,getListboxProps:We,getOptionProps:Tt,value:Mt,dirty:gt,expanded:Ut,id:wn,popupOpen:vt,focused:Zt,focusedItem:pr,anchorEl:An,setAnchorEl:Yr,inputValue:Un,groupedOptions:hr}=U8({...r,componentName:"Autocomplete"}),So=!x&&!C&&gt&&!Ve,ba=(!R||B===!0)&&B!==!1,{onMouseDown:Rl}=pt(),{ref:Ml,...Ol}=We(),ya=A||(st=>st.label??st),zt={...r,disablePortal:v,expanded:Ut,focused:Zt,fullWidth:L,getOptionLabel:ya,hasClearIcon:So,hasPopupIcon:ba,inputFocused:pr===-1,popupOpen:vt,size:Oe},qt=pM(zt),Mr={slots:{paper:ie,popper:Ae,...He},slotProps:{chip:l,listbox:fe,...b,...je}},[Ll,xa]=ct("listbox",{elementType:TM,externalForwardedProps:Mr,ownerState:zt,className:qt.listbox,additionalProps:Ol,ref:Ml}),[_i,ge]=ct("paper",{elementType:To,externalForwardedProps:Mr,ownerState:zt,className:qt.paper}),[me,Me]=ct("popper",{elementType:Pd,externalForwardedProps:Mr,ownerState:zt,className:qt.popper,additionalProps:{disablePortal:v,style:{width:An?An.clientWidth:null},role:"presentation",anchorEl:An,open:vt}});let ze;const qe=st=>({className:qt.tag,disabled:C,...Fe(st)});if(ee?Mt.length>0&&(Ye?ze=Ye(Mt,qe,zt):le?ze=le(Mt,qe,zt):ze=Mt.map((st,Or)=>{const{key:Nr,...Ea}=qe({index:Or});return c.jsx(G1,{label:ya(st),size:Oe,...Ea,...Mr.slotProps.chip},Nr)})):le&&Mt!=null&&(ze=le(Mt,qe,zt)),Q>-1&&Array.isArray(ze)){const st=ze.length-Q;!Zt&&st>0&&(ze=ze.splice(0,Q),ze.push(c.jsx("span",{className:qt.tag,children:E(st)},ze.length)))}const _t=we||(st=>c.jsxs("li",{children:[c.jsx(vM,{className:qt.groupLabel,ownerState:zt,component:"div",children:st.group}),c.jsx(SM,{className:qt.groupUl,ownerState:zt,children:st.children})]},st.key)),Bi=rt||((st,Or)=>{const{key:Nr,...Ea}=st;return c.jsx("li",{...Ea,children:ya(Or)},Nr)}),qd=(st,Or)=>{const Nr=Tt({option:st,index:Or});return Bi({...Nr,className:qt.option},st,{selected:Nr["aria-selected"],index:Or,inputValue:Un},zt)},Yd=Mr.slotProps.clearIndicator,Kd=Mr.slotProps.popupIndicator;return c.jsxs(I.Fragment,{children:[c.jsx(hM,{ref:n,className:Ie(qt.root,u),ownerState:zt,...xt(ot),children:At({id:wn,disabled:C,fullWidth:!0,size:Oe==="small"?"small":void 0,InputLabelProps:ae(),InputProps:{ref:Yr,className:qt.inputRoot,startAdornment:ze,onMouseDown:st=>{st.target===st.currentTarget&&Rl(st)},...(So||ba)&&{endAdornment:c.jsxs(mM,{className:qt.endAdornment,ownerState:zt,children:[So?c.jsx(gM,{...Re(),"aria-label":p,title:p,ownerState:zt,...Yd,className:Ie(qt.clearIndicator,Yd?.className),children:d}):null,ba?c.jsx(bM,{...ye(),disabled:C,"aria-label":vt?m:de,title:vt?m:de,ownerState:zt,...Kd,className:Ie(qt.popupIndicator,Kd?.className),children:ve}):null]})}},inputProps:{className:qt.input,disabled:C,readOnly:Ve,...pt()}})}),An?c.jsx(yM,{as:me,...Me,children:c.jsxs(xM,{as:_i,...ge,children:[J&&hr.length===0?c.jsx(EM,{className:qt.loading,ownerState:zt,children:X}):null,hr.length===0&&!R&&!J?c.jsx(CM,{className:qt.noOptions,ownerState:zt,role:"presentation",onMouseDown:st=>{st.preventDefault()},children:K}):null,hr.length>0?c.jsx(Ll,{as:F,...xa,children:hr.map((st,Or)=>W?_t({key:st.key,group:st.group,children:st.options.map((Nr,Ea)=>qd(Nr,st.index+Ea))}):qd(st,Or))}):null]})}):null]})});function Q1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:li(t.components[n].defaultProps,r)}function kM({props:e,name:t,defaultTheme:n,themeId:r}){let o=Ux(n);return o=o[r]||o,Q1({theme:o,name:t,props:e})}function Dt({props:e,name:t}){return kM({props:e,name:t,defaultTheme:ol,themeId:oa})}const DM=Le("MuiBox",["root"]),wM=Lm(),St=Rt.createBox({themeId:oa,defaultTheme:wM,defaultClassName:DM.root,generateClassName:Cm.generate}),Hh=Le("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Uh=Le("MuiListItemIcon",["root","alignItemsFlexStart"]),zh=Le("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function AM(e){return Be("MuiMenuItem",e)}const Oa=Le("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),IM=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},PM=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:a,classes:i}=e,l=_e({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",a&&"selected"]},AM,i);return{...i,...l}},RM=se(Zo,{shouldForwardProp:e=>Dn(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:IM})(nt(({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"}},[`&.${Oa.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Oa.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Oa.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)}},[`&.${Oa.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Oa.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Hh.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Hh.inset}`]:{marginLeft:52},[`& .${zh.root}`]:{marginTop:0,marginBottom:0},[`& .${zh.inset}`]:{paddingLeft:36},[`& .${Uh.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,[`& .${Uh.root} svg`]:{fontSize:"1.25rem"}}}]}))),Jt=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:a="li",dense:i=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:f,className:h,...p}=r,m=I.useContext(uo),b=I.useMemo(()=>({dense:i||m.dense||!1,disableGutters:l}),[m.dense,i,l]),y=I.useRef(null);Wt(()=>{o&&y.current&&y.current.focus()},[o]);const x={...r,dense:b.dense,divider:s,disableGutters:l},T=PM(r),C=lt(y,n);let k;return r.disabled||(k=f!==void 0?f:-1),c.jsx(uo.Provider,{value:b,children:c.jsx(RM,{ref:C,role:d,tabIndex:k,component:a,focusVisibleClassName:Ie(T.focusVisible,u),className:Ie(T.root,h),...p,ownerState:x,classes:T})})});var ps={exports:{}},MM=ps.exports,Vh;function OM(){return Vh||(Vh=1,(function(e,t){(function(n,r){e.exports=r()})(MM,(function(){var n=1e3,r=6e4,o=36e5,a="millisecond",i="second",s="minute",l="hour",u="day",d="week",f="month",h="quarter",p="year",m="date",b="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,T={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(w){var A=["th","st","nd","rd"],M=w%100;return"["+w+(A[(M-20)%10]||A[M]||A[0])+"]"}},C=function(w,A,M){var W=String(w);return!W||W.length>=A?w:""+Array(A+1-W.length).join(M)+w},k={s:C,z:function(w){var A=-w.utcOffset(),M=Math.abs(A),W=Math.floor(M/60),H=M%60;return(A<=0?"+":"-")+C(W,2,"0")+":"+C(H,2,"0")},m:function w(A,M){if(A.date()<M.date())return-w(M,A);var W=12*(M.year()-A.year())+(M.month()-A.month()),H=A.clone().add(W,f),$=M-H<0,D=A.clone().add(W+($?-1:1),f);return+(-(W+(M-H)/($?H-D:D-H))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:f,y:p,w:d,d:u,D:m,h:l,m:s,s:i,ms:a,Q:h}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},S="en",v={};v[S]=T;var _="$isDayjsObject",O=function(w){return w instanceof E||!(!w||!w[_])},B=function w(A,M,W){var H;if(!A)return S;if(typeof A=="string"){var $=A.toLowerCase();v[$]&&(H=$),M&&(v[$]=M,H=$);var D=A.split("-");if(!H&&D.length>1)return w(D[0])}else{var V=A.name;v[V]=A,H=V}return!W&&H&&(S=H),H||!W&&S},R=function(w,A){if(O(w))return w.clone();var M=typeof A=="object"?A:{};return M.date=w,M.args=arguments,new E(M)},L=k;L.l=B,L.i=O,L.w=function(w,A){return R(w,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var E=(function(){function w(M){this.$L=B(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[_]=!0}var A=w.prototype;return A.parse=function(M){this.$d=(function(W){var H=W.date,$=W.utc;if(H===null)return new Date(NaN);if(L.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var D=H.match(y);if(D){var V=D[2]-1||0,Q=(D[7]||"0").substring(0,3);return $?new Date(Date.UTC(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,Q)):new Date(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,Q)}}return new Date(H)})(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 L},A.isValid=function(){return this.$d.toString()!==b},A.isSame=function(M,W){var H=R(M);return this.startOf(W)<=H&&H<=this.endOf(W)},A.isAfter=function(M,W){return R(M)<this.startOf(W)},A.isBefore=function(M,W){return this.endOf(W)<R(M)},A.$g=function(M,W,H){return L.u(M)?this[W]:this.set(H,M)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(M,W){var H=this,$=!!L.u(W)||W,D=L.p(M),V=function(te,oe){var re=L.w(H.$u?Date.UTC(H.$y,oe,te):new Date(H.$y,oe,te),H);return $?re:re.endOf(u)},Q=function(te,oe){return L.w(H.toDate()[te].apply(H.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(oe)),H)},F=this.$W,fe=this.$M,J=this.$D,X="set"+(this.$u?"UTC":"");switch(D){case p:return $?V(1,0):V(31,11);case f:return $?V(1,fe):V(0,fe+1);case d:var ee=this.$locale().weekStart||0,K=(F<ee?F+7:F)-ee;return V($?J-K:J+(6-K),fe);case u:case m:return Q(X+"Hours",0);case l:return Q(X+"Minutes",1);case s:return Q(X+"Seconds",2);case i:return Q(X+"Milliseconds",3);default:return this.clone()}},A.endOf=function(M){return this.startOf(M,!1)},A.$set=function(M,W){var H,$=L.p(M),D="set"+(this.$u?"UTC":""),V=(H={},H[u]=D+"Date",H[m]=D+"Date",H[f]=D+"Month",H[p]=D+"FullYear",H[l]=D+"Hours",H[s]=D+"Minutes",H[i]=D+"Seconds",H[a]=D+"Milliseconds",H)[$],Q=$===u?this.$D+(W-this.$W):W;if($===f||$===p){var F=this.clone().set(m,1);F.$d[V](Q),F.init(),this.$d=F.set(m,Math.min(this.$D,F.daysInMonth())).$d}else V&&this.$d[V](Q);return this.init(),this},A.set=function(M,W){return this.clone().$set(M,W)},A.get=function(M){return this[L.p(M)]()},A.add=function(M,W){var H,$=this;M=Number(M);var D=L.p(W),V=function(fe){var J=R($);return L.w(J.date(J.date()+Math.round(fe*M)),$)};if(D===f)return this.set(f,this.$M+M);if(D===p)return this.set(p,this.$y+M);if(D===u)return V(1);if(D===d)return V(7);var Q=(H={},H[s]=r,H[l]=o,H[i]=n,H)[D]||1,F=this.$d.getTime()+M*Q;return L.w(F,this)},A.subtract=function(M,W){return this.add(-1*M,W)},A.format=function(M){var W=this,H=this.$locale();if(!this.isValid())return H.invalidDate||b;var $=M||"YYYY-MM-DDTHH:mm:ssZ",D=L.z(this),V=this.$H,Q=this.$m,F=this.$M,fe=H.weekdays,J=H.months,X=H.meridiem,ee=function(oe,re,pe,G){return oe&&(oe[re]||oe(W,$))||pe[re].slice(0,G)},K=function(oe){return L.s(V%12||12,oe,"0")},te=X||function(oe,re,pe){var G=oe<12?"AM":"PM";return pe?G.toLowerCase():G};return $.replace(x,(function(oe,re){return re||(function(pe){switch(pe){case"YY":return String(W.$y).slice(-2);case"YYYY":return L.s(W.$y,4,"0");case"M":return F+1;case"MM":return L.s(F+1,2,"0");case"MMM":return ee(H.monthsShort,F,J,3);case"MMMM":return ee(J,F);case"D":return W.$D;case"DD":return L.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return ee(H.weekdaysMin,W.$W,fe,2);case"ddd":return ee(H.weekdaysShort,W.$W,fe,3);case"dddd":return fe[W.$W];case"H":return String(V);case"HH":return L.s(V,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return te(V,Q,!0);case"A":return te(V,Q,!1);case"m":return String(Q);case"mm":return L.s(Q,2,"0");case"s":return String(W.$s);case"ss":return L.s(W.$s,2,"0");case"SSS":return L.s(W.$ms,3,"0");case"Z":return D}return null})(oe)||D.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(M,W,H){var $,D=this,V=L.p(W),Q=R(M),F=(Q.utcOffset()-this.utcOffset())*r,fe=this-Q,J=function(){return L.m(D,Q)};switch(V){case p:$=J()/12;break;case f:$=J();break;case h:$=J()/3;break;case d:$=(fe-F)/6048e5;break;case u:$=(fe-F)/864e5;break;case l:$=fe/o;break;case s:$=fe/r;break;case i:$=fe/n;break;default:$=fe}return H?$:L.a($)},A.daysInMonth=function(){return this.endOf(f).$D},A.$locale=function(){return v[this.$L]},A.locale=function(M,W){if(!M)return this.$L;var H=this.clone(),$=B(M,W,!0);return $&&(H.$L=$),H},A.clone=function(){return L.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()},w})(),N=E.prototype;return R.prototype=N,[["$ms",a],["$s",i],["$m",s],["$H",l],["$W",u],["$M",f],["$y",p],["$D",m]].forEach((function(w){N[w[1]]=function(A){return this.$g(A,w[0],w[1])}})),R.extend=function(w,A){return w.$i||(w(A,E,R),w.$i=!0),R},R.locale=B,R.isDayjs=O,R.unix=function(w){return R(1e3*w)},R.en=v[S],R.Ls=v,R.p={},R}))})(ps)),ps.exports}var NM=OM();const bt=qn(NM);var hs={exports:{}},LM=hs.exports,Wh;function FM(){return Wh||(Wh=1,(function(e,t){(function(n,r){e.exports=r()})(LM,(function(){var n="week",r="year";return function(o,a,i){var s=a.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 d=i(this).startOf(r).add(1,r).date(u),f=i(this).endOf(n);if(d.isBefore(f))return 1}var h=i(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),p=this.diff(h,n,!0);return p<0?i(this).startOf("week").week():Math.ceil(p)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(hs)),hs.exports}var _M=FM();const BM=qn(_M);var ms={exports:{}},jM=ms.exports,qh;function $M(){return qh||(qh=1,(function(e,t){(function(n,r){e.exports=r()})(jM,(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/,a=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(x){this[y]=+x}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=(function(x){if(!x||x==="Z")return 0;var T=x.match(/([+-]|\d\d)/g),C=60*T[1]+(+T[2]||0);return C===0?0:T[0]==="+"?-C:C})(y)}],h=function(y){var x=l[y];return x&&(x.indexOf?x:x.s.concat(x.f))},p=function(y,x){var T,C=l.meridiem;if(C){for(var k=1;k<=24;k+=1)if(y.indexOf(C(k,0,x))>-1){T=k>12;break}}else T=y===(x?"pm":"PM");return T},m={A:[s,function(y){this.afternoon=p(y,!1)}],a:[s,function(y){this.afternoon=p(y,!0)}],Q:[o,function(y){this.month=3*(y-1)+1}],S:[o,function(y){this.milliseconds=100*+y}],SS:[a,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[i,d("seconds")],ss:[i,d("seconds")],m:[i,d("minutes")],mm:[i,d("minutes")],H:[i,d("hours")],h:[i,d("hours")],HH:[i,d("hours")],hh:[i,d("hours")],D:[i,d("day")],DD:[a,d("day")],Do:[s,function(y){var x=l.ordinal,T=y.match(/\d+/);if(this.day=T[0],x)for(var C=1;C<=31;C+=1)x(C).replace(/\[|\]/g,"")===y&&(this.day=C)}],w:[i,d("week")],ww:[a,d("week")],M:[i,d("month")],MM:[a,d("month")],MMM:[s,function(y){var x=h("months"),T=(h("monthsShort")||x.map((function(C){return C.slice(0,3)}))).indexOf(y)+1;if(T<1)throw new Error;this.month=T%12||T}],MMMM:[s,function(y){var x=h("months").indexOf(y)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(y){this.year=u(y)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function b(y){var x,T;x=y,T=l&&l.formats;for(var C=(y=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(R,L,E){var N=E&&E.toUpperCase();return L||T[E]||n[E]||T[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(w,A,M){return A||M.slice(1)}))}))).match(r),k=C.length,S=0;S<k;S+=1){var v=C[S],_=m[v],O=_&&_[0],B=_&&_[1];C[S]=B?{regex:O,parser:B}:v.replace(/^\[|\]$/g,"")}return function(R){for(var L={},E=0,N=0;E<k;E+=1){var w=C[E];if(typeof w=="string")N+=w.length;else{var A=w.regex,M=w.parser,W=R.slice(N),H=A.exec(W)[0];M.call(L,H),R=R.replace(H,"")}}return(function($){var D=$.afternoon;if(D!==void 0){var V=$.hours;D?V<12&&($.hours+=12):V===12&&($.hours=0),delete $.afternoon}})(L),L}}return function(y,x,T){T.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var C=x.prototype,k=C.parse;C.parse=function(S){var v=S.date,_=S.utc,O=S.args;this.$u=_;var B=O[1];if(typeof B=="string"){var R=O[2]===!0,L=O[3]===!0,E=R||L,N=O[2];L&&(N=O[2]),l=this.$locale(),!R&&N&&(l=T.Ls[N]),this.$d=(function(W,H,$,D){try{if(["x","X"].indexOf(H)>-1)return new Date((H==="X"?1e3:1)*W);var V=b(H)(W),Q=V.year,F=V.month,fe=V.day,J=V.hours,X=V.minutes,ee=V.seconds,K=V.milliseconds,te=V.zone,oe=V.week,re=new Date,pe=fe||(Q||F?1:re.getDate()),G=Q||re.getFullYear(),Z=0;Q&&!F||(Z=F>0?F-1:re.getMonth());var xe,de=J||0,be=X||0,ie=ee||0,Ae=K||0;return te?new Date(Date.UTC(G,Z,pe,de,be,ie,Ae+60*te.offset*1e3)):$?new Date(Date.UTC(G,Z,pe,de,be,ie,Ae)):(xe=new Date(G,Z,pe,de,be,ie,Ae),oe&&(xe=D(xe).week(oe).toDate()),xe)}catch{return new Date("")}})(v,B,_,T),this.init(),N&&N!==!0&&(this.$L=this.locale(N).$L),E&&v!=this.format(B)&&(this.$d=new Date("")),l={}}else if(B instanceof Array)for(var w=B.length,A=1;A<=w;A+=1){O[1]=B[A-1];var M=T.apply(this,O);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}A===w&&(this.$d=new Date(""))}else k.call(this,S)}}}))})(ms)),ms.exports}var HM=$M();const UM=qn(HM);var gs={exports:{}},zM=gs.exports,Yh;function VM(){return Yh||(Yh=1,(function(e,t){(function(n,r){e.exports=r()})(zM,(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,a){var i=o.prototype,s=i.format;a.en.formats=n,i.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,d=(function(f,h){return f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(p,m,b){var y=b&&b.toUpperCase();return m||h[b]||n[b]||h[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(x,T,C){return T||C.slice(1)}))}))})(l,u===void 0?{}:u);return s.call(this,d)}}}))})(gs)),gs.exports}var WM=VM();const qM=qn(WM);var bs={exports:{}},YM=bs.exports,Kh;function KM(){return Kh||(Kh=1,(function(e,t){(function(n,r){e.exports=r()})(YM,(function(){return function(n,r,o){r.prototype.isBetween=function(a,i,s,l){var u=o(a),d=o(i),f=(l=l||"()")[0]==="(",h=l[1]===")";return(f?this.isAfter(u,s):!this.isBefore(u,s))&&(h?this.isBefore(d,s):!this.isAfter(d,s))||(f?this.isBefore(u,s):!this.isAfter(u,s))&&(h?this.isAfter(d,s):!this.isBefore(d,s))}}}))})(bs)),bs.exports}var GM=KM();const QM=qn(GM);var ys={exports:{}},XM=ys.exports,Gh;function ZM(){return Gh||(Gh=1,(function(e,t){(function(n,r){e.exports=r()})(XM,(function(){return function(n,r){var o=r.prototype,a=o.format;o.format=function(i){var s=this,l=this.$locale();if(!this.isValid())return a.bind(this)(i);var u=this.$utils(),d=(i||"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(f){switch(f){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(),f==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),f==="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 f}}));return a.bind(this)(d)}}}))})(ys)),ys.exports}var JM=ZM();const eO=qn(JM);bt.extend(qM);bt.extend(BM);bt.extend(QM);bt.extend(eO);const tO={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"},nO={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"},Su=["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
+ `),Qh=["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
+ `),rO=(e,t)=>t?(...n)=>e(...n).locale(t):e;class Xh{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=tO,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,a)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.format(a)===i.format(a)},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(Su);return bt.utc(r)},this.createTZDate=(r,o)=>{if(!this.hasUTCPlugin())throw new Error(Su);if(!this.hasTimezonePlugin())throw new Error(Qh);const a=r!==void 0&&!r.endsWith("Z");return bt(r).tz(this.cleanTimezone(o),a)},this.getLocaleFormats=()=>{const r=bt.Ls,o=this.locale||"en";let a=r[o];return a===void 0&&(a=r.en),a.formats},this.adjustOffset=r=>{if(!this.hasTimezonePlugin())return r;const o=this.getTimezone(r);if(o!=="UTC"){const a=r.tz(this.cleanTimezone(o),!0);if(a.$offset===(r.$offset??0))return r;r.$offset=a.$offset}return r},this.date=(r,o="default")=>{if(r===null)return null;let a;return o==="UTC"?a=this.createUTCDate(r):o==="system"||o==="default"&&!this.hasTimezonePlugin()?a=this.createSystemDate(r):a=this.createTZDate(r,o),this.locale===void 0?a:a.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(Su);return r.utc()}if(o==="system")return r.local();if(!this.hasTimezonePlugin()){if(o==="default")return r;throw new Error(Qh)}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(),a=i=>i.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(s,l,u)=>l||u.slice(1));return r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(i,s,l)=>{const u=l&&l.toUpperCase();return s||o[l]||a(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,a])=>r>=o&&r<=a,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)),a=this.endOfWeek(this.endOfMonth(r));let i=0,s=o;const l=[];for(;s<a;){const u=Math.floor(i/7);l[u]=l[u]||[],l[u].push(s),s=this.addDays(s,1),i+=1}return l},this.getWeekNumber=r=>r.week(),this.getYearRange=([r,o])=>{const a=this.startOfYear(r),i=this.endOfYear(o),s=[];let l=a;for(;this.isBefore(l,i);)s.push(l),l=this.addYears(l,1);return s},this.dayjs=rO(bt,t),this.locale=t,this.formats=Y({},nO,n),bt.extend(UM)}getDayOfWeek(t){return t.day()+1}}function oO(e,t,n,r,o){const[a,i]=I.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return Wt(()=>{if(!n)return;const s=n(e),l=()=>{i(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),a}const aO={...I},X1=aO.useSyncExternalStore;function iO(e,t,n,r,o){const a=I.useCallback(()=>t,[t]),i=I.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:d}=r(e);return()=>d}return a},[a,e,r,o,n]),[s,l]=I.useMemo(()=>{if(n===null)return[a,()=>()=>{}];const d=n(e);return[()=>d.matches,f=>(d.addEventListener("change",f),()=>{d.removeEventListener("change",f)})]},[a,n,e]);return X1(l,s,i)}function Z1(e={}){const{themeId:t}=e;return function(r,o={}){let a=Rm();a&&t&&(a=a[t]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:l=i?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:d=!1}=Q1({name:"MuiUseMediaQuery",props:o,theme:a});let f=typeof r=="function"?r(a):r;return f=f.replace(/^@media( ?)/m,""),f.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
+ `)),(X1!==void 0?iO:oO)(f,s,l,u,d)}}Z1();const J1=Z1({themeId:oa}),sO={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Na=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),lO=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let a;if(e!=null)a=e;else if(o.includes(t))a=t;else if(o.length>0)a=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:a}},qs=(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},ii=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:a,utils:i,timezone:s})=>{const l=qs(i,i.date(void 0,s),e);n&&i.isBefore(o,l)&&(o=l),t&&i.isAfter(r,l)&&(r=l);let u=e,d=e;for(i.isBefore(e,o)&&(u=o,d=null),i.isAfter(e,r)&&(d&&(d=r),u=null);u||d;){if(u&&i.isAfter(u,r)&&(u=null),d&&i.isBefore(d,o)&&(d=null),u){if(!a(u))return u;u=i.addDays(u,1)}if(d){if(!a(d))return d;d=i.addDays(d,-1)}}return null},uO=(e,t)=>t==null||!e.isValid(t)?null:t,jn=(e,t,n)=>t==null||!e.isValid(t)?n:t,cO=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),Rd=(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},eb=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),dO=["year","month","day"],Zh=e=>dO.includes(e),Md=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return Na(n,["year"])?o.year:Na(n,["month"])?o.month:Na(n,["day"])?o.dayOfMonth:Na(n,["month","year"])?`${o.month} ${o.year}`:Na(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},fO=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},pO=["hours","minutes","seconds"],hO=e=>pO.includes(e),Jh=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),mO=(e,t)=>(n,r)=>e?t.isAfter(n,r):Jh(n,t)>Jh(r,t),or={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},gO=e=>Math.max(...e.map(t=>or[t.type]??1)),La=(e,t,n)=>{if(t===or.year)return e.startOfYear(n);if(t===or.month)return e.startOfMonth(n);if(t===or.day)return e.startOfDay(n);let r=n;return t<or.minutes&&(r=e.setMinutes(r,0)),t<or.seconds&&(r=e.setSeconds(r,0)),t<or.milliseconds&&(r=e.setMilliseconds(r,0)),r},bO=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let a=o?o():La(t,n,eb(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,a)&&(a=La(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,a)&&(a=La(t,n,e.maxDate));const i=mO(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&i(e.minTime,a)&&(a=La(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:qs(t,a,e.minTime))),e.maxTime!=null&&i(a,e.maxTime)&&(a=La(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:qs(t,a,e.maxTime))),a},tb=(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}},yO=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},Dl=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),a=e.endOfWeek(r);let i=o;for(;e.isBefore(i,a);)n.push(i),i=e.addDays(i,1);return n.map(s=>e.formatByString(s,t))},nb=(e,t,n,r)=>{switch(n){case"month":return Rd(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return Dl(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(a=>e.formatByString(a,r))}default:return[]}},em="s",xO=["0","1","2","3","4","5","6","7","8","9"],EO=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),em)==="0"?xO:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),em))},bo=(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 a=t.indexOf(r);a>-1&&(n.push(a.toString()),r="")}return n.join("")},Od=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),tm=(e,t)=>{const n=bo(e,t);return n!==" "&&!Number.isNaN(Number(n))},rb=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},ob=(e,t,n,r,o)=>{if(o.type==="day"&&o.contentType==="digit-with-letter"){const i=e.setDate(n.longestMonth,t);return e.formatByString(i,o.format)}let a=t.toString();return o.hasLeadingZerosInInput&&(a=rb(a,o.maxLength)),Od(a,r)},CO=(e,t,n,r,o,a,i,s)=>{const l=yO(r),u=r==="Home",d=r==="End",f=n.value===""||u||d,h=()=>{const m=o[n.type]({currentDate:i,format:n.format,contentType:n.contentType}),b=T=>ob(e,T,m,a,n),y=n.type==="minutes"&&s?.minutesStep?s.minutesStep:1;let x;if(f){if(n.type==="year"&&!d&&!u)return e.formatByString(e.date(void 0,t),n.format);l>0||u?x=m.minimum:x=m.maximum}else x=parseInt(bo(n.value,a),10)+l*y;return x%y!==0&&((l<0||u)&&(x+=y-(y+x)%y),(l>0||d)&&(x-=x%y)),x>m.maximum?b(m.minimum+(x-m.maximum-1)%(m.maximum-m.minimum+1)):x<m.minimum?b(m.maximum-(m.minimum-x-1)%(m.maximum-m.minimum+1)):b(x)},p=()=>{const m=nb(e,t,n.type,n.format);if(m.length===0)return n.value;if(f)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():p()},Nd=(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(bo(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},nm=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),TO=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,ab=(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")}},vO=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],a=[];for(let l=0;l<t.length;l+=1){const u=t[l];r&&u.type==="weekDay"||(o.push(u.format),a.push(Nd(u,"non-input",n)))}const i=o.join(" "),s=a.join(" ");return e.parse(s,i)},SO=e=>e.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),kO=(e,t,n)=>{const o=e.map(a=>{const i=Nd(a,n?"input-rtl":"input-ltr",t);return`${a.startSeparator}${i}${a.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},DO=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),a=e.endOfDay(r),{maxDaysInMonth:i,longestMonth:s}=Rd(e,r).reduce((l,u)=>{const d=e.getDaysInMonth(u);return d>l.maxDaysInMonth?{maxDaysInMonth:d,longestMonth:u}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:TO(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):i,longestMonth:s}),weekDay:({format:l,contentType:u})=>{if(u==="digit"){const d=Dl(e,l).map(Number);return{minimum:Math.min(...d),maximum:Math.max(...d)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const u=e.getHours(a);return bo(e.formatByString(e.endOfDay(r),l),t)!==u.toString()?{minimum:1,maximum:Number(bo(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:u}},minutes:()=>({minimum:0,maximum:e.getMinutes(a)}),seconds:()=>({minimum:0,maximum:e.getSeconds(a)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},wO=(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=Dl(e,t.format),a=e.formatByString(n,t.format),i=o.indexOf(a),l=o.indexOf(t.value)-i;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,a=e.getHours(r);return o&&a>=12?e.addHours(r,-12):!o&&a<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}},rm={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},om=(e,t,n,r,o)=>[...n].sort((a,i)=>rm[a.type]-rm[i.type]).reduce((a,i)=>!o||i.modified?wO(e,i,t,a):a,r),AO=()=>navigator.userAgent.toLowerCase().includes("android"),IO=(e,t)=>{const n={};if(!t)return e.forEach((l,u)=>{const d=u===0?null:u-1,f=u===e.length-1?null:u+1;n[u]={leftIndex:d,rightIndex:f}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let a=0,i=0,s=e.length-1;for(;s>=0;){i=e.findIndex((l,u)=>u>=a&&l.endSeparator?.includes(" ")&&l.endSeparator!==" / "),i===-1&&(i=e.length-1);for(let l=i;l>=a;l-=1)o[l]=s,r[s]=l,s-=1;a=i+1}return e.forEach((l,u)=>{const d=o[u],f=d===0?null:r[d-1],h=d===e.length-1?null:r[d+1];n[u]={leftIndex:f,rightIndex:h}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},xc=(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},PO=(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}},RO=(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}},MO=["value","referenceDate"],ur={emptyValue:null,getTodayValue:eb,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Ue(e,MO);return t!=null&&r.utils.isValid(t)?t:n??bO(r)},cleanValue:uO,areValuesEqual:cO,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)},OO={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:SO,getV6InputValueFromSections:kO,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)},NO=["localeText"],Ec=I.createContext(null),Cc=function(t){const{localeText:n}=t,r=Ue(t,NO),{utils:o,localeText:a}=I.useContext(Ec)??{utils:void 0,localeText:void 0},i=Dt({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:u,dateLibInstance:d,adapterLocale:f,localeText:h}=i,p=I.useMemo(()=>Y({},h,a,n),[h,a,n]),m=I.useMemo(()=>{if(!l)return o||null;const x=new l({locale:f,formats:u,instance:d});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,f,u,d,o]),b=I.useMemo(()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null,[m]),y=I.useMemo(()=>({utils:m,defaultDates:b,localeText:p}),[b,m,p]);return c.jsx(Ec.Provider,{value:y,children:s})},LO=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:Y({},e)}}}}),ib=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return a=>{const i=a!==null&&t.isValid(a)?t.format(a,n):null;return(o??r)(a,t,i)}},sb={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"},FO=sb;LO(sb);const vo=()=>{const e=I.useContext(Ec);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=I.useMemo(()=>Y({},FO,e.localeText),[e.localeText]);return I.useMemo(()=>Y({},e,{localeText:t}),[e,t])},wt=()=>vo().utils,Li=()=>vo().defaultDates,wl=e=>{const t=wt(),n=I.useRef(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};function _O(e){return Be("MuiPickersToolbar",e)}Le("MuiPickersToolbar",["root","content"]);const BO=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],jO=e=>{const{classes:t}=e;return _e({root:["root"],content:["content"]},_O,t)},$O=se("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"}}]})),HO=se("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"}}]}),UO=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersToolbar"}),{children:o,className:a,toolbarTitle:i,hidden:s,titleId:l}=r,u=Ue(r,BO),d=r,f=jO(d);return s?null:c.jsxs($O,Y({ref:n,className:Ie(f.root,a),ownerState:d},u,{children:[c.jsx(mt,{color:"text.secondary",variant:"overline",id:l,children:i}),c.jsx(HO,{className:f.content,ownerState:d,children:o})]}))}),Rr=()=>vo().localeText;function zO(e){return Be("MuiDatePickerToolbar",e)}Le("MuiDatePickerToolbar",["root","title"]);const VO=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],WO=e=>{const{classes:t}=e;return _e({root:["root"],title:["title"]},zO,t)},qO=se(UO,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),YO=se(mt,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),KO=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:a,toolbarFormat:i,toolbarPlaceholder:s="––",views:l,className:u}=r,d=Ue(r,VO),f=wt(),h=Rr(),p=WO(r),m=I.useMemo(()=>{if(!o)return s;const y=Md(f,{format:i,views:l},!0);return f.formatByString(o,y)},[o,i,s,f,l]),b=r;return c.jsx(qO,Y({ref:n,toolbarTitle:h.datePickerToolbarTitle,isLandscape:a,className:Ie(p.root,u)},d,{children:c.jsx(YO,{variant:"h4",align:a?"left":"center",ownerState:b,className:p.title,children:m})}))});function lb(e,t){const n=wt(),r=Li(),o=Dt({props:e,name:t}),a=I.useMemo(()=>o.localeText?.toolbarTitle==null?o.localeText:Y({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle}),[o.localeText]);return Y({},o,{localeText:a},lO({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:jn(n,o.minDate,r.minDate),maxDate:jn(n,o.maxDate,r.maxDate),slots:Y({toolbar:KO},o.slots)})}const Fi=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:a,shouldDisableYear:i,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),d=jn(r.utils,e.minDate,r.defaultDates.minDate),f=jn(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(a&&a(t)):return"shouldDisableMonth";case!!(i&&i(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,u)):return"disablePast";case!!(d&&r.utils.isBeforeDay(t,d)):return"minDate";case!!(f&&r.utils.isAfterDay(t,f)):return"maxDate";default:return null}};Fi.valueManager=ur;const ub=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],GO=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],QO=["minDateTime","maxDateTime"],XO=[...ub,...GO,...QO],cb=e=>XO.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function db(e){const{props:t,validator:n,value:r,timezone:o,onError:a}=e,i=vo(),s=I.useRef(n.valueManager.defaultErrorState),l=n({adapter:i,value:r,timezone:o,props:t}),u=n.valueManager.hasError(l);I.useEffect(()=>{a&&!n.valueManager.isSameError(l,s.current)&&a(l,r),s.current=l},[n,a,l,r]);const d=Pe(f=>n({adapter:i,value:f,timezone:o,props:t}));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:d}}function ZO(e){return Be("MuiInputAdornment",e)}const am=Le("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var im;const JO=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${De(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},eN=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:a,variant:i}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${De(o)}`,i,r&&"hiddenLabel",a&&`size${De(a)}`]};return _e(s,ZO,t)},tN=se("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:JO})(nt(({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"}}]}))),fb=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiInputAdornment"}),{children:o,className:a,component:i="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:u,variant:d,...f}=r,h=Xn()||{};let p=d;d&&h.variant,h&&!p&&(p=h.variant);const m={...r,hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:s,position:u,variant:p},b=eN(m);return c.jsx(El.Provider,{value:null,children:c.jsx(tN,{as:i,ownerState:m,className:Ie(b.root,a),ref:n,...f,children:typeof o=="string"&&!l?c.jsx(mt,{color:"textSecondary",children:o}):c.jsxs(I.Fragment,{children:[u==="start"?im||(im=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});function nN(e){return Be("MuiPickersPopper",e)}Le("MuiPickersPopper",["root","paper"]);function rN(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const oN=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},un=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?un(t.shadowRoot):t:null},aN="@media (pointer: fine)",iN="@media (prefers-reduced-motion: reduce)",Wo=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),sm=Wo&&Wo[1]?parseInt(Wo[1],10):null,lm=Wo&&Wo[2]?parseInt(Wo[2],10):null,sN=sm&&sm<10||lm&&lm<13||!1,pb=()=>J1(iN,{defaultMatches:!1})||sN,lN=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],uN=e=>{const{classes:t}=e;return _e({root:["root"],paper:["paper"]},nN,t)},cN=se(Pd,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),dN=se(To,{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 fN(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function pN(e,t){const n=I.useRef(!1),r=I.useRef(!1),o=I.useRef(null),a=I.useRef(!1);I.useEffect(()=>{if(!e)return;function l(){a.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),a.current=!1}},[e]);const i=Pe(l=>{if(!a.current)return;const u=r.current;r.current=!1;const d=Vt(o.current);if(!o.current||"clientX"in l&&fN(l,d))return;if(n.current){n.current=!1;return}let f;l.composedPath?f=l.composedPath().indexOf(o.current)>-1:f=!d.documentElement.contains(l.target)||o.current.contains(l.target),!f&&!u&&t(l)}),s=()=>{r.current=!0};return I.useEffect(()=>{if(e){const l=Vt(o.current),u=()=>{n.current=!0};return l.addEventListener("touchstart",i),l.addEventListener("touchmove",u),()=>{l.removeEventListener("touchstart",i),l.removeEventListener("touchmove",u)}}},[e,i]),I.useEffect(()=>{if(e){const l=Vt(o.current);return l.addEventListener("click",i),()=>{l.removeEventListener("click",i),r.current=!1}}},[e,i]),[o,s,s]}const hN=I.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:a,paperSlotProps:i,paperClasses:s,onPaperClick:l,onPaperTouchStart:u}=e,d=Ue(e,lN),f=Y({},o,{placement:r}),h=ut({elementType:n,externalSlotProps:i,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:f});return c.jsx(n,Y({},d,h,{onClick:p=>{l(p),h.onClick?.(p)},onTouchStart:p=>{u(p),h.onTouchStart?.(p)},ownerState:f,children:a}))});function mN(e){const t=Dt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:a,onBlur:i,onDismiss:s,open:l,role:u,placement:d,slots:f,slotProps:h,reduceAnimations:p}=t;I.useEffect(()=>{function A(M){l&&M.key==="Escape"&&s()}return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[s,l]);const m=I.useRef(null);I.useEffect(()=>{u==="tooltip"||a&&!a()||(l?m.current=un(document):m.current&&m.current instanceof HTMLElement&&setTimeout(()=>{m.current instanceof HTMLElement&&m.current.focus()}))},[l,u,a]);const[b,y,x]=pN(l,i??s),T=I.useRef(null),C=lt(T,o),k=lt(C,b),S=t,v=uN(S),_=pb(),O=p??_,B=A=>{A.key==="Escape"&&(A.stopPropagation(),s())},R=f?.desktopTransition??O?mo:pi,L=f?.desktopTrapFocus??v1,E=f?.desktopPaper??dN,N=f?.popper??cN,w=ut({elementType:N,externalSlotProps:h?.popper,additionalProps:{transition:!0,role:u,open:l,anchorEl:n,placement:d,onKeyDown:B},className:v.root,ownerState:t});return c.jsx(N,Y({},w,{children:({TransitionProps:A,placement:M})=>c.jsx(L,Y({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},h?.desktopTrapFocus,{children:c.jsx(R,Y({},A,h?.desktopTransition,{children:c.jsx(hN,{PaperComponent:E,ownerState:S,popperPlacement:M,ref:k,onPaperClick:y,onPaperTouchStart:x,paperClasses:v.paper,paperSlotProps:h?.desktopPaper,children:r})}))}))}))}const gN=({open:e,onOpen:t,onClose:n})=>{const r=I.useRef(typeof e=="boolean").current,[o,a]=I.useState(!1);I.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(e)}},[r,e]);const i=I.useCallback(s=>{r||a(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:i}},Ld=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:a})=>{const i=wt(),s=I.useRef(n),l=t??s.current??a.emptyValue,u=I.useMemo(()=>a.getTimezone(i,l),[i,a,l]),d=Pe(m=>u==null?m:a.setTimezone(i,u,m));let f;e?f=e:u?f=u:r?f=i.getTimezone(r):f="default";const h=I.useMemo(()=>a.setTimezone(i,f,l),[a,i,f,l]),p=Pe((m,...b)=>{const y=d(m);o?.(y,...b)});return{value:h,handleValueChange:p,timezone:f}},Fd=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:a,valueManager:i})=>{const[s,l]=Ln({name:e,state:"value",controlled:n,default:r??i.emptyValue}),u=Pe((d,...f)=>{l(d),a?.(d,...f)});return Ld({timezone:t,value:s,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:i})},bN=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?a?!0:n(r.lastPublishedValue):!1},yN=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:a}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&a?i?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},xN=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},EN=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:a,onChange:i,value:s,defaultValue:l,closeOnSelect:u=r==="desktop",timezone:d,referenceDate:f}=e,{current:h}=I.useRef(l),{current:p}=I.useRef(s!==void 0),[m,b]=I.useState(d),y=wt(),x=vo(),{isOpen:T,setIsOpen:C}=gN(e),{timezone:k,value:S,handleValueChange:v}=Ld({timezone:d,value:s,defaultValue:h,referenceDate:f,onChange:i,valueManager:t}),[_,O]=I.useState(()=>{let te;return S!==void 0?te=S:h!==void 0?te=h:te=t.emptyValue,{draft:te,lastPublishedValue:te,lastCommittedValue:te,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),B=t.getTimezone(y,_.draft);m!==d&&(b(d),d&&B&&d!==B&&O(te=>Y({},te,{draft:t.setTimezone(y,d,te.draft)})));const{getValidationErrorForNewValue:R}=db({props:e,validator:o,timezone:k,value:_.draft,onError:e.onError}),L=Pe(te=>{const oe={action:te,dateState:_,hasChanged:de=>!t.areValuesEqual(y,te.value,de),isControlled:p,closeOnSelect:u},re=bN(oe),pe=yN(oe),G=xN(oe);O(de=>Y({},de,{draft:te.value,lastPublishedValue:re?te.value:de.lastPublishedValue,lastCommittedValue:pe?te.value:de.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let Z=null;const xe=()=>(Z||(Z={validationError:te.name==="setValueFromField"?te.context.validationError:R(te.value)},te.name==="setValueFromShortcut"&&(Z.shortcut=te.shortcut)),Z);re&&v(te.value,xe()),pe&&a&&a(te.value,xe()),G&&C(!1)});if(_.lastControlledValue!==s){const te=t.areValuesEqual(y,_.draft,S);O(oe=>Y({},oe,{lastControlledValue:s},te?{}:{lastCommittedValue:S,lastPublishedValue:S,draft:S,hasBeenModifiedSinceMount:!0}))}const E=Pe(()=>{L({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),N=Pe(()=>{L({value:_.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),w=Pe(()=>{L({value:_.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),A=Pe(()=>{L({value:_.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),M=Pe(()=>{L({value:t.getTodayValue(y,k,n),name:"setValueFromAction",pickerAction:"today"})}),W=Pe(te=>{te.preventDefault(),C(!0)}),H=Pe(te=>{te?.preventDefault(),C(!1)}),$=Pe((te,oe="partial")=>L({name:"setValueFromView",value:te,selectionState:oe})),D=Pe((te,oe,re)=>L({name:"setValueFromShortcut",value:te,changeImportance:oe,shortcut:re})),V=Pe((te,oe)=>L({name:"setValueFromField",value:te,context:oe})),Q={onClear:E,onAccept:N,onDismiss:w,onCancel:A,onSetToday:M,onOpen:W,onClose:H},F={value:_.draft,onChange:V},fe=I.useMemo(()=>t.cleanValue(y,_.draft),[y,t,_.draft]),J={value:fe,onChange:$,onClose:H,open:T},ee=Y({},Q,{value:fe,onChange:$,onSelectShortcut:D,isValid:te=>{const oe=o({adapter:x,value:te,timezone:k,props:e});return!t.hasError(oe)}}),K=I.useMemo(()=>({onOpen:W,onClose:H,open:T}),[T,H,W]);return{open:T,fieldProps:F,viewProps:J,layoutProps:ee,actions:Q,contextValue:K}};function hb({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:a,focusedView:i,onFocusedViewChange:s}){const l=I.useRef(n),u=I.useRef(o),d=I.useRef(o.includes(n)?n:o[0]),[f,h]=Ln({name:"useViews",state:"view",controlled:r,default:d.current}),p=I.useRef(a?f:null),[m,b]=Ln({name:"useViews",state:"focusedView",controlled:i,default:p.current});I.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(_=>!o.includes(_)))&&(h(o.includes(n)?n:o[0]),u.current=o,l.current=n)},[n,h,f,o]);const y=o.indexOf(f),x=o[y-1]??null,T=o[y+1]??null,C=Pe((_,O)=>{b(O?_:B=>_===B?null:B),s?.(_,O)}),k=Pe(_=>{C(_,!0),_!==f&&(h(_),t&&t(_))}),S=Pe(()=>{T&&k(T)}),v=Pe((_,O,B)=>{const R=O==="finish",L=B?o.indexOf(B)<o.length-1:!!T;if(e(_,R&&L?"partial":O,B),B&&B!==f){const N=o[o.indexOf(B)+1];N&&k(N)}else R&&S()});return{view:f,setView:k,focusedView:m,setFocusedView:C,nextView:T,previousView:x,defaultView:o.includes(n)?n:o[0],goToNextView:S,setValueAndGoToNextView:v}}const CN=["className","sx"],TN=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:a})=>{const{onChange:i,open:s,onClose:l}=t,{view:u,views:d,openTo:f,onViewChange:h,viewRenderers:p,timezone:m}=e,b=Ue(e,CN),{view:y,setView:x,defaultView:T,focusedView:C,setFocusedView:k,setValueAndGoToNextView:S}=hb({view:u,views:d,openTo:f,onChange:i,onViewChange:h,autoFocus:r}),{hasUIView:v,viewModeLookup:_}=I.useMemo(()=>d.reduce((w,A)=>{let M;return p[A]!=null?M="UI":M="field",w.viewModeLookup[A]=M,M==="UI"&&(w.hasUIView=!0),w},{hasUIView:!1,viewModeLookup:{}}),[p,d]),O=I.useMemo(()=>d.reduce((w,A)=>p[A]!=null&&hO(A)?w+1:w,0),[p,d]),B=_[y],R=Pe(()=>B==="UI"),[L,E]=I.useState(B==="UI"?y:null);return L!==y&&_[y]==="UI"&&E(y),Wt(()=>{B==="field"&&s&&(l(),setTimeout(()=>{a?.current?.setSelectedSections(y),a?.current?.focusField(y)}))},[y]),Wt(()=>{if(!s)return;let w=y;B==="field"&&L!=null&&(w=L),w!==T&&_[w]==="UI"&&_[T]==="UI"&&(w=T),w!==y&&x(w),k(w,!0)},[s]),{hasUIView:v,shouldRestoreFocus:R,layoutProps:{views:d,view:L,onViewChange:x},renderCurrentView:()=>{if(L==null)return null;const w=p[L];if(w==null)return null;const A=Y({},b,n,t,{views:d,timezone:m,onChange:S,view:L,onViewChange:x,focusedView:C,onFocusedViewChange:k,showViewSwitcher:O>1,timeViewsCount:O});return o?o(p,L,A):w(A)}}};function um(){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 vN=(e,t)=>{const[n,r]=I.useState(um);return Wt(()=>{const a=()=>{r(um())};return window.addEventListener("orientationchange",a),()=>{window.removeEventListener("orientationchange",a)}},[]),rN(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},SN=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,a=vN(n.views,o),i=Yn();return{layoutProps:Y({},n,t,{isLandscape:a,isRtl:i,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function kN(e){const{props:t,pickerValueResponse:n}=e;return I.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 mb=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:a,autoFocusView:i,rendererInterceptor:s,fieldRef:l})=>{const u=EN({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:a}),d=TN({props:e,additionalViewProps:o,autoFocusView:i,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),f=SN({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:d.layoutProps}),h=kN({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:d.renderCurrentView,hasUIView:d.hasUIView,shouldRestoreFocus:d.shouldRestoreFocus,layoutProps:f.layoutProps,contextValue:u.contextValue,ownerState:h}};function gb(e){return Be("MuiPickersLayout",e)}const Xr=Le("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),DN=["onAccept","onClear","onCancel","onSetToday","actions"];function wN(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:a}=e,i=Ue(e,DN),s=Rr();if(a==null||a.length===0)return null;const l=a?.map(u=>{switch(u){case"clear":return c.jsx(Ot,{onClick:n,children:s.clearButtonLabel},u);case"cancel":return c.jsx(Ot,{onClick:r,children:s.cancelButtonLabel},u);case"accept":return c.jsx(Ot,{onClick:t,children:s.okButtonLabel},u);case"today":return c.jsx(Ot,{onClick:o,children:s.todayButtonLabel},u);default:return null}});return c.jsx(Pr,Y({},i,{children:l}))}function AN(e){return Be("MuiListItem",e)}Le("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const IN=Le("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function PN(e){return Be("MuiListItemSecondaryAction",e)}Le("MuiListItemSecondaryAction",["root","disableGutters"]);const RN=e=>{const{disableGutters:t,classes:n}=e;return _e({root:["root",t&&"disableGutters"]},PN,n)},MN=se("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}}]}),bb=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...a}=r,i=I.useContext(uo),s={...r,disableGutters:i.disableGutters},l=RN(s);return c.jsx(MN,{className:Ie(l.root,o),ownerState:s,ref:n,...a})});bb.muiName="ListItemSecondaryAction";const ON=(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]},NN=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:a,divider:i,hasSecondaryAction:s}=e;return _e({root:["root",r&&"dense",!o&&"gutters",!a&&"padding",i&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},AN,n)},LN=se("div",{name:"MuiListItem",slot:"Root",overridesResolver:ON})(nt(({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:{[`& > .${IN.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}}]}))),FN=se("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),_N=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiListItem"}),{alignItems:o="center",children:a,className:i,component:s,components:l={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:f,...h}={},dense:p=!1,disableGutters:m=!1,disablePadding:b=!1,divider:y=!1,secondaryAction:x,slotProps:T={},slots:C={},...k}=r,S=I.useContext(uo),v=I.useMemo(()=>({dense:p||S.dense||!1,alignItems:o,disableGutters:m}),[o,S.dense,p,m]),_=I.useRef(null),O=I.Children.toArray(a),B=O.length&&ns(O[O.length-1],["ListItemSecondaryAction"]),R={...r,alignItems:o,dense:v.dense,disableGutters:m,disablePadding:b,divider:y,hasSecondaryAction:B},L=NN(R),E=lt(_,n),N=C.root||l.Root||LN,w=T.root||u.root||{},A={className:Ie(L.root,w.className,i),...k};let M=s||"li";return B?(M=!A.component&&!s?"div":M,d==="li"&&(M==="li"?M="div":A.component==="li"&&(A.component="div")),c.jsx(uo.Provider,{value:v,children:c.jsxs(FN,{as:d,className:Ie(L.container,f),ref:E,ownerState:R,...h,children:[c.jsx(N,{...w,...!Jo(N)&&{as:M,ownerState:{...R,...w.ownerState}},...A,children:O}),O.pop()]})})):c.jsx(uo.Provider,{value:v,children:c.jsxs(N,{...w,as:M,ref:E,...!Jo(N)&&{ownerState:{...R,...w.ownerState}},...A,children:[O,x&&c.jsx(bb,{children:x})]})})}),gi=36,Al=2,Il=320,BN=280,_d=336,jN=["items","changeImportance","isLandscape","onChange","isValid"],$N=["getValue"];function HN(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,a=Ue(e,jN);if(t==null||t.length===0)return null;const i=t.map(s=>{let{getValue:l}=s,u=Ue(s,$N);const d=l({isValid:o});return Y({},u,{label:u.label,onClick:()=>{r(d,n,u)},disabled:!o(d)})});return c.jsx(M1,Y({dense:!0,sx:[{maxHeight:_d,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:i.map(s=>c.jsx(_N,{children:c.jsx(G1,Y({},s))},s.id??s.label))}))}function UN(e){return e.view!==null}const zN=e=>{const{classes:t,isLandscape:n}=e;return _e({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},gb,t)},VN=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:a,view:i,views:s,onViewChange:l,value:u,onChange:d,onSelectShortcut:f,isValid:h,isLandscape:p,disabled:m,readOnly:b,children:y,slots:x,slotProps:T}=e,C=zN(e),k=x?.actionBar??wN,S=ut({elementType:k,externalSlotProps:T?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:a,actions:t==="desktop"?[]:["cancel","accept"]},className:C.actionBar,ownerState:Y({},e,{wrapperVariant:t})}),v=c.jsx(k,Y({},S)),_=x?.toolbar,O=ut({elementType:_,externalSlotProps:T?.toolbar,additionalProps:{isLandscape:p,onChange:d,value:u,view:i,onViewChange:l,views:s,disabled:m,readOnly:b},className:C.toolbar,ownerState:Y({},e,{wrapperVariant:t})}),B=UN(O)&&_?c.jsx(_,Y({},O)):null,R=y,L=x?.tabs,E=i&&L?c.jsx(L,Y({view:i,onViewChange:l,className:C.tabs},T?.tabs)):null,N=x?.shortcuts??HN,w=ut({elementType:N,externalSlotProps:T?.shortcuts,additionalProps:{isValid:h,isLandscape:p,onChange:f},className:C.shortcuts,ownerState:{isValid:h,isLandscape:p,onChange:f,wrapperVariant:t}}),A=i&&N?c.jsx(N,Y({},w)):null;return{toolbar:B,content:R,tabs:E,actionBar:v,shortcuts:A}},WN=e=>{const{isLandscape:t,classes:n}=e;return _e({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},gb,n)},qN=se("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Xr.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Xr.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Xr.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Xr.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Xr.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Xr.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Xr.shortcuts}`]:{gridColumn:3}}}]}),YN=se("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),yb=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:a,tabs:i,actionBar:s,shortcuts:l}=VN(r),{sx:u,className:d,isLandscape:f,wrapperVariant:h}=r,p=WN(r);return c.jsxs(qN,{ref:n,sx:u,className:Ie(p.root,d),ownerState:r,children:[f?l:o,f?o:l,c.jsx(YN,{className:p.contentWrapper,children:h==="desktop"?c.jsxs(I.Fragment,{children:[a,i]}):c.jsxs(I.Fragment,{children:[i,a]})}),s]})}),KN=I.createContext(null);function xb(e){const{contextValue:t,localeText:n,children:r}=e;return c.jsx(KN.Provider,{value:t,children:c.jsx(Cc,{localeText:n,children:r})})}const GN=["props","getOpenDialogAriaText"],QN=["ownerState"],XN=["ownerState"],ZN=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=Ue(e,GN);const{slots:o,slotProps:a,className:i,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:f,onSelectedSectionsChange:h,timezone:p,name:m,label:b,inputRef:y,readOnly:x,disabled:T,autoFocus:C,localeText:k,reduceAnimations:S}=t,v=I.useRef(null),_=I.useRef(null),O=Kn(),B=a?.toolbar?.hidden??!1,{open:R,actions:L,hasUIView:E,layoutProps:N,renderCurrentView:w,shouldRestoreFocus:A,fieldProps:M,contextValue:W,ownerState:H}=mb(Y({},r,{props:t,fieldRef:_,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),$=o.inputAdornment??fb,D=ut({elementType:$,externalSlotProps:a?.inputAdornment,additionalProps:{position:"end"},ownerState:t}),V=Ue(D,QN),Q=o.openPickerButton??Sn,F=ut({elementType:Q,externalSlotProps:a?.openPickerButton,additionalProps:{disabled:T||x,onClick:R?L.onClose:L.onOpen,"aria-label":n(M.value),edge:V.position},ownerState:t}),fe=Ue(F,XN),J=o.openPickerIcon,X=ut({elementType:J,externalSlotProps:a?.openPickerIcon,ownerState:H}),ee=o.field,K=ut({elementType:ee,externalSlotProps:a?.field,additionalProps:Y({},M,B&&{id:O},{readOnly:x,disabled:T,className:i,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:f,onSelectedSectionsChange:h,timezone:p,label:b,name:m,autoFocus:C&&!t.open,focused:R?!0:void 0},y?{inputRef:y}:{}),ownerState:t});E&&(K.InputProps=Y({},K.InputProps,{ref:v},!t.disableOpenPicker&&{[`${V.position}Adornment`]:c.jsx($,Y({},V,{children:c.jsx(Q,Y({},fe,{children:c.jsx(J,Y({},X))}))}))}));const te=Y({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},K.slots),oe=o.layout??yb;let re=O;B&&(b?re=`${O}-label`:re=void 0);const pe=Y({},a,{toolbar:Y({},a?.toolbar,{titleId:O}),popper:Y({"aria-labelledby":re},a?.popper)}),G=lt(_,K.unstableFieldRef);return{renderPicker:()=>c.jsxs(xb,{contextValue:W,localeText:k,children:[c.jsx(ee,Y({},K,{slots:te,slotProps:pe,unstableFieldRef:G})),c.jsx(mN,Y({role:"dialog",placement:"bottom-start",anchorEl:v.current},L,{open:R,slots:o,slotProps:pe,shouldRestoreFocus:A,reduceAnimations:S,children:c.jsx(oe,Y({},N,pe?.layout,{slots:o,slotProps:pe,children:w()}))}))]})}},JN=kt(c.jsx("path",{d:"M7 10l5 5 5-5z"})),eL=kt(c.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),tL=kt(c.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),nL=kt(c.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"}));kt(c.jsxs(I.Fragment,{children:[c.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"}),c.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}));kt(c.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"}));kt(c.jsxs(I.Fragment,{children:[c.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"}),c.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}));const rL=kt(c.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"})),oL=({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},aL=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,a=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let i=null;for(;i=a.exec(t);)n.push({start:i.index,end:a.lastIndex-1});return n},iL=(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}},sL=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:a,token:i,startSeparator:s})=>{if(i==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=tb(e,i),u=ab(e,l.contentType,l.type,i),d=n?u:l.contentType==="digit",f=t!=null&&e.isValid(t);let h=f?e.formatByString(t,i):"",p=null;if(d)if(u)p=h===""?e.formatByString(a,i).length:h.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${i} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,f&&(h=Od(rb(bo(h,o),p),o))}return Y({},l,{format:i,maxLength:p,value:h,placeholder:iL(e,r,l,i),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:d,startSeparator:s,endSeparator:"",modified:!1})},lL=e=>{const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),a=[];let i="";const s=Object.keys(t.formatTokenMap).sort((p,m)=>m.length-p.length),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${s.join("|")})*$`),d=new RegExp(`^(${s.join("|")})`),f=p=>r.find(m=>m.start<=p&&m.end>=p);let h=0;for(;h<n.length;){const p=f(h),m=p!=null,b=l.exec(n.slice(h))?.[1];if(!m&&b!=null&&u.test(b)){let y=b;for(;y.length>0;){const x=d.exec(y)[1];y=y.slice(x.length),a.push(sL(Y({},e,{now:o,token:x,startSeparator:i}))),i=""}h+=b.length}else{const y=n[h];m&&p?.start===h||p?.end===h||(a.length===0?i+=y:a[a.length-1].endSeparator+=y),h+=1}}return a.length===0&&i.length>0&&a.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:i,endSeparator:"",modified:!1}),a},uL=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=a=>{let i=a;return e&&i!==null&&i.includes(" ")&&(i=`⁩${i}⁦`),t==="spacious"&&["/",".","-"].includes(i)&&(i=` ${i} `),i};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),cm=e=>{let t=oL(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=aL(Y({},e,{expandedFormat:t})),r=lL(Y({},e,{expandedFormat:t,escapedParts:n}));return uL(Y({},e,{sections:r}))},cL=e=>{const t=wt(),n=Rr(),r=vo(),o=Yn(),{valueManager:a,fieldValueManager:i,valueType:s,validator:l,internalProps:u,internalProps:{value:d,defaultValue:f,referenceDate:h,onChange:p,format:m,formatDensity:b="dense",selectedSections:y,onSelectedSectionsChange:x,shouldRespectLeadingZeros:T=!1,timezone:C,enableAccessibleFieldDOMStructure:k=!1}}=e,{timezone:S,value:v,handleValueChange:_}=Ld({timezone:C,value:d,defaultValue:f,referenceDate:h,onChange:p,valueManager:a}),O=I.useMemo(()=>EO(t),[t]),B=I.useMemo(()=>DO(t,O,S),[t,O,S]),R=I.useCallback((J,X=null)=>i.getSectionsFromValue(t,J,X,ee=>cm({utils:t,localeText:n,localizedDigits:O,format:m,date:ee,formatDensity:b,shouldRespectLeadingZeros:T,enableAccessibleFieldDOMStructure:k,isRtl:o})),[i,m,n,O,o,T,t,b,k]),[L,E]=I.useState(()=>{const J=R(v),X={sections:J,value:v,referenceValue:a.emptyValue,tempValueStrAndroid:null},ee=gO(J),K=a.getInitialReferenceValue({referenceDate:h,value:v,utils:t,props:u,granularity:ee,timezone:S});return Y({},X,{referenceValue:K})}),[N,w]=Ln({controlled:y,default:null,name:"useField",state:"selectedSections"}),A=J=>{w(J),x?.(J)},M=I.useMemo(()=>xc(N,L.sections),[N,L.sections]),W=M==="all"?0:M,H=({value:J,referenceValue:X,sections:ee})=>{if(E(te=>Y({},te,{sections:ee,value:J,referenceValue:X,tempValueStrAndroid:null})),a.areValuesEqual(t,L.value,J))return;const K={validationError:l({adapter:r,value:J,timezone:S,props:u})};_(J,K)},$=(J,X)=>{const ee=[...L.sections];return ee[J]=Y({},ee[J],{value:X,modified:!0}),ee},D=()=>{H({value:a.emptyValue,referenceValue:L.referenceValue,sections:R(a.emptyValue)})},V=()=>{if(W==null)return;const J=L.sections[W],X=i.getActiveDateManager(t,L,J),K=X.getSections(L.sections).filter(pe=>pe.value!=="").length===(J.value===""?0:1),te=$(W,""),oe=K?null:t.getInvalidDate(),re=X.getNewValuesFromNewActiveDate(oe);H(Y({},re,{sections:te}))},Q=J=>{const X=(te,oe)=>{const re=t.parse(te,m);if(re==null||!t.isValid(re))return null;const pe=cm({utils:t,localeText:n,localizedDigits:O,format:m,date:re,formatDensity:b,shouldRespectLeadingZeros:T,enableAccessibleFieldDOMStructure:k,isRtl:o});return om(t,re,pe,oe,!1)},ee=i.parseValueStr(J,L.referenceValue,X),K=i.updateReferenceValue(t,ee,L.referenceValue);H({value:ee,referenceValue:K,sections:R(ee,L.sections)})},F=({activeSection:J,newSectionValue:X,shouldGoToNextSection:ee})=>{ee&&W<L.sections.length-1&&A(W+1);const K=i.getActiveDateManager(t,L,J),te=$(W,X),oe=K.getSections(te),re=vO(t,oe,O);let pe,G;if(re!=null&&t.isValid(re)){const Z=om(t,re,oe,K.referenceDate,!0);pe=K.getNewValuesFromNewActiveDate(Z),G=!0}else pe=K.getNewValuesFromNewActiveDate(re),G=(re!=null&&!t.isValid(re))!=(K.date!=null&&!t.isValid(K.date));return G?H(Y({},pe,{sections:te})):E(Z=>Y({},Z,pe,{sections:te,tempValueStrAndroid:null}))},fe=J=>E(X=>Y({},X,{tempValueStrAndroid:J}));return I.useEffect(()=>{const J=R(L.value);E(X=>Y({},X,{sections:J}))},[m,t.locale,o]),I.useEffect(()=>{let J;a.areValuesEqual(t,L.value,v)?J=a.getTimezone(t,L.value)!==a.getTimezone(t,v):J=!0,J&&E(X=>Y({},X,{value:v,referenceValue:i.updateReferenceValue(t,v,X.referenceValue),sections:R(v)}))},[v]),{state:L,activeSectionIndex:W,parsedSelectedSections:M,setSelectedSections:A,clearValue:D,clearActiveSection:V,updateSectionValue:F,updateValueFromValueStr:Q,setTempAndroidValueStr:fe,getSectionsFromValue:R,sectionsValueBoundaries:B,localizedDigits:O,timezone:S}},dL=5e3,Lo=e=>e.saveQuery!=null,fL=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:a})=>{const i=wt(),[s,l]=I.useState(null),u=Pe(()=>l(null));I.useEffect(()=>{s!=null&&e[s.sectionIndex]?.type!==s.sectionType&&u()},[e,s,u]),I.useEffect(()=>{if(s!=null){const m=setTimeout(()=>u(),dL);return()=>{clearTimeout(m)}}return()=>{}},[s,u]);const d=({keyPressed:m,sectionIndex:b},y,x)=>{const T=m.toLowerCase(),C=e[b];if(s!=null&&(!x||x(s.value))&&s.sectionIndex===b){const S=`${s.value}${T}`,v=y(S,C);if(!Lo(v))return l({sectionIndex:b,value:S,sectionType:C.type}),v}const k=y(T,C);return Lo(k)&&!k.saveQuery?(u(),null):(l({sectionIndex:b,value:T,sectionType:C.type}),Lo(k)?null:k)},f=m=>{const b=(T,C,k)=>{const S=C.filter(v=>v.toLowerCase().startsWith(k));return S.length===0?{saveQuery:!1}:{sectionValue:S[0],shouldGoToNextSection:S.length===1}},y=(T,C,k,S)=>{const v=_=>nb(i,a,C.type,_);if(C.contentType==="letter")return b(C.format,v(C.format),T);if(k&&S!=null&&tb(i,k).contentType==="letter"){const _=v(k),O=b(k,_,T);return Lo(O)?{saveQuery:!1}:Y({},O,{sectionValue:S(O.sectionValue,_)})}return{saveQuery:!1}};return d(m,(T,C)=>{switch(C.type){case"month":{const k=S=>nm(i,S,i.formats.month,C.format);return y(T,C,i.formats.month,k)}case"weekDay":{const k=(S,v)=>v.indexOf(S).toString();return y(T,C,i.formats.weekday,k)}case"meridiem":return y(T,C);default:return{saveQuery:!1}}})},h=m=>{const b=(x,T)=>{const C=bo(x,r),k=Number(C),S=n[T.type]({currentDate:null,format:T.format,contentType:T.contentType});if(k>S.maximum)return{saveQuery:!1};if(k<S.minimum)return{saveQuery:!0};const v=k*10>S.maximum||C.length===S.maximum.toString().length;return{sectionValue:ob(i,k,S,r,T),shouldGoToNextSection:v}};return d(m,(x,T)=>{if(T.contentType==="digit"||T.contentType==="digit-with-letter")return b(x,T);if(T.type==="month"){ab(i,"digit","month","MM");const C=b(x,{type:T.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Lo(C))return C;const k=nm(i,C.sectionValue,"MM",T.format);return Y({},C,{sectionValue:k})}if(T.type==="weekDay"){const C=b(x,T);if(Lo(C))return C;const k=Dl(i,T.format)[Number(C.sectionValue)-1];return Y({},C,{sectionValue:k})}return{saveQuery:!1}},x=>tm(x,r))};return{applyCharacterEditing:Pe(m=>{const b=e[m.sectionIndex],x=tm(m.keyPressed,r)?h(Y({},m,{keyPressed:Od(m.keyPressed,r)})):f(m);if(x==null){o(null);return}t({activeSection:b,newSectionValue:x.sectionValue,shouldGoToNextSection:x.shouldGoToNextSection})}),resetCharacterQuery:u}},pL=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:a,onFocus:i,onInput:s,onPaste:l,focused:u,autoFocus:d=!1},fieldValueManager:f,applyCharacterEditing:h,resetCharacterQuery:p,setSelectedSections:m,parsedSelectedSections:b,state:y,clearActiveSection:x,clearValue:T,updateSectionValue:C,updateValueFromValueStr:k,sectionOrder:S,areAllSectionsEmpty:v,sectionsValueBoundaries:_}=e,O=I.useRef(null),B=lt(r,O),R=Rr(),L=wt(),E=Kn(),[N,w]=I.useState(!1),A=I.useMemo(()=>({syncSelectionToDOM:()=>{if(!O.current)return;const G=document.getSelection();if(!G)return;if(b==null){G.rangeCount>0&&O.current.getRoot().contains(G.getRangeAt(0).startContainer)&&G.removeAllRanges(),N&&O.current.getRoot().blur();return}if(!O.current.getRoot().contains(un(document)))return;const Z=new window.Range;let xe;b==="all"?xe=O.current.getRoot():y.sections[b].type==="empty"?xe=O.current.getSectionContainer(b):xe=O.current.getSectionContent(b),Z.selectNodeContents(xe),xe.focus(),G.removeAllRanges(),G.addRange(Z)},getActiveSectionIndexFromDOM:()=>{const G=un(document);return!G||!O.current||!O.current.getRoot().contains(G)?null:O.current.getSectionIndexFromDOMElement(G)},focusField:(G=0)=>{if(!O.current||A.getActiveSectionIndexFromDOM()!=null)return;const Z=xc(G,y.sections);w(!0),O.current.getSectionContent(Z).focus()},setSelectedSections:G=>{if(!O.current)return;const Z=xc(G,y.sections);w((Z==="all"?0:Z)!==null),m(G)},isFieldFocused:()=>{const G=un(document);return!!O.current&&O.current.getRoot().contains(G)}}),[b,m,y.sections,N]),M=Pe(G=>{if(!O.current)return;const Z=y.sections[G];O.current.getSectionContent(G).innerHTML=Z.value||Z.placeholder,A.syncSelectionToDOM()}),W=Pe((G,...Z)=>{G.isDefaultPrevented()||!O.current||(w(!0),a?.(G,...Z),b==="all"?setTimeout(()=>{const xe=document.getSelection().getRangeAt(0).startOffset;if(xe===0){m(S.startIndex);return}let de=0,be=0;for(;be<xe&&de<y.sections.length;){const ie=y.sections[de];de+=1,be+=`${ie.startSeparator}${ie.value||ie.placeholder}${ie.endSeparator}`.length}m(de-1)}):N?O.current.getRoot().contains(G.target)||m(S.startIndex):(w(!0),m(S.startIndex)))}),H=Pe(G=>{if(s?.(G),!O.current||b!=="all")return;const xe=G.target.textContent??"";O.current.getRoot().innerHTML=y.sections.map(de=>`${de.startSeparator}${de.value||de.placeholder}${de.endSeparator}`).join(""),A.syncSelectionToDOM(),xe.length===0||xe.charCodeAt(0)===10?(p(),T(),m("all")):xe.length>1?k(xe):(b==="all"&&m(0),h({keyPressed:xe,sectionIndex:0}))}),$=Pe(G=>{if(l?.(G),n||b!=="all"){G.preventDefault();return}const Z=G.clipboardData.getData("text");G.preventDefault(),p(),k(Z)}),D=Pe((...G)=>{if(i?.(...G),N||!O.current)return;w(!0),O.current.getSectionIndexFromDOMElement(un(document))!=null||m(S.startIndex)}),V=Pe((...G)=>{o?.(...G),setTimeout(()=>{if(!O.current)return;const Z=un(document);!O.current.getRoot().contains(Z)&&(w(!1),m(null))})}),Q=Pe(G=>Z=>{Z.isDefaultPrevented()||m(G)}),F=Pe(G=>{G.preventDefault()}),fe=Pe(G=>()=>{m(G)}),J=Pe(G=>{if(G.preventDefault(),n||t||typeof b!="number")return;const Z=y.sections[b],xe=G.clipboardData.getData("text"),de=/^[a-zA-Z]+$/.test(xe),be=/^[0-9]+$/.test(xe),ie=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(xe);Z.contentType==="letter"&&de||Z.contentType==="digit"&&be||Z.contentType==="digit-with-letter"&&ie?(p(),C({activeSection:Z,newSectionValue:xe,shouldGoToNextSection:!0})):!de&&!be&&(p(),k(xe))}),X=Pe(G=>{G.preventDefault(),G.dataTransfer.dropEffect="none"}),ee=Pe(G=>{if(!O.current)return;const Z=G.target,xe=Z.textContent??"",de=O.current.getSectionIndexFromDOMElement(Z),be=y.sections[de];if(n||!O.current){M(de);return}if(xe.length===0){if(be.value===""){M(de);return}const ie=G.nativeEvent.inputType;if(ie==="insertParagraph"||ie==="insertLineBreak"){M(de);return}p(),x();return}h({keyPressed:xe,sectionIndex:de}),M(de)});Wt(()=>{if(!(!N||!O.current)){if(b==="all")O.current.getRoot().focus();else if(typeof b=="number"){const G=O.current.getSectionContent(b);G&&G.focus()}}},[b,N]);const K=I.useMemo(()=>y.sections.reduce((G,Z)=>(G[Z.type]=_[Z.type]({currentDate:null,contentType:Z.contentType,format:Z.format}),G),{}),[_,y.sections]),te=b==="all",oe=I.useMemo(()=>y.sections.map((G,Z)=>{const xe=!te&&!t&&!n;return{container:{"data-sectionindex":Z,onClick:Q(Z)},content:{tabIndex:te||Z>0?-1:0,contentEditable:!te&&!t&&!n,role:"spinbutton",id:`${E}-${G.type}`,"aria-labelledby":`${E}-${G.type}`,"aria-readonly":n,"aria-valuenow":RO(G,L),"aria-valuemin":K[G.type].minimum,"aria-valuemax":K[G.type].maximum,"aria-valuetext":G.value?PO(G,L):R.empty,"aria-label":R[G.type],"aria-disabled":t,spellCheck:xe?!1:void 0,autoCapitalize:xe?"off":void 0,autoCorrect:xe?"off":void 0,[parseInt(I.version,10)>=17?"enterKeyHint":"enterkeyhint"]:xe?"next":void 0,children:G.value||G.placeholder,onInput:ee,onPaste:J,onFocus:fe(Z),onDragOver:X,onMouseUp:F,inputMode:G.contentType==="letter"?"text":"numeric"},before:{children:G.startSeparator},after:{children:G.endSeparator}}}),[y.sections,fe,J,X,ee,Q,F,t,n,te,R,L,K,E]),re=Pe(G=>{k(G.target.value)}),pe=I.useMemo(()=>v?"":f.getV7HiddenInputValueFromSections(y.sections),[v,y.sections,f]);return I.useEffect(()=>{if(O.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
+ `));d&&O.current&&O.current.getSectionContent(S.startIndex).focus()},[]),{interactions:A,returnedValue:{autoFocus:d,readOnly:n,focused:u??N,sectionListRef:B,onBlur:V,onClick:W,onFocus:D,onInput:H,onPaste:$,enableAccessibleFieldDOMStructure:!0,elements:oe,tabIndex:b===0?-1:0,contentEditable:te,value:pe,onChange:re,areAllSectionsEmpty:v}}},jo=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),hL=(e,t,n)=>{let r=0,o=n?1:0;const a=[];for(let i=0;i<e.length;i+=1){const s=e[i],l=Nd(s,n?"input-rtl":"input-ltr",t),u=`${s.startSeparator}${l}${s.endSeparator}`,d=jo(u).length,f=u.length,h=jo(l),p=o+(h===""?0:l.indexOf(h[0]))+s.startSeparator.length,m=p+h.length;a.push(Y({},s,{start:r,end:r+d,startInInput:p,endInInput:m})),r+=d,o+=f}return a},mL=e=>{const t=Yn(),n=I.useRef(void 0),r=I.useRef(void 0),{forwardedProps:{onFocus:o,onClick:a,onPaste:i,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:d=!1,disabled:f=!1},parsedSelectedSections:h,activeSectionIndex:p,state:m,fieldValueManager:b,valueManager:y,applyCharacterEditing:x,resetCharacterQuery:T,updateSectionValue:C,updateValueFromValueStr:k,clearActiveSection:S,clearValue:v,setTempAndroidValueStr:_,setSelectedSections:O,getSectionsFromValue:B,areAllSectionsEmpty:R,localizedDigits:L}=e,E=I.useRef(null),N=lt(l,E),w=I.useMemo(()=>hL(m.sections,L,t),[m.sections,L,t]),A=I.useMemo(()=>({syncSelectionToDOM:()=>{if(!E.current)return;if(h==null){E.current.scrollLeft&&(E.current.scrollLeft=0);return}if(E.current!==un(document))return;const ee=E.current.scrollTop;if(h==="all")E.current.select();else{const K=w[h],te=K.type==="empty"?K.startInInput-K.startSeparator.length:K.startInInput,oe=K.type==="empty"?K.endInInput+K.endSeparator.length:K.endInInput;(te!==E.current.selectionStart||oe!==E.current.selectionEnd)&&E.current===un(document)&&E.current.setSelectionRange(te,oe),clearTimeout(r.current),r.current=setTimeout(()=>{E.current&&E.current===un(document)&&E.current.selectionStart===E.current.selectionEnd&&(E.current.selectionStart!==te||E.current.selectionEnd!==oe)&&A.syncSelectionToDOM()})}E.current.scrollTop=ee},getActiveSectionIndexFromDOM:()=>{const ee=E.current.selectionStart??0,K=E.current.selectionEnd??0;if(ee===0&&K===0)return null;const te=ee<=w[0].startInInput?1:w.findIndex(oe=>oe.startInInput-oe.startSeparator.length>ee);return te===-1?w.length-1:te-1},focusField:(ee=0)=>{un(document)!==E.current&&(E.current?.focus(),O(ee))},setSelectedSections:ee=>O(ee),isFieldFocused:()=>E.current===un(document)}),[E,h,w,O]),M=()=>{const ee=E.current.selectionStart??0;let K;ee<=w[0].startInInput||ee>=w[w.length-1].endInInput?K=1:K=w.findIndex(oe=>oe.startInInput-oe.startSeparator.length>ee);const te=K===-1?w.length-1:K-1;O(te)},W=Pe((...ee)=>{o?.(...ee);const K=E.current;clearTimeout(n.current),n.current=setTimeout(()=>{!K||K!==E.current||p==null&&(K.value.length&&Number(K.selectionEnd)-Number(K.selectionStart)===K.value.length?O("all"):M())})}),H=Pe((ee,...K)=>{ee.isDefaultPrevented()||(a?.(ee,...K),M())}),$=Pe(ee=>{if(i?.(ee),ee.preventDefault(),d||f)return;const K=ee.clipboardData.getData("text");if(typeof h=="number"){const te=m.sections[h],oe=/^[a-zA-Z]+$/.test(K),re=/^[0-9]+$/.test(K),pe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(K);if(te.contentType==="letter"&&oe||te.contentType==="digit"&&re||te.contentType==="digit-with-letter"&&pe){T(),C({activeSection:te,newSectionValue:K,shouldGoToNextSection:!0});return}if(oe||re)return}T(),k(K)}),D=Pe((...ee)=>{s?.(...ee),O(null)}),V=Pe(ee=>{if(d)return;const K=ee.target.value;if(K===""){T(),v();return}const te=ee.nativeEvent.data,oe=te&&te.length>1,re=oe?te:K,pe=jo(re);if(h==="all"&&O(p),p==null||oe){k(oe?te:pe);return}let G;if(h==="all"&&pe.length===1)G=pe;else{const Z=jo(b.getV6InputValueFromSections(w,L,t));let xe=-1,de=-1;for(let ve=0;ve<Z.length;ve+=1)xe===-1&&Z[ve]!==pe[ve]&&(xe=ve),de===-1&&Z[Z.length-ve-1]!==pe[pe.length-ve-1]&&(de=ve);const be=w[p];if(xe<be.start||Z.length-de-1>be.end)return;const Ae=pe.length-Z.length+be.end-jo(be.endSeparator||"").length;G=pe.slice(be.start+jo(be.startSeparator||"").length,Ae)}if(G.length===0){AO()&&_(re),T(),S();return}x({keyPressed:G,sectionIndex:p})}),Q=I.useMemo(()=>u!==void 0?u:b.getV6InputValueFromSections(B(y.emptyValue),L,t),[u,b,B,y.emptyValue,L,t]),F=I.useMemo(()=>m.tempValueStrAndroid??b.getV6InputValueFromSections(m.sections,L,t),[m.sections,b,m.tempValueStrAndroid,L,t]);I.useEffect(()=>(E.current&&E.current===un(document)&&O("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const fe=I.useMemo(()=>p==null||m.sections[p].contentType==="letter"?"text":"numeric",[p,m.sections]),X=!(E.current&&E.current===un(document))&&R;return{interactions:A,returnedValue:{readOnly:d,onBlur:D,onClick:H,onFocus:W,onPaste:$,inputRef:N,enableAccessibleFieldDOMStructure:!1,placeholder:Q,inputMode:fe,autoComplete:"off",value:X?"":F,onChange:V}}},gL=e=>{const t=wt(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:a=!1,disabled:i=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:d,onClear:f},fieldValueManager:h,valueManager:p,validator:m}=e,b=Yn(),y=cL(e),{state:x,activeSectionIndex:T,parsedSelectedSections:C,setSelectedSections:k,clearValue:S,clearActiveSection:v,updateSectionValue:_,setTempAndroidValueStr:O,sectionsValueBoundaries:B,localizedDigits:R,timezone:L}=y,E=fL({sections:x.sections,updateSectionValue:_,sectionsValueBoundaries:B,localizedDigits:R,setTempAndroidValueStr:O,timezone:L}),{resetCharacterQuery:N}=E,w=p.areValuesEqual(t,x.value,p.emptyValue),A=a?pL:mL,M=I.useMemo(()=>IO(x.sections,b&&!a),[x.sections,b,a]),{returnedValue:W,interactions:H}=A(Y({},e,y,E,{areAllSectionsEmpty:w,sectionOrder:M})),$=Pe(J=>{if(l?.(J),!i)switch(!0){case((J.ctrlKey||J.metaKey)&&String.fromCharCode(J.keyCode)==="A"&&!J.shiftKey&&!J.altKey):{J.preventDefault(),k("all");break}case J.key==="ArrowRight":{if(J.preventDefault(),C==null)k(M.startIndex);else if(C==="all")k(M.endIndex);else{const X=M.neighbors[C].rightIndex;X!==null&&k(X)}break}case J.key==="ArrowLeft":{if(J.preventDefault(),C==null)k(M.endIndex);else if(C==="all")k(M.startIndex);else{const X=M.neighbors[C].leftIndex;X!==null&&k(X)}break}case J.key==="Delete":{if(J.preventDefault(),s)break;C==null||C==="all"?S():v(),N();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(J.key):{if(J.preventDefault(),s||T==null)break;C==="all"&&k(T);const X=x.sections[T],ee=h.getActiveDateManager(t,x,X),K=CO(t,L,X,J.key,B,R,ee.date,{minutesStep:o});_({activeSection:X,newSectionValue:K,shouldGoToNextSection:!1});break}}});Wt(()=>{H.syncSelectionToDOM()});const{hasValidationError:D}=db({props:n,validator:m,timezone:L,value:x.value,onError:n.onError}),V=I.useMemo(()=>u!==void 0?u:D,[D,u]);I.useEffect(()=>{!V&&T==null&&N()},[x.referenceValue,T,V]),I.useEffect(()=>{x.tempValueStrAndroid!=null&&T!=null&&(N(),v())},[x.sections]),I.useImperativeHandle(r,()=>({getSections:()=>x.sections,getActiveSectionIndex:H.getActiveSectionIndexFromDOM,setSelectedSections:H.setSelectedSections,focusField:H.focusField,isFieldFocused:H.isFieldFocused}));const Q=Pe((J,...X)=>{J.preventDefault(),f?.(J,...X),S(),H.isFieldFocused()?k(M.startIndex):H.focusField(0)}),F={onKeyDown:$,onClear:Q,error:V,clearable:!!(d&&!w&&!s&&!i)},fe={disabled:i,readOnly:s};return Y({},e.forwardedProps,F,fe,W)},bL=["clearable","onClear","InputProps","sx","slots","slotProps"],yL=["ownerState"],xL=e=>{const t=Rr(),{clearable:n,onClear:r,InputProps:o,sx:a,slots:i,slotProps:s}=e,l=Ue(e,bL),u=i?.clearButton??Sn,d=ut({elementType:u,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),f=Ue(d,yL),h=i?.clearIcon??rL,p=ut({elementType:h,externalSlotProps:s?.clearIcon,ownerState:{}});return Y({},l,{InputProps:Y({},o,{endAdornment:c.jsxs(I.Fragment,{children:[n&&c.jsx(fb,{position:"end",sx:{marginRight:o?.endAdornment?-1:-1.5},children:c.jsx(u,Y({},f,{onClick:r,children:c.jsx(h,Y({fontSize:"small"},p))}))}),o?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(a)?a:[a]]})},EL=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],CL=(e,t)=>I.useMemo(()=>{const n=Y({},e),r={},o=a=>{n.hasOwnProperty(a)&&(r[a]=n[a],delete n[a])};return EL.forEach(o),ub.forEach(o),{forwardedProps:n,internalProps:r}},[e,t]),TL=e=>{const t=wt(),n=Li();return Y({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:jn(t,e.minDate,n.minDate),maxDate:jn(t,e.maxDate,n.maxDate)})},vL=e=>{const t=TL(e),{forwardedProps:n,internalProps:r}=CL(t,"date");return gL({forwardedProps:n,internalProps:r,valueManager:ur,fieldValueManager:OO,validator:Fi,valueType:"date"})};function SL(e){return Be("MuiPickersTextField",e)}Le("MuiPickersTextField",["root","focused","disabled","error","required"]);function kL(e){return Be("MuiPickersInputBase",e)}const qo=Le("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function DL(e){return Be("MuiPickersSectionList",e)}const Fa=Le("MuiPickersSectionList",["root","section","sectionContent"]),wL=["slots","slotProps","elements","sectionListRef"],Eb=se("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Cb=se("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Tb=se("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),vb=se("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),AL=e=>{const{classes:t}=e;return _e({root:["root"],section:["section"],sectionContent:["sectionContent"]},DL,t)};function IL(e){const{slots:t,slotProps:n,element:r,classes:o}=e,a=t?.section??Cb,i=ut({elementType:a,externalSlotProps:n?.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=t?.sectionContent??vb,l=ut({elementType:s,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),u=t?.sectionSeparator??Tb,d=ut({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),f=ut({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return c.jsxs(a,Y({},i,{children:[c.jsx(u,Y({},d)),c.jsx(s,Y({},l)),c.jsx(u,Y({},f))]}))}const PL=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:a,elements:i,sectionListRef:s}=r,l=Ue(r,wL),u=AL(r),d=I.useRef(null),f=lt(n,d),h=b=>{if(!d.current)throw new Error(`MUI X: Cannot call sectionListRef.${b} before the mount of the component.`);return d.current};I.useImperativeHandle(s,()=>({getRoot(){return h("getRoot")},getSectionContainer(b){return h("getSectionContainer").querySelector(`.${Fa.section}[data-sectionindex="${b}"]`)},getSectionContent(b){return h("getSectionContent").querySelector(`.${Fa.section}[data-sectionindex="${b}"] .${Fa.sectionContent}`)},getSectionIndexFromDOMElement(b){const y=h("getSectionIndexFromDOMElement");if(b==null||!y.contains(b))return null;let x=null;return b.classList.contains(Fa.section)?x=b:b.classList.contains(Fa.sectionContent)&&(x=b.parentElement),x==null?null:Number(x.dataset.sectionindex)}}));const p=o?.root??Eb,m=ut({elementType:p,externalSlotProps:a?.root,externalForwardedProps:l,additionalProps:{ref:f,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return c.jsx(p,Y({},m,{children:m.contentEditable?i.map(({content:b,before:y,after:x})=>`${y.children}${b.children}${x.children}`).join(""):c.jsx(I.Fragment,{children:i.map((b,y)=>c.jsx(IL,{slots:o,slotProps:a,element:b,classes:u},y))})}))}),RL=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],ML=e=>Math.round(e*1e5)/1e5,Pl=se("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>Y({},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:`${ML(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),Bd=se(Eb,{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}}]})),OL=se(Cb,{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"})),NL=se(vb,{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"})),LL=se(Tb,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),FL=se("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(Y({},sO)),_L=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:a,readOnly:i,color:s,size:l,endAdornment:u,startAdornment:d}=e,f={root:["root",t&&!n&&"focused",n&&"disabled",i&&"readOnly",r&&"error",a&&"fullWidth",`color${De(s)}`,l==="small"&&"inputSizeSmall",!!d&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return _e(f,kL,o)},jd=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:a,value:i,onChange:s,id:l,endAdornment:u,startAdornment:d,renderSuffix:f,slots:h,slotProps:p,contentEditable:m,tabIndex:b,onInput:y,onPaste:x,onKeyDown:T,name:C,readOnly:k,inputProps:S,inputRef:v,sectionListRef:_}=r,O=Ue(r,RL),B=I.useRef(null),R=lt(n,B),L=lt(S?.ref,v),E=Yn(),N=Xn();if(!N)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const w=D=>{if(N.disabled){D.stopPropagation();return}N.onFocus?.(D)};I.useEffect(()=>{N&&N.setAdornedStart(!!d)},[N,d]),I.useEffect(()=>{N&&(a?N.onEmpty():N.onFilled())},[N,a]);const A=Y({},r,N,{isRtl:E}),M=_L(A),W=h?.root||Pl,H=ut({elementType:W,externalSlotProps:p?.root,externalForwardedProps:O,additionalProps:{"aria-invalid":N.error,ref:R},className:M.root,ownerState:A}),$=h?.input||Bd;return c.jsxs(W,Y({},H,{children:[d,c.jsx(PL,{sectionListRef:_,elements:o,contentEditable:m,tabIndex:b,className:M.sectionsContainer,onFocus:w,onBlur:N.onBlur,onInput:y,onPaste:x,onKeyDown:T,slots:{root:$,section:OL,sectionContent:NL,sectionSeparator:LL},slotProps:{root:{ownerState:A},sectionContent:{className:qo.sectionContent},sectionSeparator:({position:D})=>({className:D==="before"?qo.sectionBefore:qo.sectionAfter})}}),u,f?f(Y({},N)):null,c.jsx(FL,Y({name:C,className:M.input,value:i,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:k,required:N.required,disabled:N.disabled},S,{ref:L}))]}))});function BL(e){return Be("MuiPickersOutlinedInput",e)}const Vn=Y({},qo,Le("MuiPickersOutlinedInput",["root","notchedOutline","input"])),jL=["children","className","label","notched","shrink"],$L=se("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}}),dm=se("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),HL=se("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 UL(e){const{className:t,label:n}=e,r=Ue(e,jL),o=n!=null&&n!=="",a=Y({},e,{withLabel:o});return c.jsx($L,Y({"aria-hidden":!0,className:t},r,{ownerState:a,children:c.jsx(HL,{ownerState:a,children:o?c.jsx(dm,{children:n}):c.jsx(dm,{className:"notranslate",children:"​"})})}))}const zL=["label","autoFocus","ownerState","notched"],VL=se(Pl,{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 .${Vn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Vn.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Vn.focused} .${Vn.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Vn.disabled}`]:{[`& .${Vn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Vn.error} .${Vn.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:{[`&.${Vn.focused}:not(.${Vn.error}) .${Vn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),WL=se(Bd,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),qL=e=>{const{classes:t}=e,r=_e({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},BL,t);return Y({},t,r)},Sb=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:a,notched:i}=r,s=Ue(r,zL),l=Xn(),u=Y({},r,a,l,{color:l?.color||"primary"}),d=qL(u);return c.jsx(jd,Y({slots:{root:VL,input:WL},renderSuffix:f=>c.jsx(UL,{shrink:!!(i||f.adornedStart||f.focused||f.filled),notched:!!(i||f.adornedStart||f.focused||f.filled),className:d.notchedOutline,label:o!=null&&o!==""&&l?.required?c.jsxs(I.Fragment,{children:[o," ","*"]}):o,ownerState:u})},s,{label:o,classes:d,ref:n}))});Sb.muiName="Input";function YL(e){return Be("MuiPickersFilledInput",e)}const Zr=Y({},qo,Le("MuiPickersFilledInput",["root","underline","input"])),KL=["label","autoFocus","disableUnderline","ownerState"],GL=se(Pl,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Rt.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)",a=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}},[`&.${Zr.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Zr.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((e.vars??e).palette).filter(i=>(e.vars??e).palette[i].main).map(i=>({props:{color:i,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[i]?.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"},[`&.${Zr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Zr.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(.${Zr.disabled}, .${Zr.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Zr.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:i})=>!!i,style:{paddingLeft:12}},{props:({endAdornment:i})=>!!i,style:{paddingRight:12}}]}}),QL=se(Bd,{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}}]}),XL=e=>{const{classes:t,disableUnderline:n}=e,o=_e({root:["root",!n&&"underline"],input:["input"]},YL,t);return Y({},t,o)},kb=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:a=!1,ownerState:i}=r,s=Ue(r,KL),l=Xn(),u=Y({},r,i,l,{color:l?.color||"primary"}),d=XL(u);return c.jsx(jd,Y({slots:{root:GL,input:QL},slotProps:{root:{disableUnderline:a}}},s,{label:o,classes:d,ref:n}))});kb.muiName="Input";function ZL(e){return Be("MuiPickersFilledInput",e)}const _a=Y({},qo,Le("MuiPickersInput",["root","input"])),JL=["label","autoFocus","disableUnderline","ownerState"],eF=se(Pl,{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"},[`&.${_a.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_a.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(.${_a.disabled}, .${_a.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${_a.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),tF=e=>{const{classes:t,disableUnderline:n}=e,o=_e({root:["root",!n&&"underline"],input:["input"]},ZL,t);return Y({},t,o)},Db=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:a=!1,ownerState:i}=r,s=Ue(r,JL),l=Xn(),u=Y({},r,i,l,{disableUnderline:a,color:l?.color||"primary"}),d=tF(u);return c.jsx(jd,Y({slots:{root:eF}},s,{label:o,classes:d,ref:n}))});Db.muiName="Input";const nF=["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"],rF={standard:Db,filled:kb,outlined:Sb},oF=se(zs,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),aF=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return _e({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},SL,r)},iF=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:a,className:i,color:s="primary",disabled:l=!1,error:u=!1,variant:d="outlined",required:f=!1,InputProps:h,inputProps:p,inputRef:m,sectionListRef:b,elements:y,areAllSectionsEmpty:x,onClick:T,onKeyDown:C,onKeyUp:k,onPaste:S,onInput:v,endAdornment:_,startAdornment:O,tabIndex:B,contentEditable:R,focused:L,value:E,onChange:N,fullWidth:w,id:A,name:M,helperText:W,FormHelperTextProps:H,label:$,InputLabelProps:D}=r,V=Ue(r,nF),Q=I.useRef(null),F=lt(n,Q),fe=Kn(A),J=W&&fe?`${fe}-helper-text`:void 0,X=$&&fe?`${fe}-label`:void 0,ee=Y({},r,{color:s,disabled:l,error:u,focused:L,required:f,variant:d}),K=aF(ee),te=rF[d];return c.jsxs(oF,Y({className:Ie(K.root,i),ref:F,focused:L,onFocus:o,onBlur:a,disabled:l,variant:d,error:u,color:s,fullWidth:w,required:f,ownerState:ee},V,{children:[c.jsx(Us,Y({htmlFor:fe,id:X},D,{children:$})),c.jsx(te,Y({elements:y,areAllSectionsEmpty:x,onClick:T,onKeyDown:C,onKeyUp:k,onInput:v,onPaste:S,endAdornment:_,startAdornment:O,tabIndex:B,contentEditable:R,value:E,onChange:N,id:fe,fullWidth:w,inputProps:p,inputRef:m,sectionListRef:b,label:$,name:M,role:"group","aria-labelledby":X,"aria-describedby":J,"aria-live":J?"polite":void 0},h)),W&&c.jsx(R1,Y({id:J},H,{children:W}))]}))}),sF=["enableAccessibleFieldDOMStructure"],lF=["InputProps","readOnly"],uF=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],cF=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=Ue(e,sF);if(t){const{InputProps:f,readOnly:h}=n,p=Ue(n,lF);return Y({},p,{InputProps:Y({},f??{},{readOnly:h})})}const{onPaste:r,onKeyDown:o,inputMode:a,readOnly:i,InputProps:s,inputProps:l,inputRef:u}=n,d=Ue(n,uF);return Y({},d,{InputProps:Y({},s??{},{readOnly:i}),inputProps:Y({},l??{},{inputMode:a,onPaste:r,onKeyDown:o,ref:u})})},dF=["slots","slotProps","InputProps","inputProps"],wb=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiDateField"}),{slots:o,slotProps:a,InputProps:i,inputProps:s}=r,l=Ue(r,dF),u=r,d=o?.textField??(t.enableAccessibleFieldDOMStructure?iF:Je),f=ut({elementType:d,externalSlotProps:a?.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:u});f.inputProps=Y({},s,f.inputProps),f.InputProps=Y({},i,f.InputProps);const h=vL(f),p=cF(h),m=xL(Y({},p,{slots:o,slotProps:a}));return c.jsx(d,Y({},m))}),Ab=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:i,timezone:s})=>{const l=vo();return I.useCallback(u=>Fi({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:i}})!==null,[l,e,t,n,r,o,a,i,s])},fF=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return Y({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const a=o.newTimezone;if(n.getTimezone(r.currentMonth)===a)return r;let i=n.setTimezone(r.currentMonth,a);return n.getMonth(i)!==n.getMonth(r.currentMonth)&&(i=n.setMonth(i,n.getMonth(r.currentMonth))),Y({},r,{currentMonth:i})}case"finishMonthSwitchingAnimation":return Y({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const a=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return Y({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:a&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:a?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},pF=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:a=!1,maxDate:i,minDate:s,onMonthChange:l,reduceAnimations:u,shouldDisableDate:d,timezone:f}=e,h=wt(),p=I.useRef(fF(!!u,a,h)).current,m=I.useMemo(()=>ur.getInitialReferenceValue({value:t,utils:h,timezone:f,props:e,referenceDate:n,granularity:or.day}),[n,f]),[b,y]=I.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:h.startOfMonth(m),slideDirection:"left"});I.useEffect(()=>{y({type:"changeMonthTimezone",newTimezone:h.getTimezone(m)})},[m,h]);const x=I.useCallback(v=>{y(Y({type:"changeMonth"},v)),l&&l(v.newMonth)},[l]),T=I.useCallback(v=>{const _=v;h.isSameMonth(_,b.currentMonth)||x({newMonth:h.startOfMonth(_),direction:h.isAfterDay(_,b.currentMonth)?"left":"right"})},[b.currentMonth,x,h]),C=Ab({shouldDisableDate:d,minDate:s,maxDate:i,disableFuture:r,disablePast:o,timezone:f}),k=I.useCallback(()=>{y({type:"finishMonthSwitchingAnimation"})},[]),S=Pe((v,_)=>{C(v)||y({type:"changeFocusedDay",focusedDay:v,withoutMonthSwitchingAnimation:_})});return{referenceDate:m,calendarState:b,changeMonth:T,changeFocusedDay:S,isDateDisabled:C,onMonthSwitchingAnimationEnd:k,handleChangeMonth:x}},hF=e=>Be("MuiPickersFadeTransitionGroup",e);Le("MuiPickersFadeTransitionGroup",["root"]);const mF=e=>{const{classes:t}=e;return _e({root:["root"]},hF,t)},gF=se(Ri,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Ib(e){const t=Dt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,i=mF(t),s=yo();return o?n:c.jsx(gF,{className:Ie(i.root,r),children:c.jsx(mo,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},a)})}function bF(e){return Be("MuiPickersDay",e)}const Jr=Le("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),yF=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],xF=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:a,outsideCurrentMonth:i,showDaysOutsideCurrentMonth:s,classes:l}=e,u=i&&!s;return _e({root:["root",t&&!u&&"selected",a&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",i&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},bF,l)},Pb=({theme:e})=>Y({},e.typography.caption,{width:gi,height:gi,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})`:Rt.alpha(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Rt.alpha(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Jr.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Jr.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}},[`&.${Jr.disabled}:not(.${Jr.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Jr.disabled}&.${Jr.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Al}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${Jr.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Rb=(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]},EF=se(Zo,{name:"MuiPickersDay",slot:"Root",overridesResolver:Rb})(Pb),CF=se("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Rb})(({theme:e})=>Y({},Pb({theme:e}),{opacity:0,pointerEvents:"none"})),Ba=()=>{},TF=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:a,day:i,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:d,onClick:f,onDaySelect:h,onFocus:p=Ba,onBlur:m=Ba,onKeyDown:b=Ba,onMouseDown:y=Ba,onMouseEnter:x=Ba,outsideCurrentMonth:T,selected:C=!1,showDaysOutsideCurrentMonth:k=!1,children:S,today:v=!1}=r,_=Ue(r,yF),O=Y({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:u,selected:C,showDaysOutsideCurrentMonth:k,today:v}),B=xF(O),R=wt(),L=I.useRef(null),E=lt(L,n);Wt(()=>{o&&!s&&!d&&!T&&L.current.focus()},[o,s,d,T]);const N=A=>{y(A),T&&A.preventDefault()},w=A=>{s||h(i),T&&A.currentTarget.focus(),f&&f(A)};return T&&!k?c.jsx(CF,{className:Ie(B.root,B.hiddenDaySpacingFiller,a),ownerState:O,role:_.role}):c.jsx(EF,Y({className:Ie(B.root,a),ref:E,centerRipple:!0,disabled:s,tabIndex:C?0:-1,onKeyDown:A=>b(A,i),onFocus:A=>p(A,i),onBlur:A=>m(A,i),onMouseEnter:A=>x(A,i),onClick:w,onMouseDown:N},_,{ownerState:O,children:S||R.format(i,"dayOfMonth")}))}),vF=I.memo(TF),SF=e=>Be("MuiPickersSlideTransition",e),In=Le("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),kF=["children","className","reduceAnimations","slideDirection","transKey","classes"],DF=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return _e(r,SF,t)},wF=se(Ri,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${In["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${In["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${In.slideEnterActive}`]:t.slideEnterActive},{[`.${In.slideExit}`]:t.slideExit},{[`.${In["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${In["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},[`& .${In["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${In["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${In.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${In.slideExit}`]:{transform:"translate(0%)"},[`& .${In["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${In["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function AF(e){const t=Dt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,i=Ue(t,kF),s=DF(t),l=yo();if(o)return c.jsx("div",{className:Ie(s.root,r),children:n});const u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return c.jsx(wF,{className:Ie(s.root,r),childFactory:d=>I.cloneElement(d,{classNames:u}),role:"presentation",children:c.jsx(fd,Y({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},i,{children:n}),a)})}const IF=e=>Be("MuiDayCalendar",e);Le("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const PF=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],RF=["ownerState"],MF=e=>{const{classes:t}=e;return _e({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},IF,t)},Mb=(gi+Al*2)*6,OF=se("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),NF=se("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),LF=se(mt,{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})),FF=se(mt,{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})),_F=se(mt,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>Y({},e.typography.caption,{width:gi,height:gi,padding:0,margin:`0 ${Al}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),BF=se("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Mb}),jF=se(AF,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Mb}),$F=se("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),HF=se("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Al}px 0`,display:"flex",justifyContent:"center"});function UF(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:a,currentMonthNumber:i,isViewFocused:s}=e,l=Ue(e,PF);const{disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:h,slots:p,slotProps:m,timezone:b}=t,y=wt(),x=wl(b),T=r!==null&&y.isSameDay(n,r),C=o.some(E=>y.isSameDay(E,n)),k=y.isSameDay(n,x),S=p?.day??vF,v=ut({elementType:S,externalSlotProps:m?.day,additionalProps:Y({disableHighlightToday:d,showDaysOutsideCurrentMonth:h,role:"gridcell",isAnimating:f,"data-timestamp":y.toJsDate(n).valueOf()},l),ownerState:Y({},t,{day:n,selected:C})}),_=Ue(v,RF),O=I.useMemo(()=>u||a(n),[u,a,n]),B=I.useMemo(()=>y.getMonth(n)!==i,[y,n,i]),R=I.useMemo(()=>{const E=y.startOfMonth(y.setMonth(n,i));return h?y.isSameDay(n,y.startOfWeek(E)):y.isSameDay(n,E)},[i,n,h,y]),L=I.useMemo(()=>{const E=y.endOfMonth(y.setMonth(n,i));return h?y.isSameDay(n,y.endOfWeek(E)):y.isSameDay(n,E)},[i,n,h,y]);return c.jsx(S,Y({},_,{day:n,disabled:O,autoFocus:s&&T,today:k,outsideCurrentMonth:B,isFirstVisibleCell:R,isLastVisibleCell:L,selected:C,tabIndex:T?0:-1,"aria-selected":C,"aria-current":k?"date":void 0}))}function zF(e){const t=Dt({props:e,name:"MuiDayCalendar"}),n=wt(),{onFocusedDayChange:r,className:o,currentMonth:a,selectedDays:i,focusedDay:s,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:f,reduceAnimations:h,renderLoading:p=()=>c.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:b,disablePast:y,disableFuture:x,minDate:T,maxDate:C,shouldDisableDate:k,shouldDisableMonth:S,shouldDisableYear:v,dayOfWeekFormatter:_=de=>n.format(de,"weekdayShort").charAt(0).toUpperCase(),hasFocus:O,onFocusedViewChange:B,gridLabelId:R,displayWeekNumber:L,fixedWeekNumber:E,autoFocus:N,timezone:w}=t,A=wl(w),M=MF(t),W=Yn(),H=Ab({shouldDisableDate:k,shouldDisableMonth:S,shouldDisableYear:v,minDate:T,maxDate:C,disablePast:y,disableFuture:x,timezone:w}),$=Rr(),[D,V]=Ln({name:"DayCalendar",state:"hasFocus",controlled:O,default:N??!1}),[Q,F]=I.useState(()=>s||A),fe=Pe(de=>{f||u(de)}),J=de=>{H(de)||(r(de),F(de),B?.(!0),V(!0))},X=Pe((de,be)=>{switch(de.key){case"ArrowUp":J(n.addDays(be,-7)),de.preventDefault();break;case"ArrowDown":J(n.addDays(be,7)),de.preventDefault();break;case"ArrowLeft":{const ie=n.addDays(be,W?1:-1),Ae=n.addMonths(be,W?1:-1),ve=ii({utils:n,date:ie,minDate:W?ie:n.startOfMonth(Ae),maxDate:W?n.endOfMonth(Ae):ie,isDateDisabled:H,timezone:w});J(ve||ie),de.preventDefault();break}case"ArrowRight":{const ie=n.addDays(be,W?-1:1),Ae=n.addMonths(be,W?-1:1),ve=ii({utils:n,date:ie,minDate:W?n.startOfMonth(Ae):ie,maxDate:W?ie:n.endOfMonth(Ae),isDateDisabled:H,timezone:w});J(ve||ie),de.preventDefault();break}case"Home":J(n.startOfWeek(be)),de.preventDefault();break;case"End":J(n.endOfWeek(be)),de.preventDefault();break;case"PageUp":J(n.addMonths(be,1)),de.preventDefault();break;case"PageDown":J(n.addMonths(be,-1)),de.preventDefault();break}}),ee=Pe((de,be)=>J(be)),K=Pe((de,be)=>{D&&n.isSameDay(Q,be)&&B?.(!1)}),te=n.getMonth(a),oe=n.getYear(a),re=I.useMemo(()=>i.filter(de=>!!de).map(de=>n.startOfDay(de)),[n,i]),pe=`${oe}-${te}`,G=I.useMemo(()=>I.createRef(),[pe]),Z=I.useMemo(()=>{const de=n.startOfMonth(a),be=n.endOfMonth(a);return H(Q)||n.isAfterDay(Q,be)||n.isBeforeDay(Q,de)?ii({utils:n,date:Q,minDate:de,maxDate:be,disablePast:y,disableFuture:x,isDateDisabled:H,timezone:w}):Q},[a,x,y,Q,H,n,w]),xe=I.useMemo(()=>{const de=n.getWeekArray(a);let be=n.addMonths(a,1);for(;E&&de.length<E;){const ie=n.getWeekArray(be),Ae=n.isSameDay(de[de.length-1][0],ie[0][0]);ie.slice(Ae?1:0).forEach(ve=>{de.length<E&&de.push(ve)}),be=n.addMonths(be,1)}return de},[a,E,n]);return c.jsxs(OF,{role:"grid","aria-labelledby":R,className:M.root,children:[c.jsxs(NF,{role:"row",className:M.header,children:[L&&c.jsx(FF,{variant:"caption",role:"columnheader","aria-label":$.calendarWeekNumberHeaderLabel,className:M.weekNumberLabel,children:$.calendarWeekNumberHeaderText}),fO(n,A).map((de,be)=>c.jsx(LF,{variant:"caption",role:"columnheader","aria-label":n.format(de,"weekday"),className:M.weekDayLabel,children:_(de)},be.toString()))]}),l?c.jsx(BF,{className:M.loadingContainer,children:p()}):c.jsx(jF,Y({transKey:pe,onExited:d,reduceAnimations:h,slideDirection:m,className:Ie(o,M.slideTransition)},b,{nodeRef:G,children:c.jsx($F,{ref:G,role:"rowgroup",className:M.monthContainer,children:xe.map((de,be)=>c.jsxs(HF,{role:"row",className:M.weekContainer,"aria-rowindex":be+1,children:[L&&c.jsx(_F,{className:M.weekNumber,role:"rowheader","aria-label":$.calendarWeekNumberAriaLabelText(n.getWeekNumber(de[0])),children:$.calendarWeekNumberText(n.getWeekNumber(de[0]))}),de.map((ie,Ae)=>c.jsx(UF,{parentProps:t,day:ie,selectedDays:re,focusableDay:Z,onKeyDown:X,onFocus:ee,onBlur:K,onDaySelect:fe,isDateDisabled:H,currentMonthNumber:te,isViewFocused:D,"aria-colindex":Ae+1},ie.toString()))]},`week-${de[0]}`))})}))]})}function VF(e){return Be("MuiPickersMonth",e)}const Ji=Le("MuiPickersMonth",["root","monthButton","disabled","selected"]),WF=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],qF=e=>{const{disabled:t,selected:n,classes:r}=e;return _e({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},VF,r)},YF=se("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%"}}]}),KF=se("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${Ji.disabled}`]:t.disabled},{[`&.${Ji.selected}`]:t.selected}]})(({theme:e})=>Y({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})`:Rt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Ji.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Ji.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),GF=I.memo(function(t){const n=Dt({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:a,disabled:i,selected:s,value:l,tabIndex:u,onClick:d,onKeyDown:f,onFocus:h,onBlur:p,"aria-current":m,"aria-label":b,slots:y,slotProps:x}=n,T=Ue(n,WF),C=I.useRef(null),k=qF(n);Wt(()=>{r&&C.current?.focus()},[r]);const S=y?.monthButton??KF,v=ut({elementType:S,externalSlotProps:x?.monthButton,additionalProps:{children:a,disabled:i,tabIndex:u,ref:C,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":b,onClick:_=>d(_,l),onKeyDown:_=>f(_,l),onFocus:_=>h(_,l),onBlur:_=>p(_,l)},ownerState:n,className:k.monthButton});return c.jsx(YF,Y({className:Ie(k.root,o),ownerState:n},T,{children:c.jsx(S,Y({},v))}))});function QF(e){return Be("MuiMonthCalendar",e)}Le("MuiMonthCalendar",["root"]);const XF=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],ZF=e=>{const{classes:t}=e;return _e({root:["root"]},QF,t)};function JF(e,t){const n=wt(),r=Li(),o=Dt({props:e,name:t});return Y({disableFuture:!1,disablePast:!1},o,{minDate:jn(n,o.minDate,r.minDate),maxDate:jn(n,o.maxDate,r.maxDate)})}const e_=se("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Il,boxSizing:"border-box"}),t_=I.forwardRef(function(t,n){const r=JF(t,"MuiMonthCalendar"),{className:o,value:a,defaultValue:i,referenceDate:s,disabled:l,disableFuture:u,disablePast:d,maxDate:f,minDate:h,onChange:p,shouldDisableMonth:m,readOnly:b,autoFocus:y=!1,onMonthFocus:x,hasFocus:T,onFocusedViewChange:C,monthsPerRow:k=3,timezone:S,gridLabelId:v,slots:_,slotProps:O}=r,B=Ue(r,XF),{value:R,handleValueChange:L,timezone:E}=Fd({name:"MonthCalendar",timezone:S,value:a,defaultValue:i,referenceDate:s,onChange:p,valueManager:ur}),N=wl(E),w=Yn(),A=wt(),M=I.useMemo(()=>ur.getInitialReferenceValue({value:R,utils:A,props:r,timezone:E,referenceDate:s,granularity:or.month}),[]),W=r,H=ZF(W),$=I.useMemo(()=>A.getMonth(N),[A,N]),D=I.useMemo(()=>R!=null?A.getMonth(R):null,[R,A]),[V,Q]=I.useState(()=>D||A.getMonth(M)),[F,fe]=Ln({name:"MonthCalendar",state:"hasFocus",controlled:T,default:y??!1}),J=Pe(pe=>{fe(pe),C&&C(pe)}),X=I.useCallback(pe=>{const G=A.startOfMonth(d&&A.isAfter(N,h)?N:h),Z=A.startOfMonth(u&&A.isBefore(N,f)?N:f),xe=A.startOfMonth(pe);return A.isBefore(xe,G)||A.isAfter(xe,Z)?!0:m?m(xe):!1},[u,d,f,h,N,m,A]),ee=Pe((pe,G)=>{if(b)return;const Z=A.setMonth(R??M,G);L(Z)}),K=Pe(pe=>{X(A.setMonth(R??M,pe))||(Q(pe),J(!0),x&&x(pe))});I.useEffect(()=>{Q(pe=>D!==null&&pe!==D?D:pe)},[D]);const te=Pe((pe,G)=>{switch(pe.key){case"ArrowUp":K((12+G-3)%12),pe.preventDefault();break;case"ArrowDown":K((12+G+3)%12),pe.preventDefault();break;case"ArrowLeft":K((12+G+(w?1:-1))%12),pe.preventDefault();break;case"ArrowRight":K((12+G+(w?-1:1))%12),pe.preventDefault();break}}),oe=Pe((pe,G)=>{K(G)}),re=Pe((pe,G)=>{V===G&&J(!1)});return c.jsx(e_,Y({ref:n,className:Ie(H.root,o),ownerState:W,role:"radiogroup","aria-labelledby":v},B,{children:Rd(A,R??M).map(pe=>{const G=A.getMonth(pe),Z=A.format(pe,"monthShort"),xe=A.format(pe,"month"),de=G===D,be=l||X(pe);return c.jsx(GF,{selected:de,value:G,onClick:ee,onKeyDown:te,autoFocus:F&&G===V,disabled:be,tabIndex:G===V&&!be?0:-1,onFocus:oe,onBlur:re,"aria-current":$===G?"date":void 0,"aria-label":xe,monthsPerRow:k,slots:_,slotProps:O,children:Z},Z)})}))});function n_(e){return Be("MuiPickersYear",e)}const es=Le("MuiPickersYear",["root","yearButton","selected","disabled"]),r_=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],o_=e=>{const{disabled:t,selected:n,classes:r}=e;return _e({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},n_,r)},a_=se("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%"}}]}),i_=se("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${es.disabled}`]:t.disabled},{[`&.${es.selected}`]:t.selected}]})(({theme:e})=>Y({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})`:Rt.alpha(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Rt.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${es.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${es.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),s_=I.memo(function(t){const n=Dt({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:a,disabled:i,selected:s,value:l,tabIndex:u,onClick:d,onKeyDown:f,onFocus:h,onBlur:p,"aria-current":m,slots:b,slotProps:y}=n,x=Ue(n,r_),T=I.useRef(null),C=o_(n);Wt(()=>{r&&T.current?.focus()},[r]);const k=b?.yearButton??i_,S=ut({elementType:k,externalSlotProps:y?.yearButton,additionalProps:{children:a,disabled:i,tabIndex:u,ref:T,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:v=>d(v,l),onKeyDown:v=>f(v,l),onFocus:v=>h(v,l),onBlur:v=>p(v,l)},ownerState:n,className:C.yearButton});return c.jsx(a_,Y({className:Ie(C.root,o),ownerState:n},x,{children:c.jsx(k,Y({},S))}))});function l_(e){return Be("MuiYearCalendar",e)}Le("MuiYearCalendar",["root"]);const u_=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],c_=e=>{const{classes:t}=e;return _e({root:["root"]},l_,t)};function d_(e,t){const n=wt(),r=Li(),o=Dt({props:e,name:t});return Y({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:jn(n,o.minDate,r.minDate),maxDate:jn(n,o.maxDate,r.maxDate)})}const f_=se("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Il,maxHeight:BN,boxSizing:"border-box",position:"relative"}),p_=I.forwardRef(function(t,n){const r=d_(t,"MuiYearCalendar"),{autoFocus:o,className:a,value:i,defaultValue:s,referenceDate:l,disabled:u,disableFuture:d,disablePast:f,maxDate:h,minDate:p,onChange:m,readOnly:b,shouldDisableYear:y,onYearFocus:x,hasFocus:T,onFocusedViewChange:C,yearsOrder:k="asc",yearsPerRow:S,timezone:v,gridLabelId:_,slots:O,slotProps:B}=r,R=Ue(r,u_),{value:L,handleValueChange:E,timezone:N}=Fd({name:"YearCalendar",timezone:v,value:i,defaultValue:s,referenceDate:l,onChange:m,valueManager:ur}),w=wl(N),A=Yn(),M=wt(),W=I.useMemo(()=>ur.getInitialReferenceValue({value:L,utils:M,props:r,timezone:N,referenceDate:l,granularity:or.year}),[]),H=r,$=c_(H),D=I.useMemo(()=>M.getYear(w),[M,w]),V=I.useMemo(()=>L!=null?M.getYear(L):null,[L,M]),[Q,F]=I.useState(()=>V||M.getYear(W)),[fe,J]=Ln({name:"YearCalendar",state:"hasFocus",controlled:T,default:o??!1}),X=Pe(ie=>{J(ie),C&&C(ie)}),ee=I.useCallback(ie=>{if(f&&M.isBeforeYear(ie,w)||d&&M.isAfterYear(ie,w)||p&&M.isBeforeYear(ie,p)||h&&M.isAfterYear(ie,h))return!0;if(!y)return!1;const Ae=M.startOfYear(ie);return y(Ae)},[d,f,h,p,w,y,M]),K=Pe((ie,Ae)=>{if(b)return;const ve=M.setYear(L??W,Ae);E(ve)}),te=Pe(ie=>{ee(M.setYear(L??W,ie))||(F(ie),X(!0),x?.(ie))});I.useEffect(()=>{F(ie=>V!==null&&ie!==V?V:ie)},[V]);const oe=k!=="desc"?S*1:S*-1,re=A&&k==="asc"||!A&&k==="desc"?-1:1,pe=Pe((ie,Ae)=>{switch(ie.key){case"ArrowUp":te(Ae-oe),ie.preventDefault();break;case"ArrowDown":te(Ae+oe),ie.preventDefault();break;case"ArrowLeft":te(Ae-re),ie.preventDefault();break;case"ArrowRight":te(Ae+re),ie.preventDefault();break}}),G=Pe((ie,Ae)=>{te(Ae)}),Z=Pe((ie,Ae)=>{Q===Ae&&X(!1)}),xe=I.useRef(null),de=lt(n,xe);I.useEffect(()=>{if(o||xe.current===null)return;const ie=xe.current.querySelector('[tabindex="0"]');if(!ie)return;const Ae=ie.offsetHeight,ve=ie.offsetTop,Ve=xe.current.clientHeight,we=xe.current.scrollTop,At=ve+Ae;Ae>Ve||ve<we||(xe.current.scrollTop=At-Ve/2-Ae/2)},[o]);const be=M.getYearRange([p,h]);return k==="desc"&&be.reverse(),c.jsx(f_,Y({ref:de,className:Ie($.root,a),ownerState:H,role:"radiogroup","aria-labelledby":_},R,{children:be.map(ie=>{const Ae=M.getYear(ie),ve=Ae===V,Ve=u||ee(ie);return c.jsx(s_,{selected:ve,value:Ae,onClick:K,onKeyDown:pe,autoFocus:fe&&Ae===Q,disabled:Ve,tabIndex:Ae===Q&&!Ve?0:-1,onFocus:G,onBlur:Z,"aria-current":D===Ae?"date":void 0,yearsPerRow:S,slots:O,slotProps:B,children:M.format(ie,"year")},M.format(ie,"year"))})}))}),h_=e=>Be("MuiPickersCalendarHeader",e),m_=Le("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function g_(e){return Be("MuiPickersArrowSwitcher",e)}Le("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const b_=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],y_=["ownerState"],x_=["ownerState"],E_=se("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),C_=se("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),fm=se(Sn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),T_=e=>{const{classes:t}=e;return _e({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},g_,t)},v_=I.forwardRef(function(t,n){const r=Yn(),o=Dt({props:t,name:"MuiPickersArrowSwitcher"}),{children:a,className:i,slots:s,slotProps:l,isNextDisabled:u,isNextHidden:d,onGoToNext:f,nextLabel:h,isPreviousDisabled:p,isPreviousHidden:m,onGoToPrevious:b,previousLabel:y,labelId:x}=o,T=Ue(o,b_),C=o,k=T_(C),S={isDisabled:u,isHidden:d,goTo:f,label:h},v={isDisabled:p,isHidden:m,goTo:b,label:y},_=s?.previousIconButton??fm,O=ut({elementType:_,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:v.label,"aria-label":v.label,disabled:v.isDisabled,edge:"end",onClick:v.goTo},ownerState:Y({},C,{hidden:v.isHidden}),className:Ie(k.button,k.previousIconButton)}),B=s?.nextIconButton??fm,R=ut({elementType:B,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"start",onClick:S.goTo},ownerState:Y({},C,{hidden:S.isHidden}),className:Ie(k.button,k.nextIconButton)}),L=s?.leftArrowIcon??eL,E=ut({elementType:L,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:k.leftArrowIcon}),N=Ue(E,y_),w=s?.rightArrowIcon??tL,A=ut({elementType:w,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:k.rightArrowIcon}),M=Ue(A,x_);return c.jsxs(E_,Y({ref:n,className:Ie(k.root,i),ownerState:C},T,{children:[c.jsx(_,Y({},O,{children:r?c.jsx(w,Y({},M)):c.jsx(L,Y({},N))})),a?c.jsx(mt,{variant:"subtitle1",component:"span",id:x,children:a}):c.jsx(C_,{className:k.spacer,ownerState:C}),c.jsx(B,Y({},R,{children:r?c.jsx(L,Y({},N)):c.jsx(w,Y({},M))}))]}))});function S_(e,{disableFuture:t,maxDate:n,timezone:r}){const o=wt();return I.useMemo(()=>{const a=o.date(void 0,r),i=o.startOfMonth(t&&o.isBefore(a,n)?a:n);return!o.isAfter(i,e)},[t,n,e,o,r])}function k_(e,{disablePast:t,minDate:n,timezone:r}){const o=wt();return I.useMemo(()=>{const a=o.date(void 0,r),i=o.startOfMonth(t&&o.isAfter(a,n)?a:n);return!o.isBefore(i,e)},[t,n,e,o,r])}const D_=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],w_=["ownerState"],A_=e=>{const{classes:t}=e;return _e({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},h_,t)},I_=se("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}),P_=se("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>Y({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),R_=se("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),M_=se(Sn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${m_.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),O_=se(JN,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),N_=I.forwardRef(function(t,n){const r=Rr(),o=wt(),a=Dt({props:t,name:"MuiPickersCalendarHeader"}),{slots:i,slotProps:s,currentMonth:l,disabled:u,disableFuture:d,disablePast:f,maxDate:h,minDate:p,onMonthChange:m,onViewChange:b,view:y,reduceAnimations:x,views:T,labelId:C,className:k,timezone:S,format:v=`${o.formats.month} ${o.formats.year}`}=a,_=Ue(a,D_),O=a,B=A_(a),R=i?.switchViewButton??M_,L=ut({elementType:R,externalSlotProps:s?.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(y)},ownerState:O,className:B.switchViewButton}),E=i?.switchViewIcon??O_,N=ut({elementType:E,externalSlotProps:s?.switchViewIcon,ownerState:O,className:B.switchViewIcon}),w=Ue(N,w_),A=()=>m(o.addMonths(l,1),"left"),M=()=>m(o.addMonths(l,-1),"right"),W=S_(l,{disableFuture:d,maxDate:h,timezone:S}),H=k_(l,{disablePast:f,minDate:p,timezone:S}),$=()=>{if(!(T.length===1||!b||u))if(T.length===2)b(T.find(V=>V!==y)||T[0]);else{const V=T.indexOf(y)!==0?0:1;b(T[V])}};if(T.length===1&&T[0]==="year")return null;const D=o.formatByString(l,v);return c.jsxs(I_,Y({},_,{ownerState:O,className:Ie(B.root,k),ref:n,children:[c.jsxs(P_,{role:"presentation",onClick:$,ownerState:O,"aria-live":"polite",className:B.labelContainer,children:[c.jsx(Ib,{reduceAnimations:x,transKey:D,children:c.jsx(R_,{id:C,ownerState:O,className:B.label,children:D})}),T.length>1&&!u&&c.jsx(R,Y({},L,{children:c.jsx(E,Y({},w))}))]}),c.jsx(mo,{in:y==="day",appear:!x,enter:!x,children:c.jsx(v_,{slots:i,slotProps:s,onGoToPrevious:M,isPreviousDisabled:H,previousLabel:r.previousMonth,onGoToNext:A,isNextDisabled:W,nextLabel:r.nextMonth})})]}))}),L_=se("div")({overflow:"hidden",width:Il,maxHeight:_d,display:"flex",flexDirection:"column",margin:"0 auto"}),F_=e=>Be("MuiDateCalendar",e);Le("MuiDateCalendar",["root","viewTransitionContainer"]);const __=["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"],B_=e=>{const{classes:t}=e;return _e({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},F_,t)};function j_(e,t){const n=wt(),r=Li(),o=pb(),a=Dt({props:e,name:t});return Y({},a,{loading:a.loading??!1,disablePast:a.disablePast??!1,disableFuture:a.disableFuture??!1,openTo:a.openTo??"day",views:a.views??["year","day"],reduceAnimations:a.reduceAnimations??o,renderLoading:a.renderLoading??(()=>c.jsx("span",{children:"..."})),minDate:jn(n,a.minDate,r.minDate),maxDate:jn(n,a.maxDate,r.maxDate)})}const $_=se(L_,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:_d}),H_=se(Ib,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),U_=I.forwardRef(function(t,n){const r=wt(),o=Kn(),a=j_(t,"MuiDateCalendar"),{autoFocus:i,onViewChange:s,value:l,defaultValue:u,referenceDate:d,disableFuture:f,disablePast:h,onChange:p,onYearChange:m,onMonthChange:b,reduceAnimations:y,shouldDisableDate:x,shouldDisableMonth:T,shouldDisableYear:C,view:k,views:S,openTo:v,className:_,disabled:O,readOnly:B,minDate:R,maxDate:L,disableHighlightToday:E,focusedView:N,onFocusedViewChange:w,showDaysOutsideCurrentMonth:A,fixedWeekNumber:M,dayOfWeekFormatter:W,slots:H,slotProps:$,loading:D,renderLoading:V,displayWeekNumber:Q,yearsOrder:F,yearsPerRow:fe,monthsPerRow:J,timezone:X}=a,ee=Ue(a,__),{value:K,handleValueChange:te,timezone:oe}=Fd({name:"DateCalendar",timezone:X,value:l,defaultValue:u,referenceDate:d,onChange:p,valueManager:ur}),{view:re,setView:pe,focusedView:G,setFocusedView:Z,goToNextView:xe,setValueAndGoToNextView:de}=hb({view:k,views:S,openTo:v,onChange:te,onViewChange:s,autoFocus:i,focusedView:N,onFocusedViewChange:w}),{referenceDate:be,calendarState:ie,changeFocusedDay:Ae,changeMonth:ve,handleChangeMonth:Ve,isDateDisabled:we,onMonthSwitchingAnimationEnd:At}=pF({value:K,referenceDate:d,reduceAnimations:y,onMonthChange:b,minDate:R,maxDate:L,shouldDisableDate:x,disablePast:h,disableFuture:f,timezone:oe}),rt=O&&K||R,Ye=O&&K||L,le=`${o}-grid-label`,Ce=G!==null,Oe=H?.calendarHeader??N_,He=ut({elementType:Oe,externalSlotProps:$?.calendarHeader,additionalProps:{views:S,view:re,currentMonth:ie.currentMonth,onViewChange:pe,onMonthChange:(We,Tt)=>Ve({newMonth:We,direction:Tt}),minDate:rt,maxDate:Ye,disabled:O,disablePast:h,disableFuture:f,reduceAnimations:y,timezone:oe,labelId:le},ownerState:a}),je=Pe(We=>{const Tt=r.startOfMonth(We),Mt=r.endOfMonth(We),gt=we(We)?ii({utils:r,date:We,minDate:r.isBefore(R,Tt)?Tt:R,maxDate:r.isAfter(L,Mt)?Mt:L,disablePast:h,disableFuture:f,isDateDisabled:we,timezone:oe}):We;gt?(de(gt,"finish"),b?.(Tt)):(xe(),ve(Tt)),Ae(gt,!0)}),Ne=Pe(We=>{const Tt=r.startOfYear(We),Mt=r.endOfYear(We),gt=we(We)?ii({utils:r,date:We,minDate:r.isBefore(R,Tt)?Tt:R,maxDate:r.isAfter(L,Mt)?Mt:L,disablePast:h,disableFuture:f,isDateDisabled:we,timezone:oe}):We;gt?(de(gt,"finish"),m?.(gt)):(xe(),ve(Tt)),Ae(gt,!0)}),ot=Pe(We=>te(We&&qs(r,We,K??be),"finish",re));I.useEffect(()=>{K!=null&&r.isValid(K)&&ve(K)},[K]);const xt=a,pt=B_(xt),ae={disablePast:h,disableFuture:f,maxDate:L,minDate:R},ye={disableHighlightToday:E,readOnly:B,disabled:O,timezone:oe,gridLabelId:le,slots:H,slotProps:$},Re=I.useRef(re);I.useEffect(()=>{Re.current!==re&&(G===Re.current&&Z(re,!0),Re.current=re)},[G,Z,re]);const Fe=I.useMemo(()=>[K],[K]);return c.jsxs($_,Y({ref:n,className:Ie(pt.root,_),ownerState:xt},ee,{children:[c.jsx(Oe,Y({},He,{slots:H,slotProps:$})),c.jsx(H_,{reduceAnimations:y,className:pt.viewTransitionContainer,transKey:re,ownerState:xt,children:c.jsxs("div",{children:[re==="year"&&c.jsx(p_,Y({},ae,ye,{value:K,onChange:Ne,shouldDisableYear:C,hasFocus:Ce,onFocusedViewChange:We=>Z("year",We),yearsOrder:F,yearsPerRow:fe,referenceDate:be})),re==="month"&&c.jsx(t_,Y({},ae,ye,{hasFocus:Ce,className:_,value:K,onChange:je,shouldDisableMonth:T,onFocusedViewChange:We=>Z("month",We),monthsPerRow:J,referenceDate:be})),re==="day"&&c.jsx(zF,Y({},ie,ae,ye,{onMonthSwitchingAnimationEnd:At,onFocusedDayChange:Ae,reduceAnimations:y,selectedDays:Fe,onSelectedDaysChange:ot,shouldDisableDate:x,shouldDisableMonth:T,shouldDisableYear:C,hasFocus:Ce,onFocusedViewChange:We=>Z("day",We),showDaysOutsideCurrentMonth:A,fixedWeekNumber:M,dayOfWeekFormatter:W,displayWeekNumber:Q,loading:D,renderLoading:V}))]})})]}))}),Yo=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:a,defaultValue:i,referenceDate:s,onChange:l,className:u,classes:d,disableFuture:f,disablePast:h,minDate:p,maxDate:m,shouldDisableDate:b,shouldDisableMonth:y,shouldDisableYear:x,reduceAnimations:T,onMonthChange:C,monthsPerRow:k,onYearChange:S,yearsOrder:v,yearsPerRow:_,slots:O,slotProps:B,loading:R,renderLoading:L,disableHighlightToday:E,readOnly:N,disabled:w,showDaysOutsideCurrentMonth:A,dayOfWeekFormatter:M,sx:W,autoFocus:H,fixedWeekNumber:$,displayWeekNumber:D,timezone:V})=>c.jsx(U_,{view:e,onViewChange:t,views:n.filter(Zh),focusedView:r&&Zh(r)?r:null,onFocusedViewChange:o,value:a,defaultValue:i,referenceDate:s,onChange:l,className:u,classes:d,disableFuture:f,disablePast:h,minDate:p,maxDate:m,shouldDisableDate:b,shouldDisableMonth:y,shouldDisableYear:x,reduceAnimations:T,onMonthChange:C,monthsPerRow:k,onYearChange:S,yearsOrder:v,yearsPerRow:_,slots:O,slotProps:B,loading:R,renderLoading:L,disableHighlightToday:E,readOnly:N,disabled:w,showDaysOutsideCurrentMonth:A,dayOfWeekFormatter:M,sx:W,autoFocus:H,fixedWeekNumber:$,displayWeekNumber:D,timezone:V}),Ob=I.forwardRef(function(t,n){const r=Rr(),o=wt(),a=lb(t,"MuiDesktopDatePicker"),i=Y({day:Yo,month:Yo,year:Yo},a.viewRenderers),s=Y({},a,{viewRenderers:i,format:Md(o,a,!1),yearsPerRow:a.yearsPerRow??4,slots:Y({openPickerIcon:nL,field:wb},a.slots),slotProps:Y({},a.slotProps,{field:u=>Y({},xl(a.slotProps?.field,u),cb(a),{ref:n}),toolbar:Y({hidden:!0},a.slotProps?.toolbar)})}),{renderPicker:l}=ZN({props:s,valueManager:ur,valueType:"date",getOpenDialogAriaText:ib({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:Fi});return l()});Ob.propTypes={autoFocus:ue.bool,className:ue.string,closeOnSelect:ue.bool,dayOfWeekFormatter:ue.func,defaultValue:ue.object,disabled:ue.bool,disableFuture:ue.bool,disableHighlightToday:ue.bool,disableOpenPicker:ue.bool,disablePast:ue.bool,displayWeekNumber:ue.bool,enableAccessibleFieldDOMStructure:ue.any,fixedWeekNumber:ue.number,format:ue.string,formatDensity:ue.oneOf(["dense","spacious"]),inputRef:y1,label:ue.node,loading:ue.bool,localeText:ue.object,maxDate:ue.object,minDate:ue.object,monthsPerRow:ue.oneOf([3,4]),name:ue.string,onAccept:ue.func,onChange:ue.func,onClose:ue.func,onError:ue.func,onMonthChange:ue.func,onOpen:ue.func,onSelectedSectionsChange:ue.func,onViewChange:ue.func,onYearChange:ue.func,open:ue.bool,openTo:ue.oneOf(["day","month","year"]),orientation:ue.oneOf(["landscape","portrait"]),readOnly:ue.bool,reduceAnimations:ue.bool,referenceDate:ue.object,renderLoading:ue.func,selectedSections:ue.oneOfType([ue.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),ue.number]),shouldDisableDate:ue.func,shouldDisableMonth:ue.func,shouldDisableYear:ue.func,showDaysOutsideCurrentMonth:ue.bool,slotProps:ue.object,slots:ue.object,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),timezone:ue.string,value:ue.object,view:ue.oneOf(["day","month","year"]),viewRenderers:ue.shape({day:ue.func,month:ue.func,year:ue.func}),views:ue.arrayOf(ue.oneOf(["day","month","year"]).isRequired),yearsOrder:ue.oneOf(["asc","desc"]),yearsPerRow:ue.oneOf([3,4])};const z_=se(Ar)({[`& .${ni.container}`]:{outline:0},[`& .${ni.paper}`]:{outline:0,minWidth:Il}}),V_=se(Ir)({"&:first-of-type":{padding:0}});function W_(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:a}=e,i=o?.dialog??z_,s=o?.mobileTransition??mo;return c.jsx(i,Y({open:r,onClose:n},a?.dialog,{TransitionComponent:s,TransitionProps:a?.mobileTransition,PaperComponent:o?.mobilePaper,PaperProps:a?.mobilePaper,children:c.jsx(V_,{children:t})}))}const q_=["props","getOpenDialogAriaText"],Y_=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=Ue(e,q_);const{slots:o,slotProps:a,className:i,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:f,onSelectedSectionsChange:h,timezone:p,name:m,label:b,inputRef:y,readOnly:x,disabled:T,localeText:C}=t,k=I.useRef(null),S=Kn(),v=a?.toolbar?.hidden??!1,{open:_,actions:O,layoutProps:B,renderCurrentView:R,fieldProps:L,contextValue:E}=mb(Y({},r,{props:t,fieldRef:k,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),N=o.field,w=ut({elementType:N,externalSlotProps:a?.field,additionalProps:Y({},L,v&&{id:S},!(T||x)&&{onClick:O.onOpen,onKeyDown:oN(O.onOpen)},{readOnly:x??!0,disabled:T,className:i,sx:s,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:d,selectedSections:f,onSelectedSectionsChange:h,timezone:p,label:b,name:m},y?{inputRef:y}:{}),ownerState:t});w.inputProps=Y({},w.inputProps,{"aria-label":n(L.value)});const A=Y({textField:o.textField},w.slots),M=o.layout??yb;let W=S;v&&(b?W=`${S}-label`:W=void 0);const H=Y({},a,{toolbar:Y({},a?.toolbar,{titleId:S}),mobilePaper:Y({"aria-labelledby":W},a?.mobilePaper)}),$=lt(k,w.unstableFieldRef);return{renderPicker:()=>c.jsxs(xb,{contextValue:E,localeText:C,children:[c.jsx(N,Y({},w,{slots:A,slotProps:H,unstableFieldRef:$})),c.jsx(W_,Y({},O,{open:_,slots:o,slotProps:H,children:c.jsx(M,Y({},B,H?.layout,{slots:o,slotProps:H,children:R()}))}))]})}},Nb=I.forwardRef(function(t,n){const r=Rr(),o=wt(),a=lb(t,"MuiMobileDatePicker"),i=Y({day:Yo,month:Yo,year:Yo},a.viewRenderers),s=Y({},a,{viewRenderers:i,format:Md(o,a,!1),slots:Y({field:wb},a.slots),slotProps:Y({},a.slotProps,{field:u=>Y({},xl(a.slotProps?.field,u),cb(a),{ref:n}),toolbar:Y({hidden:!1},a.slotProps?.toolbar)})}),{renderPicker:l}=Y_({props:s,valueManager:ur,valueType:"date",getOpenDialogAriaText:ib({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:s.localeText?.openDatePickerDialogue}),validator:Fi});return l()});Nb.propTypes={autoFocus:ue.bool,className:ue.string,closeOnSelect:ue.bool,dayOfWeekFormatter:ue.func,defaultValue:ue.object,disabled:ue.bool,disableFuture:ue.bool,disableHighlightToday:ue.bool,disableOpenPicker:ue.bool,disablePast:ue.bool,displayWeekNumber:ue.bool,enableAccessibleFieldDOMStructure:ue.any,fixedWeekNumber:ue.number,format:ue.string,formatDensity:ue.oneOf(["dense","spacious"]),inputRef:y1,label:ue.node,loading:ue.bool,localeText:ue.object,maxDate:ue.object,minDate:ue.object,monthsPerRow:ue.oneOf([3,4]),name:ue.string,onAccept:ue.func,onChange:ue.func,onClose:ue.func,onError:ue.func,onMonthChange:ue.func,onOpen:ue.func,onSelectedSectionsChange:ue.func,onViewChange:ue.func,onYearChange:ue.func,open:ue.bool,openTo:ue.oneOf(["day","month","year"]),orientation:ue.oneOf(["landscape","portrait"]),readOnly:ue.bool,reduceAnimations:ue.bool,referenceDate:ue.object,renderLoading:ue.func,selectedSections:ue.oneOfType([ue.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),ue.number]),shouldDisableDate:ue.func,shouldDisableMonth:ue.func,shouldDisableYear:ue.func,showDaysOutsideCurrentMonth:ue.bool,slotProps:ue.object,slots:ue.object,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),timezone:ue.string,value:ue.object,view:ue.oneOf(["day","month","year"]),viewRenderers:ue.shape({day:ue.func,month:ue.func,year:ue.func}),views:ue.arrayOf(ue.oneOf(["day","month","year"]).isRequired),yearsOrder:ue.oneOf(["asc","desc"]),yearsPerRow:ue.oneOf([3,4])};const K_=["desktopModeMediaQuery"],ku=I.forwardRef(function(t,n){const r=Dt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=aN}=r,a=Ue(r,K_);return J1(o,{defaultMatches:!0})?c.jsx(Ob,Y({ref:n},a)):c.jsx(Nb,Y({ref:n},a))});var xs={exports:{}},G_=xs.exports,pm;function Q_(){return pm||(pm=1,(function(e,t){(function(n,r){e.exports=r()})(G_,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(a,i,s){var l=i.prototype;s.utc=function(b){var y={date:b,utc:!0,args:arguments};return new i(y)},l.utc=function(b){var y=s(this.toDate(),{locale:this.$L,utc:!0});return b?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(b){b.utc&&(this.$u=!0),this.$utils().u(b.$offset)||(this.$offset=b.$offset),u.call(this,b)};var d=l.init;l.init=function(){if(this.$u){var b=this.$d;this.$y=b.getUTCFullYear(),this.$M=b.getUTCMonth(),this.$D=b.getUTCDate(),this.$W=b.getUTCDay(),this.$H=b.getUTCHours(),this.$m=b.getUTCMinutes(),this.$s=b.getUTCSeconds(),this.$ms=b.getUTCMilliseconds()}else d.call(this)};var f=l.utcOffset;l.utcOffset=function(b,y){var x=this.$utils().u;if(x(b))return this.$u?0:x(this.$offset)?f.call(this):this.$offset;if(typeof b=="string"&&(b=(function(S){S===void 0&&(S="");var v=S.match(r);if(!v)return null;var _=(""+v[0]).match(o)||["-",0,0],O=_[0],B=60*+_[1]+ +_[2];return B===0?0:O==="+"?B:-B})(b),b===null))return this;var T=Math.abs(b)<=16?60*b:b;if(T===0)return this.utc(y);var C=this.clone();if(y)return C.$offset=T,C.$u=!1,C;var k=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(C=this.local().add(T+k,n)).$offset=T,C.$x.$localOffset=k,C};var h=l.format;l.format=function(b){var y=b||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,y)},l.valueOf=function(){var b=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*b},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var p=l.toDate;l.toDate=function(b){return b==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=l.diff;l.diff=function(b,y,x){if(b&&this.$u===b.$u)return m.call(this,b,y,x);var T=this.local(),C=s(b).local();return m.call(T,C,y,x)}}}))})(xs)),xs.exports}var X_=Q_();const Z_=qn(X_);bt.extend(Z_);function Du(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 J_(e){return e==="DateMinMax"}function wu(e){return e==="Between"}function Lb({spec:e,values:t,selection:n,onChange:r,retrievalFn:o}){const a=()=>n?.matchType?n.matchType:e.defaultMatchType?e.defaultMatchType:e.filterType==="DateMinMax"?"Between":Du(e.filterType)[0]||"Equals",[i,s]=z.useState(a()),[l,u]=z.useState(n?.value??""),[d,f]=z.useState(n?.value2??""),[h,p]=z.useState([]),[m,b]=z.useState(!1),[y,x]=z.useState(""),[T,C]=z.useState(!1),[k,S]=z.useState(!1),v=z.useRef(null),_=z.useRef(0),[O,B]=z.useState(!1);z.useEffect(()=>{if(e.filterType!=="Retrieval"||!o)return;const D=y.trim();if(D.length<=2){p([]),C(!1);return}return v.current&&clearTimeout(v.current),v.current=setTimeout(async()=>{_.current+=1;const V=_.current;b(!0);try{const Q=await o(D,e);V===_.current&&p(Q)}catch(Q){V===_.current&&(console.error("Retrieval failed",Q),p([]))}finally{V===_.current&&(b(!1),C(!0))}},500),()=>{v.current&&clearTimeout(v.current)}},[y,e,o]),z.useEffect(()=>{n===null?(u(""),f(""),s(e.defaultMatchType??(e.filterType==="DateMinMax"?"Between":Du(e.filterType)[0]||"Equals"))):n&&(s(n.matchType),u(n.value??""),f(n.value2??""))},[n,e.filterType,e.defaultMatchType]);const R=Du(e.filterType),L=J_(e.filterType),E=wu(i),N=L&&t.length>=2&&t[0].value instanceof Date?bt.utc(t[0].value):void 0,w=L&&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 W=D=>{const V=D.target.value;s(V),wu(V)||f(""),l&&r({dimensionName:e.dimensionName,source:e.source,filterName:e.filterName,matchType:V,value:l,...wu(V)&&d&&{value2:d}})},H=(D,V)=>{u(D??""),V!==void 0&&f(V??"");const Q=Array.isArray(D)&&D.length===0;r(!Q&&D!==""&&D!==null&&D!==void 0?{dimensionName:e.dimensionName,source:e.source,filterName:e.filterName,matchType:i,value:D,...E&&V&&{value2:V}}:null)},$=()=>{u(""),f(""),r(null)};return c.jsxs(St,{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:[c.jsxs(St,{sx:{fontWeight:600,color:e.required&&!n?"error.main":"text.primary"},children:[e.label??e.dimensionName,e.required&&c.jsx(St,{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&&c.jsxs(zs,{size:"small",fullWidth:!0,children:[c.jsx(Us,{children:"Match Type"}),c.jsx(Vs,{value:i,label:"Match Type",onChange:W,MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:R.map(D=>c.jsx(Jt,{value:D,children:D},D))})]}),e.filterType==="Star"&&i==="Equals"&&c.jsx(yc,{multiple:!0,size:"small",options:t,getOptionLabel:D=>typeof D=="string"?D:typeof D=="object"&&D!==null&&"value"in D?String(D.value):String(D),value:Array.isArray(l)?l.map(D=>t.find(V=>V.value===D)||D):l?[t.find(D=>D.value===l)||l]:[],onChange:(D,V)=>{const Q=V.map(F=>typeof F=="string"?F:F&&typeof F=="object"&&"value"in F?F.value:F);H(Q)},noOptionsText:"No matches found",renderInput:D=>c.jsx(Je,{...D,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"&&i==="Contains"&&c.jsx(Je,{size:"small",label:"Search Text",value:l,onChange:D=>u(D.target.value),onBlur:()=>H(l),onKeyDown:D=>{D.key==="Enter"&&H(l)},placeholder:"Enter text to search...",fullWidth:!0}),e.filterType==="Boolean"&&c.jsxs(zs,{size:"small",fullWidth:!0,children:[c.jsx(Us,{children:"Value"}),c.jsxs(Vs,{value:l===!0?"true":l===!1?"false":"",label:"Value",onChange:D=>{const V=D.target.value;V==="true"?H(!0):V==="false"?H(!1):$()},MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:[c.jsx(Jt,{value:"",children:c.jsx("em",{children:"Blank"})}),c.jsx(Jt,{value:"true",children:"True"}),c.jsx(Jt,{value:"false",children:"False"})]})]}),e.filterType==="Retrieval"&&i==="Semantic Search"&&c.jsx(yc,{multiple:!0,size:"small",options:h,loading:m,getOptionLabel:D=>typeof D=="string"?D:typeof D=="object"&&D!==null&&"value"in D?String(D.value):String(D),value:Array.isArray(l)?l.map(D=>h.find(Q=>Q.value===D)||{value:D}):l?[{value:l}]:[],onInputChange:(D,V)=>{x(V)},onChange:(D,V)=>{const Q=V.map(F=>typeof F=="string"?F:F&&typeof F=="object"&&"value"in F?F.value:F);H(Q)},noOptionsText:y.trim().length<=2?"Type at least 3 characters to search":"No matches found",renderInput:D=>c.jsx(Je,{...D,size:"small",label:"Search Values",placeholder:"Type to search...",onFocus:()=>S(!0),onBlur:()=>S(!1),helperText:k&&!m&&T&&h.length===0?"No matches found":void 0,InputProps:{...D.InputProps,endAdornment:c.jsxs(c.Fragment,{children:[m?c.jsx(gd,{color:"inherit",size:20}):null,D.InputProps.endAdornment]})}}),freeSolo:!0,filterOptions:D=>D,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="MinMax"&&!E&&c.jsx(Je,{size:"small",type:"number",label:"Value",value:l,onChange:D=>H(parseFloat(D.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Enter number...",fullWidth:!0,inputProps:{min:A,max:M},helperText:O&&A!==void 0&&M!==void 0?`Valid range: [${A} - ${M}]`:void 0}),e.filterType==="MinMax"&&E&&c.jsxs(St,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsxs(St,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(Je,{size:"small",type:"number",label:"From",value:l,onChange:D=>H(parseFloat(D.target.value)||"",d),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Min...",fullWidth:!0,inputProps:{min:A,max:d||M}}),c.jsx(St,{children:"to"}),c.jsx(Je,{size:"small",type:"number",label:"To",value:d,onChange:D=>H(l,parseFloat(D.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Max...",fullWidth:!0,inputProps:{min:l||A,max:M}})]}),O&&A!==void 0&&M!==void 0&&c.jsxs(mt,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",A," - ",M,"]"]})]}),L&&!E&&c.jsx(Cc,{dateAdapter:Xh,children:c.jsx(ku,{label:"Date",value:l instanceof Date?bt.utc(l):null,onChange:D=>{D===null?H(null):D.isValid()&&H(D.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?void 0:N,maxDate:l instanceof Date?void 0:w,referenceDate:i==="After"&&N?N:void 0,slotProps:{textField:{size:"small",fullWidth:!0,sx:{minWidth:150},onFocus:()=>B(!0),onBlur:()=>B(!1),helperText:O&&N&&w?`Valid range: [${N.format("YYYY-MM-DD")} - ${w.format("YYYY-MM-DD")}]`:void 0},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),L&&E&&c.jsx(Cc,{dateAdapter:Xh,children:c.jsxs(St,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsxs(St,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(St,{sx:{flex:1,minWidth:0},children:c.jsx(ku,{label:"From",value:l instanceof Date?bt.utc(l):null,onChange:D=>{D===null?H(null,d):D.isValid()&&H(D.utc().toDate(),d)},timezone:"UTC",minDate:l instanceof Date?void 0:N,maxDate:d instanceof Date?bt.utc(d):l instanceof Date?void 0:w,referenceDate:N,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),c.jsx(St,{children:"to"}),c.jsx(St,{sx:{flex:1,minWidth:0},children:c.jsx(ku,{label:"To",value:d instanceof Date?bt.utc(d):null,onChange:D=>{D===null?H(l,null):D.isValid()&&H(l,D.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?bt.utc(l):d instanceof Date?void 0:N,maxDate:d instanceof Date?void 0:w,referenceDate:l instanceof Date?bt.utc(l):N,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})})]}),O&&N&&w&&c.jsxs(mt,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",N.format("YYYY-MM-DD")," -"," ",w.format("YYYY-MM-DD"),"]"]})]})})]})}function e7(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 Fb(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 a of r)if(typeof a=="string"){const i=a.indexOf(".");i>0&&i<a.length-1&&o.push({source:a.substring(0,i),dimension:a.substring(i+1)})}if(o.length>0)return{filters:o}}}catch(r){console.error(`Failed to parse "${t}" annotation:`,r)}}return null}function _b(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 t7(e){const t=e.match(/^#\s*label\s*=\s*"([^"]+)"/);return t?t[1]:null}function Bb(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 a=JSON.parse(o);a.name&&t.set(a.name,a)}catch(a){console.error("Failed to parse SourceInfo:",a)}}return{sourceInfoMap:t,modelPath:n}}function jb(e,t,n){const r=[];for(const{source:o,dimension:a}of t){const i=e.get(o);if(!i){console.warn(`Source "${o}" not found in notebook sources`),r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}const s=i.schema?.fields;if(!s){r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}const l=s.find(f=>f.name===a);if(!l){console.warn(`Dimension "${a}" not found in source "${o}"`),r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}let u="Star",d;if("annotations"in l&&l.annotations){for(const f of l.annotations)if(f.value){const h=_b(f.value);h&&(u=h.type);const p=t7(f.value);p&&(d=p)}}r.push({source:o,model:n,dimensionName:a,filterType:u,label:d})}return r}function n7(e,t,n){return e.length===0?"":e.map(o=>{const{dimensionName:a,source:i,matchType:s,value:l,value2:u}=o,f=i&&i!==n?`\`${i}\`.\`${a}\``:`\`${a}\``,h=l instanceof Date,p=(m,b=!1)=>m==null?"null":b&&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(b=>`${f} = ${p(b,h)}`).join(" or ")})`:`${f} = ${p(l,h)}`;case"Contains":return typeof l=="string"?`${f} ~ f'%${l.replace(/'/g,"\\'")}%'`:`${f} = ${p(l)}`;case"After":case"Greater Than":return`${f} > ${p(l,h)}`;case"Before":case"Less Than":return`${f} < ${p(l,h)}`;case"Between":return u!==void 0?`${f} >= ${p(l,h)} and ${f} <= ${p(u,h)}`:`${f} >= ${p(l,h)}`;default:return""}}).filter(o=>o.length>0).join(" and ")}function r7(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 o7(e,t){return`${e.trimEnd()} + {where: ${t}}`}const a7=kt(c.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"})),$b=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(" ")+"..."},Hb=(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 i7(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:a}=e,i=md();I.useEffect(()=>{if(!o)return;function x(T){T.defaultPrevented||T.key==="Escape"&&r?.(T,"escapeKeyDown")}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[o,r]);const s=Pe((x,T)=>{r?.(x,T)}),l=Pe(x=>{!r||x==null||i.start(x,()=>{s(null,"timeout")})});I.useEffect(()=>(o&&l(t),i.clear),[o,t,l,i]);const u=x=>{r?.(x,"clickaway")},d=i.clear,f=I.useCallback(()=>{t!=null&&l(a??t*.5)},[t,a,l]),h=x=>T=>{const C=x.onBlur;C?.(T),f()},p=x=>T=>{const C=x.onFocus;C?.(T),d()},m=x=>T=>{const C=x.onMouseEnter;C?.(T),d()},b=x=>T=>{const C=x.onMouseLeave;C?.(T),f()};return I.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",f),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",d)}},[n,o,f,d]),{getRootProps:(x={})=>{const T={...js(e),...js(x)};return{role:"presentation",...x,...T,onBlur:h(T),onFocus:p(T),onMouseEnter:m(T),onMouseLeave:b(T)}},onClickAway:u}}function hm(e){return e.substring(2).toLowerCase()}function s7(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function l7(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:a="onTouchEnd"}=e,i=I.useRef(!1),s=I.useRef(null),l=I.useRef(!1),u=I.useRef(!1);I.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const d=lt(ma(t),s),f=Pe(m=>{const b=u.current;u.current=!1;const y=Vt(s.current);if(!l.current||!s.current||"clientX"in m&&s7(m,y))return;if(i.current){i.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||!b)&&o(m)}),h=m=>b=>{u.current=!0;const y=t.props[m];y&&y(b)},p={ref:d};return a!==!1&&(p[a]=h(a)),I.useEffect(()=>{if(a!==!1){const m=hm(a),b=Vt(s.current),y=()=>{i.current=!0};return b.addEventListener(m,f),b.addEventListener("touchmove",y),()=>{b.removeEventListener(m,f),b.removeEventListener("touchmove",y)}}},[f,a]),r!==!1&&(p[r]=h(r)),I.useEffect(()=>{if(r!==!1){const m=hm(r),b=Vt(s.current);return b.addEventListener(m,f),()=>{b.removeEventListener(m,f)}}},[f,r]),I.cloneElement(t,p)}function u7(e){return Be("MuiSnackbarContent",e)}Le("MuiSnackbarContent",["root","message","action"]);const c7=e=>{const{classes:t}=e;return _e({root:["root"],action:["action"],message:["message"]},u7,t)},d7=se(To,{name:"MuiSnackbarContent",slot:"Root"})(nt(({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(Ou(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:Ou(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),f7=se("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),p7=se("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),h7=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiSnackbarContent"}),{action:o,className:a,message:i,role:s="alert",...l}=r,u=r,d=c7(u);return c.jsxs(d7,{role:s,elevation:6,className:Ie(d.root,a),ownerState:u,ref:n,...l,children:[c.jsx(f7,{className:d.message,ownerState:u,children:i}),o?c.jsx(p7,{className:d.action,ownerState:u,children:o}):null]})});function m7(e){return Be("MuiSnackbar",e)}Le("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const g7=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${De(n.vertical)}${De(n.horizontal)}`]};return _e(r,m7,t)},b7=se("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${De(n.anchorOrigin.vertical)}${De(n.anchorOrigin.horizontal)}`]]}})(nt(({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%)"}}}]}))),y7=I.forwardRef(function(t,n){const r=Xe({props:t,name:"MuiSnackbar"}),o=yo(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:i,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:d,className:f,ClickAwayListenerProps:h,ContentProps:p,disableWindowBlurListener:m=!1,message:b,onBlur:y,onClose:x,onFocus:T,onMouseEnter:C,onMouseLeave:k,open:S,resumeHideDuration:v,slots:_={},slotProps:O={},TransitionComponent:B,transitionDuration:R=a,TransitionProps:{onEnter:L,onExited:E,...N}={},...w}=r,A={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:u,disableWindowBlurListener:m,TransitionComponent:B,transitionDuration:R},M=g7(A),{getRootProps:W,onClickAway:H}=i7({...A}),[$,D]=I.useState(!0),V=G=>{D(!0),E&&E(G)},Q=(G,Z)=>{D(!1),L&&L(G,Z)},F={slots:{transition:B,..._},slotProps:{content:p,clickAwayListener:h,transition:N,...O}},[fe,J]=ct("root",{ref:n,className:[M.root,f],elementType:b7,getSlotProps:W,externalForwardedProps:{...F,...w},ownerState:A}),[X,{ownerState:ee,...K}]=ct("clickAwayListener",{elementType:l7,externalForwardedProps:F,getSlotProps:G=>({onClickAway:(...Z)=>{const xe=Z[0];G.onClickAway?.(...Z),!xe?.defaultMuiPrevented&&H(...Z)}}),ownerState:A}),[te,oe]=ct("content",{elementType:h7,shouldForwardComponentProp:!0,externalForwardedProps:F,additionalProps:{message:b,action:i},ownerState:A}),[re,pe]=ct("transition",{elementType:pi,externalForwardedProps:F,getSlotProps:G=>({onEnter:(...Z)=>{G.onEnter?.(...Z),Q(...Z)},onExited:(...Z)=>{G.onExited?.(...Z),V(...Z)}}),additionalProps:{appear:!0,in:S,timeout:R,direction:s==="top"?"down":"up"},ownerState:A});return!S&&$?null:c.jsx(X,{...K,..._.clickAwayListener&&{ownerState:ee},children:c.jsx(fe,{...J,children:c.jsx(re,{...pe,children:d||c.jsx(te,{...oe})})})})});function mm(){const[e,t]=z.useState(!1),{apiClients:n}=it.useServer(),[r,o]=z.useState(""),a=()=>{t(!0)},i=()=>{t(!1)},s=Dr.useQueryClient(),l=ir({async mutationFn(d){return n.environments.createEnvironment({name:d.name,readme:Hb({name:d.name,readme:""},d.description)})},onSuccess(){i(),s.invalidateQueries({queryKey:["environments"]}),o("Environment created successfully")},onError(d){o(d instanceof Error?d.message:"An unknown error occurred")}}),u=async d=>{d.preventDefault();const f=new FormData(d.currentTarget),h=f.get("name")?.toString(),p=f.get("description")?.toString();if(!h)throw new Error("Name is required");l.mutate({name:h,description:p})};return c.jsxs(z.Fragment,{children:[c.jsx(Ot,{variant:"contained",onClick:a,startIcon:c.jsx(vn.AddCircleRounded,{}),sx:{mt:2,color:"white"},children:"Create New Environment"}),c.jsxs(Ar,{open:e,onClose:i,children:[c.jsx(Wr,{children:"Create New Environment"}),c.jsxs(Ir,{children:[c.jsx(Mi,{children:"Add a new environment to start exploring semantic models and analyzing data."}),c.jsxs("form",{onSubmit:u,id:"environment-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Environment Name",type:"text",fullWidth:!0,variant:"standard"}),c.jsx(Je,{margin:"dense",id:"description",name:"description",label:"Environment Description",placeholder:"Explore semantic models, run queries, and build dashboards",type:"text",fullWidth:!0,variant:"standard"})]})]}),c.jsxs(Pr,{children:[c.jsx(Ot,{disabled:l.isPending,onClick:i,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"environment-form",loading:l.isPending,children:"Create Environment"})]})]}),c.jsx(y7,{open:r!=="",autoHideDuration:6e3,onClose:()=>o(""),message:r})]})}function x7({environment:e,onCloseDialog:t}){const[n,r]=z.useState(!1),{apiClients:o}=it.useServer(),a=Dr.useQueryClient(),[i,s]=z.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},d=ir({mutationFn:()=>o.environments.deleteEnvironment(e.name),onSuccess(){u(),a.invalidateQueries({queryKey:["environments"]}),s("Environment deleted successfully")},onError(f){s(f instanceof Error?f.message:"An unknown error occurred")}});return c.jsxs(z.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:l,children:[c.jsx(P.ListItemIcon,{children:c.jsx(vn.Delete,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Delete"})]}),c.jsxs(Ar,{onClose:u,"aria-labelledby":"customized-dialog-title",open:n,children:[c.jsx(Wr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Environment"}),c.jsx(Sn,{"aria-label":"close",onClick:u,sx:f=>({position:"absolute",right:8,top:8,color:f.palette.grey[500]}),children:c.jsx(vr,{})}),c.jsx(Ir,{dividers:!0,children:c.jsxs(mt,{gutterBottom:!0,children:['Are you sure you want to delete "',e.name,'"? This action cannot be undone.']})}),c.jsxs(Pr,{children:[c.jsx(Ot,{variant:"outlined",onClick:u,style:{borderColor:io.teal,color:io.teal},children:"Cancel"}),c.jsx(Ot,{loading:d.isPending,variant:"contained",autoFocus:!0,onClick:()=>d.mutate(),color:"error",children:"Delete"})]}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>s(""),message:i})]})]})}function E7({environment:e,onCloseDialog:t}){const[n,r]=z.useState(!1),{apiClients:o}=it.useServer(),a=Dr.useQueryClient(),[i,s]=z.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},d=ir({async mutationFn(h){return o.environments.updateEnvironment(e.name,{name:e.name,readme:Hb({name:e.name,readme:e.readme},h.description)})},onSuccess(){u(),a.invalidateQueries({queryKey:["environments"]}),s("Environment updated successfully")},onError(h){s(h instanceof Error?h.message:"An unknown error occurred")}}),f=h=>{h.preventDefault();const m=new FormData(h.currentTarget).get("description")?.toString();d.mutate({description:m})};return c.jsxs(z.Fragment,{children:[c.jsxs(P.MenuItem,{onClick:l,children:[c.jsx(P.ListItemIcon,{children:c.jsx(vn.Edit,{fontSize:"small"})}),c.jsx(P.ListItemText,{children:"Edit"})]}),c.jsxs(Ar,{open:n,onClose:u,children:[c.jsx(Wr,{children:"Edit Environment"}),c.jsxs(Ir,{children:[c.jsx(Mi,{children:"Edit this environment's description."}),c.jsxs("form",{onSubmit:f,id:"environment-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Environment Name",disabled:!0,type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),c.jsx(Je,{margin:"dense",id:"description",name:"description",label:"Environment Description",type:"text",fullWidth:!0,variant:"standard",defaultValue:$b(e.readme)})]})]}),c.jsxs(Pr,{children:[c.jsx(Ot,{disabled:d.isPending,onClick:u,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"environment-form",loading:d.isPending,children:"Save Changes"})]})]}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>s(""),message:i})]})}const C7=[{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 T7({onClickEnvironment:e}){const{apiClients:t,mutable:n}=it.useServer(),{data:r,isSuccess:o,isError:a,error:i}=Qt({queryKey:["environments"],queryFn:()=>t.environments.listEnvironments()});if(a)return c.jsx(hn,{error:i,context:"Environments List"});if(!o)return c.jsx(pn,{text:"Loading environments..."});const s=r.data??[];return c.jsxs(P.Container,{maxWidth:"md",sx:{py:6},children:[c.jsxs(P.Box,{sx:{mb:5},children:[c.jsx(P.Typography,{variant:"h3",component:"h1",sx:{fontWeight:500,letterSpacing:"-0.025em",mb:1},children:"Publisher"}),c.jsx(P.Typography,{variant:"body1",color:"text.secondary",sx:{mb:3},children:"The open-source semantic model server for the Malloy data language."}),c.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."})]}),c.jsx(P.Grid,{container:!0,spacing:4,sx:{mb:5},children:C7.map(l=>c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsxs(P.Stack,{spacing:1,children:[c.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}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.6},children:l.body})]})},l.title))}),c.jsx(P.Divider,{sx:{my:4}}),s.length>0?c.jsxs(P.Box,{sx:{mb:4},children:[c.jsxs(P.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",sx:{mb:3},children:[c.jsxs(P.Box,{children:[c.jsx(P.Typography,{variant:"h5",sx:{fontWeight:500,letterSpacing:"-0.025em",mb:.5},children:"Environments"}),c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Published environments available on this server"})]}),n&&c.jsx(mm,{})]}),c.jsx(P.Grid,{container:!0,spacing:2,children:s.map(l=>c.jsx(P.Grid,{size:{xs:12,sm:6,md:4},children:c.jsx(v7,{environment:l,onClickEnvironment:e})},l.name))})]}):c.jsxs(P.Box,{sx:{mb:4},children:[c.jsx(P.Typography,{variant:"h5",sx:{fontWeight:500,letterSpacing:"-0.025em",mb:1},children:"Get started"}),c.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?c.jsx(mm,{}):c.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"})]}),c.jsx(P.Divider,{sx:{my:4}}),c.jsxs(P.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",c.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 v7({environment:e,onClickEnvironment:t}){const{mutable:n}=it.useServer(),[r,o]=z.useState(null),a=!!r,i=$b(e.readme),s=d=>{e.name&&t&&t(`/${e.name}/`,d)},l=d=>{d.stopPropagation(),o(d.currentTarget)},u=()=>{o(null)};return c.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:c.jsx(P.CardContent,{sx:{p:2.5,"&:last-child":{pb:2.5}},children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[c.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:c.jsx(a7,{sx:{fontSize:20}})}),c.jsxs(P.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(P.Typography,{variant:"subtitle1",component:"h6",noWrap:!0,sx:{fontWeight:600,mb:.5},children:e.name}),c.jsx(P.Tooltip,{title:i,followCursor:!0,enterDelay:1e3,children:c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.5},children:i})})]}),n&&c.jsxs(c.Fragment,{children:[c.jsx(P.IconButton,{size:"small",onClick:l,"aria-label":`Environment actions for ${e.name}`,sx:{flexShrink:0,mt:-.5,mr:-.5},children:c.jsx(vn.MoreVert,{fontSize:"small"})}),c.jsxs(P.Menu,{anchorEl:r,open:a,onClose:u,onClick:d=>d.stopPropagation(),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(E7,{environment:e,onCloseDialog:u}),c.jsx(x7,{environment:e,onCloseDialog:u})]})]})]})})})}const bi=kt(c.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"})),S7=kt(c.jsx("path",{d:"M8 5v14l11-7z"}));function Ub({open:e,onClose:t,result:n,title:r="Results"}){return c.jsxs(P.Dialog,{open:e,onClose:t,maxWidth:!1,fullWidth:!0,sx:{"& .MuiDialog-paper":{width:"95vw",height:"95vh",maxWidth:"none"}},children:[c.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[r,c.jsx(P.IconButton,{onClick:t,sx:{color:"text.secondary"},children:c.jsx(vr,{})})]}),c.jsx(P.DialogContent,{sx:{height:"calc(95vh - 120px)",overflow:"auto",padding:"0 16px"},children:c.jsx(ha,{result:n,maxHeight:800,maxResultSize:1e6})})]})}function k7({queryName:e,annotations:t,resourceUri:n,runOnDemand:r=!1,maxResultSize:o=0}){const[a,i]=z.useState(),[s,l]=z.useState(!1),[u,d]=z.useState(!1),{packageName:f,environmentName:h,versionId:p,modelPath:m}=Nt(n),{apiClients:b}=it.useServer(),{data:y,isSuccess:x,isLoading:T}=Qt({queryKey:["namedQueryResult",n,e],queryFn:()=>b.models.executeQueryModel(h,f,m,{query:void 0,sourceName:void 0,queryName:e,versionId:p}),enabled:r?u:!0});return z.useEffect(()=>{if(t&&t.length>0){const C=t.map(k=>`// ${k}`).join(`
205
+ `);Fs(C,"typescript").then(k=>{i(k)})}},[t]),c.jsxs(Bu,{children:[a&&c.jsx(P.Box,{sx:{marginBottom:"16px"},children:c.jsx(P.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:c.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:a}})})}),c.jsxs(P.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[c.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}),c.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:c.jsx(bi,{sx:{fontSize:"18px",color:"text.secondary"}})})]}),c.jsxs(rs,{sx:{position:"relative"},children:[r&&!u&&c.jsxs(P.Box,{sx:{padding:"40px 20px",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:"Click Run to execute the query"}),c.jsx(P.Button,{variant:"contained",startIcon:c.jsx(S7,{}),onClick:()=>d(!0),sx:{backgroundColor:"#1976d2","&:hover":{backgroundColor:"#1565c0"},textTransform:"none",fontSize:"14px",fontWeight:600,padding:"8px 24px"},children:"Run Query"})]}),(!r||u)&&T&&c.jsx(P.Box,{sx:{padding:"20px",textAlign:"center"},children:c.jsx(P.Typography,{children:"Loading results..."})}),(!r||u)&&x&&y?.data?.result&&c.jsx(ha,{result:y.data.result,maxHeight:600,maxResultSize:o})]}),c.jsx(Ub,{open:s,onClose:()=>l(!1),result:y?.data?.result||"",title:`Query: ${e}`})]})}function $d(e,t=!0){const{modelPath:n,environmentName:r,packageName:o,versionId:a}=Nt(e),{apiClients:i}=it.useServer();return Qt({queryKey:["package",r,o,n,a],queryFn:async()=>(await i.models.getModel(r,o,n,a)).data,enabled:t})}function Hd({data:e,onChange:t,existingQuery:n,initialSelectedSourceIndex:r=0,onSourceChange:o,resourceUri:a}){const[i,s]=z.useState(r);z.useEffect(()=>{s(r)},[r]);const{data:l,isError:u,isLoading:d,error:f}=$d(a,!e),{modelPath:h}=Nt(a),p=e||l;if(d&&!e)return c.jsx(pn,{text:"Fetching Model..."});if(u&&!e)return console.log("error",f),c.jsx(hn,{error:f,context:`ModelExplorer > ${h}`});if(!p)return c.jsx(pn,{text:"Loading..."});const m=(p?.sourceInfos||[]).map((y,x)=>{try{return JSON.parse(y)?.name||`Source ${x+1}`}catch{return`Source ${x+1}`}}),b=m[i]||"";return c.jsxs(Ds,{variant:"outlined",children:[c.jsx(jm,{children:c.jsx(P.Stack,{sx:{flexDirection:"row"},children:c.jsx(yc,{size:"small",id:"size-small-standard",disablePortal:!0,options:m,value:b,onChange:(y,x)=>{if(!x)return;const T=m.indexOf(x);T>=0&&(s(T),o?.(T))},renderInput:y=>c.jsx(Je,{...y}),style:{width:350,marginTop:"3px",marginLeft:"6px",marginBottom:"8px"}})})}),c.jsx(Rc,{children:c.jsxs(P.Stack,{spacing:2,component:"section",children:[Array.isArray(p.sourceInfos)&&p.sourceInfos.length>0&&c.jsx(ud,{sourceAndPaths:p.sourceInfos.map(y=>({sourceInfo:JSON.parse(y),modelPath:h})),selectedSourceIndex:i,existingQuery:n,onQueryChange:t,resourceUri:a}),c.jsx(P.Box,{height:"5px"})]})})]})}function Ud({open:e,onClose:t,resourceUri:n,data:r,title:o="Data Sources",hasValidImport:a=!0,existingQuery:i,initialSelectedSourceIndex:s,onChange:l,onSourceChange:u}){return c.jsxs(P.Dialog,{open:e,onClose:t,fullScreen:!0,children:[c.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o,c.jsx(P.IconButton,{onClick:t,sx:{color:"text.secondary"},children:c.jsx(vr,{})})]}),c.jsx(P.DialogContent,{children:a?c.jsx(Hd,{resourceUri:n,data:r,existingQuery:i,initialSelectedSourceIndex:s,onChange:l,onSourceChange:u}):c.jsx("div",{children:"No valid import statement found in cell"})})]})}function D7({onChange:e,resourceUri:t,runOnDemand:n=!1,maxResultSize:r=0}){const{modelPath:o}=Nt(t),{data:a,isError:i,isLoading:s,error:l}=$d(t),[u,d]=z.useState(!1),[f,h]=z.useState(),[p,m]=z.useState(0),[b,y]=z.useState("");if(s)return c.jsx(pn,{text:"Fetching Model..."});if(i)return console.log("error",l),c.jsx(hn,{error:l,context:`Model > ${o}`});const x=k=>{h(k),e&&e(k)},T=k=>{m(k)},C=()=>{const k=window.location.href;navigator.clipboard.writeText(k).then(()=>y("URL copied to clipboard!")).catch(()=>y("Failed to copy URL"))};return c.jsxs(c.Fragment,{children:[c.jsxs(P.Box,{sx:{position:"relative",maxWidth:"1200px",margin:"0 auto",paddingTop:"24px"},children:[Array.isArray(a?.sourceInfos)&&a.sourceInfos.length>0&&c.jsxs(P.Stack,{spacing:2,component:"section",children:[c.jsxs(P.Box,{sx:{padding:"0 0 16px 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c.jsx(P.Typography,{variant:"h1",sx:{fontSize:"28px",fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"0",paddingLeft:"0"},children:"Sources"}),c.jsx(P.Tooltip,{title:"Click to copy link",children:c.jsx(Mc,{sx:{fontSize:"24px",color:"text.secondary",cursor:"pointer"},onClick:C})})]}),c.jsx(Hd,{data:a,onChange:x,onSourceChange:T,existingQuery:f,initialSelectedSourceIndex:p,resourceUri:t}),c.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:()=>d(!0),children:c.jsx(bi,{sx:{fontSize:"18px",color:"text.secondary",marginBottom:"5px"}})})]}),a?.queries?.length>0&&c.jsxs(P.Stack,{spacing:2,component:"section",sx:{marginTop:"24px"},children:[c.jsx(P.Box,{sx:{padding:"0 0 16px 0"},children:c.jsx(P.Typography,{variant:"h2",sx:{fontSize:"24px",fontWeight:"600",color:"#1a1a1a",marginBottom:"0",marginTop:"8px",paddingLeft:"0"},children:"Named Queries"})}),a.queries.map(k=>c.jsx(k7,{queryName:k.name,annotations:k.annotations,resourceUri:t,runOnDemand:n,maxResultSize:r},k.name))]}),c.jsx(Ud,{open:u,onClose:()=>d(!1),resourceUri:t,data:a,title:`Model: ${o.split("/").pop()}`,existingQuery:f,initialSelectedSourceIndex:p,onChange:x,onSourceChange:T})]}),c.jsx(P.Snackbar,{open:b!=="",autoHideDuration:6e3,onClose:()=>y(""),message:b})]})}function zb(e,t){return`${e}:${t}`}function kr(e){return zb(e.source,e.filterName??e.dimensionName)}function Vb(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function Jn(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"?`'${Vb(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function w7(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,a=`\`${t}\``,i=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${a} = ${Jn(l,i)}`).join(" or ")})`:Array.isArray(r)?"":`${a} = ${Jn(r,i)}`;case"Contains":return typeof r=="string"?`${a} ~ f'%${Vb(r)}%'`:Array.isArray(r)?"":`${a} = ${Jn(r)}`;case"After":return Array.isArray(r)?"":`${a} > ${Jn(r,i)}`;case"Before":return Array.isArray(r)?"":`${a} < ${Jn(r,i)}`;case"Greater Than":return Array.isArray(r)?"":`${a} > ${Jn(r)}`;case"Less Than":return Array.isArray(r)?"":`${a} < ${Jn(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${a} >= ${Jn(r,i)} and ${a} <= ${Jn(o,i)}`:`${a} >= ${Jn(r,i)}`;default:return""}}function A7(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 I7(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 i=[...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=>w7(u)).filter(u=>u.length>0).join(" and "):"";return`
206
+ run: ${e} -> {
207
+ ${l?`where: ${l}`:""}
208
+ index: ${i}
209
+ } -> {
210
+ select: *
211
+ order_by: weight desc
212
+
213
+ limit: ${n}
214
+ }
215
+ `}function P7(e,t){const n=new Map;for(const d of t){const f=kr(d);n.set(f,[])}const r=JSON.parse(e),o=r.schema.fields,a=new Map;o.forEach((d,f)=>{a.set(d.name,f)});const i=d=>{if(!d)return null;switch(d.kind){case"string_cell":return d.string_value??null;case"number_cell":return d.number_value??null;case"boolean_cell":return d.boolean_value??null;case"null_cell":return null;default:return console.log("Unknown cell kind: "+d.kind),null}},l=(r.data?.array_value||[]).map(d=>{const f={};return d.kind==="record_cell"&&d.record_value&&d.record_value.forEach((h,p)=>{const m=o[p]?.name;if(m){const b=i(h);m==="fieldName"&&typeof b=="string"?f.fieldName=b:m==="fieldPath"&&typeof b=="string"?f.fieldPath=b:m==="fieldType"&&typeof b=="string"?f.fieldType=b:m==="fieldValue"&&typeof b=="string"?f.fieldValue=b:m==="weight"&&typeof b=="number"&&(f.weight=b)}}),f}),u=l.length===0||l.every(d=>!d.fieldName);for(const d of t){if(d.filterType==="NONE"||d.filterType==="Retrieval")continue;const f=l.filter(p=>{const m=p.fieldName||"",b=p.fieldPath||"";if(m===d.dimensionName||b===d.dimensionName||m.toLowerCase()===d.dimensionName.toLowerCase()||b.toLowerCase()===d.dimensionName.toLowerCase())return!0;const y=b.split(".").pop()||"";return y===d.dimensionName||y.toLowerCase()===d.dimensionName.toLowerCase()});if(f.length===0)continue;const h=kr(d);if(d.filterType==="Star"){const p=f.filter(m=>m.fieldType==="string").map(m=>({value:m.fieldValue??"",count:m.weight})).sort((m,b)=>(b.count??0)-(m.count??0));n.set(h,p)}else if(d.filterType==="MinMax"){console.log("MinMax dimensionEntries: "+JSON.stringify(f,null,2)),console.log("All MinMax dimension entries fieldTypes:",f.map(m=>m.fieldType));const p=f.find(m=>m.fieldType==="number");if(console.log("numericEntry: "+JSON.stringify(p,null,2)),p?.fieldValue){const m=p.fieldValue,b=m.split(" to ");if(console.log("rangeParts: "+b),b.length===2){const y=[{value:parseFloat(b[0])},{value:parseFloat(b[1])}];n.set(h,y)}else console.warn(`Could not parse numeric range for ${d.dimensionName}: ${m}`)}else console.warn(`No numeric entry found for ${d.dimensionName}. Available entries:`,f)}else if(d.filterType==="DateMinMax"){const p=f.find(m=>m.fieldType==="date"||m.fieldType==="timestamp"||m.fieldType==="string");if(console.log("dateEntry: "+JSON.stringify(p,null,2)),console.log("All date dimension entries fieldTypes:",f.map(m=>m.fieldType)),p?.fieldValue){const m=p.fieldValue,b=m.split(" to ");if(console.log("date rangeParts: "+b),b.length===2){const y=[{value:new Date(b[0].trim())},{value:new Date(b[1].trim())}];n.set(h,y)}else console.warn(`Could not parse date range for ${d.dimensionName}: ${m}`)}else console.warn(`No date entry found for ${d.dimensionName}. Available entries:`,f)}}return{values:n,noRowsMatchedFilter:u}}function zd(e){const{environment:t,package:n,dimensionSpecs:r,versionId:o,enabled:a=!0,indexLimit:i=1e4,activeFilters:s=[]}=e,l=z.useMemo(()=>A7(r),[r]),u=z.useMemo(()=>{const b=[];for(const[y,x]of l){const[T,C]=y.split("|"),k=I7(T,x,i,s);k?b.push({key:y,source:T,model:C,query:k,specs:x}):console.log("No query for source: ",T,"model: ",C)}return b},[l,i,s]),d=z.useMemo(()=>a&&u.length>0&&r.some(b=>b.filterType==="Star"||b.filterType==="MinMax"||b.filterType==="DateMinMax"),[a,u,r]),{apiClients:f}=it.useServer(),h=Qt({queryKey:["dimensionalFilter",t,n,r,o,s],queryFn:async()=>{if(!d){const T=new Map;for(const C of r){const k=kr(C);T.set(k,[])}return{values:T,noRowsMatchedFilter:!1}}const b=await Promise.all(u.map(async T=>{const C=await f.models.executeQueryModel(t,n,T.model,{query:T.query,versionId:o,bypassFilters:!0});return{config:T,result:P7(C.data.result,T.specs)}})),y=new Map;let x=!1;for(const{result:T}of b){for(const[C,k]of T.values)y.set(C,k);T.noRowsMatchedFilter&&(x=!0)}return{values:y,noRowsMatchedFilter:x}},enabled:d,staleTime:300*1e3,placeholderData:b=>b}),p=h.data?.values;return{data:z.useMemo(()=>{const b=new Map;for(const y of r){const x=kr(y);y.values?b.set(x,y.values.map(T=>({value:T}))):b.set(x,[])}if(p)for(const[y,x]of p)x.length>0&&b.set(y,x);return b},[r,p]),noRowsMatchedFilter:h.data?.noRowsMatchedFilter??!1,isLoading:d?h.isPending:!1,isError:d?h.isError:!1,error:d?h.error:null,refetch:h.refetch}}function Wb(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function er(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"?`'${Wb(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function R7(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,a=`\`${t}\``,i=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${a} = ${er(l,i)}`).join(" or ")})`:Array.isArray(r)?"":`${a} = ${er(r,i)}`;case"Contains":return typeof r=="string"?`${a} ~ f'%${Wb(r)}%'`:Array.isArray(r)?"":`${a} = ${er(r)}`;case"After":return Array.isArray(r)?"":`${a} > ${er(r,i)}`;case"Before":return Array.isArray(r)?"":`${a} < ${er(r,i)}`;case"Greater Than":return Array.isArray(r)?"":`${a} > ${er(r)}`;case"Less Than":return Array.isArray(r)?"":`${a} < ${er(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${a} >= ${er(r,i)} and ${a} <= ${er(o,i)}`:`${a} >= ${er(r,i)}`;default:return""}}function Vd(e){const{dimensionSpecs:t}=e,[n,r]=z.useState(()=>{const u=new Map;return t.forEach(d=>{const f=kr(d);u.set(f,{spec:d,selection:null})}),u});z.useEffect(()=>{r(u=>{const d=new Map;return t.forEach(f=>{const h=kr(f),p=u.get(h);d.set(h,{spec:f,selection:p?.selection??null})}),d})},[t]);const o=z.useCallback((u,d)=>{r(f=>{const h=new Map(f),p=h.get(u);return p&&h.set(u,{...p,selection:d}),h})},[]),a=z.useCallback(u=>{o(u,null)},[o]),i=z.useCallback(()=>{r(u=>{const d=new Map(u);return d.forEach((f,h)=>{d.set(h,{...f,selection:null})}),d})},[]),s=z.useCallback(()=>{const u=[];return n.forEach(d=>{d.selection&&u.push(d.selection)}),u},[n]),l=z.useCallback(()=>{const u=s();if(u.length===0)return"";const d=u.map(f=>R7(f)).filter(f=>f.length>0);return d.length===0?"":`where ${d.join(" and ")}`},[s]);return{filterStates:n,updateFilter:o,clearFilter:a,clearAllFilters:i,getActiveFilters:s,generateWhereClause:l}}const M7=kt(c.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 Wd(e){const{environmentName:t,packageName:n}=Nt(e.resourceUri);if(!t||!n)throw new Error("Environment and Package name must be provided for query embedding.");return JSON.stringify({...e})}function O7({embeddedQueryResult:e}){const{query:t,sourceName:n,queryName:r,resourceUri:o,height:a}=JSON.parse(e),{modelPath:i}=Nt(o);if(!i||!t&&(!r||!n)||typeof i!="string")throw new Error("Invalid embedded query result: "+e);return c.jsx(qb,{query:t,sourceName:n,queryName:r,resourceUri:o,height:a})}function qb({query:e,sourceName:t,queryName:n,resourceUri:r,height:o=400}){const{modelPath:a,environmentName:i,packageName:s,versionId:l}=Nt(r),{apiClients:u}=it.useServer();if(!i||!s)throw new Error("No environment or package name provided. A resource URI must be provided.");const{data:d,isSuccess:f,isError:h,error:p}=Qt({queryKey:[r,e,t,n],queryFn:()=>u.models.executeQueryModel(i,s,a,{query:e,sourceName:t,queryName:n,versionId:l})});return c.jsxs(c.Fragment,{children:[!f&&!h&&c.jsx(pn,{text:"Fetching Query Results..."}),f&&c.jsx(z.Suspense,{fallback:c.jsx("div",{children:"Loading..."}),children:c.jsx(ha,{result:d.data.result,maxHeight:o})}),h&&c.jsx(hn,{context:`${i} > ${s} > ${a}`,error:p})]})}function N7({cell:e,hideCodeCellIcon:t,hideEmbeddingIcon:n,resourceUri:r,index:o,maxResultSize:a,isExecuting:i}){const[s,l]=z.useState(!1),[u,d]=z.useState(!1),[f,h]=z.useState(!1),[p,m]=z.useState(),[b,y]=z.useState(),[x,T]=z.useState(!1),[C,k]=z.useState(""),S=/import\s*\{([^}]+)\}\s*from\s*['"`][^'"`]+['"`]/,v=/import\s*(?:\{[^}]*\}\s*from\s*)?['"`]([^'"`]+)['"`]/,_=N=>N.split(`
216
+ `).filter(w=>!w.trimStart().startsWith("##")).join(`
217
+ `),O=!!e.text&&(S.test(e.text)||v.test(e.text)),B=()=>{if(!e.newSources||e.newSources.length===0)return 0;let N=[],w="";if(e.text){const A=e.text.match(S);A&&(N=A[1].split(",").map(W=>W.trim()));const M=e.text.match(v);M&&(w=M[1].trim())}for(let A=0;A<e.newSources.length;A++)try{const M=JSON.parse(e.newSources[A]);if(N.length>0&&N.includes(M.name)||w&&w===M.path)return A}catch{continue}return 0},R=e.newSources&&e.newSources.length>0?{sourceInfos:e.newSources,resource:r}:void 0,L=Wd({query:e.text,resourceUri:r});z.useEffect(()=>{e.type==="code"&&Fs(_(e.text),"malloy").then(N=>{m(N)})},[e]),z.useEffect(()=>{Fs(L,"typescript").then(N=>{y(N)})},[L]);const E=()=>{const N=window.location.href;navigator.clipboard.writeText(N).then(()=>k("URL copied to clipboard!")).catch(()=>k("Failed to copy URL"))};return e.type==="markdown"&&c.jsx(Bu,{children:c.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?c.jsxs(P.Stack,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",children:[c.jsx(Cs,{children:e.text}),c.jsx(P.Tooltip,{title:"Click to copy link",children:c.jsx(Mc,{sx:{fontSize:"24px",color:"text.secondary",cursor:"pointer",marginTop:"26px"},onClick:E})})]}):c.jsx(Cs,{children:e.text}),c.jsx(P.Snackbar,{open:C!=="",autoHideDuration:6e3,onClose:()=>k(""),message:C})]})})||e.type==="code"&&c.jsxs(Bu,{children:[(!t||!n&&e.result||e.newSources&&e.newSources.length>0)&&c.jsx(P.Stack,{sx:{flexDirection:"column",gap:"8px",marginBottom:"2px"},children:e.newSources&&e.newSources.length>0&&c.jsx(rs,{sx:{position:"relative",padding:"0"},children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"24px",paddingRight:"8px"},children:[p&&c.jsx("span",{dangerouslySetInnerHTML:{__html:p},style:{fontFamily:"monospace",fontSize:"14px",flex:1,marginRight:"8px"}}),O&&c.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:()=>T(!0),children:c.jsx(bi,{sx:{fontSize:"18px",color:"text.secondary"}})})]})})}),c.jsx(Ud,{open:x,onClose:()=>T(!1),title:"Data Sources",hasValidImport:O,resourceUri:r,data:R,initialSelectedSourceIndex:B()}),c.jsxs(P.Dialog,{open:s,onClose:()=>l(!1),maxWidth:"lg",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Malloy Code",c.jsx(P.IconButton,{onClick:()=>l(!1),sx:{color:"text.secondary"},children:c.jsx(vr,{})})]}),c.jsx(P.DialogContent,{children:c.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:c.jsx("pre",{className:"code-display",style:{margin:0},dangerouslySetInnerHTML:{__html:p}})})})]}),c.jsxs(P.Dialog,{open:u,onClose:()=>d(!1),maxWidth:"lg",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Embeddable Code",c.jsx(P.IconButton,{onClick:()=>d(!1),sx:{color:"text.secondary"},children:c.jsx(vr,{})})]}),c.jsx(P.DialogContent,{children:c.jsxs(P.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},children:[c.jsx(P.Typography,{component:"div",sx:{fontSize:"12px",fontFamily:"monospace","& .line":{textWrap:"wrap"},flex:1},dangerouslySetInnerHTML:{__html:b}}),c.jsx(P.Tooltip,{title:"Copy Embeddable Code",children:c.jsx(P.IconButton,{sx:{width:"24px",height:"24px",marginLeft:"8px",color:"text.secondary"},onClick:()=>{navigator.clipboard.writeText(L)},children:c.jsx(M7,{})})})]})})]}),c.jsx(Ub,{open:f,onClose:()=>h(!1),result:e.result||"",title:"Results"}),i&&!e.result&&!O&&!(e.newSources&&e.newSources.length>0)&&c.jsx(rs,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:200},children:c.jsx(P.CircularProgress,{size:32})}),e.result&&c.jsxs(rs,{sx:{position:"relative"},children:[c.jsx(P.Box,{sx:{paddingTop:"24px"},children:c.jsx(ha,{result:e.result,maxHeight:700,maxResultSize:a})}),c.jsxs(P.Stack,{sx:{position:"absolute",top:"8px",right:"8px",flexDirection:"row",gap:"8px",alignItems:"center",zIndex:2},children:[!t&&c.jsx(P.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:N=>{N.stopPropagation(),l(!0)},children:c.jsx(Vm,{sx:{fontSize:"18px",color:"text.secondary"}})}),c.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:c.jsx(bi,{sx:{fontSize:"18px",color:"text.secondary"}})})]})]})]})}const L7=4;function Yb({resourceUri:e,maxResultSize:t=0,retrievalFn:n}){const{apiClients:r}=it.useServer(),{environmentName:o,packageName:a,versionId:i,modelPath:s}=Nt(e),{data:l,isSuccess:u,isError:d,error:f}=Qt({queryKey:[e],queryFn:async()=>(await r.notebooks.getNotebook(o,a,s,i)).data}),[h,p]=z.useState([]),[m,b]=z.useState(!1),[y,x]=z.useState(null),T=z.useMemo(()=>l?Fb(l.annotations):null,[l]),C=z.useMemo(()=>l?.notebookCells?Bb(l.notebookCells):null,[l]),k=z.useMemo(()=>C?.sourceInfoMap??new Map,[C]),S=C?.modelPath??null,v=z.useMemo(()=>{const H=new Map;if(!l?.sources)return H;for(const $ of l.sources)if($.name&&$.filters&&$.filters.length>0){const D=$.filters.filter(V=>!V.implicit);D.length>0&&H.set($.name,D)}return H},[l]),_=v.size>0,O=z.useMemo(()=>{if(_&&S){const H=[];for(const[$,D]of v)for(const V of D??[]){if(!V.dimension||!V.type)continue;let Q;const F=V.dimensionType;F==="boolean"?Q="Boolean":F==="date"||F==="timestamp"||F==="timestamptz"?Q="DateMinMax":F==="number"?Q=V.type==="equal"||V.type==="in"?"Star":"MinMax":Q={equal:"Star",in:"Star",like:"Star",greater_than:"MinMax",less_than:"MinMax"}[V.type]??"Star";const J={equal:"Equals",in:"Equals",like:"Contains",greater_than:Q==="DateMinMax"?"After":"Greater Than",less_than:Q==="DateMinMax"?"Before":"Less Than"}[V.type],X=V.name!==V.dimension?V.name:void 0;H.push({source:$,model:S,dimensionName:V.dimension,filterType:Q,label:X,filterName:V.name??V.dimension,defaultMatchType:J,required:V.required??!1})}return H}return!T||k.size===0||!S?[]:jb(k,T.filters,S)},[_,v,T,k,S]),{filterStates:B,updateFilter:R,getActiveFilters:L}=Vd({dimensionSpecs:O}),E=z.useMemo(()=>L(),[B,L]);z.useMemo(()=>{const H=new Map;for(const $ of O){const D=kr($);H.set(D,$.source)}return H},[O]);const{data:N}=zd({environment:o,package:a,dimensionSpecs:O,versionId:i,enabled:O.length>0}),w=z.useCallback(H=>{if(H.length===0)return;const $=V=>V instanceof Date?V.toISOString().slice(0,10):String(V),D={};for(const V of H){const Q=V.filterName??V.dimensionName,F=V.value;Array.isArray(F)?D[Q]=F.map($):F!=null&&(D[Q]=$(F))}return Object.keys(D).length>0?JSON.stringify(D):void 0},[]),A=z.useCallback(async(H=[])=>{if(!u||!l?.notebookCells)return;p(D=>D.length===0?l.notebookCells.map(V=>({...V})):D.map(V=>({...V,result:void 0}))),b(!0),x(null);const $=_?w(H):void 0;try{const D=[];for(let Q=0;Q<l.notebookCells.length;Q++){const F=l.notebookCells[Q];if(F.type==="markdown")continue;const fe=Q,J=async()=>{try{const ee=(await r.notebooks.executeNotebookCell(o,a,s,fe,i,$)).data,K=ee.result,te=F.newSources||ee.newSources;p(oe=>{const re=[...oe];return re[fe]||(re[fe]={...F}),re[fe]={...re[fe],result:K,newSources:te},re})}catch(X){console.error(`Error executing cell ${fe}:`,X)}};D.push(J)}const V=[];for(const Q of D){const F=Q().then(()=>{V.splice(V.indexOf(F),1)});V.push(F),V.length>=L7&&await Promise.race(V)}await Promise.all(V)}catch(D){console.error("Error executing notebook cells:",D),x(D)}finally{b(!1)}},[u,l,_,w,o,a,s,i,r.notebooks]);z.useEffect(()=>{!u||!l?.notebookCells||A([])},[u,l,A]);const M=z.useRef("");z.useEffect(()=>{const H=JSON.stringify(E.map($=>({dim:$.dimensionName,type:$.matchType,val:$.value,val2:$.value2})));if(H!==M.current){if(M.current===""&&E.length===0){M.current=H;return}M.current=H,m||A(E)}},[E,m,A]);const W=z.useCallback(H=>$=>{R(H,$)},[R]);return O.some(H=>H.filterType==="Retrieval"),c.jsx(_2,{children:c.jsx(B2,{children:c.jsxs(P.Stack,{spacing:3,component:"section",children:[O.length>0&&N&&c.jsxs(P.Paper,{elevation:0,sx:{p:3,backgroundColor:"transparent",border:"none",boxShadow:"none"},children:[c.jsx(P.Typography,{variant:"subtitle2",sx:{fontWeight:600,mb:2,color:"#333"},children:"Filters"}),c.jsx(P.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:3},children:O.map(H=>{const $=kr(H),D=N.get($)||[],V=B.get($);return H.filterType==="Retrieval"&&!n?null:c.jsx(P.Box,{children:c.jsx(Lb,{spec:H,values:D,selection:V?.selection,onChange:W($),retrievalFn:n})},$)})})]}),!u&&!d&&c.jsx(pn,{text:"Fetching Notebook..."}),u&&(h.length>0?h:l?.notebookCells||[]).map((H,$)=>c.jsx(N7,{cell:H,index:$,resourceUri:e,maxResultSize:t,isExecuting:m},$)),d&&f.status===404&&c.jsxs(P.Typography,{variant:"body2",sx:{color:"text.secondary"},children:[c.jsx("code",{children:`${o} > ${a} > ${s}`})," ","not found."]}),d&&f.status!==404&&c.jsx(hn,{error:f,context:`${o} > ${a} > ${s}`}),y&&c.jsx(hn,{error:{message:y.message,status:500,name:"ExecutionError"},context:"Notebook Execution"})]})})})}const F7=kt(c.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}));function Au({type:e,size:t=18,sx:n,...r}){return c.jsxs(ks,{...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"&&c.jsx(_7,{}),e==="model"&&c.jsx(B7,{}),e==="data"&&c.jsx(j7,{})]})}function _7(){return c.jsxs(c.Fragment,{children:[c.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"}),c.jsx("path",{d:"M14 3 v4 a2 2 0 0 0 2 2 h4"}),c.jsx("path",{d:"M8 17 v-3"}),c.jsx("path",{d:"M12 17 v-6"}),c.jsx("path",{d:"M16 17 v-4"})]})}function B7(){return c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M12 3 L4 7 v10 l8 4 l8 -4 V7 z"}),c.jsx("path",{d:"M4 7 l8 4 l8 -4"}),c.jsx("path",{d:"M12 11 v10"})]})}function j7(){return c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"3.5",y:"3.5",width:"17",height:"17",rx:"2"}),c.jsx("path",{d:"M3.5 9.5 H20.5"}),c.jsx("path",{d:"M9.5 3.5 V20.5"})]})}const Kb=kt(c.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"})),xr={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:[]},Es={postgres:"postgresConnection",bigquery:"bigqueryConnection",snowflake:"snowflakeConnection",trino:"trinoConnection",databricks:"databricksConnection",mysql:"mysqlConnection",duckdb:"duckdbConnection",motherduck:"motherduckConnection",ducklake:"ducklakeConnection"},Tc={postgres:"postgresConnection",bigquery:"bigqueryConnection",snowflake:"snowflakeConnection",gcs:"gcsConnection",s3:"s3Connection",azure:"azureConnection"},yi=[{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}],xi=[{label:"Key ID",name:"keyId",type:"text",required:!0},{label:"Secret",name:"secret",type:"password",required:!0}],$7=[{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 Ys(e){return e==="postgres"||e==="bigquery"||e==="snowflake"?xr[e]||[]:e==="s3"?yi:e==="gcs"?xi:e==="azure"?$7:[]}function H7({onSubmit:e,isSubmitting:t}){const[n,r]=z.useState(!1),[o,a]=z.useState("postgres"),[i,s]=z.useState([]),[l,u]=z.useState("postgres"),[d,f]=z.useState("s3"),h=()=>{r(!0)},p=()=>{r(!1),s([]),a("postgres"),u("postgres"),f("s3")},m=async T=>{T.preventDefault();const C=new FormData(T.currentTarget),k=C.get("name")?.toString(),S=C.get("type")?.toString(),v=xr[S];if(!k)throw new Error("Name is required");if(!S)throw new Error("Type is required");let _;if(S==="ducklake"){const O={};if(l==="postgres"){const L=xr.postgres,E={};if(L.forEach(N=>{const w=C.get(`ducklake_pg_${N.name}`)?.toString();w&&(E[N.name]=w)}),Object.keys(E).length===0)throw new Error("DuckLake requires catalog connection");O.postgresConnection=E}const B=C.get("ducklake_bucketUrl")?.toString();if(!B)throw new Error("DuckLake requires a bucket URL");const R={bucketUrl:B};if(d==="s3"){const L={};if(yi.forEach(E=>{const N=C.get(`ducklake_s3_${E.name}`)?.toString();N&&(L[E.name]=N)}),!L.accessKeyId)throw new Error("S3 Access Key ID is required");if(!L.secretAccessKey)throw new Error("S3 Secret Access Key is required");Object.keys(L).length>0&&(R.s3Connection=L)}else if(d==="gcs"){const L={};if(xi.forEach(E=>{const N=C.get(`ducklake_gcs_${E.name}`)?.toString();N&&(L[E.name]=N)}),!L.keyId)throw new Error("GCS Key ID is required");if(!L.secret)throw new Error("GCS Secret is required");Object.keys(L).length>0&&(R.gcsConnection=L)}_={name:k,type:S,ducklakeConnection:{catalog:O,storage:R}}}else if(S==="duckdb"){if(i.length===0)throw new Error("DuckDB connection must have at least one attached database");const O=i.map((B,R)=>{const L=B.dbType,E=C.get(`attachedDb_${R}_name`)?.toString();if(!E)throw new Error(`Attached database at index ${R} must have a name`);const N={name:E,type:L},w=Ys(L);if(w&&w.length>0){const A={};w.forEach(W=>{const H=C.get(`attachedDb_${R}_${W.name}`)?.toString();H&&(A[W.name]=H)});const M=Tc[L];M&&(N[M]=A)}return N});_={name:k,type:S,duckdbConnection:{attachedDatabases:O}}}else{const O={};if(v.forEach(B=>{const R=C.get(B.name)?.toString();R&&(O[B.name]=R)}),S==="postgres"){if(!!!O.connectionString?.trim()){const R=["host","port","databaseName","userName","password"];for(const L of R)if(!O[L])throw new Error(`${v.find(E=>E.name===L)?.label||L} is required`)}}else if(S==="bigquery"){if(!O.serviceAccountKeyJson)throw new Error("Service Account Key JSON is required")}else if(S==="snowflake"){if(!O.account)throw new Error("Account is required");if(!O.username)throw new Error("Username is required");if(!O.warehouse)throw new Error("Warehouse is required");if(!O.password&&!O.privateKey)throw new Error("Either password or private key is required")}else if(S==="trino"){if(!O.server)throw new Error("Server is required");if(!O.user)throw new Error("User is required");if(O.server.trim().startsWith("https://")&&!O.password&&!O.peakaKey)throw new Error("Password is required for HTTPS connections (or use Peaka Key)")}else if(S==="mysql"){const B=["host","port","database","user","password"];for(const R of B)if(!O[R])throw new Error(`${v.find(L=>L.name===R)?.label||R} is required`)}else if(S==="motherduck"){if(!O.accessToken)throw new Error("Access Token is required")}else if(S==="databricks"){if(!O.host)throw new Error("Host is required");if(!O.path)throw new Error("HTTP Path is required");const B=O.oauthClientId&&O.oauthClientSecret;if(!O.token&&!B)throw new Error("Either Access Token or OAuth Client ID + Secret is required")}_={name:k,type:S,[Es[S]]:O}}await e(_),p()},b=()=>{s([...i,{name:"",dbType:"postgres"}])},y=T=>{s(i.filter((C,k)=>k!==T))},x=(T,C)=>{const k=[...i];k[T]={...k[T],dbType:C},s(k)};return c.jsxs(z.Fragment,{children:[c.jsx(Ot,{variant:"outlined",onClick:h,children:"Add Connection"}),c.jsxs(Ar,{open:n,onClose:p,children:[c.jsx(Wr,{children:"Create New Connection"}),c.jsxs(Ir,{children:[c.jsx(Mi,{children:"Add a new connection to query your data database using Malloy."}),c.jsxs("form",{onSubmit:m,id:"connection-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Connection Name",type:"text",fullWidth:!0,variant:"standard"}),c.jsx(Je,{margin:"dense",id:"type",name:"type",label:"Connection Type",fullWidth:!0,variant:"standard",value:o,select:!0,onChange:T=>a(T.target.value),children:Object.values(it.ConnectionTypeEnum).map(T=>c.jsx(Jt,{value:T,children:T},T))}),o==="ducklake"?c.jsxs(St,{sx:{mt:2},children:[c.jsxs(St,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(mt,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Catalog"}),c.jsx(Je,{margin:"dense",id:"ducklake_catalogType",label:"Catalog Type",fullWidth:!0,variant:"standard",value:l,select:!0,onChange:T=>u(T.target.value),children:c.jsx(Jt,{value:"postgres",children:"PostgreSQL"})}),l==="postgres"&&c.jsx(c.Fragment,{children:xr.postgres.map(T=>c.jsx(Je,{margin:"dense",id:`ducklake_pg_${T.name}`,name:`ducklake_pg_${T.name}`,label:T.label,type:T.type,fullWidth:!0,variant:"standard"},`pg_${T.name}`))})]}),c.jsxs(St,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(mt,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Storage"}),c.jsxs(Je,{margin:"dense",id:"ducklake_storageType",label:"Storage Type",fullWidth:!0,variant:"standard",value:d,select:!0,onChange:T=>f(T.target.value),children:[c.jsx(Jt,{value:"s3",children:"S3"}),c.jsx(Jt,{value:"gcs",children:"GCS"})]}),c.jsx(Je,{margin:"dense",required:!0,id:"ducklake_bucketUrl",name:"ducklake_bucketUrl",label:d==="s3"?"Bucket URL (e.g. s3://my-bucket/path)":"Bucket URL (e.g. gs://my-bucket/path)",type:"text",fullWidth:!0,variant:"standard"}),d==="s3"&&c.jsxs(c.Fragment,{children:[c.jsx(mt,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"S3 Credentials"}),yi.map(T=>c.jsx(Je,{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,placeholder:T.name==="region"?"us-east-1":void 0},`s3_${T.name}`))]}),d==="gcs"&&c.jsxs(c.Fragment,{children:[c.jsx(mt,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"GCS Credentials"}),xi.map(T=>c.jsx(Je,{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},`gcs_${T.name}`))]})]})]}):o==="duckdb"?c.jsxs(St,{sx:{mt:2},children:[c.jsxs(St,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsx(mt,{variant:"subtitle1",fontWeight:500,children:"Attached Databases"}),c.jsx(Ot,{startIcon:c.jsx(Pc,{}),onClick:b,size:"small",variant:"outlined",children:"Add Database"})]}),i.length===0&&c.jsx(mt,{variant:"body2",color:"text.secondary",sx:{mb:2},children:'DuckDB connections require at least one attached database. Click "Add Database" to get started.'}),i.map((T,C)=>{const k=Ys(T.dbType);return c.jsxs(St,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsxs(St,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsxs(mt,{variant:"subtitle2",children:["Database ",C+1]}),c.jsx(Sn,{onClick:()=>y(C),size:"small",color:"error",children:c.jsx(Kb,{fontSize:"small"})})]}),c.jsx(Je,{margin:"dense",required:!0,id:`attachedDb_${C}_name`,name:`attachedDb_${C}_name`,label:"Database Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:T.name}),c.jsx(Je,{margin:"dense",id:`attachedDb_${C}_type`,name:`attachedDb_${C}_type`,label:"Database Type",fullWidth:!0,variant:"standard",value:T.dbType,select:!0,onChange:S=>x(C,S.target.value),children:Object.values(it.AttachedDatabaseTypeEnum).map(S=>c.jsx(Jt,{value:S,children:S},S))}),k.filter(S=>S.visibleWhen?(T[S.visibleWhen.field]||k.find(_=>_.name===S.visibleWhen?.field)?.selectOptions?.[0]?.value)===S.visibleWhen.value:!0).map(S=>c.jsx(Je,{margin:"dense",id:`attachedDb_${C}_${S.name}`,name:`attachedDb_${C}_${S.name}`,label:S.label,type:S.selectOptions?void 0:S.type,fullWidth:!0,variant:"standard",required:S.required,select:!!S.selectOptions,defaultValue:S.selectOptions?.[0]?.value,onChange:S.selectOptions?v=>{const _=[...i];_[C]={..._[C],[S.name]:v.target.value},s(_)}:void 0,children:S.selectOptions?.map(v=>c.jsx(Jt,{value:v.value,children:v.label},v.value))},S.name))]},C)})]}):xr[o].map(T=>c.jsx(Je,{margin:"dense",id:T.name,name:T.name,label:T.label,type:T.type,fullWidth:!0,variant:"standard",required:T.required},T.name))]})]}),c.jsxs(Pr,{children:[c.jsx(Ot,{disabled:t,onClick:p,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"connection-form",loading:t,children:"Create Connection"})]})]})]})}function U7({connection:e,onCloseDialog:t,isMutating:n,onDelete:r}){const[o,a]=z.useState(!1),[i,s]=z.useState(""),l=()=>{a(!0)},u=()=>{a(!1),t()};return c.jsxs(z.Fragment,{children:[c.jsx(Sn,{"aria-label":`Delete connection ${e?.name??""}`.trim(),onClick:d=>{d.stopPropagation(),l()},children:c.jsx(vn.Delete,{})}),c.jsxs(Ar,{onClose:u,"aria-labelledby":"customized-dialog-title",open:o,children:[c.jsx(Wr,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Connection"}),c.jsx(Sn,{"aria-label":"close",onClick:u,sx:d=>({position:"absolute",right:8,top:8,color:d.palette.grey[500]}),children:c.jsx(vr,{})}),c.jsx(Ir,{dividers:!0,children:c.jsxs(mt,{gutterBottom:!0,children:['Are you sure you want to delete "',e.name,'"? This action cannot be undone.']})}),c.jsx(Pr,{children:c.jsx(Ot,{loading:n,variant:"contained",autoFocus:!0,onClick:()=>r(),color:"error",children:"Delete"})}),c.jsx(P.Snackbar,{open:i!=="",autoHideDuration:6e3,onClose:()=>s(""),message:i})]})]})}function gm(e){const t=e.duckdbConnection?.attachedDatabases;return!t||t.length===0?[]:t.map(n=>({name:n.name||"",dbType:n.type||"postgres"}))}function bm(e){const t=e.ducklakeConnection;return t&&t.storage?.gcsConnection?"gcs":"s3"}function z7({connection:e,onSubmit:t,isSubmitting:n}){const[r,o]=z.useState(!1),[a,i]=z.useState(e.type),[s,l]=z.useState(()=>gm(e)),[u,d]=z.useState("postgres"),[f,h]=z.useState(()=>bm(e)),p=()=>{l(gm(e)),i(e.type),d("postgres"),h(bm(e)),o(!0)},m=()=>{o(!1)},b=async S=>{S.preventDefault();const v=new FormData(S.currentTarget),_=v.get("name")?.toString(),O=v.get("type")?.toString(),B=xr[O];if(!_)throw new Error("Name is required");if(!O)throw new Error("Type is required");let R;if(O==="ducklake"){const L={};if(u==="postgres"){const w=xr.postgres,A={};if(w.forEach(M=>{const W=v.get(`ducklake_pg_${M.name}`)?.toString();W&&(A[M.name]=W)}),Object.keys(A).length===0)throw new Error("DuckLake requires catalog connection");L.postgresConnection=A}const E=v.get("ducklake_bucketUrl")?.toString();if(!E)throw new Error("DuckLake requires a bucket URL");const N={bucketUrl:E};if(f==="s3"){const w={};yi.forEach(M=>{const W=v.get(`ducklake_s3_${M.name}`)?.toString();W&&(w[M.name]=W)});const A=e.ducklakeConnection?.storage?.s3Connection;if(A&&(!w.accessKeyId&&A.accessKeyId&&(w.accessKeyId=A.accessKeyId),!w.secretAccessKey&&A.secretAccessKey&&(w.secretAccessKey=A.secretAccessKey)),!w.accessKeyId)throw new Error("S3 Access Key ID is required");if(!w.secretAccessKey)throw new Error("S3 Secret Access Key is required");Object.keys(w).length>0&&(N.s3Connection=w)}else if(f==="gcs"){const w={};xi.forEach(M=>{const W=v.get(`ducklake_gcs_${M.name}`)?.toString();W&&(w[M.name]=W)});const A=e.ducklakeConnection?.storage?.gcsConnection;if(A&&(!w.keyId&&A.keyId&&(w.keyId=A.keyId),!w.secret&&A.secret&&(w.secret=A.secret)),!w.keyId)throw new Error("GCS Key ID is required");if(!w.secret)throw new Error("GCS Secret is required");Object.keys(w).length>0&&(N.gcsConnection=w)}R={name:_,type:O,ducklakeConnection:{catalog:L,storage:N}}}else if(O==="duckdb"){if(s.length===0)throw new Error("DuckDB connection must have at least one attached database");const L=s.map((E,N)=>{const w=E.dbType,A=v.get(`attachedDb_${N}_name`)?.toString();if(!A)throw new Error(`Attached database at index ${N} must have a name`);const M={name:A,type:w},W=Ys(w);if(W&&W.length>0){const H={};W.forEach(D=>{const V=v.get(`attachedDb_${N}_${D.name}`)?.toString();V&&(H[D.name]=V)});const $=Tc[w];$&&(M[$]=H)}return M});R={name:_,type:O,duckdbConnection:{attachedDatabases:L}}}else{const L=e[Es[O]]||{},E={};if(B.forEach(N=>{const w=v.get(N.name)?.toString(),A=L[N.name],M=N.type==="password"||N.name==="password"||N.name==="secretAccessKey"||N.name==="secret"||N.name==="accessToken"||N.name==="privateKey";w?E[N.name]=w:M&&A?E[N.name]=A:w!==void 0?E[N.name]=w:A&&(E[N.name]=A)}),O==="postgres"){if(!!!E.connectionString?.trim()){const w=["host","port","databaseName","userName","password"];for(const A of w)if(!E[A])throw new Error(`${B.find(M=>M.name===A)?.label||A} is required`)}}else if(O==="bigquery"){if(!E.serviceAccountKeyJson)throw new Error("Service Account Key JSON is required")}else if(O==="snowflake"){if(!E.account)throw new Error("Account is required");if(!E.username)throw new Error("Username is required");if(!E.warehouse)throw new Error("Warehouse is required");if(!E.password&&!E.privateKey)throw new Error("Either password or private key is required")}else if(O==="trino"){if(!E.server)throw new Error("Server is required");if(!E.user)throw new Error("User is required");if(E.server.trim().startsWith("https://")&&!E.password&&!E.peakaKey)throw new Error("Password is required for HTTPS connections (or use Peaka Key)")}else if(O==="mysql"){const N=["host","port","database","user","password"];for(const w of N)if(!E[w])throw new Error(`${B.find(A=>A.name===w)?.label||w} is required`)}else if(O==="motherduck"){if(!E.accessToken)throw new Error("Access Token is required")}else if(O==="databricks"){if(!E.host)throw new Error("Host is required");if(!E.path)throw new Error("HTTP Path is required");const N=E.oauthClientId&&E.oauthClientSecret;if(!E.token&&!N)throw new Error("Either Access Token or OAuth Client ID + Secret is required")}R={name:_,type:O,[Es[O]]:E}}await t(R),m()},y=()=>{l([...s,{name:"",dbType:"postgres"}])},x=S=>{l(s.filter((v,_)=>_!==S))},T=(S,v)=>{const _=[...s];_[S]={..._[S],dbType:v},l(_)},C=(S,v)=>{const _=e.duckdbConnection?.attachedDatabases;if(!_||!_[S])return"";const O=_[S],B=Tc[O.type||""];return B&&O[B]?O[B][v]??"":""},k=S=>{const v=e.ducklakeConnection;if(!v)return"";if(S.startsWith("pg_")){const _=S.replace("pg_","");return v.catalog?.postgresConnection?.[_]??""}if(S==="bucketUrl")return v.storage?.bucketUrl??"";if(S.startsWith("s3_")){const _=S.replace("s3_","");return v.storage?.s3Connection?.[_]??""}if(S.startsWith("gcs_")){const _=S.replace("gcs_","");return v.storage?.gcsConnection?.[_]??""}return""};return c.jsxs(z.Fragment,{children:[c.jsx(Sn,{"aria-label":`Edit connection ${e?.name??""}`.trim(),onClick:S=>{S.preventDefault(),S.stopPropagation(),p()},children:c.jsx(vn.Edit,{})}),c.jsxs(Ar,{open:r,onClose:m,children:[c.jsx(Wr,{onClick:S=>{S.stopPropagation()},children:"Edit Connection"}),c.jsxs(Ir,{onClick:S=>{S.stopPropagation()},children:[c.jsx(Mi,{children:"Edit a connection to query your data database using Malloy."}),c.jsxs("form",{onSubmit:b,id:"connection-form",children:[c.jsx(Je,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Connection Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),c.jsx(Je,{margin:"dense",id:"type",name:"type",label:"Connection Type",fullWidth:!0,variant:"standard",value:a,select:!0,onChange:S=>i(S.target.value),children:Object.values(it.ConnectionTypeEnum).map(S=>c.jsx(Jt,{value:S,children:S},S))}),a==="ducklake"?c.jsxs(St,{sx:{mt:2},children:[c.jsxs(St,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(mt,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Catalog"}),c.jsx(Je,{margin:"dense",id:"ducklake_catalogType",label:"Catalog Type",fullWidth:!0,variant:"standard",value:u,select:!0,onChange:S=>d(S.target.value),children:c.jsx(Jt,{value:"postgres",children:"PostgreSQL"})}),u==="postgres"&&c.jsx(c.Fragment,{children:xr.postgres.map(S=>c.jsx(Je,{margin:"dense",id:`ducklake_pg_${S.name}`,name:`ducklake_pg_${S.name}`,label:S.label,type:S.type,fullWidth:!0,variant:"standard",defaultValue:k(`pg_${S.name}`)},`pg_${S.name}`))})]}),c.jsxs(St,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsx(mt,{variant:"subtitle2",sx:{mb:2},fontWeight:500,children:"Storage"}),c.jsxs(Je,{margin:"dense",id:"ducklake_storageType",label:"Storage Type",fullWidth:!0,variant:"standard",value:f,select:!0,onChange:S=>h(S.target.value),children:[c.jsx(Jt,{value:"s3",children:"S3"}),c.jsx(Jt,{value:"gcs",children:"GCS"})]}),c.jsx(Je,{margin:"dense",required:!0,id:"ducklake_bucketUrl",name:"ducklake_bucketUrl",label:f==="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")}),f==="s3"&&c.jsxs(c.Fragment,{children:[c.jsx(mt,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"S3 Credentials"}),yi.map(S=>c.jsx(Je,{margin:"dense",id:`ducklake_s3_${S.name}`,name:`ducklake_s3_${S.name}`,label:S.label,type:S.type,fullWidth:!0,variant:"standard",required:S.required&&S.name!=="secretAccessKey",defaultValue:k(`s3_${S.name}`),placeholder:S.name==="region"?"us-east-1":S.name==="secretAccessKey"?"Leave empty to keep existing":void 0},`s3_${S.name}`))]}),f==="gcs"&&c.jsxs(c.Fragment,{children:[c.jsx(mt,{variant:"caption",sx:{mt:2,mb:1,display:"block"},color:"text.secondary",children:"GCS Credentials"}),xi.map(S=>c.jsx(Je,{margin:"dense",id:`ducklake_gcs_${S.name}`,name:`ducklake_gcs_${S.name}`,label:S.label,type:S.type,fullWidth:!0,variant:"standard",required:S.required&&S.name!=="secret",defaultValue:k(`gcs_${S.name}`),placeholder:S.name==="secret"?"Leave empty to keep existing":void 0},`gcs_${S.name}`))]})]})]}):a==="duckdb"?c.jsxs(St,{sx:{mt:2},children:[c.jsxs(St,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsx(mt,{variant:"subtitle1",fontWeight:500,children:"Attached Databases"}),c.jsx(Ot,{startIcon:c.jsx(Pc,{}),onClick:y,size:"small",variant:"outlined",children:"Add Database"})]}),s.length===0&&c.jsx(mt,{variant:"body2",color:"text.secondary",sx:{mb:2},children:'DuckDB connections require at least one attached database. Click "Add Database" to get started.'}),s.map((S,v)=>{const _=Ys(S.dbType);return c.jsxs(St,{sx:{mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[c.jsxs(St,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[c.jsxs(mt,{variant:"subtitle2",children:["Database ",v+1]}),c.jsx(Sn,{"aria-label":`Remove attached database ${v+1}`,onClick:()=>x(v),size:"small",color:"error",children:c.jsx(Kb,{fontSize:"small"})})]}),c.jsx(Je,{margin:"dense",required:!0,id:`attachedDb_${v}_name`,name:`attachedDb_${v}_name`,label:"Database Name",type:"text",fullWidth:!0,variant:"standard",defaultValue:S.name}),c.jsx(Je,{margin:"dense",id:`attachedDb_${v}_type`,name:`attachedDb_${v}_type`,label:"Database Type",fullWidth:!0,variant:"standard",value:S.dbType,select:!0,onChange:O=>T(v,O.target.value),children:Object.values(it.AttachedDatabaseTypeEnum).map(O=>c.jsx(Jt,{value:O,children:O},O))}),_.filter(O=>O.visibleWhen?(S[O.visibleWhen.field]||C(v,O.visibleWhen.field)||_.find(R=>R.name===O.visibleWhen?.field)?.selectOptions?.[0]?.value)===O.visibleWhen.value:!0).map(O=>c.jsx(Je,{margin:"dense",id:`attachedDb_${v}_${O.name}`,name:`attachedDb_${v}_${O.name}`,label:O.label,type:O.selectOptions?void 0:O.type,fullWidth:!0,variant:"standard",required:O.required,select:!!O.selectOptions,defaultValue:C(v,O.name)||O.selectOptions?.[0]?.value,onChange:O.selectOptions?B=>{const R=[...s];R[v]={...R[v],[O.name]:B.target.value},l(R)}:void 0,children:O.selectOptions?.map(B=>c.jsx(Jt,{value:B.value,children:B.label},B.value))},O.name))]},v)})]}):xr[a].map(S=>{const v=e?.[Es[a]??""]?.[S.name??""]??"",_=S.type==="password"||S.name==="password"||S.name==="secretAccessKey"||S.name==="secret"||S.name==="accessToken"||S.name==="privateKey";return c.jsx(Je,{margin:"dense",id:S.name,name:S.name,label:S.label,type:S.type,fullWidth:!0,variant:"standard",required:S.required&&!_&&!v,defaultValue:v,placeholder:_&&v?"Leave empty to keep existing":void 0},S.name)})]})]}),c.jsxs(Pr,{onClick:S=>{S.stopPropagation()},children:[c.jsx(Ot,{disabled:n,onClick:m,children:"Cancel"}),c.jsx(Ot,{type:"submit",form:"connection-form",loading:n,children:"Edit Connection"})]})]})]})}function ym(e,t){return!e||e.type!=="duckdb"?!1:(e.duckdbConnection?.attachedDatabases||[]).some(r=>r.type==="azure"&&r.name===t)}function V7(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}=it.useServer(),{environmentName:a}=Nt(t),[i,s]=z.useState(null),[l,u]=z.useState(n||null),[d,f]=z.useState(!1),{data:h,isError:p,isLoading:m,error:b}=Qt({queryKey:["schemas",a,e],queryFn:()=>o.connections.listSchemas(a,e)}),y=h?.data||[];return c.jsxs(P.Grid,{container:!0,spacing:1,children:[!n&&c.jsx(P.Grid,{size:{xs:12,md:4},children:c.jsxs(P.Paper,{sx:{p:1,m:0},children:[c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:0},children:[c.jsx(P.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),c.jsx(P.FormControlLabel,{control:c.jsx(P.Switch,{checked:d,onChange:x=>f(x.target.checked)}),label:"Hidden Schemas"})]}),c.jsx(P.Divider,{sx:{mt:"2px"}}),c.jsxs(P.Box,{sx:{mt:"2px",maxHeight:"600px",overflowY:"auto"},children:[m&&c.jsx(pn,{text:"Loading schemas..."}),p&&c.jsx(hn,{error:b,context:`${a} > ${e} > Schemas`}),!m&&!p&&y.length===0&&c.jsx(P.Typography,{variant:"body2",children:"No Schemas"}),!m&&!p&&y.length>0&&c.jsx(P.List,{dense:!0,disablePadding:!0,children:y.map(x=>{const T=x.name;if(x.isHidden&&!d)return null;const k=l===T;return c.jsx(P.ListItemButton,{selected:k,onClick:()=>{u(T),s(null)},children:c.jsx(P.ListItemText,{primary:T})},T)})})]})]})}),c.jsx(P.Grid,{size:{xs:12,md:n?6:4},children:l&&c.jsx(P.Paper,{sx:{p:1,m:0},children:c.jsx(Y7,{connectionName:e,schemaName:l,onTableSelect:x=>{s(x)},resourceUri:t,connection:r})})}),c.jsx(P.Grid,{size:{xs:12,md:n?6:4},children:l&&i&&c.jsx(W7,{environmentName:a,connectionName:e,schemaName:l,tableResource:i})})]})}function W7({environmentName:e,connectionName:t,schemaName:n,tableResource:r}){const{apiClients:o}=it.useServer(),{data:a,isLoading:i,isError:s,error:l}=Qt({queryKey:["connectionTableDetail",e,t,n,r],queryFn:()=>o.connections.getTable(e,t,n,r),enabled:!!n&&!!r}),u={resource:a?.data?.resource??r,columns:a?.data?.columns??[]};return c.jsxs(P.Paper,{sx:{p:1,m:0},children:[s&&c.jsx(hn,{error:l,context:`${e} > ${t} > ${n} > ${r}`}),!s&&c.jsx(q7,{table:u,loading:i})]})}function q7({table:e,loading:t}){return t?c.jsx(pn,{text:"Loading columns..."}):c.jsxs(c.Fragment,{children:[c.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]}),c.jsx(P.Divider,{}),c.jsx(P.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:c.jsx(P.TableContainer,{children:c.jsxs(P.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[c.jsx(P.TableHead,{children:c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{children:"NAME"}),c.jsx(P.TableCell,{children:"TYPE"})]})}),c.jsx(P.TableBody,{children:e.columns?.sort((n,r)=>n.name.localeCompare(r.name))?.map(n=>c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{children:n.name}),c.jsx(P.TableCell,{children:n.type})]},n.name))})]})})})]})}function Y7({connectionName:e,schemaName:t,onTableSelect:n,resourceUri:r,connection:o}){const{environmentName:a}=Nt(r),{apiClients:i}=it.useServer(),[s,l]=z.useState(""),{data:u,isSuccess:d,isError:f,error:h,isLoading:p}=Qt({queryKey:["tablesInSchema",a,e,t],queryFn:()=>i.connections.listTables(a,e,t)}),m=ym(o,t),b=x=>m?x:x.split(".").pop()||x,y=d&&u?.data?u.data.filter(x=>b(x.resource).toLowerCase().includes(s.toLowerCase())).sort((x,T)=>b(x.resource).localeCompare(b(T.resource))):[];return c.jsxs(c.Fragment,{children:[c.jsx(P.Typography,{variant:"overline",fontWeight:"bold",children:V7(t)||ym(o,t)?`Files in ${t}`:`Tables in ${t}`}),c.jsx(P.Divider,{}),c.jsx(P.Box,{sx:{mt:1,mb:1},children:c.jsx(P.TextField,{size:"small",fullWidth:!0,placeholder:"Search tables...",value:s,onChange:x=>l(x.target.value),variant:"outlined"})}),c.jsx(P.Divider,{}),c.jsxs(P.Box,{sx:{mt:"2px",maxHeight:"600px",overflowY:"auto"},children:[p&&c.jsx(pn,{text:"Fetching Tables..."}),f&&c.jsx(hn,{error:h,context:`${a} > ${e} > ${t}`}),d&&y.length===0&&c.jsx(P.Typography,{variant:"body2",children:"No Tables"}),d&&u?.data&&u.data.length>0&&c.jsx(P.List,{dense:!0,disablePadding:!0,children:y.map(x=>{let T=b(x.resource);return!m&&x.resource.includes("://")&&(T=x.resource.split("/").pop()||x.resource),c.jsx(P.ListItemButton,{onClick:()=>n(x.resource),children:c.jsx(P.ListItemText,{primary:T,secondary:x.columns.length>0?`${x.columns.length} columns`:void 0})},x.resource)})})]})]})}function K7({connection:e,onClick:t,onEdit:n,onDelete:r,isMutating:o,mutable:a,isAdding:i}){return c.jsxs(P.TableRow,{sx:{"&:hover":{backgroundColor:i?void 0:"action.hover"}},children:[c.jsx(P.TableCell,{sx:{cursor:i?"default":"pointer",flexGrow:1,opacity:i?.5:1},onClick:i?void 0:t,children:c.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(P.Typography,{variant:"body2",children:e.name}),c.jsx(bi,{sx:{fontSize:"1rem",color:"action.active",opacity:.7}})]})}),c.jsx(P.TableCell,{sx:{minWidth:"120px"},children:c.jsx(P.Typography,{variant:"body2",children:e.type})}),a&&c.jsxs(P.TableCell,{sx:{minWidth:"120px"},children:[c.jsx(z7,{connection:e,onSubmit:n,isSubmitting:o}),c.jsx(U7,{connection:e,onCloseDialog:()=>{},isMutating:o,onDelete:()=>r(e)})]})]},e.name)}function G7({resourceUri:e}){const{apiClients:t,mutable:n}=it.useServer(),r=Dr.useQueryClient(),{environmentName:o}=Nt(e),[a,i]=z.useState(""),[s,l]=z.useState(null),u=Pi({environmentName:o,connectionName:s}),{data:d,isSuccess:f,isError:h,error:p}=Qt({queryKey:["connections",o],queryFn:()=>t.connections.listConnections(o)}),m=C=>{l(C)},b=()=>{l(null)},y=ir({mutationFn:C=>t.environments.updateEnvironment(o,{name:o,connections:[...d.data,C]}),onSuccess(){i("Connection added successfully"),r.invalidateQueries({queryKey:["connections",o]})},onError(C){i(C.message)}}),x=ir({mutationFn:C=>t.environments.updateEnvironment(o,{name:o,connections:d.data.map(k=>k.name===C.name?C:k)}),onSuccess(C,k){i(`Connection ${k.name} updated successfully`),r.invalidateQueries({queryKey:["connections",o]})},onError(C){i(C.message)}}),T=ir({mutationFn:C=>t.environments.updateEnvironment(o,{name:o,connections:d.data.filter(k=>k.name!==C.name)}),onSuccess(C,k){i(`Connection ${k.name} deleted successfully`),r.invalidateQueries({queryKey:["connections",o]})},onError(C){i(C.message)}});return c.jsxs(c.Fragment,{children:[c.jsx(Hm,{children:c.jsxs(Um,{children:[c.jsx(zm,{children:"Database Connections"}),c.jsxs(P.Box,{sx:{mb:1,maxHeight:"200px",overflowY:"auto"},children:[!f&&!h&&c.jsx(P.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),f&&d.data.length>0&&c.jsx(P.Table,{size:"small",sx:{borderCollapse:"collapse","& .MuiTableRow-root":{display:"flex",width:"100%"},"& .MuiTableCell-root":{borderBottom:"1px solid #e0e0e0",display:"flex",alignItems:"center"},"& .MuiTableRow-root:last-child .MuiTableCell-root":{borderBottom:"none"}},children:c.jsxs(P.TableBody,{children:[c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{sx:{flexGrow:1},children:c.jsx(P.Typography,{variant:"body2",fontWeight:"500",color:"text.secondary",children:"Connection Name"})}),c.jsx(P.TableCell,{sx:{minWidth:"120px"},children:c.jsx(P.Typography,{variant:"body2",fontWeight:"500",color:"text.secondary",children:"Type"})}),n&&c.jsx(P.TableCell,{sx:{minWidth:"120px"},children:c.jsx(P.Typography,{variant:"body2",fontWeight:"500",color:"text.secondary",sx:{mx:"auto"},children:"Actions"})})]}),d.data.map(C=>c.jsx(K7,{connection:C,onClick:()=>m(C.name),onEdit:k=>x.mutateAsync(k),onDelete:k=>{C.resource?i("Cannot delete this connection"):T.mutateAsync(k)},isMutating:y.isPending||x.isPending||T.isPending,mutable:n,isAdding:y.isPending},C.name))]})}),f&&d.data.length===0&&c.jsx(P.Typography,{variant:"body2",children:"No Connections"}),h&&c.jsx(hn,{error:p,context:`${o} > Connections`})]}),n&&c.jsx(P.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:c.jsx(H7,{onSubmit:C=>y.mutateAsync(C),isSubmitting:y.isPending})})]})}),c.jsx(P.Snackbar,{open:a!=="",autoHideDuration:6e3,onClose:()=>i(""),message:a}),c.jsxs(P.Dialog,{open:s!==null,onClose:b,maxWidth:"lg",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{children:["Connection Explorer: ",s,c.jsx(P.IconButton,{"aria-label":"close",onClick:b,sx:{position:"absolute",right:8,top:8},children:c.jsx(P.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),c.jsx(P.DialogContent,{children:s&&c.jsx(Gb,{resourceUri:u,connectionName:s,connection:d?.data?.find(C=>C.name===s)})})]})]})}const xm="README.malloynb";function Q7({onClickPackageFile:e,resourceUri:t,retrievalFn:n}){const{apiClients:r}=it.useServer(),o=e??(S=>{window.location.href=S}),{environmentName:a,packageName:i,versionId:s}=Nt(t),[l,u]=z.useState(null),d=Qt({queryKey:["package",a,i,s],queryFn:()=>r.packages.getPackage(a,i,s,!1)}),f=Qt({queryKey:["notebooks",a,i,s],queryFn:()=>r.notebooks.listNotebooks(a,i,s)}),h=Qt({queryKey:["models",a,i,s],queryFn:()=>r.models.listModels(a,i,s)}),p=Qt({queryKey:["databases",a,i,s],queryFn:()=>r.databases.listDatabases(a,i,s)}),m=(f.data?.data??[]).slice().sort((S,v)=>S.path.localeCompare(v.path)),b=(h.data?.data??[]).slice().sort((S,v)=>S.path.localeCompare(v.path)),y=(p.data?.data??[]).slice().sort((S,v)=>S.path.localeCompare(v.path)),x=d.data?.data?.description??"",T=m.some(S=>S.path===xm),C=Pi({environmentName:a,packageName:i,versionId:s,modelPath:xm}),k=!f.isSuccess&&!f.isError;return d.isError?c.jsx(hn,{error:d.error,context:`${a} > ${i}`}):c.jsxs(P.Container,{maxWidth:!1,sx:{maxWidth:1024,mx:"auto",px:3,py:6},children:[c.jsxs(P.Box,{sx:{mb:4},children:[c.jsxs(P.Link,{onClick:S=>o(`/${a}/`,S),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:[c.jsx(F7,{sx:{fontSize:18}}),"Back to ",a]}),c.jsx(P.Typography,{variant:"h4",component:"h1",sx:{fontWeight:600,letterSpacing:"-0.025em",mb:.5},children:i}),x&&c.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:x})]}),k&&c.jsx(pn,{text:"Loading package..."}),!k&&c.jsxs(c.Fragment,{children:[c.jsxs(Iu,{title:"Governed Reports",count:m.length,children:[m.map(S=>c.jsx(Pu,{icon:c.jsx(Au,{type:"report"}),tint:io.teal,label:S.path,onClick:v=>o(S.path,v)},S.path)),m.length===0&&c.jsx(Ru,{label:"No notebooks"})]}),c.jsxs(Iu,{title:"Semantic Models",count:b.length,children:[b.map(S=>c.jsx(Pu,{icon:c.jsx(Au,{type:"model"}),tint:io.orange,label:S.path,onClick:v=>o(S.path,v)},S.path)),b.length===0&&c.jsx(Ru,{label:"No models"})]}),c.jsxs(Iu,{title:"Package Data",count:y.length,children:[y.map(S=>c.jsx(Pu,{icon:c.jsx(Au,{type:"data"}),tint:io.darkBlue,label:S.path,rightLabel:X7(S.info.rowCount),onClick:()=>u(S)},S.path)),y.length===0&&c.jsx(Ru,{label:"No data files"})]}),c.jsx(P.Box,{sx:{mb:4},children:c.jsx(G7,{resourceUri:t})}),T&&c.jsx(P.Box,{sx:{mt:6},children:c.jsx(Yb,{resourceUri:C,retrievalFn:n})})]}),c.jsxs(P.Dialog,{open:l!==null,onClose:()=>u(null),maxWidth:"sm",fullWidth:!0,children:[c.jsxs(P.DialogTitle,{sx:{pr:6},children:[l?.path,c.jsx(P.IconButton,{"aria-label":"close",onClick:()=>u(null),sx:{position:"absolute",right:8,top:8},children:c.jsx(vr,{fontSize:"small"})})]}),c.jsx(P.DialogContent,{children:l?.info?.columns&&c.jsxs(P.Table,{size:"small",children:[c.jsx(P.TableHead,{children:c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{children:"Column"}),c.jsx(P.TableCell,{children:"Type"})]})}),c.jsx(P.TableBody,{children:l.info.columns.map(S=>c.jsxs(P.TableRow,{children:[c.jsx(P.TableCell,{component:"th",scope:"row",children:S.name}),c.jsx(P.TableCell,{children:S.type})]},S.name))})]})})]})]})}function Iu({title:e,count:t,children:n}){return c.jsxs(P.Box,{sx:{mb:4},children:[c.jsxs(P.Stack,{direction:"row",alignItems:"baseline",spacing:1,sx:{mb:1},children:[c.jsx(P.Typography,{variant:"h6",sx:{fontWeight:600,letterSpacing:"-0.025em"},children:e}),c.jsxs(P.Typography,{variant:"caption",color:"text.secondary",children:["(",t,")"]})]}),c.jsx(P.Box,{children:n})]})}function Pu({icon:e,tint:t,label:n,rightLabel:r,onClick:o}){const a=!!o,i=s=>{o&&(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),o(s))};return c.jsxs(P.Box,{onClick:o,onKeyDown:a?i:void 0,role:a?"button":void 0,tabIndex:a?0:void 0,sx:{display:"flex",alignItems:"center",gap:1.5,py:1,px:1,mx:-1,cursor:a?"pointer":"default",borderRadius:1.5,transition:"background-color 0.1s","&:hover":a?{backgroundColor:"grey.100"}:void 0,"&:focus-visible":a?{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}:void 0},children:[c.jsx(P.Box,{sx:{width:32,height:32,borderRadius:1,bgcolor:t,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e}),c.jsx(P.Typography,{variant:"body2",sx:{fontFamily:F2,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),r&&c.jsx(P.Typography,{variant:"caption",color:"text.secondary",sx:{flexShrink:0},children:r})]})}function Ru({label:e}){return c.jsx(P.Typography,{variant:"body2",color:"text.secondary",sx:{py:1,fontStyle:"italic"},children:e})}function X7(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`}const Z7=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 J7({result:e,height:t,onDrill:n,onSizeChange:r}){const o=z.useRef(null),a=z.useRef(!1);return z.useLayoutEffect(()=>{if(!o.current||!e)return;let i=!0;const s=o.current;for(;s.firstChild;)s.removeChild(s.firstChild);a.current=!1;let l=null,u=null;const d=()=>{if(a.current||!i||!s.firstElementChild)return;const h=s.firstElementChild.firstElementChild;if(!h)return;const p=h.firstElementChild;let m=h.scrollHeight||h.offsetHeight||0;p&&h.classList.contains("malloy-dashboard")&&(m=p.scrollHeight||p.offsetHeight||0),m>0&&(a.current=!0,r&&r(m))};return Z7(n).then(f=>{if(i){l=new MutationObserver(()=>{u&&clearTimeout(u),u=setTimeout(()=>{d(),l?.disconnect()},100)}),l.observe(s,{childList:!0,subtree:!0,attributes:!0});try{f.setResult(JSON.parse(e)),f.render(s)}catch(h){console.error("Error rendering visualization:",h),l?.disconnect()}}}).catch(f=>{console.error("Failed to create renderer:",f)}),()=>{i=!1,l?.disconnect(),u&&clearTimeout(u)}},[e,n,r]),c.jsx("div",{ref:o,style:{width:"100%",height:t?`${t}px`:"400px"}})}function Qb(e){return typeof window>"u"?c.jsx(P.Box,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading..."}):c.jsx(z.Suspense,{fallback:c.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:c.jsx(J7,{...e})})}const e9=Object.freeze(Object.defineProperty({__proto__:null,default:Qb},Symbol.toStringTag,{value:"Module"}));function Xb(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function tr(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"?`'${Xb(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function t9(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,a=`\`${t}\``,i=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${a} = ${tr(l,i)}`).join(" or ")})`:Array.isArray(r)?"":`${a} = ${tr(r,i)}`;case"Contains":return typeof r=="string"?`${a} ~ f'%${Xb(r)}%'`:Array.isArray(r)?"":`${a} = ${tr(r)}`;case"After":return Array.isArray(r)?"":`${a} > ${tr(r,i)}`;case"Before":return Array.isArray(r)?"":`${a} < ${tr(r,i)}`;case"Greater Than":return Array.isArray(r)?"":`${a} > ${tr(r)}`;case"Less Than":return Array.isArray(r)?"":`${a} < ${tr(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${a} >= ${tr(r,i)} and ${a} <= ${tr(o,i)}`:`${a} >= ${tr(r,i)}`;default:return""}}function n9(e){if(e.length===0)return"";const t=e.map(n=>t9(n)).filter(n=>n.length>0);return t.length===0?"":t.join(" and ")}function r9(e,t,n,r=1e3){const o=n9(t),i=n&&n.length>0?`group_by: ${n.map(s=>`\`${s}\``).join(", ")}`:"select: *";return o?`
218
+ run: ${e} -> {
219
+ where: ${o}
220
+ ${i}
221
+ limit: ${r}
222
+ }
223
+ `:`
224
+ run: ${e} -> {
225
+ ${i}
226
+ limit: ${r}
227
+ }
228
+ `}function Zb(e){const{environment:t,package:n,model:r,source:o,filterSelections:a,fields:i,limit:s=1e3}=e,[l,u]=z.useState(null),d=z.useMemo(()=>r9(o,a,i,s),[o,a,i,s]),f=z.useMemo(()=>Pi({environmentName:t,packageName:n,modelPath:r}),[t,n,r]),h=a.length>0,p=z.useCallback(()=>{if(!h){u(null);return}const m=Wd({resourceUri:f,query:d});u(m)},[h,f,d]);return{embeddedQueryResult:l,queryString:d,resourceUri:f,executeQuery:p,canExecute:h}}function o9(e,t=5e3){const n=e.dimensionSpecs[0]?.source??"",r=e.dimensionSpecs[0]?.model??"",{filterStates:o,updateFilter:a,clearAllFilters:i,getActiveFilters:s}=Vd({dimensionSpecs:e.dimensionSpecs}),l=z.useMemo(()=>s(),[o,s]),{data:u,noRowsMatchedFilter:d,isLoading:f,isError:h,error:p,refetch:m}=zd({environment:e.environment,package:e.package,indexLimit:e.indexLimit,dimensionSpecs:e.dimensionSpecs,versionId:e.versionId,activeFilters:l}),b=f&&!u,{embeddedQueryResult:y,queryString:x,executeQuery:T,canExecute:C}=Zb({environment:e.environment,package:e.package,model:r,source:n,filterSelections:l,limit:t,fields:e.selectFields});return{filterStates:o,updateFilter:a,clearAllFilters:i,activeFilters:l,data:u,noRowsMatchedFilter:d,isLoading:f,isInitialLoading:b,isError:h,error:p,refetch:m,embeddedQueryResult:y,queryString:x,executeQuery:T,canExecute:C}}function a9({modelPath:e,query:t,sourceName:n,queryName:r,enabled:o=!0,resourceUri:a}){const{environmentName:i,packageName:s,versionId:l}=Nt(a),{apiClients:u}=it.useServer(),{data:d,isSuccess:f,isError:h,error:p,isLoading:m}=Qt({queryKey:["rawQueryData",i,s,e,l,t,n,r],queryFn:()=>u.models.executeQueryModel(i,s,e,{query:t,sourceName:n,queryName:r,versionId:l}),enabled:o});return{data:f&&d?.data?.result?(()=>{try{return JSON.parse(d.data.result).data?.array_value||[]}catch(y){return console.error("Failed to parse query result:",y),[]}})():[],isSuccess:f,isError:h,error:p,isLoading:m}}exports.AnalyzePackageButton=T4;exports.BrowserWorkbookStorage=C4;exports.ConnectionExplorer=Gb;exports.DimensionFilter=Lb;exports.EmbeddedQueryResult=O7;exports.Environment=F8;exports.Home=T7;exports.Loading=pn;exports.Model=D7;exports.ModelExplorer=Hd;exports.ModelExplorerDialog=Ud;exports.Notebook=Yb;exports.Package=Q7;exports.Packages=j1;exports.QueryResult=qb;exports.RenderedResult=Qb;exports.ResultContainer=ha;exports.SourceExplorerComponent=h1;exports.SourcesExplorer=ud;exports.Workbook=x4;exports.WorkbookList=b1;exports.WorkbookManager=Ho;exports.WorkbookStorageProvider=g4;exports.ccount=Gu;exports.createEmbeddedQueryResult=Wd;exports.encodeResourceUri=Pi;exports.extractDimensionSpecs=jb;exports.extractSourceFromQuery=r7;exports.find=Si;exports.generateFilterClause=n7;exports.getDimensionKey=kr;exports.getJoinedSources=e7;exports.html=ia;exports.htmlVoidElements=sg;exports.injectWhereClause=o7;exports.makeDimensionKey=zb;exports.parseAllSourceInfos=Bb;exports.parseDimensionFilterAnnotation=_b;exports.parseNotebookFilterAnnotation=Fb;exports.parseResourceUri=Nt;exports.stringify=al;exports.stringify$1=il;exports.svg=zr;exports.useDimensionFilters=Vd;exports.useDimensionFiltersFromSpec=o9;exports.useDimensionFiltersQuery=Zb;exports.useDimensionalFilterRangeData=zd;exports.useModelData=$d;exports.useRawQueryData=a9;exports.useRouterClickHandler=g1;exports.whitespace=Oc;exports.zwitch=pl;