@simoncomputing/mui-bueno-v2 0.14.7

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 (87) hide show
  1. package/CHANGELOG.md +1206 -0
  2. package/README.md +35 -0
  3. package/dist/@types/index.d.ts +192 -0
  4. package/dist/common/Utils/index.d.ts +65 -0
  5. package/dist/common/WindowDimensions/WindowDimensions.d.ts +26 -0
  6. package/dist/components/Alerts/Alert.d.ts +30 -0
  7. package/dist/components/Alerts/ErrorAlert.d.ts +4 -0
  8. package/dist/components/Alerts/InfoAlert.d.ts +4 -0
  9. package/dist/components/Alerts/SuccessAlert.d.ts +4 -0
  10. package/dist/components/Alerts/WarningAlert.d.ts +4 -0
  11. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +10 -0
  12. package/dist/components/Buttons/Button/Button.d.ts +24 -0
  13. package/dist/components/Buttons/ScrollToTop/ScrollToTop.d.ts +14 -0
  14. package/dist/components/Buttons/Submit/Submit.d.ts +11 -0
  15. package/dist/components/Form/Error/Error.d.ts +23 -0
  16. package/dist/components/Form/FormDebugger/FormDebugger.d.ts +8 -0
  17. package/dist/components/Form/Inputs/Autocomplete/Autocomplete.d.ts +81 -0
  18. package/dist/components/Form/Inputs/Autocomplete/DynamicAutocomplete/DynamicAutocomplete.d.ts +31 -0
  19. package/dist/components/Form/Inputs/Autocomplete/MultiAutocomplete/MultiAutocomplete.d.ts +22 -0
  20. package/dist/components/Form/Inputs/Autocomplete/utils.d.ts +2 -0
  21. package/dist/components/Form/Inputs/Checkbox/Checkbox.d.ts +58 -0
  22. package/dist/components/Form/Inputs/CheckboxGroup/CheckboxGroup.d.ts +107 -0
  23. package/dist/components/Form/Inputs/CitationField/CitationBubbleMenuHandler.d.ts +43 -0
  24. package/dist/components/Form/Inputs/CitationField/CitationField.d.ts +89 -0
  25. package/dist/components/Form/Inputs/CitationField/CitationFieldContext/CitationFieldContext.d.ts +9 -0
  26. package/dist/components/Form/Inputs/CitationField/CitationFieldContext/CitationFieldProvider.d.ts +8 -0
  27. package/dist/components/Form/Inputs/CitationField/CitationMenu/AttachmentForm.d.ts +12 -0
  28. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationBubbleMenu.d.ts +27 -0
  29. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationForm.d.ts +11 -0
  30. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationMenu.d.ts +78 -0
  31. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationTable.d.ts +21 -0
  32. package/dist/components/Form/Inputs/CitationField/CitationNode.d.ts +2 -0
  33. package/dist/components/Form/Inputs/CitationField/CitationNodeComponent.d.ts +7 -0
  34. package/dist/components/Form/Inputs/CitationField/CitationRefreshContext/CitationRefreshContext.d.ts +29 -0
  35. package/dist/components/Form/Inputs/CitationField/MenuButtonEditCitation.d.ts +3 -0
  36. package/dist/components/Form/Inputs/DateField/DateField.d.ts +73 -0
  37. package/dist/components/Form/Inputs/DateField/DateRangeField/DateRangeField.d.ts +62 -0
  38. package/dist/components/Form/Inputs/DateField/dayjs-utils.d.ts +2 -0
  39. package/dist/components/Form/Inputs/FileUpload/FileList/FileList.d.ts +13 -0
  40. package/dist/components/Form/Inputs/FileUpload/FileUpload.d.ts +62 -0
  41. package/dist/components/Form/Inputs/Location/Location.d.ts +69 -0
  42. package/dist/components/Form/Inputs/Location/Location.types.d.ts +85 -0
  43. package/dist/components/Form/Inputs/Location/LocationOption.d.ts +38 -0
  44. package/dist/components/Form/Inputs/RadioGroup/RadioGroup.d.ts +119 -0
  45. package/dist/components/Form/Inputs/RangeSlider/RangeSlider.d.ts +34 -0
  46. package/dist/components/Form/Inputs/RichTextField/RichTextControls.d.ts +6 -0
  47. package/dist/components/Form/Inputs/RichTextField/RichTextField.d.ts +56 -0
  48. package/dist/components/Form/Inputs/RichTextField/SuggestionList.d.ts +8 -0
  49. package/dist/components/Form/Inputs/RichTextField/mentionSuggestionOptions.d.ts +6 -0
  50. package/dist/components/Form/Inputs/RichTextField/useExtensions.d.ts +10 -0
  51. package/dist/components/Form/Inputs/SearchField/SearchField.d.ts +16 -0
  52. package/dist/components/Form/Inputs/Select/Select.d.ts +91 -0
  53. package/dist/components/Form/Inputs/Switch/Switch.d.ts +61 -0
  54. package/dist/components/Form/Inputs/TextField/TextField.d.ts +60 -0
  55. package/dist/components/Form/RepeatableFormGroup/RepeatableFormGroup.d.ts +89 -0
  56. package/dist/components/Form/Stepper/Stepper.d.ts +27 -0
  57. package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +22 -0
  58. package/dist/components/Modals/AlertModal/AlertModal.d.ts +11 -0
  59. package/dist/components/Modals/ConfirmationModal/ConfirmationModal.d.ts +26 -0
  60. package/dist/components/Modals/DecisionModal/DecisionModal.d.ts +37 -0
  61. package/dist/components/Modals/Modal.d.ts +45 -0
  62. package/dist/components/Navigation/Footer/Footer.d.ts +31 -0
  63. package/dist/components/Navigation/Header/DarkModeToggle/DarkModeToggle.d.ts +13 -0
  64. package/dist/components/Navigation/Header/Drawer.d.ts +18 -0
  65. package/dist/components/Navigation/Header/EnvironmentBanner.d.ts +4 -0
  66. package/dist/components/Navigation/Header/Header.d.ts +63 -0
  67. package/dist/components/Navigation/Header/ProfileMenu.d.ts +8 -0
  68. package/dist/components/Navigation/MenuButton/MenuButton.d.ts +9 -0
  69. package/dist/components/Navigation/NavBar/FloatingNavBar/FloatingNavBar.d.ts +24 -0
  70. package/dist/components/Navigation/NavBar/NavBar.d.ts +24 -0
  71. package/dist/components/Navigation/Sidebar/Sidebar.d.ts +14 -0
  72. package/dist/components/Navigation/Tabs/Tabs.d.ts +19 -0
  73. package/dist/components/PageHeader/PageHeader.d.ts +27 -0
  74. package/dist/components/SingleActionCard/SingleActionCard.d.ts +26 -0
  75. package/dist/components/Snackbar/Snackbar.d.ts +28 -0
  76. package/dist/components/Table/ExpandableRow/ExpandableRow.d.ts +16 -0
  77. package/dist/components/Table/PaginatedTable.d.ts +44 -0
  78. package/dist/components/Table/Table.d.ts +129 -0
  79. package/dist/index.cjs.js +402 -0
  80. package/dist/index.css +1 -0
  81. package/dist/index.d.ts +105 -0
  82. package/dist/index.es.js +60187 -0
  83. package/dist/index.umd.js +403 -0
  84. package/dist/styles/3-theme/ThemeDemo.d.ts +3 -0
  85. package/dist/styles/3-theme/theme.d.ts +8 -0
  86. package/dist/styles/theme.d.ts +33 -0
  87. package/package.json +138 -0
@@ -0,0 +1,403 @@
1
+ (function(Ne,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react/jsx-runtime"),require("react"),require("@mui/material"),require("formik"),require("react-router-dom"),require("@emotion/styled"),require("@emotion/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@mui/material","formik","react-router-dom","@emotion/styled","@emotion/react","react-dom"],v):(Ne=typeof globalThis<"u"?globalThis:Ne||self,v(Ne["mui-bueno-v2"]={},Ne["react/jsx-runtime"],Ne.React,Ne.MaterialUI,Ne.Formik,Ne.ReactRouterDom,Ne.EmotionStyled,Ne.EmotionReact,Ne.ReactDom))})(this,function(Ne,v,J,F,Ht,Xr,t$,Qr,is){"use strict";var zce=Object.defineProperty;var Hce=(Ne,v,J)=>v in Ne?zce(Ne,v,{enumerable:!0,configurable:!0,writable:!0,value:J}):Ne[v]=J;var vu=(Ne,v,J)=>Hce(Ne,typeof v!="symbol"?v+"":v,J);var $x=document.createElement("style");$x.textContent=`.sort-icon-asc{-moz-transform:scale(1,-1);-o-transform:scale(1,-1);-webkit-transform:scale(1,-1);transform:scaleY(-1)}.loading-page{width:100%;height:80%;display:flex;flex-direction:column;align-items:center;justify-content:center}.loading-page .text-content{display:flex;flex-direction:column}.citation-link,.selected-citation-link{vertical-align:super;font-size:smaller;padding:0 4px}.selected-citation-link{background-color:#e6e6e6}.citation-link:hover,.selected-citation-link:hover{cursor:pointer}.MuiTiptap-ControlledBubbleMenu-root{z-index:1300!important}
2
+ /*$vite$:1*/`,document.head.appendChild($x);function Fx(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const _=Fx(J),n$=Fx(is),r$=["w","xs","sm","md","lg","xl","alignment","justify","noMP","noGrid","gridClassName","gridStyle"],Rx=t=>t>47&&t<58,Bx=t=>t>64&&t<123&&(t<91||t>96),o$=(t,e,n,r)=>{let o="",i=0,s=0,a=0,l=0;const u=r.selectionStart;let f=!1;if(t.length<=e.length){for(let T=0;T<t.length&&T<e.length;T++){for(;i<e.length&&e[i]!=="X"&&e[i]!=="9";)a++,s++,i++;(Rx(t.charCodeAt(T))&&e[i]==="9"||Bx(t.charCodeAt(T))&&e[i]==="X")&&(a>0&&(l=a,a=0),o+=t[T],i++)}const h=Rx(t.charCodeAt(u-1))?"number":Bx(t.charCodeAt(u-1))?"letter":"something else",m=h!=="number"&&e[u-1]==="9",g=h!=="letter"&&e[u-1]==="X";(m||g||h==="something else")&&(f=!0);let y="",S=0;Math.abs(n.length-t.length)<=1&&(s=0);let C=u+s;for(let T=0;T<o.length;T++){for(;S<e.length&&e[S]!=="X"&&e[S]!=="9";)y+=e[S],S++;y+=o[T],S++}t.length<n.length?window.requestAnimationFrame(()=>{r.selectionStart=C,r.selectionEnd=C}):e[C-1]!=="X"&&e[C-1]!=="9"?window.requestAnimationFrame(()=>{r.selectionStart=C+l,r.selectionEnd=C+l}):(f&&(C-=1),window.requestAnimationFrame(()=>{r.selectionStart=C,r.selectionEnd=C}));const E=e.slice(S);return E.indexOf("X")===-1&&E.indexOf("9")===-1&&(y+=E),y}return window.requestAnimationFrame(()=>{r.selectionStart=u-1,r.selectionEnd=u-1}),n};function Yn(t,e){const r=Object.keys(t).filter(i=>e.includes(i)),o={...t};for(const i of r$)delete o[i];for(const i of r)delete o[i];return o}const Cn=t=>t.split(/(?=[A-Z])|[.\-_\s]+/).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).filter(Boolean).join(" ");function i$(t,e,n=!1,r=""){let o="";if(e==null||e.length==0)return r;if(n){let i="";const s=e.toString().split(",");let a=0;t.forEach(l=>{s.includes(String(l.value).toString())&&(i+=l.label,a<s.length-1&&(i+=", "),a++)}),o=i}else{const i=t.find(s=>e==s.value);i!=null&&(o=i.label)}return o}function gl(t,e,n){return t.onClick?{onClick:()=>{t.onClick(),t.path&&e(t.path),t.externalLink&&window.open(t.externalLink,"_blank","noopener"),n&&n()}}:t.path?{component:Xr.Link,to:t.path}:t.externalLink?{href:t.externalLink}:{}}function Fo(t,e){return process.env.NODE_ENV==="production"?()=>null:function(...r){return t(...r)||e(...r)}}var hi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xu={exports:{}},At={};/**
3
+ * @license React
4
+ * react-is.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var Vx;function s$(){if(Vx)return At;Vx=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=Symbol.for("react.client.reference");function b(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case t:switch(y=y.type,y){case n:case o:case r:case l:case u:return y;default:switch(y=y&&y.$$typeof,y){case s:case a:case h:case f:return y;case i:return y;default:return S}}case e:return S}}}return At.ContextConsumer=i,At.ContextProvider=s,At.Element=t,At.ForwardRef=a,At.Fragment=n,At.Lazy=h,At.Memo=f,At.Portal=e,At.Profiler=o,At.StrictMode=r,At.Suspense=l,At.SuspenseList=u,At.isContextConsumer=function(y){return b(y)===i},At.isContextProvider=function(y){return b(y)===s},At.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},At.isForwardRef=function(y){return b(y)===a},At.isFragment=function(y){return b(y)===n},At.isLazy=function(y){return b(y)===h},At.isMemo=function(y){return b(y)===f},At.isPortal=function(y){return b(y)===e},At.isProfiler=function(y){return b(y)===o},At.isStrictMode=function(y){return b(y)===r},At.isSuspense=function(y){return b(y)===l},At.isSuspenseList=function(y){return b(y)===u},At.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===o||y===r||y===l||y===u||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===f||y.$$typeof===s||y.$$typeof===i||y.$$typeof===a||y.$$typeof===g||y.getModuleId!==void 0)},At.typeOf=b,At}var It={};/**
11
+ * @license React
12
+ * react-is.development.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var zx;function a$(){return zx||(zx=1,process.env.NODE_ENV!=="production"&&function(){function t(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case e:switch(y=y.type,y){case r:case i:case o:case u:case f:return y;default:switch(y=y&&y.$$typeof,y){case a:case l:case m:case h:return y;case s:return y;default:return S}}case n:return S}}}var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),b=Symbol.for("react.client.reference");It.ContextConsumer=s,It.ContextProvider=a,It.Element=e,It.ForwardRef=l,It.Fragment=r,It.Lazy=m,It.Memo=h,It.Portal=n,It.Profiler=i,It.StrictMode=o,It.Suspense=u,It.SuspenseList=f,It.isContextConsumer=function(y){return t(y)===s},It.isContextProvider=function(y){return t(y)===a},It.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},It.isForwardRef=function(y){return t(y)===l},It.isFragment=function(y){return t(y)===r},It.isLazy=function(y){return t(y)===m},It.isMemo=function(y){return t(y)===h},It.isPortal=function(y){return t(y)===n},It.isProfiler=function(y){return t(y)===i},It.isStrictMode=function(y){return t(y)===o},It.isSuspense=function(y){return t(y)===u},It.isSuspenseList=function(y){return t(y)===f},It.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===i||y===o||y===u||y===f||y===g||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===h||y.$$typeof===a||y.$$typeof===s||y.$$typeof===l||y.$$typeof===b||y.getModuleId!==void 0)},It.typeOf=t}()),It}var Hx;function l$(){return Hx||(Hx=1,process.env.NODE_ENV==="production"?xu.exports=s$():xu.exports=a$()),xu.exports}var ss=l$();function mo(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function jx(t){if(_.isValidElement(t)||ss.isValidElementType(t)||!mo(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=jx(t[n])}),e}function Rn(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return mo(t)&&mo(e)&&Object.keys(e).forEach(o=>{_.isValidElement(e[o])||ss.isValidElementType(e[o])?r[o]=e[o]:mo(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&mo(t[o])?r[o]=Rn(t[o],e[o],n):n.clone?r[o]=mo(e[o])?jx(e[o]):e[o]:r[o]=e[o]}),r}var Su={exports:{}},Cu={exports:{}},Tt={};/** @license React v16.13.1
19
+ * react-is.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Wx;function c$(){if(Wx)return Tt;Wx=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,S=t?Symbol.for("react.fundamental"):60117,C=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function T(O){if(typeof O=="object"&&O!==null){var A=O.$$typeof;switch(A){case e:switch(O=O.type,O){case l:case u:case r:case i:case o:case h:return O;default:switch(O=O&&O.$$typeof,O){case a:case f:case b:case g:case s:return O;default:return A}}case n:return A}}}function w(O){return T(O)===u}return Tt.AsyncMode=l,Tt.ConcurrentMode=u,Tt.ContextConsumer=a,Tt.ContextProvider=s,Tt.Element=e,Tt.ForwardRef=f,Tt.Fragment=r,Tt.Lazy=b,Tt.Memo=g,Tt.Portal=n,Tt.Profiler=i,Tt.StrictMode=o,Tt.Suspense=h,Tt.isAsyncMode=function(O){return w(O)||T(O)===l},Tt.isConcurrentMode=w,Tt.isContextConsumer=function(O){return T(O)===a},Tt.isContextProvider=function(O){return T(O)===s},Tt.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===e},Tt.isForwardRef=function(O){return T(O)===f},Tt.isFragment=function(O){return T(O)===r},Tt.isLazy=function(O){return T(O)===b},Tt.isMemo=function(O){return T(O)===g},Tt.isPortal=function(O){return T(O)===n},Tt.isProfiler=function(O){return T(O)===i},Tt.isStrictMode=function(O){return T(O)===o},Tt.isSuspense=function(O){return T(O)===h},Tt.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===r||O===u||O===i||O===o||O===h||O===m||typeof O=="object"&&O!==null&&(O.$$typeof===b||O.$$typeof===g||O.$$typeof===s||O.$$typeof===a||O.$$typeof===f||O.$$typeof===S||O.$$typeof===C||O.$$typeof===E||O.$$typeof===y)},Tt.typeOf=T,Tt}var Et={};/** @license React v16.13.1
26
+ * react-is.development.js
27
+ *
28
+ * Copyright (c) Facebook, Inc. and its affiliates.
29
+ *
30
+ * This source code is licensed under the MIT license found in the
31
+ * LICENSE file in the root directory of this source tree.
32
+ */var qx;function u$(){return qx||(qx=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,S=t?Symbol.for("react.fundamental"):60117,C=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function T(ee){return typeof ee=="string"||typeof ee=="function"||ee===r||ee===u||ee===i||ee===o||ee===h||ee===m||typeof ee=="object"&&ee!==null&&(ee.$$typeof===b||ee.$$typeof===g||ee.$$typeof===s||ee.$$typeof===a||ee.$$typeof===f||ee.$$typeof===S||ee.$$typeof===C||ee.$$typeof===E||ee.$$typeof===y)}function w(ee){if(typeof ee=="object"&&ee!==null){var se=ee.$$typeof;switch(se){case e:var le=ee.type;switch(le){case l:case u:case r:case i:case o:case h:return le;default:var ge=le&&le.$$typeof;switch(ge){case a:case f:case b:case g:case s:return ge;default:return se}}case n:return se}}}var O=l,A=u,N=a,D=s,L=e,k=f,I=r,$=b,H=g,z=n,R=i,B=o,W=h,U=!1;function G(ee){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Y(ee)||w(ee)===l}function Y(ee){return w(ee)===u}function Z(ee){return w(ee)===a}function me(ee){return w(ee)===s}function fe(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===e}function pe(ee){return w(ee)===f}function re(ee){return w(ee)===r}function ue(ee){return w(ee)===b}function ae(ee){return w(ee)===g}function K(ee){return w(ee)===n}function Q(ee){return w(ee)===i}function ie(ee){return w(ee)===o}function he(ee){return w(ee)===h}Et.AsyncMode=O,Et.ConcurrentMode=A,Et.ContextConsumer=N,Et.ContextProvider=D,Et.Element=L,Et.ForwardRef=k,Et.Fragment=I,Et.Lazy=$,Et.Memo=H,Et.Portal=z,Et.Profiler=R,Et.StrictMode=B,Et.Suspense=W,Et.isAsyncMode=G,Et.isConcurrentMode=Y,Et.isContextConsumer=Z,Et.isContextProvider=me,Et.isElement=fe,Et.isForwardRef=pe,Et.isFragment=re,Et.isLazy=ue,Et.isMemo=ae,Et.isPortal=K,Et.isProfiler=Q,Et.isStrictMode=ie,Et.isSuspense=he,Et.isValidElementType=T,Et.typeOf=w}()),Et}var Ux;function Kx(){return Ux||(Ux=1,process.env.NODE_ENV==="production"?Cu.exports=c$():Cu.exports=u$()),Cu.exports}/*
33
+ object-assign
34
+ (c) Sindre Sorhus
35
+ @license MIT
36
+ */var yh,Yx;function d$(){if(Yx)return yh;Yx=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return yh=o()?Object.assign:function(i,s){for(var a,l=r(i),u,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var h in a)e.call(a,h)&&(l[h]=a[h]);if(t){u=t(a);for(var m=0;m<u.length;m++)n.call(a,u[m])&&(l[u[m]]=a[u[m]])}}return l},yh}var bh,Gx;function vh(){if(Gx)return bh;Gx=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return bh=t,bh}var xh,Jx;function Zx(){return Jx||(Jx=1,xh=Function.call.bind(Object.prototype.hasOwnProperty)),xh}var Sh,Xx;function f$(){if(Xx)return Sh;Xx=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=vh(),n={},r=Zx();t=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,u){if(process.env.NODE_ENV!=="production"){for(var f in i)if(r(i,f)){var h;try{if(typeof i[f]!="function"){var m=Error((l||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}h=i[f](s,f,l,a,null,e)}catch(b){h=b}if(h&&!(h instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=u?u():"";t("Failed "+a+" type: "+h.message+(g??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Sh=o,Sh}var Ch,Qx;function p$(){if(Qx)return Ch;Qx=1;var t=Kx(),e=d$(),n=vh(),r=Zx(),o=f$(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Ch=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(Y){var Z=Y&&(u&&Y[u]||Y[f]);if(typeof Z=="function")return Z}var m="<<anonymous>>",g={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:E(),arrayOf:T,element:w(),elementType:O(),instanceOf:A,node:k(),objectOf:D,oneOf:N,oneOfType:L,shape:$,exact:H};function b(Y,Z){return Y===Z?Y!==0||1/Y===1/Z:Y!==Y&&Z!==Z}function y(Y,Z){this.message=Y,this.data=Z&&typeof Z=="object"?Z:{},this.stack=""}y.prototype=Error.prototype;function S(Y){if(process.env.NODE_ENV!=="production")var Z={},me=0;function fe(re,ue,ae,K,Q,ie,he){if(K=K||m,ie=ie||ae,he!==n){if(l){var ee=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 ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=K+":"+ae;!Z[se]&&me<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+K+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Z[se]=!0,me++)}}return ue[ae]==null?re?ue[ae]===null?new y("The "+Q+" `"+ie+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new y("The "+Q+" `"+ie+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:Y(ue,ae,K,Q,ie)}var pe=fe.bind(null,!1);return pe.isRequired=fe.bind(null,!0),pe}function C(Y){function Z(me,fe,pe,re,ue,ae){var K=me[fe],Q=B(K);if(Q!==Y){var ie=W(K);return new y("Invalid "+re+" `"+ue+"` of type "+("`"+ie+"` supplied to `"+pe+"`, expected ")+("`"+Y+"`."),{expectedType:Y})}return null}return S(Z)}function E(){return S(s)}function T(Y){function Z(me,fe,pe,re,ue){if(typeof Y!="function")return new y("Property `"+ue+"` of component `"+pe+"` has invalid PropType notation inside arrayOf.");var ae=me[fe];if(!Array.isArray(ae)){var K=B(ae);return new y("Invalid "+re+" `"+ue+"` of type "+("`"+K+"` supplied to `"+pe+"`, expected an array."))}for(var Q=0;Q<ae.length;Q++){var ie=Y(ae,Q,pe,re,ue+"["+Q+"]",n);if(ie instanceof Error)return ie}return null}return S(Z)}function w(){function Y(Z,me,fe,pe,re){var ue=Z[me];if(!a(ue)){var ae=B(ue);return new y("Invalid "+pe+" `"+re+"` of type "+("`"+ae+"` supplied to `"+fe+"`, expected a single ReactElement."))}return null}return S(Y)}function O(){function Y(Z,me,fe,pe,re){var ue=Z[me];if(!t.isValidElementType(ue)){var ae=B(ue);return new y("Invalid "+pe+" `"+re+"` of type "+("`"+ae+"` supplied to `"+fe+"`, expected a single ReactElement type."))}return null}return S(Y)}function A(Y){function Z(me,fe,pe,re,ue){if(!(me[fe]instanceof Y)){var ae=Y.name||m,K=G(me[fe]);return new y("Invalid "+re+" `"+ue+"` of type "+("`"+K+"` supplied to `"+pe+"`, expected ")+("instance of `"+ae+"`."))}return null}return S(Z)}function N(Y){if(!Array.isArray(Y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function Z(me,fe,pe,re,ue){for(var ae=me[fe],K=0;K<Y.length;K++)if(b(ae,Y[K]))return null;var Q=JSON.stringify(Y,function(he,ee){var se=W(ee);return se==="symbol"?String(ee):ee});return new y("Invalid "+re+" `"+ue+"` of value `"+String(ae)+"` "+("supplied to `"+pe+"`, expected one of "+Q+"."))}return S(Z)}function D(Y){function Z(me,fe,pe,re,ue){if(typeof Y!="function")return new y("Property `"+ue+"` of component `"+pe+"` has invalid PropType notation inside objectOf.");var ae=me[fe],K=B(ae);if(K!=="object")return new y("Invalid "+re+" `"+ue+"` of type "+("`"+K+"` supplied to `"+pe+"`, expected an object."));for(var Q in ae)if(r(ae,Q)){var ie=Y(ae,Q,pe,re,ue+"."+Q,n);if(ie instanceof Error)return ie}return null}return S(Z)}function L(Y){if(!Array.isArray(Y))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var Z=0;Z<Y.length;Z++){var me=Y[Z];if(typeof me!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(me)+" at index "+Z+"."),s}function fe(pe,re,ue,ae,K){for(var Q=[],ie=0;ie<Y.length;ie++){var he=Y[ie],ee=he(pe,re,ue,ae,K,n);if(ee==null)return null;ee.data&&r(ee.data,"expectedType")&&Q.push(ee.data.expectedType)}var se=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new y("Invalid "+ae+" `"+K+"` supplied to "+("`"+ue+"`"+se+"."))}return S(fe)}function k(){function Y(Z,me,fe,pe,re){return z(Z[me])?null:new y("Invalid "+pe+" `"+re+"` supplied to "+("`"+fe+"`, expected a ReactNode."))}return S(Y)}function I(Y,Z,me,fe,pe){return new y((Y||"React class")+": "+Z+" type `"+me+"."+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+pe+"`.")}function $(Y){function Z(me,fe,pe,re,ue){var ae=me[fe],K=B(ae);if(K!=="object")return new y("Invalid "+re+" `"+ue+"` of type `"+K+"` "+("supplied to `"+pe+"`, expected `object`."));for(var Q in Y){var ie=Y[Q];if(typeof ie!="function")return I(pe,re,ue,Q,W(ie));var he=ie(ae,Q,pe,re,ue+"."+Q,n);if(he)return he}return null}return S(Z)}function H(Y){function Z(me,fe,pe,re,ue){var ae=me[fe],K=B(ae);if(K!=="object")return new y("Invalid "+re+" `"+ue+"` of type `"+K+"` "+("supplied to `"+pe+"`, expected `object`."));var Q=e({},me[fe],Y);for(var ie in Q){var he=Y[ie];if(r(Y,ie)&&typeof he!="function")return I(pe,re,ue,ie,W(he));if(!he)return new y("Invalid "+re+" `"+ue+"` key `"+ie+"` supplied to `"+pe+"`.\nBad object: "+JSON.stringify(me[fe],null," ")+`
37
+ Valid keys: `+JSON.stringify(Object.keys(Y),null," "));var ee=he(ae,ie,pe,re,ue+"."+ie,n);if(ee)return ee}return null}return S(Z)}function z(Y){switch(typeof Y){case"number":case"string":case"undefined":return!0;case"boolean":return!Y;case"object":if(Array.isArray(Y))return Y.every(z);if(Y===null||a(Y))return!0;var Z=h(Y);if(Z){var me=Z.call(Y),fe;if(Z!==Y.entries){for(;!(fe=me.next()).done;)if(!z(fe.value))return!1}else for(;!(fe=me.next()).done;){var pe=fe.value;if(pe&&!z(pe[1]))return!1}}else return!1;return!0;default:return!1}}function R(Y,Z){return Y==="symbol"?!0:Z?Z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Z instanceof Symbol:!1}function B(Y){var Z=typeof Y;return Array.isArray(Y)?"array":Y instanceof RegExp?"object":R(Z,Y)?"symbol":Z}function W(Y){if(typeof Y>"u"||Y===null)return""+Y;var Z=B(Y);if(Z==="object"){if(Y instanceof Date)return"date";if(Y instanceof RegExp)return"regexp"}return Z}function U(Y){var Z=W(Y);switch(Z){case"array":case"object":return"an "+Z;case"boolean":case"date":case"regexp":return"a "+Z;default:return Z}}function G(Y){return!Y.constructor||!Y.constructor.name?m:Y.constructor.name}return g.checkPropTypes=o,g.resetWarningCache=o.resetWarningCache,g.PropTypes=g,g},Ch}var wh,eS;function h$(){if(eS)return wh;eS=1;var t=vh();function e(){}function n(){}return n.resetWarningCache=e,wh=function(){function r(s,a,l,u,f,h){if(h!==t){var m=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 m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},wh}var tS;function m$(){if(tS)return Su.exports;if(tS=1,process.env.NODE_ENV!=="production"){var t=Kx(),e=!0;Su.exports=p$()(t.isElement,e)}else Su.exports=h$()();return Su.exports}var g$=m$();const c=Gn(g$);function y$(t){const{prototype:e={}}=t;return!!e.isReactComponent}function nS(t,e,n,r,o){const i=t[e],s=o||e;if(i==null||typeof window>"u")return null;let a;const l=i.type;return typeof l=="function"&&!y$(l)&&(a="Did you accidentally use a plain function component for an element instead?"),a!==void 0?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const yl=Fo(c.element,nS);yl.isRequired=Fo(c.element.isRequired,nS);function b$(t){const{prototype:e={}}=t;return!!e.isReactComponent}function v$(t,e,n,r,o){const i=t[e],s=o||e;if(i==null||typeof window>"u")return null;let a;return typeof i=="function"&&!b$(i)&&(a="Did you accidentally provide a plain function component instead?"),a!==void 0?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const wu=Fo(c.elementType,v$),x$="exact-prop: ​";function rS(t){return process.env.NODE_ENV==="production"?t:{...t,[x$]:e=>{const n=Object.keys(e).filter(r=>!t.hasOwnProperty(r));return n.length>0?new Error(`The following props are not supported: ${n.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}}}function go(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${t}; visit ${n} for the full message.`}function oS(t,e=""){return t.displayName||t.name||e}function iS(t,e,n){const r=oS(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function S$(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return oS(t,"Component");if(typeof t=="object")switch(t.$$typeof){case ss.ForwardRef:return iS(t,t.render,"ForwardRef");case ss.Memo:return iS(t,t.type,"memo");default:return}}}function Ro(t,e,n,r,o){if(process.env.NODE_ENV==="production")return null;const i=t[e],s=o||e;return i==null?null:i&&i.nodeType!==1?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}const hn=c.oneOfType([c.func,c.object]);function Ae(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":go(7));return t.charAt(0).toUpperCase()+t.slice(1)}function sS(...t){return t.reduce((e,n)=>n==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function aS(t,e=166){let n;function r(...o){const i=()=>{t.apply(this,o)};clearTimeout(n),n=setTimeout(i,e)}return r.clear=()=>{clearTimeout(n)},r}function bl(t,e){var n,r,o;return _.isValidElement(t)&&e.indexOf(t.type.muiName??((o=(r=(n=t.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function Bn(t){return t&&t.ownerDocument||document}function Bo(t){return Bn(t).defaultView||window}function Th(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const wn=typeof window<"u"?_.useLayoutEffect:_.useEffect;let lS=0;function C$(t){const[e,n]=_.useState(t),r=t||e;return _.useEffect(()=>{e==null&&(lS+=1,n(`mui-${lS}`))},[e]),r}const cS={..._}.useId;function yo(t){if(cS!==void 0){const e=cS();return t??e}return C$(t)}function w$(t,e,n,r,o){if(process.env.NODE_ENV==="production")return null;const i=o||e;return typeof t[e]<"u"?new Error(`The prop \`${i}\` is not supported. Please remove it.`):null}function Vo({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=_.useRef(t!==void 0),[i,s]=_.useState(e),a=o?t:i;if(process.env.NODE_ENV!=="production"){_.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
38
+ `))},[r,n,t]);const{current:u}=_.useRef(e);_.useEffect(()=>{!o&&!Object.is(u,e)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
39
+ `))},[JSON.stringify(e)])}const l=_.useCallback(u=>{o||s(u)},[]);return[a,l]}function Fe(t){const e=_.useRef(t);return wn(()=>{e.current=t}),_.useRef((...n)=>(0,e.current)(...n)).current}function Mt(...t){return _.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{Th(n,e)})},t)}const uS={};function dS(t,e){const n=_.useRef(uS);return n.current===uS&&(n.current=t(e)),n}const T$=[];function E$(t){_.useEffect(t,T$)}class Eh{constructor(){vu(this,"currentId",null);vu(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});vu(this,"disposeEffect",()=>this.clear)}static create(){return new Eh}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function fS(){const t=dS(Eh.create).current;return E$(t.disposeEffect),t}function pS(t){try{return t.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
40
+ `))}return!1}function hS(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}const M$={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function O$(t){const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":Number.isFinite(t)?t!==Math.floor(t)?"float":"number":"Infinity";case"object":return t===null?"null":t.constructor.name;default:return e}}function mS(t,e,n,r){const o=t[e];if(o==null||!Number.isInteger(o)){const i=O$(o);return new RangeError(`Invalid ${r} \`${e}\` of type \`${i}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function gS(t,e,...n){return t[e]===void 0?null:mS(t,e,...n)}function Mh(){return null}gS.isRequired=mS,Mh.isRequired=Mh;const yS=process.env.NODE_ENV==="production"?Mh:gS;function vl(t,e){const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const o=r;if(o==="components"||o==="slots")n[o]={...t[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=t[o],s=e[o];if(!s)n[o]=i||{};else if(!i)n[o]=s;else{n[o]={...s};for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=a;n[o][l]=vl(i[l],s[l])}}}else n[o]===void 0&&(n[o]=t[o])}return n}function qe(t,e,n=void 0){const r={};for(const o in t){const i=t[o];let s="",a=!0;for(let l=0;l<i.length;l+=1){const u=i[l];u&&(s+=(a===!0?"":" ")+e(u),a=!1,n&&n[u]&&(s+=" "+n[u]))}r[o]=s}return r}const bS=t=>t,k$=(()=>{let t=bS;return{configure(e){t=e},generate(e){return t(e)},reset(){t=bS}}})(),A$={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 Ue(t,e,n="Mui"){const r=A$[e];return r?`${n}-${r}`:`${k$.generate(t)}-${e}`}function We(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=Ue(t,o,n)}),r}function I$(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function D$(t){return typeof t=="string"}function vS(t,e,n){return t===void 0||D$(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function xS(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=xS(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function _e(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=xS(t))&&(r&&(r+=" "),r+=e);return r}function SS(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function CS(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function wS(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const g=_e(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),b={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},y={...n,...o,...r};return g.length>0&&(y.className=g),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const s=SS({...o,...r}),a=CS(r),l=CS(o),u=e(s),f=_e(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),h={...u==null?void 0:u.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},m={...u,...n,...l,...a};return f.length>0&&(m.className=f),Object.keys(h).length>0&&(m.style=h),{props:m,internalRef:u.ref}}function Tu(t,e,n){return typeof t=="function"?t(e,n):t}function Ct(t){var h;const{elementType:e,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=t,s=o?{}:Tu(n,r),{props:a,internalRef:l}=wS({...i,externalSlotProps:s}),u=Mt(l,s==null?void 0:s.ref,(h=t.additionalProps)==null?void 0:h.ref);return vS(e,{...a,ref:u},r)}function xl(t){var e;return parseInt(_.version,10)>=19?((e=t==null?void 0:t.props)==null?void 0:e.ref)||null:(t==null?void 0:t.ref)||null}function Sl(t,e){return e?Rn(t,e,{clone:!1}):t}const mi=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.string,c.object,c.array]):{};function P$(t,e){if(!t.containerQueries)return e;const n=Object.keys(e).filter(r=>r.startsWith("@container")).sort((r,o)=>{var s,a;const i=/min-width:\s*([0-9.]+)/;return+(((s=r.match(i))==null?void 0:s[1])||0)-+(((a=o.match(i))==null?void 0:a[1])||0)});return n.length?n.reduce((r,o)=>{const i=e[o];return delete r[o],r[o]=i,r},{...e}):e}function _$(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function N$(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
41
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:go(18,`(${e})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(i)}function L$(t){const e=(i,s)=>i.replace("@media",s?`@container ${s}`:"@container");function n(i,s){i.up=(...a)=>e(t.breakpoints.up(...a),s),i.down=(...a)=>e(t.breakpoints.down(...a),s),i.between=(...a)=>e(t.breakpoints.between(...a),s),i.only=(...a)=>e(t.breakpoints.only(...a),s),i.not=(...a)=>{const l=e(t.breakpoints.not(...a),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...t,containerQueries:o}}const Eu={xs:0,sm:600,md:900,lg:1200,xl:1536},TS={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${Eu[t]}px)`},$$={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:Eu[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function zo(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||TS;return e.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const i=r.breakpoints||TS;return Object.keys(e).reduce((s,a)=>{if(_$(i.keys,a)){const l=N$(r.containerQueries?r:$$,a);l&&(s[l]=n(e[a],a))}else if(Object.keys(i.values||Eu).includes(a)){const l=i.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function F$(t={}){var n;return((n=t.keys)==null?void 0:n.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function R$(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function Mu(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function Ou(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=Mu(t,n)||r,e&&(o=e(o,r,t)),o}function dn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,i=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,u=Mu(l,r)||{};return zo(s,a,h=>{let m=Ou(u,o,h);return h===m&&typeof h=="string"&&(m=Ou(u,o,`${e}${h==="default"?"":Ae(h)}`,h)),n===!1?m:{[n]:m}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:mi}:{},i.filterProps=[e],i}function B$(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const V$={m:"margin",p:"padding"},z$={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ES={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},H$=B$(t=>{if(t.length>2)if(ES[t])t=ES[t];else return[t];const[e,n]=t.split(""),r=V$[e],o=z$[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),ku=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Au=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],j$=[...ku,...Au];function Cl(t,e,n,r){const o=Mu(t,e,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),typeof o=="string"?`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const s=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
42
+ `)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
43
+ `)));const a=o[s];return i>=0?a:typeof a=="number"?-a:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
44
+ `)),()=>{})}function Oh(t){return Cl(t,"spacing",8,"spacing")}function wl(t,e){return typeof e=="string"||e==null?e:t(e)}function W$(t,e){return n=>t.reduce((r,o)=>(r[o]=wl(e,n),r),{})}function q$(t,e,n,r){if(!e.includes(n))return null;const o=H$(n),i=W$(o,r),s=t[n];return zo(t,s,i)}function MS(t,e){const n=Oh(t.theme);return Object.keys(t).map(r=>q$(t,e,r,n)).reduce(Sl,{})}function nn(t){return MS(t,ku)}nn.propTypes=process.env.NODE_ENV!=="production"?ku.reduce((t,e)=>(t[e]=mi,t),{}):{},nn.filterProps=ku;function rn(t){return MS(t,Au)}rn.propTypes=process.env.NODE_ENV!=="production"?Au.reduce((t,e)=>(t[e]=mi,t),{}):{},rn.filterProps=Au,process.env.NODE_ENV!=="production"&&j$.reduce((t,e)=>(t[e]=mi,t),{});function Iu(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>e[i]?Sl(o,e[i](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?t.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Ar(t){return typeof t!="number"?t:`${t}px solid`}function Ir(t,e){return dn({prop:t,themeKey:"borders",transform:e})}const U$=Ir("border",Ar),K$=Ir("borderTop",Ar),Y$=Ir("borderRight",Ar),G$=Ir("borderBottom",Ar),J$=Ir("borderLeft",Ar),Z$=Ir("borderColor"),X$=Ir("borderTopColor"),Q$=Ir("borderRightColor"),eF=Ir("borderBottomColor"),tF=Ir("borderLeftColor"),nF=Ir("outline",Ar),rF=Ir("outlineColor"),Du=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Cl(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:wl(e,r)});return zo(t,t.borderRadius,n)}return null};Du.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:mi}:{},Du.filterProps=["borderRadius"],Iu(U$,K$,Y$,G$,J$,Z$,X$,Q$,eF,tF,Du,nF,rF);const Pu=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Cl(t.theme,"spacing",8,"gap"),n=r=>({gap:wl(e,r)});return zo(t,t.gap,n)}return null};Pu.propTypes=process.env.NODE_ENV!=="production"?{gap:mi}:{},Pu.filterProps=["gap"];const _u=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Cl(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:wl(e,r)});return zo(t,t.columnGap,n)}return null};_u.propTypes=process.env.NODE_ENV!=="production"?{columnGap:mi}:{},_u.filterProps=["columnGap"];const Nu=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Cl(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:wl(e,r)});return zo(t,t.rowGap,n)}return null};Nu.propTypes=process.env.NODE_ENV!=="production"?{rowGap:mi}:{},Nu.filterProps=["rowGap"];const oF=dn({prop:"gridColumn"}),iF=dn({prop:"gridRow"}),sF=dn({prop:"gridAutoFlow"}),aF=dn({prop:"gridAutoColumns"}),lF=dn({prop:"gridAutoRows"}),cF=dn({prop:"gridTemplateColumns"}),uF=dn({prop:"gridTemplateRows"}),dF=dn({prop:"gridTemplateAreas"}),fF=dn({prop:"gridArea"});Iu(Pu,_u,Nu,oF,iF,sF,aF,lF,cF,uF,dF,fF);function ea(t,e){return e==="grey"?e:t}const pF=dn({prop:"color",themeKey:"palette",transform:ea}),hF=dn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ea}),mF=dn({prop:"backgroundColor",themeKey:"palette",transform:ea});Iu(pF,hF,mF);function yr(t){return t<=1&&t!==0?`${t*100}%`:t}const gF=dn({prop:"width",transform:yr}),kh=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var o,i,s,a,l;const r=((s=(i=(o=t.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:s[n])||Eu[n];return r?((l=(a=t.theme)==null?void 0:a.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${t.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:yr(n)}};return zo(t,t.maxWidth,e)}return null};kh.filterProps=["maxWidth"];const yF=dn({prop:"minWidth",transform:yr}),bF=dn({prop:"height",transform:yr}),vF=dn({prop:"maxHeight",transform:yr}),xF=dn({prop:"minHeight",transform:yr});dn({prop:"size",cssProperty:"width",transform:yr}),dn({prop:"size",cssProperty:"height",transform:yr});const SF=dn({prop:"boxSizing"});Iu(gF,kh,yF,bF,vF,xF,SF);const Tl={border:{themeKey:"borders",transform:Ar},borderTop:{themeKey:"borders",transform:Ar},borderRight:{themeKey:"borders",transform:Ar},borderBottom:{themeKey:"borders",transform:Ar},borderLeft:{themeKey:"borders",transform:Ar},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ar},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Du},color:{themeKey:"palette",transform:ea},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ea},backgroundColor:{themeKey:"palette",transform:ea},p:{style:rn},pt:{style:rn},pr:{style:rn},pb:{style:rn},pl:{style:rn},px:{style:rn},py:{style:rn},padding:{style:rn},paddingTop:{style:rn},paddingRight:{style:rn},paddingBottom:{style:rn},paddingLeft:{style:rn},paddingX:{style:rn},paddingY:{style:rn},paddingInline:{style:rn},paddingInlineStart:{style:rn},paddingInlineEnd:{style:rn},paddingBlock:{style:rn},paddingBlockStart:{style:rn},paddingBlockEnd:{style:rn},m:{style:nn},mt:{style:nn},mr:{style:nn},mb:{style:nn},ml:{style:nn},mx:{style:nn},my:{style:nn},margin:{style:nn},marginTop:{style:nn},marginRight:{style:nn},marginBottom:{style:nn},marginLeft:{style:nn},marginX:{style:nn},marginY:{style:nn},marginInline:{style:nn},marginInlineStart:{style:nn},marginInlineEnd:{style:nn},marginBlock:{style:nn},marginBlockStart:{style:nn},marginBlockEnd:{style:nn},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Pu},rowGap:{style:Nu},columnGap:{style:_u},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:yr},maxWidth:{style:kh},minWidth:{transform:yr},height:{transform:yr},maxHeight:{transform:yr},minHeight:{transform:yr},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 CF(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function wF(t,e){return typeof t=="function"?t(e):t}function TF(){function t(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:f,style:h}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const m=Mu(o,u)||{};return h?h(s):zo(s,r,b=>{let y=Ou(m,f,b);return b===y&&typeof b=="string"&&(y=Ou(m,f,`${n}${b==="default"?"":Ae(b)}`,b)),l===!1?y:{[l]:y}})}function e(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Tl;function s(a){let l=a;if(typeof a=="function")l=a(o);else if(typeof a!="object")return a;if(!l)return null;const u=F$(o.breakpoints),f=Object.keys(u);let h=u;return Object.keys(l).forEach(m=>{const g=wF(l[m],o);if(g!=null)if(typeof g=="object")if(i[m])h=Sl(h,t(m,g,o,i));else{const b=zo({theme:o},g,y=>({[m]:y}));CF(b,g)?h[m]=e({sx:g,theme:o}):h=Sl(h,b)}else h=Sl(h,t(m,g,o,i))}),P$(o,R$(f,h))}return Array.isArray(r)?r.map(s):s(r)}return e}const ta=TF();ta.filterProps=["sx"];const EF=t=>{var r;const e={systemProps:{},otherProps:{}},n=((r=t==null?void 0:t.theme)==null?void 0:r.unstable_sxConfig)??Tl;return Object.keys(t).forEach(o=>{n[o]?e.systemProps[o]=t[o]:e.otherProps[o]=t[o]}),e};function MF(t){const{sx:e,...n}=t,{systemProps:r,otherProps:o}=EF(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const a=e(...s);return mo(a)?{...r,...a}:r}:i={...r,...e},{...o,sx:i}}function OF(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var kF={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 AF(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var IF=/[A-Z]|^ms/g,DF=/_EMO_([^_]+?)_([^]*?)_EMO_/g,OS=function(e){return e.charCodeAt(1)===45},kS=function(e){return e!=null&&typeof e!="boolean"},Ah=AF(function(t){return OS(t)?t:t.replace(IF,"-$&").toLowerCase()}),AS=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(DF,function(r,o,i){return gi={name:o,styles:i,next:gi},o})}return kF[e]!==1&&!OS(e)&&typeof n=="number"&&n!==0?n+"px":n};function Lu(t,e,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 gi={name:o.name,styles:o.styles,next:gi},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)gi={name:s.name,styles:s.styles,next:gi},s=s.next;var a=i.styles+";";return a}return PF(t,e,n)}}var l=n;if(e==null)return l;var u=e[l];return u!==void 0?u:l}function PF(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Lu(t,e,n[o])+";";else for(var i in n){var s=n[i];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?r+=i+"{"+e[a]+"}":kS(a)&&(r+=Ah(i)+":"+AS(i,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)kS(s[l])&&(r+=Ah(i)+":"+AS(i,s[l])+";");else{var u=Lu(t,e,s);switch(i){case"animation":case"animationName":{r+=Ah(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}return r}var IS=/label:\s*([^\s;{]+)\s*(;|$)/g,gi;function DS(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,o="";gi=void 0;var i=t[0];if(i==null||i.raw===void 0)r=!1,o+=Lu(n,e,i);else{var s=i;o+=s[0]}for(var a=1;a<t.length;a++)if(o+=Lu(n,e,t[a]),r){var l=i;o+=l[a]}IS.lastIndex=0;for(var u="",f;(f=IS.exec(o))!==null;)u+="-"+f[1];var h=OF(o)+u;return{name:h,styles:o,next:gi}}function _F(t){return t==null||Object.keys(t).length===0}function PS(t){const{styles:e,defaultTheme:n={}}=t,r=typeof e=="function"?o=>e(_F(o)?n:o):e;return v.jsx(Qr.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(PS.propTypes={defaultTheme:c.object,styles:c.oneOfType([c.array,c.string,c.object,c.func])});/**
45
+ * @mui/styled-engine v6.4.9
46
+ *
47
+ * @license MIT
48
+ * This source code is licensed under the MIT license found in the
49
+ * LICENSE file in the root directory of this source tree.
50
+ */function NF(t,e){const n=t$(t,e);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof t=="string"?`"${t}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
51
+ `)):r.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function LF(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const _S=[];function NS(t){return _S[0]=t,DS(_S)}const $F=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function FF(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,i=$F(e),s=Object.keys(i);function a(m){return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n})`}function l(m){return`@media (max-width:${(typeof e[m]=="number"?e[m]:m)-r/100}${n})`}function u(m,g){const b=s.indexOf(g);return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n}) and (max-width:${(b!==-1&&typeof e[s[b]]=="number"?e[s[b]]:g)-r/100}${n})`}function f(m){return s.indexOf(m)+1<s.length?u(m,s[s.indexOf(m)+1]):a(m)}function h(m){const g=s.indexOf(m);return g===0?a(s[1]):g===s.length-1?l(s[g]):u(m,s[s.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:s,values:i,up:a,down:l,between:u,only:f,not:h,unit:n,...o}}const RF={borderRadius:4};function LS(t=8,e=Oh({spacing:t})){if(t.mui)return t;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(i=>{const s=e(i);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function BF(t,e){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[t])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(t);return o==="&"?e:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:e})}return n.palette.mode===t?e:{}}function Ih(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=t,a=FF(n),l=LS(o);let u=Rn({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...RF,...i}},s);return u=L$(u),u.applyStyles=BF,u=e.reduce((f,h)=>Rn(f,h),u),u.unstable_sxConfig={...Tl,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(h){return ta({sx:h,theme:this})},u}function VF(t){return Object.keys(t).length===0}function $S(t=null){const e=_.useContext(Qr.ThemeContext);return!e||VF(e)?t:e}const zF=Ih();function Dh(t=zF){return $S(t)}function FS({styles:t,themeId:e,defaultTheme:n={}}){const r=Dh(n),o=typeof t=="function"?t(e&&r[e]||r):t;return v.jsx(PS,{styles:o})}process.env.NODE_ENV!=="production"&&(FS.propTypes={defaultTheme:c.object,styles:c.oneOfType([c.array,c.func,c.number,c.object,c.string,c.bool]),themeId:c.string});function RS(t){const{variants:e,...n}=t,r={variants:e,style:NS(n),isProcessed:!0};return r.style===n||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=NS(o.style))}),r}const HF=Ih();function $u(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function jF(t){return t?(e,n)=>n[t]:null}function WF(t,e,n){t.theme=YF(t.theme)?n:t.theme[e]||t.theme}function Fu(t,e){const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(r=>Fu(t,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return BS(t,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function BS(t,e,n=[]){var o;let r;e:for(let i=0;i<e.length;i+=1){const s=e[i];if(typeof s.props=="function"){if(r??(r={...t,...t.ownerState,ownerState:t.ownerState}),!s.props(r))continue}else for(const a in s.props)if(t[a]!==s.props[a]&&((o=t.ownerState)==null?void 0:o[a])!==s.props[a])continue e;typeof s.style=="function"?(r??(r={...t,...t.ownerState,ownerState:t.ownerState}),n.push(s.style(r))):n.push(s.style)}return n}function qF(t={}){const{themeId:e,defaultTheme:n=HF,rootShouldForwardProp:r=$u,slotShouldForwardProp:o=$u}=t;function i(a){WF(a,e,n)}return(a,l={})=>{LF(a,O=>O.filter(A=>A!==ta));const{name:u,slot:f,skipVariantsResolver:h,skipSx:m,overridesResolver:g=jF(VS(f)),...b}=l,y=h!==void 0?h:f&&f!=="Root"&&f!=="root"||!1,S=m||!1;let C=$u;f==="Root"||f==="root"?C=r:f?C=o:GF(a)&&(C=void 0);const E=NF(a,{shouldForwardProp:C,label:KF(u,f),...b}),T=O=>{if(typeof O=="function"&&O.__emotion_real!==O)return function(N){return Fu(N,O)};if(mo(O)){const A=RS(O);return A.variants?function(D){return Fu(D,A)}:A.style}return O},w=(...O)=>{const A=[],N=O.map(T),D=[];if(A.push(i),u&&g&&D.push(function($){var B,W;const z=(W=(B=$.theme.components)==null?void 0:B[u])==null?void 0:W.styleOverrides;if(!z)return null;const R={};for(const U in z)R[U]=Fu($,z[U]);return g($,R)}),u&&!y&&D.push(function($){var R,B;const H=$.theme,z=(B=(R=H==null?void 0:H.components)==null?void 0:R[u])==null?void 0:B.variants;return z?BS($,z):null}),S||D.push(ta),Array.isArray(N[0])){const I=N.shift(),$=new Array(A.length).fill(""),H=new Array(D.length).fill("");let z;z=[...$,...I,...H],z.raw=[...$,...I.raw,...H],A.unshift(z)}const L=[...A,...N,...D],k=E(...L);return a.muiName&&(k.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(k.displayName=UF(u,f,a)),k};return E.withConfig&&(w.withConfig=E.withConfig),w}}function UF(t,e,n){return t?`${t}${Ae(e||"")}`:`Styled(${S$(n)})`}function KF(t,e){let n;return process.env.NODE_ENV!=="production"&&t&&(n=`${t}-${VS(e||"Root")}`),n}function YF(t){for(const e in t)return!1;return!0}function GF(t){return typeof t=="string"&&t.charCodeAt(0)>96}function VS(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}function zS(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:vl(e.components[n].defaultProps,r)}function JF({props:t,name:e,defaultTheme:n,themeId:r}){let o=Dh(n);return r&&(o=o[r]||o),zS({theme:o,name:e,props:t})}function ZF(t,e,n,r,o){const[i,s]=_.useState(()=>o&&n?n(t).matches:r?r(t).matches:e);return wn(()=>{if(!n)return;const a=n(t),l=()=>{s(a.matches)};return l(),a.addEventListener("change",l),()=>{a.removeEventListener("change",l)}},[t,n]),i}const HS={..._}.useSyncExternalStore;function XF(t,e,n,r,o){const i=_.useCallback(()=>e,[e]),s=_.useMemo(()=>{if(o&&n)return()=>n(t).matches;if(r!==null){const{matches:f}=r(t);return()=>f}return i},[i,t,r,o,n]),[a,l]=_.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const f=n(t);return[()=>f.matches,h=>(f.addEventListener("change",h),()=>{f.removeEventListener("change",h)})]},[i,n,t]);return HS(l,a,s)}function QF(t={}){const{themeId:e}=t;return function(r,o={}){let i=$S();i&&e&&(i=i[e]||i);const s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:a=!1,matchMedia:l=s?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:f=!1}=zS({name:"MuiUseMediaQuery",props:o,theme:i});process.env.NODE_ENV!=="production"&&typeof r=="function"&&i===null&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join(`
52
+ `));let h=typeof r=="function"?r(i):r;h=h.replace(/^@media( ?)/m,"");const g=(HS!==void 0?XF:ZF)(h,a,l,u,f);return process.env.NODE_ENV!=="production"&&_.useDebugValue({query:h,match:g}),g}}function Ph(t,e=0,n=1){return process.env.NODE_ENV!=="production"&&(t<e||t>n)&&console.error(`MUI: The value provided ${t} is out of range [${e}, ${n}].`),I$(t,e,n)}function eR(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&t.length!==t.trim().length&&console.error(`MUI: The color: "${t}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),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 yi(t){if(t.type)return t;if(t.charAt(0)==="#")return yi(eR(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
53
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:go(9,t));let r=t.substring(e+1,t.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(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
54
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:go(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const tR=t=>{const e=yi(t);return e.values.slice(0,3).map((n,r)=>e.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},El=(t,e)=>{try{return tR(t)}catch{return e&&process.env.NODE_ENV!=="production"&&console.warn(e),t}};function Ru(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function jS(t){t=yi(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),s=(u,f=(u+n/30)%12)=>o-i*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),Ru({type:a,values:l})}function _h(t){t=yi(t);let e=t.type==="hsl"||t.type==="hsla"?yi(jS(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function WS(t,e){const n=_h(t),r=_h(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Rt(t,e){return t=yi(t),e=Ph(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Ru(t)}function Bu(t,e,n){try{return Rt(t,e)}catch{return t}}function na(t,e){if(t=yi(t),e=Ph(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Ru(t)}function _t(t,e,n){try{return na(t,e)}catch{return t}}function Ml(t,e){if(t=yi(t),e=Ph(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Ru(t)}function Nt(t,e,n){try{return Ml(t,e)}catch{return t}}function nR(t,e=.15){return _h(t)>.5?na(t,e):Ml(t,e)}function Vu(t,e,n){try{return nR(t,e)}catch{return t}}const rR=_.createContext();process.env.NODE_ENV!=="production"&&(c.node,c.bool);const eo=()=>_.useContext(rR)??!1,oR=_.createContext(void 0);process.env.NODE_ENV!=="production"&&(c.node,c.object);function iR(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const o=e.components[n];return o.defaultProps?vl(o.defaultProps,r):!o.styleOverrides&&!o.variants?vl(o,r):r}function sR({props:t,name:e}){const n=_.useContext(oR);return iR({props:t,name:e,theme:{components:n}})}const qS={theme:void 0};function aR(t){let e,n;return function(o){let i=e;return(i===void 0||o.theme!==n)&&(qS.theme=o.theme,i=RS(t(qS)),e=i,n=o.theme),i}}function lR(t=""){function e(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${o}${e(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${t?`${t}-`:""}${r}${e(...o)})`}const US=(t,e,n,r=[])=>{let o=t;e.forEach((i,s)=>{s===e.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},cR=(t,e,n)=>{function r(o,i=[],s=[]){Object.entries(o).forEach(([a,l])=>{(!n||!n([...i,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,a],Array.isArray(l)?[...s,a]:s):e([...i,a],l,s))})}r(t)},uR=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>t.includes(r))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function Nh(t,e){const{prefix:n,shouldSkipGeneratingVar:r}=e||{},o={},i={},s={};return cR(t,(a,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const f=`--${n?`${n}-`:""}${a.join("-")}`,h=uR(a,l);Object.assign(o,{[f]:h}),US(i,a,`var(${f})`,u),US(s,a,`var(${f}, ${h})`,u)}},a=>a[0]==="vars"),{css:o,vars:i,varsWithDefaults:s}}function dR(t,e={}){const{getSelector:n=S,disableCssColorScheme:r,colorSchemeSelector:o}=e,{colorSchemes:i={},components:s,defaultColorScheme:a="light",...l}=t,{vars:u,css:f,varsWithDefaults:h}=Nh(l,e);let m=h;const g={},{[a]:b,...y}=i;if(Object.entries(y||{}).forEach(([T,w])=>{const{vars:O,css:A,varsWithDefaults:N}=Nh(w,e);m=Rn(m,N),g[T]={css:A,vars:O}}),b){const{css:T,vars:w,varsWithDefaults:O}=Nh(b,e);m=Rn(m,O),g[a]={css:T,vars:w}}function S(T,w){var A,N;let O=o;if(o==="class"&&(O=".%s"),o==="data"&&(O="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(O=`[${o}="%s"]`),T){if(O==="media")return t.defaultColorScheme===T?":root":{[`@media (prefers-color-scheme: ${((N=(A=i[T])==null?void 0:A.palette)==null?void 0:N.mode)||T})`]:{":root":w}};if(O)return t.defaultColorScheme===T?`:root, ${O.replace("%s",String(T))}`:O.replace("%s",String(T))}return":root"}return{vars:m,generateThemeVars:()=>{let T={...u};return Object.entries(g).forEach(([,{vars:w}])=>{T=Rn(T,w)}),T},generateStyleSheets:()=>{var D,L;const T=[],w=t.defaultColorScheme||"light";function O(k,I){Object.keys(I).length&&T.push(typeof k=="string"?{[k]:{...I}}:k)}O(n(void 0,{...f}),f);const{[w]:A,...N}=g;if(A){const{css:k}=A,I=(L=(D=i[w])==null?void 0:D.palette)==null?void 0:L.mode,$=!r&&I?{colorScheme:I,...k}:{...k};O(n(w,{...$}),$)}return Object.entries(N).forEach(([k,{css:I}])=>{var z,R;const $=(R=(z=i[k])==null?void 0:z.palette)==null?void 0:R.mode,H=!r&&$?{colorScheme:$,...I}:{...I};O(n(k,{...H}),H)}),T}}}function fR(t){return function(n){return t==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${n}"] &`:t==="class"?`.${n} &`:t==="data"?`[data-${n}] &`:`${t.replace("%s",n)} &`:"&"}}const Ol={black:"#000",white:"#fff"},pR={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"},ra={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},oa={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},kl={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ia={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},sa={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},aa={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function KS(){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:Ol.white,default:Ol.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 hR=KS();function YS(){return{text:{primary:Ol.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:Ol.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 GS=YS();function JS(t,e,n,r){const o=r.light||r,i=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Ml(t.main,o):e==="dark"&&(t.dark=na(t.main,i)))}function mR(t="light"){return t==="dark"?{main:ia[200],light:ia[50],dark:ia[400]}:{main:ia[700],light:ia[400],dark:ia[800]}}function gR(t="light"){return t==="dark"?{main:ra[200],light:ra[50],dark:ra[400]}:{main:ra[500],light:ra[300],dark:ra[700]}}function yR(t="light"){return t==="dark"?{main:oa[500],light:oa[300],dark:oa[700]}:{main:oa[700],light:oa[400],dark:oa[800]}}function bR(t="light"){return t==="dark"?{main:sa[400],light:sa[300],dark:sa[700]}:{main:sa[700],light:sa[500],dark:sa[900]}}function vR(t="light"){return t==="dark"?{main:aa[400],light:aa[300],dark:aa[700]}:{main:aa[800],light:aa[500],dark:aa[900]}}function xR(t="light"){return t==="dark"?{main:kl[400],light:kl[300],dark:kl[700]}:{main:"#ed6c02",light:kl[500],dark:kl[900]}}function Lh(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=t,i=t.primary||mR(e),s=t.secondary||gR(e),a=t.error||yR(e),l=t.info||bR(e),u=t.success||vR(e),f=t.warning||xR(e);function h(y){const S=WS(y,GS.text.primary)>=n?GS.text.primary:hR.text.primary;if(process.env.NODE_ENV!=="production"){const C=WS(y,S);C<3&&console.error([`MUI: The contrast ratio of ${C}:1 for ${S} on ${y}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
55
+ `))}return S}const m=({color:y,name:S,mainShade:C=500,lightShade:E=300,darkShade:T=700})=>{if(y={...y},!y.main&&y[C]&&(y.main=y[C]),!y.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
56
+ The color object needs to have a \`main\` property or a \`${C}\` property.`:go(11,S?` (${S})`:"",C));if(typeof y.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
57
+ \`color.main\` should be a string, but \`${JSON.stringify(y.main)}\` was provided instead.
58
+
59
+ Did you intend to use one of the following approaches?
60
+
61
+ import { green } from "@mui/material/colors";
62
+
63
+ const theme1 = createTheme({ palette: {
64
+ primary: green,
65
+ } });
66
+
67
+ const theme2 = createTheme({ palette: {
68
+ primary: { main: green[500] },
69
+ } });`:go(12,S?` (${S})`:"",JSON.stringify(y.main)));return JS(y,"light",E,r),JS(y,"dark",T,r),y.contrastText||(y.contrastText=h(y.main)),y};let g;return e==="light"?g=KS():e==="dark"&&(g=YS()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${e}\` is not supported.`)),Rn({common:{...Ol},mode:e,primary:m({color:i,name:"primary"}),secondary:m({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:a,name:"error"}),warning:m({color:f,name:"warning"}),info:m({color:l,name:"info"}),success:m({color:u,name:"success"}),grey:pR,contrastThreshold:n,getContrastText:h,augmentColor:m,tonalOffset:r,...g},o)}function SR(t){const e={};return Object.entries(t).forEach(r=>{const[o,i]=r;typeof i=="object"&&(e[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),e}function CR(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function wR(t){return Math.round(t*1e5)/1e5}const ZS={textTransform:"uppercase"},XS='"Roboto", "Helvetica", "Arial", sans-serif';function TR(t,e){const{fontFamily:n=XS,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:s=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:u,pxToRem:f,...h}=typeof e=="function"?e(t):e;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=r/14,g=f||(S=>`${S/l*m}rem`),b=(S,C,E,T,w)=>({fontFamily:n,fontWeight:S,fontSize:g(C),lineHeight:E,...n===XS?{letterSpacing:`${wR(T/C)}em`}:{},...w,...u}),y={h1:b(o,96,1.167,-1.5),h2:b(o,60,1.2,-.5),h3:b(i,48,1.167,0),h4:b(i,34,1.235,.25),h5:b(i,24,1.334,0),h6:b(s,20,1.6,.15),subtitle1:b(i,16,1.75,.15),subtitle2:b(s,14,1.57,.1),body1:b(i,16,1.5,.15),body2:b(i,14,1.43,.15),button:b(s,14,1.75,.4,ZS),caption:b(i,12,1.66,.4),overline:b(i,12,2.66,1,ZS),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Rn({htmlFontSize:l,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:s,fontWeightBold:a,...y},h,{clone:!1})}const ER=.2,MR=.14,OR=.12;function Gt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${ER})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${MR})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${OR})`].join(",")}const kR=["none",Gt(0,2,1,-1,0,1,1,0,0,1,3,0),Gt(0,3,1,-2,0,2,2,0,0,1,5,0),Gt(0,3,3,-2,0,3,4,0,0,1,8,0),Gt(0,2,4,-1,0,4,5,0,0,1,10,0),Gt(0,3,5,-1,0,5,8,0,0,1,14,0),Gt(0,3,5,-1,0,6,10,0,0,1,18,0),Gt(0,4,5,-2,0,7,10,1,0,2,16,1),Gt(0,5,5,-3,0,8,10,1,0,3,14,2),Gt(0,5,6,-3,0,9,12,1,0,3,16,2),Gt(0,6,6,-3,0,10,14,1,0,4,18,3),Gt(0,6,7,-4,0,11,15,1,0,4,20,3),Gt(0,7,8,-4,0,12,17,2,0,5,22,4),Gt(0,7,8,-4,0,13,19,2,0,5,24,4),Gt(0,7,9,-4,0,14,21,2,0,5,26,4),Gt(0,8,9,-5,0,15,22,2,0,6,28,5),Gt(0,8,10,-5,0,16,24,2,0,6,30,5),Gt(0,8,11,-5,0,17,26,2,0,6,32,5),Gt(0,9,11,-5,0,18,28,2,0,7,34,6),Gt(0,9,12,-6,0,19,29,2,0,7,36,6),Gt(0,10,13,-6,0,20,31,3,0,8,38,7),Gt(0,10,13,-6,0,21,33,3,0,8,40,7),Gt(0,10,14,-6,0,22,35,3,0,8,42,7),Gt(0,11,14,-7,0,23,36,3,0,9,44,8),Gt(0,11,15,-7,0,24,38,3,0,9,46,8)],AR={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)"},IR={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function QS(t){return`${Math.round(t)}ms`}function DR(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function PR(t){const e={...AR,...t.easing},n={...IR,...t.duration};return{getAutoHeightDuration:DR,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0,...u}=i;if(process.env.NODE_ENV!=="production"){const f=m=>typeof m=="string",h=m=>!Number.isNaN(parseFloat(m));!f(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(s)&&!f(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),f(a)||console.error('MUI: Argument "easing" must be a string.'),!h(l)&&!f(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
70
+ `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(f=>`${f} ${typeof s=="string"?s:QS(s)} ${a} ${typeof l=="string"?l:QS(l)}`).join(",")},...t,easing:e,duration:n}}const _R={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function NR(t){return mo(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function eC(t={}){const e={...t};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[s,a]=o[i];!NR(a)||s.startsWith("unstable_")?delete r[s]:mo(a)&&(r[s]={...a},n(r[s]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
71
+
72
+ const theme = ${JSON.stringify(e,null,2)};
73
+
74
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
75
+ theme.transitions = createTransitions(theme.transitions || {});
76
+
77
+ export default theme;`}function $h(t={},...e){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:s={},typography:a={},shape:l,...u}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":go(20));const f=Lh(i),h=Ih(t);let m=Rn(h,{mixins:CR(h.breakpoints,r),palette:f,shadows:kR.slice(),typography:TR(f,a),transitions:PR(s),zIndex:{..._R}});if(m=Rn(m,u),m=e.reduce((g,b)=>Rn(g,b),m),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(y,S)=>{let C;for(C in y){const E=y[C];if(g.includes(C)&&Object.keys(E).length>0){if(process.env.NODE_ENV!=="production"){const T=Ue("",C);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${C}\` internal state.`,"You can not override it like this: ",JSON.stringify(y,null,2),"",`Instead, you need to use the '&.${T}' syntax:`,JSON.stringify({root:{[`&.${T}`]:E}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
78
+ `))}y[C]={}}}};Object.keys(m.components).forEach(y=>{const S=m.components[y].styleOverrides;S&&y.startsWith("Mui")&&b(S,y)})}return m.unstable_sxConfig={...Tl,...u==null?void 0:u.unstable_sxConfig},m.unstable_sx=function(b){return ta({sx:b,theme:this})},m.toRuntimeSource=eC,m}function Fh(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const LR=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=Fh(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function tC(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function nC(t){return t==="dark"?LR:[]}function $R(t){const{palette:e={mode:"light"},opacity:n,overlays:r,...o}=t,i=Lh(e);return{palette:i,opacity:{...tC(i.mode),...n},overlays:r||nC(i.mode),...o}}function FR(t){var e;return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!((e=t[1])!=null&&e.match(/(mode|contrastThreshold|tonalOffset)/))}const RR=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],BR=t=>(e,n)=>{const r=t.rootSelector||":root",o=t.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const s={};return RR(t.cssVarPrefix).forEach(a=>{s[a]=n[a],delete n[a]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:s}}:i?{[i.replace("%s",e)]:s,[`${r}, ${i.replace("%s",e)}`]:n}:{[r]:{...n,...s}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(e))}`}else if(e){if(i==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[r]:n}};if(i)return i.replace("%s",String(e))}return r};function VR(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function be(t,e,n){!t[e]&&n&&(t[e]=n)}function Al(t){return typeof t!="string"||!t.startsWith("hsl")?t:jS(t)}function Ho(t,e){`${e}Channel`in t||(t[`${e}Channel`]=El(Al(t[e]),`MUI: Can't create \`palette.${e}Channel\` because \`palette.${e}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
79
+ To suppress this warning, you need to explicitly provide the \`palette.${e}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function zR(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const bo=t=>{try{return t()}catch{}},HR=(t="mui")=>lR(t);function Rh(t,e,n,r){if(!e)return;e=e===!0?{}:e;const o=r==="dark"?"dark":"light";if(!n){t[r]=$R({...e,palette:{mode:o,...e==null?void 0:e.palette}});return}const{palette:i,...s}=$h({...n,palette:{mode:o,...e==null?void 0:e.palette}});return t[r]={...e,palette:i,opacity:{...tC(o),...e==null?void 0:e.opacity},overlays:(e==null?void 0:e.overlays)||nC(o)},s}function jR(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:s=FR,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...u}=t,f=Object.keys(n)[0],h=r||(n.light&&f!=="light"?"light":f),m=HR(i),{[h]:g,light:b,dark:y,...S}=n,C={...S};let E=g;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(E=!0),!E)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${h}\` option is either missing or invalid.`:go(21,h));const T=Rh(C,E,u,h);b&&!C.light&&Rh(C,b,void 0,"light"),y&&!C.dark&&Rh(C,y,void 0,"dark");let w={defaultColorScheme:h,...T,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:l,getCssVar:m,colorSchemes:C,font:{...SR(T.typography),...T.font},spacing:zR(u.spacing)};Object.keys(w.colorSchemes).forEach(L=>{const k=w.colorSchemes[L].palette,I=$=>{const H=$.split("-"),z=H[1],R=H[2];return m($,k[z][R])};if(k.mode==="light"&&(be(k.common,"background","#fff"),be(k.common,"onBackground","#000")),k.mode==="dark"&&(be(k.common,"background","#000"),be(k.common,"onBackground","#fff")),VR(k,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),k.mode==="light"){be(k.Alert,"errorColor",_t(k.error.light,.6)),be(k.Alert,"infoColor",_t(k.info.light,.6)),be(k.Alert,"successColor",_t(k.success.light,.6)),be(k.Alert,"warningColor",_t(k.warning.light,.6)),be(k.Alert,"errorFilledBg",I("palette-error-main")),be(k.Alert,"infoFilledBg",I("palette-info-main")),be(k.Alert,"successFilledBg",I("palette-success-main")),be(k.Alert,"warningFilledBg",I("palette-warning-main")),be(k.Alert,"errorFilledColor",bo(()=>k.getContrastText(k.error.main))),be(k.Alert,"infoFilledColor",bo(()=>k.getContrastText(k.info.main))),be(k.Alert,"successFilledColor",bo(()=>k.getContrastText(k.success.main))),be(k.Alert,"warningFilledColor",bo(()=>k.getContrastText(k.warning.main))),be(k.Alert,"errorStandardBg",Nt(k.error.light,.9)),be(k.Alert,"infoStandardBg",Nt(k.info.light,.9)),be(k.Alert,"successStandardBg",Nt(k.success.light,.9)),be(k.Alert,"warningStandardBg",Nt(k.warning.light,.9)),be(k.Alert,"errorIconColor",I("palette-error-main")),be(k.Alert,"infoIconColor",I("palette-info-main")),be(k.Alert,"successIconColor",I("palette-success-main")),be(k.Alert,"warningIconColor",I("palette-warning-main")),be(k.AppBar,"defaultBg",I("palette-grey-100")),be(k.Avatar,"defaultBg",I("palette-grey-400")),be(k.Button,"inheritContainedBg",I("palette-grey-300")),be(k.Button,"inheritContainedHoverBg",I("palette-grey-A100")),be(k.Chip,"defaultBorder",I("palette-grey-400")),be(k.Chip,"defaultAvatarColor",I("palette-grey-700")),be(k.Chip,"defaultIconColor",I("palette-grey-700")),be(k.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),be(k.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),be(k.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),be(k.LinearProgress,"primaryBg",Nt(k.primary.main,.62)),be(k.LinearProgress,"secondaryBg",Nt(k.secondary.main,.62)),be(k.LinearProgress,"errorBg",Nt(k.error.main,.62)),be(k.LinearProgress,"infoBg",Nt(k.info.main,.62)),be(k.LinearProgress,"successBg",Nt(k.success.main,.62)),be(k.LinearProgress,"warningBg",Nt(k.warning.main,.62)),be(k.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.11)`),be(k.Slider,"primaryTrack",Nt(k.primary.main,.62)),be(k.Slider,"secondaryTrack",Nt(k.secondary.main,.62)),be(k.Slider,"errorTrack",Nt(k.error.main,.62)),be(k.Slider,"infoTrack",Nt(k.info.main,.62)),be(k.Slider,"successTrack",Nt(k.success.main,.62)),be(k.Slider,"warningTrack",Nt(k.warning.main,.62));const $=Vu(k.background.default,.8);be(k.SnackbarContent,"bg",$),be(k.SnackbarContent,"color",bo(()=>k.getContrastText($))),be(k.SpeedDialAction,"fabHoverBg",Vu(k.background.paper,.15)),be(k.StepConnector,"border",I("palette-grey-400")),be(k.StepContent,"border",I("palette-grey-400")),be(k.Switch,"defaultColor",I("palette-common-white")),be(k.Switch,"defaultDisabledColor",I("palette-grey-100")),be(k.Switch,"primaryDisabledColor",Nt(k.primary.main,.62)),be(k.Switch,"secondaryDisabledColor",Nt(k.secondary.main,.62)),be(k.Switch,"errorDisabledColor",Nt(k.error.main,.62)),be(k.Switch,"infoDisabledColor",Nt(k.info.main,.62)),be(k.Switch,"successDisabledColor",Nt(k.success.main,.62)),be(k.Switch,"warningDisabledColor",Nt(k.warning.main,.62)),be(k.TableCell,"border",Nt(Bu(k.divider,1),.88)),be(k.Tooltip,"bg",Bu(k.grey[700],.92))}if(k.mode==="dark"){be(k.Alert,"errorColor",Nt(k.error.light,.6)),be(k.Alert,"infoColor",Nt(k.info.light,.6)),be(k.Alert,"successColor",Nt(k.success.light,.6)),be(k.Alert,"warningColor",Nt(k.warning.light,.6)),be(k.Alert,"errorFilledBg",I("palette-error-dark")),be(k.Alert,"infoFilledBg",I("palette-info-dark")),be(k.Alert,"successFilledBg",I("palette-success-dark")),be(k.Alert,"warningFilledBg",I("palette-warning-dark")),be(k.Alert,"errorFilledColor",bo(()=>k.getContrastText(k.error.dark))),be(k.Alert,"infoFilledColor",bo(()=>k.getContrastText(k.info.dark))),be(k.Alert,"successFilledColor",bo(()=>k.getContrastText(k.success.dark))),be(k.Alert,"warningFilledColor",bo(()=>k.getContrastText(k.warning.dark))),be(k.Alert,"errorStandardBg",_t(k.error.light,.9)),be(k.Alert,"infoStandardBg",_t(k.info.light,.9)),be(k.Alert,"successStandardBg",_t(k.success.light,.9)),be(k.Alert,"warningStandardBg",_t(k.warning.light,.9)),be(k.Alert,"errorIconColor",I("palette-error-main")),be(k.Alert,"infoIconColor",I("palette-info-main")),be(k.Alert,"successIconColor",I("palette-success-main")),be(k.Alert,"warningIconColor",I("palette-warning-main")),be(k.AppBar,"defaultBg",I("palette-grey-900")),be(k.AppBar,"darkBg",I("palette-background-paper")),be(k.AppBar,"darkColor",I("palette-text-primary")),be(k.Avatar,"defaultBg",I("palette-grey-600")),be(k.Button,"inheritContainedBg",I("palette-grey-800")),be(k.Button,"inheritContainedHoverBg",I("palette-grey-700")),be(k.Chip,"defaultBorder",I("palette-grey-700")),be(k.Chip,"defaultAvatarColor",I("palette-grey-300")),be(k.Chip,"defaultIconColor",I("palette-grey-300")),be(k.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),be(k.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),be(k.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),be(k.LinearProgress,"primaryBg",_t(k.primary.main,.5)),be(k.LinearProgress,"secondaryBg",_t(k.secondary.main,.5)),be(k.LinearProgress,"errorBg",_t(k.error.main,.5)),be(k.LinearProgress,"infoBg",_t(k.info.main,.5)),be(k.LinearProgress,"successBg",_t(k.success.main,.5)),be(k.LinearProgress,"warningBg",_t(k.warning.main,.5)),be(k.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.13)`),be(k.Slider,"primaryTrack",_t(k.primary.main,.5)),be(k.Slider,"secondaryTrack",_t(k.secondary.main,.5)),be(k.Slider,"errorTrack",_t(k.error.main,.5)),be(k.Slider,"infoTrack",_t(k.info.main,.5)),be(k.Slider,"successTrack",_t(k.success.main,.5)),be(k.Slider,"warningTrack",_t(k.warning.main,.5));const $=Vu(k.background.default,.98);be(k.SnackbarContent,"bg",$),be(k.SnackbarContent,"color",bo(()=>k.getContrastText($))),be(k.SpeedDialAction,"fabHoverBg",Vu(k.background.paper,.15)),be(k.StepConnector,"border",I("palette-grey-600")),be(k.StepContent,"border",I("palette-grey-600")),be(k.Switch,"defaultColor",I("palette-grey-300")),be(k.Switch,"defaultDisabledColor",I("palette-grey-600")),be(k.Switch,"primaryDisabledColor",_t(k.primary.main,.55)),be(k.Switch,"secondaryDisabledColor",_t(k.secondary.main,.55)),be(k.Switch,"errorDisabledColor",_t(k.error.main,.55)),be(k.Switch,"infoDisabledColor",_t(k.info.main,.55)),be(k.Switch,"successDisabledColor",_t(k.success.main,.55)),be(k.Switch,"warningDisabledColor",_t(k.warning.main,.55)),be(k.TableCell,"border",_t(Bu(k.divider,1),.68)),be(k.Tooltip,"bg",Bu(k.grey[700],.92))}Ho(k.background,"default"),Ho(k.background,"paper"),Ho(k.common,"background"),Ho(k.common,"onBackground"),Ho(k,"divider"),Object.keys(k).forEach($=>{const H=k[$];$!=="tonalOffset"&&H&&typeof H=="object"&&(H.main&&be(k[$],"mainChannel",El(Al(H.main))),H.light&&be(k[$],"lightChannel",El(Al(H.light))),H.dark&&be(k[$],"darkChannel",El(Al(H.dark))),H.contrastText&&be(k[$],"contrastTextChannel",El(Al(H.contrastText))),$==="text"&&(Ho(k[$],"primary"),Ho(k[$],"secondary")),$==="action"&&(H.active&&Ho(k[$],"active"),H.selected&&Ho(k[$],"selected")))})}),w=e.reduce((L,k)=>Rn(L,k),w);const O={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:BR(w)},{vars:A,generateThemeVars:N,generateStyleSheets:D}=dR(w,O);return w.vars=A,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([L,k])=>{w[L]=k}),w.generateThemeVars=N,w.generateStyleSheets=D,w.generateSpacing=function(){return LS(u.spacing,Oh(this))},w.getColorSchemeSelector=fR(a),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Tl,...u==null?void 0:u.unstable_sxConfig},w.unstable_sx=function(k){return ta({sx:k,theme:this})},w.toRuntimeSource=eC,w}function rC(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:Lh({...n===!0?{}:n.palette,mode:e})})}function WR(t={},...e){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...s}=t,a=i||"light",l=o==null?void 0:o[a],u={...o,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in t))return $h(t,...e);let f=n;"palette"in t||u[a]&&(u[a]!==!0?f=u[a].palette:a==="dark"&&(f={mode:"dark"}));const h=$h({...t,palette:f},...e);return h.defaultColorScheme=a,h.colorSchemes=u,h.palette.mode==="light"&&(h.colorSchemes.light={...u.light!==!0&&u.light,palette:h.palette},rC(h,"dark",u.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:h.palette},rC(h,"light",u.light)),h}return!n&&!("light"in u)&&a==="light"&&(u.light=!0),jR({...s,colorSchemes:u,defaultColorScheme:a,...typeof r!="boolean"&&r},...e)}const zu=WR(),Il="$$material";function bi(){const t=Dh(zu);return process.env.NODE_ENV!=="production"&&_.useDebugValue(t),t[Il]||t}function oC(t){return v.jsx(FS,{...t,defaultTheme:zu,themeId:Il})}process.env.NODE_ENV!=="production"&&(oC.propTypes={styles:c.oneOfType([c.array,c.func,c.number,c.object,c.string,c.bool])});function iC(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const to=t=>iC(t)&&t!=="classes",ye=qF({themeId:Il,defaultTheme:zu,rootShouldForwardProp:to});function qR(t){return function(n){return v.jsx(oC,{styles:typeof t=="function"?r=>t({theme:r,...n}):t})}}function UR(){return MF}const Dt=aR;process.env.NODE_ENV!=="production"&&(c.node,c.object.isRequired);function xt(t){return sR(t)}function KR(t){return Ue("MuiSvgIcon",t)}We("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const YR=t=>{const{color:e,fontSize:n,classes:r}=t,o={root:["root",e!=="inherit"&&`color${Ae(e)}`,`fontSize${Ae(n)}`]};return qe(o,KR,r)},GR=ye("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${Ae(n.color)}`],e[`fontSize${Ae(n.fontSize)}`]]}})(Dt(({theme:t})=>{var e,n,r,o,i,s,a,l,u,f,h,m,g,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(e=t.transitions)==null?void 0:e.create)==null?void 0:o.call(e,"fill",{duration:(r=(n=(t.vars??t).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(i=t.typography)==null?void 0:i.pxToRem)==null?void 0:s.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(a=t.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(u=t.typography)==null?void 0:u.pxToRem)==null?void 0:f.call(u,35))||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,y])=>y&&y.main).map(([y])=>{var S,C;return{props:{color:y},style:{color:(C=(S=(t.vars??t).palette)==null?void 0:S[y])==null?void 0:C.main}}}),{props:{color:"action"},style:{color:(m=(h=(t.vars??t).palette)==null?void 0:h.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(b=(g=(t.vars??t).palette)==null?void 0:g.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Hu=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiSvgIcon"}),{children:o,className:i,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:h,viewBox:m="0 0 24 24",...g}=r,b=_.isValidElement(o)&&o.type==="svg",y={...r,color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:b},S={};f||(S.viewBox=m);const C=YR(y);return v.jsxs(GR,{as:a,className:_e(C.root,i),focusable:"false",color:u,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n,...S,...g,...b&&o.props,ownerState:y,children:[b?o.props.children:o,h?v.jsx("title",{children:h}):null]})});process.env.NODE_ENV!=="production"&&(Hu.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,fontSize:c.oneOfType([c.oneOf(["inherit","large","medium","small"]),c.string]),htmlColor:c.string,inheritViewBox:c.bool,shapeRendering:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleAccess:c.string,viewBox:c.string}),Hu.muiName="SvgIcon";function Be(t,e){function n(r,o){return v.jsx(Hu,{"data-testid":`${e}Icon`,ref:o,...r,children:t})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${e}Icon`),n.muiName=Hu.muiName,_.memo(_.forwardRef(n))}function JR(t,e){if(!t)return e;if(typeof t=="function"||typeof e=="function")return o=>{const i=typeof e=="function"?e(o):e,s=typeof t=="function"?t({...o,...i}):t,a=_e(o==null?void 0:o.className,i==null?void 0:i.className,s==null?void 0:s.className);return{...i,...s,...!!a&&{className:a},...(i==null?void 0:i.style)&&(s==null?void 0:s.style)&&{style:{...i.style,...s.style}},...(i==null?void 0:i.sx)&&(s==null?void 0:s.sx)&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(s.sx)?s.sx:[s.sx]]}}};const n=e,r=_e(n==null?void 0:n.className,t==null?void 0:t.className);return{...e,...t,...!!r&&{className:r},...(n==null?void 0:n.style)&&(t==null?void 0:t.style)&&{style:{...n.style,...t.style}},...(n==null?void 0:n.sx)&&(t==null?void 0:t.sx)&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(t.sx)?t.sx:[t.sx]]}}}const sC=Be(v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),Jn=t=>{const{name:e,id:n,className:r}=t,[o,i,s]=Ht.useField(e),{error:a}=i;return v.jsxs(F.Typography,{id:n,variant:"caption",display:"block",color:"error",style:{visibility:a?"visible":"hidden"},className:r,fontSize:".9rem",children:[v.jsx(F.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",position:"relative",top:"3px",mr:.5},children:v.jsx(sC,{fontSize:"inherit"})}),a]})},aC=t=>{const{name:e,label:n=Cn(e),options:r=[],filterSelectedOptions:o=!0,variant:i="outlined",staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:l,margin:u="dense",fullWidth:f=!0,required:h,onChange:m,clearOnSelect:g=!1,onInputChange:b,getOptionLabel:y=$=>typeof $=="string"?$:String($),isOptionEqualToValue:S=($,H)=>JSON.stringify($)===JSON.stringify(H),useFieldAsValue:C,...E}=t,[T,w,O]=Ht.useField(e),{setValue:A}=O,{error:N}=w,[D,L]=_.useState(""),k={...Yn(E,["useFieldAsValue"]),getOptionLabel:y,options:r,filterSelectedOptions:o,isOptionEqualToValue:S,renderInput:$=>v.jsx(F.TextField,{...$,variant:i,label:s?void 0:n,error:!!N,required:h}),onChange:($,H,z,R)=>{g?(L(""),A(null)):A(C?H?H[C]:null:H),m&&m($,H,z,R)},onInputChange:($,H,z)=>{L(H),b&&b($,H,z)},fullWidth:!0,inputValue:D,value:C?r.find($=>$[C]===T.value)||null:T.value,slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}},I=()=>{if(!T.value)return"";if(C){const $=r.find(H=>H[C]===T.value);return $?y($):""}return y(T.value)};return v.jsxs(F.FormControl,{margin:u,fullWidth:f,required:h,children:[(s||l)&&v.jsx(F.Typography,{...a,children:n}),l?v.jsx(F.Typography,{children:I()}):v.jsxs(F.Box,{children:[v.jsx(F.Autocomplete,{...k}),v.jsx(Jn,{name:e,id:`${e}-err`})]})]})};var Dl={exports:{}};/**
80
+ * @license
81
+ * Lodash <https://lodash.com/>
82
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
83
+ * Released under MIT license <https://lodash.com/license>
84
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
85
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
86
+ */var ZR=Dl.exports,lC;function XR(){return lC||(lC=1,function(t,e){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",h=1,m=2,g=4,b=1,y=2,S=1,C=2,E=4,T=8,w=16,O=32,A=64,N=128,D=256,L=512,k=30,I="...",$=800,H=16,z=1,R=2,B=3,W=1/0,U=9007199254740991,G=17976931348623157e292,Y=NaN,Z=4294967295,me=Z-1,fe=Z>>>1,pe=[["ary",N],["bind",S],["bindKey",C],["curry",T],["curryRight",w],["flip",L],["partial",O],["partialRight",A],["rearg",D]],re="[object Arguments]",ue="[object Array]",ae="[object AsyncFunction]",K="[object Boolean]",Q="[object Date]",ie="[object DOMException]",he="[object Error]",ee="[object Function]",se="[object GeneratorFunction]",le="[object Map]",ge="[object Number]",we="[object Null]",xe="[object Object]",Oe="[object Promise]",Le="[object Proxy]",He="[object RegExp]",Ge="[object Set]",De="[object String]",lt="[object Symbol]",St="[object Undefined]",Zt="[object WeakMap]",vn="[object WeakSet]",cn="[object ArrayBuffer]",$t="[object DataView]",An="[object Float32Array]",qn="[object Float64Array]",dt="[object Int8Array]",Ln="[object Int16Array]",Kt="[object Int32Array]",de="[object Uint8Array]",$e="[object Uint8ClampedArray]",Ee="[object Uint16Array]",Re="[object Uint32Array]",Ye=/\b__p \+= '';/g,tt=/\b(__p \+=) '' \+/g,Pt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tr=/&(?:amp|lt|gt|quot|#39);/g,fr=/[&<>"']/g,ri=RegExp(tr.source),nu=RegExp(fr.source),el=/<%-([\s\S]+?)%>/g,Yi=/<%([\s\S]+?)%>/g,Op=/<%=([\s\S]+?)%>/g,ru=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tl=/^\w*$/,yne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,C1=/[\\^$.*+?()[\]{}|]/g,bne=RegExp(C1.source),w1=/^\s+/,vne=/\s/,xne=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Sne=/\{\n\/\* \[wrapped with (.+)\] \*/,Cne=/,? & /,wne=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tne=/[()=,{}\[\]\/\s]/,Ene=/\\(\\)?/g,Mne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,O_=/\w*$/,One=/^[-+]0x[0-9a-f]+$/i,kne=/^0b[01]+$/i,Ane=/^\[object .+?Constructor\]$/,Ine=/^0o[0-7]+$/i,Dne=/^(?:0|[1-9]\d*)$/,Pne=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,kp=/($^)/,_ne=/['\n\r\u2028\u2029\\]/g,Ap="\\ud800-\\udfff",Nne="\\u0300-\\u036f",Lne="\\ufe20-\\ufe2f",$ne="\\u20d0-\\u20ff",k_=Nne+Lne+$ne,A_="\\u2700-\\u27bf",I_="a-z\\xdf-\\xf6\\xf8-\\xff",Fne="\\xac\\xb1\\xd7\\xf7",Rne="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Bne="\\u2000-\\u206f",Vne=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",D_="A-Z\\xc0-\\xd6\\xd8-\\xde",P_="\\ufe0e\\ufe0f",__=Fne+Rne+Bne+Vne,T1="['’]",zne="["+Ap+"]",N_="["+__+"]",Ip="["+k_+"]",L_="\\d+",Hne="["+A_+"]",$_="["+I_+"]",F_="[^"+Ap+__+L_+A_+I_+D_+"]",E1="\\ud83c[\\udffb-\\udfff]",jne="(?:"+Ip+"|"+E1+")",R_="[^"+Ap+"]",M1="(?:\\ud83c[\\udde6-\\uddff]){2}",O1="[\\ud800-\\udbff][\\udc00-\\udfff]",nl="["+D_+"]",B_="\\u200d",V_="(?:"+$_+"|"+F_+")",Wne="(?:"+nl+"|"+F_+")",z_="(?:"+T1+"(?:d|ll|m|re|s|t|ve))?",H_="(?:"+T1+"(?:D|LL|M|RE|S|T|VE))?",j_=jne+"?",W_="["+P_+"]?",qne="(?:"+B_+"(?:"+[R_,M1,O1].join("|")+")"+W_+j_+")*",Une="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Kne="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",q_=W_+j_+qne,Yne="(?:"+[Hne,M1,O1].join("|")+")"+q_,Gne="(?:"+[R_+Ip+"?",Ip,M1,O1,zne].join("|")+")",Jne=RegExp(T1,"g"),Zne=RegExp(Ip,"g"),k1=RegExp(E1+"(?="+E1+")|"+Gne+q_,"g"),Xne=RegExp([nl+"?"+$_+"+"+z_+"(?="+[N_,nl,"$"].join("|")+")",Wne+"+"+H_+"(?="+[N_,nl+V_,"$"].join("|")+")",nl+"?"+V_+"+"+z_,nl+"+"+H_,Kne,Une,L_,Yne].join("|"),"g"),Qne=RegExp("["+B_+Ap+k_+P_+"]"),ere=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tre=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nre=-1,Yt={};Yt[An]=Yt[qn]=Yt[dt]=Yt[Ln]=Yt[Kt]=Yt[de]=Yt[$e]=Yt[Ee]=Yt[Re]=!0,Yt[re]=Yt[ue]=Yt[cn]=Yt[K]=Yt[$t]=Yt[Q]=Yt[he]=Yt[ee]=Yt[le]=Yt[ge]=Yt[xe]=Yt[He]=Yt[Ge]=Yt[De]=Yt[Zt]=!1;var zt={};zt[re]=zt[ue]=zt[cn]=zt[$t]=zt[K]=zt[Q]=zt[An]=zt[qn]=zt[dt]=zt[Ln]=zt[Kt]=zt[le]=zt[ge]=zt[xe]=zt[He]=zt[Ge]=zt[De]=zt[lt]=zt[de]=zt[$e]=zt[Ee]=zt[Re]=!0,zt[he]=zt[ee]=zt[Zt]=!1;var rre={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ore={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ire={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},sre={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},are=parseFloat,lre=parseInt,U_=typeof hi=="object"&&hi&&hi.Object===Object&&hi,cre=typeof self=="object"&&self&&self.Object===Object&&self,$n=U_||cre||Function("return this")(),A1=e&&!e.nodeType&&e,qs=A1&&!0&&t&&!t.nodeType&&t,K_=qs&&qs.exports===A1,I1=K_&&U_.process,Wr=function(){try{var ne=qs&&qs.require&&qs.require("util").types;return ne||I1&&I1.binding&&I1.binding("util")}catch{}}(),Y_=Wr&&Wr.isArrayBuffer,G_=Wr&&Wr.isDate,J_=Wr&&Wr.isMap,Z_=Wr&&Wr.isRegExp,X_=Wr&&Wr.isSet,Q_=Wr&&Wr.isTypedArray;function wr(ne,ve,ce){switch(ce.length){case 0:return ne.call(ve);case 1:return ne.call(ve,ce[0]);case 2:return ne.call(ve,ce[0],ce[1]);case 3:return ne.call(ve,ce[0],ce[1],ce[2])}return ne.apply(ve,ce)}function ure(ne,ve,ce,Ve){for(var rt=-1,wt=ne==null?0:ne.length;++rt<wt;){var xn=ne[rt];ve(Ve,xn,ce(xn),ne)}return Ve}function qr(ne,ve){for(var ce=-1,Ve=ne==null?0:ne.length;++ce<Ve&&ve(ne[ce],ce,ne)!==!1;);return ne}function dre(ne,ve){for(var ce=ne==null?0:ne.length;ce--&&ve(ne[ce],ce,ne)!==!1;);return ne}function eN(ne,ve){for(var ce=-1,Ve=ne==null?0:ne.length;++ce<Ve;)if(!ve(ne[ce],ce,ne))return!1;return!0}function Gi(ne,ve){for(var ce=-1,Ve=ne==null?0:ne.length,rt=0,wt=[];++ce<Ve;){var xn=ne[ce];ve(xn,ce,ne)&&(wt[rt++]=xn)}return wt}function Dp(ne,ve){var ce=ne==null?0:ne.length;return!!ce&&rl(ne,ve,0)>-1}function D1(ne,ve,ce){for(var Ve=-1,rt=ne==null?0:ne.length;++Ve<rt;)if(ce(ve,ne[Ve]))return!0;return!1}function Xt(ne,ve){for(var ce=-1,Ve=ne==null?0:ne.length,rt=Array(Ve);++ce<Ve;)rt[ce]=ve(ne[ce],ce,ne);return rt}function Ji(ne,ve){for(var ce=-1,Ve=ve.length,rt=ne.length;++ce<Ve;)ne[rt+ce]=ve[ce];return ne}function P1(ne,ve,ce,Ve){var rt=-1,wt=ne==null?0:ne.length;for(Ve&&wt&&(ce=ne[++rt]);++rt<wt;)ce=ve(ce,ne[rt],rt,ne);return ce}function fre(ne,ve,ce,Ve){var rt=ne==null?0:ne.length;for(Ve&&rt&&(ce=ne[--rt]);rt--;)ce=ve(ce,ne[rt],rt,ne);return ce}function _1(ne,ve){for(var ce=-1,Ve=ne==null?0:ne.length;++ce<Ve;)if(ve(ne[ce],ce,ne))return!0;return!1}var pre=N1("length");function hre(ne){return ne.split("")}function mre(ne){return ne.match(wne)||[]}function tN(ne,ve,ce){var Ve;return ce(ne,function(rt,wt,xn){if(ve(rt,wt,xn))return Ve=wt,!1}),Ve}function Pp(ne,ve,ce,Ve){for(var rt=ne.length,wt=ce+(Ve?1:-1);Ve?wt--:++wt<rt;)if(ve(ne[wt],wt,ne))return wt;return-1}function rl(ne,ve,ce){return ve===ve?Ore(ne,ve,ce):Pp(ne,nN,ce)}function gre(ne,ve,ce,Ve){for(var rt=ce-1,wt=ne.length;++rt<wt;)if(Ve(ne[rt],ve))return rt;return-1}function nN(ne){return ne!==ne}function rN(ne,ve){var ce=ne==null?0:ne.length;return ce?$1(ne,ve)/ce:Y}function N1(ne){return function(ve){return ve==null?n:ve[ne]}}function L1(ne){return function(ve){return ne==null?n:ne[ve]}}function oN(ne,ve,ce,Ve,rt){return rt(ne,function(wt,xn,Ft){ce=Ve?(Ve=!1,wt):ve(ce,wt,xn,Ft)}),ce}function yre(ne,ve){var ce=ne.length;for(ne.sort(ve);ce--;)ne[ce]=ne[ce].value;return ne}function $1(ne,ve){for(var ce,Ve=-1,rt=ne.length;++Ve<rt;){var wt=ve(ne[Ve]);wt!==n&&(ce=ce===n?wt:ce+wt)}return ce}function F1(ne,ve){for(var ce=-1,Ve=Array(ne);++ce<ne;)Ve[ce]=ve(ce);return Ve}function bre(ne,ve){return Xt(ve,function(ce){return[ce,ne[ce]]})}function iN(ne){return ne&&ne.slice(0,cN(ne)+1).replace(w1,"")}function Tr(ne){return function(ve){return ne(ve)}}function R1(ne,ve){return Xt(ve,function(ce){return ne[ce]})}function ou(ne,ve){return ne.has(ve)}function sN(ne,ve){for(var ce=-1,Ve=ne.length;++ce<Ve&&rl(ve,ne[ce],0)>-1;);return ce}function aN(ne,ve){for(var ce=ne.length;ce--&&rl(ve,ne[ce],0)>-1;);return ce}function vre(ne,ve){for(var ce=ne.length,Ve=0;ce--;)ne[ce]===ve&&++Ve;return Ve}var xre=L1(rre),Sre=L1(ore);function Cre(ne){return"\\"+sre[ne]}function wre(ne,ve){return ne==null?n:ne[ve]}function ol(ne){return Qne.test(ne)}function Tre(ne){return ere.test(ne)}function Ere(ne){for(var ve,ce=[];!(ve=ne.next()).done;)ce.push(ve.value);return ce}function B1(ne){var ve=-1,ce=Array(ne.size);return ne.forEach(function(Ve,rt){ce[++ve]=[rt,Ve]}),ce}function lN(ne,ve){return function(ce){return ne(ve(ce))}}function Zi(ne,ve){for(var ce=-1,Ve=ne.length,rt=0,wt=[];++ce<Ve;){var xn=ne[ce];(xn===ve||xn===f)&&(ne[ce]=f,wt[rt++]=ce)}return wt}function _p(ne){var ve=-1,ce=Array(ne.size);return ne.forEach(function(Ve){ce[++ve]=Ve}),ce}function Mre(ne){var ve=-1,ce=Array(ne.size);return ne.forEach(function(Ve){ce[++ve]=[Ve,Ve]}),ce}function Ore(ne,ve,ce){for(var Ve=ce-1,rt=ne.length;++Ve<rt;)if(ne[Ve]===ve)return Ve;return-1}function kre(ne,ve,ce){for(var Ve=ce+1;Ve--;)if(ne[Ve]===ve)return Ve;return Ve}function il(ne){return ol(ne)?Ire(ne):pre(ne)}function uo(ne){return ol(ne)?Dre(ne):hre(ne)}function cN(ne){for(var ve=ne.length;ve--&&vne.test(ne.charAt(ve)););return ve}var Are=L1(ire);function Ire(ne){for(var ve=k1.lastIndex=0;k1.test(ne);)++ve;return ve}function Dre(ne){return ne.match(k1)||[]}function Pre(ne){return ne.match(Xne)||[]}var _re=function ne(ve){ve=ve==null?$n:sl.defaults($n.Object(),ve,sl.pick($n,tre));var ce=ve.Array,Ve=ve.Date,rt=ve.Error,wt=ve.Function,xn=ve.Math,Ft=ve.Object,V1=ve.RegExp,Nre=ve.String,Ur=ve.TypeError,Np=ce.prototype,Lre=wt.prototype,al=Ft.prototype,Lp=ve["__core-js_shared__"],$p=Lre.toString,kt=al.hasOwnProperty,$re=0,uN=function(){var d=/[^.]+$/.exec(Lp&&Lp.keys&&Lp.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Fp=al.toString,Fre=$p.call(Ft),Rre=$n._,Bre=V1("^"+$p.call(kt).replace(C1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rp=K_?ve.Buffer:n,Xi=ve.Symbol,Bp=ve.Uint8Array,dN=Rp?Rp.allocUnsafe:n,Vp=lN(Ft.getPrototypeOf,Ft),fN=Ft.create,pN=al.propertyIsEnumerable,zp=Np.splice,hN=Xi?Xi.isConcatSpreadable:n,iu=Xi?Xi.iterator:n,Us=Xi?Xi.toStringTag:n,Hp=function(){try{var d=Zs(Ft,"defineProperty");return d({},"",{}),d}catch{}}(),Vre=ve.clearTimeout!==$n.clearTimeout&&ve.clearTimeout,zre=Ve&&Ve.now!==$n.Date.now&&Ve.now,Hre=ve.setTimeout!==$n.setTimeout&&ve.setTimeout,jp=xn.ceil,Wp=xn.floor,z1=Ft.getOwnPropertySymbols,jre=Rp?Rp.isBuffer:n,mN=ve.isFinite,Wre=Np.join,qre=lN(Ft.keys,Ft),Sn=xn.max,Un=xn.min,Ure=Ve.now,Kre=ve.parseInt,gN=xn.random,Yre=Np.reverse,H1=Zs(ve,"DataView"),su=Zs(ve,"Map"),j1=Zs(ve,"Promise"),ll=Zs(ve,"Set"),au=Zs(ve,"WeakMap"),lu=Zs(Ft,"create"),qp=au&&new au,cl={},Gre=Xs(H1),Jre=Xs(su),Zre=Xs(j1),Xre=Xs(ll),Qre=Xs(au),Up=Xi?Xi.prototype:n,cu=Up?Up.valueOf:n,yN=Up?Up.toString:n;function V(d){if(un(d)&&!ot(d)&&!(d instanceof mt)){if(d instanceof Kr)return d;if(kt.call(d,"__wrapped__"))return bL(d)}return new Kr(d)}var ul=function(){function d(){}return function(p){if(!tn(p))return{};if(fN)return fN(p);d.prototype=p;var x=new d;return d.prototype=n,x}}();function Kp(){}function Kr(d,p){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=n}V.templateSettings={escape:el,evaluate:Yi,interpolate:Op,variable:"",imports:{_:V}},V.prototype=Kp.prototype,V.prototype.constructor=V,Kr.prototype=ul(Kp.prototype),Kr.prototype.constructor=Kr;function mt(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function eoe(){var d=new mt(this.__wrapped__);return d.__actions__=pr(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=pr(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=pr(this.__views__),d}function toe(){if(this.__filtered__){var d=new mt(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function noe(){var d=this.__wrapped__.value(),p=this.__dir__,x=ot(d),M=p<0,P=x?d.length:0,j=hie(0,P,this.__views__),q=j.start,X=j.end,oe=X-q,Se=M?X:q-1,Ce=this.__iteratees__,Me=Ce.length,Pe=0,je=Un(oe,this.__takeCount__);if(!x||!M&&P==oe&&je==oe)return zN(d,this.__actions__);var Qe=[];e:for(;oe--&&Pe<je;){Se+=p;for(var ct=-1,et=d[Se];++ct<Me;){var pt=Ce[ct],vt=pt.iteratee,Or=pt.type,or=vt(et);if(Or==R)et=or;else if(!or){if(Or==z)continue e;break e}}Qe[Pe++]=et}return Qe}mt.prototype=ul(Kp.prototype),mt.prototype.constructor=mt;function Ks(d){var p=-1,x=d==null?0:d.length;for(this.clear();++p<x;){var M=d[p];this.set(M[0],M[1])}}function roe(){this.__data__=lu?lu(null):{},this.size=0}function ooe(d){var p=this.has(d)&&delete this.__data__[d];return this.size-=p?1:0,p}function ioe(d){var p=this.__data__;if(lu){var x=p[d];return x===l?n:x}return kt.call(p,d)?p[d]:n}function soe(d){var p=this.__data__;return lu?p[d]!==n:kt.call(p,d)}function aoe(d,p){var x=this.__data__;return this.size+=this.has(d)?0:1,x[d]=lu&&p===n?l:p,this}Ks.prototype.clear=roe,Ks.prototype.delete=ooe,Ks.prototype.get=ioe,Ks.prototype.has=soe,Ks.prototype.set=aoe;function oi(d){var p=-1,x=d==null?0:d.length;for(this.clear();++p<x;){var M=d[p];this.set(M[0],M[1])}}function loe(){this.__data__=[],this.size=0}function coe(d){var p=this.__data__,x=Yp(p,d);if(x<0)return!1;var M=p.length-1;return x==M?p.pop():zp.call(p,x,1),--this.size,!0}function uoe(d){var p=this.__data__,x=Yp(p,d);return x<0?n:p[x][1]}function doe(d){return Yp(this.__data__,d)>-1}function foe(d,p){var x=this.__data__,M=Yp(x,d);return M<0?(++this.size,x.push([d,p])):x[M][1]=p,this}oi.prototype.clear=loe,oi.prototype.delete=coe,oi.prototype.get=uoe,oi.prototype.has=doe,oi.prototype.set=foe;function ii(d){var p=-1,x=d==null?0:d.length;for(this.clear();++p<x;){var M=d[p];this.set(M[0],M[1])}}function poe(){this.size=0,this.__data__={hash:new Ks,map:new(su||oi),string:new Ks}}function hoe(d){var p=sh(this,d).delete(d);return this.size-=p?1:0,p}function moe(d){return sh(this,d).get(d)}function goe(d){return sh(this,d).has(d)}function yoe(d,p){var x=sh(this,d),M=x.size;return x.set(d,p),this.size+=x.size==M?0:1,this}ii.prototype.clear=poe,ii.prototype.delete=hoe,ii.prototype.get=moe,ii.prototype.has=goe,ii.prototype.set=yoe;function Ys(d){var p=-1,x=d==null?0:d.length;for(this.__data__=new ii;++p<x;)this.add(d[p])}function boe(d){return this.__data__.set(d,l),this}function voe(d){return this.__data__.has(d)}Ys.prototype.add=Ys.prototype.push=boe,Ys.prototype.has=voe;function fo(d){var p=this.__data__=new oi(d);this.size=p.size}function xoe(){this.__data__=new oi,this.size=0}function Soe(d){var p=this.__data__,x=p.delete(d);return this.size=p.size,x}function Coe(d){return this.__data__.get(d)}function woe(d){return this.__data__.has(d)}function Toe(d,p){var x=this.__data__;if(x instanceof oi){var M=x.__data__;if(!su||M.length<o-1)return M.push([d,p]),this.size=++x.size,this;x=this.__data__=new ii(M)}return x.set(d,p),this.size=x.size,this}fo.prototype.clear=xoe,fo.prototype.delete=Soe,fo.prototype.get=Coe,fo.prototype.has=woe,fo.prototype.set=Toe;function bN(d,p){var x=ot(d),M=!x&&Qs(d),P=!x&&!M&&rs(d),j=!x&&!M&&!P&&hl(d),q=x||M||P||j,X=q?F1(d.length,Nre):[],oe=X.length;for(var Se in d)(p||kt.call(d,Se))&&!(q&&(Se=="length"||P&&(Se=="offset"||Se=="parent")||j&&(Se=="buffer"||Se=="byteLength"||Se=="byteOffset")||ci(Se,oe)))&&X.push(Se);return X}function vN(d){var p=d.length;return p?d[ex(0,p-1)]:n}function Eoe(d,p){return ah(pr(d),Gs(p,0,d.length))}function Moe(d){return ah(pr(d))}function W1(d,p,x){(x!==n&&!po(d[p],x)||x===n&&!(p in d))&&si(d,p,x)}function uu(d,p,x){var M=d[p];(!(kt.call(d,p)&&po(M,x))||x===n&&!(p in d))&&si(d,p,x)}function Yp(d,p){for(var x=d.length;x--;)if(po(d[x][0],p))return x;return-1}function Ooe(d,p,x,M){return Qi(d,function(P,j,q){p(M,P,x(P),q)}),M}function xN(d,p){return d&&Lo(p,In(p),d)}function koe(d,p){return d&&Lo(p,mr(p),d)}function si(d,p,x){p=="__proto__"&&Hp?Hp(d,p,{configurable:!0,enumerable:!0,value:x,writable:!0}):d[p]=x}function q1(d,p){for(var x=-1,M=p.length,P=ce(M),j=d==null;++x<M;)P[x]=j?n:Ex(d,p[x]);return P}function Gs(d,p,x){return d===d&&(x!==n&&(d=d<=x?d:x),p!==n&&(d=d>=p?d:p)),d}function Yr(d,p,x,M,P,j){var q,X=p&h,oe=p&m,Se=p&g;if(x&&(q=P?x(d,M,P,j):x(d)),q!==n)return q;if(!tn(d))return d;var Ce=ot(d);if(Ce){if(q=gie(d),!X)return pr(d,q)}else{var Me=Kn(d),Pe=Me==ee||Me==se;if(rs(d))return WN(d,X);if(Me==xe||Me==re||Pe&&!P){if(q=oe||Pe?{}:cL(d),!X)return oe?iie(d,koe(q,d)):oie(d,xN(q,d))}else{if(!zt[Me])return P?d:{};q=yie(d,Me,X)}}j||(j=new fo);var je=j.get(d);if(je)return je;j.set(d,q),RL(d)?d.forEach(function(et){q.add(Yr(et,p,x,et,d,j))}):$L(d)&&d.forEach(function(et,pt){q.set(pt,Yr(et,p,x,pt,d,j))});var Qe=Se?oe?dx:ux:oe?mr:In,ct=Ce?n:Qe(d);return qr(ct||d,function(et,pt){ct&&(pt=et,et=d[pt]),uu(q,pt,Yr(et,p,x,pt,d,j))}),q}function Aoe(d){var p=In(d);return function(x){return SN(x,d,p)}}function SN(d,p,x){var M=x.length;if(d==null)return!M;for(d=Ft(d);M--;){var P=x[M],j=p[P],q=d[P];if(q===n&&!(P in d)||!j(q))return!1}return!0}function CN(d,p,x){if(typeof d!="function")throw new Ur(s);return yu(function(){d.apply(n,x)},p)}function du(d,p,x,M){var P=-1,j=Dp,q=!0,X=d.length,oe=[],Se=p.length;if(!X)return oe;x&&(p=Xt(p,Tr(x))),M?(j=D1,q=!1):p.length>=o&&(j=ou,q=!1,p=new Ys(p));e:for(;++P<X;){var Ce=d[P],Me=x==null?Ce:x(Ce);if(Ce=M||Ce!==0?Ce:0,q&&Me===Me){for(var Pe=Se;Pe--;)if(p[Pe]===Me)continue e;oe.push(Ce)}else j(p,Me,M)||oe.push(Ce)}return oe}var Qi=GN(No),wN=GN(K1,!0);function Ioe(d,p){var x=!0;return Qi(d,function(M,P,j){return x=!!p(M,P,j),x}),x}function Gp(d,p,x){for(var M=-1,P=d.length;++M<P;){var j=d[M],q=p(j);if(q!=null&&(X===n?q===q&&!Mr(q):x(q,X)))var X=q,oe=j}return oe}function Doe(d,p,x,M){var P=d.length;for(x=it(x),x<0&&(x=-x>P?0:P+x),M=M===n||M>P?P:it(M),M<0&&(M+=P),M=x>M?0:VL(M);x<M;)d[x++]=p;return d}function TN(d,p){var x=[];return Qi(d,function(M,P,j){p(M,P,j)&&x.push(M)}),x}function Fn(d,p,x,M,P){var j=-1,q=d.length;for(x||(x=vie),P||(P=[]);++j<q;){var X=d[j];p>0&&x(X)?p>1?Fn(X,p-1,x,M,P):Ji(P,X):M||(P[P.length]=X)}return P}var U1=JN(),EN=JN(!0);function No(d,p){return d&&U1(d,p,In)}function K1(d,p){return d&&EN(d,p,In)}function Jp(d,p){return Gi(p,function(x){return ui(d[x])})}function Js(d,p){p=ts(p,d);for(var x=0,M=p.length;d!=null&&x<M;)d=d[$o(p[x++])];return x&&x==M?d:n}function MN(d,p,x){var M=p(d);return ot(d)?M:Ji(M,x(d))}function nr(d){return d==null?d===n?St:we:Us&&Us in Ft(d)?pie(d):Mie(d)}function Y1(d,p){return d>p}function Poe(d,p){return d!=null&&kt.call(d,p)}function _oe(d,p){return d!=null&&p in Ft(d)}function Noe(d,p,x){return d>=Un(p,x)&&d<Sn(p,x)}function G1(d,p,x){for(var M=x?D1:Dp,P=d[0].length,j=d.length,q=j,X=ce(j),oe=1/0,Se=[];q--;){var Ce=d[q];q&&p&&(Ce=Xt(Ce,Tr(p))),oe=Un(Ce.length,oe),X[q]=!x&&(p||P>=120&&Ce.length>=120)?new Ys(q&&Ce):n}Ce=d[0];var Me=-1,Pe=X[0];e:for(;++Me<P&&Se.length<oe;){var je=Ce[Me],Qe=p?p(je):je;if(je=x||je!==0?je:0,!(Pe?ou(Pe,Qe):M(Se,Qe,x))){for(q=j;--q;){var ct=X[q];if(!(ct?ou(ct,Qe):M(d[q],Qe,x)))continue e}Pe&&Pe.push(Qe),Se.push(je)}}return Se}function Loe(d,p,x,M){return No(d,function(P,j,q){p(M,x(P),j,q)}),M}function fu(d,p,x){p=ts(p,d),d=pL(d,p);var M=d==null?d:d[$o(Jr(p))];return M==null?n:wr(M,d,x)}function ON(d){return un(d)&&nr(d)==re}function $oe(d){return un(d)&&nr(d)==cn}function Foe(d){return un(d)&&nr(d)==Q}function pu(d,p,x,M,P){return d===p?!0:d==null||p==null||!un(d)&&!un(p)?d!==d&&p!==p:Roe(d,p,x,M,pu,P)}function Roe(d,p,x,M,P,j){var q=ot(d),X=ot(p),oe=q?ue:Kn(d),Se=X?ue:Kn(p);oe=oe==re?xe:oe,Se=Se==re?xe:Se;var Ce=oe==xe,Me=Se==xe,Pe=oe==Se;if(Pe&&rs(d)){if(!rs(p))return!1;q=!0,Ce=!1}if(Pe&&!Ce)return j||(j=new fo),q||hl(d)?sL(d,p,x,M,P,j):die(d,p,oe,x,M,P,j);if(!(x&b)){var je=Ce&&kt.call(d,"__wrapped__"),Qe=Me&&kt.call(p,"__wrapped__");if(je||Qe){var ct=je?d.value():d,et=Qe?p.value():p;return j||(j=new fo),P(ct,et,x,M,j)}}return Pe?(j||(j=new fo),fie(d,p,x,M,P,j)):!1}function Boe(d){return un(d)&&Kn(d)==le}function J1(d,p,x,M){var P=x.length,j=P,q=!M;if(d==null)return!j;for(d=Ft(d);P--;){var X=x[P];if(q&&X[2]?X[1]!==d[X[0]]:!(X[0]in d))return!1}for(;++P<j;){X=x[P];var oe=X[0],Se=d[oe],Ce=X[1];if(q&&X[2]){if(Se===n&&!(oe in d))return!1}else{var Me=new fo;if(M)var Pe=M(Se,Ce,oe,d,p,Me);if(!(Pe===n?pu(Ce,Se,b|y,M,Me):Pe))return!1}}return!0}function kN(d){if(!tn(d)||Sie(d))return!1;var p=ui(d)?Bre:Ane;return p.test(Xs(d))}function Voe(d){return un(d)&&nr(d)==He}function zoe(d){return un(d)&&Kn(d)==Ge}function Hoe(d){return un(d)&&ph(d.length)&&!!Yt[nr(d)]}function AN(d){return typeof d=="function"?d:d==null?gr:typeof d=="object"?ot(d)?PN(d[0],d[1]):DN(d):ZL(d)}function Z1(d){if(!gu(d))return qre(d);var p=[];for(var x in Ft(d))kt.call(d,x)&&x!="constructor"&&p.push(x);return p}function joe(d){if(!tn(d))return Eie(d);var p=gu(d),x=[];for(var M in d)M=="constructor"&&(p||!kt.call(d,M))||x.push(M);return x}function X1(d,p){return d<p}function IN(d,p){var x=-1,M=hr(d)?ce(d.length):[];return Qi(d,function(P,j,q){M[++x]=p(P,j,q)}),M}function DN(d){var p=px(d);return p.length==1&&p[0][2]?dL(p[0][0],p[0][1]):function(x){return x===d||J1(x,d,p)}}function PN(d,p){return mx(d)&&uL(p)?dL($o(d),p):function(x){var M=Ex(x,d);return M===n&&M===p?Mx(x,d):pu(p,M,b|y)}}function Zp(d,p,x,M,P){d!==p&&U1(p,function(j,q){if(P||(P=new fo),tn(j))Woe(d,p,q,x,Zp,M,P);else{var X=M?M(yx(d,q),j,q+"",d,p,P):n;X===n&&(X=j),W1(d,q,X)}},mr)}function Woe(d,p,x,M,P,j,q){var X=yx(d,x),oe=yx(p,x),Se=q.get(oe);if(Se){W1(d,x,Se);return}var Ce=j?j(X,oe,x+"",d,p,q):n,Me=Ce===n;if(Me){var Pe=ot(oe),je=!Pe&&rs(oe),Qe=!Pe&&!je&&hl(oe);Ce=oe,Pe||je||Qe?ot(X)?Ce=X:fn(X)?Ce=pr(X):je?(Me=!1,Ce=WN(oe,!0)):Qe?(Me=!1,Ce=qN(oe,!0)):Ce=[]:bu(oe)||Qs(oe)?(Ce=X,Qs(X)?Ce=zL(X):(!tn(X)||ui(X))&&(Ce=cL(oe))):Me=!1}Me&&(q.set(oe,Ce),P(Ce,oe,M,j,q),q.delete(oe)),W1(d,x,Ce)}function _N(d,p){var x=d.length;if(x)return p+=p<0?x:0,ci(p,x)?d[p]:n}function NN(d,p,x){p.length?p=Xt(p,function(j){return ot(j)?function(q){return Js(q,j.length===1?j[0]:j)}:j}):p=[gr];var M=-1;p=Xt(p,Tr(Ze()));var P=IN(d,function(j,q,X){var oe=Xt(p,function(Se){return Se(j)});return{criteria:oe,index:++M,value:j}});return yre(P,function(j,q){return rie(j,q,x)})}function qoe(d,p){return LN(d,p,function(x,M){return Mx(d,M)})}function LN(d,p,x){for(var M=-1,P=p.length,j={};++M<P;){var q=p[M],X=Js(d,q);x(X,q)&&hu(j,ts(q,d),X)}return j}function Uoe(d){return function(p){return Js(p,d)}}function Q1(d,p,x,M){var P=M?gre:rl,j=-1,q=p.length,X=d;for(d===p&&(p=pr(p)),x&&(X=Xt(d,Tr(x)));++j<q;)for(var oe=0,Se=p[j],Ce=x?x(Se):Se;(oe=P(X,Ce,oe,M))>-1;)X!==d&&zp.call(X,oe,1),zp.call(d,oe,1);return d}function $N(d,p){for(var x=d?p.length:0,M=x-1;x--;){var P=p[x];if(x==M||P!==j){var j=P;ci(P)?zp.call(d,P,1):rx(d,P)}}return d}function ex(d,p){return d+Wp(gN()*(p-d+1))}function Koe(d,p,x,M){for(var P=-1,j=Sn(jp((p-d)/(x||1)),0),q=ce(j);j--;)q[M?j:++P]=d,d+=x;return q}function tx(d,p){var x="";if(!d||p<1||p>U)return x;do p%2&&(x+=d),p=Wp(p/2),p&&(d+=d);while(p);return x}function ut(d,p){return bx(fL(d,p,gr),d+"")}function Yoe(d){return vN(ml(d))}function Goe(d,p){var x=ml(d);return ah(x,Gs(p,0,x.length))}function hu(d,p,x,M){if(!tn(d))return d;p=ts(p,d);for(var P=-1,j=p.length,q=j-1,X=d;X!=null&&++P<j;){var oe=$o(p[P]),Se=x;if(oe==="__proto__"||oe==="constructor"||oe==="prototype")return d;if(P!=q){var Ce=X[oe];Se=M?M(Ce,oe,X):n,Se===n&&(Se=tn(Ce)?Ce:ci(p[P+1])?[]:{})}uu(X,oe,Se),X=X[oe]}return d}var FN=qp?function(d,p){return qp.set(d,p),d}:gr,Joe=Hp?function(d,p){return Hp(d,"toString",{configurable:!0,enumerable:!1,value:kx(p),writable:!0})}:gr;function Zoe(d){return ah(ml(d))}function Gr(d,p,x){var M=-1,P=d.length;p<0&&(p=-p>P?0:P+p),x=x>P?P:x,x<0&&(x+=P),P=p>x?0:x-p>>>0,p>>>=0;for(var j=ce(P);++M<P;)j[M]=d[M+p];return j}function Xoe(d,p){var x;return Qi(d,function(M,P,j){return x=p(M,P,j),!x}),!!x}function Xp(d,p,x){var M=0,P=d==null?M:d.length;if(typeof p=="number"&&p===p&&P<=fe){for(;M<P;){var j=M+P>>>1,q=d[j];q!==null&&!Mr(q)&&(x?q<=p:q<p)?M=j+1:P=j}return P}return nx(d,p,gr,x)}function nx(d,p,x,M){var P=0,j=d==null?0:d.length;if(j===0)return 0;p=x(p);for(var q=p!==p,X=p===null,oe=Mr(p),Se=p===n;P<j;){var Ce=Wp((P+j)/2),Me=x(d[Ce]),Pe=Me!==n,je=Me===null,Qe=Me===Me,ct=Mr(Me);if(q)var et=M||Qe;else Se?et=Qe&&(M||Pe):X?et=Qe&&Pe&&(M||!je):oe?et=Qe&&Pe&&!je&&(M||!ct):je||ct?et=!1:et=M?Me<=p:Me<p;et?P=Ce+1:j=Ce}return Un(j,me)}function RN(d,p){for(var x=-1,M=d.length,P=0,j=[];++x<M;){var q=d[x],X=p?p(q):q;if(!x||!po(X,oe)){var oe=X;j[P++]=q===0?0:q}}return j}function BN(d){return typeof d=="number"?d:Mr(d)?Y:+d}function Er(d){if(typeof d=="string")return d;if(ot(d))return Xt(d,Er)+"";if(Mr(d))return yN?yN.call(d):"";var p=d+"";return p=="0"&&1/d==-W?"-0":p}function es(d,p,x){var M=-1,P=Dp,j=d.length,q=!0,X=[],oe=X;if(x)q=!1,P=D1;else if(j>=o){var Se=p?null:cie(d);if(Se)return _p(Se);q=!1,P=ou,oe=new Ys}else oe=p?[]:X;e:for(;++M<j;){var Ce=d[M],Me=p?p(Ce):Ce;if(Ce=x||Ce!==0?Ce:0,q&&Me===Me){for(var Pe=oe.length;Pe--;)if(oe[Pe]===Me)continue e;p&&oe.push(Me),X.push(Ce)}else P(oe,Me,x)||(oe!==X&&oe.push(Me),X.push(Ce))}return X}function rx(d,p){return p=ts(p,d),d=pL(d,p),d==null||delete d[$o(Jr(p))]}function VN(d,p,x,M){return hu(d,p,x(Js(d,p)),M)}function Qp(d,p,x,M){for(var P=d.length,j=M?P:-1;(M?j--:++j<P)&&p(d[j],j,d););return x?Gr(d,M?0:j,M?j+1:P):Gr(d,M?j+1:0,M?P:j)}function zN(d,p){var x=d;return x instanceof mt&&(x=x.value()),P1(p,function(M,P){return P.func.apply(P.thisArg,Ji([M],P.args))},x)}function ox(d,p,x){var M=d.length;if(M<2)return M?es(d[0]):[];for(var P=-1,j=ce(M);++P<M;)for(var q=d[P],X=-1;++X<M;)X!=P&&(j[P]=du(j[P]||q,d[X],p,x));return es(Fn(j,1),p,x)}function HN(d,p,x){for(var M=-1,P=d.length,j=p.length,q={};++M<P;){var X=M<j?p[M]:n;x(q,d[M],X)}return q}function ix(d){return fn(d)?d:[]}function sx(d){return typeof d=="function"?d:gr}function ts(d,p){return ot(d)?d:mx(d,p)?[d]:yL(Ot(d))}var Qoe=ut;function ns(d,p,x){var M=d.length;return x=x===n?M:x,!p&&x>=M?d:Gr(d,p,x)}var jN=Vre||function(d){return $n.clearTimeout(d)};function WN(d,p){if(p)return d.slice();var x=d.length,M=dN?dN(x):new d.constructor(x);return d.copy(M),M}function ax(d){var p=new d.constructor(d.byteLength);return new Bp(p).set(new Bp(d)),p}function eie(d,p){var x=p?ax(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.byteLength)}function tie(d){var p=new d.constructor(d.source,O_.exec(d));return p.lastIndex=d.lastIndex,p}function nie(d){return cu?Ft(cu.call(d)):{}}function qN(d,p){var x=p?ax(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.length)}function UN(d,p){if(d!==p){var x=d!==n,M=d===null,P=d===d,j=Mr(d),q=p!==n,X=p===null,oe=p===p,Se=Mr(p);if(!X&&!Se&&!j&&d>p||j&&q&&oe&&!X&&!Se||M&&q&&oe||!x&&oe||!P)return 1;if(!M&&!j&&!Se&&d<p||Se&&x&&P&&!M&&!j||X&&x&&P||!q&&P||!oe)return-1}return 0}function rie(d,p,x){for(var M=-1,P=d.criteria,j=p.criteria,q=P.length,X=x.length;++M<q;){var oe=UN(P[M],j[M]);if(oe){if(M>=X)return oe;var Se=x[M];return oe*(Se=="desc"?-1:1)}}return d.index-p.index}function KN(d,p,x,M){for(var P=-1,j=d.length,q=x.length,X=-1,oe=p.length,Se=Sn(j-q,0),Ce=ce(oe+Se),Me=!M;++X<oe;)Ce[X]=p[X];for(;++P<q;)(Me||P<j)&&(Ce[x[P]]=d[P]);for(;Se--;)Ce[X++]=d[P++];return Ce}function YN(d,p,x,M){for(var P=-1,j=d.length,q=-1,X=x.length,oe=-1,Se=p.length,Ce=Sn(j-X,0),Me=ce(Ce+Se),Pe=!M;++P<Ce;)Me[P]=d[P];for(var je=P;++oe<Se;)Me[je+oe]=p[oe];for(;++q<X;)(Pe||P<j)&&(Me[je+x[q]]=d[P++]);return Me}function pr(d,p){var x=-1,M=d.length;for(p||(p=ce(M));++x<M;)p[x]=d[x];return p}function Lo(d,p,x,M){var P=!x;x||(x={});for(var j=-1,q=p.length;++j<q;){var X=p[j],oe=M?M(x[X],d[X],X,x,d):n;oe===n&&(oe=d[X]),P?si(x,X,oe):uu(x,X,oe)}return x}function oie(d,p){return Lo(d,hx(d),p)}function iie(d,p){return Lo(d,aL(d),p)}function eh(d,p){return function(x,M){var P=ot(x)?ure:Ooe,j=p?p():{};return P(x,d,Ze(M,2),j)}}function dl(d){return ut(function(p,x){var M=-1,P=x.length,j=P>1?x[P-1]:n,q=P>2?x[2]:n;for(j=d.length>3&&typeof j=="function"?(P--,j):n,q&&rr(x[0],x[1],q)&&(j=P<3?n:j,P=1),p=Ft(p);++M<P;){var X=x[M];X&&d(p,X,M,j)}return p})}function GN(d,p){return function(x,M){if(x==null)return x;if(!hr(x))return d(x,M);for(var P=x.length,j=p?P:-1,q=Ft(x);(p?j--:++j<P)&&M(q[j],j,q)!==!1;);return x}}function JN(d){return function(p,x,M){for(var P=-1,j=Ft(p),q=M(p),X=q.length;X--;){var oe=q[d?X:++P];if(x(j[oe],oe,j)===!1)break}return p}}function sie(d,p,x){var M=p&S,P=mu(d);function j(){var q=this&&this!==$n&&this instanceof j?P:d;return q.apply(M?x:this,arguments)}return j}function ZN(d){return function(p){p=Ot(p);var x=ol(p)?uo(p):n,M=x?x[0]:p.charAt(0),P=x?ns(x,1).join(""):p.slice(1);return M[d]()+P}}function fl(d){return function(p){return P1(GL(YL(p).replace(Jne,"")),d,"")}}function mu(d){return function(){var p=arguments;switch(p.length){case 0:return new d;case 1:return new d(p[0]);case 2:return new d(p[0],p[1]);case 3:return new d(p[0],p[1],p[2]);case 4:return new d(p[0],p[1],p[2],p[3]);case 5:return new d(p[0],p[1],p[2],p[3],p[4]);case 6:return new d(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new d(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var x=ul(d.prototype),M=d.apply(x,p);return tn(M)?M:x}}function aie(d,p,x){var M=mu(d);function P(){for(var j=arguments.length,q=ce(j),X=j,oe=pl(P);X--;)q[X]=arguments[X];var Se=j<3&&q[0]!==oe&&q[j-1]!==oe?[]:Zi(q,oe);if(j-=Se.length,j<x)return nL(d,p,th,P.placeholder,n,q,Se,n,n,x-j);var Ce=this&&this!==$n&&this instanceof P?M:d;return wr(Ce,this,q)}return P}function XN(d){return function(p,x,M){var P=Ft(p);if(!hr(p)){var j=Ze(x,3);p=In(p),x=function(X){return j(P[X],X,P)}}var q=d(p,x,M);return q>-1?P[j?p[q]:q]:n}}function QN(d){return li(function(p){var x=p.length,M=x,P=Kr.prototype.thru;for(d&&p.reverse();M--;){var j=p[M];if(typeof j!="function")throw new Ur(s);if(P&&!q&&ih(j)=="wrapper")var q=new Kr([],!0)}for(M=q?M:x;++M<x;){j=p[M];var X=ih(j),oe=X=="wrapper"?fx(j):n;oe&&gx(oe[0])&&oe[1]==(N|T|O|D)&&!oe[4].length&&oe[9]==1?q=q[ih(oe[0])].apply(q,oe[3]):q=j.length==1&&gx(j)?q[X]():q.thru(j)}return function(){var Se=arguments,Ce=Se[0];if(q&&Se.length==1&&ot(Ce))return q.plant(Ce).value();for(var Me=0,Pe=x?p[Me].apply(this,Se):Ce;++Me<x;)Pe=p[Me].call(this,Pe);return Pe}})}function th(d,p,x,M,P,j,q,X,oe,Se){var Ce=p&N,Me=p&S,Pe=p&C,je=p&(T|w),Qe=p&L,ct=Pe?n:mu(d);function et(){for(var pt=arguments.length,vt=ce(pt),Or=pt;Or--;)vt[Or]=arguments[Or];if(je)var or=pl(et),kr=vre(vt,or);if(M&&(vt=KN(vt,M,P,je)),j&&(vt=YN(vt,j,q,je)),pt-=kr,je&&pt<Se){var pn=Zi(vt,or);return nL(d,p,th,et.placeholder,x,vt,pn,X,oe,Se-pt)}var ho=Me?x:this,fi=Pe?ho[d]:d;return pt=vt.length,X?vt=Oie(vt,X):Qe&&pt>1&&vt.reverse(),Ce&&oe<pt&&(vt.length=oe),this&&this!==$n&&this instanceof et&&(fi=ct||mu(fi)),fi.apply(ho,vt)}return et}function eL(d,p){return function(x,M){return Loe(x,d,p(M),{})}}function nh(d,p){return function(x,M){var P;if(x===n&&M===n)return p;if(x!==n&&(P=x),M!==n){if(P===n)return M;typeof x=="string"||typeof M=="string"?(x=Er(x),M=Er(M)):(x=BN(x),M=BN(M)),P=d(x,M)}return P}}function lx(d){return li(function(p){return p=Xt(p,Tr(Ze())),ut(function(x){var M=this;return d(p,function(P){return wr(P,M,x)})})})}function rh(d,p){p=p===n?" ":Er(p);var x=p.length;if(x<2)return x?tx(p,d):p;var M=tx(p,jp(d/il(p)));return ol(p)?ns(uo(M),0,d).join(""):M.slice(0,d)}function lie(d,p,x,M){var P=p&S,j=mu(d);function q(){for(var X=-1,oe=arguments.length,Se=-1,Ce=M.length,Me=ce(Ce+oe),Pe=this&&this!==$n&&this instanceof q?j:d;++Se<Ce;)Me[Se]=M[Se];for(;oe--;)Me[Se++]=arguments[++X];return wr(Pe,P?x:this,Me)}return q}function tL(d){return function(p,x,M){return M&&typeof M!="number"&&rr(p,x,M)&&(x=M=n),p=di(p),x===n?(x=p,p=0):x=di(x),M=M===n?p<x?1:-1:di(M),Koe(p,x,M,d)}}function oh(d){return function(p,x){return typeof p=="string"&&typeof x=="string"||(p=Zr(p),x=Zr(x)),d(p,x)}}function nL(d,p,x,M,P,j,q,X,oe,Se){var Ce=p&T,Me=Ce?q:n,Pe=Ce?n:q,je=Ce?j:n,Qe=Ce?n:j;p|=Ce?O:A,p&=~(Ce?A:O),p&E||(p&=~(S|C));var ct=[d,p,P,je,Me,Qe,Pe,X,oe,Se],et=x.apply(n,ct);return gx(d)&&hL(et,ct),et.placeholder=M,mL(et,d,p)}function cx(d){var p=xn[d];return function(x,M){if(x=Zr(x),M=M==null?0:Un(it(M),292),M&&mN(x)){var P=(Ot(x)+"e").split("e"),j=p(P[0]+"e"+(+P[1]+M));return P=(Ot(j)+"e").split("e"),+(P[0]+"e"+(+P[1]-M))}return p(x)}}var cie=ll&&1/_p(new ll([,-0]))[1]==W?function(d){return new ll(d)}:Dx;function rL(d){return function(p){var x=Kn(p);return x==le?B1(p):x==Ge?Mre(p):bre(p,d(p))}}function ai(d,p,x,M,P,j,q,X){var oe=p&C;if(!oe&&typeof d!="function")throw new Ur(s);var Se=M?M.length:0;if(Se||(p&=~(O|A),M=P=n),q=q===n?q:Sn(it(q),0),X=X===n?X:it(X),Se-=P?P.length:0,p&A){var Ce=M,Me=P;M=P=n}var Pe=oe?n:fx(d),je=[d,p,x,M,P,Ce,Me,j,q,X];if(Pe&&Tie(je,Pe),d=je[0],p=je[1],x=je[2],M=je[3],P=je[4],X=je[9]=je[9]===n?oe?0:d.length:Sn(je[9]-Se,0),!X&&p&(T|w)&&(p&=~(T|w)),!p||p==S)var Qe=sie(d,p,x);else p==T||p==w?Qe=aie(d,p,X):(p==O||p==(S|O))&&!P.length?Qe=lie(d,p,x,M):Qe=th.apply(n,je);var ct=Pe?FN:hL;return mL(ct(Qe,je),d,p)}function oL(d,p,x,M){return d===n||po(d,al[x])&&!kt.call(M,x)?p:d}function iL(d,p,x,M,P,j){return tn(d)&&tn(p)&&(j.set(p,d),Zp(d,p,n,iL,j),j.delete(p)),d}function uie(d){return bu(d)?n:d}function sL(d,p,x,M,P,j){var q=x&b,X=d.length,oe=p.length;if(X!=oe&&!(q&&oe>X))return!1;var Se=j.get(d),Ce=j.get(p);if(Se&&Ce)return Se==p&&Ce==d;var Me=-1,Pe=!0,je=x&y?new Ys:n;for(j.set(d,p),j.set(p,d);++Me<X;){var Qe=d[Me],ct=p[Me];if(M)var et=q?M(ct,Qe,Me,p,d,j):M(Qe,ct,Me,d,p,j);if(et!==n){if(et)continue;Pe=!1;break}if(je){if(!_1(p,function(pt,vt){if(!ou(je,vt)&&(Qe===pt||P(Qe,pt,x,M,j)))return je.push(vt)})){Pe=!1;break}}else if(!(Qe===ct||P(Qe,ct,x,M,j))){Pe=!1;break}}return j.delete(d),j.delete(p),Pe}function die(d,p,x,M,P,j,q){switch(x){case $t:if(d.byteLength!=p.byteLength||d.byteOffset!=p.byteOffset)return!1;d=d.buffer,p=p.buffer;case cn:return!(d.byteLength!=p.byteLength||!j(new Bp(d),new Bp(p)));case K:case Q:case ge:return po(+d,+p);case he:return d.name==p.name&&d.message==p.message;case He:case De:return d==p+"";case le:var X=B1;case Ge:var oe=M&b;if(X||(X=_p),d.size!=p.size&&!oe)return!1;var Se=q.get(d);if(Se)return Se==p;M|=y,q.set(d,p);var Ce=sL(X(d),X(p),M,P,j,q);return q.delete(d),Ce;case lt:if(cu)return cu.call(d)==cu.call(p)}return!1}function fie(d,p,x,M,P,j){var q=x&b,X=ux(d),oe=X.length,Se=ux(p),Ce=Se.length;if(oe!=Ce&&!q)return!1;for(var Me=oe;Me--;){var Pe=X[Me];if(!(q?Pe in p:kt.call(p,Pe)))return!1}var je=j.get(d),Qe=j.get(p);if(je&&Qe)return je==p&&Qe==d;var ct=!0;j.set(d,p),j.set(p,d);for(var et=q;++Me<oe;){Pe=X[Me];var pt=d[Pe],vt=p[Pe];if(M)var Or=q?M(vt,pt,Pe,p,d,j):M(pt,vt,Pe,d,p,j);if(!(Or===n?pt===vt||P(pt,vt,x,M,j):Or)){ct=!1;break}et||(et=Pe=="constructor")}if(ct&&!et){var or=d.constructor,kr=p.constructor;or!=kr&&"constructor"in d&&"constructor"in p&&!(typeof or=="function"&&or instanceof or&&typeof kr=="function"&&kr instanceof kr)&&(ct=!1)}return j.delete(d),j.delete(p),ct}function li(d){return bx(fL(d,n,SL),d+"")}function ux(d){return MN(d,In,hx)}function dx(d){return MN(d,mr,aL)}var fx=qp?function(d){return qp.get(d)}:Dx;function ih(d){for(var p=d.name+"",x=cl[p],M=kt.call(cl,p)?x.length:0;M--;){var P=x[M],j=P.func;if(j==null||j==d)return P.name}return p}function pl(d){var p=kt.call(V,"placeholder")?V:d;return p.placeholder}function Ze(){var d=V.iteratee||Ax;return d=d===Ax?AN:d,arguments.length?d(arguments[0],arguments[1]):d}function sh(d,p){var x=d.__data__;return xie(p)?x[typeof p=="string"?"string":"hash"]:x.map}function px(d){for(var p=In(d),x=p.length;x--;){var M=p[x],P=d[M];p[x]=[M,P,uL(P)]}return p}function Zs(d,p){var x=wre(d,p);return kN(x)?x:n}function pie(d){var p=kt.call(d,Us),x=d[Us];try{d[Us]=n;var M=!0}catch{}var P=Fp.call(d);return M&&(p?d[Us]=x:delete d[Us]),P}var hx=z1?function(d){return d==null?[]:(d=Ft(d),Gi(z1(d),function(p){return pN.call(d,p)}))}:Px,aL=z1?function(d){for(var p=[];d;)Ji(p,hx(d)),d=Vp(d);return p}:Px,Kn=nr;(H1&&Kn(new H1(new ArrayBuffer(1)))!=$t||su&&Kn(new su)!=le||j1&&Kn(j1.resolve())!=Oe||ll&&Kn(new ll)!=Ge||au&&Kn(new au)!=Zt)&&(Kn=function(d){var p=nr(d),x=p==xe?d.constructor:n,M=x?Xs(x):"";if(M)switch(M){case Gre:return $t;case Jre:return le;case Zre:return Oe;case Xre:return Ge;case Qre:return Zt}return p});function hie(d,p,x){for(var M=-1,P=x.length;++M<P;){var j=x[M],q=j.size;switch(j.type){case"drop":d+=q;break;case"dropRight":p-=q;break;case"take":p=Un(p,d+q);break;case"takeRight":d=Sn(d,p-q);break}}return{start:d,end:p}}function mie(d){var p=d.match(Sne);return p?p[1].split(Cne):[]}function lL(d,p,x){p=ts(p,d);for(var M=-1,P=p.length,j=!1;++M<P;){var q=$o(p[M]);if(!(j=d!=null&&x(d,q)))break;d=d[q]}return j||++M!=P?j:(P=d==null?0:d.length,!!P&&ph(P)&&ci(q,P)&&(ot(d)||Qs(d)))}function gie(d){var p=d.length,x=new d.constructor(p);return p&&typeof d[0]=="string"&&kt.call(d,"index")&&(x.index=d.index,x.input=d.input),x}function cL(d){return typeof d.constructor=="function"&&!gu(d)?ul(Vp(d)):{}}function yie(d,p,x){var M=d.constructor;switch(p){case cn:return ax(d);case K:case Q:return new M(+d);case $t:return eie(d,x);case An:case qn:case dt:case Ln:case Kt:case de:case $e:case Ee:case Re:return qN(d,x);case le:return new M;case ge:case De:return new M(d);case He:return tie(d);case Ge:return new M;case lt:return nie(d)}}function bie(d,p){var x=p.length;if(!x)return d;var M=x-1;return p[M]=(x>1?"& ":"")+p[M],p=p.join(x>2?", ":" "),d.replace(xne,`{
87
+ /* [wrapped with `+p+`] */
88
+ `)}function vie(d){return ot(d)||Qs(d)||!!(hN&&d&&d[hN])}function ci(d,p){var x=typeof d;return p=p??U,!!p&&(x=="number"||x!="symbol"&&Dne.test(d))&&d>-1&&d%1==0&&d<p}function rr(d,p,x){if(!tn(x))return!1;var M=typeof p;return(M=="number"?hr(x)&&ci(p,x.length):M=="string"&&p in x)?po(x[p],d):!1}function mx(d,p){if(ot(d))return!1;var x=typeof d;return x=="number"||x=="symbol"||x=="boolean"||d==null||Mr(d)?!0:tl.test(d)||!ru.test(d)||p!=null&&d in Ft(p)}function xie(d){var p=typeof d;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?d!=="__proto__":d===null}function gx(d){var p=ih(d),x=V[p];if(typeof x!="function"||!(p in mt.prototype))return!1;if(d===x)return!0;var M=fx(x);return!!M&&d===M[0]}function Sie(d){return!!uN&&uN in d}var Cie=Lp?ui:_x;function gu(d){var p=d&&d.constructor,x=typeof p=="function"&&p.prototype||al;return d===x}function uL(d){return d===d&&!tn(d)}function dL(d,p){return function(x){return x==null?!1:x[d]===p&&(p!==n||d in Ft(x))}}function wie(d){var p=dh(d,function(M){return x.size===u&&x.clear(),M}),x=p.cache;return p}function Tie(d,p){var x=d[1],M=p[1],P=x|M,j=P<(S|C|N),q=M==N&&x==T||M==N&&x==D&&d[7].length<=p[8]||M==(N|D)&&p[7].length<=p[8]&&x==T;if(!(j||q))return d;M&S&&(d[2]=p[2],P|=x&S?0:E);var X=p[3];if(X){var oe=d[3];d[3]=oe?KN(oe,X,p[4]):X,d[4]=oe?Zi(d[3],f):p[4]}return X=p[5],X&&(oe=d[5],d[5]=oe?YN(oe,X,p[6]):X,d[6]=oe?Zi(d[5],f):p[6]),X=p[7],X&&(d[7]=X),M&N&&(d[8]=d[8]==null?p[8]:Un(d[8],p[8])),d[9]==null&&(d[9]=p[9]),d[0]=p[0],d[1]=P,d}function Eie(d){var p=[];if(d!=null)for(var x in Ft(d))p.push(x);return p}function Mie(d){return Fp.call(d)}function fL(d,p,x){return p=Sn(p===n?d.length-1:p,0),function(){for(var M=arguments,P=-1,j=Sn(M.length-p,0),q=ce(j);++P<j;)q[P]=M[p+P];P=-1;for(var X=ce(p+1);++P<p;)X[P]=M[P];return X[p]=x(q),wr(d,this,X)}}function pL(d,p){return p.length<2?d:Js(d,Gr(p,0,-1))}function Oie(d,p){for(var x=d.length,M=Un(p.length,x),P=pr(d);M--;){var j=p[M];d[M]=ci(j,x)?P[j]:n}return d}function yx(d,p){if(!(p==="constructor"&&typeof d[p]=="function")&&p!="__proto__")return d[p]}var hL=gL(FN),yu=Hre||function(d,p){return $n.setTimeout(d,p)},bx=gL(Joe);function mL(d,p,x){var M=p+"";return bx(d,bie(M,kie(mie(M),x)))}function gL(d){var p=0,x=0;return function(){var M=Ure(),P=H-(M-x);if(x=M,P>0){if(++p>=$)return arguments[0]}else p=0;return d.apply(n,arguments)}}function ah(d,p){var x=-1,M=d.length,P=M-1;for(p=p===n?M:p;++x<p;){var j=ex(x,P),q=d[j];d[j]=d[x],d[x]=q}return d.length=p,d}var yL=wie(function(d){var p=[];return d.charCodeAt(0)===46&&p.push(""),d.replace(yne,function(x,M,P,j){p.push(P?j.replace(Ene,"$1"):M||x)}),p});function $o(d){if(typeof d=="string"||Mr(d))return d;var p=d+"";return p=="0"&&1/d==-W?"-0":p}function Xs(d){if(d!=null){try{return $p.call(d)}catch{}try{return d+""}catch{}}return""}function kie(d,p){return qr(pe,function(x){var M="_."+x[0];p&x[1]&&!Dp(d,M)&&d.push(M)}),d.sort()}function bL(d){if(d instanceof mt)return d.clone();var p=new Kr(d.__wrapped__,d.__chain__);return p.__actions__=pr(d.__actions__),p.__index__=d.__index__,p.__values__=d.__values__,p}function Aie(d,p,x){(x?rr(d,p,x):p===n)?p=1:p=Sn(it(p),0);var M=d==null?0:d.length;if(!M||p<1)return[];for(var P=0,j=0,q=ce(jp(M/p));P<M;)q[j++]=Gr(d,P,P+=p);return q}function Iie(d){for(var p=-1,x=d==null?0:d.length,M=0,P=[];++p<x;){var j=d[p];j&&(P[M++]=j)}return P}function Die(){var d=arguments.length;if(!d)return[];for(var p=ce(d-1),x=arguments[0],M=d;M--;)p[M-1]=arguments[M];return Ji(ot(x)?pr(x):[x],Fn(p,1))}var Pie=ut(function(d,p){return fn(d)?du(d,Fn(p,1,fn,!0)):[]}),_ie=ut(function(d,p){var x=Jr(p);return fn(x)&&(x=n),fn(d)?du(d,Fn(p,1,fn,!0),Ze(x,2)):[]}),Nie=ut(function(d,p){var x=Jr(p);return fn(x)&&(x=n),fn(d)?du(d,Fn(p,1,fn,!0),n,x):[]});function Lie(d,p,x){var M=d==null?0:d.length;return M?(p=x||p===n?1:it(p),Gr(d,p<0?0:p,M)):[]}function $ie(d,p,x){var M=d==null?0:d.length;return M?(p=x||p===n?1:it(p),p=M-p,Gr(d,0,p<0?0:p)):[]}function Fie(d,p){return d&&d.length?Qp(d,Ze(p,3),!0,!0):[]}function Rie(d,p){return d&&d.length?Qp(d,Ze(p,3),!0):[]}function Bie(d,p,x,M){var P=d==null?0:d.length;return P?(x&&typeof x!="number"&&rr(d,p,x)&&(x=0,M=P),Doe(d,p,x,M)):[]}function vL(d,p,x){var M=d==null?0:d.length;if(!M)return-1;var P=x==null?0:it(x);return P<0&&(P=Sn(M+P,0)),Pp(d,Ze(p,3),P)}function xL(d,p,x){var M=d==null?0:d.length;if(!M)return-1;var P=M-1;return x!==n&&(P=it(x),P=x<0?Sn(M+P,0):Un(P,M-1)),Pp(d,Ze(p,3),P,!0)}function SL(d){var p=d==null?0:d.length;return p?Fn(d,1):[]}function Vie(d){var p=d==null?0:d.length;return p?Fn(d,W):[]}function zie(d,p){var x=d==null?0:d.length;return x?(p=p===n?1:it(p),Fn(d,p)):[]}function Hie(d){for(var p=-1,x=d==null?0:d.length,M={};++p<x;){var P=d[p];M[P[0]]=P[1]}return M}function CL(d){return d&&d.length?d[0]:n}function jie(d,p,x){var M=d==null?0:d.length;if(!M)return-1;var P=x==null?0:it(x);return P<0&&(P=Sn(M+P,0)),rl(d,p,P)}function Wie(d){var p=d==null?0:d.length;return p?Gr(d,0,-1):[]}var qie=ut(function(d){var p=Xt(d,ix);return p.length&&p[0]===d[0]?G1(p):[]}),Uie=ut(function(d){var p=Jr(d),x=Xt(d,ix);return p===Jr(x)?p=n:x.pop(),x.length&&x[0]===d[0]?G1(x,Ze(p,2)):[]}),Kie=ut(function(d){var p=Jr(d),x=Xt(d,ix);return p=typeof p=="function"?p:n,p&&x.pop(),x.length&&x[0]===d[0]?G1(x,n,p):[]});function Yie(d,p){return d==null?"":Wre.call(d,p)}function Jr(d){var p=d==null?0:d.length;return p?d[p-1]:n}function Gie(d,p,x){var M=d==null?0:d.length;if(!M)return-1;var P=M;return x!==n&&(P=it(x),P=P<0?Sn(M+P,0):Un(P,M-1)),p===p?kre(d,p,P):Pp(d,nN,P,!0)}function Jie(d,p){return d&&d.length?_N(d,it(p)):n}var Zie=ut(wL);function wL(d,p){return d&&d.length&&p&&p.length?Q1(d,p):d}function Xie(d,p,x){return d&&d.length&&p&&p.length?Q1(d,p,Ze(x,2)):d}function Qie(d,p,x){return d&&d.length&&p&&p.length?Q1(d,p,n,x):d}var ese=li(function(d,p){var x=d==null?0:d.length,M=q1(d,p);return $N(d,Xt(p,function(P){return ci(P,x)?+P:P}).sort(UN)),M});function tse(d,p){var x=[];if(!(d&&d.length))return x;var M=-1,P=[],j=d.length;for(p=Ze(p,3);++M<j;){var q=d[M];p(q,M,d)&&(x.push(q),P.push(M))}return $N(d,P),x}function vx(d){return d==null?d:Yre.call(d)}function nse(d,p,x){var M=d==null?0:d.length;return M?(x&&typeof x!="number"&&rr(d,p,x)?(p=0,x=M):(p=p==null?0:it(p),x=x===n?M:it(x)),Gr(d,p,x)):[]}function rse(d,p){return Xp(d,p)}function ose(d,p,x){return nx(d,p,Ze(x,2))}function ise(d,p){var x=d==null?0:d.length;if(x){var M=Xp(d,p);if(M<x&&po(d[M],p))return M}return-1}function sse(d,p){return Xp(d,p,!0)}function ase(d,p,x){return nx(d,p,Ze(x,2),!0)}function lse(d,p){var x=d==null?0:d.length;if(x){var M=Xp(d,p,!0)-1;if(po(d[M],p))return M}return-1}function cse(d){return d&&d.length?RN(d):[]}function use(d,p){return d&&d.length?RN(d,Ze(p,2)):[]}function dse(d){var p=d==null?0:d.length;return p?Gr(d,1,p):[]}function fse(d,p,x){return d&&d.length?(p=x||p===n?1:it(p),Gr(d,0,p<0?0:p)):[]}function pse(d,p,x){var M=d==null?0:d.length;return M?(p=x||p===n?1:it(p),p=M-p,Gr(d,p<0?0:p,M)):[]}function hse(d,p){return d&&d.length?Qp(d,Ze(p,3),!1,!0):[]}function mse(d,p){return d&&d.length?Qp(d,Ze(p,3)):[]}var gse=ut(function(d){return es(Fn(d,1,fn,!0))}),yse=ut(function(d){var p=Jr(d);return fn(p)&&(p=n),es(Fn(d,1,fn,!0),Ze(p,2))}),bse=ut(function(d){var p=Jr(d);return p=typeof p=="function"?p:n,es(Fn(d,1,fn,!0),n,p)});function vse(d){return d&&d.length?es(d):[]}function xse(d,p){return d&&d.length?es(d,Ze(p,2)):[]}function Sse(d,p){return p=typeof p=="function"?p:n,d&&d.length?es(d,n,p):[]}function xx(d){if(!(d&&d.length))return[];var p=0;return d=Gi(d,function(x){if(fn(x))return p=Sn(x.length,p),!0}),F1(p,function(x){return Xt(d,N1(x))})}function TL(d,p){if(!(d&&d.length))return[];var x=xx(d);return p==null?x:Xt(x,function(M){return wr(p,n,M)})}var Cse=ut(function(d,p){return fn(d)?du(d,p):[]}),wse=ut(function(d){return ox(Gi(d,fn))}),Tse=ut(function(d){var p=Jr(d);return fn(p)&&(p=n),ox(Gi(d,fn),Ze(p,2))}),Ese=ut(function(d){var p=Jr(d);return p=typeof p=="function"?p:n,ox(Gi(d,fn),n,p)}),Mse=ut(xx);function Ose(d,p){return HN(d||[],p||[],uu)}function kse(d,p){return HN(d||[],p||[],hu)}var Ase=ut(function(d){var p=d.length,x=p>1?d[p-1]:n;return x=typeof x=="function"?(d.pop(),x):n,TL(d,x)});function EL(d){var p=V(d);return p.__chain__=!0,p}function Ise(d,p){return p(d),d}function lh(d,p){return p(d)}var Dse=li(function(d){var p=d.length,x=p?d[0]:0,M=this.__wrapped__,P=function(j){return q1(j,d)};return p>1||this.__actions__.length||!(M instanceof mt)||!ci(x)?this.thru(P):(M=M.slice(x,+x+(p?1:0)),M.__actions__.push({func:lh,args:[P],thisArg:n}),new Kr(M,this.__chain__).thru(function(j){return p&&!j.length&&j.push(n),j}))});function Pse(){return EL(this)}function _se(){return new Kr(this.value(),this.__chain__)}function Nse(){this.__values__===n&&(this.__values__=BL(this.value()));var d=this.__index__>=this.__values__.length,p=d?n:this.__values__[this.__index__++];return{done:d,value:p}}function Lse(){return this}function $se(d){for(var p,x=this;x instanceof Kp;){var M=bL(x);M.__index__=0,M.__values__=n,p?P.__wrapped__=M:p=M;var P=M;x=x.__wrapped__}return P.__wrapped__=d,p}function Fse(){var d=this.__wrapped__;if(d instanceof mt){var p=d;return this.__actions__.length&&(p=new mt(this)),p=p.reverse(),p.__actions__.push({func:lh,args:[vx],thisArg:n}),new Kr(p,this.__chain__)}return this.thru(vx)}function Rse(){return zN(this.__wrapped__,this.__actions__)}var Bse=eh(function(d,p,x){kt.call(d,x)?++d[x]:si(d,x,1)});function Vse(d,p,x){var M=ot(d)?eN:Ioe;return x&&rr(d,p,x)&&(p=n),M(d,Ze(p,3))}function zse(d,p){var x=ot(d)?Gi:TN;return x(d,Ze(p,3))}var Hse=XN(vL),jse=XN(xL);function Wse(d,p){return Fn(ch(d,p),1)}function qse(d,p){return Fn(ch(d,p),W)}function Use(d,p,x){return x=x===n?1:it(x),Fn(ch(d,p),x)}function ML(d,p){var x=ot(d)?qr:Qi;return x(d,Ze(p,3))}function OL(d,p){var x=ot(d)?dre:wN;return x(d,Ze(p,3))}var Kse=eh(function(d,p,x){kt.call(d,x)?d[x].push(p):si(d,x,[p])});function Yse(d,p,x,M){d=hr(d)?d:ml(d),x=x&&!M?it(x):0;var P=d.length;return x<0&&(x=Sn(P+x,0)),hh(d)?x<=P&&d.indexOf(p,x)>-1:!!P&&rl(d,p,x)>-1}var Gse=ut(function(d,p,x){var M=-1,P=typeof p=="function",j=hr(d)?ce(d.length):[];return Qi(d,function(q){j[++M]=P?wr(p,q,x):fu(q,p,x)}),j}),Jse=eh(function(d,p,x){si(d,x,p)});function ch(d,p){var x=ot(d)?Xt:IN;return x(d,Ze(p,3))}function Zse(d,p,x,M){return d==null?[]:(ot(p)||(p=p==null?[]:[p]),x=M?n:x,ot(x)||(x=x==null?[]:[x]),NN(d,p,x))}var Xse=eh(function(d,p,x){d[x?0:1].push(p)},function(){return[[],[]]});function Qse(d,p,x){var M=ot(d)?P1:oN,P=arguments.length<3;return M(d,Ze(p,4),x,P,Qi)}function eae(d,p,x){var M=ot(d)?fre:oN,P=arguments.length<3;return M(d,Ze(p,4),x,P,wN)}function tae(d,p){var x=ot(d)?Gi:TN;return x(d,fh(Ze(p,3)))}function nae(d){var p=ot(d)?vN:Yoe;return p(d)}function rae(d,p,x){(x?rr(d,p,x):p===n)?p=1:p=it(p);var M=ot(d)?Eoe:Goe;return M(d,p)}function oae(d){var p=ot(d)?Moe:Zoe;return p(d)}function iae(d){if(d==null)return 0;if(hr(d))return hh(d)?il(d):d.length;var p=Kn(d);return p==le||p==Ge?d.size:Z1(d).length}function sae(d,p,x){var M=ot(d)?_1:Xoe;return x&&rr(d,p,x)&&(p=n),M(d,Ze(p,3))}var aae=ut(function(d,p){if(d==null)return[];var x=p.length;return x>1&&rr(d,p[0],p[1])?p=[]:x>2&&rr(p[0],p[1],p[2])&&(p=[p[0]]),NN(d,Fn(p,1),[])}),uh=zre||function(){return $n.Date.now()};function lae(d,p){if(typeof p!="function")throw new Ur(s);return d=it(d),function(){if(--d<1)return p.apply(this,arguments)}}function kL(d,p,x){return p=x?n:p,p=d&&p==null?d.length:p,ai(d,N,n,n,n,n,p)}function AL(d,p){var x;if(typeof p!="function")throw new Ur(s);return d=it(d),function(){return--d>0&&(x=p.apply(this,arguments)),d<=1&&(p=n),x}}var Sx=ut(function(d,p,x){var M=S;if(x.length){var P=Zi(x,pl(Sx));M|=O}return ai(d,M,p,x,P)}),IL=ut(function(d,p,x){var M=S|C;if(x.length){var P=Zi(x,pl(IL));M|=O}return ai(p,M,d,x,P)});function DL(d,p,x){p=x?n:p;var M=ai(d,T,n,n,n,n,n,p);return M.placeholder=DL.placeholder,M}function PL(d,p,x){p=x?n:p;var M=ai(d,w,n,n,n,n,n,p);return M.placeholder=PL.placeholder,M}function _L(d,p,x){var M,P,j,q,X,oe,Se=0,Ce=!1,Me=!1,Pe=!0;if(typeof d!="function")throw new Ur(s);p=Zr(p)||0,tn(x)&&(Ce=!!x.leading,Me="maxWait"in x,j=Me?Sn(Zr(x.maxWait)||0,p):j,Pe="trailing"in x?!!x.trailing:Pe);function je(pn){var ho=M,fi=P;return M=P=n,Se=pn,q=d.apply(fi,ho),q}function Qe(pn){return Se=pn,X=yu(pt,p),Ce?je(pn):q}function ct(pn){var ho=pn-oe,fi=pn-Se,XL=p-ho;return Me?Un(XL,j-fi):XL}function et(pn){var ho=pn-oe,fi=pn-Se;return oe===n||ho>=p||ho<0||Me&&fi>=j}function pt(){var pn=uh();if(et(pn))return vt(pn);X=yu(pt,ct(pn))}function vt(pn){return X=n,Pe&&M?je(pn):(M=P=n,q)}function Or(){X!==n&&jN(X),Se=0,M=oe=P=X=n}function or(){return X===n?q:vt(uh())}function kr(){var pn=uh(),ho=et(pn);if(M=arguments,P=this,oe=pn,ho){if(X===n)return Qe(oe);if(Me)return jN(X),X=yu(pt,p),je(oe)}return X===n&&(X=yu(pt,p)),q}return kr.cancel=Or,kr.flush=or,kr}var cae=ut(function(d,p){return CN(d,1,p)}),uae=ut(function(d,p,x){return CN(d,Zr(p)||0,x)});function dae(d){return ai(d,L)}function dh(d,p){if(typeof d!="function"||p!=null&&typeof p!="function")throw new Ur(s);var x=function(){var M=arguments,P=p?p.apply(this,M):M[0],j=x.cache;if(j.has(P))return j.get(P);var q=d.apply(this,M);return x.cache=j.set(P,q)||j,q};return x.cache=new(dh.Cache||ii),x}dh.Cache=ii;function fh(d){if(typeof d!="function")throw new Ur(s);return function(){var p=arguments;switch(p.length){case 0:return!d.call(this);case 1:return!d.call(this,p[0]);case 2:return!d.call(this,p[0],p[1]);case 3:return!d.call(this,p[0],p[1],p[2])}return!d.apply(this,p)}}function fae(d){return AL(2,d)}var pae=Qoe(function(d,p){p=p.length==1&&ot(p[0])?Xt(p[0],Tr(Ze())):Xt(Fn(p,1),Tr(Ze()));var x=p.length;return ut(function(M){for(var P=-1,j=Un(M.length,x);++P<j;)M[P]=p[P].call(this,M[P]);return wr(d,this,M)})}),Cx=ut(function(d,p){var x=Zi(p,pl(Cx));return ai(d,O,n,p,x)}),NL=ut(function(d,p){var x=Zi(p,pl(NL));return ai(d,A,n,p,x)}),hae=li(function(d,p){return ai(d,D,n,n,n,p)});function mae(d,p){if(typeof d!="function")throw new Ur(s);return p=p===n?p:it(p),ut(d,p)}function gae(d,p){if(typeof d!="function")throw new Ur(s);return p=p==null?0:Sn(it(p),0),ut(function(x){var M=x[p],P=ns(x,0,p);return M&&Ji(P,M),wr(d,this,P)})}function yae(d,p,x){var M=!0,P=!0;if(typeof d!="function")throw new Ur(s);return tn(x)&&(M="leading"in x?!!x.leading:M,P="trailing"in x?!!x.trailing:P),_L(d,p,{leading:M,maxWait:p,trailing:P})}function bae(d){return kL(d,1)}function vae(d,p){return Cx(sx(p),d)}function xae(){if(!arguments.length)return[];var d=arguments[0];return ot(d)?d:[d]}function Sae(d){return Yr(d,g)}function Cae(d,p){return p=typeof p=="function"?p:n,Yr(d,g,p)}function wae(d){return Yr(d,h|g)}function Tae(d,p){return p=typeof p=="function"?p:n,Yr(d,h|g,p)}function Eae(d,p){return p==null||SN(d,p,In(p))}function po(d,p){return d===p||d!==d&&p!==p}var Mae=oh(Y1),Oae=oh(function(d,p){return d>=p}),Qs=ON(function(){return arguments}())?ON:function(d){return un(d)&&kt.call(d,"callee")&&!pN.call(d,"callee")},ot=ce.isArray,kae=Y_?Tr(Y_):$oe;function hr(d){return d!=null&&ph(d.length)&&!ui(d)}function fn(d){return un(d)&&hr(d)}function Aae(d){return d===!0||d===!1||un(d)&&nr(d)==K}var rs=jre||_x,Iae=G_?Tr(G_):Foe;function Dae(d){return un(d)&&d.nodeType===1&&!bu(d)}function Pae(d){if(d==null)return!0;if(hr(d)&&(ot(d)||typeof d=="string"||typeof d.splice=="function"||rs(d)||hl(d)||Qs(d)))return!d.length;var p=Kn(d);if(p==le||p==Ge)return!d.size;if(gu(d))return!Z1(d).length;for(var x in d)if(kt.call(d,x))return!1;return!0}function _ae(d,p){return pu(d,p)}function Nae(d,p,x){x=typeof x=="function"?x:n;var M=x?x(d,p):n;return M===n?pu(d,p,n,x):!!M}function wx(d){if(!un(d))return!1;var p=nr(d);return p==he||p==ie||typeof d.message=="string"&&typeof d.name=="string"&&!bu(d)}function Lae(d){return typeof d=="number"&&mN(d)}function ui(d){if(!tn(d))return!1;var p=nr(d);return p==ee||p==se||p==ae||p==Le}function LL(d){return typeof d=="number"&&d==it(d)}function ph(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=U}function tn(d){var p=typeof d;return d!=null&&(p=="object"||p=="function")}function un(d){return d!=null&&typeof d=="object"}var $L=J_?Tr(J_):Boe;function $ae(d,p){return d===p||J1(d,p,px(p))}function Fae(d,p,x){return x=typeof x=="function"?x:n,J1(d,p,px(p),x)}function Rae(d){return FL(d)&&d!=+d}function Bae(d){if(Cie(d))throw new rt(i);return kN(d)}function Vae(d){return d===null}function zae(d){return d==null}function FL(d){return typeof d=="number"||un(d)&&nr(d)==ge}function bu(d){if(!un(d)||nr(d)!=xe)return!1;var p=Vp(d);if(p===null)return!0;var x=kt.call(p,"constructor")&&p.constructor;return typeof x=="function"&&x instanceof x&&$p.call(x)==Fre}var Tx=Z_?Tr(Z_):Voe;function Hae(d){return LL(d)&&d>=-U&&d<=U}var RL=X_?Tr(X_):zoe;function hh(d){return typeof d=="string"||!ot(d)&&un(d)&&nr(d)==De}function Mr(d){return typeof d=="symbol"||un(d)&&nr(d)==lt}var hl=Q_?Tr(Q_):Hoe;function jae(d){return d===n}function Wae(d){return un(d)&&Kn(d)==Zt}function qae(d){return un(d)&&nr(d)==vn}var Uae=oh(X1),Kae=oh(function(d,p){return d<=p});function BL(d){if(!d)return[];if(hr(d))return hh(d)?uo(d):pr(d);if(iu&&d[iu])return Ere(d[iu]());var p=Kn(d),x=p==le?B1:p==Ge?_p:ml;return x(d)}function di(d){if(!d)return d===0?d:0;if(d=Zr(d),d===W||d===-W){var p=d<0?-1:1;return p*G}return d===d?d:0}function it(d){var p=di(d),x=p%1;return p===p?x?p-x:p:0}function VL(d){return d?Gs(it(d),0,Z):0}function Zr(d){if(typeof d=="number")return d;if(Mr(d))return Y;if(tn(d)){var p=typeof d.valueOf=="function"?d.valueOf():d;d=tn(p)?p+"":p}if(typeof d!="string")return d===0?d:+d;d=iN(d);var x=kne.test(d);return x||Ine.test(d)?lre(d.slice(2),x?2:8):One.test(d)?Y:+d}function zL(d){return Lo(d,mr(d))}function Yae(d){return d?Gs(it(d),-U,U):d===0?d:0}function Ot(d){return d==null?"":Er(d)}var Gae=dl(function(d,p){if(gu(p)||hr(p)){Lo(p,In(p),d);return}for(var x in p)kt.call(p,x)&&uu(d,x,p[x])}),HL=dl(function(d,p){Lo(p,mr(p),d)}),mh=dl(function(d,p,x,M){Lo(p,mr(p),d,M)}),Jae=dl(function(d,p,x,M){Lo(p,In(p),d,M)}),Zae=li(q1);function Xae(d,p){var x=ul(d);return p==null?x:xN(x,p)}var Qae=ut(function(d,p){d=Ft(d);var x=-1,M=p.length,P=M>2?p[2]:n;for(P&&rr(p[0],p[1],P)&&(M=1);++x<M;)for(var j=p[x],q=mr(j),X=-1,oe=q.length;++X<oe;){var Se=q[X],Ce=d[Se];(Ce===n||po(Ce,al[Se])&&!kt.call(d,Se))&&(d[Se]=j[Se])}return d}),ele=ut(function(d){return d.push(n,iL),wr(jL,n,d)});function tle(d,p){return tN(d,Ze(p,3),No)}function nle(d,p){return tN(d,Ze(p,3),K1)}function rle(d,p){return d==null?d:U1(d,Ze(p,3),mr)}function ole(d,p){return d==null?d:EN(d,Ze(p,3),mr)}function ile(d,p){return d&&No(d,Ze(p,3))}function sle(d,p){return d&&K1(d,Ze(p,3))}function ale(d){return d==null?[]:Jp(d,In(d))}function lle(d){return d==null?[]:Jp(d,mr(d))}function Ex(d,p,x){var M=d==null?n:Js(d,p);return M===n?x:M}function cle(d,p){return d!=null&&lL(d,p,Poe)}function Mx(d,p){return d!=null&&lL(d,p,_oe)}var ule=eL(function(d,p,x){p!=null&&typeof p.toString!="function"&&(p=Fp.call(p)),d[p]=x},kx(gr)),dle=eL(function(d,p,x){p!=null&&typeof p.toString!="function"&&(p=Fp.call(p)),kt.call(d,p)?d[p].push(x):d[p]=[x]},Ze),fle=ut(fu);function In(d){return hr(d)?bN(d):Z1(d)}function mr(d){return hr(d)?bN(d,!0):joe(d)}function ple(d,p){var x={};return p=Ze(p,3),No(d,function(M,P,j){si(x,p(M,P,j),M)}),x}function hle(d,p){var x={};return p=Ze(p,3),No(d,function(M,P,j){si(x,P,p(M,P,j))}),x}var mle=dl(function(d,p,x){Zp(d,p,x)}),jL=dl(function(d,p,x,M){Zp(d,p,x,M)}),gle=li(function(d,p){var x={};if(d==null)return x;var M=!1;p=Xt(p,function(j){return j=ts(j,d),M||(M=j.length>1),j}),Lo(d,dx(d),x),M&&(x=Yr(x,h|m|g,uie));for(var P=p.length;P--;)rx(x,p[P]);return x});function yle(d,p){return WL(d,fh(Ze(p)))}var ble=li(function(d,p){return d==null?{}:qoe(d,p)});function WL(d,p){if(d==null)return{};var x=Xt(dx(d),function(M){return[M]});return p=Ze(p),LN(d,x,function(M,P){return p(M,P[0])})}function vle(d,p,x){p=ts(p,d);var M=-1,P=p.length;for(P||(P=1,d=n);++M<P;){var j=d==null?n:d[$o(p[M])];j===n&&(M=P,j=x),d=ui(j)?j.call(d):j}return d}function xle(d,p,x){return d==null?d:hu(d,p,x)}function Sle(d,p,x,M){return M=typeof M=="function"?M:n,d==null?d:hu(d,p,x,M)}var qL=rL(In),UL=rL(mr);function Cle(d,p,x){var M=ot(d),P=M||rs(d)||hl(d);if(p=Ze(p,4),x==null){var j=d&&d.constructor;P?x=M?new j:[]:tn(d)?x=ui(j)?ul(Vp(d)):{}:x={}}return(P?qr:No)(d,function(q,X,oe){return p(x,q,X,oe)}),x}function wle(d,p){return d==null?!0:rx(d,p)}function Tle(d,p,x){return d==null?d:VN(d,p,sx(x))}function Ele(d,p,x,M){return M=typeof M=="function"?M:n,d==null?d:VN(d,p,sx(x),M)}function ml(d){return d==null?[]:R1(d,In(d))}function Mle(d){return d==null?[]:R1(d,mr(d))}function Ole(d,p,x){return x===n&&(x=p,p=n),x!==n&&(x=Zr(x),x=x===x?x:0),p!==n&&(p=Zr(p),p=p===p?p:0),Gs(Zr(d),p,x)}function kle(d,p,x){return p=di(p),x===n?(x=p,p=0):x=di(x),d=Zr(d),Noe(d,p,x)}function Ale(d,p,x){if(x&&typeof x!="boolean"&&rr(d,p,x)&&(p=x=n),x===n&&(typeof p=="boolean"?(x=p,p=n):typeof d=="boolean"&&(x=d,d=n)),d===n&&p===n?(d=0,p=1):(d=di(d),p===n?(p=d,d=0):p=di(p)),d>p){var M=d;d=p,p=M}if(x||d%1||p%1){var P=gN();return Un(d+P*(p-d+are("1e-"+((P+"").length-1))),p)}return ex(d,p)}var Ile=fl(function(d,p,x){return p=p.toLowerCase(),d+(x?KL(p):p)});function KL(d){return Ox(Ot(d).toLowerCase())}function YL(d){return d=Ot(d),d&&d.replace(Pne,xre).replace(Zne,"")}function Dle(d,p,x){d=Ot(d),p=Er(p);var M=d.length;x=x===n?M:Gs(it(x),0,M);var P=x;return x-=p.length,x>=0&&d.slice(x,P)==p}function Ple(d){return d=Ot(d),d&&nu.test(d)?d.replace(fr,Sre):d}function _le(d){return d=Ot(d),d&&bne.test(d)?d.replace(C1,"\\$&"):d}var Nle=fl(function(d,p,x){return d+(x?"-":"")+p.toLowerCase()}),Lle=fl(function(d,p,x){return d+(x?" ":"")+p.toLowerCase()}),$le=ZN("toLowerCase");function Fle(d,p,x){d=Ot(d),p=it(p);var M=p?il(d):0;if(!p||M>=p)return d;var P=(p-M)/2;return rh(Wp(P),x)+d+rh(jp(P),x)}function Rle(d,p,x){d=Ot(d),p=it(p);var M=p?il(d):0;return p&&M<p?d+rh(p-M,x):d}function Ble(d,p,x){d=Ot(d),p=it(p);var M=p?il(d):0;return p&&M<p?rh(p-M,x)+d:d}function Vle(d,p,x){return x||p==null?p=0:p&&(p=+p),Kre(Ot(d).replace(w1,""),p||0)}function zle(d,p,x){return(x?rr(d,p,x):p===n)?p=1:p=it(p),tx(Ot(d),p)}function Hle(){var d=arguments,p=Ot(d[0]);return d.length<3?p:p.replace(d[1],d[2])}var jle=fl(function(d,p,x){return d+(x?"_":"")+p.toLowerCase()});function Wle(d,p,x){return x&&typeof x!="number"&&rr(d,p,x)&&(p=x=n),x=x===n?Z:x>>>0,x?(d=Ot(d),d&&(typeof p=="string"||p!=null&&!Tx(p))&&(p=Er(p),!p&&ol(d))?ns(uo(d),0,x):d.split(p,x)):[]}var qle=fl(function(d,p,x){return d+(x?" ":"")+Ox(p)});function Ule(d,p,x){return d=Ot(d),x=x==null?0:Gs(it(x),0,d.length),p=Er(p),d.slice(x,x+p.length)==p}function Kle(d,p,x){var M=V.templateSettings;x&&rr(d,p,x)&&(p=n),d=Ot(d),p=mh({},p,M,oL);var P=mh({},p.imports,M.imports,oL),j=In(P),q=R1(P,j),X,oe,Se=0,Ce=p.interpolate||kp,Me="__p += '",Pe=V1((p.escape||kp).source+"|"+Ce.source+"|"+(Ce===Op?Mne:kp).source+"|"+(p.evaluate||kp).source+"|$","g"),je="//# sourceURL="+(kt.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nre+"]")+`
89
+ `;d.replace(Pe,function(et,pt,vt,Or,or,kr){return vt||(vt=Or),Me+=d.slice(Se,kr).replace(_ne,Cre),pt&&(X=!0,Me+=`' +
90
+ __e(`+pt+`) +
91
+ '`),or&&(oe=!0,Me+=`';
92
+ `+or+`;
93
+ __p += '`),vt&&(Me+=`' +
94
+ ((__t = (`+vt+`)) == null ? '' : __t) +
95
+ '`),Se=kr+et.length,et}),Me+=`';
96
+ `;var Qe=kt.call(p,"variable")&&p.variable;if(!Qe)Me=`with (obj) {
97
+ `+Me+`
98
+ }
99
+ `;else if(Tne.test(Qe))throw new rt(a);Me=(oe?Me.replace(Ye,""):Me).replace(tt,"$1").replace(Pt,"$1;"),Me="function("+(Qe||"obj")+`) {
100
+ `+(Qe?"":`obj || (obj = {});
101
+ `)+"var __t, __p = ''"+(X?", __e = _.escape":"")+(oe?`, __j = Array.prototype.join;
102
+ function print() { __p += __j.call(arguments, '') }
103
+ `:`;
104
+ `)+Me+`return __p
105
+ }`;var ct=JL(function(){return wt(j,je+"return "+Me).apply(n,q)});if(ct.source=Me,wx(ct))throw ct;return ct}function Yle(d){return Ot(d).toLowerCase()}function Gle(d){return Ot(d).toUpperCase()}function Jle(d,p,x){if(d=Ot(d),d&&(x||p===n))return iN(d);if(!d||!(p=Er(p)))return d;var M=uo(d),P=uo(p),j=sN(M,P),q=aN(M,P)+1;return ns(M,j,q).join("")}function Zle(d,p,x){if(d=Ot(d),d&&(x||p===n))return d.slice(0,cN(d)+1);if(!d||!(p=Er(p)))return d;var M=uo(d),P=aN(M,uo(p))+1;return ns(M,0,P).join("")}function Xle(d,p,x){if(d=Ot(d),d&&(x||p===n))return d.replace(w1,"");if(!d||!(p=Er(p)))return d;var M=uo(d),P=sN(M,uo(p));return ns(M,P).join("")}function Qle(d,p){var x=k,M=I;if(tn(p)){var P="separator"in p?p.separator:P;x="length"in p?it(p.length):x,M="omission"in p?Er(p.omission):M}d=Ot(d);var j=d.length;if(ol(d)){var q=uo(d);j=q.length}if(x>=j)return d;var X=x-il(M);if(X<1)return M;var oe=q?ns(q,0,X).join(""):d.slice(0,X);if(P===n)return oe+M;if(q&&(X+=oe.length-X),Tx(P)){if(d.slice(X).search(P)){var Se,Ce=oe;for(P.global||(P=V1(P.source,Ot(O_.exec(P))+"g")),P.lastIndex=0;Se=P.exec(Ce);)var Me=Se.index;oe=oe.slice(0,Me===n?X:Me)}}else if(d.indexOf(Er(P),X)!=X){var Pe=oe.lastIndexOf(P);Pe>-1&&(oe=oe.slice(0,Pe))}return oe+M}function ece(d){return d=Ot(d),d&&ri.test(d)?d.replace(tr,Are):d}var tce=fl(function(d,p,x){return d+(x?" ":"")+p.toUpperCase()}),Ox=ZN("toUpperCase");function GL(d,p,x){return d=Ot(d),p=x?n:p,p===n?Tre(d)?Pre(d):mre(d):d.match(p)||[]}var JL=ut(function(d,p){try{return wr(d,n,p)}catch(x){return wx(x)?x:new rt(x)}}),nce=li(function(d,p){return qr(p,function(x){x=$o(x),si(d,x,Sx(d[x],d))}),d});function rce(d){var p=d==null?0:d.length,x=Ze();return d=p?Xt(d,function(M){if(typeof M[1]!="function")throw new Ur(s);return[x(M[0]),M[1]]}):[],ut(function(M){for(var P=-1;++P<p;){var j=d[P];if(wr(j[0],this,M))return wr(j[1],this,M)}})}function oce(d){return Aoe(Yr(d,h))}function kx(d){return function(){return d}}function ice(d,p){return d==null||d!==d?p:d}var sce=QN(),ace=QN(!0);function gr(d){return d}function Ax(d){return AN(typeof d=="function"?d:Yr(d,h))}function lce(d){return DN(Yr(d,h))}function cce(d,p){return PN(d,Yr(p,h))}var uce=ut(function(d,p){return function(x){return fu(x,d,p)}}),dce=ut(function(d,p){return function(x){return fu(d,x,p)}});function Ix(d,p,x){var M=In(p),P=Jp(p,M);x==null&&!(tn(p)&&(P.length||!M.length))&&(x=p,p=d,d=this,P=Jp(p,In(p)));var j=!(tn(x)&&"chain"in x)||!!x.chain,q=ui(d);return qr(P,function(X){var oe=p[X];d[X]=oe,q&&(d.prototype[X]=function(){var Se=this.__chain__;if(j||Se){var Ce=d(this.__wrapped__),Me=Ce.__actions__=pr(this.__actions__);return Me.push({func:oe,args:arguments,thisArg:d}),Ce.__chain__=Se,Ce}return oe.apply(d,Ji([this.value()],arguments))})}),d}function fce(){return $n._===this&&($n._=Rre),this}function Dx(){}function pce(d){return d=it(d),ut(function(p){return _N(p,d)})}var hce=lx(Xt),mce=lx(eN),gce=lx(_1);function ZL(d){return mx(d)?N1($o(d)):Uoe(d)}function yce(d){return function(p){return d==null?n:Js(d,p)}}var bce=tL(),vce=tL(!0);function Px(){return[]}function _x(){return!1}function xce(){return{}}function Sce(){return""}function Cce(){return!0}function wce(d,p){if(d=it(d),d<1||d>U)return[];var x=Z,M=Un(d,Z);p=Ze(p),d-=Z;for(var P=F1(M,p);++x<d;)p(x);return P}function Tce(d){return ot(d)?Xt(d,$o):Mr(d)?[d]:pr(yL(Ot(d)))}function Ece(d){var p=++$re;return Ot(d)+p}var Mce=nh(function(d,p){return d+p},0),Oce=cx("ceil"),kce=nh(function(d,p){return d/p},1),Ace=cx("floor");function Ice(d){return d&&d.length?Gp(d,gr,Y1):n}function Dce(d,p){return d&&d.length?Gp(d,Ze(p,2),Y1):n}function Pce(d){return rN(d,gr)}function _ce(d,p){return rN(d,Ze(p,2))}function Nce(d){return d&&d.length?Gp(d,gr,X1):n}function Lce(d,p){return d&&d.length?Gp(d,Ze(p,2),X1):n}var $ce=nh(function(d,p){return d*p},1),Fce=cx("round"),Rce=nh(function(d,p){return d-p},0);function Bce(d){return d&&d.length?$1(d,gr):0}function Vce(d,p){return d&&d.length?$1(d,Ze(p,2)):0}return V.after=lae,V.ary=kL,V.assign=Gae,V.assignIn=HL,V.assignInWith=mh,V.assignWith=Jae,V.at=Zae,V.before=AL,V.bind=Sx,V.bindAll=nce,V.bindKey=IL,V.castArray=xae,V.chain=EL,V.chunk=Aie,V.compact=Iie,V.concat=Die,V.cond=rce,V.conforms=oce,V.constant=kx,V.countBy=Bse,V.create=Xae,V.curry=DL,V.curryRight=PL,V.debounce=_L,V.defaults=Qae,V.defaultsDeep=ele,V.defer=cae,V.delay=uae,V.difference=Pie,V.differenceBy=_ie,V.differenceWith=Nie,V.drop=Lie,V.dropRight=$ie,V.dropRightWhile=Fie,V.dropWhile=Rie,V.fill=Bie,V.filter=zse,V.flatMap=Wse,V.flatMapDeep=qse,V.flatMapDepth=Use,V.flatten=SL,V.flattenDeep=Vie,V.flattenDepth=zie,V.flip=dae,V.flow=sce,V.flowRight=ace,V.fromPairs=Hie,V.functions=ale,V.functionsIn=lle,V.groupBy=Kse,V.initial=Wie,V.intersection=qie,V.intersectionBy=Uie,V.intersectionWith=Kie,V.invert=ule,V.invertBy=dle,V.invokeMap=Gse,V.iteratee=Ax,V.keyBy=Jse,V.keys=In,V.keysIn=mr,V.map=ch,V.mapKeys=ple,V.mapValues=hle,V.matches=lce,V.matchesProperty=cce,V.memoize=dh,V.merge=mle,V.mergeWith=jL,V.method=uce,V.methodOf=dce,V.mixin=Ix,V.negate=fh,V.nthArg=pce,V.omit=gle,V.omitBy=yle,V.once=fae,V.orderBy=Zse,V.over=hce,V.overArgs=pae,V.overEvery=mce,V.overSome=gce,V.partial=Cx,V.partialRight=NL,V.partition=Xse,V.pick=ble,V.pickBy=WL,V.property=ZL,V.propertyOf=yce,V.pull=Zie,V.pullAll=wL,V.pullAllBy=Xie,V.pullAllWith=Qie,V.pullAt=ese,V.range=bce,V.rangeRight=vce,V.rearg=hae,V.reject=tae,V.remove=tse,V.rest=mae,V.reverse=vx,V.sampleSize=rae,V.set=xle,V.setWith=Sle,V.shuffle=oae,V.slice=nse,V.sortBy=aae,V.sortedUniq=cse,V.sortedUniqBy=use,V.split=Wle,V.spread=gae,V.tail=dse,V.take=fse,V.takeRight=pse,V.takeRightWhile=hse,V.takeWhile=mse,V.tap=Ise,V.throttle=yae,V.thru=lh,V.toArray=BL,V.toPairs=qL,V.toPairsIn=UL,V.toPath=Tce,V.toPlainObject=zL,V.transform=Cle,V.unary=bae,V.union=gse,V.unionBy=yse,V.unionWith=bse,V.uniq=vse,V.uniqBy=xse,V.uniqWith=Sse,V.unset=wle,V.unzip=xx,V.unzipWith=TL,V.update=Tle,V.updateWith=Ele,V.values=ml,V.valuesIn=Mle,V.without=Cse,V.words=GL,V.wrap=vae,V.xor=wse,V.xorBy=Tse,V.xorWith=Ese,V.zip=Mse,V.zipObject=Ose,V.zipObjectDeep=kse,V.zipWith=Ase,V.entries=qL,V.entriesIn=UL,V.extend=HL,V.extendWith=mh,Ix(V,V),V.add=Mce,V.attempt=JL,V.camelCase=Ile,V.capitalize=KL,V.ceil=Oce,V.clamp=Ole,V.clone=Sae,V.cloneDeep=wae,V.cloneDeepWith=Tae,V.cloneWith=Cae,V.conformsTo=Eae,V.deburr=YL,V.defaultTo=ice,V.divide=kce,V.endsWith=Dle,V.eq=po,V.escape=Ple,V.escapeRegExp=_le,V.every=Vse,V.find=Hse,V.findIndex=vL,V.findKey=tle,V.findLast=jse,V.findLastIndex=xL,V.findLastKey=nle,V.floor=Ace,V.forEach=ML,V.forEachRight=OL,V.forIn=rle,V.forInRight=ole,V.forOwn=ile,V.forOwnRight=sle,V.get=Ex,V.gt=Mae,V.gte=Oae,V.has=cle,V.hasIn=Mx,V.head=CL,V.identity=gr,V.includes=Yse,V.indexOf=jie,V.inRange=kle,V.invoke=fle,V.isArguments=Qs,V.isArray=ot,V.isArrayBuffer=kae,V.isArrayLike=hr,V.isArrayLikeObject=fn,V.isBoolean=Aae,V.isBuffer=rs,V.isDate=Iae,V.isElement=Dae,V.isEmpty=Pae,V.isEqual=_ae,V.isEqualWith=Nae,V.isError=wx,V.isFinite=Lae,V.isFunction=ui,V.isInteger=LL,V.isLength=ph,V.isMap=$L,V.isMatch=$ae,V.isMatchWith=Fae,V.isNaN=Rae,V.isNative=Bae,V.isNil=zae,V.isNull=Vae,V.isNumber=FL,V.isObject=tn,V.isObjectLike=un,V.isPlainObject=bu,V.isRegExp=Tx,V.isSafeInteger=Hae,V.isSet=RL,V.isString=hh,V.isSymbol=Mr,V.isTypedArray=hl,V.isUndefined=jae,V.isWeakMap=Wae,V.isWeakSet=qae,V.join=Yie,V.kebabCase=Nle,V.last=Jr,V.lastIndexOf=Gie,V.lowerCase=Lle,V.lowerFirst=$le,V.lt=Uae,V.lte=Kae,V.max=Ice,V.maxBy=Dce,V.mean=Pce,V.meanBy=_ce,V.min=Nce,V.minBy=Lce,V.stubArray=Px,V.stubFalse=_x,V.stubObject=xce,V.stubString=Sce,V.stubTrue=Cce,V.multiply=$ce,V.nth=Jie,V.noConflict=fce,V.noop=Dx,V.now=uh,V.pad=Fle,V.padEnd=Rle,V.padStart=Ble,V.parseInt=Vle,V.random=Ale,V.reduce=Qse,V.reduceRight=eae,V.repeat=zle,V.replace=Hle,V.result=vle,V.round=Fce,V.runInContext=ne,V.sample=nae,V.size=iae,V.snakeCase=jle,V.some=sae,V.sortedIndex=rse,V.sortedIndexBy=ose,V.sortedIndexOf=ise,V.sortedLastIndex=sse,V.sortedLastIndexBy=ase,V.sortedLastIndexOf=lse,V.startCase=qle,V.startsWith=Ule,V.subtract=Rce,V.sum=Bce,V.sumBy=Vce,V.template=Kle,V.times=wce,V.toFinite=di,V.toInteger=it,V.toLength=VL,V.toLower=Yle,V.toNumber=Zr,V.toSafeInteger=Yae,V.toString=Ot,V.toUpper=Gle,V.trim=Jle,V.trimEnd=Zle,V.trimStart=Xle,V.truncate=Qle,V.unescape=ece,V.uniqueId=Ece,V.upperCase=tce,V.upperFirst=Ox,V.each=ML,V.eachRight=OL,V.first=CL,Ix(V,function(){var d={};return No(V,function(p,x){kt.call(V.prototype,x)||(d[x]=p)}),d}(),{chain:!1}),V.VERSION=r,qr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){V[d].placeholder=V}),qr(["drop","take"],function(d,p){mt.prototype[d]=function(x){x=x===n?1:Sn(it(x),0);var M=this.__filtered__&&!p?new mt(this):this.clone();return M.__filtered__?M.__takeCount__=Un(x,M.__takeCount__):M.__views__.push({size:Un(x,Z),type:d+(M.__dir__<0?"Right":"")}),M},mt.prototype[d+"Right"]=function(x){return this.reverse()[d](x).reverse()}}),qr(["filter","map","takeWhile"],function(d,p){var x=p+1,M=x==z||x==B;mt.prototype[d]=function(P){var j=this.clone();return j.__iteratees__.push({iteratee:Ze(P,3),type:x}),j.__filtered__=j.__filtered__||M,j}}),qr(["head","last"],function(d,p){var x="take"+(p?"Right":"");mt.prototype[d]=function(){return this[x](1).value()[0]}}),qr(["initial","tail"],function(d,p){var x="drop"+(p?"":"Right");mt.prototype[d]=function(){return this.__filtered__?new mt(this):this[x](1)}}),mt.prototype.compact=function(){return this.filter(gr)},mt.prototype.find=function(d){return this.filter(d).head()},mt.prototype.findLast=function(d){return this.reverse().find(d)},mt.prototype.invokeMap=ut(function(d,p){return typeof d=="function"?new mt(this):this.map(function(x){return fu(x,d,p)})}),mt.prototype.reject=function(d){return this.filter(fh(Ze(d)))},mt.prototype.slice=function(d,p){d=it(d);var x=this;return x.__filtered__&&(d>0||p<0)?new mt(x):(d<0?x=x.takeRight(-d):d&&(x=x.drop(d)),p!==n&&(p=it(p),x=p<0?x.dropRight(-p):x.take(p-d)),x)},mt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},mt.prototype.toArray=function(){return this.take(Z)},No(mt.prototype,function(d,p){var x=/^(?:filter|find|map|reject)|While$/.test(p),M=/^(?:head|last)$/.test(p),P=V[M?"take"+(p=="last"?"Right":""):p],j=M||/^find/.test(p);P&&(V.prototype[p]=function(){var q=this.__wrapped__,X=M?[1]:arguments,oe=q instanceof mt,Se=X[0],Ce=oe||ot(q),Me=function(pt){var vt=P.apply(V,Ji([pt],X));return M&&Pe?vt[0]:vt};Ce&&x&&typeof Se=="function"&&Se.length!=1&&(oe=Ce=!1);var Pe=this.__chain__,je=!!this.__actions__.length,Qe=j&&!Pe,ct=oe&&!je;if(!j&&Ce){q=ct?q:new mt(this);var et=d.apply(q,X);return et.__actions__.push({func:lh,args:[Me],thisArg:n}),new Kr(et,Pe)}return Qe&&ct?d.apply(this,X):(et=this.thru(Me),Qe?M?et.value()[0]:et.value():et)})}),qr(["pop","push","shift","sort","splice","unshift"],function(d){var p=Np[d],x=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",M=/^(?:pop|shift)$/.test(d);V.prototype[d]=function(){var P=arguments;if(M&&!this.__chain__){var j=this.value();return p.apply(ot(j)?j:[],P)}return this[x](function(q){return p.apply(ot(q)?q:[],P)})}}),No(mt.prototype,function(d,p){var x=V[p];if(x){var M=x.name+"";kt.call(cl,M)||(cl[M]=[]),cl[M].push({name:p,func:x})}}),cl[th(n,C).name]=[{name:"wrapper",func:n}],mt.prototype.clone=eoe,mt.prototype.reverse=toe,mt.prototype.value=noe,V.prototype.at=Dse,V.prototype.chain=Pse,V.prototype.commit=_se,V.prototype.next=Nse,V.prototype.plant=$se,V.prototype.reverse=Fse,V.prototype.toJSON=V.prototype.valueOf=V.prototype.value=Rse,V.prototype.first=V.prototype.head,iu&&(V.prototype[iu]=Lse),V},sl=_re();qs?((qs.exports=sl)._=sl,A1._=sl):$n._=sl}).call(ZR)}(Dl,Dl.exports)),Dl.exports}var Bh=XR();const QR=t=>{const{name:e,onInputChange:n,onChange:r,onFilter:o,onFilterError:i,fetchOnCount:s=1,preFilterMessage:a=s?"Start typing to see options...":t.noOptionsText,noOptionsText:l,filterOptions:u=D=>D,includeInputInList:f=!0,autoComplete:h=!0,...m}=t,[g,b,y]=Ht.useField(e),{setValue:S}=y,[C,E]=J.useState(""),[T,w]=J.useState([]),[O,A]=J.useState(!1),N=Bh.debounce(async(D,L)=>{try{A(!0);const k=await o(D.input);L(k)}catch(k){throw k}finally{A(!1)}},400);return J.useEffect(()=>{if(C===""){w(g.value?[g.value]:[]);return}C.length>=s&&N({input:C},D=>{let L=[];D?(L=D,g.value&&(L=[g.value,...D.filter(k=>JSON.stringify(k)!==JSON.stringify(g.value))])):g.value&&(L=[g.value]),w(L)})},[g.value,C]),v.jsx(aC,{name:e,loading:O,filterOptions:u,noOptionsText:C.length<s?a:l,options:T,autoComplete:h,includeInputInList:f,onChange:(D,L,k,I)=>{w(L?[L,...T]:T),S(L),r&&r(D,L,k,I)},onInputChange:(D,L,k)=>{E(L),n&&n(D,L,k)},...m})},eB=t=>{const{name:e,label:n=Cn(e),options:r=[],filterSelectedOptions:o=!0,variant:i="outlined",staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:l,margin:u="dense",fullWidth:f=!0,required:h,onChange:m,getOptionLabel:g=D=>typeof D=="string"?D:String(D),isOptionEqualToValue:b=(D,L)=>JSON.stringify(D)===JSON.stringify(L),useFieldAsValue:y,...S}=t,[C,E,T]=Ht.useField(e),{setValue:w}=T,{error:O}=E,A={...Yn(S,["useFieldAsValue"]),getOptionLabel:g,options:r,filterSelectedOptions:o,isOptionEqualToValue:b,renderInput:D=>v.jsx(F.TextField,{...D,variant:i,label:s?void 0:n,error:!!O,required:h}),onChange:(D,L,k,I)=>{w(y?L.map($=>$[y]):L),m&&m(D,L,k,I)},fullWidth:!0,value:y?r.filter(D=>C.value.includes(D[y]))||[]:C.value,slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}},N=()=>C.value.length===0?"":(y?r.filter(L=>C.value.includes(L[y]))||[]:C.value).map(L=>g(L)).join(", ");return v.jsxs(F.FormControl,{margin:u,fullWidth:f,required:h,children:[(s||l)&&v.jsx(F.Typography,{...a,children:n}),l?v.jsx(F.Typography,{children:N()}):v.jsxs(F.Box,{children:[v.jsx(F.Autocomplete,{...A,multiple:!0}),v.jsx(Jn,{name:e,id:`${e}-err`})]})]})},tB=t=>{const{name:e,label:n=Cn(e),sublabel:r,required:o=!1,labelPlacement:i="end",labelAlignment:s=i==="end"||i==="start"?"top":"center",readOnly:a=!1,staticLabelProps:l={fontSize:".9em",color:"#808080"},onChange:u,...f}=t;s==="top"&&(i==="bottom"||i==="top")&&console.error(`Checkbox: Ignoring labelAlignment='top'. labelAlignment cannot be 'top' when labelPlacement=${i}`);const h=Ht.useField({name:e}),m=h[0],g=h[2],b=r?v.jsxs("div",{children:[v.jsx("p",{style:{margin:0},children:n}),v.jsx(F.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:r})]}):n,y=s==="top"&&(i==="start"||i==="end");return a?m.value&&v.jsx(F.Typography,{...l,children:b}):v.jsxs(F.Box,{children:[v.jsx(F.FormControlLabel,{sx:{alignItems:y?"flex-start":"center"},label:v.jsx("span",{"data-testid":n,style:{display:"inline-block",marginTop:y?"10px":0},children:b}),required:o,labelPlacement:i,control:v.jsx(F.Checkbox,{"data-testid":"checkbox",...f,...m,onChange:(S,C)=>{g.setValue(S.target.checked),u&&u(S,C)},checked:m.value})}),v.jsx(Jn,{name:e,id:`${e}-err`})]})},la=t=>{const{name:e,label:n=Cn(e),format:r="",autoFormat:o=r,placeholder:i=n,staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:l=!1,startIcon:u,endIcon:f,margin:h="dense",noTrimOnBlur:m=!1}=t,[g,b,y]=Ht.useField({name:e}),{setValue:S}=y,{value:C}=g,{error:E}=b;C===void 0&&console.error(`Please set an initial value for ${e}`),!r&&o&&console.error("Can't auto format when there is no format");const T=O=>{if(o){const A=o$(O.target.value,r,C,O.target);S(A)}else S(O.target.value);t.onChange&&t.onChange(O)},w=["autoFormat","format","staticLabel","staticLabelProps","endIcon","startIcon"];return v.jsxs(F.FormControl,{margin:h,fullWidth:!0,children:[(s||l)&&v.jsx(F.Typography,{...a,children:n}),l?v.jsx(F.Typography,{children:C}):v.jsxs(F.Box,{children:[v.jsx(F.TextField,{variant:"outlined",fullWidth:!0,...g,id:`${e}-tf`,error:!!E,placeholder:i,...Yn({...t},w),onChange:T,label:s?void 0:n,slotProps:{input:{endAdornment:f,startAdornment:u}},onBlur:O=>{m||S(O.target.value.trim()),t.onBlur&&t.onBlur(O)}}),v.jsx(Jn,{name:e,id:`${e}-err`})]})]})},nB=t=>{const{name:e,checkboxes:n=[],label:r=Cn(e),labelPlacement:o="end",labelAlignment:i=o==="end"||o==="start"?"top":"center",required:s=!1,disabled:a=!1,readOnly:l=!1,min:u=0,max:f=n.length,minMaxSubtitle:h="Please select between {min} and {max} options",maxSubtitle:m="Up to {max} max",minSubtitle:g="Please select {min} or more",margin:b="dense",staticLabelProps:y={fontSize:".9em",color:"#808080"}}=t,[S,C,E]=Ht.useField({name:e}),{setValue:T}=E,{value:w}=S,{error:O}=C,{setFieldValue:A}=Ht.useFormikContext();(u<0||u>=n.length)&&console.error(`CheckboxGroup: "min" cannot be ${u}. It must be a value between 0 and ${n.length-1}.`),(f<=1||f>n.length)&&console.error(`CheckboxGroup: "max" must be a value between 2 and ${n.length}.`),i==="top"&&(o==="bottom"||o==="top")&&console.error(`CheckboxGroup: Ignoring labelAlignment='top'. labelAlignment cannot be 'top' when labelPlacement=${o}`);const N=()=>t.labelPlacement=="start"?"right":t.labelPlacement=="top"||t.labelPlacement=="bottom"?"center":"left",D=$=>typeof $=="string"?$:!$.textField&&!$.sublabel?$.label:v.jsxs(F.Box,{display:"flex",flexDirection:"row",justifyContent:"center",gap:"0.5rem",alignItems:"baseline",children:[v.jsxs(F.Box,{display:"flex",flexDirection:"column",justifyContent:"center",children:[v.jsx("p",{style:{margin:0},children:$.label}),$.sublabel&&v.jsx(F.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:$.sublabel})]}),$.textField&&v.jsx(la,{label:"",size:"small",margin:"none",sx:{"& .MuiInputBase-input":{height:14}},...$.textField})]}),L=n.map($=>{const H=typeof $=="string"?$:$.label,z=i==="top"&&(o==="start"||o==="end");return v.jsx(F.FormControlLabel,{sx:{alignItems:z?"flex-start":"center"},value:H,control:v.jsx(F.Checkbox,{}),label:v.jsx("div",{"data-testid":typeof $=="string"?$:$.label,style:{marginTop:z?"10px":0},children:D($)}),labelPlacement:o,checked:w.includes(H),disabled:a||!w.includes(H)&&w.length===f,style:{textAlign:N()}},`checkbox-group-${H}`)}),k=()=>{if(f<n.length&&u>0)return v.jsx(F.Typography,{variant:"subtitle2",children:h.replace("{min}",`${u}`).replace("{max}",`${f}`)});if(f<n.length)return v.jsx(F.Typography,{variant:"subtitle2",children:m.replace("{max}",`${f}`)});if(u>0)return v.jsx(F.Typography,{variant:"subtitle2",children:g.replace("{min}",`${u}`)})};return l?v.jsxs(F.Box,{children:[v.jsx(F.Typography,{...y,children:r}),w.join(", ")]}):v.jsxs(F.FormControl,{onChange:$=>{const H=$.target.value,z=$.target.checked,R=n.find(B=>typeof B=="string"?B===H:B.label===H);z?T([...w,H]):(R&&typeof R=="object"&&R.textField&&R.textField.name&&A(R.textField.name,""),T(w.filter(B=>B!=H)))},fullWidth:!0,margin:b,error:!!O,children:[v.jsx(F.FormLabel,{focused:t.focused,htmlFor:e,required:s,disabled:t.disableLabel,children:r}),k(),L,v.jsx(Jn,{name:e,id:`${e}-err`})]})},cC=Be(v.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload"),uC=t=>{const{name:e,multiple:n=!1,readOnly:r=!1,variant:o=n?"drag-and-drop":"button",duplicateFilesCallback:i,incorrectFileTypesCallback:s,staticLabelProps:a={fontSize:".9em",color:"#808080"}}=t,[l,u,f]=Ht.useField({name:e}),{setValue:h}=f,m=l.value,g=t.fileType?Array.isArray(t.fileType)?t.fileType:[t.fileType]:[],b=t.subtitle??(g.length>0?`Allowed file extensions: ${g.join(", ")}`:""),y=N=>{C(Array.from(N.target.files??[]))},S=N=>{N.preventDefault(),C(Array.from(N.dataTransfer.files))},C=N=>{if(N&&N.length>0){const D=m?Array.isArray(m)?m:[m]:[],L=Bh.partition(N,k=>D.find(I=>T(k,I)));if(N=L[1],i&&L[0].length>0&&i(L[0]),g.length>0){const k=Bh.partition(N,I=>g.find($=>I.name.endsWith($)));N=k[0],s&&k[1].length>0&&s(k[1])}n?h([...E(),...N]):!Array.isArray(m)&&N.length>0&&h(N[0])}},E=()=>m?Array.isArray(m)?m:[m]:[],T=(N,D)=>N.lastModified===D.lastModified&&N.name===D.name&&N.type===D.type&&N.size===D.size,w=()=>E().map(N=>N.name).join(", ");return r?v.jsx(F.Typography,{"data-testid":"fileupload-readonly",...a,children:w()}):o==="drag-and-drop"?v.jsxs("div",{style:{border:`4px dashed ${u.error?"red":"lightgray"}`,padding:"30px 10px",display:"flex",alignItems:"center",flexDirection:"column"},onDrop:S,onDragOver:N=>N.preventDefault(),"data-testid":"dropzone",children:[v.jsx(cC,{color:"primary",sx:{fontSize:"40px"}}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"baseline"},children:[v.jsx(F.Typography,{children:"Drag and drop or"}),v.jsxs(F.Button,{component:"label",role:void 0,variant:"text",tabIndex:-1,sx:{textTransform:"none",fontSize:"16px",textDecoration:"underline"},children:["browse",v.jsx("input",{"data-testid":"file-input",id:e,hidden:!0,type:"file",onChange:y,multiple:!0,accept:g==null?void 0:g.toString()})]})]}),b&&v.jsx(F.Typography,{variant:"caption",children:b}),v.jsx(Jn,{name:e,id:`${e}-err`})]}):v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("div",{style:{display:"flex",alignItems:"center",marginBottom:"4px"},children:v.jsxs(F.Button,{component:"label",role:void 0,variant:"contained",tabIndex:-1,startIcon:v.jsx(cC,{}),children:["Upload a file",v.jsx("input",{"data-testid":"file-input",id:e,hidden:!0,type:"file",onChange:y,accept:g==null?void 0:g.toString()})]})}),v.jsx(Jn,{name:e,id:`${e}-err`})]})},rB=Be(v.jsx("path",{d:"M15 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V7zM6 20V4h8v4h4v12zm10-10v5c0 2.21-1.79 4-4 4s-4-1.79-4-4V8.5c0-1.47 1.26-2.64 2.76-2.49 1.3.13 2.24 1.32 2.24 2.63V15h-2V8.5c0-.28-.22-.5-.5-.5s-.5.22-.5.5V15c0 1.1.9 2 2 2s2-.9 2-2v-5z"}),"FilePresent"),oB=Be(v.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"}),"Delete"),iB=t=>{const{name:e}=t,[n,,r]=Ht.useField({name:e}),{setValue:o}=r,i=n.value;return v.jsx("div",{style:{width:"100%"},children:i.map(s=>v.jsx(F.Card,{sx:{margin:"10px 0px"},children:v.jsxs(F.CardContent,{style:{display:"flex",alignItems:"center",padding:"8px 12px"},children:[v.jsx(rB,{sx:{color:"gray",fontSize:"20px"}}),v.jsx(F.Typography,{sx:{padding:"8px",overflowWrap:"anywhere"},children:s.name}),v.jsx(F.IconButton,{"aria-label":"remove file",onClick:()=>o(i.filter(a=>a!==s)),edge:"end",style:{marginLeft:"auto",order:"2"},children:v.jsx(oB,{})})]})},`${s.name}-${s.type}-${s.size}-${s.lastModified}`))})};var Vh,dC;function jo(){if(dC)return Vh;dC=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return Vh=t,Vh}var zh,fC;function pC(){if(fC)return zh;fC=1;var t=typeof hi=="object"&&hi&&hi.Object===Object&&hi;return zh=t,zh}var Hh,hC;function no(){if(hC)return Hh;hC=1;var t=pC(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return Hh=n,Hh}var jh,mC;function sB(){if(mC)return jh;mC=1;var t=no(),e=function(){return t.Date.now()};return jh=e,jh}var Wh,gC;function aB(){if(gC)return Wh;gC=1;var t=/\s/;function e(n){for(var r=n.length;r--&&t.test(n.charAt(r)););return r}return Wh=e,Wh}var qh,yC;function lB(){if(yC)return qh;yC=1;var t=aB(),e=/^\s+/;function n(r){return r&&r.slice(0,t(r)+1).replace(e,"")}return qh=n,qh}var Uh,bC;function Pl(){if(bC)return Uh;bC=1;var t=no(),e=t.Symbol;return Uh=e,Uh}var Kh,vC;function cB(){if(vC)return Kh;vC=1;var t=Pl(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,o=t?t.toStringTag:void 0;function i(s){var a=n.call(s,o),l=s[o];try{s[o]=void 0;var u=!0}catch{}var f=r.call(s);return u&&(a?s[o]=l:delete s[o]),f}return Kh=i,Kh}var Yh,xC;function uB(){if(xC)return Yh;xC=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return Yh=n,Yh}var Gh,SC;function as(){if(SC)return Gh;SC=1;var t=Pl(),e=cB(),n=uB(),r="[object Null]",o="[object Undefined]",i=t?t.toStringTag:void 0;function s(a){return a==null?a===void 0?o:r:i&&i in Object(a)?e(a):n(a)}return Gh=s,Gh}var Jh,CC;function vi(){if(CC)return Jh;CC=1;function t(e){return e!=null&&typeof e=="object"}return Jh=t,Jh}var Zh,wC;function ju(){if(wC)return Zh;wC=1;var t=as(),e=vi(),n="[object Symbol]";function r(o){return typeof o=="symbol"||e(o)&&t(o)==n}return Zh=r,Zh}var Xh,TC;function EC(){if(TC)return Xh;TC=1;var t=lB(),e=jo(),n=ju(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(e(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=e(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=t(u);var h=i.test(u);return h||s.test(u)?a(u.slice(2),h?2:8):o.test(u)?r:+u}return Xh=l,Xh}var Qh,MC;function OC(){if(MC)return Qh;MC=1;var t=jo(),e=sB(),n=EC(),r="Expected a function",o=Math.max,i=Math.min;function s(a,l,u){var f,h,m,g,b,y,S=0,C=!1,E=!1,T=!0;if(typeof a!="function")throw new TypeError(r);l=n(l)||0,t(u)&&(C=!!u.leading,E="maxWait"in u,m=E?o(n(u.maxWait)||0,l):m,T="trailing"in u?!!u.trailing:T);function w(H){var z=f,R=h;return f=h=void 0,S=H,g=a.apply(R,z),g}function O(H){return S=H,b=setTimeout(D,l),C?w(H):g}function A(H){var z=H-y,R=H-S,B=l-z;return E?i(B,m-R):B}function N(H){var z=H-y,R=H-S;return y===void 0||z>=l||z<0||E&&R>=m}function D(){var H=e();if(N(H))return L(H);b=setTimeout(D,A(H))}function L(H){return b=void 0,T&&f?w(H):(f=h=void 0,g)}function k(){b!==void 0&&clearTimeout(b),S=0,f=y=h=b=void 0}function I(){return b===void 0?g:L(e())}function $(){var H=e(),z=N(H);if(f=arguments,h=this,y=H,z){if(b===void 0)return O(y);if(E)return clearTimeout(b),b=setTimeout(D,l),w(y)}return b===void 0&&(b=setTimeout(D,l)),g}return $.cancel=k,$.flush=I,$}return Qh=s,Qh}var em,kC;function dB(){if(kC)return em;kC=1;var t=OC(),e=jo(),n="Expected a function";function r(o,i,s){var a=!0,l=!0;if(typeof o!="function")throw new TypeError(n);return e(s)&&(a="leading"in s?!!s.leading:a,l="trailing"in s?!!s.trailing:l),t(o,i,{leading:a,maxWait:i,trailing:l})}return em=r,em}var fB=dB();const AC=Gn(fB),pB=Be(v.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn");var Wu={exports:{}},hB=Wu.exports,IC;function mB(){return IC||(IC=1,function(t,e){(function(n,r){t.exports=r()})(hB,()=>{return n={705:o=>{o.exports=function(i,s){const a=[];return s.length===0?a.push({text:i,highlight:!1}):s[0][0]>0&&a.push({text:i.slice(0,s[0][0]),highlight:!1}),s.forEach((l,u)=>{const f=l[0],h=l[1];a.push({text:i.slice(f,h),highlight:!0}),u===s.length-1?h<i.length&&a.push({text:i.slice(h,i.length),highlight:!1}):h<s[u+1][0]&&a.push({text:i.slice(h,s[u+1][0]),highlight:!1})}),a}}},r={},function o(i){var s=r[i];if(s!==void 0)return s.exports;var a=r[i]={exports:{}};return n[i](a,a.exports,o),a.exports}(705);var n,r})}(Wu)),Wu.exports}var gB=mB();const yB=Gn(gB),bB=t=>{const{listItemProps:e,option:n,resultIcon:r,highlightMatches:o}=t,{main_text:i,secondary_text:s,main_text_matched_substrings:a}=n.structured_formatting,l=yB(i,a.map(u=>[u.offset,u.offset+u.length]));return v.jsx("li",{...Yn({...e},["key"]),"data-testid":`loc-${n.place_id}`,children:v.jsxs(F.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[r?_.cloneElement(r):null,v.jsxs(F.Box,{children:[l.map(u=>{const f=o&&u.highlight?700:400;return v.jsx("span",{style:{fontWeight:f},children:u.text},`${n.place_id}_${u.text}`)}),v.jsx(F.Typography,{variant:"body2",color:"textSecondary",children:s})]})]})})};function vB(t,e,n){if(!e)return;const r=document.createElement("script");r.setAttribute("async",""),r.setAttribute("id",n),r.src=t,r.onerror=()=>console.error(`Failed to load script: ${t}`),e.appendChild(r)}const _l={current:null},xB=t=>{const{name:e,label:n=Cn(e),resultIcon:r=v.jsx(pB,{}),apiKey:o,highlightMatches:i=!0,types:s,variant:a="outlined",staticLabel:l=!1,staticLabelProps:u={fontSize:".9em",color:"#808080"},readOnly:f=!1,margin:h="dense"}=t,[m,g]=_.useState(null),[b,y]=_.useState(""),[S,C]=_.useState([]),E=_.useRef(!1),[,T,w]=Ht.useField(e),{setValue:O}=w,{error:A}=T;typeof window<"u"&&!E.current&&(document.querySelector("#google-maps")||vB(`https://maps.googleapis.com/maps/api/js?key=${o}&libraries=places`,document.querySelector("head"),"google-maps"),E.current=!0);const N=_.useMemo(()=>AC((R,B)=>{_l.current&&_l.current.getPlacePredictions(R,B)},200),[]);_.useEffect(()=>{let R=!0;if(!_l.current&&window.google&&(_l.current=new window.google.maps.places.AutocompleteService),!_l.current)return;if(b===""){C(m?[m]:[]);return}return N({input:b,types:s?[s]:[]},U=>{if(R){let G=[];m&&(G=[m]),U&&(G=[...G,...U]);const Y=G.filter((Z,me,fe)=>me===fe.findIndex(pe=>pe.place_id===Z.place_id));C(Y)}}),()=>{R=!1}},[m,b,N,s]);const D=_.useCallback(R=>{const W=(R?[R,...S]:S).filter((U,G,Y)=>G===Y.findIndex(Z=>Z.place_id===U.place_id));C(W),g(R),O(R?R.description:"")},[S,C,g,O]),L=R=>{y(R)},k=["name","apiKey","resultIcon","highlightMatches","variant","staticLabel","staticLabelProps","margin"],I=R=>v.jsx(F.TextField,{margin:h,variant:a,...R,...Yn({...t},k),label:l?void 0:n,hiddenLabel:l,error:!!A}),$=R=>typeof R=="string"?R:R.description,H=(R,B)=>v.jsx(bB,{listItemProps:R,option:B,resultIcon:r,highlightMatches:i},B.place_id);_.useEffect(()=>{const R=B=>{B.key==="Enter"&&S.length>0&&D(S[0])};return window.addEventListener("keydown",R),()=>{window.removeEventListener("keydown",R)}},[S,D]);const z=v.jsx(F.Autocomplete,{id:`${e}-loc`,"data-testid":"location-autocomplete",getOptionLabel:$,filterOptions:R=>R,options:S,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:m,onChange:(R,B)=>D(B),onInputChange:(R,B)=>L(B),disabled:t.disabled,renderOption:H,renderInput:I});return v.jsxs(F.FormControl,{margin:h,fullWidth:!0,children:[(l||f)&&v.jsx(F.Typography,{...u,children:n}),f?v.jsx(F.Typography,{children:m==null?void 0:m.description}):v.jsxs(F.Box,{children:[z,v.jsx(Jn,{name:e,id:`${e}-err`})]})]})},DC=t=>{const{name:e,radios:n=[],label:r=Cn(e),labelPlacement:o="end",labelAlignment:i=o==="end"||o==="start"?"top":"center",required:s=!1,disabled:a=!1,readOnly:l=!1,margin:u="dense",onChange:f,staticLabelProps:h={fontSize:".9em",color:"#808080"}}=t;i==="top"&&(o==="bottom"||o==="top")&&console.error(`RadioGroup: Ignoring labelAlignment='top'. labelAlignment cannot be 'top' when labelPlacement=${o}`);const[m,g,b]=Ht.useField({name:e}),{setValue:y}=b,{value:S}=m,{error:C}=g,E=["radioProps","labelPlacement"],T=["disableRedLabelOnError","disableLabel","sameButtonColor","labelPlacement","focused","margin","fullWidth","labelAlignment"],w=()=>t.labelPlacement=="start"?"right":t.labelPlacement=="top"||t.labelPlacement=="bottom"?"center":"left",O=n.map((L,k)=>{const I=i==="top"&&(o==="start"||o==="end"),$=L.sublabel?v.jsxs("div",{children:[v.jsx("p",{style:{margin:0},children:L.label}),v.jsx(F.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:L.sublabel})]}):L.label;return v.jsx(F.FormControlLabel,{sx:{alignItems:I?"flex-start":"center"},value:k.toString(),control:v.jsx(F.Radio,{id:`${L.value}-rb`,color:t.sameButtonColor?t.sameButtonColor:L.color??"default",...Yn({...L},E)}),label:v.jsx("div",{style:{marginTop:I?"10px":0},children:$}),labelPlacement:o,disabled:L.disabled||a,style:{textAlign:w()}},`rb-${k}-${r}`)}),A=()=>{const L=n.find(k=>k.value===m.value);return v.jsxs(F.Box,{children:[v.jsx(F.Typography,{...h,children:r}),N(L)]})},N=L=>v.jsxs(F.Box,{children:[v.jsx(F.Typography,{children:L==null?void 0:L.label}),(L==null?void 0:L.sublabel)&&v.jsx(F.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:L.sublabel})]}),D=L=>{y(L.target.value),f&&f(L.target.value)};return l?A():v.jsxs(F.FormControl,{focused:t.focused,margin:u,fullWidth:t.fullWidth,error:!!C,children:[v.jsx(F.FormLabel,{htmlFor:e,required:s,disabled:t.disableLabel,children:r}),v.jsx(F.RadioGroup,{id:e,value:S??"",...Yn({...t},T),onChange:D,children:O}),v.jsx(Jn,{name:e,id:`${e}-err`})]})},SB=t=>{const{name:e,label:n=Cn(e),min:r=0,max:o=100,step:i=1,readOnly:s,staticLabelProps:a={fontSize:".9em",color:"#808080"}}=t,l=Ht.useField(e),{value:u}=l[0],{setValue:f}=l[2],h=["label"];return s?(()=>{let g;return Array.isArray(u)?g=s==="percent"?`${100*(u[0]??0)/o}% - ${100*(u[1]??0)/o}%`:`${u[0]??0} - ${u[1]??0}`:g=s==="percent"?`${100*(u??0)/o}%`:`${u??0}`,v.jsxs(F.Box,{children:[v.jsx(F.Typography,{...a,children:n}),v.jsx(F.Typography,{children:g})]})})():v.jsxs(F.FormControl,{fullWidth:!0,children:[v.jsx(F.Typography,{gutterBottom:!0,color:"textSecondary",children:n}),v.jsx(F.Slider,{...Yn({...t},h),id:t.name,value:u??0,onChange:(g,b)=>{f(b)},min:r,max:o,step:i})]})},CB=t=>{const{name:e,options:n=[],label:r=Cn(e),selectedOptionIcon:o=void 0,staticLabel:i=!1,staticLabelProps:s={fontSize:".9em",color:"#808080"},variant:a="outlined",readOnly:l=!1,margin:u="dense",required:f}=t,[h,m,g]=Ht.useField({name:e}),{setValue:b}=g,{value:y}=h,{error:S}=m,C=_.useCallback(()=>{let I="";for(let $=0;$<n.length;$++)JSON.stringify(n[$].value)===JSON.stringify(y)&&(I=$.toString());return I},[n,y]),E=_.useCallback(()=>{const I=[],$=y.toString().split(",");for(const H of $)for(let z=0;z<n.length;z++)n[z].value===H&&I.push(z);return I},[n,y]);_.useEffect(()=>{O(t.multiple?E():C())},[n,t.multiple,y,E,C]);const T=(I,$)=>t.multiple?!!y.toString().split(",").find(H=>H===JSON.stringify(I.value)):$===n.findIndex(H=>y===H.value),[w,O]=_.useState(t.multiple?E:C),A=n.map((I,$)=>{const H=o&&T(I,$)?o:void 0;return v.jsxs(F.MenuItem,{id:`select-${e}-option-${I.value}`,value:$,disabled:I.disabled,children:[o&&v.jsx(F.ListItemIcon,{children:H}),I.label]},$.toString())}),N=I=>{if(t.multiple){const $=[];I.target.value.forEach(H=>{n[H].value&&$.push(n[H].value)}),b($.join(","))}else b(n[I.target.value].value);O(I.target.value)},D=["name","options",i?"label":"","required","selectedOptionIcon","variant","staticLabel","staticLabelProps"],L=()=>i$(n,y,t.multiple),k=t.renderValue??L;return v.jsxs(F.FormControl,{fullWidth:!0,variant:a,error:!!S,margin:u,required:f,children:[i||l?v.jsx(F.Typography,{...s,children:r}):v.jsx(F.InputLabel,{id:`${e}-select-label`,children:r}),l?v.jsx(F.Typography,{children:L()}):v.jsxs(F.Box,{children:[v.jsx(F.Select,{id:`${e}-sel`,labelId:`${e}-select-label`,label:i?void 0:r,...Yn({...t},D),name:e,value:w,fullWidth:!0,onChange:I=>N(I),displayEmpty:i,renderValue:k,children:A}),v.jsx(Jn,{name:e,id:`${e}-err`})]})]})},wB=t=>{const{name:e,label:n=Cn(e),labelPlacement:r="end",readOnly:o,staticLabelProps:i={fontSize:".9em",color:"#808080"},onChange:s,color:a="primary",chipColor:l,activeValue:u=!0,inactiveValue:f=!1}=t,[h,,m]=Ht.useField({name:e}),{setValue:g}=m,{value:b}=h;b===void 0&&console.error(`Please set an initial value for ${e}`);const y=["labelPlacement","chipColor","activeValue","inactiveValue"],S=C=>{if(typeof C!="boolean")return String(C);switch(o){case"YES_NO":return C===u?"Yes":"No";case"ON_OFF":return C===u?"On":"Off";default:return C===u?"True":"False"}};return o?v.jsxs(F.Box,{children:[v.jsx(F.Typography,{...i,children:n}),v.jsx(F.Typography,{children:S(b)})]}):v.jsxs(F.Box,{bgcolor:l??"inherit",sx:l?{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"32px",padding:"2px 0px 2px 12px"}:{},children:[v.jsx(F.FormControlLabel,{label:n,sx:{"& .MuiFormControlLabel-label":{color:a}},labelPlacement:r,control:v.jsx(F.Switch,{...Yn({...t},y),id:e,...h,onChange:C=>{if(typeof u=="string"&&typeof f=="string"){const E=C.target.checked?u:f;g(E),s&&s(E)}else g(C.target.checked),s&&s(C.target.checked)},checked:b===u})}),v.jsx(Jn,{name:e,id:`${e}-err`})]})},TB=Be([v.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 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),v.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),EB=Be(v.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),MB=Be(v.jsx("path",{d:"M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z"}),"AddPhotoAlternate"),OB=Be(v.jsx("path",{d:"M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5"}),"Attachment"),kB=Be(v.jsx("path",{d:"m19 18 2 1V3c0-1.1-.9-2-2-2H8.99C7.89 1 7 1.9 7 3h10c1.1 0 2 .9 2 2zM15 5H5c-1.1 0-2 .9-2 2v16l7-3 7 3V7c0-1.1-.9-2-2-2"}),"Bookmarks"),AB=Be(v.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),IB=Be(v.jsx("path",{d:"M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"Checklist"),DB=Be(v.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"}),"Close"),PB=Be(v.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"}),"CloseOutlined"),_B=Be(v.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"}),"Code"),PC=Be(v.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode"),NB=Be(v.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),LB=Be(v.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),$B=Be(v.jsx("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),FB=Be(v.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),RB=Be(v.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),BB=Be(v.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5"}),"FormatBold"),VB=Be(v.jsx("path",{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z"}),"FormatClear"),zB=Be(v.jsx("path",{d:"M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12M5.21 10 10 5.21 14.79 10zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5M2 20h20v4H2z"}),"FormatColorFill"),HB=Be(v.jsx("path",{d:"M11 17h10v-2H11zm-8-5 4 4V8zm0 9h18v-2H3zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentDecrease"),jB=Be(v.jsx("path",{d:"M3 21h18v-2H3zM3 8v8l4-4zm8 9h10v-2H11zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentIncrease"),WB=Be(v.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),qB=Be(v.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z"}),"FormatListBulleted"),UB=Be(v.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z"}),"FormatListNumbered"),KB=Be(v.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"}),"FormatQuote"),YB=Be(v.jsx("path",{d:"M9 4v3h5v12h3V7h5V4zm-6 8h3v7h3v-7h3V9H3z"}),"FormatSize"),GB=Be(v.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z"}),"FormatUnderlined"),JB=Be(v.jsx("path",{d:"M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2zm8 0h4v4h-4zM1.27 1.27 0 2.55l2 2V20c0 1.1.9 2 2 2h15.46l2 2 1.27-1.27zM10 12.55 11.45 14H10zm-6-6L5.45 8H4zM8 20H4v-4h4zm0-6H4v-4h3.45l.55.55zm6 6h-4v-4h3.45l.55.54zm2 0v-1.46L17.46 20z"}),"GridOff"),ZB=Be(v.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRule"),XB=Be(v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),QB=Be(v.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),_C=Be(v.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),NC=Be(v.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode"),tm=Be(v.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),e5=Be(v.jsx("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout"),t5=Be(v.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),n5=Be(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),r5=Be(v.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),o5=Be(v.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo"),i5=Be(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),s5=Be(v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11H7v-2h10z"}),"RemoveCircle"),a5=Be(v.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"}),"SearchOutlined"),l5=Be(v.jsx("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort"),c5=Be(v.jsx("path",{d:"M6.85 7.08C6.85 4.37 9.45 3 12.24 3c1.64 0 3 .49 3.9 1.28.77.65 1.46 1.73 1.46 3.24h-3.01c0-.31-.05-.59-.15-.85-.29-.86-1.2-1.28-2.25-1.28-1.86 0-2.34 1.02-2.34 1.7 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.21-.34-.54-.89-.54-1.92M21 12v-2H3v2h9.62c1.15.45 1.96.75 1.96 1.97 0 1-.81 1.67-2.28 1.67-1.54 0-2.93-.54-2.93-2.51H6.4c0 .55.08 1.13.24 1.58.81 2.29 3.29 3.3 5.67 3.3 2.27 0 5.3-.89 5.3-4.05 0-.3-.01-1.16-.48-1.94H21z"}),"StrikethroughS"),u5=Be(v.jsx("path",{d:"M22 18h-2v1h3v1h-4v-2c0-.55.45-1 1-1h2v-1h-3v-1h3c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1M5.88 18h2.66l3.4-5.42h.12l3.4 5.42h2.66l-4.65-7.27L17.81 4h-2.68l-3.07 4.99h-.12L8.85 4H6.19l4.32 6.73z"}),"Subscript"),d5=Be(v.jsx("path",{d:"M22 7h-2v1h3v1h-4V7c0-.55.45-1 1-1h2V5h-3V4h3c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1M5.88 20h2.66l3.4-5.42h.12l3.4 5.42h2.66l-4.65-7.27L17.81 6h-2.68l-3.07 4.99h-.12L8.85 6H6.19l4.32 6.73z"}),"Superscript"),f5=Be(v.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"Undo"),p5=t=>{const{onSearch:e,initialValue:n="",lazySearch:r=!1}=t,[o,i]=J.useState(n),s=f=>{i(f.target.value),r||e(f.target.value)},a=f=>{f.key==="Enter"&&l()},l=()=>{e(o)},u=()=>{i(""),e("")};return v.jsx(F.TextField,{type:"text",placeholder:"Search...",value:o,onChange:s,onKeyDown:a,className:"search-bar",size:"small",fullWidth:!0,slotProps:{input:{startAdornment:v.jsx(F.InputAdornment,{position:"start",children:v.jsx(F.IconButton,{"data-testid":"search-button",style:{marginLeft:-10},onClick:l,children:v.jsx(a5,{})})}),endAdornment:o&&v.jsx(F.IconButton,{style:{marginRight:-10},"aria-label":"clear search","data-testid":"clear-search",onClick:u,children:v.jsx(PB,{})})}}})};function te(){return te=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},te.apply(null,arguments)}function nt(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}function jt({props:t,name:e}){return JF({props:t,name:e,defaultTheme:zu,themeId:Il})}const h5=["localeText"],qu=_.createContext(null);process.env.NODE_ENV!=="production"&&(qu.displayName="MuiPickersAdapterContext");const nm=function(e){const{localeText:n}=e,r=nt(e,h5),{utils:o,localeText:i}=_.useContext(qu)??{utils:void 0,localeText:void 0},s=jt({props:r,name:"MuiLocalizationProvider"}),{children:a,dateAdapter:l,dateFormats:u,dateLibInstance:f,adapterLocale:h,localeText:m}=s,g=_.useMemo(()=>te({},m,i,n),[m,i,n]),b=_.useMemo(()=>{if(!l)return o||null;const C=new l({locale:h,formats:u,instance:f});if(!C.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(`
106
+ `));return C},[l,h,u,f,o]),y=_.useMemo(()=>b?{minDate:b.date("1900-01-01T00:00:00.000"),maxDate:b.date("2099-12-31T00:00:00.000")}:null,[b]),S=_.useMemo(()=>({utils:b,defaultDates:y,localeText:g}),[y,b,g]);return v.jsx(qu.Provider,{value:S,children:a})};process.env.NODE_ENV!=="production"&&(nm.propTypes={adapterLocale:c.any,children:c.node,dateAdapter:c.func,dateFormats:c.shape({dayOfMonth:c.string,dayOfMonthFull:c.string,fullDate:c.string,fullTime:c.string,fullTime12h:c.string,fullTime24h:c.string,hours12h:c.string,hours24h:c.string,keyboardDate:c.string,keyboardDateTime:c.string,keyboardDateTime12h:c.string,keyboardDateTime24h:c.string,meridiem:c.string,minutes:c.string,month:c.string,monthShort:c.string,normalDate:c.string,normalDateWithWeekday:c.string,seconds:c.string,shortDate:c.string,weekday:c.string,weekdayShort:c.string,year:c.string}),dateLibInstance:c.any,localeText:c.object});var Uu={exports:{}},m5=Uu.exports,LC;function g5(){return LC||(LC=1,function(t,e){(function(n,r){t.exports=r()})(m5,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",l="hour",u="day",f="week",h="month",m="quarter",g="year",b="date",y="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var R=["th","st","nd","rd"],B=z%100;return"["+z+(R[(B-20)%10]||R[B]||R[0])+"]"}},T=function(z,R,B){var W=String(z);return!W||W.length>=R?z:""+Array(R+1-W.length).join(B)+z},w={s:T,z:function(z){var R=-z.utcOffset(),B=Math.abs(R),W=Math.floor(B/60),U=B%60;return(R<=0?"+":"-")+T(W,2,"0")+":"+T(U,2,"0")},m:function z(R,B){if(R.date()<B.date())return-z(B,R);var W=12*(B.year()-R.year())+(B.month()-R.month()),U=R.clone().add(W,h),G=B-U<0,Y=R.clone().add(W+(G?-1:1),h);return+(-(W+(B-U)/(G?U-Y:Y-U))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:h,y:g,w:f,d:u,D:b,h:l,m:a,s,ms:i,Q:m}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},O="en",A={};A[O]=E;var N="$isDayjsObject",D=function(z){return z instanceof $||!(!z||!z[N])},L=function z(R,B,W){var U;if(!R)return O;if(typeof R=="string"){var G=R.toLowerCase();A[G]&&(U=G),B&&(A[G]=B,U=G);var Y=R.split("-");if(!U&&Y.length>1)return z(Y[0])}else{var Z=R.name;A[Z]=R,U=Z}return!W&&U&&(O=U),U||!W&&O},k=function(z,R){if(D(z))return z.clone();var B=typeof R=="object"?R:{};return B.date=z,B.args=arguments,new $(B)},I=w;I.l=L,I.i=D,I.w=function(z,R){return k(z,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var $=function(){function z(B){this.$L=L(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[N]=!0}var R=z.prototype;return R.parse=function(B){this.$d=function(W){var U=W.date,G=W.utc;if(U===null)return new Date(NaN);if(I.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var Y=U.match(S);if(Y){var Z=Y[2]-1||0,me=(Y[7]||"0").substring(0,3);return G?new Date(Date.UTC(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,me)):new Date(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,me)}}return new Date(U)}(B),this.init()},R.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},R.$utils=function(){return I},R.isValid=function(){return this.$d.toString()!==y},R.isSame=function(B,W){var U=k(B);return this.startOf(W)<=U&&U<=this.endOf(W)},R.isAfter=function(B,W){return k(B)<this.startOf(W)},R.isBefore=function(B,W){return this.endOf(W)<k(B)},R.$g=function(B,W,U){return I.u(B)?this[W]:this.set(U,B)},R.unix=function(){return Math.floor(this.valueOf()/1e3)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(B,W){var U=this,G=!!I.u(W)||W,Y=I.p(B),Z=function(Q,ie){var he=I.w(U.$u?Date.UTC(U.$y,ie,Q):new Date(U.$y,ie,Q),U);return G?he:he.endOf(u)},me=function(Q,ie){return I.w(U.toDate()[Q].apply(U.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(ie)),U)},fe=this.$W,pe=this.$M,re=this.$D,ue="set"+(this.$u?"UTC":"");switch(Y){case g:return G?Z(1,0):Z(31,11);case h:return G?Z(1,pe):Z(0,pe+1);case f:var ae=this.$locale().weekStart||0,K=(fe<ae?fe+7:fe)-ae;return Z(G?re-K:re+(6-K),pe);case u:case b:return me(ue+"Hours",0);case l:return me(ue+"Minutes",1);case a:return me(ue+"Seconds",2);case s:return me(ue+"Milliseconds",3);default:return this.clone()}},R.endOf=function(B){return this.startOf(B,!1)},R.$set=function(B,W){var U,G=I.p(B),Y="set"+(this.$u?"UTC":""),Z=(U={},U[u]=Y+"Date",U[b]=Y+"Date",U[h]=Y+"Month",U[g]=Y+"FullYear",U[l]=Y+"Hours",U[a]=Y+"Minutes",U[s]=Y+"Seconds",U[i]=Y+"Milliseconds",U)[G],me=G===u?this.$D+(W-this.$W):W;if(G===h||G===g){var fe=this.clone().set(b,1);fe.$d[Z](me),fe.init(),this.$d=fe.set(b,Math.min(this.$D,fe.daysInMonth())).$d}else Z&&this.$d[Z](me);return this.init(),this},R.set=function(B,W){return this.clone().$set(B,W)},R.get=function(B){return this[I.p(B)]()},R.add=function(B,W){var U,G=this;B=Number(B);var Y=I.p(W),Z=function(pe){var re=k(G);return I.w(re.date(re.date()+Math.round(pe*B)),G)};if(Y===h)return this.set(h,this.$M+B);if(Y===g)return this.set(g,this.$y+B);if(Y===u)return Z(1);if(Y===f)return Z(7);var me=(U={},U[a]=r,U[l]=o,U[s]=n,U)[Y]||1,fe=this.$d.getTime()+B*me;return I.w(fe,this)},R.subtract=function(B,W){return this.add(-1*B,W)},R.format=function(B){var W=this,U=this.$locale();if(!this.isValid())return U.invalidDate||y;var G=B||"YYYY-MM-DDTHH:mm:ssZ",Y=I.z(this),Z=this.$H,me=this.$m,fe=this.$M,pe=U.weekdays,re=U.months,ue=U.meridiem,ae=function(ie,he,ee,se){return ie&&(ie[he]||ie(W,G))||ee[he].slice(0,se)},K=function(ie){return I.s(Z%12||12,ie,"0")},Q=ue||function(ie,he,ee){var se=ie<12?"AM":"PM";return ee?se.toLowerCase():se};return G.replace(C,function(ie,he){return he||function(ee){switch(ee){case"YY":return String(W.$y).slice(-2);case"YYYY":return I.s(W.$y,4,"0");case"M":return fe+1;case"MM":return I.s(fe+1,2,"0");case"MMM":return ae(U.monthsShort,fe,re,3);case"MMMM":return ae(re,fe);case"D":return W.$D;case"DD":return I.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return ae(U.weekdaysMin,W.$W,pe,2);case"ddd":return ae(U.weekdaysShort,W.$W,pe,3);case"dddd":return pe[W.$W];case"H":return String(Z);case"HH":return I.s(Z,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return Q(Z,me,!0);case"A":return Q(Z,me,!1);case"m":return String(me);case"mm":return I.s(me,2,"0");case"s":return String(W.$s);case"ss":return I.s(W.$s,2,"0");case"SSS":return I.s(W.$ms,3,"0");case"Z":return Y}return null}(ie)||Y.replace(":","")})},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(B,W,U){var G,Y=this,Z=I.p(W),me=k(B),fe=(me.utcOffset()-this.utcOffset())*r,pe=this-me,re=function(){return I.m(Y,me)};switch(Z){case g:G=re()/12;break;case h:G=re();break;case m:G=re()/3;break;case f:G=(pe-fe)/6048e5;break;case u:G=(pe-fe)/864e5;break;case l:G=pe/o;break;case a:G=pe/r;break;case s:G=pe/n;break;default:G=pe}return U?G:I.a(G)},R.daysInMonth=function(){return this.endOf(h).$D},R.$locale=function(){return A[this.$L]},R.locale=function(B,W){if(!B)return this.$L;var U=this.clone(),G=L(B,W,!0);return G&&(U.$L=G),U},R.clone=function(){return I.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},z}(),H=$.prototype;return k.prototype=H,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",u],["$M",h],["$y",g],["$D",b]].forEach(function(z){H[z[1]]=function(R){return this.$g(R,z[0],z[1])}}),k.extend=function(z,R){return z.$i||(z(R,$,k),z.$i=!0),k},k.locale=L,k.isDayjs=D,k.unix=function(z){return k(1e3*z)},k.en=A[O],k.Ls=A,k.p={},k})}(Uu)),Uu.exports}var y5=g5();const mn=Gn(y5);var Ku={exports:{}},b5=Ku.exports,$C;function v5(){return $C||($C=1,function(t,e){(function(n,r){t.exports=r()})(b5,function(){var n="week",r="year";return function(o,i,s){var a=i.prototype;a.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 f=s(this).startOf(r).add(1,r).date(u),h=s(this).endOf(n);if(f.isBefore(h))return 1}var m=s(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),g=this.diff(m,n,!0);return g<0?s(this).startOf("week").week():Math.ceil(g)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}(Ku)),Ku.exports}var x5=v5();const S5=Gn(x5);var Yu={exports:{}},C5=Yu.exports,FC;function w5(){return FC||(FC=1,function(t,e){(function(n,r){t.exports=r()})(C5,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},u=function(S){return(S=+S)+(S>68?1900:2e3)},f=function(S){return function(C){this[S]=+C}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(S){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var E=C.match(/([+-]|\d\d)/g),T=60*E[1]+(+E[2]||0);return T===0?0:E[0]==="+"?-T:T}(S)}],m=function(S){var C=l[S];return C&&(C.indexOf?C:C.s.concat(C.f))},g=function(S,C){var E,T=l.meridiem;if(T){for(var w=1;w<=24;w+=1)if(S.indexOf(T(w,0,C))>-1){E=w>12;break}}else E=S===(C?"pm":"PM");return E},b={A:[a,function(S){this.afternoon=g(S,!1)}],a:[a,function(S){this.afternoon=g(S,!0)}],Q:[o,function(S){this.month=3*(S-1)+1}],S:[o,function(S){this.milliseconds=100*+S}],SS:[i,function(S){this.milliseconds=10*+S}],SSS:[/\d{3}/,function(S){this.milliseconds=+S}],s:[s,f("seconds")],ss:[s,f("seconds")],m:[s,f("minutes")],mm:[s,f("minutes")],H:[s,f("hours")],h:[s,f("hours")],HH:[s,f("hours")],hh:[s,f("hours")],D:[s,f("day")],DD:[i,f("day")],Do:[a,function(S){var C=l.ordinal,E=S.match(/\d+/);if(this.day=E[0],C)for(var T=1;T<=31;T+=1)C(T).replace(/\[|\]/g,"")===S&&(this.day=T)}],w:[s,f("week")],ww:[i,f("week")],M:[s,f("month")],MM:[i,f("month")],MMM:[a,function(S){var C=m("months"),E=(m("monthsShort")||C.map(function(T){return T.slice(0,3)})).indexOf(S)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[a,function(S){var C=m("months").indexOf(S)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,f("year")],YY:[i,function(S){this.year=u(S)}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function y(S){var C,E;C=S,E=l&&l.formats;for(var T=(S=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(k,I,$){var H=$&&$.toUpperCase();return I||E[$]||n[$]||E[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(z,R,B){return R||B.slice(1)})})).match(r),w=T.length,O=0;O<w;O+=1){var A=T[O],N=b[A],D=N&&N[0],L=N&&N[1];T[O]=L?{regex:D,parser:L}:A.replace(/^\[|\]$/g,"")}return function(k){for(var I={},$=0,H=0;$<w;$+=1){var z=T[$];if(typeof z=="string")H+=z.length;else{var R=z.regex,B=z.parser,W=k.slice(H),U=R.exec(W)[0];B.call(I,U),k=k.replace(U,"")}}return function(G){var Y=G.afternoon;if(Y!==void 0){var Z=G.hours;Y?Z<12&&(G.hours+=12):Z===12&&(G.hours=0),delete G.afternoon}}(I),I}}return function(S,C,E){E.p.customParseFormat=!0,S&&S.parseTwoDigitYear&&(u=S.parseTwoDigitYear);var T=C.prototype,w=T.parse;T.parse=function(O){var A=O.date,N=O.utc,D=O.args;this.$u=N;var L=D[1];if(typeof L=="string"){var k=D[2]===!0,I=D[3]===!0,$=k||I,H=D[2];I&&(H=D[2]),l=this.$locale(),!k&&H&&(l=E.Ls[H]),this.$d=function(W,U,G,Y){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*W);var Z=y(U)(W),me=Z.year,fe=Z.month,pe=Z.day,re=Z.hours,ue=Z.minutes,ae=Z.seconds,K=Z.milliseconds,Q=Z.zone,ie=Z.week,he=new Date,ee=pe||(me||fe?1:he.getDate()),se=me||he.getFullYear(),le=0;me&&!fe||(le=fe>0?fe-1:he.getMonth());var ge,we=re||0,xe=ue||0,Oe=ae||0,Le=K||0;return Q?new Date(Date.UTC(se,le,ee,we,xe,Oe,Le+60*Q.offset*1e3)):G?new Date(Date.UTC(se,le,ee,we,xe,Oe,Le)):(ge=new Date(se,le,ee,we,xe,Oe,Le),ie&&(ge=Y(ge).week(ie).toDate()),ge)}catch{return new Date("")}}(A,L,N,E),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),$&&A!=this.format(L)&&(this.$d=new Date("")),l={}}else if(L instanceof Array)for(var z=L.length,R=1;R<=z;R+=1){D[1]=L[R-1];var B=E.apply(this,D);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}R===z&&(this.$d=new Date(""))}else w.call(this,O)}}})}(Yu)),Yu.exports}var T5=w5();const E5=Gn(T5);var Gu={exports:{}},M5=Gu.exports,RC;function O5(){return RC||(RC=1,function(t,e){(function(n,r){t.exports=r()})(M5,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var s=o.prototype,a=s.format;i.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(h,m){return h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(g,b,y){var S=y&&y.toUpperCase();return b||m[y]||n[y]||m[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C,E,T){return E||T.slice(1)})})}(l,u===void 0?{}:u);return a.call(this,f)}}})}(Gu)),Gu.exports}var k5=O5();const A5=Gn(k5);var Ju={exports:{}},I5=Ju.exports,BC;function D5(){return BC||(BC=1,function(t,e){(function(n,r){t.exports=r()})(I5,function(){return function(n,r,o){r.prototype.isBetween=function(i,s,a,l){var u=o(i),f=o(s),h=(l=l||"()")[0]==="(",m=l[1]===")";return(h?this.isAfter(u,a):!this.isBefore(u,a))&&(m?this.isBefore(f,a):!this.isAfter(f,a))||(h?this.isBefore(u,a):!this.isAfter(u,a))&&(m?this.isAfter(f,a):!this.isBefore(f,a))}}})}(Ju)),Ju.exports}var P5=D5();const _5=Gn(P5);var Zu={exports:{}},N5=Zu.exports,VC;function L5(){return VC||(VC=1,function(t,e){(function(n,r){t.exports=r()})(N5,function(){return function(n,r){var o=r.prototype,i=o.format;o.format=function(s){var a=this,l=this.$locale();if(!this.isValid())return i.bind(this)(s);var u=this.$utils(),f=(s||"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(h){switch(h){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return u.s(a.week(),h==="w"?1:2,"0");case"W":case"WW":return u.s(a.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return u.s(String(a.$H===0?24:a.$H),h==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return h}});return i.bind(this)(f)}}})}(Zu)),Zu.exports}var $5=L5();const F5=Gn($5),zC=new Set;function HC(t,e="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(t)?t.join(`
107
+ `):t;zC.has(n)||(zC.add(n),e==="error"?console.error(n):console.warn(n))}mn.extend(A5),mn.extend(S5),mn.extend(_5),mn.extend(F5);const R5={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"},B5={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"},rm=["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(`
108
+ `),jC=["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(`
109
+ `),V5=(t,e)=>e?(...n)=>t(...n).locale(e):t;class z5{constructor({locale:e,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=R5,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale()?r:r.locale(o)},this.hasUTCPlugin=()=>typeof mn.utc<"u",this.hasTimezonePlugin=()=>typeof mn.tz<"u",this.isSame=(r,o,i)=>{const s=this.setTimezone(o,this.getTimezone(r));return r.format(i)===s.format(i)},this.cleanTimezone=r=>{switch(r){case"default":return;case"system":return mn.tz.guess();default:return r}},this.createSystemDate=r=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const o=mn.tz.guess();return o!=="UTC"?mn.tz(r,o):mn(r)}return mn(r)},this.createUTCDate=r=>{if(!this.hasUTCPlugin())throw new Error(rm);return mn.utc(r)},this.createTZDate=(r,o)=>{if(!this.hasUTCPlugin())throw new Error(rm);if(!this.hasTimezonePlugin())throw new Error(jC);const i=r!==void 0&&!r.endsWith("Z");return mn(r).tz(this.cleanTimezone(o),i)},this.getLocaleFormats=()=>{const r=mn.Ls,o=this.locale||"en";let i=r[o];return i===void 0&&(process.env.NODE_ENV!=="production"&&HC(["MUI X: Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale."]),i=r.en),i.formats},this.adjustOffset=r=>{if(!this.hasTimezonePlugin())return r;const o=this.getTimezone(r);if(o!=="UTC"){const i=r.tz(this.cleanTimezone(o),!0);if(i.$offset===(r.$offset??0))return r;r.$offset=i.$offset}return r},this.date=(r,o="default")=>{if(r===null)return null;let i;return o==="UTC"?i=this.createUTCDate(r):o==="system"||o==="default"&&!this.hasTimezonePlugin()?i=this.createSystemDate(r):i=this.createTZDate(r,o),this.locale===void 0?i:i.locale(this.locale)},this.getInvalidDate=()=>mn(new Date("Invalid date")),this.getTimezone=r=>{var o;if(this.hasTimezonePlugin()){const i=(o=r.$x)==null?void 0:o.$timezone;if(i)return i}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(rm);return r.utc()}if(o==="system")return r.local();if(!this.hasTimezonePlugin()){if(o==="default")return r;throw new Error(jC)}return mn.tz(r,this.cleanTimezone(o))},this.toJsDate=r=>r.toDate(),this.parse=(r,o)=>r===""?null:this.dayjs(r,o,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=r=>{const o=this.getLocaleFormats(),i=s=>s.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(a,l,u)=>l||u.slice(1));return r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(s,a,l)=>{const u=l&&l.toUpperCase();return a||o[l]||i(o[u])})},this.isValid=r=>r==null?!1:r.isValid(),this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>this.dayjs(r).format(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:r.toDate().getTime()===o.toDate().getTime(),this.isSameYear=(r,o)=>this.isSame(r,o,"YYYY"),this.isSameMonth=(r,o)=>this.isSame(r,o,"YYYY-MM"),this.isSameDay=(r,o)=>this.isSame(r,o,"YYYY-MM-DD"),this.isSameHour=(r,o)=>r.isSame(o,"hour"),this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()>o.utc():r.isAfter(o,"year"),this.isAfterDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()>o.utc():r.isAfter(o,"day"),this.isBefore=(r,o)=>r<o,this.isBeforeYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()<o.utc():r.isBefore(o,"year"),this.isBeforeDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()<o.utc():r.isBefore(o,"day"),this.isWithinRange=(r,[o,i])=>r>=o&&r<=i,this.startOfYear=r=>this.adjustOffset(r.startOf("year")),this.startOfMonth=r=>this.adjustOffset(r.startOf("month")),this.startOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).startOf("week")),this.startOfDay=r=>this.adjustOffset(r.startOf("day")),this.endOfYear=r=>this.adjustOffset(r.endOf("year")),this.endOfMonth=r=>this.adjustOffset(r.endOf("month")),this.endOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).endOf("week")),this.endOfDay=r=>this.adjustOffset(r.endOf("day")),this.addYears=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"year"):r.add(o,"year")),this.addMonths=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"month"):r.add(o,"month")),this.addWeeks=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"week"):r.add(o,"week")),this.addDays=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"day"):r.add(o,"day")),this.addHours=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"hour"):r.add(o,"hour")),this.addMinutes=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"minute"):r.add(o,"minute")),this.addSeconds=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"second"):r.add(o,"second")),this.getYear=r=>r.year(),this.getMonth=r=>r.month(),this.getDate=r=>r.date(),this.getHours=r=>r.hour(),this.getMinutes=r=>r.minute(),this.getSeconds=r=>r.second(),this.getMilliseconds=r=>r.millisecond(),this.setYear=(r,o)=>this.adjustOffset(r.set("year",o)),this.setMonth=(r,o)=>this.adjustOffset(r.set("month",o)),this.setDate=(r,o)=>this.adjustOffset(r.set("date",o)),this.setHours=(r,o)=>this.adjustOffset(r.set("hour",o)),this.setMinutes=(r,o)=>this.adjustOffset(r.set("minute",o)),this.setSeconds=(r,o)=>this.adjustOffset(r.set("second",o)),this.setMilliseconds=(r,o)=>this.adjustOffset(r.set("millisecond",o)),this.getDaysInMonth=r=>r.daysInMonth(),this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r));let s=0,a=o;const l=[];for(;a<i;){const u=Math.floor(s/7);l[u]=l[u]||[],l[u].push(a),a=this.addDays(a,1),s+=1}return l},this.getWeekNumber=r=>r.week(),this.getYearRange=([r,o])=>{const i=this.startOfYear(r),s=this.endOfYear(o),a=[];let l=i;for(;this.isBefore(l,s);)a.push(l),l=this.addYears(l,1);return a},this.dayjs=V5(mn,e),this.locale=e,this.formats=te({},B5,n),mn.extend(E5)}getDayOfWeek(e){return e.day()+1}}function Xu(t){return parseInt(t,10)||0}const H5={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function j5(t){for(const e in t)return!1;return!0}function WC(t){return j5(t)||t.outerHeightStyle===0&&!t.overflowing}const qC=_.forwardRef(function(e,n){const{onChange:r,maxRows:o,minRows:i=1,style:s,value:a,...l}=e,{current:u}=_.useRef(a!=null),f=_.useRef(null),h=Mt(n,f),m=_.useRef(null),g=_.useRef(null),b=_.useCallback(()=>{const T=f.current,w=g.current;if(!T||!w)return;const A=Bo(T).getComputedStyle(T);if(A.width==="0px")return{outerHeightStyle:0,overflowing:!1};w.style.width=A.width,w.value=T.value||e.placeholder||"x",w.value.slice(-1)===`
110
+ `&&(w.value+=" ");const N=A.boxSizing,D=Xu(A.paddingBottom)+Xu(A.paddingTop),L=Xu(A.borderBottomWidth)+Xu(A.borderTopWidth),k=w.scrollHeight;w.value="x";const I=w.scrollHeight;let $=k;i&&($=Math.max(Number(i)*I,$)),o&&($=Math.min(Number(o)*I,$)),$=Math.max($,I);const H=$+(N==="border-box"?D+L:0),z=Math.abs($-k)<=1;return{outerHeightStyle:H,overflowing:z}},[o,i,e.placeholder]),y=Fe(()=>{const T=f.current,w=b();if(!T||!w||WC(w))return!1;const O=w.outerHeightStyle;return m.current!=null&&m.current!==O}),S=_.useCallback(()=>{const T=f.current,w=b();if(!T||!w||WC(w))return;const O=w.outerHeightStyle;m.current!==O&&(m.current=O,T.style.height=`${O}px`),T.style.overflow=w.overflowing?"hidden":""},[b]),C=_.useRef(-1);wn(()=>{const T=aS(S),w=f==null?void 0:f.current;if(!w)return;const O=Bo(w);O.addEventListener("resize",T);let A;return typeof ResizeObserver<"u"&&(A=new ResizeObserver(()=>{y()&&(A.unobserve(w),cancelAnimationFrame(C.current),S(),C.current=requestAnimationFrame(()=>{A.observe(w)}))}),A.observe(w)),()=>{T.clear(),cancelAnimationFrame(C.current),O.removeEventListener("resize",T),A&&A.disconnect()}},[b,S,y]),wn(()=>{S()});const E=T=>{u||S(),r&&r(T)};return v.jsxs(_.Fragment,{children:[v.jsx("textarea",{value:a,onChange:E,ref:h,rows:i,style:s,...l}),v.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:g,tabIndex:-1,style:{...H5.shadow,...s,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(qC.propTypes={className:c.string,maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),onChange:c.func,placeholder:c.string,style:c.object,value:c.oneOfType([c.arrayOf(c.string),c.number,c.string])});function Nl(t){return typeof t=="string"}function ca({props:t,states:e,muiFormControl:n}){return e.reduce((r,o)=>(r[o]=t[o],n&&typeof t[o]>"u"&&(r[o]=n[o]),r),{})}const Ll=_.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ll.displayName="FormControlContext");function ro(){return _.useContext(Ll)}function UC(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function Qu(t,e=!1){return t&&(UC(t.value)&&t.value!==""||e&&UC(t.defaultValue)&&t.defaultValue!=="")}function W5(t){return t.startAdornment}function q5(t){return Ue("MuiInputBase",t)}const ua=We("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var KC;const ed=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${Ae(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},td=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},U5=t=>{const{classes:e,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:a,fullWidth:l,hiddenLabel:u,multiline:f,readOnly:h,size:m,startAdornment:g,type:b}=t,y={root:["root",`color${Ae(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",m&&m!=="medium"&&`size${Ae(m)}`,f&&"multiline",g&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",b==="search"&&"inputTypeSearch",f&&"inputMultiline",m==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",g&&"inputAdornedStart",i&&"inputAdornedEnd",h&&"readOnly"]};return qe(y,q5,e)},nd=ye("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ed})(Dt(({theme:t})=>({...t.typography.body1,color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ua.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:n})=>e.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),rd=ye("input",{name:"MuiInputBase",slot:"Input",overridesResolver:td})(Dt(({theme:t})=>{const e=t.palette.mode==="light",n={color:"currentColor",...t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5},transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},r={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.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] + .${ua.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},[`&.${ua.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),YC=qR({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),od=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:s,className:a,color:l,components:u={},componentsProps:f={},defaultValue:h,disabled:m,disableInjectingGlobalStyles:g,endAdornment:b,error:y,fullWidth:S=!1,id:C,inputComponent:E="input",inputProps:T={},inputRef:w,margin:O,maxRows:A,minRows:N,multiline:D=!1,name:L,onBlur:k,onChange:I,onClick:$,onFocus:H,onKeyDown:z,onKeyUp:R,placeholder:B,readOnly:W,renderSuffix:U,rows:G,size:Y,slotProps:Z={},slots:me={},startAdornment:fe,type:pe="text",value:re,...ue}=r,ae=T.value!=null?T.value:re,{current:K}=_.useRef(ae!=null),Q=_.useRef(),ie=_.useCallback(dt=>{process.env.NODE_ENV!=="production"&&dt&&dt.nodeName!=="INPUT"&&!dt.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
111
+ `))},[]),he=Mt(Q,w,T.ref,ie),[ee,se]=_.useState(!1),le=ro();process.env.NODE_ENV!=="production"&&_.useEffect(()=>{if(le)return le.registerEffect()},[le]);const ge=ca({props:r,muiFormControl:le,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ge.focused=le?le.focused:ee,_.useEffect(()=>{!le&&m&&ee&&(se(!1),k&&k())},[le,m,ee,k]);const we=le&&le.onFilled,xe=le&&le.onEmpty,Oe=_.useCallback(dt=>{Qu(dt)?we&&we():xe&&xe()},[we,xe]);wn(()=>{K&&Oe({value:ae})},[ae,Oe,K]);const Le=dt=>{H&&H(dt),T.onFocus&&T.onFocus(dt),le&&le.onFocus?le.onFocus(dt):se(!0)},He=dt=>{k&&k(dt),T.onBlur&&T.onBlur(dt),le&&le.onBlur?le.onBlur(dt):se(!1)},Ge=(dt,...Ln)=>{if(!K){const Kt=dt.target||Q.current;if(Kt==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":go(1));Oe({value:Kt.value})}T.onChange&&T.onChange(dt,...Ln),I&&I(dt,...Ln)};_.useEffect(()=>{Oe(Q.current)},[]);const De=dt=>{Q.current&&dt.currentTarget===dt.target&&Q.current.focus(),$&&$(dt)};let lt=E,St=T;D&&lt==="input"&&(G?(process.env.NODE_ENV!=="production"&&(N||A)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),St={type:void 0,minRows:G,maxRows:G,...St}):St={type:void 0,maxRows:A,minRows:N,...St},lt=qC);const Zt=dt=>{Oe(dt.animationName==="mui-auto-fill-cancel"?Q.current:{value:"x"})};_.useEffect(()=>{le&&le.setAdornedStart(!!fe)},[le,fe]);const vn={...r,color:ge.color||"primary",disabled:ge.disabled,endAdornment:b,error:ge.error,focused:ge.focused,formControl:le,fullWidth:S,hiddenLabel:ge.hiddenLabel,multiline:D,size:ge.size,startAdornment:fe,type:pe},cn=U5(vn),$t=me.root||u.Root||nd,An=Z.root||f.root||{},qn=me.input||u.Input||rd;return St={...St,...Z.input??f.input},v.jsxs(_.Fragment,{children:[!g&&typeof YC=="function"&&(KC||(KC=v.jsx(YC,{}))),v.jsxs($t,{...An,ref:n,onClick:De,...ue,...!Nl($t)&&{ownerState:{...vn,...An.ownerState}},className:_e(cn.root,An.className,a,W&&"MuiInputBase-readOnly"),children:[fe,v.jsx(Ll.Provider,{value:null,children:v.jsx(qn,{"aria-invalid":ge.error,"aria-describedby":o,autoComplete:i,autoFocus:s,defaultValue:h,disabled:ge.disabled,id:C,onAnimationStart:Zt,name:L,placeholder:B,readOnly:W,required:ge.required,rows:G,value:ae,onKeyDown:z,onKeyUp:R,type:pe,...St,...!Nl(qn)&&{as:lt,ownerState:{...vn,...St.ownerState}},ref:he,className:_e(cn.input,St.className,W&&"MuiInputBase-readOnly"),onBlur:He,onChange:Ge,onFocus:Le})}),b,U?U({...ge,startAdornment:fe}):null]})]})});process.env.NODE_ENV!=="production"&&(od.propTypes={"aria-describedby":c.string,autoComplete:c.string,autoFocus:c.bool,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","error","info","success","warning"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),componentsProps:c.shape({input:c.object,root:c.object}),defaultValue:c.any,disabled:c.bool,disableInjectingGlobalStyles:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,id:c.string,inputComponent:wu,inputProps:c.object,inputRef:hn,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onBlur:c.func,onChange:c.func,onClick:c.func,onFocus:c.func,onInvalid:c.func,onKeyDown:c.func,onKeyUp:c.func,placeholder:c.string,readOnly:c.bool,renderSuffix:c.func,required:c.bool,rows:c.oneOfType([c.number,c.string]),size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),slotProps:c.shape({input:c.object,root:c.object}),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any});function K5(t){return typeof t.main=="string"}function Y5(t,e=[]){if(!K5(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function Vn(t=[]){return([,e])=>e&&Y5(e,t)}function G5(t){return Ue("MuiInput",t)}const $l={...ua,...We("MuiInput",["root","underline","input"])},J5=t=>{const{classes:e,disableUnderline:n}=t,o=qe({root:["root",!n&&"underline"],input:["input"]},G5,e);return{...e,...o}},Z5=ye(nd,{shouldForwardProp:t=>to(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...ed(t,e),!n.disableUnderline&&e.underline]}})(Dt(({theme:t})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.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:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${$l.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${$l.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${$l.disabled}, .${$l.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${$l.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Vn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}}))]}})),X5=ye(rd,{name:"MuiInput",slot:"Input",overridesResolver:td})({}),id=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:a=!1,inputComponent:l="input",multiline:u=!1,slotProps:f,slots:h={},type:m="text",...g}=r,b=J5(r),S={root:{ownerState:{disableUnderline:o}}},C=f??s?Rn(f??s,S):S,E=h.root??i.Root??Z5,T=h.input??i.Input??X5;return v.jsx(od,{slots:{root:E,input:T},slotProps:C,fullWidth:a,inputComponent:l,multiline:u,ref:n,type:m,...g,classes:b})});process.env.NODE_ENV!=="production"&&(id.propTypes={autoComplete:c.string,autoFocus:c.bool,classes:c.object,color:c.oneOfType([c.oneOf(["primary","secondary"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),componentsProps:c.shape({input:c.object,root:c.object}),defaultValue:c.any,disabled:c.bool,disableUnderline:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,id:c.string,inputComponent:c.elementType,inputProps:c.object,inputRef:hn,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onChange:c.func,placeholder:c.string,readOnly:c.bool,required:c.bool,rows:c.oneOfType([c.number,c.string]),slotProps:c.shape({input:c.object,root:c.object}),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any}),id.muiName="Input";function Q5(t){return Ue("MuiFilledInput",t)}const ls={...ua,...We("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},e3=t=>{const{classes:e,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:s,multiline:a}=t,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Ae(i)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},u=qe(l,Q5,e);return{...e,...u}},t3=ye(nd,{shouldForwardProp:t=>to(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...ed(t,e),!n.disableUnderline&&e.underline]}})(Dt(({theme:t})=>{const e=t.palette.mode==="light",n=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=e?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=e?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r}},[`&.${ls.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${ls.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:s})=>!s.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ls.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ls.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ls.disabled}, .${ls.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${ls.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Vn()).map(([s])=>{var a;return{props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(a=(t.vars||t).palette[s])==null?void 0:a.main}`}}}}),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:a})=>s.multiline&&a==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),n3=ye(rd,{name:"MuiFilledInput",slot:"Input",overridesResolver:td})(Dt(({theme:t})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.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:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),sd=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:a=!1,hiddenLabel:l,inputComponent:u="input",multiline:f=!1,slotProps:h,slots:m={},type:g="text",...b}=r,y={...r,disableUnderline:o,fullWidth:a,inputComponent:u,multiline:f,type:g},S=e3(r),C={root:{ownerState:y},input:{ownerState:y}},E=h??s?Rn(C,h??s):C,T=m.root??i.Root??t3,w=m.input??i.Input??n3;return v.jsx(od,{slots:{root:T,input:w},slotProps:E,fullWidth:a,inputComponent:u,multiline:f,ref:n,type:g,...b,classes:S})});process.env.NODE_ENV!=="production"&&(sd.propTypes={autoComplete:c.string,autoFocus:c.bool,classes:c.object,color:c.oneOfType([c.oneOf(["primary","secondary"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),componentsProps:c.shape({input:c.object,root:c.object}),defaultValue:c.any,disabled:c.bool,disableUnderline:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,hiddenLabel:c.bool,id:c.string,inputComponent:c.elementType,inputProps:c.object,inputRef:hn,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onChange:c.func,placeholder:c.string,readOnly:c.bool,required:c.bool,rows:c.oneOfType([c.number,c.string]),slotProps:c.shape({input:c.object,root:c.object}),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any}),sd.muiName="Input";var GC;const r3=ye("fieldset",{shouldForwardProp:to})({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%"}),o3=ye("legend",{shouldForwardProp:to})(Dt(({theme:t})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]})));function JC(t){const{children:e,classes:n,className:r,label:o,notched:i,...s}=t,a=o!=null&&o!=="",l={...t,notched:i,withLabel:a};return v.jsx(r3,{"aria-hidden":!0,className:r,ownerState:l,...s,children:v.jsx(o3,{ownerState:l,children:a?v.jsx("span",{children:o}):GC||(GC=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}process.env.NODE_ENV!=="production"&&(JC.propTypes={children:c.node,classes:c.object,className:c.string,label:c.node,notched:c.bool.isRequired,style:c.object});function i3(t){return Ue("MuiOutlinedInput",t)}const vo={...ua,...We("MuiOutlinedInput",["root","notchedOutline","input"])},s3=t=>{const{classes:e}=t,r=qe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},i3,e);return{...e,...r}},a3=ye(nd,{shouldForwardProp:t=>to(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ed})(Dt(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${vo.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${vo.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${vo.focused} .${vo.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(t.palette).filter(Vn()).map(([n])=>({props:{color:n},style:{[`&.${vo.focused} .${vo.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}})),{props:{},style:{[`&.${vo.error} .${vo.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${vo.disabled} .${vo.notchedOutline}`]:{borderColor:(t.vars||t).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"}}]}})),l3=ye(JC,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(Dt(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}})),c3=ye(rd,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:td})(Dt(({theme:t})=>({padding:"16.5px 14px",...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.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:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),ad=_.forwardRef(function(e,n){var r;const o=xt({props:e,name:"MuiOutlinedInput"}),{components:i={},fullWidth:s=!1,inputComponent:a="input",label:l,multiline:u=!1,notched:f,slots:h={},type:m="text",...g}=o,b=s3(o),y=ro(),S=ca({props:o,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),C={...o,color:S.color||"primary",disabled:S.disabled,error:S.error,focused:S.focused,formControl:y,fullWidth:s,hiddenLabel:S.hiddenLabel,multiline:u,size:S.size,type:m},E=h.root??i.Root??a3,T=h.input??i.Input??c3;return v.jsx(od,{slots:{root:E,input:T},renderSuffix:w=>v.jsx(l3,{ownerState:C,className:b.notchedOutline,label:l!=null&&l!==""&&S.required?r||(r=v.jsxs(_.Fragment,{children:[l," ","*"]})):l,notched:typeof f<"u"?f:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:s,inputComponent:a,multiline:u,ref:n,type:m,...g,classes:{...b,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(ad.propTypes={autoComplete:c.string,autoFocus:c.bool,classes:c.object,color:c.oneOfType([c.oneOf(["primary","secondary"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),defaultValue:c.any,disabled:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,id:c.string,inputComponent:c.elementType,inputProps:c.object,inputRef:hn,label:c.node,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,notched:c.bool,onChange:c.func,placeholder:c.string,readOnly:c.bool,required:c.bool,rows:c.oneOfType([c.number,c.string]),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any}),ad.muiName="Input";function u3(t){return Ue("MuiFormLabel",t)}const Fl=We("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),d3=t=>{const{classes:e,color:n,focused:r,disabled:o,error:i,filled:s,required:a}=t,l={root:["root",`color${Ae(n)}`,o&&"disabled",i&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",i&&"error"]};return qe(l,u3,e)},f3=ye("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color==="secondary"&&e.colorSecondary,n.filled&&e.filled]}})(Dt(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(t.palette).filter(Vn()).map(([e])=>({props:{color:e},style:{[`&.${Fl.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${Fl.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Fl.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),p3=ye("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(Dt(({theme:t})=>({[`&.${Fl.error}`]:{color:(t.vars||t).palette.error.main}}))),ZC=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiFormLabel"}),{children:o,className:i,color:s,component:a="label",disabled:l,error:u,filled:f,focused:h,required:m,...g}=r,b=ro(),y=ca({props:r,muiFormControl:b,states:["color","required","focused","disabled","error","filled"]}),S={...r,color:y.color||"primary",component:a,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required},C=d3(S);return v.jsxs(f3,{as:a,ownerState:S,className:_e(C.root,i),ref:n,...g,children:[o,y.required&&v.jsxs(p3,{ownerState:S,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(ZC.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["error","info","primary","secondary","success","warning"]),c.string]),component:c.elementType,disabled:c.bool,error:c.bool,filled:c.bool,focused:c.bool,required:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function h3(t){return Ue("MuiInputLabel",t)}We("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const m3=t=>{const{classes:e,formControl:n,size:r,shrink:o,disableAnimation:i,variant:s,required:a}=t,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${Ae(r)}`,s],asterisk:[a&&"asterisk"]},u=qe(l,h3,e);return{...e,...u}},g3=ye(ZC,{shouldForwardProp:t=>to(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Fl.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(Dt(({theme:t})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.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:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.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:e,ownerState:n})=>e==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:n,size:r})=>e==="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:e,ownerState:n})=>e==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),om=_.forwardRef(function(e,n){const r=xt({name:"MuiInputLabel",props:e}),{disableAnimation:o=!1,margin:i,shrink:s,variant:a,className:l,...u}=r,f=ro();let h=s;typeof h>"u"&&f&&(h=f.filled||f.focused||f.adornedStart);const m=ca({props:r,muiFormControl:f,states:["size","variant","required","focused"]}),g={...r,disableAnimation:o,formControl:f,shrink:h,size:m.size,variant:m.variant,required:m.required,focused:m.focused},b=m3(g);return v.jsx(g3,{"data-shrink":h,ref:n,className:_e(b.root,l),...u,ownerState:g,classes:b})});process.env.NODE_ENV!=="production"&&(om.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["error","info","primary","secondary","success","warning"]),c.string]),disableAnimation:c.bool,disabled:c.bool,error:c.bool,focused:c.bool,margin:c.oneOf(["dense"]),required:c.bool,shrink:c.bool,size:c.oneOfType([c.oneOf(["normal","small"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOf(["filled","outlined","standard"])});function y3(t){return Ue("MuiFormControl",t)}We("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const b3=t=>{const{classes:e,margin:n,fullWidth:r}=t,o={root:["root",n!=="none"&&`margin${Ae(n)}`,r&&"fullWidth"]};return qe(o,y3,e)},v3=ye("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`margin${Ae(n.margin)}`],n.fullWidth&&e.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%"}}]}),im=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiFormControl"}),{children:o,className:i,color:s="primary",component:a="div",disabled:l=!1,error:u=!1,focused:f,fullWidth:h=!1,hiddenLabel:m=!1,margin:g="none",required:b=!1,size:y="medium",variant:S="outlined",...C}=r,E={...r,color:s,component:a,disabled:l,error:u,fullWidth:h,hiddenLabel:m,margin:g,required:b,size:y,variant:S},T=b3(E),[w,O]=_.useState(()=>{let B=!1;return o&&_.Children.forEach(o,W=>{if(!bl(W,["Input","Select"]))return;const U=bl(W,["Select"])?W.props.input:W;U&&W5(U.props)&&(B=!0)}),B}),[A,N]=_.useState(()=>{let B=!1;return o&&_.Children.forEach(o,W=>{bl(W,["Input","Select"])&&(Qu(W.props,!0)||Qu(W.props.inputProps,!0))&&(B=!0)}),B}),[D,L]=_.useState(!1);l&&D&&L(!1);const k=f!==void 0&&!l?f:D;let I;const $=_.useRef(!1);process.env.NODE_ENV!=="production"&&(I=()=>($.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
112
+ `)),$.current=!0,()=>{$.current=!1}));const H=_.useCallback(()=>{N(!0)},[]),z=_.useCallback(()=>{N(!1)},[]),R=_.useMemo(()=>({adornedStart:w,setAdornedStart:O,color:s,disabled:l,error:u,filled:A,focused:k,fullWidth:h,hiddenLabel:m,size:y,onBlur:()=>{L(!1)},onFocus:()=>{L(!0)},onEmpty:z,onFilled:H,registerEffect:I,required:b,variant:S}),[w,s,l,u,A,k,h,m,I,z,H,b,y,S]);return v.jsx(Ll.Provider,{value:R,children:v.jsx(v3,{as:a,ownerState:E,className:_e(T.root,i),ref:n,...C,children:o})})});process.env.NODE_ENV!=="production"&&(im.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,disabled:c.bool,error:c.bool,focused:c.bool,fullWidth:c.bool,hiddenLabel:c.bool,margin:c.oneOf(["dense","none","normal"]),required:c.bool,size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOf(["filled","outlined","standard"])});function x3(t){return Ue("MuiFormHelperText",t)}const XC=We("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var QC;const S3=t=>{const{classes:e,contained:n,size:r,disabled:o,error:i,filled:s,focused:a,required:l}=t,u={root:["root",o&&"disabled",i&&"error",r&&`size${Ae(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return qe(u,x3,e)},C3=ye("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${Ae(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(Dt(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${XC.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${XC.error}`]:{color:(t.vars||t).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),sm=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiFormHelperText"}),{children:o,className:i,component:s="p",disabled:a,error:l,filled:u,focused:f,margin:h,required:m,variant:g,...b}=r,y=ro(),S=ca({props:r,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),C={...r,component:s,contained:S.variant==="filled"||S.variant==="outlined",variant:S.variant,size:S.size,disabled:S.disabled,error:S.error,filled:S.filled,focused:S.focused,required:S.required};delete C.ownerState;const E=S3(C);return v.jsx(C3,{as:s,className:_e(E.root,i),ref:n,...b,ownerState:C,children:o===" "?QC||(QC=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});process.env.NODE_ENV!=="production"&&(sm.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,disabled:c.bool,error:c.bool,filled:c.bool,focused:c.bool,margin:c.oneOf(["dense"]),required:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["filled","outlined","standard"]),c.string])});const da=_.createContext({});process.env.NODE_ENV!=="production"&&(da.displayName="ListContext");function w3(t){return Ue("MuiList",t)}We("MuiList",["root","padding","dense","subheader"]);const T3=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return qe({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},w3,e)},E3=ye("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>t.subheader,style:{paddingTop:0}}]}),am=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:u,...f}=r,h=_.useMemo(()=>({dense:a}),[a]),m={...r,component:s,dense:a,disablePadding:l},g=T3(m);return v.jsx(da.Provider,{value:h,children:v.jsxs(E3,{as:s,className:_e(g.root,i),ref:n,ownerState:m,...f,children:[u,o]})})});process.env.NODE_ENV!=="production"&&(am.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,dense:c.bool,disablePadding:c.bool,subheader:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function lm(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function ew(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function tw(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.startsWith(e.keys.join(""))}function Rl(t,e,n,r,o,i){let s=!1,a=o(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!tw(a,i)||l)a=o(t,a,n);else return a.focus(),!0}return!1}const nw=_.forwardRef(function(e,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:f,variant:h="selectedMenu",...m}=e,g=_.useRef(null),b=_.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});wn(()=>{o&&g.current.focus()},[o]),_.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(T,{direction:w})=>{const O=!g.current.style.width;if(T.clientHeight<g.current.clientHeight&&O){const A=`${hS(Bo(T))}px`;g.current.style[w==="rtl"?"paddingLeft":"paddingRight"]=A,g.current.style.width=`calc(100% + ${A})`}return g.current}}),[]);const y=T=>{const w=g.current,O=T.key;if(T.ctrlKey||T.metaKey||T.altKey){f&&f(T);return}const N=Bn(w).activeElement;if(O==="ArrowDown")T.preventDefault(),Rl(w,N,u,l,lm);else if(O==="ArrowUp")T.preventDefault(),Rl(w,N,u,l,ew);else if(O==="Home")T.preventDefault(),Rl(w,null,u,l,lm);else if(O==="End")T.preventDefault(),Rl(w,null,u,l,ew);else if(O.length===1){const D=b.current,L=O.toLowerCase(),k=performance.now();D.keys.length>0&&(k-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&L!==D.keys[0]&&(D.repeating=!1)),D.lastTime=k,D.keys.push(L);const I=N&&!D.repeating&&tw(N,D);D.previousKeyMatched&&(I||Rl(w,N,!1,l,lm,D))?T.preventDefault():D.previousKeyMatched=!1}f&&f(T)},S=Mt(g,n);let C=-1;_.Children.forEach(s,(T,w)=>{if(!_.isValidElement(T)){C===w&&(C+=1,C>=s.length&&(C=-1));return}process.env.NODE_ENV!=="production"&&ss.isFragment(T)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
113
+ `)),T.props.disabled||(h==="selectedMenu"&&T.props.selected||C===-1)&&(C=w),C===w&&(T.props.disabled||T.props.muiSkipListHighlight||T.type.muiSkipListHighlight)&&(C+=1,C>=s.length&&(C=-1))});const E=_.Children.map(s,(T,w)=>{if(w===C){const O={};return i&&(O.autoFocus=!0),T.props.tabIndex===void 0&&h==="selectedMenu"&&(O.tabIndex=0),_.cloneElement(T,O)}return T});return v.jsx(am,{role:"menu",ref:S,className:a,onKeyDown:y,tabIndex:o?0:-1,...m,children:E})});process.env.NODE_ENV!=="production"&&(nw.propTypes={autoFocus:c.bool,autoFocusItem:c.bool,children:c.node,className:c.string,disabledItemsFocusable:c.bool,disableListWrap:c.bool,onKeyDown:c.func,variant:c.oneOf(["menu","selectedMenu"])});function cm(t,e){return cm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},cm(t,e)}function um(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,cm(t,e)}function M3(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function O3(t,e){t.classList?t.classList.add(e):M3(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function rw(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function k3(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=rw(t.className,e):t.setAttribute("class",rw(t.className&&t.className.baseVal||"",e))}const ow={disabled:!1};var A3=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.shape({enter:c.number,exit:c.number,appear:c.number}).isRequired]):null,I3=process.env.NODE_ENV!=="production"?c.oneOfType([c.string,c.shape({enter:c.string,exit:c.string,active:c.string}),c.shape({enter:c.string,enterDone:c.string,enterActive:c.string,exit:c.string,exitDone:c.string,exitActive:c.string})]):null;const ld=J.createContext(null);var iw=function(e){return e.scrollTop},Bl="unmounted",cs="exited",us="entering",fa="entered",dm="exiting",Dr=function(t){um(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=o,a=s&&!s.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?a?(l=cs,i.appearStatus=us):l=fa:r.unmountOnExit||r.mountOnEnter?l=Bl:l=cs,i.state={status:l},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===Bl?{status:cs}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==us&&s!==fa&&(i=us):(s===us||s===fa)&&(i=dm)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===us){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:is.findDOMNode(this);s&&iw(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===cs&&this.setState({status:Bl})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[is.findDOMNode(this),a],u=l[0],f=l[1],h=this.getTimeouts(),m=a?h.appear:h.enter;if(!o&&!s||ow.disabled){this.safeSetState({status:fa},function(){i.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:us},function(){i.props.onEntering(u,f),i.onTransitionEnd(m,function(){i.safeSetState({status:fa},function(){i.props.onEntered(u,f)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:is.findDOMNode(this);if(!i||ow.disabled){this.safeSetState({status:cs},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:dm},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:cs},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:is.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=l[0],f=l[1];this.props.addEndListener(u,f)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Bl)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=nt(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return J.createElement(ld.Provider,{value:null},typeof s=="function"?s(o,a):J.cloneElement(J.Children.only(s),a))},e}(J.Component);Dr.contextType=ld,Dr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:c.shape({current:typeof Element>"u"?c.any:function(t,e,n,r,o,i){var s=t[e];return c.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(t,e,n,r,o,i)}}),children:c.oneOfType([c.func.isRequired,c.element.isRequired]).isRequired,in:c.bool,mountOnEnter:c.bool,unmountOnExit:c.bool,appear:c.bool,enter:c.bool,exit:c.bool,timeout:function(e){var n=A3;e.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.apply(void 0,[e].concat(o))},addEndListener:c.func,onEnter:c.func,onEntering:c.func,onEntered:c.func,onExit:c.func,onExiting:c.func,onExited:c.func}:{};function pa(){}Dr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pa,onEntering:pa,onEntered:pa,onExit:pa,onExiting:pa,onExited:pa},Dr.UNMOUNTED=Bl,Dr.EXITED=cs,Dr.ENTERING=us,Dr.ENTERED=fa,Dr.EXITING=dm;var D3=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return O3(e,r)})},fm=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return k3(e,r)})},pm=function(t){um(e,t);function e(){for(var r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var u=r.resolveArguments(a,l),f=u[0],h=u[1];r.removeClasses(f,"exit"),r.addClass(f,h?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var u=r.resolveArguments(a,l),f=u[0],h=u[1],m=h?"appear":"enter";r.addClass(f,m,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),f=u[0],h=u[1],m=h?"appear":"enter";r.removeClasses(f,m),r.addClass(f,m,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,u=typeof l=="string",f=u&&l?l+"-":"",h=u?""+f+a:l[a],m=u?h+"-active":l[a+"Active"],g=u?h+"-done":l[a+"Done"];return{baseClassName:h,activeClassName:m,doneClassName:g}},r}var n=e.prototype;return n.addClass=function(o,i,s){var a=this.getClassNames(i)[s+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;i==="appear"&&s==="done"&&u&&(a+=" "+u),s==="active"&&o&&iw(o),a&&(this.appliedClasses[i][s]=a,D3(o,a))},n.removeClasses=function(o,i){var s=this.appliedClasses[i],a=s.base,l=s.active,u=s.done;this.appliedClasses[i]={},a&&fm(o,a),l&&fm(o,l),u&&fm(o,u)},n.render=function(){var o=this.props;o.classNames;var i=nt(o,["classNames"]);return J.createElement(Dr,te({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(J.Component);pm.defaultProps={classNames:""},pm.propTypes=process.env.NODE_ENV!=="production"?te({},Dr.propTypes,{classNames:I3,onEnter:c.func,onEntering:c.func,onEntered:c.func,onExit:c.func,onExiting:c.func,onExited:c.func}):{};function P3(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hm(t,e){var n=function(i){return e&&J.isValidElement(i)?e(i):i},r=Object.create(null);return t&&J.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function _3(t,e){t=t||{},e=e||{};function n(f){return f in e?e[f]:t[f]}var r=Object.create(null),o=[];for(var i in t)i in e?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var l in e){if(r[l])for(s=0;s<r[l].length;s++){var u=r[l][s];a[r[l][s]]=n(u)}a[l]=n(l)}for(s=0;s<o.length;s++)a[o[s]]=n(o[s]);return a}function ds(t,e,n){return n[e]!=null?n[e]:t.props[e]}function N3(t,e){return hm(t.children,function(n){return J.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:ds(n,"appear",t),enter:ds(n,"enter",t),exit:ds(n,"exit",t)})})}function L3(t,e,n){var r=hm(t.children),o=_3(e,r);return Object.keys(o).forEach(function(i){var s=o[i];if(J.isValidElement(s)){var a=i in e,l=i in r,u=e[i],f=J.isValidElement(u)&&!u.props.in;l&&(!a||f)?o[i]=J.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:ds(s,"exit",t),enter:ds(s,"enter",t)}):!l&&a&&!f?o[i]=J.cloneElement(s,{in:!1}):l&&a&&J.isValidElement(u)&&(o[i]=J.cloneElement(s,{onExited:n.bind(null,s),in:u.props.in,exit:ds(s,"exit",t),enter:ds(s,"enter",t)}))}}),o}var $3=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},F3={component:"div",childFactory:function(e){return e}},Vl=function(t){um(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=i.handleExited.bind(P3(i));return i.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},i}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(o,i){var s=i.children,a=i.handleExited,l=i.firstRender;return{children:l?N3(o,a):L3(o,s,a),firstRender:!1}},n.handleExited=function(o,i){var s=hm(this.props.children);o.key in s||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(a){var l=te({},a.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,s=o.childFactory,a=nt(o,["component","childFactory"]),l=this.state.contextValue,u=$3(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,i===null?J.createElement(ld.Provider,{value:l},u):J.createElement(ld.Provider,{value:l},J.createElement(i,a,u))},e}(J.Component);Vl.propTypes=process.env.NODE_ENV!=="production"?{component:c.any,children:c.node,appear:c.bool,enter:c.bool,exit:c.bool,childFactory:c.func}:{},Vl.defaultProps=F3;const sw=t=>t.scrollTop;function cd(t,e){const{timeout:n,easing:r,style:o={}}=t;return{duration:o.transitionDuration??(typeof n=="number"?n:n[e.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[e.mode]:r),delay:o.transitionDelay}}function mm(t){return`scale(${t}, ${t**2})`}const R3={entering:{opacity:1,transform:mm(1)},entered:{opacity:1,transform:"none"}},gm=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),zl=_.forwardRef(function(e,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:a,onEnter:l,onEntered:u,onEntering:f,onExit:h,onExited:m,onExiting:g,style:b,timeout:y="auto",TransitionComponent:S=Dr,...C}=e,E=fS(),T=_.useRef(),w=bi(),O=_.useRef(null),A=Mt(O,xl(i),n),N=R=>B=>{if(R){const W=O.current;B===void 0?R(W):R(W,B)}},D=N(f),L=N((R,B)=>{sw(R);const{duration:W,delay:U,easing:G}=cd({style:b,timeout:y,easing:s},{mode:"enter"});let Y;y==="auto"?(Y=w.transitions.getAutoHeightDuration(R.clientHeight),T.current=Y):Y=W,R.style.transition=[w.transitions.create("opacity",{duration:Y,delay:U}),w.transitions.create("transform",{duration:gm?Y:Y*.666,delay:U,easing:G})].join(","),l&&l(R,B)}),k=N(u),I=N(g),$=N(R=>{const{duration:B,delay:W,easing:U}=cd({style:b,timeout:y,easing:s},{mode:"exit"});let G;y==="auto"?(G=w.transitions.getAutoHeightDuration(R.clientHeight),T.current=G):G=B,R.style.transition=[w.transitions.create("opacity",{duration:G,delay:W}),w.transitions.create("transform",{duration:gm?G:G*.666,delay:gm?W:W||G*.333,easing:U})].join(","),R.style.opacity=0,R.style.transform=mm(.75),h&&h(R)}),H=N(m),z=R=>{y==="auto"&&E.start(T.current||0,R),r&&r(O.current,R)};return v.jsx(S,{appear:o,in:a,nodeRef:O,onEnter:L,onEntered:k,onEntering:D,onExit:$,onExited:H,onExiting:I,addEndListener:z,timeout:y==="auto"?null:y,...C,children:(R,{ownerState:B,...W})=>_.cloneElement(i,{style:{opacity:0,transform:mm(.75),visibility:R==="exited"&&!a?"hidden":void 0,...R3[R],...b,...i.props.style},ref:A,...W})})});process.env.NODE_ENV!=="production"&&(zl.propTypes={addEndListener:c.func,appear:c.bool,children:yl.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])}),zl&&(zl.muiSupportAuto=!0);function B3(t){const e=Bn(t);return e.body===t?Bo(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Hl(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function aw(t){return parseInt(Bo(t).getComputedStyle(t).paddingRight,10)||0}function V3(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(t.tagName),r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function lw(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const a=!i.includes(s),l=!V3(s);a&&l&&Hl(s,o)})}function ym(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function z3(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(B3(r)){const s=hS(Bo(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${aw(r)+s}px`;const a=Bn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${aw(l)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Bn(r).body;else{const s=r.parentElement,a=Bo(r);i=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:a})=>{i?s.style.setProperty(a,i):s.style.removeProperty(a)})}}function H3(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class j3{constructor(){this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Hl(e.modalRef,!1);const o=H3(n);lw(n,e.mount,e.modalRef,o,!0);const i=ym(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:o}),r)}mount(e,n){const r=ym(this.containers,i=>i.modals.includes(e)),o=this.containers[r];o.restore||(o.restore=z3(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=ym(this.containers,s=>s.modals.includes(e)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&Hl(e.modalRef,n),lw(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&Hl(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const W3=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function q3(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function U3(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function K3(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||U3(t))}function Y3(t){const e=[],n=[];return Array.from(t.querySelectorAll(W3)).forEach((r,o)=>{const i=q3(r);i===-1||!K3(r)||(i===0?e.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(e)}function G3(){return!0}function jl(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Y3,isEnabled:s=G3,open:a}=t,l=_.useRef(!1),u=_.useRef(null),f=_.useRef(null),h=_.useRef(null),m=_.useRef(null),g=_.useRef(!1),b=_.useRef(null),y=Mt(xl(e),b),S=_.useRef(null);_.useEffect(()=>{!a||!b.current||(g.current=!n)},[n,a]),_.useEffect(()=>{if(!a||!b.current)return;const T=Bn(b.current);return b.current.contains(T.activeElement)||(b.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
114
+ `)),b.current.setAttribute("tabIndex","-1")),g.current&&b.current.focus()),()=>{o||(h.current&&h.current.focus&&(l.current=!0,h.current.focus()),h.current=null)}},[a]),_.useEffect(()=>{if(!a||!b.current)return;const T=Bn(b.current),w=N=>{S.current=N,!(r||!s()||N.key!=="Tab")&&T.activeElement===b.current&&N.shiftKey&&(l.current=!0,f.current&&f.current.focus())},O=()=>{var L,k;const N=b.current;if(N===null)return;if(!T.hasFocus()||!s()||l.current){l.current=!1;return}if(N.contains(T.activeElement)||r&&T.activeElement!==u.current&&T.activeElement!==f.current)return;if(T.activeElement!==m.current)m.current=null;else if(m.current!==null)return;if(!g.current)return;let D=[];if((T.activeElement===u.current||T.activeElement===f.current)&&(D=i(b.current)),D.length>0){const I=!!((L=S.current)!=null&&L.shiftKey&&((k=S.current)==null?void 0:k.key)==="Tab"),$=D[0],H=D[D.length-1];typeof $!="string"&&typeof H!="string"&&(I?H.focus():$.focus())}else N.focus()};T.addEventListener("focusin",O),T.addEventListener("keydown",w,!0);const A=setInterval(()=>{T.activeElement&&T.activeElement.tagName==="BODY"&&O()},50);return()=>{clearInterval(A),T.removeEventListener("focusin",O),T.removeEventListener("keydown",w,!0)}},[n,r,o,s,a,i]);const C=T=>{h.current===null&&(h.current=T.relatedTarget),g.current=!0,m.current=T.target;const w=e.props.onFocus;w&&w(T)},E=T=>{h.current===null&&(h.current=T.relatedTarget),g.current=!0};return v.jsxs(_.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:E,ref:u,"data-testid":"sentinelStart"}),_.cloneElement(e,{ref:y,onFocus:C}),v.jsx("div",{tabIndex:a?0:-1,onFocus:E,ref:f,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(jl.propTypes={children:yl,disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableRestoreFocus:c.bool,getTabbable:c.func,isEnabled:c.func,open:c.bool.isRequired}),process.env.NODE_ENV!=="production"&&(jl.propTypes=rS(jl.propTypes));function J3(t){return typeof t=="function"?t():t}const Wl=_.forwardRef(function(e,n){const{children:r,container:o,disablePortal:i=!1}=e,[s,a]=_.useState(null),l=Mt(_.isValidElement(r)?xl(r):null,n);if(wn(()=>{i||a(J3(o)||document.body)},[o,i]),wn(()=>{if(s&&!i)return Th(n,s),()=>{Th(n,null)}},[n,s,i]),i){if(_.isValidElement(r)){const u={ref:l};return _.cloneElement(r,u)}return r}return s&&n$.createPortal(r,s)});process.env.NODE_ENV!=="production"&&(Wl.propTypes={children:c.node,container:c.oneOfType([Ro,c.func]),disablePortal:c.bool}),process.env.NODE_ENV!=="production"&&(Wl.propTypes=rS(Wl.propTypes));function Bt(t,e){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:s,shouldForwardComponentProp:a=!1,...l}=e,{component:u,slots:f={[t]:void 0},slotProps:h={[t]:void 0},...m}=i,g=f[t]||r,b=Tu(h[t],o),{props:{component:y,...S},internalRef:C}=wS({className:n,...l,externalForwardedProps:t==="root"?m:void 0,externalSlotProps:b}),E=Mt(C,b==null?void 0:b.ref,e.ref),T=t==="root"?y||u:y,w=vS(g,{...t==="root"&&!u&&!f[t]&&s,...t!=="root"&&!f[t]&&s,...S,...T&&!a&&{as:T},...T&&a&&{component:T},ref:E},o);return[g,w]}const Z3={entering:{opacity:1},entered:{opacity:1}},xi=_.forwardRef(function(e,n){const r=bi(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:l,in:u,onEnter:f,onEntered:h,onEntering:m,onExit:g,onExited:b,onExiting:y,style:S,timeout:C=o,TransitionComponent:E=Dr,...T}=e,w=_.useRef(null),O=Mt(w,xl(a),n),A=z=>R=>{if(z){const B=w.current;R===void 0?z(B):z(B,R)}},N=A(m),D=A((z,R)=>{sw(z);const B=cd({style:S,timeout:C,easing:l},{mode:"enter"});z.style.webkitTransition=r.transitions.create("opacity",B),z.style.transition=r.transitions.create("opacity",B),f&&f(z,R)}),L=A(h),k=A(y),I=A(z=>{const R=cd({style:S,timeout:C,easing:l},{mode:"exit"});z.style.webkitTransition=r.transitions.create("opacity",R),z.style.transition=r.transitions.create("opacity",R),g&&g(z)}),$=A(b),H=z=>{i&&i(w.current,z)};return v.jsx(E,{appear:s,in:u,nodeRef:w,onEnter:D,onEntered:L,onEntering:N,onExit:I,onExited:$,onExiting:k,addEndListener:H,timeout:C,...T,children:(z,{ownerState:R,...B})=>_.cloneElement(a,{style:{opacity:0,visibility:z==="exited"&&!u?"hidden":void 0,...Z3[z],...S,...a.props.style},ref:O,...B})})});process.env.NODE_ENV!=="production"&&(xi.propTypes={addEndListener:c.func,appear:c.bool,children:yl.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});function X3(t){return Ue("MuiBackdrop",t)}We("MuiBackdrop",["root","invisible"]);const Q3=t=>{const{classes:e,invisible:n}=t;return qe({root:["root",n&&"invisible"]},X3,e)},eV=ye("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.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"}}]}),bm=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiBackdrop"}),{children:o,className:i,component:s="div",invisible:a=!1,open:l,components:u={},componentsProps:f={},slotProps:h={},slots:m={},TransitionComponent:g,transitionDuration:b,...y}=r,S={...r,component:s,invisible:a},C=Q3(S),E={transition:g,root:u.Root,...m},T={...f,...h},w={slots:E,slotProps:T},[O,A]=Bt("root",{elementType:eV,externalForwardedProps:w,className:_e(C.root,i),ownerState:S}),[N,D]=Bt("transition",{elementType:xi,externalForwardedProps:w,ownerState:S});return v.jsx(N,{in:l,timeout:b,...y,...D,children:v.jsx(O,{"aria-hidden":!0,...A,classes:C,ref:n,children:o})})});process.env.NODE_ENV!=="production"&&(bm.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),invisible:c.bool,open:c.bool.isRequired,slotProps:c.shape({root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});function tV(t){return typeof t=="function"?t():t}function nV(t){return t?t.props.hasOwnProperty("in"):!1}const cw=()=>{},ud=new j3;function rV(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:s,children:a,onClose:l,open:u,rootRef:f}=t,h=_.useRef({}),m=_.useRef(null),g=_.useRef(null),b=Mt(g,f),[y,S]=_.useState(!u),C=nV(a);let E=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(E=!1);const T=()=>Bn(m.current),w=()=>(h.current.modalRef=g.current,h.current.mount=m.current,h.current),O=()=>{ud.mount(w(),{disableScrollLock:r}),g.current&&(g.current.scrollTop=0)},A=Fe(()=>{const R=tV(e)||T().body;ud.add(w(),R),g.current&&O()}),N=()=>ud.isTopModal(w()),D=Fe(R=>{m.current=R,R&&(u&&N()?O():g.current&&Hl(g.current,E))}),L=_.useCallback(()=>{ud.remove(w(),E)},[E]);_.useEffect(()=>()=>{L()},[L]),_.useEffect(()=>{u?A():(!C||!o)&&L()},[u,L,C,o,A]);const k=R=>B=>{var W;(W=R.onKeyDown)==null||W.call(R,B),!(B.key!=="Escape"||B.which===229||!N())&&(n||(B.stopPropagation(),l&&l(B,"escapeKeyDown")))},I=R=>B=>{var W;(W=R.onClick)==null||W.call(R,B),B.target===B.currentTarget&&l&&l(B,"backdropClick")};return{getRootProps:(R={})=>{const B=SS(t);delete B.onTransitionEnter,delete B.onTransitionExited;const W={...B,...R};return{role:"presentation",...W,onKeyDown:k(W),ref:b}},getBackdropProps:(R={})=>{const B=R;return{"aria-hidden":!0,...B,onClick:I(B),open:u}},getTransitionProps:()=>{const R=()=>{S(!1),i&&i()},B=()=>{S(!0),s&&s(),o&&L()};return{onEnter:sS(R,(a==null?void 0:a.props.onEnter)??cw),onExited:sS(B,(a==null?void 0:a.props.onExited)??cw)}},rootRef:b,portalRef:D,isTopModal:N,exited:y,hasTransition:C}}function oV(t){return Ue("MuiModal",t)}We("MuiModal",["root","hidden","backdrop"]);const iV=t=>{const{open:e,exited:n,classes:r}=t;return qe({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},oV,r)},sV=ye("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(Dt(({theme:t})=>({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),aV=ye(bm,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),vm=_.forwardRef(function(e,n){const r=xt({name:"MuiModal",props:e}),{BackdropComponent:o=aV,BackdropProps:i,classes:s,className:a,closeAfterTransition:l=!1,children:u,container:f,component:h,components:m={},componentsProps:g={},disableAutoFocus:b=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:S=!1,disablePortal:C=!1,disableRestoreFocus:E=!1,disableScrollLock:T=!1,hideBackdrop:w=!1,keepMounted:O=!1,onBackdropClick:A,onClose:N,onTransitionEnter:D,onTransitionExited:L,open:k,slotProps:I={},slots:$={},theme:H,...z}=r,R={...r,closeAfterTransition:l,disableAutoFocus:b,disableEnforceFocus:y,disableEscapeKeyDown:S,disablePortal:C,disableRestoreFocus:E,disableScrollLock:T,hideBackdrop:w,keepMounted:O},{getRootProps:B,getBackdropProps:W,getTransitionProps:U,portalRef:G,isTopModal:Y,exited:Z,hasTransition:me}=rV({...R,rootRef:n}),fe={...R,exited:Z},pe=iV(fe),re={};if(u.props.tabIndex===void 0&&(re.tabIndex="-1"),me){const{onEnter:he,onExited:ee}=U();re.onEnter=he,re.onExited=ee}const ue={slots:{root:m.Root,backdrop:m.Backdrop,...$},slotProps:{...g,...I}},[ae,K]=Bt("root",{ref:n,elementType:sV,externalForwardedProps:{...ue,...z,component:h},getSlotProps:B,ownerState:fe,className:_e(a,pe==null?void 0:pe.root,!fe.open&&fe.exited&&(pe==null?void 0:pe.hidden))}),[Q,ie]=Bt("backdrop",{ref:i==null?void 0:i.ref,elementType:o,externalForwardedProps:ue,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:he=>W({...he,onClick:ee=>{A&&A(ee),he!=null&&he.onClick&&he.onClick(ee)}}),className:_e(i==null?void 0:i.className,pe==null?void 0:pe.backdrop),ownerState:fe});return!O&&!k&&(!me||Z)?null:v.jsx(Wl,{ref:G,container:f,disablePortal:C,children:v.jsxs(ae,{...K,children:[!w&&o?v.jsx(Q,{...ie}):null,v.jsx(jl,{disableEnforceFocus:y,disableAutoFocus:b,disableRestoreFocus:E,isEnabled:Y,open:k,children:_.cloneElement(u,re)})]})})});process.env.NODE_ENV!=="production"&&(vm.propTypes={BackdropComponent:c.elementType,BackdropProps:c.object,children:yl.isRequired,classes:c.object,className:c.string,closeAfterTransition:c.bool,component:c.elementType,components:c.shape({Backdrop:c.elementType,Root:c.elementType}),componentsProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([Ro,c.func]),disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableEscapeKeyDown:c.bool,disablePortal:c.bool,disableRestoreFocus:c.bool,disableScrollLock:c.bool,hideBackdrop:c.bool,keepMounted:c.bool,onBackdropClick:c.func,onClose:c.func,onTransitionEnter:c.func,onTransitionExited:c.func,open:c.bool.isRequired,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function lV(t){return Ue("MuiPaper",t)}We("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 cV=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return qe(i,lV,o)},uV=ye("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(Dt(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),ha=_.forwardRef(function(e,n){var g;const r=xt({props:e,name:"MuiPaper"}),o=bi(),{className:i,component:s="div",elevation:a=1,square:l=!1,variant:u="elevation",...f}=r,h={...r,component:s,elevation:a,square:l,variant:u},m=cV(h);return process.env.NODE_ENV!=="production"&&o.shadows[a]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${a}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${a}]\` is defined.`].join(`
115
+ `)),v.jsx(uV,{as:s,ownerState:h,className:_e(m.root,i),ref:n,...f,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[a],...o.vars&&{"--Paper-overlay":(g=o.vars.overlays)==null?void 0:g[a]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Rt("#fff",Fh(a))}, ${Rt("#fff",Fh(a))})`}},...f.style}})});process.env.NODE_ENV!=="production"&&(ha.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,elevation:Fo(yS,t=>{const{elevation:e,variant:n}=t;return e>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${e}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:c.bool,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["elevation","outlined"]),c.string])});function dV(t){return Ue("MuiPopover",t)}We("MuiPopover",["root","paper"]);function uw(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function dw(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function fw(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function dd(t){return typeof t=="function"?t():t}const fV=t=>{const{classes:e}=t;return qe({root:["root"],paper:["paper"]},dV,e)},pV=ye(vm,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),pw=ye(ha,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),hw=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:l="anchorEl",children:u,className:f,container:h,elevation:m=8,marginThreshold:g=16,open:b,PaperProps:y={},slots:S={},slotProps:C={},transformOrigin:E={vertical:"top",horizontal:"left"},TransitionComponent:T,transitionDuration:w="auto",TransitionProps:O={},disableScrollLock:A=!1,...N}=r,D=_.useRef(),L={...r,anchorOrigin:s,anchorReference:l,elevation:m,marginThreshold:g,transformOrigin:E,TransitionComponent:T,transitionDuration:w,TransitionProps:O},k=fV(L),I=_.useCallback(()=>{if(l==="anchorPosition")return process.env.NODE_ENV!=="production"&&(a||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),a;const ie=dd(i),he=ie&&ie.nodeType===1?ie:Bn(D.current).body,ee=he.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const se=he.getBoundingClientRect();process.env.NODE_ENV!=="test"&&se.top===0&&se.left===0&&se.right===0&&se.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
116
+ `))}return{top:ee.top+uw(ee,s.vertical),left:ee.left+dw(ee,s.horizontal)}},[i,s.horizontal,s.vertical,a,l]),$=_.useCallback(ie=>({vertical:uw(ie,E.vertical),horizontal:dw(ie,E.horizontal)}),[E.horizontal,E.vertical]),H=_.useCallback(ie=>{const he={width:ie.offsetWidth,height:ie.offsetHeight},ee=$(he);if(l==="none")return{top:null,left:null,transformOrigin:fw(ee)};const se=I();let le=se.top-ee.vertical,ge=se.left-ee.horizontal;const we=le+he.height,xe=ge+he.width,Oe=Bo(dd(i)),Le=Oe.innerHeight-g,He=Oe.innerWidth-g;if(g!==null&&le<g){const Ge=le-g;le-=Ge,ee.vertical+=Ge}else if(g!==null&&we>Le){const Ge=we-Le;le-=Ge,ee.vertical+=Ge}if(process.env.NODE_ENV!=="production"&&he.height>Le&&he.height&&Le&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${he.height-Le}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
117
+ `)),g!==null&&ge<g){const Ge=ge-g;ge-=Ge,ee.horizontal+=Ge}else if(xe>He){const Ge=xe-He;ge-=Ge,ee.horizontal+=Ge}return{top:`${Math.round(le)}px`,left:`${Math.round(ge)}px`,transformOrigin:fw(ee)}},[i,l,I,$,g]),[z,R]=_.useState(b),B=_.useCallback(()=>{const ie=D.current;if(!ie)return;const he=H(ie);he.top!==null&&ie.style.setProperty("top",he.top),he.left!==null&&(ie.style.left=he.left),ie.style.transformOrigin=he.transformOrigin,R(!0)},[H]);_.useEffect(()=>(A&&window.addEventListener("scroll",B),()=>window.removeEventListener("scroll",B)),[i,A,B]);const W=()=>{B()},U=()=>{R(!1)};_.useEffect(()=>{b&&B()}),_.useImperativeHandle(o,()=>b?{updatePosition:()=>{B()}}:null,[b,B]),_.useEffect(()=>{if(!b)return;const ie=aS(()=>{B()}),he=Bo(i);return he.addEventListener("resize",ie),()=>{ie.clear(),he.removeEventListener("resize",ie)}},[i,b,B]);let G=w;const Y={slots:{transition:T,...S},slotProps:{transition:O,paper:y,...C}},[Z,me]=Bt("transition",{elementType:zl,externalForwardedProps:Y,ownerState:L,getSlotProps:ie=>({...ie,onEntering:(he,ee)=>{var se;(se=ie.onEntering)==null||se.call(ie,he,ee),W()},onExited:he=>{var ee;(ee=ie.onExited)==null||ee.call(ie,he),U()}}),additionalProps:{appear:!0,in:b}});w==="auto"&&!Z.muiSupportAuto&&(G=void 0);const fe=h||(i?Bn(dd(i)).body:void 0),[pe,{slots:re,slotProps:ue,...ae}]=Bt("root",{ref:n,elementType:pV,externalForwardedProps:{...Y,...N},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:S.backdrop},slotProps:{backdrop:JR(typeof C.backdrop=="function"?C.backdrop(L):C.backdrop,{invisible:!0})},container:fe,open:b},ownerState:L,className:_e(k.root,f)}),[K,Q]=Bt("paper",{ref:D,className:k.paper,elementType:pw,externalForwardedProps:Y,shouldForwardComponentProp:!0,additionalProps:{elevation:m,style:z?void 0:{opacity:0}},ownerState:L});return v.jsx(pe,{...ae,...!Nl(pe)&&{slots:re,slotProps:ue,disableScrollLock:A},children:v.jsx(Z,{...me,timeout:G,children:v.jsx(K,{...Q,children:u})})})});process.env.NODE_ENV!=="production"&&(hw.propTypes={action:hn,anchorEl:Fo(c.oneOfType([Ro,c.func]),t=>{if(t.open&&(!t.anchorReference||t.anchorReference==="anchorEl")){const e=dd(t.anchorEl);if(e&&e.nodeType===1){const n=e.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
118
+ `))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${e}\` instead.`].join(`
119
+ `))}return null}),anchorOrigin:c.shape({horizontal:c.oneOfType([c.oneOf(["center","left","right"]),c.number]).isRequired,vertical:c.oneOfType([c.oneOf(["bottom","center","top"]),c.number]).isRequired}),anchorPosition:c.shape({left:c.number.isRequired,top:c.number.isRequired}),anchorReference:c.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:c.elementType,BackdropProps:c.object,children:c.node,classes:c.object,className:c.string,container:c.oneOfType([Ro,c.func]),disableScrollLock:c.bool,elevation:yS,marginThreshold:c.number,onClose:c.func,open:c.bool.isRequired,PaperProps:c.shape({component:wu}),slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),paper:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,paper:c.elementType,root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),transformOrigin:c.shape({horizontal:c.oneOfType([c.oneOf(["center","left","right"]),c.number]).isRequired,vertical:c.oneOfType([c.oneOf(["bottom","center","top"]),c.number]).isRequired}),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})]),TransitionProps:c.object});function hV(t){return Ue("MuiMenu",t)}We("MuiMenu",["root","paper","list"]);const mV={vertical:"top",horizontal:"right"},gV={vertical:"top",horizontal:"left"},yV=t=>{const{classes:e}=t;return qe({root:["root"],paper:["paper"],list:["list"]},hV,e)},bV=ye(hw,{shouldForwardProp:t=>to(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),vV=ye(pw,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),xV=ye(nw,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),mw=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:s,disableAutoFocusItem:a=!1,MenuListProps:l={},onClose:u,open:f,PaperProps:h={},PopoverClasses:m,transitionDuration:g="auto",TransitionProps:{onEntering:b,...y}={},variant:S="selectedMenu",slots:C={},slotProps:E={},...T}=r,w=eo(),O={...r,autoFocus:o,disableAutoFocusItem:a,MenuListProps:l,onEntering:b,PaperProps:h,transitionDuration:g,TransitionProps:y,variant:S},A=yV(O),N=o&&!a&&f,D=_.useRef(null),L=(G,Y)=>{D.current&&D.current.adjustStyleForScrollbar(G,{direction:w?"rtl":"ltr"}),b&&b(G,Y)},k=G=>{G.key==="Tab"&&(G.preventDefault(),u&&u(G,"tabKeyDown"))};let I=-1;_.Children.map(i,(G,Y)=>{_.isValidElement(G)&&(process.env.NODE_ENV!=="production"&&ss.isFragment(G)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
120
+ `)),G.props.disabled||(S==="selectedMenu"&&G.props.selected||I===-1)&&(I=Y))});const $={slots:C,slotProps:{list:l,transition:y,paper:h,...E}},H=Ct({elementType:C.root,externalSlotProps:E.root,ownerState:O,className:[A.root,s]}),[z,R]=Bt("paper",{className:A.paper,elementType:vV,externalForwardedProps:$,shouldForwardComponentProp:!0,ownerState:O}),[B,W]=Bt("list",{className:_e(A.list,l.className),elementType:xV,shouldForwardComponentProp:!0,externalForwardedProps:$,getSlotProps:G=>({...G,onKeyDown:Y=>{var Z;k(Y),(Z=G.onKeyDown)==null||Z.call(G,Y)}}),ownerState:O}),U=typeof $.slotProps.transition=="function"?$.slotProps.transition(O):$.slotProps.transition;return v.jsx(bV,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?mV:gV,slots:{root:C.root,paper:z,backdrop:C.backdrop,...C.transition&&{transition:C.transition}},slotProps:{root:H,paper:R,backdrop:typeof E.backdrop=="function"?E.backdrop(O):E.backdrop,transition:{...U,onEntering:(...G)=>{var Y;L(...G),(Y=U==null?void 0:U.onEntering)==null||Y.call(U,...G)}}},open:f,ref:n,transitionDuration:g,ownerState:O,...T,classes:m,children:v.jsx(B,{actions:D,autoFocus:o&&(I===-1||a),autoFocusItem:N,variant:S,...W,children:i})})});process.env.NODE_ENV!=="production"&&(mw.propTypes={anchorEl:c.oneOfType([Ro,c.func]),autoFocus:c.bool,children:c.node,classes:c.object,className:c.string,disableAutoFocusItem:c.bool,MenuListProps:c.object,onClose:c.func,open:c.bool.isRequired,PaperProps:c.object,PopoverClasses:c.object,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),list:c.oneOfType([c.func,c.object]),paper:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,list:c.elementType,paper:c.elementType,root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),transitionDuration:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})]),TransitionProps:c.object,variant:c.oneOf(["menu","selectedMenu"])});function SV(t){return Ue("MuiNativeSelect",t)}const xm=We("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),CV=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${Ae(n)}`,i&&"iconOpen",r&&"disabled"]};return qe(a,SV,e)},gw=ye("select")(({theme:t})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${xm.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!=="filled"&&e.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}}]})),wV=ye(gw,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:to,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${xm.multiple}`]:e.multiple}]}})({}),yw=ye("svg")(({theme:t})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${xm.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),TV=ye(yw,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Ae(n.variant)}`],n.open&&e.iconOpen]}})({}),bw=_.forwardRef(function(e,n){const{className:r,disabled:o,error:i,IconComponent:s,inputRef:a,variant:l="standard",...u}=e,f={...e,disabled:o,variant:l,error:i},h=CV(f);return v.jsxs(_.Fragment,{children:[v.jsx(wV,{ownerState:f,className:_e(h.select,r),disabled:o,ref:a||n,...u}),e.multiple?null:v.jsx(TV,{as:s,ownerState:f,className:h.icon})]})});process.env.NODE_ENV!=="production"&&(bw.propTypes={children:c.node,classes:c.object,className:c.string,disabled:c.bool,error:c.bool,IconComponent:c.elementType.isRequired,inputRef:hn,multiple:c.bool,name:c.string,onChange:c.func,value:c.any,variant:c.oneOf(["standard","outlined","filled"])});function vw(t){return Ue("MuiSelect",t)}const ql=We("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var xw;const EV=ye(gw,{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${ql.select}`]:e.select},{[`&.${ql.select}`]:e[n.variant]},{[`&.${ql.error}`]:e.error},{[`&.${ql.multiple}`]:e.multiple}]}})({[`&.${ql.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),MV=ye(yw,{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Ae(n.variant)}`],n.open&&e.iconOpen]}})({}),OV=ye("input",{shouldForwardProp:t=>iC(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Sw(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function kV(t){return t==null||typeof t=="string"&&!t.trim()}const AV=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${Ae(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return qe(a,vw,e)},Cw=_.forwardRef(function(e,n){var $e;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:s,children:a,className:l,defaultOpen:u,defaultValue:f,disabled:h,displayEmpty:m,error:g=!1,IconComponent:b,inputRef:y,labelId:S,MenuProps:C={},multiple:E,name:T,onBlur:w,onChange:O,onClose:A,onFocus:N,onOpen:D,open:L,readOnly:k,renderValue:I,required:$,SelectDisplayProps:H={},tabIndex:z,type:R,value:B,variant:W="standard",...U}=e,[G,Y]=Vo({controlled:B,default:f,name:"Select"}),[Z,me]=Vo({controlled:L,default:u,name:"Select"}),fe=_.useRef(null),pe=_.useRef(null),[re,ue]=_.useState(null),{current:ae}=_.useRef(L!=null),[K,Q]=_.useState(),ie=Mt(n,y),he=_.useCallback(Ee=>{pe.current=Ee,Ee&&ue(Ee)},[]),ee=re==null?void 0:re.parentNode;_.useImperativeHandle(ie,()=>({focus:()=>{pe.current.focus()},node:fe.current,value:G}),[G]),_.useEffect(()=>{u&&Z&&re&&!ae&&(Q(s?null:ee.clientWidth),pe.current.focus())},[re,s]),_.useEffect(()=>{i&&pe.current.focus()},[i]),_.useEffect(()=>{if(!S)return;const Ee=Bn(pe.current).getElementById(S);if(Ee){const Re=()=>{getSelection().isCollapsed&&pe.current.focus()};return Ee.addEventListener("click",Re),()=>{Ee.removeEventListener("click",Re)}}},[S]);const se=(Ee,Re)=>{Ee?D&&D(Re):A&&A(Re),ae||(Q(s?null:ee.clientWidth),me(Ee))},le=Ee=>{Ee.button===0&&(Ee.preventDefault(),pe.current.focus(),se(!0,Ee))},ge=Ee=>{se(!1,Ee)},we=_.Children.toArray(a),xe=Ee=>{const Re=we.find(Ye=>Ye.props.value===Ee.target.value);Re!==void 0&&(Y(Re.props.value),O&&O(Ee,Re))},Oe=Ee=>Re=>{let Ye;if(Re.currentTarget.hasAttribute("tabindex")){if(E){Ye=Array.isArray(G)?G.slice():[];const tt=G.indexOf(Ee.props.value);tt===-1?Ye.push(Ee.props.value):Ye.splice(tt,1)}else Ye=Ee.props.value;if(Ee.props.onClick&&Ee.props.onClick(Re),G!==Ye&&(Y(Ye),O)){const tt=Re.nativeEvent||Re,Pt=new tt.constructor(tt.type,tt);Object.defineProperty(Pt,"target",{writable:!0,value:{value:Ye,name:T}}),O(Pt,Ee)}E||se(!1,Re)}},Le=Ee=>{k||[" ","ArrowUp","ArrowDown","Enter"].includes(Ee.key)&&(Ee.preventDefault(),se(!0,Ee))},He=re!==null&&Z,Ge=Ee=>{!He&&w&&(Object.defineProperty(Ee,"target",{writable:!0,value:{value:G,name:T}}),w(Ee))};delete U["aria-invalid"];let De,lt;const St=[];let Zt=!1,vn=!1;(Qu({value:G})||m)&&(I?De=I(G):Zt=!0);const cn=we.map(Ee=>{if(!_.isValidElement(Ee))return null;process.env.NODE_ENV!=="production"&&ss.isFragment(Ee)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
121
+ `));let Re;if(E){if(!Array.isArray(G))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":go(2));Re=G.some(Ye=>Sw(Ye,Ee.props.value)),Re&&Zt&&St.push(Ee.props.children)}else Re=Sw(G,Ee.props.value),Re&&Zt&&(lt=Ee.props.children);return Re&&(vn=!0),_.cloneElement(Ee,{"aria-selected":Re?"true":"false",onClick:Oe(Ee),onKeyUp:Ye=>{Ye.key===" "&&Ye.preventDefault(),Ee.props.onKeyUp&&Ee.props.onKeyUp(Ye)},role:"option",selected:Re,value:void 0,"data-value":Ee.props.value})});process.env.NODE_ENV!=="production"&&_.useEffect(()=>{if(!vn&&!E&&G!==""){const Ee=we.map(Re=>Re.props.value);console.warn([`MUI: You have provided an out-of-range value \`${G}\` for the select ${T?`(name="${T}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${Ee.filter(Re=>Re!=null).map(Re=>`\`${Re}\``).join(", ")||'""'}.`].join(`
122
+ `))}},[vn,we,E,T,G]),Zt&&(E?St.length===0?De=null:De=St.reduce((Ee,Re,Ye)=>(Ee.push(Re),Ye<St.length-1&&Ee.push(", "),Ee),[]):De=lt);let $t=K;!s&&ae&&re&&($t=ee.clientWidth);let An;typeof z<"u"?An=z:An=h?null:0;const qn=H.id||(T?`mui-component-select-${T}`:void 0),dt={...e,variant:W,value:G,open:He,error:g},Ln=AV(dt),Kt={...C.PaperProps,...($e=C.slotProps)==null?void 0:$e.paper},de=yo();return v.jsxs(_.Fragment,{children:[v.jsx(EV,{as:"div",ref:he,tabIndex:An,role:"combobox","aria-controls":He?de:void 0,"aria-disabled":h?"true":void 0,"aria-expanded":He?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[S,qn].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":$?"true":void 0,"aria-invalid":g?"true":void 0,onKeyDown:Le,onMouseDown:h||k?null:le,onBlur:Ge,onFocus:N,...H,ownerState:dt,className:_e(H.className,Ln.select,l),id:qn,children:kV(De)?xw||(xw=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):De}),v.jsx(OV,{"aria-invalid":g,value:Array.isArray(G)?G.join(","):G,name:T,ref:fe,"aria-hidden":!0,onChange:xe,tabIndex:-1,disabled:h,className:Ln.nativeInput,autoFocus:i,required:$,...U,ownerState:dt}),v.jsx(MV,{as:b,className:Ln.icon,ownerState:dt}),v.jsx(mw,{id:`menu-${T||""}`,anchorEl:ee,open:He,onClose:ge,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...C,slotProps:{...C.slotProps,list:{"aria-labelledby":S,role:"listbox","aria-multiselectable":E?"true":void 0,disableListWrap:!0,id:de,...C.MenuListProps},paper:{...Kt,style:{minWidth:$t,...Kt!=null?Kt.style:null}}},children:cn})]})});process.env.NODE_ENV!=="production"&&(Cw.propTypes={"aria-describedby":c.string,"aria-label":c.string,autoFocus:c.bool,autoWidth:c.bool,children:c.node,classes:c.object,className:c.string,defaultOpen:c.bool,defaultValue:c.any,disabled:c.bool,displayEmpty:c.bool,error:c.bool,IconComponent:c.elementType.isRequired,inputRef:hn,labelId:c.string,MenuProps:c.object,multiple:c.bool,name:c.string,onBlur:c.func,onChange:c.func,onClose:c.func,onFocus:c.func,onOpen:c.func,open:c.bool,readOnly:c.bool,renderValue:c.func,required:c.bool,SelectDisplayProps:c.object,tabIndex:c.oneOfType([c.number,c.string]),type:c.any,value:c.any,variant:c.oneOf(["standard","outlined","filled"])});const IV=Be(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),DV=t=>{const{classes:e}=t,r=qe({root:["root"]},vw,e);return{...e,...r}},Sm={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>to(t)&&t!=="variant",slot:"Root"},PV=ye(id,Sm)(""),_V=ye(ad,Sm)(""),NV=ye(sd,Sm)(""),Cm=_.forwardRef(function(e,n){const r=xt({name:"MuiSelect",props:e}),{autoWidth:o=!1,children:i,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:f=IV,id:h,input:m,inputProps:g,label:b,labelId:y,MenuProps:S,multiple:C=!1,native:E=!1,onClose:T,onOpen:w,open:O,renderValue:A,SelectDisplayProps:N,variant:D="outlined",...L}=r,k=E?bw:Cw,I=ro(),$=ca({props:r,muiFormControl:I,states:["variant","error"]}),H=$.variant||D,z={...r,variant:H,classes:s},R=DV(z),{root:B,...W}=R,U=m||{standard:v.jsx(PV,{ownerState:z}),outlined:v.jsx(_V,{label:b,ownerState:z}),filled:v.jsx(NV,{ownerState:z})}[H],G=Mt(n,xl(U));return v.jsx(_.Fragment,{children:_.cloneElement(U,{inputComponent:k,inputProps:{children:i,error:$.error,IconComponent:f,variant:H,type:void 0,multiple:C,...E?{id:h}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:y,MenuProps:S,onClose:T,onOpen:w,open:O,renderValue:A,SelectDisplayProps:{id:h,...N}},...g,classes:g?Rn(W,g.classes):W,...m?m.props.inputProps:{}},...(C&&E||u)&&H==="outlined"?{notched:!0}:{},ref:G,className:_e(U.props.className,a,R.root),...!m&&{variant:H},...L})})});process.env.NODE_ENV!=="production"&&(Cm.propTypes={autoWidth:c.bool,children:c.node,classes:c.object,className:c.string,defaultOpen:c.bool,defaultValue:c.any,displayEmpty:c.bool,IconComponent:c.elementType,id:c.string,input:c.element,inputProps:c.object,label:c.node,labelId:c.string,MenuProps:c.object,multiple:c.bool,native:c.bool,onChange:c.func,onClose:c.func,onOpen:c.func,open:c.bool,renderValue:c.func,SelectDisplayProps:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.oneOfType([c.oneOf([""]),c.any]),variant:c.oneOf(["filled","outlined","standard"])}),Cm.muiName="Select";function LV(t){return Ue("MuiTextField",t)}We("MuiTextField",["root"]);const $V={standard:id,filled:sd,outlined:ad},FV=t=>{const{classes:e}=t;return qe({root:["root"]},LV,e)},RV=ye(im,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),ww=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:s,className:a,color:l="primary",defaultValue:u,disabled:f=!1,error:h=!1,FormHelperTextProps:m,fullWidth:g=!1,helperText:b,id:y,InputLabelProps:S,inputProps:C,InputProps:E,inputRef:T,label:w,maxRows:O,minRows:A,multiline:N=!1,name:D,onBlur:L,onChange:k,onFocus:I,placeholder:$,required:H=!1,rows:z,select:R=!1,SelectProps:B,slots:W={},slotProps:U={},type:G,value:Y,variant:Z="outlined",...me}=r,fe={...r,autoFocus:i,color:l,disabled:f,error:h,fullWidth:g,multiline:N,required:H,select:R,variant:Z},pe=FV(fe);process.env.NODE_ENV!=="production"&&R&&!s&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const re=yo(y),ue=b&&re?`${re}-helper-text`:void 0,ae=w&&re?`${re}-label`:void 0,K=$V[Z],Q={slots:W,slotProps:{input:E,inputLabel:S,htmlInput:C,formHelperText:m,select:B,...U}},ie={},he=Q.slotProps.inputLabel;Z==="outlined"&&(he&&typeof he.shrink<"u"&&(ie.notched=he.shrink),ie.label=w),R&&((!B||!B.native)&&(ie.id=void 0),ie["aria-describedby"]=void 0);const[ee,se]=Bt("root",{elementType:RV,shouldForwardComponentProp:!0,externalForwardedProps:{...Q,...me},ownerState:fe,className:_e(pe.root,a),ref:n,additionalProps:{disabled:f,error:h,fullWidth:g,required:H,color:l,variant:Z}}),[le,ge]=Bt("input",{elementType:K,externalForwardedProps:Q,additionalProps:ie,ownerState:fe}),[we,xe]=Bt("inputLabel",{elementType:om,externalForwardedProps:Q,ownerState:fe}),[Oe,Le]=Bt("htmlInput",{elementType:"input",externalForwardedProps:Q,ownerState:fe}),[He,Ge]=Bt("formHelperText",{elementType:sm,externalForwardedProps:Q,ownerState:fe}),[De,lt]=Bt("select",{elementType:Cm,externalForwardedProps:Q,ownerState:fe}),St=v.jsx(le,{"aria-describedby":ue,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:g,multiline:N,name:D,rows:z,maxRows:O,minRows:A,type:G,value:Y,id:re,inputRef:T,onBlur:L,onChange:k,onFocus:I,placeholder:$,inputProps:Le,slots:{input:W.htmlInput?Oe:void 0},...ge});return v.jsxs(ee,{...se,children:[w!=null&&w!==""&&v.jsx(we,{htmlFor:re,id:ae,...xe,children:w}),R?v.jsx(De,{"aria-describedby":ue,id:re,labelId:ae,value:Y,input:St,...lt,children:s}):St,b&&v.jsx(He,{id:ue,...Ge,children:b})]})});process.env.NODE_ENV!=="production"&&(ww.propTypes={autoComplete:c.string,autoFocus:c.bool,children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","error","info","success","warning"]),c.string]),defaultValue:c.any,disabled:c.bool,error:c.bool,FormHelperTextProps:c.object,fullWidth:c.bool,helperText:c.node,id:c.string,InputLabelProps:c.object,inputProps:c.object,InputProps:c.object,inputRef:hn,label:c.node,margin:c.oneOf(["dense","none","normal"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onBlur:c.func,onChange:c.func,onFocus:c.func,placeholder:c.string,required:c.bool,rows:c.oneOfType([c.number,c.string]),select:c.bool,SelectProps:c.object,size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),slotProps:c.shape({formHelperText:c.oneOfType([c.func,c.object]),htmlInput:c.oneOfType([c.func,c.object]),input:c.oneOfType([c.func,c.object]),inputLabel:c.oneOfType([c.func,c.object]),select:c.oneOfType([c.func,c.object])}),slots:c.shape({formHelperText:c.elementType,htmlInput:c.elementType,input:c.elementType,inputLabel:c.elementType,root:c.elementType,select:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any,variant:c.oneOf(["filled","outlined","standard"])});const Ul=(t,e)=>t.length!==e.length?!1:e.every(n=>t.includes(n)),BV=({openTo:t,defaultOpenTo:e,views:n,defaultViews:r})=>{const o=n??r;let i;if(t!=null)i=t;else if(o.includes(e))i=e;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},fd=(t,e,n)=>{let r=e;return r=t.setHours(r,t.getHours(n)),r=t.setMinutes(r,t.getMinutes(n)),r=t.setSeconds(r,t.getSeconds(n)),r=t.setMilliseconds(r,t.getMilliseconds(n)),r},Kl=({date:t,disableFuture:e,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:s,timezone:a})=>{const l=fd(s,s.date(void 0,a),t);n&&s.isBefore(o,l)&&(o=l),e&&s.isAfter(r,l)&&(r=l);let u=t,f=t;for(s.isBefore(t,o)&&(u=o,f=null),s.isAfter(t,r)&&(f&&(f=r),u=null);u||f;){if(u&&s.isAfter(u,r)&&(u=null),f&&s.isBefore(f,o)&&(f=null),u){if(!i(u))return u;u=s.addDays(u,1)}if(f){if(!i(f))return f;f=s.addDays(f,-1)}}return null},VV=(t,e)=>e==null||!t.isValid(e)?null:e,Pr=(t,e,n)=>e==null||!t.isValid(e)?n:e,zV=(t,e,n)=>!t.isValid(e)&&e!=null&&!t.isValid(n)&&n!=null?!0:t.isEqual(e,n),wm=(t,e)=>{const r=[t.startOfYear(e)];for(;r.length<12;){const o=r[r.length-1];r.push(t.addMonths(o,1))}return r},Tw=(t,e,n)=>n==="date"?t.startOfDay(t.date(void 0,e)):t.date(void 0,e),HV=["year","month","day"],Ew=t=>HV.includes(t),Tm=(t,{format:e,views:n},r)=>{if(e!=null)return e;const o=t.formats;return Ul(n,["year"])?o.year:Ul(n,["month"])?o.month:Ul(n,["day"])?o.dayOfMonth:Ul(n,["month","year"])?`${o.month} ${o.year}`:Ul(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(t.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},jV=(t,e)=>{const n=t.startOfWeek(e);return[0,1,2,3,4,5,6].map(r=>t.addDays(n,r))},WV=["hours","minutes","seconds"],qV=t=>WV.includes(t),Mw=(t,e)=>e.getHours(t)*3600+e.getMinutes(t)*60+e.getSeconds(t),UV=(t,e)=>(n,r)=>t?e.isAfter(n,r):Mw(n,e)>Mw(r,e),xo={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},KV=t=>Math.max(...t.map(e=>xo[e.type]??1)),Yl=(t,e,n)=>{if(e===xo.year)return t.startOfYear(n);if(e===xo.month)return t.startOfMonth(n);if(e===xo.day)return t.startOfDay(n);let r=n;return e<xo.minutes&&(r=t.setMinutes(r,0)),e<xo.seconds&&(r=t.setSeconds(r,0)),e<xo.milliseconds&&(r=t.setMilliseconds(r,0)),r},YV=({props:t,utils:e,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():Yl(e,n,Tw(e,r));t.minDate!=null&&e.isAfterDay(t.minDate,i)&&(i=Yl(e,n,t.minDate)),t.maxDate!=null&&e.isBeforeDay(t.maxDate,i)&&(i=Yl(e,n,t.maxDate));const s=UV(t.disableIgnoringDatePartForTimeValidation??!1,e);return t.minTime!=null&&s(t.minTime,i)&&(i=Yl(e,n,t.disableIgnoringDatePartForTimeValidation?t.minTime:fd(e,i,t.minTime))),t.maxTime!=null&&s(i,t.maxTime)&&(i=Yl(e,n,t.disableIgnoringDatePartForTimeValidation?t.maxTime:fd(e,i,t.maxTime))),i},Em=(t,e)=>{const n=t.formatTokenMap[e];if(n==null)throw new Error([`MUI X: The token "${e}" 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(`
123
+ `));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},GV=t=>{switch(t){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},pd=(t,e)=>{const n=[],r=t.date(void 0,"default"),o=t.startOfWeek(r),i=t.endOfWeek(r);let s=o;for(;t.isBefore(s,i);)n.push(s),s=t.addDays(s,1);return n.map(a=>t.formatByString(a,e))},Ow=(t,e,n,r)=>{switch(n){case"month":return wm(t,t.date(void 0,e)).map(o=>t.formatByString(o,r));case"weekDay":return pd(t,r);case"meridiem":{const o=t.date(void 0,e);return[t.startOfDay(o),t.endOfDay(o)].map(i=>t.formatByString(i,r))}default:return[]}},kw="s",JV=["0","1","2","3","4","5","6","7","8","9"],ZV=t=>{const e=t.date(void 0);return t.formatByString(t.setSeconds(e,0),kw)==="0"?JV:Array.from({length:10}).map((r,o)=>t.formatByString(t.setSeconds(e,o),kw))},fs=(t,e)=>{if(e[0]==="0")return t;const n=[];let r="";for(let o=0;o<t.length;o+=1){r+=t[o];const i=e.indexOf(r);i>-1&&(n.push(i.toString()),r="")}return n.join("")},Mm=(t,e)=>e[0]==="0"?t:t.split("").map(n=>e[Number(n)]).join(""),Aw=(t,e)=>{const n=fs(t,e);return n!==" "&&!Number.isNaN(Number(n))},Iw=(t,e)=>{let n=t;for(n=Number(n).toString();n.length<e;)n=`0${n}`;return n},Dw=(t,e,n,r,o)=>{if(process.env.NODE_ENV!=="production"&&o.type!=="day"&&o.contentType==="digit-with-letter")throw new Error([`MUI X: The token "${o.format}" is a digit format with letter in it.'
124
+ This type of format is only supported for 'day' sections`].join(`
125
+ `));if(o.type==="day"&&o.contentType==="digit-with-letter"){const s=t.setDate(n.longestMonth,e);return t.formatByString(s,o.format)}let i=e.toString();return o.hasLeadingZerosInInput&&(i=Iw(i,o.maxLength)),Mm(i,r)},XV=(t,e,n,r,o,i,s,a)=>{const l=GV(r),u=r==="Home",f=r==="End",h=n.value===""||u||f,m=()=>{const b=o[n.type]({currentDate:s,format:n.format,contentType:n.contentType}),y=T=>Dw(t,T,b,i,n),S=n.type==="minutes"&&(a!=null&&a.minutesStep)?a.minutesStep:1;let E=parseInt(fs(n.value,i),10)+l*S;if(h){if(n.type==="year"&&!f&&!u)return t.formatByString(t.date(void 0,e),n.format);l>0||u?E=b.minimum:E=b.maximum}return E%S!==0&&((l<0||u)&&(E+=S-(S+E)%S),(l>0||f)&&(E-=E%S)),E>b.maximum?y(b.minimum+(E-b.maximum-1)%(b.maximum-b.minimum+1)):E<b.minimum?y(b.maximum-(b.minimum-E-1)%(b.maximum-b.minimum+1)):y(E)},g=()=>{const b=Ow(t,e,n.type,n.format);if(b.length===0)return n.value;if(h)return l>0||u?b[0]:b[b.length-1];const C=((b.indexOf(n.value)+l)%b.length+b.length)%b.length;return b[C]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?m():g()},Om=(t,e,n)=>{let r=t.value||t.placeholder;const o=e==="non-input"?t.hasLeadingZerosInFormat:t.hasLeadingZerosInInput;return e==="non-input"&&t.hasLeadingZerosInInput&&!t.hasLeadingZerosInFormat&&(r=Number(fs(r,n)).toString()),["input-rtl","input-ltr"].includes(e)&&t.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),e==="input-rtl"&&(r=`⁨${r}⁩`),r},Pw=(t,e,n,r)=>{if(process.env.NODE_ENV!=="production"&&Em(t,n).type==="weekDay")throw new Error("changeSectionValueFormat doesn't support week day formats");return t.formatByString(t.parse(e,n),r)},_w=(t,e)=>t.formatByString(t.date(void 0,"system"),e).length===4,Nw=(t,e,n,r)=>{if(e!=="digit")return!1;const o=t.date(void 0,"default");switch(n){case"year":return _w(t,r)?t.formatByString(t.setYear(o,1),r)==="0001":t.formatByString(t.setYear(o,2001),r)==="01";case"month":return t.formatByString(t.startOfYear(o),r).length>1;case"day":return t.formatByString(t.startOfMonth(o),r).length>1;case"weekDay":return t.formatByString(t.startOfWeek(o),r).length>1;case"hours":return t.formatByString(t.setHours(o,1),r).length>1;case"minutes":return t.formatByString(t.setMinutes(o,1),r).length>1;case"seconds":return t.formatByString(t.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},QV=(t,e,n)=>{const r=e.some(l=>l.type==="day"),o=[],i=[];for(let l=0;l<e.length;l+=1){const u=e[l];r&&u.type==="weekDay"||(o.push(u.format),i.push(Om(u,"non-input",n)))}const s=o.join(" "),a=i.join(" ");return t.parse(a,s)},ez=t=>t.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),tz=(t,e,n)=>{const o=t.map(i=>{const s=Om(i,n?"input-rtl":"input-ltr",e);return`${i.startSeparator}${s}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},nz=(t,e,n)=>{const r=t.date(void 0,n),o=t.endOfYear(r),i=t.endOfDay(r),{maxDaysInMonth:s,longestMonth:a}=wm(t,r).reduce((l,u)=>{const f=t.getDaysInMonth(u);return f>l.maxDaysInMonth?{maxDaysInMonth:f,longestMonth:u}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:_w(t,l)?9999:99}),month:()=>({minimum:1,maximum:t.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&t.isValid(l)?t.getDaysInMonth(l):s,longestMonth:a}),weekDay:({format:l,contentType:u})=>{if(u==="digit"){const f=pd(t,l).map(Number);return{minimum:Math.min(...f),maximum:Math.max(...f)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const u=t.getHours(i);return fs(t.formatByString(t.endOfDay(r),l),e)!==u.toString()?{minimum:1,maximum:Number(fs(t.formatByString(t.startOfDay(r),l),e))}:{minimum:0,maximum:u}},minutes:()=>({minimum:0,maximum:t.getMinutes(i)}),seconds:()=>({minimum:0,maximum:t.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}};let Lw=!1;const $w=(t,e)=>{if(process.env.NODE_ENV!=="production"&&!Lw){const n=["empty"];["date","date-time"].includes(e)&&n.push("weekDay","day","month","year"),["time","date-time"].includes(e)&&n.push("hours","minutes","seconds","meridiem");const r=t.find(o=>!n.includes(o.type));r&&(console.warn(`MUI X: The field component you are using is not compatible with the "${r.type}" date section.`,`The supported date sections are ["${n.join('", "')}"]\`.`),Lw=!0)}},rz=(t,e,n,r)=>{switch(e.type){case"year":return t.setYear(r,t.getYear(n));case"month":return t.setMonth(r,t.getMonth(n));case"weekDay":{const o=pd(t,e.format),i=t.formatByString(n,e.format),s=o.indexOf(i),l=o.indexOf(e.value)-s;return t.addDays(n,l)}case"day":return t.setDate(r,t.getDate(n));case"meridiem":{const o=t.getHours(n)<12,i=t.getHours(r);return o&&i>=12?t.addHours(r,-12):!o&&i<12?t.addHours(r,12):r}case"hours":return t.setHours(r,t.getHours(n));case"minutes":return t.setMinutes(r,t.getMinutes(n));case"seconds":return t.setSeconds(r,t.getSeconds(n));default:return r}},Fw={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Rw=(t,e,n,r,o)=>[...n].sort((i,s)=>Fw[i.type]-Fw[s.type]).reduce((i,s)=>!o||s.modified?rz(t,s,e,i):i,r),oz=()=>navigator.userAgent.toLowerCase().includes("android"),iz=(t,e)=>{const n={};if(!e)return t.forEach((l,u)=>{const f=u===0?null:u-1,h=u===t.length-1?null:u+1;n[u]={leftIndex:f,rightIndex:h}}),{neighbors:n,startIndex:0,endIndex:t.length-1};const r={},o={};let i=0,s=0,a=t.length-1;for(;a>=0;){s=t.findIndex((l,u)=>{var f;return u>=i&&((f=l.endSeparator)==null?void 0:f.includes(" "))&&l.endSeparator!==" / "}),s===-1&&(s=t.length-1);for(let l=s;l>=i;l-=1)o[l]=a,r[a]=l,a-=1;i=s+1}return t.forEach((l,u)=>{const f=o[u],h=f===0?null:r[f-1],m=f===t.length-1?null:r[f+1];n[u]={leftIndex:h,rightIndex:m}}),{neighbors:n,startIndex:r[0],endIndex:r[t.length-1]}},km=(t,e)=>{if(t==null)return null;if(t==="all")return"all";if(typeof t=="string"){const n=e.findIndex(r=>r.type===t);return n===-1?null:n}return t},sz=(t,e)=>{if(t.value)switch(t.type){case"month":{if(t.contentType==="digit")return e.format(e.setMonth(e.date(),Number(t.value)-1),"month");const n=e.parse(t.value,t.format);return n?e.format(n,"month"):void 0}case"day":return t.contentType==="digit"?e.format(e.setDate(e.startOfYear(e.date()),Number(t.value)),"dayOfMonthFull"):t.value;case"weekDay":return;default:return}},az=(t,e)=>{if(t.value)switch(t.type){case"weekDay":return t.contentType==="letter"?void 0:Number(t.value);case"meridiem":{const n=e.parse(`01:00 ${t.value}`,`${e.formats.hours12h}:${e.formats.minutes} ${t.format}`);return n?e.getHours(n)>=12?1:0:void 0}case"day":return t.contentType==="digit-with-letter"?parseInt(t.value,10):Number(t.value);case"month":{if(t.contentType==="digit")return Number(t.value);const n=e.parse(t.value,t.format);return n?e.getMonth(n)+1:void 0}default:return t.contentType!=="letter"?Number(t.value):void 0}},lz=["value","referenceDate"],So={emptyValue:null,getTodayValue:Tw,getInitialReferenceValue:t=>{let{value:e,referenceDate:n}=t,r=nt(t,lz);return e!=null&&r.utils.isValid(e)?e:n??YV(r)},cleanValue:VV,areValuesEqual:zV,isSameError:(t,e)=>t===e,hasError:t=>t!=null,defaultErrorState:null,getTimezone:(t,e)=>e==null||!t.isValid(e)?null:t.getTimezone(e),setTimezone:(t,e,n)=>n==null?null:t.setTimezone(n,e)},cz={updateReferenceValue:(t,e,n)=>e==null||!t.isValid(e)?n:e,getSectionsFromValue:(t,e,n,r)=>!t.isValid(e)&&!!n?n:r(e),getV7HiddenInputValueFromSections:ez,getV6InputValueFromSections:tz,getActiveDateManager:(t,e)=>({date:e.value,referenceDate:e.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!t.isValid(n)?e.referenceValue:n})}),parseValueStr:(t,e,n)=>n(t.trim(),e)},Gl=({props:t,value:e,timezone:n,adapter:r})=>{if(e===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:s,disablePast:a,disableFuture:l}=t,u=r.utils.date(void 0,n),f=Pr(r.utils,t.minDate,r.defaultDates.minDate),h=Pr(r.utils,t.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(e):return"invalidDate";case!!(o&&o(e)):return"shouldDisableDate";case!!(i&&i(e)):return"shouldDisableMonth";case!!(s&&s(e)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(e,u)):return"disableFuture";case!!(a&&r.utils.isBeforeDay(e,u)):return"disablePast";case!!(f&&r.utils.isBeforeDay(e,f)):return"minDate";case!!(h&&r.utils.isAfterDay(e,h)):return"maxDate";default:return null}};Gl.valueManager=So;const Bw=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],uz=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],dz=["minDateTime","maxDateTime"],fz=[...Bw,...uz,...dz],Vw=t=>fz.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{}),pz=t=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:te({},t)}}}}),zw=t=>{const{utils:e,formatKey:n,contextTranslation:r,propsTranslation:o}=t;return i=>{const s=i!==null&&e.isValid(i)?e.format(i,n):null;return(o??r)(i,e,s)}},Hw={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:t=>t==="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:(t,e,n,r)=>`Select ${t}. ${!r&&(e===null||!n.isValid(e))?"No time selected":`Selected time is ${r??n.format(e,"fullTime")}`}`,hoursClockNumberText:t=>`${t} hours`,minutesClockNumberText:t=>`${t} minutes`,secondsClockNumberText:t=>`${t} seconds`,selectViewText:t=>`Select ${t}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:t=>`Week ${t}`,calendarWeekNumberText:t=>`${t}`,openDatePickerDialogue:(t,e,n)=>n||t!==null&&e.isValid(t)?`Choose date, selected date is ${n??e.format(t,"fullDate")}`:"Choose date",openTimePickerDialogue:(t,e,n)=>n||t!==null&&e.isValid(t)?`Choose time, selected time is ${n??e.format(t,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:t=>"Y".repeat(t.digitAmount),fieldMonthPlaceholder:t=>t.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:t=>t.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"},hz=Hw;pz(Hw);const ps=()=>{const t=_.useContext(qu);if(t===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(`
126
+ `));if(t.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(`
127
+ `));const e=_.useMemo(()=>te({},hz,t.localeText),[t.localeText]);return _.useMemo(()=>te({},t,{localeText:e}),[t,e])},Wt=()=>ps().utils,Jl=()=>ps().defaultDates,hd=t=>{const e=Wt(),n=_.useRef();return n.current===void 0&&(n.current=e.date(void 0,t)),n.current};function jw(t){const{props:e,validator:n,value:r,timezone:o,onError:i}=t,s=ps(),a=_.useRef(n.valueManager.defaultErrorState),l=n({adapter:s,value:r,timezone:o,props:e}),u=n.valueManager.hasError(l);_.useEffect(()=>{i&&!n.valueManager.isSameError(l,a.current)&&i(l,r),a.current=l},[n,i,l,r]);const f=Fe(h=>n({adapter:s,value:h,timezone:o,props:e}));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:f}}const Wo=()=>ps().localeText,mz=({utils:t,format:e})=>{let n=10,r=e,o=t.expandFormat(e);for(;o!==r;)if(r=o,o=t.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},gz=({utils:t,expandedFormat:e})=>{const n=[],{start:r,end:o}=t.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let s=null;for(;s=i.exec(e);)n.push({start:s.index,end:i.lastIndex-1});return n},yz=(t,e,n,r)=>{switch(n.type){case"year":return e.fieldYearPlaceholder({digitAmount:t.formatByString(t.date(void 0,"default"),r).length,format:r});case"month":return e.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return e.fieldDayPlaceholder({format:r});case"weekDay":return e.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return e.fieldHoursPlaceholder({format:r});case"minutes":return e.fieldMinutesPlaceholder({format:r});case"seconds":return e.fieldSecondsPlaceholder({format:r});case"meridiem":return e.fieldMeridiemPlaceholder({format:r});default:return r}},bz=({utils:t,date:e,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:s,startSeparator:a})=>{if(s==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=Em(t,s),u=Nw(t,l.contentType,l.type,s),f=n?u:l.contentType==="digit",h=e!=null&&t.isValid(e);let m=h?t.formatByString(e,s):"",g=null;if(f)if(u)g=m===""?t.formatByString(i,s).length:m.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${s} should have a 'maxDigitNumber' property on it's adapter`);g=l.maxLength,h&&(m=Mm(Iw(fs(m,o),g),o))}return te({},l,{format:s,maxLength:g,value:m,placeholder:yz(t,r,l,s),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:f,startSeparator:a,endSeparator:"",modified:!1})},vz=t=>{var g;const{utils:e,expandedFormat:n,escapedParts:r}=t,o=e.date(void 0),i=[];let s="";const a=Object.keys(e.formatTokenMap).sort((b,y)=>y.length-b.length),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${a.join("|")})*$`),f=new RegExp(`^(${a.join("|")})`),h=b=>r.find(y=>y.start<=b&&y.end>=b);let m=0;for(;m<n.length;){const b=h(m),y=b!=null,S=(g=l.exec(n.slice(m)))==null?void 0:g[1];if(!y&&S!=null&&u.test(S)){let C=S;for(;C.length>0;){const E=f.exec(C)[1];C=C.slice(E.length),i.push(bz(te({},t,{now:o,token:E,startSeparator:s}))),s=""}m+=S.length}else{const C=n[m];y&&(b==null?void 0:b.start)===m||(b==null?void 0:b.end)===m||(i.length===0?s+=C:i[i.length-1].endSeparator+=C),m+=1}}return i.length===0&&s.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:s,endSeparator:"",modified:!1}),i},xz=({isRtl:t,formatDensity:e,sections:n})=>n.map(r=>{const o=i=>{let s=i;return t&&s!==null&&s.includes(" ")&&(s=`⁩${s}⁦`),e==="spacious"&&["/",".","-"].includes(s)&&(s=` ${s} `),s};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),Ww=t=>{let e=mz(t);t.isRtl&&t.enableAccessibleFieldDOMStructure&&(e=e.split(" ").reverse().join(" "));const n=gz(te({},t,{expandedFormat:e})),r=vz(te({},t,{expandedFormat:e,escapedParts:n}));return xz(te({},t,{sections:r}))},Am=({timezone:t,value:e,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const s=Wt(),a=_.useRef(n),l=e??a.current??i.emptyValue,u=_.useMemo(()=>i.getTimezone(s,l),[s,i,l]),f=Fe(b=>u==null?b:i.setTimezone(s,u,b));let h;t?h=t:u?h=u:r?h=s.getTimezone(r):h="default";const m=_.useMemo(()=>i.setTimezone(s,h,l),[i,s,h,l]),g=Fe((b,...y)=>{const S=f(b);o==null||o(S,...y)});return{value:m,handleValueChange:g,timezone:h}},Im=({name:t,timezone:e,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:s})=>{const[a,l]=Vo({name:t,state:"value",controlled:n,default:r??s.emptyValue}),u=Fe((f,...h)=>{l(f),i==null||i(f,...h)});return Am({timezone:e,value:a,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:s})},Sz=t=>{const e=Wt(),n=Wo(),r=ps(),o=eo(),{valueManager:i,fieldValueManager:s,valueType:a,validator:l,internalProps:u,internalProps:{value:f,defaultValue:h,referenceDate:m,onChange:g,format:b,formatDensity:y="dense",selectedSections:S,onSelectedSectionsChange:C,shouldRespectLeadingZeros:E=!1,timezone:T,enableAccessibleFieldDOMStructure:w=!1}}=t,{timezone:O,value:A,handleValueChange:N}=Am({timezone:T,value:f,defaultValue:h,referenceDate:m,onChange:g,valueManager:i}),D=_.useMemo(()=>ZV(e),[e]),L=_.useMemo(()=>nz(e,D,O),[e,D,O]),k=_.useCallback((re,ue=null)=>s.getSectionsFromValue(e,re,ue,ae=>Ww({utils:e,localeText:n,localizedDigits:D,format:b,date:ae,formatDensity:y,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:w,isRtl:o})),[s,b,n,D,o,E,e,y,w]),[I,$]=_.useState(()=>{const re=k(A);$w(re,a);const ue={sections:re,value:A,referenceValue:i.emptyValue,tempValueStrAndroid:null},ae=KV(re),K=i.getInitialReferenceValue({referenceDate:m,value:A,utils:e,props:u,granularity:ae,timezone:O});return te({},ue,{referenceValue:K})}),[H,z]=Vo({controlled:S,default:null,name:"useField",state:"selectedSections"}),R=re=>{z(re),C==null||C(re)},B=_.useMemo(()=>km(H,I.sections),[H,I.sections]),W=B==="all"?0:B,U=({value:re,referenceValue:ue,sections:ae})=>{if($(Q=>te({},Q,{sections:ae,value:re,referenceValue:ue,tempValueStrAndroid:null})),i.areValuesEqual(e,I.value,re))return;const K={validationError:l({adapter:r,value:re,timezone:O,props:u})};N(re,K)},G=(re,ue)=>{const ae=[...I.sections];return ae[re]=te({},ae[re],{value:ue,modified:!0}),ae},Y=()=>{U({value:i.emptyValue,referenceValue:I.referenceValue,sections:k(i.emptyValue)})},Z=()=>{if(W==null)return;const re=I.sections[W],ue=s.getActiveDateManager(e,I,re),K=ue.getSections(I.sections).filter(ee=>ee.value!=="").length===(re.value===""?0:1),Q=G(W,""),ie=K?null:e.getInvalidDate(),he=ue.getNewValuesFromNewActiveDate(ie);U(te({},he,{sections:Q}))},me=re=>{const ue=(Q,ie)=>{const he=e.parse(Q,b);if(he==null||!e.isValid(he))return null;const ee=Ww({utils:e,localeText:n,localizedDigits:D,format:b,date:he,formatDensity:y,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:w,isRtl:o});return Rw(e,he,ee,ie,!1)},ae=s.parseValueStr(re,I.referenceValue,ue),K=s.updateReferenceValue(e,ae,I.referenceValue);U({value:ae,referenceValue:K,sections:k(ae,I.sections)})},fe=({activeSection:re,newSectionValue:ue,shouldGoToNextSection:ae})=>{ae&&W<I.sections.length-1&&R(W+1);const K=s.getActiveDateManager(e,I,re),Q=G(W,ue),ie=K.getSections(Q),he=QV(e,ie,D);let ee,se;if(he!=null&&e.isValid(he)){const le=Rw(e,he,ie,K.referenceDate,!0);ee=K.getNewValuesFromNewActiveDate(le),se=!0}else ee=K.getNewValuesFromNewActiveDate(he),se=(he!=null&&!e.isValid(he))!=(K.date!=null&&!e.isValid(K.date));return se?U(te({},ee,{sections:Q})):$(le=>te({},le,ee,{sections:Q,tempValueStrAndroid:null}))},pe=re=>$(ue=>te({},ue,{tempValueStrAndroid:re}));return _.useEffect(()=>{const re=k(I.value);$w(re,a),$(ue=>te({},ue,{sections:re}))},[b,e.locale,o]),_.useEffect(()=>{let re;i.areValuesEqual(e,I.value,A)?re=i.getTimezone(e,I.value)!==i.getTimezone(e,A):re=!0,re&&$(ue=>te({},ue,{value:A,referenceValue:s.updateReferenceValue(e,A,ue.referenceValue),sections:k(A)}))},[A]),{state:I,activeSectionIndex:W,parsedSelectedSections:B,setSelectedSections:R,clearValue:Y,clearActiveSection:Z,updateSectionValue:fe,updateValueFromValueStr:me,setTempAndroidValueStr:pe,getSectionsFromValue:k,sectionsValueBoundaries:L,localizedDigits:D,timezone:O}},Cz=5e3,ma=t=>t.saveQuery!=null,wz=({sections:t,updateSectionValue:e,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const s=Wt(),[a,l]=_.useState(null),u=Fe(()=>l(null));_.useEffect(()=>{var b;a!=null&&((b=t[a.sectionIndex])==null?void 0:b.type)!==a.sectionType&&u()},[t,a,u]),_.useEffect(()=>{if(a!=null){const b=setTimeout(()=>u(),Cz);return()=>{clearTimeout(b)}}return()=>{}},[a,u]);const f=({keyPressed:b,sectionIndex:y},S,C)=>{const E=b.toLowerCase(),T=t[y];if(a!=null&&(!C||C(a.value))&&a.sectionIndex===y){const O=`${a.value}${E}`,A=S(O,T);if(!ma(A))return l({sectionIndex:y,value:O,sectionType:T.type}),A}const w=S(E,T);return ma(w)&&!w.saveQuery?(u(),null):(l({sectionIndex:y,value:E,sectionType:T.type}),ma(w)?null:w)},h=b=>{const y=(E,T,w)=>{const O=T.filter(A=>A.toLowerCase().startsWith(w));return O.length===0?{saveQuery:!1}:{sectionValue:O[0],shouldGoToNextSection:O.length===1}},S=(E,T,w,O)=>{const A=N=>Ow(s,i,T.type,N);if(T.contentType==="letter")return y(T.format,A(T.format),E);if(w&&O!=null&&Em(s,w).contentType==="letter"){const N=A(w),D=y(w,N,E);return ma(D)?{saveQuery:!1}:te({},D,{sectionValue:O(D.sectionValue,N)})}return{saveQuery:!1}};return f(b,(E,T)=>{switch(T.type){case"month":{const w=O=>Pw(s,O,s.formats.month,T.format);return S(E,T,s.formats.month,w)}case"weekDay":{const w=(O,A)=>A.indexOf(O).toString();return S(E,T,s.formats.weekday,w)}case"meridiem":return S(E,T);default:return{saveQuery:!1}}})},m=b=>{const y=(C,E)=>{const T=fs(C,r),w=Number(T),O=n[E.type]({currentDate:null,format:E.format,contentType:E.contentType});if(w>O.maximum)return{saveQuery:!1};if(w<O.minimum)return{saveQuery:!0};const A=w*10>O.maximum||T.length===O.maximum.toString().length;return{sectionValue:Dw(s,w,O,r,E),shouldGoToNextSection:A}};return f(b,(C,E)=>{if(E.contentType==="digit"||E.contentType==="digit-with-letter")return y(C,E);if(E.type==="month"){const T=Nw(s,"digit","month","MM"),w=y(C,{type:E.type,format:"MM",hasLeadingZerosInFormat:T,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(ma(w))return w;const O=Pw(s,w.sectionValue,"MM",E.format);return te({},w,{sectionValue:O})}if(E.type==="weekDay"){const T=y(C,E);if(ma(T))return T;const w=pd(s,E.format)[Number(T.sectionValue)-1];return te({},T,{sectionValue:w})}return{saveQuery:!1}},C=>Aw(C,r))};return{applyCharacterEditing:Fe(b=>{const y=t[b.sectionIndex],C=Aw(b.keyPressed,r)?m(te({},b,{keyPressed:Mm(b.keyPressed,r)})):h(b);if(C==null){o(null);return}e({activeSection:y,newSectionValue:C.sectionValue,shouldGoToNextSection:C.shouldGoToNextSection})}),resetCharacterQuery:u}};function Tz(t,e){return Array.isArray(e)?e.every(n=>t.indexOf(n)!==-1):t.indexOf(e)!==-1}const Ez=(t,e)=>n=>{(n.key==="Enter"||n.key===" ")&&(t(n),n.preventDefault(),n.stopPropagation())},br=(t=document)=>{const e=t.activeElement;return e?e.shadowRoot?br(e.shadowRoot):e:null},Mz="@media (pointer: fine)",Oz=t=>{const{internalProps:{disabled:e,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:s,onInput:a,onPaste:l,focused:u,autoFocus:f=!1},fieldValueManager:h,applyCharacterEditing:m,resetCharacterQuery:g,setSelectedSections:b,parsedSelectedSections:y,state:S,clearActiveSection:C,clearValue:E,updateSectionValue:T,updateValueFromValueStr:w,sectionOrder:O,areAllSectionsEmpty:A,sectionsValueBoundaries:N}=t,D=_.useRef(null),L=Mt(r,D),k=Wo(),I=Wt(),$=yo(),[H,z]=_.useState(!1),R=_.useMemo(()=>({syncSelectionToDOM:()=>{if(!D.current)return;const se=document.getSelection();if(!se)return;if(y==null){se.rangeCount>0&&D.current.getRoot().contains(se.getRangeAt(0).startContainer)&&se.removeAllRanges(),H&&D.current.getRoot().blur();return}if(!D.current.getRoot().contains(br(document)))return;const le=new window.Range;let ge;y==="all"?ge=D.current.getRoot():S.sections[y].type==="empty"?ge=D.current.getSectionContainer(y):ge=D.current.getSectionContent(y),le.selectNodeContents(ge),ge.focus(),se.removeAllRanges(),se.addRange(le)},getActiveSectionIndexFromDOM:()=>{const se=br(document);return!se||!D.current||!D.current.getRoot().contains(se)?null:D.current.getSectionIndexFromDOMElement(se)},focusField:(se=0)=>{if(!D.current)return;const le=km(se,S.sections);z(!0),D.current.getSectionContent(le).focus()},setSelectedSections:se=>{if(!D.current)return;const le=km(se,S.sections);z((le==="all"?0:le)!==null),b(se)},isFieldFocused:()=>{const se=br(document);return!!D.current&&D.current.getRoot().contains(se)}}),[y,b,S.sections,H]),B=Fe(se=>{if(!D.current)return;const le=S.sections[se];D.current.getSectionContent(se).innerHTML=le.value||le.placeholder,R.syncSelectionToDOM()}),W=Fe((se,...le)=>{se.isDefaultPrevented()||!D.current||(z(!0),i==null||i(se,...le),y==="all"?setTimeout(()=>{const ge=document.getSelection().getRangeAt(0).startOffset;if(ge===0){b(O.startIndex);return}let we=0,xe=0;for(;xe<ge&&we<S.sections.length;){const Oe=S.sections[we];we+=1,xe+=`${Oe.startSeparator}${Oe.value||Oe.placeholder}${Oe.endSeparator}`.length}b(we-1)}):H?D.current.getRoot().contains(se.target)||b(O.startIndex):(z(!0),b(O.startIndex)))}),U=Fe(se=>{if(a==null||a(se),!D.current||y!=="all")return;const ge=se.target.textContent??"";D.current.getRoot().innerHTML=S.sections.map(we=>`${we.startSeparator}${we.value||we.placeholder}${we.endSeparator}`).join(""),R.syncSelectionToDOM(),ge.length===0||ge.charCodeAt(0)===10?(g(),E(),b("all")):ge.length>1?w(ge):m({keyPressed:ge,sectionIndex:0})}),G=Fe(se=>{if(l==null||l(se),n||y!=="all"){se.preventDefault();return}const le=se.clipboardData.getData("text");se.preventDefault(),g(),w(le)}),Y=Fe((...se)=>{if(s==null||s(...se),H||!D.current)return;z(!0),D.current.getSectionIndexFromDOMElement(br(document))!=null||b(O.startIndex)}),Z=Fe((...se)=>{o==null||o(...se),setTimeout(()=>{if(!D.current)return;const le=br(document);!D.current.getRoot().contains(le)&&(z(!1),b(null))})}),me=Fe(se=>le=>{le.isDefaultPrevented()||b(se)}),fe=Fe(se=>{se.preventDefault()}),pe=Fe(se=>()=>{b(se)}),re=Fe(se=>{if(se.preventDefault(),n||e||typeof y!="number")return;const le=S.sections[y],ge=se.clipboardData.getData("text"),we=/^[a-zA-Z]+$/.test(ge),xe=/^[0-9]+$/.test(ge),Oe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ge);le.contentType==="letter"&&we||le.contentType==="digit"&&xe||le.contentType==="digit-with-letter"&&Oe?(g(),T({activeSection:le,newSectionValue:ge,shouldGoToNextSection:!0})):!we&&!xe&&(g(),w(ge))}),ue=Fe(se=>{se.preventDefault(),se.dataTransfer.dropEffect="none"}),ae=Fe(se=>{if(!D.current)return;const le=se.target,ge=le.textContent??"",we=D.current.getSectionIndexFromDOMElement(le),xe=S.sections[we];if(n||!D.current){B(we);return}if(ge.length===0){if(xe.value===""){B(we);return}const Oe=se.nativeEvent.inputType;if(Oe==="insertParagraph"||Oe==="insertLineBreak"){B(we);return}g(),C();return}m({keyPressed:ge,sectionIndex:we}),B(we)});wn(()=>{if(!(!H||!D.current)){if(y==="all")D.current.getRoot().focus();else if(typeof y=="number"){const se=D.current.getSectionContent(y);se&&se.focus()}}},[y,H]);const K=_.useMemo(()=>S.sections.reduce((se,le)=>(se[le.type]=N[le.type]({currentDate:null,contentType:le.contentType,format:le.format}),se),{}),[N,S.sections]),Q=y==="all",ie=_.useMemo(()=>S.sections.map((se,le)=>{const ge=!Q&&!e&&!n;return{container:{"data-sectionindex":le,onClick:me(le)},content:{tabIndex:Q||le>0?-1:0,contentEditable:!Q&&!e&&!n,role:"spinbutton",id:`${$}-${se.type}`,"aria-labelledby":`${$}-${se.type}`,"aria-readonly":n,"aria-valuenow":az(se,I),"aria-valuemin":K[se.type].minimum,"aria-valuemax":K[se.type].maximum,"aria-valuetext":se.value?sz(se,I):k.empty,"aria-label":k[se.type],"aria-disabled":e,spellCheck:ge?!1:void 0,autoCapitalize:ge?"off":void 0,autoCorrect:ge?"off":void 0,[parseInt(_.version,10)>=17?"enterKeyHint":"enterkeyhint"]:ge?"next":void 0,children:se.value||se.placeholder,onInput:ae,onPaste:re,onFocus:pe(le),onDragOver:ue,onMouseUp:fe,inputMode:se.contentType==="letter"?"text":"numeric"},before:{children:se.startSeparator},after:{children:se.endSeparator}}}),[S.sections,pe,re,ue,ae,me,fe,e,n,Q,k,I,K,$]),he=Fe(se=>{w(se.target.value)}),ee=_.useMemo(()=>A?"":h.getV7HiddenInputValueFromSections(S.sections),[A,S.sections,h]);return _.useEffect(()=>{if(D.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(`
128
+ `));f&&D.current&&D.current.getSectionContent(O.startIndex).focus()},[]),{interactions:R,returnedValue:{autoFocus:f,readOnly:n,focused:u??H,sectionListRef:L,onBlur:Z,onClick:W,onFocus:Y,onInput:U,onPaste:G,enableAccessibleFieldDOMStructure:!0,elements:ie,tabIndex:y===0?-1:0,contentEditable:Q,value:ee,onChange:he,areAllSectionsEmpty:A}}},ga=t=>t.replace(/[\u2066\u2067\u2068\u2069]/g,""),kz=(t,e,n)=>{let r=0,o=n?1:0;const i=[];for(let s=0;s<t.length;s+=1){const a=t[s],l=Om(a,n?"input-rtl":"input-ltr",e),u=`${a.startSeparator}${l}${a.endSeparator}`,f=ga(u).length,h=u.length,m=ga(l),g=o+(m===""?0:l.indexOf(m[0]))+a.startSeparator.length,b=g+m.length;i.push(te({},a,{start:r,end:r+f,startInInput:g,endInInput:b})),r+=f,o+=h}return i},Az=t=>{const e=eo(),n=_.useRef(),r=_.useRef(),{forwardedProps:{onFocus:o,onClick:i,onPaste:s,onBlur:a,inputRef:l,placeholder:u},internalProps:{readOnly:f=!1,disabled:h=!1},parsedSelectedSections:m,activeSectionIndex:g,state:b,fieldValueManager:y,valueManager:S,applyCharacterEditing:C,resetCharacterQuery:E,updateSectionValue:T,updateValueFromValueStr:w,clearActiveSection:O,clearValue:A,setTempAndroidValueStr:N,setSelectedSections:D,getSectionsFromValue:L,areAllSectionsEmpty:k,localizedDigits:I}=t,$=_.useRef(null),H=Mt(l,$),z=_.useMemo(()=>kz(b.sections,I,e),[b.sections,I,e]),R=_.useMemo(()=>({syncSelectionToDOM:()=>{if(!$.current)return;if(m==null){$.current.scrollLeft&&($.current.scrollLeft=0);return}if($.current!==br(document))return;const ae=$.current.scrollTop;if(m==="all")$.current.select();else{const K=z[m],Q=K.type==="empty"?K.startInInput-K.startSeparator.length:K.startInInput,ie=K.type==="empty"?K.endInInput+K.endSeparator.length:K.endInInput;(Q!==$.current.selectionStart||ie!==$.current.selectionEnd)&&$.current===br(document)&&$.current.setSelectionRange(Q,ie),clearTimeout(r.current),r.current=setTimeout(()=>{$.current&&$.current===br(document)&&$.current.selectionStart===$.current.selectionEnd&&($.current.selectionStart!==Q||$.current.selectionEnd!==ie)&&R.syncSelectionToDOM()})}$.current.scrollTop=ae},getActiveSectionIndexFromDOM:()=>{const ae=$.current.selectionStart??0,K=$.current.selectionEnd??0;if(ae===0&&K===0)return null;const Q=ae<=z[0].startInInput?1:z.findIndex(ie=>ie.startInInput-ie.startSeparator.length>ae);return Q===-1?z.length-1:Q-1},focusField:(ae=0)=>{var K;(K=$.current)==null||K.focus(),D(ae)},setSelectedSections:ae=>D(ae),isFieldFocused:()=>$.current===br(document)}),[$,m,z,D]),B=()=>{const ae=$.current.selectionStart??0;let K;ae<=z[0].startInInput||ae>=z[z.length-1].endInInput?K=1:K=z.findIndex(ie=>ie.startInInput-ie.startSeparator.length>ae);const Q=K===-1?z.length-1:K-1;D(Q)},W=Fe((...ae)=>{o==null||o(...ae);const K=$.current;clearTimeout(n.current),n.current=setTimeout(()=>{!K||K!==$.current||g==null&&(K.value.length&&Number(K.selectionEnd)-Number(K.selectionStart)===K.value.length?D("all"):B())})}),U=Fe((ae,...K)=>{ae.isDefaultPrevented()||(i==null||i(ae,...K),B())}),G=Fe(ae=>{if(s==null||s(ae),ae.preventDefault(),f||h)return;const K=ae.clipboardData.getData("text");if(typeof m=="number"){const Q=b.sections[m],ie=/^[a-zA-Z]+$/.test(K),he=/^[0-9]+$/.test(K),ee=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(K);if(Q.contentType==="letter"&&ie||Q.contentType==="digit"&&he||Q.contentType==="digit-with-letter"&&ee){E(),T({activeSection:Q,newSectionValue:K,shouldGoToNextSection:!0});return}if(ie||he)return}E(),w(K)}),Y=Fe((...ae)=>{a==null||a(...ae),D(null)}),Z=Fe(ae=>{if(f)return;const K=ae.target.value;if(K===""){E(),A();return}const Q=ae.nativeEvent.data,ie=Q&&Q.length>1,he=ie?Q:K,ee=ga(he);if(g==null||ie){w(ie?Q:ee);return}let se;if(m==="all"&&ee.length===1)se=ee;else{const le=ga(y.getV6InputValueFromSections(z,I,e));let ge=-1,we=-1;for(let He=0;He<le.length;He+=1)ge===-1&&le[He]!==ee[He]&&(ge=He),we===-1&&le[le.length-He-1]!==ee[ee.length-He-1]&&(we=He);const xe=z[g];if(ge<xe.start||le.length-we-1>xe.end)return;const Le=ee.length-le.length+xe.end-ga(xe.endSeparator||"").length;se=ee.slice(xe.start+ga(xe.startSeparator||"").length,Le)}if(se.length===0){oz()&&N(he),E(),O();return}C({keyPressed:se,sectionIndex:g})}),me=_.useMemo(()=>u!==void 0?u:y.getV6InputValueFromSections(L(S.emptyValue),I,e),[u,y,L,S.emptyValue,I,e]),fe=_.useMemo(()=>b.tempValueStrAndroid??y.getV6InputValueFromSections(b.sections,I,e),[b.sections,y,b.tempValueStrAndroid,I,e]);_.useEffect(()=>($.current&&$.current===br(document)&&D("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const pe=_.useMemo(()=>g==null||b.sections[g].contentType==="letter"?"text":"numeric",[g,b.sections]),ue=!($.current&&$.current===br(document))&&k;return{interactions:R,returnedValue:{readOnly:f,onBlur:Y,onClick:U,onFocus:W,onPaste:G,inputRef:H,enableAccessibleFieldDOMStructure:!1,placeholder:me,inputMode:pe,autoComplete:"off",value:ue?"":fe,onChange:Z}}},Iz=t=>{const e=Wt(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:s=!1,readOnly:a=!1},forwardedProps:{onKeyDown:l,error:u,clearable:f,onClear:h},fieldValueManager:m,valueManager:g,validator:b}=t,y=eo(),S=Sz(t),{state:C,activeSectionIndex:E,parsedSelectedSections:T,setSelectedSections:w,clearValue:O,clearActiveSection:A,updateSectionValue:N,setTempAndroidValueStr:D,sectionsValueBoundaries:L,localizedDigits:k,timezone:I}=S,$=wz({sections:C.sections,updateSectionValue:N,sectionsValueBoundaries:L,localizedDigits:k,setTempAndroidValueStr:D,timezone:I}),{resetCharacterQuery:H}=$,z=g.areValuesEqual(e,C.value,g.emptyValue),R=i?Oz:Az,B=_.useMemo(()=>iz(C.sections,y&&!i),[C.sections,y,i]),{returnedValue:W,interactions:U}=R(te({},t,S,$,{areAllSectionsEmpty:z,sectionOrder:B})),G=Fe(re=>{if(l==null||l(re),!s)switch(!0){case((re.ctrlKey||re.metaKey)&&String.fromCharCode(re.keyCode)==="A"&&!re.shiftKey&&!re.altKey):{re.preventDefault(),w("all");break}case re.key==="ArrowRight":{if(re.preventDefault(),T==null)w(B.startIndex);else if(T==="all")w(B.endIndex);else{const ue=B.neighbors[T].rightIndex;ue!==null&&w(ue)}break}case re.key==="ArrowLeft":{if(re.preventDefault(),T==null)w(B.endIndex);else if(T==="all")w(B.startIndex);else{const ue=B.neighbors[T].leftIndex;ue!==null&&w(ue)}break}case re.key==="Delete":{if(re.preventDefault(),a)break;T==null||T==="all"?O():A(),H();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(re.key):{if(re.preventDefault(),a||E==null)break;const ue=C.sections[E],ae=m.getActiveDateManager(e,C,ue),K=XV(e,I,ue,re.key,L,k,ae.date,{minutesStep:o});N({activeSection:ue,newSectionValue:K,shouldGoToNextSection:!1});break}}});wn(()=>{U.syncSelectionToDOM()});const{hasValidationError:Y}=jw({props:n,validator:b,timezone:I,value:C.value,onError:n.onError}),Z=_.useMemo(()=>u!==void 0?u:Y,[Y,u]);_.useEffect(()=>{!Z&&E==null&&H()},[C.referenceValue,E,Z]),_.useEffect(()=>{C.tempValueStrAndroid!=null&&E!=null&&(H(),A())},[C.sections]),_.useImperativeHandle(r,()=>({getSections:()=>C.sections,getActiveSectionIndex:U.getActiveSectionIndexFromDOM,setSelectedSections:U.setSelectedSections,focusField:U.focusField,isFieldFocused:U.isFieldFocused}));const me=Fe((re,...ue)=>{re.preventDefault(),h==null||h(re,...ue),O(),U.isFieldFocused()?w(B.startIndex):U.focusField(0)}),fe={onKeyDown:G,onClear:me,error:Z,clearable:!!(f&&!z&&!a&&!s)},pe={disabled:s,readOnly:a};return te({},t.forwardedProps,fe,pe,W)};class md{constructor(){vu(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new md}static use(){const e=dS(md.create).current,[n,r]=_.useState(!1);return e.shouldMount=n,e.setShouldMount=r,_.useEffect(e.mountEffect,[n]),e}mount(){return this.mounted||(this.mounted=Pz(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...e)})}stop(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...e)})}pulsate(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...e)})}}function Dz(){return md.use()}function Pz(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function qw(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:u}=t,[f,h]=_.useState(!1),m=_e(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},b=_e(n.child,f&&n.childLeaving,r&&n.childPulsate);return!a&&!f&&h(!0),_.useEffect(()=>{if(!a&&l!=null){const y=setTimeout(l,u);return()=>{clearTimeout(y)}}},[l,a,u]),v.jsx("span",{className:m,style:g,children:v.jsx("span",{className:b})})}process.env.NODE_ENV!=="production"&&(qw.propTypes={classes:c.object.isRequired,className:c.string,in:c.bool,onExited:c.func,pulsate:c.bool,rippleSize:c.number,rippleX:c.number,rippleY:c.number,timeout:c.number.isRequired});const _r=We("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Dm=550,_z=80,Nz=Qr.keyframes`
129
+ 0% {
130
+ transform: scale(0);
131
+ opacity: 0.1;
132
+ }
133
+
134
+ 100% {
135
+ transform: scale(1);
136
+ opacity: 0.3;
137
+ }
138
+ `,Lz=Qr.keyframes`
139
+ 0% {
140
+ opacity: 1;
141
+ }
142
+
143
+ 100% {
144
+ opacity: 0;
145
+ }
146
+ `,$z=Qr.keyframes`
147
+ 0% {
148
+ transform: scale(1);
149
+ }
150
+
151
+ 50% {
152
+ transform: scale(0.92);
153
+ }
154
+
155
+ 100% {
156
+ transform: scale(1);
157
+ }
158
+ `,Fz=ye("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Rz=ye(qw,{name:"MuiTouchRipple",slot:"Ripple"})`
159
+ opacity: 0;
160
+ position: absolute;
161
+
162
+ &.${_r.rippleVisible} {
163
+ opacity: 0.3;
164
+ transform: scale(1);
165
+ animation-name: ${Nz};
166
+ animation-duration: ${Dm}ms;
167
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
168
+ }
169
+
170
+ &.${_r.ripplePulsate} {
171
+ animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
172
+ }
173
+
174
+ & .${_r.child} {
175
+ opacity: 1;
176
+ display: block;
177
+ width: 100%;
178
+ height: 100%;
179
+ border-radius: 50%;
180
+ background-color: currentColor;
181
+ }
182
+
183
+ & .${_r.childLeaving} {
184
+ opacity: 0;
185
+ animation-name: ${Lz};
186
+ animation-duration: ${Dm}ms;
187
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
188
+ }
189
+
190
+ & .${_r.childPulsate} {
191
+ position: absolute;
192
+ /* @noflip */
193
+ left: 0px;
194
+ top: 0;
195
+ animation-name: ${$z};
196
+ animation-duration: 2500ms;
197
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
198
+ animation-iteration-count: infinite;
199
+ animation-delay: 200ms;
200
+ }
201
+ `,Uw=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s,...a}=r,[l,u]=_.useState([]),f=_.useRef(0),h=_.useRef(null);_.useEffect(()=>{h.current&&(h.current(),h.current=null)},[l]);const m=_.useRef(!1),g=fS(),b=_.useRef(null),y=_.useRef(null),S=_.useCallback(w=>{const{pulsate:O,rippleX:A,rippleY:N,rippleSize:D,cb:L}=w;u(k=>[...k,v.jsx(Rz,{classes:{ripple:_e(i.ripple,_r.ripple),rippleVisible:_e(i.rippleVisible,_r.rippleVisible),ripplePulsate:_e(i.ripplePulsate,_r.ripplePulsate),child:_e(i.child,_r.child),childLeaving:_e(i.childLeaving,_r.childLeaving),childPulsate:_e(i.childPulsate,_r.childPulsate)},timeout:Dm,pulsate:O,rippleX:A,rippleY:N,rippleSize:D},f.current)]),f.current+=1,h.current=L},[i]),C=_.useCallback((w={},O={},A=()=>{})=>{const{pulsate:N=!1,center:D=o||O.pulsate,fakeElement:L=!1}=O;if((w==null?void 0:w.type)==="mousedown"&&m.current){m.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(m.current=!0);const k=L?null:y.current,I=k?k.getBoundingClientRect():{width:0,height:0,left:0,top:0};let $,H,z;if(D||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)$=Math.round(I.width/2),H=Math.round(I.height/2);else{const{clientX:R,clientY:B}=w.touches&&w.touches.length>0?w.touches[0]:w;$=Math.round(R-I.left),H=Math.round(B-I.top)}if(D)z=Math.sqrt((2*I.width**2+I.height**2)/3),z%2===0&&(z+=1);else{const R=Math.max(Math.abs((k?k.clientWidth:0)-$),$)*2+2,B=Math.max(Math.abs((k?k.clientHeight:0)-H),H)*2+2;z=Math.sqrt(R**2+B**2)}w!=null&&w.touches?b.current===null&&(b.current=()=>{S({pulsate:N,rippleX:$,rippleY:H,rippleSize:z,cb:A})},g.start(_z,()=>{b.current&&(b.current(),b.current=null)})):S({pulsate:N,rippleX:$,rippleY:H,rippleSize:z,cb:A})},[o,S,g]),E=_.useCallback(()=>{C({},{pulsate:!0})},[C]),T=_.useCallback((w,O)=>{if(g.clear(),(w==null?void 0:w.type)==="touchend"&&b.current){b.current(),b.current=null,g.start(0,()=>{T(w,O)});return}b.current=null,u(A=>A.length>0?A.slice(1):A),h.current=O},[g]);return _.useImperativeHandle(n,()=>({pulsate:E,start:C,stop:T}),[E,C,T]),v.jsx(Fz,{className:_e(_r.root,i.root,s),ref:y,...a,children:v.jsx(Vl,{component:null,exit:!0,children:l})})});process.env.NODE_ENV!=="production"&&(Uw.propTypes={center:c.bool,classes:c.object,className:c.string});function Bz(t){return Ue("MuiButtonBase",t)}const Vz=We("MuiButtonBase",["root","disabled","focusVisible"]),zz=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=qe({root:["root",e&&"disabled",n&&"focusVisible"]},Bz,o);return n&&r&&(s.root+=` ${r}`),s},Hz=ye("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.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"},[`&.${Vz.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ya=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:l="button",disabled:u=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:m=!1,focusVisibleClassName:g,LinkComponent:b="a",onBlur:y,onClick:S,onContextMenu:C,onDragLeave:E,onFocus:T,onFocusVisible:w,onKeyDown:O,onKeyUp:A,onMouseDown:N,onMouseLeave:D,onMouseUp:L,onTouchEnd:k,onTouchMove:I,onTouchStart:$,tabIndex:H=0,TouchRippleProps:z,touchRippleRef:R,type:B,...W}=r,U=_.useRef(null),G=Dz(),Y=Mt(G.ref,R),[Z,me]=_.useState(!1);u&&Z&&me(!1),_.useImperativeHandle(o,()=>({focusVisible:()=>{me(!0),U.current.focus()}}),[]);const fe=G.shouldMount&&!f&&!u;_.useEffect(()=>{Z&&m&&!f&&G.pulsate()},[f,m,Z,G]);const pe=qo(G,"start",N,h),re=qo(G,"stop",C,h),ue=qo(G,"stop",E,h),ae=qo(G,"stop",L,h),K=qo(G,"stop",De=>{Z&&De.preventDefault(),D&&D(De)},h),Q=qo(G,"start",$,h),ie=qo(G,"stop",k,h),he=qo(G,"stop",I,h),ee=qo(G,"stop",De=>{pS(De.target)||me(!1),y&&y(De)},!1),se=Fe(De=>{U.current||(U.current=De.currentTarget),pS(De.target)&&(me(!0),w&&w(De)),T&&T(De)}),le=()=>{const De=U.current;return l&&l!=="button"&&!(De.tagName==="A"&&De.href)},ge=Fe(De=>{m&&!De.repeat&&Z&&De.key===" "&&G.stop(De,()=>{G.start(De)}),De.target===De.currentTarget&&le()&&De.key===" "&&De.preventDefault(),O&&O(De),De.target===De.currentTarget&&le()&&De.key==="Enter"&&!u&&(De.preventDefault(),S&&S(De))}),we=Fe(De=>{m&&De.key===" "&&Z&&!De.defaultPrevented&&G.stop(De,()=>{G.pulsate(De)}),A&&A(De),S&&De.target===De.currentTarget&&le()&&De.key===" "&&!De.defaultPrevented&&S(De)});let xe=l;xe==="button"&&(W.href||W.to)&&(xe=b);const Oe={};xe==="button"?(Oe.type=B===void 0?"button":B,Oe.disabled=u):(!W.href&&!W.to&&(Oe.role="button"),u&&(Oe["aria-disabled"]=u));const Le=Mt(n,U),He={...r,centerRipple:i,component:l,disabled:u,disableRipple:f,disableTouchRipple:h,focusRipple:m,tabIndex:H,focusVisible:Z},Ge=zz(He);return v.jsxs(Hz,{as:xe,className:_e(Ge.root,a),ownerState:He,onBlur:ee,onClick:S,onContextMenu:re,onFocus:se,onKeyDown:ge,onKeyUp:we,onMouseDown:pe,onMouseLeave:K,onMouseUp:ae,onDragLeave:ue,onTouchEnd:ie,onTouchMove:he,onTouchStart:Q,ref:Le,tabIndex:u?-1:H,type:B,...Oe,...W,children:[s,fe?v.jsx(Uw,{ref:Y,center:i,...z}):null]})});function qo(t,e,n,r=!1){return Fe(o=>(n&&n(o),r||t[e](o),!0))}process.env.NODE_ENV!=="production"&&(ya.propTypes={action:hn,centerRipple:c.bool,children:c.node,classes:c.object,className:c.string,component:wu,disabled:c.bool,disableRipple:c.bool,disableTouchRipple:c.bool,focusRipple:c.bool,focusVisibleClassName:c.string,href:c.any,LinkComponent:c.elementType,onBlur:c.func,onClick:c.func,onContextMenu:c.func,onDragLeave:c.func,onFocus:c.func,onFocusVisible:c.func,onKeyDown:c.func,onKeyUp:c.func,onMouseDown:c.func,onMouseLeave:c.func,onMouseUp:c.func,onTouchEnd:c.func,onTouchMove:c.func,onTouchStart:c.func,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,TouchRippleProps:c.object,touchRippleRef:c.oneOfType([c.func,c.shape({current:c.shape({pulsate:c.func.isRequired,start:c.func.isRequired,stop:c.func.isRequired})})]),type:c.oneOfType([c.oneOf(["button","reset","submit"]),c.string])});function jz(t){return Ue("MuiCircularProgress",t)}We("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Si=44,Pm=Qr.keyframes`
202
+ 0% {
203
+ transform: rotate(0deg);
204
+ }
205
+
206
+ 100% {
207
+ transform: rotate(360deg);
208
+ }
209
+ `,_m=Qr.keyframes`
210
+ 0% {
211
+ stroke-dasharray: 1px, 200px;
212
+ stroke-dashoffset: 0;
213
+ }
214
+
215
+ 50% {
216
+ stroke-dasharray: 100px, 200px;
217
+ stroke-dashoffset: -15px;
218
+ }
219
+
220
+ 100% {
221
+ stroke-dasharray: 1px, 200px;
222
+ stroke-dashoffset: -126px;
223
+ }
224
+ `,Wz=typeof Pm!="string"?Qr.css`
225
+ animation: ${Pm} 1.4s linear infinite;
226
+ `:null,qz=typeof _m!="string"?Qr.css`
227
+ animation: ${_m} 1.4s ease-in-out infinite;
228
+ `:null,Uz=t=>{const{classes:e,variant:n,color:r,disableShrink:o}=t,i={root:["root",n,`color${Ae(r)}`],svg:["svg"],circle:["circle",`circle${Ae(n)}`,o&&"circleDisableShrink"]};return qe(i,jz,e)},Kz=ye("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${Ae(n.color)}`]]}})(Dt(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Wz||{animation:`${Pm} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Vn()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),Yz=ye("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),Gz=ye("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${Ae(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(Dt(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:qz||{animation:`${_m} 1.4s ease-in-out infinite`}}]}))),Nm=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:s=!1,size:a=40,style:l,thickness:u=3.6,value:f=0,variant:h="indeterminate",...m}=r,g={...r,color:i,disableShrink:s,size:a,thickness:u,value:f,variant:h},b=Uz(g),y={},S={},C={};if(h==="determinate"){const E=2*Math.PI*((Si-u)/2);y.strokeDasharray=E.toFixed(3),C["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*E).toFixed(3)}px`,S.transform="rotate(-90deg)"}return v.jsx(Kz,{className:_e(b.root,o),style:{width:a,height:a,...S,...l},ownerState:g,ref:n,role:"progressbar",...C,...m,children:v.jsx(Yz,{className:b.svg,ownerState:g,viewBox:`${Si/2} ${Si/2} ${Si} ${Si}`,children:v.jsx(Gz,{className:b.circle,style:y,ownerState:g,cx:Si,cy:Si,r:(Si-u)/2,fill:"none",strokeWidth:u})})})});process.env.NODE_ENV!=="production"&&(Nm.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:Fo(c.bool,t=>t.disableShrink&&t.variant&&t.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});function Jz(t){return Ue("MuiIconButton",t)}const Kw=We("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Zz=t=>{const{classes:e,disabled:n,color:r,edge:o,size:i,loading:s}=t,a={root:["root",s&&"loading",n&&"disabled",r!=="default"&&`color${Ae(r)}`,o&&`edge${Ae(o)}`,`size${Ae(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return qe(a,Jz,e)},Xz=ye(ya,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.loading&&e.loading,n.color!=="default"&&e[`color${Ae(n.color)}`],n.edge&&e[`edge${Ae(n.edge)}`],e[`size${Ae(n.size)}`]]}})(Dt(({theme:t})=>({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette.action.active,t.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}}]})),Dt(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(Vn()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(Vn()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt((t.vars||t).palette[e].main,t.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${Kw.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${Kw.loading}`]:{color:"transparent"}}))),Qz=ye("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),ba=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:l=!1,disableFocusRipple:u=!1,size:f="medium",id:h,loading:m=null,loadingIndicator:g,...b}=r,y=yo(h),S=g??v.jsx(Nm,{"aria-labelledby":y,color:"inherit",size:16}),C={...r,edge:o,color:a,disabled:l,disableFocusRipple:u,loading:m,loadingIndicator:S,size:f},E=Zz(C);return v.jsxs(Xz,{id:m?y:h,className:_e(E.root,s),centerRipple:!0,focusRipple:!u,disabled:l||m,ref:n,...b,ownerState:C,children:[typeof m=="boolean"&&v.jsx("span",{className:E.loadingWrapper,style:{display:"contents"},children:v.jsx(Qz,{className:E.loadingIndicator,ownerState:C,children:m&&S})}),i]})});process.env.NODE_ENV!=="production"&&(ba.propTypes={children:Fo(c.node,t=>_.Children.toArray(t.children).some(n=>_.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
229
+ `)):null),classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),c.string]),disabled:c.bool,disableFocusRipple:c.bool,disableRipple:c.bool,edge:c.oneOf(["end","start",!1]),id:c.string,loading:c.bool,loadingIndicator:c.node,size:c.oneOfType([c.oneOf(["small","medium","large"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function e4(t){return Ue("MuiTypography",t)}We("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const t4={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},n4=UR(),r4=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,a={root:["root",i,t.align!=="inherit"&&`align${Ae(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return qe(a,e4,s)},o4=ye("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${Ae(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(Dt(({theme:t})=>{var e;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(t.palette).filter(Vn()).map(([n])=>({props:{color:n},style:{color:(t.vars||t).palette[n].main}})),...Object.entries(((e=t.palette)==null?void 0:e.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Ae(n)}`},style:{color:(t.vars||t).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),Yw={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ci=_.forwardRef(function(e,n){const{color:r,...o}=xt({props:e,name:"MuiTypography"}),i=!t4[r],s=n4({...o,...i&&{color:r}}),{align:a="inherit",className:l,component:u,gutterBottom:f=!1,noWrap:h=!1,paragraph:m=!1,variant:g="body1",variantMapping:b=Yw,...y}=s,S={...s,align:a,color:r,className:l,component:u,gutterBottom:f,noWrap:h,paragraph:m,variant:g,variantMapping:b},C=u||(m?"p":b[g]||Yw[g])||"span",E=r4(S);return v.jsx(o4,{as:C,ref:n,className:_e(E.root,l),...y,ownerState:S,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...y.style}})});process.env.NODE_ENV!=="production"&&(Ci.propTypes={align:c.oneOf(["center","inherit","justify","left","right"]),children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),c.string]),component:c.elementType,gutterBottom:c.bool,noWrap:c.bool,paragraph:c.bool,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),c.string]),variantMapping:c.object});function i4(t){return Ue("MuiInputAdornment",t)}const Gw=We("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Jw;const s4=(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${Ae(n.position)}`],n.disablePointerEvents===!0&&e.disablePointerEvents,e[n.variant]]},a4=t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:s}=t,a={root:["root",n&&"disablePointerEvents",o&&`position${Ae(o)}`,s,r&&"hiddenLabel",i&&`size${Ae(i)}`]};return qe(a,i4,e)},l4=ye("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:s4})(Dt(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${Gw.positionStart}&:not(.${Gw.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Lm=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiInputAdornment"}),{children:o,className:i,component:s="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:u,variant:f,...h}=r,m=ro()||{};let g=f;f&&m.variant&&process.env.NODE_ENV!=="production"&&f===m.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),g||(g=m.variant);const b={...r,hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:a,position:u,variant:g},y=a4(b);return v.jsx(Ll.Provider,{value:null,children:v.jsx(l4,{as:s,ownerState:b,className:_e(y.root,i),ref:n,...h,children:typeof o=="string"&&!l?v.jsx(Ci,{color:"textSecondary",children:o}):v.jsxs(_.Fragment,{children:[u==="start"?Jw||(Jw=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});process.env.NODE_ENV!=="production"&&(Lm.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,disablePointerEvents:c.bool,disableTypography:c.bool,position:c.oneOf(["end","start"]).isRequired,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOf(["filled","outlined","standard"])});const c4=Be(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),u4=Be(v.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),d4=Be(v.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),f4=Be(v.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"}),"Calendar");Be(v.jsxs(_.Fragment,{children:[v.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"}),v.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),Be(v.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"}),"DateRange"),Be(v.jsxs(_.Fragment,{children:[v.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"}),v.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const p4=Be(v.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"}),"Clear"),h4=["clearable","onClear","InputProps","sx","slots","slotProps"],m4=["ownerState"],g4=t=>{const e=Wo(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:s,slotProps:a}=t,l=nt(t,h4),u=(s==null?void 0:s.clearButton)??ba,f=Ct({elementType:u,externalSlotProps:a==null?void 0:a.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:e.fieldClearLabel}}),h=nt(f,m4),m=(s==null?void 0:s.clearIcon)??p4,g=Ct({elementType:m,externalSlotProps:a==null?void 0:a.clearIcon,ownerState:{}});return te({},l,{InputProps:te({},o,{endAdornment:v.jsxs(_.Fragment,{children:[n&&v.jsx(Lm,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:v.jsx(u,te({},h,{onClick:r,children:v.jsx(m,te({fontSize:"small"},g))}))}),o==null?void 0:o.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},y4=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],b4=(t,e)=>_.useMemo(()=>{const n=te({},t),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return y4.forEach(o),Bw.forEach(o),{forwardedProps:n,internalProps:r}},[t,e]),v4=_.createContext(null);function Zw(t){const{contextValue:e,localeText:n,children:r}=t;return v.jsx(v4.Provider,{value:e,children:v.jsx(nm,{localeText:n,children:r})})}const x4=t=>{const e=Wt(),n=Jl();return te({},t,{disablePast:t.disablePast??!1,disableFuture:t.disableFuture??!1,format:t.format??e.formats.keyboardDate,minDate:Pr(e,t.minDate,n.minDate),maxDate:Pr(e,t.maxDate,n.maxDate)})},S4=t=>{const e=x4(t),{forwardedProps:n,internalProps:r}=b4(e,"date");return Iz({forwardedProps:n,internalProps:r,valueManager:So,fieldValueManager:cz,validator:Gl,valueType:"date"})};function C4(t){return Ue("MuiPickersTextField",t)}We("MuiPickersTextField",["root","focused","disabled","error","required"]);function w4(t){return Ue("MuiPickersInputBase",t)}const va=We("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function T4(t){return Ue("MuiPickersSectionList",t)}const Zl=We("MuiPickersSectionList",["root","section","sectionContent"]),E4=["slots","slotProps","elements","sectionListRef"],Xw=ye("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(t,e)=>e.root})({direction:"ltr /*! @noflip */",outline:"none"}),Qw=ye("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(t,e)=>e.section})({}),eT=ye("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(t,e)=>e.sectionSeparator})({whiteSpace:"pre"}),tT=ye("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(t,e)=>e.sectionContent})({outline:"none"}),M4=t=>{const{classes:e}=t;return qe({root:["root"],section:["section"],sectionContent:["sectionContent"]},T4,e)};function nT(t){const{slots:e,slotProps:n,element:r,classes:o}=t,i=(e==null?void 0:e.section)??Qw,s=Ct({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),a=(e==null?void 0:e.sectionContent)??tT,l=Ct({elementType:a,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),u=(e==null?void 0:e.sectionSeparator)??eT,f=Ct({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),h=Ct({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return v.jsxs(i,te({},s,{children:[v.jsx(u,te({},f)),v.jsx(a,te({},l)),v.jsx(u,te({},h))]}))}process.env.NODE_ENV!=="production"&&(nT.propTypes={classes:c.object.isRequired,element:c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired}).isRequired,slotProps:c.object,slots:c.object});const rT=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:s,sectionListRef:a}=r,l=nt(r,E4),u=M4(r),f=_.useRef(null),h=Mt(n,f),m=y=>{if(!f.current)throw new Error(`MUI X: Cannot call sectionListRef.${y} before the mount of the component.`);return f.current};_.useImperativeHandle(a,()=>({getRoot(){return m("getRoot")},getSectionContainer(y){return m("getSectionContainer").querySelector(`.${Zl.section}[data-sectionindex="${y}"]`)},getSectionContent(y){return m("getSectionContent").querySelector(`.${Zl.section}[data-sectionindex="${y}"] .${Zl.sectionContent}`)},getSectionIndexFromDOMElement(y){const S=m("getSectionIndexFromDOMElement");if(y==null||!S.contains(y))return null;let C=null;return y.classList.contains(Zl.section)?C=y:y.classList.contains(Zl.sectionContent)&&(C=y.parentElement),C==null?null:Number(C.dataset.sectionindex)}}));const g=(o==null?void 0:o.root)??Xw,b=Ct({elementType:g,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:h,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return v.jsx(g,te({},b,{children:b.contentEditable?s.map(({content:y,before:S,after:C})=>`${S.children}${y.children}${C.children}`).join(""):v.jsx(_.Fragment,{children:s.map((y,S)=>v.jsx(nT,{slots:o,slotProps:i,element:y,classes:u},S))})}))});process.env.NODE_ENV!=="production"&&(rT.propTypes={classes:c.object,contentEditable:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object});const O4=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],k4=t=>Math.round(t*1e5)/1e5,gd=ye("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>te({},t.typography.body1,{color:(t.vars||t).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${k4(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),$m=ye(Xw,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})(({theme:t})=>({padding:"4px 0 5px",fontFamily:t.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:e,focused:n,filled:r,label:o})=>!e&&!n&&!r&&o==null,style:t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:t.palette.mode==="light"?.42:.5}}]})),A4=ye(Qw,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(t,e)=>e.section})(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),I4=ye(tT,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(t,e)=>e.content})(({theme:t})=>({fontFamily:t.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),D4=ye(eT,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(t,e)=>e.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),P4=ye("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(t,e)=>e.hiddenInput})(te({},M$)),_4=t=>{const{focused:e,disabled:n,error:r,classes:o,fullWidth:i,readOnly:s,color:a,size:l,endAdornment:u,startAdornment:f}=t,h={root:["root",e&&!n&&"focused",n&&"disabled",s&&"readOnly",r&&"error",i&&"fullWidth",`color${Ae(a)}`,l==="small"&&"inputSizeSmall",!!f&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return qe(h,w4,o)},yd=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:s,onChange:a,id:l,endAdornment:u,startAdornment:f,renderSuffix:h,slots:m,slotProps:g,contentEditable:b,tabIndex:y,onInput:S,onPaste:C,onKeyDown:E,name:T,readOnly:w,inputProps:O,inputRef:A,sectionListRef:N}=r,D=nt(r,O4),L=_.useRef(null),k=Mt(n,L),I=Mt(O==null?void 0:O.ref,A),$=eo(),H=ro();if(!H)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const z=Y=>{var Z;if(H.disabled){Y.stopPropagation();return}(Z=H.onFocus)==null||Z.call(H,Y)};_.useEffect(()=>{H&&H.setAdornedStart(!!f)},[H,f]),_.useEffect(()=>{H&&(i?H.onEmpty():H.onFilled())},[H,i]);const R=te({},r,H,{isRtl:$}),B=_4(R),W=(m==null?void 0:m.root)||gd,U=Ct({elementType:W,externalSlotProps:g==null?void 0:g.root,externalForwardedProps:D,additionalProps:{"aria-invalid":H.error,ref:k},className:B.root,ownerState:R}),G=(m==null?void 0:m.input)||$m;return v.jsxs(W,te({},U,{children:[f,v.jsx(rT,{sectionListRef:N,elements:o,contentEditable:b,tabIndex:y,className:B.sectionsContainer,onFocus:z,onBlur:H.onBlur,onInput:S,onPaste:C,onKeyDown:E,slots:{root:G,section:A4,sectionContent:I4,sectionSeparator:D4},slotProps:{root:{ownerState:R},sectionContent:{className:va.sectionContent},sectionSeparator:({position:Y})=>({className:Y==="before"?va.sectionBefore:va.sectionAfter})}}),u,h?h(te({},H)):null,v.jsx(P4,te({name:T,className:B.input,value:s,onChange:a,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:w,required:H.required,disabled:H.disabled},O,{ref:I}))]}))});process.env.NODE_ENV!=="production"&&(yd.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,id:c.string,inputProps:c.object,inputRef:hn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired});function N4(t){return Ue("MuiPickersOutlinedInput",t)}const oo=te({},va,We("MuiPickersOutlinedInput",["root","notchedOutline","input"])),L4=["children","className","label","notched","shrink"],$4=ye("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.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:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),oT=ye("span")(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit"})),F4=ye("legend")(({theme:t})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.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:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]}));function R4(t){const{className:e,label:n}=t,r=nt(t,L4),o=n!=null&&n!=="",i=te({},t,{withLabel:o});return v.jsx($4,te({"aria-hidden":!0,className:e},r,{ownerState:i,children:v.jsx(F4,{ownerState:i,children:o?v.jsx(oT,{children:n}):v.jsx(oT,{className:"notranslate",children:"​"})})}))}const B4=["label","autoFocus","ownerState","notched"],V4=ye(gd,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${oo.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${oo.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${oo.focused} .${oo.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${oo.disabled}`]:{[`& .${oo.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled},"*":{color:(t.vars||t).palette.action.disabled}},[`&.${oo.error} .${oo.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},variants:Object.keys((t.vars??t).palette).filter(n=>{var r;return((r=(t.vars??t).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{color:n},style:{[`&.${oo.focused}:not(.${oo.error}) .${oo.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}}))}}),z4=ye($m,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),H4=t=>{const{classes:e}=t,r=qe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},N4,e);return te({},e,r)},Fm=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:s}=r,a=nt(r,B4),l=ro(),u=te({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),f=H4(u);return v.jsx(yd,te({slots:{root:V4,input:z4},renderSuffix:h=>v.jsx(R4,{shrink:!!(s||h.adornedStart||h.focused||h.filled),notched:!!(s||h.adornedStart||h.focused||h.filled),className:f.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?v.jsxs(_.Fragment,{children:[o," ","*"]}):o,ownerState:u})},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(Fm.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,id:c.string,inputProps:c.object,inputRef:hn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,notched:c.bool,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired}),Fm.muiName="Input";function j4(t){return Ue("MuiPickersFilledInput",t)}const hs=te({},va,We("MuiPickersFilledInput",["root","underline","input"])),W4=["label","autoFocus","disableUnderline","ownerState"],q4=ye(gd,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>$u(t)&&t!=="disableUnderline"})(({theme:t})=>{const e=t.palette.mode==="light",n=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=e?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=e?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r}},[`&.${hs.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${hs.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((t.vars??t).palette).filter(s=>(t.vars??t).palette[s].main).map(s=>{var a;return{props:{color:s,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(a=(t.vars||t).palette[s])==null?void 0:a.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${hs.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${hs.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${hs.disabled}, .${hs.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${hs.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:s})=>!!s,style:{paddingLeft:12}},{props:({endAdornment:s})=>!!s,style:{paddingRight:12}}]}}),U4=ye($m,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:t})=>!!t,style:{paddingLeft:0}},{props:({endAdornment:t})=>!!t,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),K4=t=>{const{classes:e,disableUnderline:n}=t,o=qe({root:["root",!n&&"underline"],input:["input"]},j4,e);return te({},e,o)},Rm=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=nt(r,W4),l=ro(),u=te({},r,s,l,{color:(l==null?void 0:l.color)||"primary"}),f=K4(u);return v.jsx(yd,te({slots:{root:q4,input:U4},slotProps:{root:{disableUnderline:i}}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(Rm.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,disableUnderline:c.bool,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,hiddenLabel:c.bool,id:c.string,inputProps:c.object,inputRef:hn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired}),Rm.muiName="Input";function Y4(t){return Ue("MuiPickersFilledInput",t)}const Xl=te({},va,We("MuiPickersInput",["root","input"])),G4=["label","autoFocus","disableUnderline","ownerState"],J4=ye(gd,{name:"MuiPickersInput",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((t.vars??t).palette).filter(r=>(t.vars??t).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Xl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Xl.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Xl.disabled}, .${Xl.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Xl.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),Z4=t=>{const{classes:e,disableUnderline:n}=t,o=qe({root:["root",!n&&"underline"],input:["input"]},Y4,e);return te({},e,o)},Bm=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=nt(r,G4),l=ro(),u=te({},r,s,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),f=Z4(u);return v.jsx(yd,te({slots:{root:J4}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(Bm.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,disableUnderline:c.bool,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,id:c.string,inputProps:c.object,inputRef:hn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired}),Bm.muiName="Input";const X4=["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"],Q4={standard:Bm,filled:Rm,outlined:Fm},eH=ye(im,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),tH=t=>{const{focused:e,disabled:n,classes:r,required:o}=t;return qe({root:["root",e&&!n&&"focused",n&&"disabled",o&&"required"]},C4,r)},iT=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:s,color:a="primary",disabled:l=!1,error:u=!1,variant:f="outlined",required:h=!1,InputProps:m,inputProps:g,inputRef:b,sectionListRef:y,elements:S,areAllSectionsEmpty:C,onClick:E,onKeyDown:T,onKeyUp:w,onPaste:O,onInput:A,endAdornment:N,startAdornment:D,tabIndex:L,contentEditable:k,focused:I,value:$,onChange:H,fullWidth:z,id:R,name:B,helperText:W,FormHelperTextProps:U,label:G,InputLabelProps:Y}=r,Z=nt(r,X4),me=_.useRef(null),fe=Mt(n,me),pe=yo(R),re=W&&pe?`${pe}-helper-text`:void 0,ue=G&&pe?`${pe}-label`:void 0,ae=te({},r,{color:a,disabled:l,error:u,focused:I,required:h,variant:f}),K=tH(ae),Q=Q4[f];return v.jsxs(eH,te({className:_e(K.root,s),ref:fe,focused:I,onFocus:o,onBlur:i,disabled:l,variant:f,error:u,color:a,fullWidth:z,required:h,ownerState:ae},Z,{children:[v.jsx(om,te({htmlFor:pe,id:ue},Y,{children:G})),v.jsx(Q,te({elements:S,areAllSectionsEmpty:C,onClick:E,onKeyDown:T,onKeyUp:w,onInput:A,onPaste:O,endAdornment:N,startAdornment:D,tabIndex:L,contentEditable:k,value:$,onChange:H,id:pe,fullWidth:z,inputProps:g,inputRef:b,sectionListRef:y,label:G,name:B,role:"group","aria-labelledby":ue},m)),W&&v.jsx(sm,te({id:re},U,{children:W}))]}))});process.env.NODE_ENV!=="production"&&(iT.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,color:c.oneOf(["error","info","primary","secondary","success","warning"]),component:c.elementType,contentEditable:c.bool.isRequired,disabled:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,error:c.bool.isRequired,focused:c.bool,FormHelperTextProps:c.object,fullWidth:c.bool,helperText:c.node,hiddenLabel:c.bool,id:c.string,InputLabelProps:c.object,inputProps:c.object,InputProps:c.object,inputRef:hn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onBlur:c.func.isRequired,onChange:c.func.isRequired,onClick:c.func.isRequired,onFocus:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,readOnly:c.bool,required:c.bool,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),size:c.oneOf(["medium","small"]),startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired,variant:c.oneOf(["filled","outlined","standard"])});const nH=["enableAccessibleFieldDOMStructure"],rH=["InputProps","readOnly"],oH=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],iH=t=>{let{enableAccessibleFieldDOMStructure:e}=t,n=nt(t,nH);if(e){const{InputProps:h,readOnly:m}=n,g=nt(n,rH);return te({},g,{InputProps:te({},h??{},{readOnly:m})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:s,InputProps:a,inputProps:l,inputRef:u}=n,f=nt(n,oH);return te({},f,{InputProps:te({},a??{},{readOnly:s}),inputProps:te({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})},sH=["slots","slotProps","InputProps","inputProps"],bd=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:s,inputProps:a}=r,l=nt(r,sH),u=r,f=(o==null?void 0:o.textField)??(e.enableAccessibleFieldDOMStructure?iT:ww),h=Ct({elementType:f,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:u});h.inputProps=te({},a,h.inputProps),h.InputProps=te({},s,h.InputProps);const m=S4(h),g=iH(m),b=g4(te({},g,{slots:o,slotProps:i}));return v.jsx(f,te({},b))});process.env.NODE_ENV!=="production"&&(bd.propTypes={autoFocus:c.bool,className:c.string,clearable:c.bool,color:c.oneOf(["error","info","primary","secondary","success","warning"]),component:c.elementType,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disablePast:c.bool,enableAccessibleFieldDOMStructure:c.bool,focused:c.bool,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),FormHelperTextProps:c.object,fullWidth:c.bool,helperText:c.node,hiddenLabel:c.bool,id:c.string,InputLabelProps:c.object,inputProps:c.object,InputProps:c.object,inputRef:hn,label:c.node,margin:c.oneOf(["dense","none","normal"]),maxDate:c.object,minDate:c.object,name:c.string,onBlur:c.func,onChange:c.func,onClear:c.func,onError:c.func,onFocus:c.func,onSelectedSectionsChange:c.func,readOnly:c.bool,referenceDate:c.object,required:c.bool,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,shouldRespectLeadingZeros:c.bool,size:c.oneOf(["medium","small"]),slotProps:c.object,slots:c.object,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,unstableFieldRef:c.oneOfType([c.func,c.object]),value:c.object,variant:c.oneOf(["filled","outlined","standard"])});var vd={exports:{}},aH=vd.exports,sT;function lH(){return sT||(sT=1,function(t,e){(function(n,r){t.exports=r()})(aH,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(i,s,a){var l=s.prototype;a.utc=function(y){var S={date:y,utc:!0,args:arguments};return new s(S)},l.utc=function(y){var S=a(this.toDate(),{locale:this.$L,utc:!0});return y?S.add(this.utcOffset(),n):S},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(y){y.utc&&(this.$u=!0),this.$utils().u(y.$offset)||(this.$offset=y.$offset),u.call(this,y)};var f=l.init;l.init=function(){if(this.$u){var y=this.$d;this.$y=y.getUTCFullYear(),this.$M=y.getUTCMonth(),this.$D=y.getUTCDate(),this.$W=y.getUTCDay(),this.$H=y.getUTCHours(),this.$m=y.getUTCMinutes(),this.$s=y.getUTCSeconds(),this.$ms=y.getUTCMilliseconds()}else f.call(this)};var h=l.utcOffset;l.utcOffset=function(y,S){var C=this.$utils().u;if(C(y))return this.$u?0:C(this.$offset)?h.call(this):this.$offset;if(typeof y=="string"&&(y=function(O){O===void 0&&(O="");var A=O.match(r);if(!A)return null;var N=(""+A[0]).match(o)||["-",0,0],D=N[0],L=60*+N[1]+ +N[2];return L===0?0:D==="+"?L:-L}(y),y===null))return this;var E=Math.abs(y)<=16?60*y:y,T=this;if(S)return T.$offset=E,T.$u=y===0,T;if(y!==0){var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(T=this.local().add(E+w,n)).$offset=E,T.$x.$localOffset=w}else T=this.utc();return T};var m=l.format;l.format=function(y){var S=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,S)},l.valueOf=function(){var y=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*y},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var g=l.toDate;l.toDate=function(y){return y==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var b=l.diff;l.diff=function(y,S,C){if(y&&this.$u===y.$u)return b.call(this,y,S,C);var E=this.local(),T=a(y).local();return b.call(E,T,S,C)}}})}(vd)),vd.exports}var cH=lH();const uH=Gn(cH);mn.extend(uH);const aT=QF({themeId:Il});function dH(t){return Ue("MuiPickersToolbar",t)}We("MuiPickersToolbar",["root","content"]);const fH=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],pH=t=>{const{classes:e}=t;return qe({root:["root"],content:["content"]},dH,e)},hH=ye("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),mH=ye("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(t,e)=>e.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"}}]}),gH=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:s,hidden:a,titleId:l}=r,u=nt(r,fH),f=r,h=pH(f);return a?null:v.jsxs(hH,te({ref:n,className:_e(h.root,i),ownerState:f},u,{children:[v.jsx(Ci,{color:"text.secondary",variant:"overline",id:l,children:s}),v.jsx(mH,{className:h.content,ownerState:f,children:o})]}))});function yH(t){return Ue("MuiDatePickerToolbar",t)}We("MuiDatePickerToolbar",["root","title"]);const bH=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],vH=t=>{const{classes:e}=t;return qe({root:["root"],title:["title"]},yH,e)},xH=ye(gH,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),SH=ye(Ci,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(t,e)=>e.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),lT=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:s,toolbarPlaceholder:a="––",views:l,className:u}=r,f=nt(r,bH),h=Wt(),m=Wo(),g=vH(r),b=_.useMemo(()=>{if(!o)return a;const S=Tm(h,{format:s,views:l},!0);return h.formatByString(o,S)},[o,s,a,h,l]),y=r;return v.jsx(xH,te({ref:n,toolbarTitle:m.datePickerToolbarTitle,isLandscape:i,className:_e(g.root,u)},f,{children:v.jsx(SH,{variant:"h4",align:i?"left":"center",ownerState:y,className:g.title,children:b})}))});process.env.NODE_ENV!=="production"&&(lT.propTypes={classes:c.object,className:c.string,disabled:c.bool,hidden:c.bool,isLandscape:c.bool.isRequired,onChange:c.func.isRequired,onViewChange:c.func.isRequired,readOnly:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleId:c.string,toolbarFormat:c.string,toolbarPlaceholder:c.node,value:c.object,view:c.oneOf(["day","month","year"]).isRequired,views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired).isRequired});function cT(t,e){const n=Wt(),r=Jl(),o=jt({props:t,name:e}),i=_.useMemo(()=>{var s;return((s=o.localeText)==null?void 0:s.toolbarTitle)==null?o.localeText:te({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return te({},o,{localeText:i},BV({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Pr(n,o.minDate,r.minDate),maxDate:Pr(n,o.maxDate,r.maxDate),slots:te({toolbar:lT},o.slots)})}var ir="top",Nr="bottom",Lr="right",sr="left",Vm="auto",Ql=[ir,Nr,Lr,sr],xa="start",ec="end",CH="clippingParents",uT="viewport",tc="popper",wH="reference",dT=Ql.reduce(function(t,e){return t.concat([e+"-"+xa,e+"-"+ec])},[]),fT=[].concat(Ql,[Vm]).reduce(function(t,e){return t.concat([e,e+"-"+xa,e+"-"+ec])},[]),TH="beforeRead",EH="read",MH="afterRead",OH="beforeMain",kH="main",AH="afterMain",IH="beforeWrite",DH="write",PH="afterWrite",_H=[TH,EH,MH,OH,kH,AH,IH,DH,PH];function Co(t){return t?(t.nodeName||"").toLowerCase():null}function vr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ms(t){var e=vr(t).Element;return t instanceof e||t instanceof Element}function $r(t){var e=vr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function zm(t){if(typeof ShadowRoot>"u")return!1;var e=vr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function NH(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!$r(i)||!Co(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function LH(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!$r(o)||!Co(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const pT={name:"applyStyles",enabled:!0,phase:"write",fn:NH,effect:LH,requires:["computeStyles"]};function wo(t){return t.split("-")[0]}var gs=Math.max,xd=Math.min,Sa=Math.round;function Hm(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function hT(){return!/^((?!chrome|android).)*safari/i.test(Hm())}function Ca(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&$r(t)&&(o=t.offsetWidth>0&&Sa(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Sa(r.height)/t.offsetHeight||1);var s=ms(t)?vr(t):window,a=s.visualViewport,l=!hT()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/o,f=(r.top+(l&&a?a.offsetTop:0))/i,h=r.width/o,m=r.height/i;return{width:h,height:m,top:f,right:u+h,bottom:f+m,left:u,x:u,y:f}}function jm(t){var e=Ca(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function mT(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&zm(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Uo(t){return vr(t).getComputedStyle(t)}function $H(t){return["table","td","th"].indexOf(Co(t))>=0}function wi(t){return((ms(t)?t.ownerDocument:t.document)||window.document).documentElement}function Sd(t){return Co(t)==="html"?t:t.assignedSlot||t.parentNode||(zm(t)?t.host:null)||wi(t)}function gT(t){return!$r(t)||Uo(t).position==="fixed"?null:t.offsetParent}function FH(t){var e=/firefox/i.test(Hm()),n=/Trident/i.test(Hm());if(n&&$r(t)){var r=Uo(t);if(r.position==="fixed")return null}var o=Sd(t);for(zm(o)&&(o=o.host);$r(o)&&["html","body"].indexOf(Co(o))<0;){var i=Uo(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function nc(t){for(var e=vr(t),n=gT(t);n&&$H(n)&&Uo(n).position==="static";)n=gT(n);return n&&(Co(n)==="html"||Co(n)==="body"&&Uo(n).position==="static")?e:n||FH(t)||e}function Wm(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function rc(t,e,n){return gs(t,xd(e,n))}function RH(t,e,n){var r=rc(t,e,n);return r>n?n:r}function yT(){return{top:0,right:0,bottom:0,left:0}}function bT(t){return Object.assign({},yT(),t)}function vT(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var BH=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,bT(typeof e!="number"?e:vT(e,Ql))};function VH(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=wo(n.placement),l=Wm(a),u=[sr,Lr].indexOf(a)>=0,f=u?"height":"width";if(!(!i||!s)){var h=BH(o.padding,n),m=jm(i),g=l==="y"?ir:sr,b=l==="y"?Nr:Lr,y=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],S=s[l]-n.rects.reference[l],C=nc(i),E=C?l==="y"?C.clientHeight||0:C.clientWidth||0:0,T=y/2-S/2,w=h[g],O=E-m[f]-h[b],A=E/2-m[f]/2+T,N=rc(w,A,O),D=l;n.modifiersData[r]=(e={},e[D]=N,e.centerOffset=N-A,e)}}function zH(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||mT(e.elements.popper,o)&&(e.elements.arrow=o))}const HH={name:"arrow",enabled:!0,phase:"main",fn:VH,effect:zH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wa(t){return t.split("-")[1]}var jH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function WH(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:Sa(n*o)/o||0,y:Sa(r*o)/o||0}}function xT(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,f=t.roundOffsets,h=t.isFixed,m=s.x,g=m===void 0?0:m,b=s.y,y=b===void 0?0:b,S=typeof f=="function"?f({x:g,y}):{x:g,y};g=S.x,y=S.y;var C=s.hasOwnProperty("x"),E=s.hasOwnProperty("y"),T=sr,w=ir,O=window;if(u){var A=nc(n),N="clientHeight",D="clientWidth";if(A===vr(n)&&(A=wi(n),Uo(A).position!=="static"&&a==="absolute"&&(N="scrollHeight",D="scrollWidth")),A=A,o===ir||(o===sr||o===Lr)&&i===ec){w=Nr;var L=h&&A===O&&O.visualViewport?O.visualViewport.height:A[N];y-=L-r.height,y*=l?1:-1}if(o===sr||(o===ir||o===Nr)&&i===ec){T=Lr;var k=h&&A===O&&O.visualViewport?O.visualViewport.width:A[D];g-=k-r.width,g*=l?1:-1}}var I=Object.assign({position:a},u&&jH),$=f===!0?WH({x:g,y},vr(n)):{x:g,y};if(g=$.x,y=$.y,l){var H;return Object.assign({},I,(H={},H[w]=E?"0":"",H[T]=C?"0":"",H.transform=(O.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",H))}return Object.assign({},I,(e={},e[w]=E?y+"px":"",e[T]=C?g+"px":"",e.transform="",e))}function qH(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:wo(e.placement),variation:wa(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,xT(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,xT(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const UH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qH,data:{}};var Cd={passive:!0};function KH(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,a=s===void 0?!0:s,l=vr(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(f){f.addEventListener("scroll",n.update,Cd)}),a&&l.addEventListener("resize",n.update,Cd),function(){i&&u.forEach(function(f){f.removeEventListener("scroll",n.update,Cd)}),a&&l.removeEventListener("resize",n.update,Cd)}}const YH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:KH,data:{}};var GH={left:"right",right:"left",bottom:"top",top:"bottom"};function wd(t){return t.replace(/left|right|bottom|top/g,function(e){return GH[e]})}var JH={start:"end",end:"start"};function ST(t){return t.replace(/start|end/g,function(e){return JH[e]})}function qm(t){var e=vr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Um(t){return Ca(wi(t)).left+qm(t).scrollLeft}function ZH(t,e){var n=vr(t),r=wi(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var u=hT();(u||!u&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+Um(t),y:l}}function XH(t){var e,n=wi(t),r=qm(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=gs(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=gs(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+Um(t),l=-r.scrollTop;return Uo(o||n).direction==="rtl"&&(a+=gs(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function Km(t){var e=Uo(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function CT(t){return["html","body","#document"].indexOf(Co(t))>=0?t.ownerDocument.body:$r(t)&&Km(t)?t:CT(Sd(t))}function oc(t,e){var n;e===void 0&&(e=[]);var r=CT(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=vr(r),s=o?[i].concat(i.visualViewport||[],Km(r)?r:[]):r,a=e.concat(s);return o?a:a.concat(oc(Sd(s)))}function Ym(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function QH(t,e){var n=Ca(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function wT(t,e,n){return e===uT?Ym(ZH(t,n)):ms(e)?QH(e,n):Ym(XH(wi(t)))}function ej(t){var e=oc(Sd(t)),n=["absolute","fixed"].indexOf(Uo(t).position)>=0,r=n&&$r(t)?nc(t):t;return ms(r)?e.filter(function(o){return ms(o)&&mT(o,r)&&Co(o)!=="body"}):[]}function tj(t,e,n,r){var o=e==="clippingParents"?ej(t):[].concat(e),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(l,u){var f=wT(t,u,r);return l.top=gs(f.top,l.top),l.right=xd(f.right,l.right),l.bottom=xd(f.bottom,l.bottom),l.left=gs(f.left,l.left),l},wT(t,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function TT(t){var e=t.reference,n=t.element,r=t.placement,o=r?wo(r):null,i=r?wa(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(o){case ir:l={x:s,y:e.y-n.height};break;case Nr:l={x:s,y:e.y+e.height};break;case Lr:l={x:e.x+e.width,y:a};break;case sr:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=o?Wm(o):null;if(u!=null){var f=u==="y"?"height":"width";switch(i){case xa:l[u]=l[u]-(e[f]/2-n[f]/2);break;case ec:l[u]=l[u]+(e[f]/2-n[f]/2);break}}return l}function ic(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,a=n.boundary,l=a===void 0?CH:a,u=n.rootBoundary,f=u===void 0?uT:u,h=n.elementContext,m=h===void 0?tc:h,g=n.altBoundary,b=g===void 0?!1:g,y=n.padding,S=y===void 0?0:y,C=bT(typeof S!="number"?S:vT(S,Ql)),E=m===tc?wH:tc,T=t.rects.popper,w=t.elements[b?E:m],O=tj(ms(w)?w:w.contextElement||wi(t.elements.popper),l,f,s),A=Ca(t.elements.reference),N=TT({reference:A,element:T,strategy:"absolute",placement:o}),D=Ym(Object.assign({},T,N)),L=m===tc?D:A,k={top:O.top-L.top+C.top,bottom:L.bottom-O.bottom+C.bottom,left:O.left-L.left+C.left,right:L.right-O.right+C.right},I=t.modifiersData.offset;if(m===tc&&I){var $=I[o];Object.keys(k).forEach(function(H){var z=[Lr,Nr].indexOf(H)>=0?1:-1,R=[ir,Nr].indexOf(H)>=0?"y":"x";k[H]+=$[R]*z})}return k}function nj(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?fT:l,f=wa(r),h=f?a?dT:dT.filter(function(b){return wa(b)===f}):Ql,m=h.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=h);var g=m.reduce(function(b,y){return b[y]=ic(t,{placement:y,boundary:o,rootBoundary:i,padding:s})[wo(y)],b},{});return Object.keys(g).sort(function(b,y){return g[b]-g[y]})}function rj(t){if(wo(t)===Vm)return[];var e=wd(t);return[ST(t),e,ST(e)]}function oj(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,f=n.boundary,h=n.rootBoundary,m=n.altBoundary,g=n.flipVariations,b=g===void 0?!0:g,y=n.allowedAutoPlacements,S=e.options.placement,C=wo(S),E=C===S,T=l||(E||!b?[wd(S)]:rj(S)),w=[S].concat(T).reduce(function(pe,re){return pe.concat(wo(re)===Vm?nj(e,{placement:re,boundary:f,rootBoundary:h,padding:u,flipVariations:b,allowedAutoPlacements:y}):re)},[]),O=e.rects.reference,A=e.rects.popper,N=new Map,D=!0,L=w[0],k=0;k<w.length;k++){var I=w[k],$=wo(I),H=wa(I)===xa,z=[ir,Nr].indexOf($)>=0,R=z?"width":"height",B=ic(e,{placement:I,boundary:f,rootBoundary:h,altBoundary:m,padding:u}),W=z?H?Lr:sr:H?Nr:ir;O[R]>A[R]&&(W=wd(W));var U=wd(W),G=[];if(i&&G.push(B[$]<=0),a&&G.push(B[W]<=0,B[U]<=0),G.every(function(pe){return pe})){L=I,D=!1;break}N.set(I,G)}if(D)for(var Y=b?3:1,Z=function(re){var ue=w.find(function(ae){var K=N.get(ae);if(K)return K.slice(0,re).every(function(Q){return Q})});if(ue)return L=ue,"break"},me=Y;me>0;me--){var fe=Z(me);if(fe==="break")break}e.placement!==L&&(e.modifiersData[r]._skip=!0,e.placement=L,e.reset=!0)}}const ij={name:"flip",enabled:!0,phase:"main",fn:oj,requiresIfExists:["offset"],data:{_skip:!1}};function ET(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function MT(t){return[ir,Lr,Nr,sr].some(function(e){return t[e]>=0})}function sj(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=ic(e,{elementContext:"reference"}),a=ic(e,{altBoundary:!0}),l=ET(s,r),u=ET(a,o,i),f=MT(l),h=MT(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const aj={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sj};function lj(t,e,n){var r=wo(t),o=[sr,ir].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[sr,Lr].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function cj(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=fT.reduce(function(f,h){return f[h]=lj(h,e.rects,i),f},{}),a=s[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const uj={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cj};function dj(t){var e=t.state,n=t.name;e.modifiersData[n]=TT({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const fj={name:"popperOffsets",enabled:!0,phase:"read",fn:dj,data:{}};function pj(t){return t==="x"?"y":"x"}function hj(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,f=n.altBoundary,h=n.padding,m=n.tether,g=m===void 0?!0:m,b=n.tetherOffset,y=b===void 0?0:b,S=ic(e,{boundary:l,rootBoundary:u,padding:h,altBoundary:f}),C=wo(e.placement),E=wa(e.placement),T=!E,w=Wm(C),O=pj(w),A=e.modifiersData.popperOffsets,N=e.rects.reference,D=e.rects.popper,L=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,k=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,$={x:0,y:0};if(A){if(i){var H,z=w==="y"?ir:sr,R=w==="y"?Nr:Lr,B=w==="y"?"height":"width",W=A[w],U=W+S[z],G=W-S[R],Y=g?-D[B]/2:0,Z=E===xa?N[B]:D[B],me=E===xa?-D[B]:-N[B],fe=e.elements.arrow,pe=g&&fe?jm(fe):{width:0,height:0},re=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:yT(),ue=re[z],ae=re[R],K=rc(0,N[B],pe[B]),Q=T?N[B]/2-Y-K-ue-k.mainAxis:Z-K-ue-k.mainAxis,ie=T?-N[B]/2+Y+K+ae+k.mainAxis:me+K+ae+k.mainAxis,he=e.elements.arrow&&nc(e.elements.arrow),ee=he?w==="y"?he.clientTop||0:he.clientLeft||0:0,se=(H=I==null?void 0:I[w])!=null?H:0,le=W+Q-se-ee,ge=W+ie-se,we=rc(g?xd(U,le):U,W,g?gs(G,ge):G);A[w]=we,$[w]=we-W}if(a){var xe,Oe=w==="x"?ir:sr,Le=w==="x"?Nr:Lr,He=A[O],Ge=O==="y"?"height":"width",De=He+S[Oe],lt=He-S[Le],St=[ir,sr].indexOf(C)!==-1,Zt=(xe=I==null?void 0:I[O])!=null?xe:0,vn=St?De:He-N[Ge]-D[Ge]-Zt+k.altAxis,cn=St?He+N[Ge]+D[Ge]-Zt-k.altAxis:lt,$t=g&&St?RH(vn,He,cn):rc(g?vn:De,He,g?cn:lt);A[O]=$t,$[O]=$t-He}e.modifiersData[r]=$}}const mj={name:"preventOverflow",enabled:!0,phase:"main",fn:hj,requiresIfExists:["offset"]};function gj(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function yj(t){return t===vr(t)||!$r(t)?qm(t):gj(t)}function bj(t){var e=t.getBoundingClientRect(),n=Sa(e.width)/t.offsetWidth||1,r=Sa(e.height)/t.offsetHeight||1;return n!==1||r!==1}function vj(t,e,n){n===void 0&&(n=!1);var r=$r(e),o=$r(e)&&bj(e),i=wi(e),s=Ca(t,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Co(e)!=="body"||Km(i))&&(a=yj(e)),$r(e)?(l=Ca(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=Um(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function xj(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&o(l)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function Sj(t){var e=xj(t);return _H.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function Cj(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function wj(t){var e=t.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(e).map(function(n){return e[n]})}var OT={placement:"bottom",modifiers:[],strategy:"absolute"};function kT(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Tj(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?OT:o;return function(a,l,u){u===void 0&&(u=i);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},OT,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},h=[],m=!1,g={state:f,setOptions:function(C){var E=typeof C=="function"?C(f.options):C;y(),f.options=Object.assign({},i,f.options,E),f.scrollParents={reference:ms(a)?oc(a):a.contextElement?oc(a.contextElement):[],popper:oc(l)};var T=Sj(wj([].concat(r,f.options.modifiers)));return f.orderedModifiers=T.filter(function(w){return w.enabled}),b(),g.update()},forceUpdate:function(){if(!m){var C=f.elements,E=C.reference,T=C.popper;if(kT(E,T)){f.rects={reference:vj(E,nc(T),f.options.strategy==="fixed"),popper:jm(T)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(k){return f.modifiersData[k.name]=Object.assign({},k.data)});for(var w=0;w<f.orderedModifiers.length;w++){if(f.reset===!0){f.reset=!1,w=-1;continue}var O=f.orderedModifiers[w],A=O.fn,N=O.options,D=N===void 0?{}:N,L=O.name;typeof A=="function"&&(f=A({state:f,options:D,name:L,instance:g})||f)}}}},update:Cj(function(){return new Promise(function(S){g.forceUpdate(),S(f)})}),destroy:function(){y(),m=!0}};if(!kT(a,l))return g;g.setOptions(u).then(function(S){!m&&u.onFirstUpdate&&u.onFirstUpdate(S)});function b(){f.orderedModifiers.forEach(function(S){var C=S.name,E=S.options,T=E===void 0?{}:E,w=S.effect;if(typeof w=="function"){var O=w({state:f,name:C,instance:g,options:T}),A=function(){};h.push(O||A)}})}function y(){h.forEach(function(S){return S()}),h=[]}return g}}var Ej=[YH,fj,UH,pT,uj,ij,mj,HH,aj],AT=Tj({defaultModifiers:Ej});function Mj(t){return Ue("MuiPopper",t)}We("MuiPopper",["root"]);function Oj(t,e){if(e==="ltr")return t;switch(t){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 t}}function Td(t){return typeof t=="function"?t():t}function Ed(t){return t.nodeType!==void 0}function kj(t){return!Ed(t)}const Aj=t=>{const{classes:e}=t;return qe({root:["root"]},Mj,e)},Ij={},Dj=_.forwardRef(function(e,n){const{anchorEl:r,children:o,direction:i,disablePortal:s,modifiers:a,open:l,placement:u,popperOptions:f,popperRef:h,slotProps:m={},slots:g={},TransitionProps:b,ownerState:y,...S}=e,C=_.useRef(null),E=Mt(C,n),T=_.useRef(null),w=Mt(T,h),O=_.useRef(w);wn(()=>{O.current=w},[w]),_.useImperativeHandle(h,()=>T.current,[]);const A=Oj(u,i),[N,D]=_.useState(A),[L,k]=_.useState(Td(r));_.useEffect(()=>{T.current&&T.current.forceUpdate()}),_.useEffect(()=>{r&&k(Td(r))},[r]),wn(()=>{if(!L||!l)return;const R=U=>{D(U.placement)};if(process.env.NODE_ENV!=="production"&&L&&Ed(L)&&L.nodeType===1){const U=L.getBoundingClientRect();process.env.NODE_ENV!=="test"&&U.top===0&&U.left===0&&U.right===0&&U.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
230
+ `))}let B=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:U})=>{R(U)}}];a!=null&&(B=B.concat(a)),f&&f.modifiers!=null&&(B=B.concat(f.modifiers));const W=AT(L,C.current,{placement:A,...f,modifiers:B});return O.current(W),()=>{W.destroy(),O.current(null)}},[L,s,a,l,f,A]);const I={placement:N};b!==null&&(I.TransitionProps=b);const $=Aj(e),H=g.root??"div",z=Ct({elementType:H,externalSlotProps:m.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:E},ownerState:e,className:$.root});return v.jsx(H,{...z,children:typeof o=="function"?o(I):o})}),IT=_.forwardRef(function(e,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:u,open:f,placement:h="bottom",popperOptions:m=Ij,popperRef:g,style:b,transition:y=!1,slotProps:S={},slots:C={},...E}=e,[T,w]=_.useState(!0),O=()=>{w(!1)},A=()=>{w(!0)};if(!l&&!f&&(!y||T))return null;let N;if(i)N=i;else if(r){const k=Td(r);N=k&&Ed(k)?Bn(k).body:Bn(null).body}const D=!f&&l&&(!y||T)?"none":void 0,L=y?{in:f,onEnter:O,onExited:A}:void 0;return v.jsx(Wl,{disablePortal:a,container:N,children:v.jsx(Dj,{anchorEl:r,direction:s,disablePortal:a,modifiers:u,ref:n,open:y?!T:f,placement:h,popperOptions:m,popperRef:g,slotProps:S,slots:C,...E,style:{position:"fixed",top:0,left:0,display:D,...b},TransitionProps:L,children:o})})});process.env.NODE_ENV!=="production"&&(IT.propTypes={anchorEl:Fo(c.oneOfType([Ro,c.object,c.func]),t=>{if(t.open){const e=Td(t.anchorEl);if(e&&Ed(e)&&e.nodeType===1){const n=e.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
231
+ `))}else if(!e||typeof e.getBoundingClientRect!="function"||kj(e)&&e.contextElement!=null&&e.contextElement.nodeType!==1)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
232
+ `))}return null}),children:c.oneOfType([c.node,c.func]),container:c.oneOfType([Ro,c.func]),direction:c.oneOf(["ltr","rtl"]),disablePortal:c.bool,keepMounted:c.bool,modifiers:c.arrayOf(c.shape({data:c.object,effect:c.func,enabled:c.bool,fn:c.func,name:c.any,options:c.object,phase:c.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:c.arrayOf(c.string),requiresIfExists:c.arrayOf(c.string)})),open:c.bool.isRequired,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:c.shape({modifiers:c.array,onFirstUpdate:c.func,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:c.oneOf(["absolute","fixed"])}),popperRef:hn,slotProps:c.shape({root:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType}),transition:c.bool});const Pj=ye(IT,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),DT=_.forwardRef(function(e,n){const r=eo(),o=xt({props:e,name:"MuiPopper"}),{anchorEl:i,component:s,components:a,componentsProps:l,container:u,disablePortal:f,keepMounted:h,modifiers:m,open:g,placement:b,popperOptions:y,popperRef:S,transition:C,slots:E,slotProps:T,...w}=o,O=(E==null?void 0:E.root)??(a==null?void 0:a.Root),A={anchorEl:i,container:u,disablePortal:f,keepMounted:h,modifiers:m,open:g,placement:b,popperOptions:y,popperRef:S,transition:C,...w};return v.jsx(Pj,{as:s,direction:r?"rtl":"ltr",slots:{root:O},slotProps:T??l,...A,ref:n})});process.env.NODE_ENV!=="production"&&(DT.propTypes={anchorEl:c.oneOfType([Ro,c.object,c.func]),children:c.oneOfType([c.node,c.func]),component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([Ro,c.func]),disablePortal:c.bool,keepMounted:c.bool,modifiers:c.arrayOf(c.shape({data:c.object,effect:c.func,enabled:c.bool,fn:c.func,name:c.any,options:c.object,phase:c.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:c.arrayOf(c.string),requiresIfExists:c.arrayOf(c.string)})),open:c.bool.isRequired,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:c.shape({modifiers:c.array,onFirstUpdate:c.func,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:c.oneOf(["absolute","fixed"])}),popperRef:hn,slotProps:c.shape({root:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),transition:c.bool});function _j(t){return Ue("MuiPickersPopper",t)}We("MuiPickersPopper",["root","paper"]);const Nj="@media (prefers-reduced-motion: reduce)",Ta=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),PT=Ta&&Ta[1]?parseInt(Ta[1],10):null,_T=Ta&&Ta[2]?parseInt(Ta[2],10):null,Lj=PT&&PT<10||_T&&_T<13||!1,NT=()=>aT(Nj,{defaultMatches:!1})||Lj,$j=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],Fj=t=>{const{classes:e}=t;return qe({root:["root"],paper:["paper"]},_j,e)},Rj=ye(DT,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({zIndex:t.zIndex.modal})),Bj=ye(ha,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(t,e)=>e.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:t})=>["top","top-start","top-end"].includes(t),style:{transformOrigin:"bottom center"}}]});function Vj(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function zj(t,e){const n=_.useRef(!1),r=_.useRef(!1),o=_.useRef(null),i=_.useRef(!1);_.useEffect(()=>{if(!t)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[t]);const s=Fe(l=>{if(!i.current)return;const u=r.current;r.current=!1;const f=Bn(o.current);if(!o.current||"clientX"in l&&Vj(l,f))return;if(n.current){n.current=!1;return}let h;l.composedPath?h=l.composedPath().indexOf(o.current)>-1:h=!f.documentElement.contains(l.target)||o.current.contains(l.target),!h&&!u&&e(l)}),a=()=>{r.current=!0};return _.useEffect(()=>{if(t){const l=Bn(o.current),u=()=>{n.current=!0};return l.addEventListener("touchstart",s),l.addEventListener("touchmove",u),()=>{l.removeEventListener("touchstart",s),l.removeEventListener("touchmove",u)}}},[t,s]),_.useEffect(()=>{if(t){const l=Bn(o.current);return l.addEventListener("click",s),()=>{l.removeEventListener("click",s),r.current=!1}}},[t,s]),[o,a,a]}const Hj=_.forwardRef((t,e)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:s,paperClasses:a,onPaperClick:l,onPaperTouchStart:u}=t,f=nt(t,$j),h=te({},o,{placement:r}),m=Ct({elementType:n,externalSlotProps:s,additionalProps:{tabIndex:-1,elevation:8,ref:e},className:a,ownerState:h});return v.jsx(n,te({},f,m,{onClick:g=>{var b;l(g),(b=m.onClick)==null||b.call(m,g)},onTouchStart:g=>{var b;u(g),(b=m.onTouchStart)==null||b.call(m,g)},ownerState:h,children:i}))});function jj(t){const e=jt({props:t,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:s,onDismiss:a,open:l,role:u,placement:f,slots:h,slotProps:m,reduceAnimations:g}=e;_.useEffect(()=>{function R(B){l&&B.key==="Escape"&&a()}return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R)}},[a,l]);const b=_.useRef(null);_.useEffect(()=>{u==="tooltip"||i&&!i()||(l?b.current=br(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[l,u,i]);const[y,S,C]=zj(l,s??a),E=_.useRef(null),T=Mt(E,o),w=Mt(T,y),O=e,A=Fj(O),N=NT(),D=g??N,L=R=>{R.key==="Escape"&&(R.stopPropagation(),a())},k=(h==null?void 0:h.desktopTransition)??D?xi:zl,I=(h==null?void 0:h.desktopTrapFocus)??jl,$=(h==null?void 0:h.desktopPaper)??Bj,H=(h==null?void 0:h.popper)??Rj,z=Ct({elementType:H,externalSlotProps:m==null?void 0:m.popper,additionalProps:{transition:!0,role:u,open:l,anchorEl:n,placement:f,onKeyDown:L},className:A.root,ownerState:e});return v.jsx(H,te({},z,{children:({TransitionProps:R,placement:B})=>v.jsx(I,te({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},m==null?void 0:m.desktopTrapFocus,{children:v.jsx(k,te({},R,m==null?void 0:m.desktopTransition,{children:v.jsx(Hj,{PaperComponent:$,ownerState:O,popperPlacement:B,ref:w,onPaperClick:S,onPaperTouchStart:C,paperClasses:A.paper,paperSlotProps:m==null?void 0:m.desktopPaper,children:r})}))}))}))}const Wj=({open:t,onOpen:e,onClose:n})=>{const r=_.useRef(typeof t=="boolean").current,[o,i]=_.useState(!1);_.useEffect(()=>{if(r){if(typeof t!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(t)}},[r,t]);const s=_.useCallback(a=>{r||i(a),a&&e&&e(),!a&&n&&n()},[r,e,n]);return{isOpen:o,setIsOpen:s}},qj=t=>{const{action:e,hasChanged:n,dateState:r,isControlled:o}=t,i=!o&&!r.hasBeenModifiedSinceMount;return e.name==="setValueFromField"?!0:e.name==="setValueFromAction"?i&&["accept","today","clear"].includes(e.pickerAction)?!0:n(r.lastPublishedValue):e.name==="setValueFromView"&&e.selectionState!=="shallow"||e.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},Uj=t=>{const{action:e,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=t,s=!o&&!r.hasBeenModifiedSinceMount;return e.name==="setValueFromAction"?s&&["accept","today","clear"].includes(e.pickerAction)?!0:n(r.lastCommittedValue):e.name==="setValueFromView"&&e.selectionState==="finish"&&i?s?!0:n(r.lastCommittedValue):e.name==="setValueFromShortcut"?e.changeImportance==="accept"&&n(r.lastCommittedValue):!1},Kj=t=>{const{action:e,closeOnSelect:n}=t;return e.name==="setValueFromAction"?!0:e.name==="setValueFromView"?e.selectionState==="finish"&&n:e.name==="setValueFromShortcut"?e.changeImportance==="accept":!1},Yj=({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:s,value:a,defaultValue:l,closeOnSelect:u=r==="desktop",timezone:f,referenceDate:h}=t,{current:m}=_.useRef(l),{current:g}=_.useRef(a!==void 0),[b,y]=_.useState(f);process.env.NODE_ENV!=="production"&&(_.useEffect(()=>{g!==(a!==void 0)&&console.error([`MUI X: A component is changing the ${g?"":"un"}controlled value of a picker to be ${g?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).","Decide between using a controlled or uncontrolled valuefor the lifetime of the component.","The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
233
+ `))},[a]),_.useEffect(()=>{!g&&m!==l&&console.error(["MUI X: A component is changing the defaultValue of an uncontrolled picker after being initialized. To suppress this warning opt to use a controlled value."].join(`
234
+ `))},[JSON.stringify(m)]));const S=Wt(),C=ps(),{isOpen:E,setIsOpen:T}=Wj(t),{timezone:w,value:O,handleValueChange:A}=Am({timezone:f,value:a,defaultValue:m,referenceDate:h,onChange:s,valueManager:e}),[N,D]=_.useState(()=>{let Q;return O!==void 0?Q=O:m!==void 0?Q=m:Q=e.emptyValue,{draft:Q,lastPublishedValue:Q,lastCommittedValue:Q,lastControlledValue:a,hasBeenModifiedSinceMount:!1}}),L=e.getTimezone(S,N.draft);b!==f&&(y(f),f&&L&&f!==L&&D(Q=>te({},Q,{draft:e.setTimezone(S,f,Q.draft)})));const{getValidationErrorForNewValue:k}=jw({props:t,validator:o,timezone:w,value:N.draft,onError:t.onError}),I=Fe(Q=>{const ie={action:Q,dateState:N,hasChanged:we=>!e.areValuesEqual(S,Q.value,we),isControlled:g,closeOnSelect:u},he=qj(ie),ee=Uj(ie),se=Kj(ie);D(we=>te({},we,{draft:Q.value,lastPublishedValue:he?Q.value:we.lastPublishedValue,lastCommittedValue:ee?Q.value:we.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let le=null;const ge=()=>(le||(le={validationError:Q.name==="setValueFromField"?Q.context.validationError:k(Q.value)},Q.name==="setValueFromShortcut"&&(le.shortcut=Q.shortcut)),le);he&&A(Q.value,ge()),ee&&i&&i(Q.value,ge()),se&&T(!1)});if(N.lastControlledValue!==a){const Q=e.areValuesEqual(S,N.draft,O);D(ie=>te({},ie,{lastControlledValue:a},Q?{}:{lastCommittedValue:O,lastPublishedValue:O,draft:O,hasBeenModifiedSinceMount:!0}))}const $=Fe(()=>{I({value:e.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),H=Fe(()=>{I({value:N.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),z=Fe(()=>{I({value:N.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),R=Fe(()=>{I({value:N.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),B=Fe(()=>{I({value:e.getTodayValue(S,w,n),name:"setValueFromAction",pickerAction:"today"})}),W=Fe(Q=>{Q.preventDefault(),T(!0)}),U=Fe(Q=>{Q==null||Q.preventDefault(),T(!1)}),G=Fe((Q,ie="partial")=>I({name:"setValueFromView",value:Q,selectionState:ie})),Y=Fe((Q,ie,he)=>I({name:"setValueFromShortcut",value:Q,changeImportance:ie,shortcut:he})),Z=Fe((Q,ie)=>I({name:"setValueFromField",value:Q,context:ie})),me={onClear:$,onAccept:H,onDismiss:z,onCancel:R,onSetToday:B,onOpen:W,onClose:U},fe={value:N.draft,onChange:Z},pe=_.useMemo(()=>e.cleanValue(S,N.draft),[S,e,N.draft]),re={value:pe,onChange:G,onClose:U,open:E},ae=te({},me,{value:pe,onChange:G,onSelectShortcut:Y,isValid:Q=>{const ie=o({adapter:C,value:Q,timezone:w,props:t});return!e.hasError(ie)}}),K=_.useMemo(()=>({onOpen:W,onClose:U,open:E}),[E,U,W]);return{open:E,fieldProps:fe,viewProps:re,layoutProps:ae,actions:me,contextValue:K}};let Gm=!1;function LT({onChange:t,onViewChange:e,openTo:n,view:r,views:o,autoFocus:i,focusedView:s,onFocusedViewChange:a}){process.env.NODE_ENV!=="production"&&(Gm||(r!=null&&!o.includes(r)&&(console.warn(`MUI X: \`view="${r}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),Gm=!0),r==null&&n!=null&&!o.includes(n)&&(console.warn(`MUI X: \`openTo="${n}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),Gm=!0)));const l=_.useRef(n),u=_.useRef(o),f=_.useRef(o.includes(n)?n:o[0]),[h,m]=Vo({name:"useViews",state:"view",controlled:r,default:f.current}),g=_.useRef(i?h:null),[b,y]=Vo({name:"useViews",state:"focusedView",controlled:s,default:g.current});_.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(N=>!o.includes(N)))&&(m(o.includes(n)?n:o[0]),u.current=o,l.current=n)},[n,m,h,o]);const S=o.indexOf(h),C=o[S-1]??null,E=o[S+1]??null,T=Fe((N,D)=>{y(D?N:L=>N===L?null:L),a==null||a(N,D)}),w=Fe(N=>{T(N,!0),N!==h&&(m(N),e&&e(N))}),O=Fe(()=>{E&&w(E)}),A=Fe((N,D,L)=>{const k=D==="finish",I=L?o.indexOf(L)<o.length-1:!!E;if(t(N,k&&I?"partial":D,L),L&&L!==h){const H=o[o.indexOf(L)+1];H&&w(H)}else k&&O()});return{view:h,setView:w,focusedView:b,setFocusedView:T,nextView:E,previousView:C,defaultView:o.includes(n)?n:o[0],goToNextView:O,setValueAndGoToNextView:A}}const Gj=["className","sx"],Jj=({props:t,propsFromPickerValue:e,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:s,open:a,onClose:l}=e,{view:u,views:f,openTo:h,onViewChange:m,viewRenderers:g,timezone:b}=t,y=nt(t,Gj),{view:S,setView:C,defaultView:E,focusedView:T,setFocusedView:w,setValueAndGoToNextView:O}=LT({view:u,views:f,openTo:h,onChange:s,onViewChange:m,autoFocus:r}),{hasUIView:A,viewModeLookup:N}=_.useMemo(()=>f.reduce((z,R)=>{let B;return g[R]!=null?B="UI":B="field",z.viewModeLookup[R]=B,B==="UI"&&(z.hasUIView=!0),z},{hasUIView:!1,viewModeLookup:{}}),[g,f]),D=_.useMemo(()=>f.reduce((z,R)=>g[R]!=null&&qV(R)?z+1:z,0),[g,f]),L=N[S],k=Fe(()=>L==="UI"),[I,$]=_.useState(L==="UI"?S:null);return I!==S&&N[S]==="UI"&&$(S),wn(()=>{L==="field"&&a&&(l(),setTimeout(()=>{var z,R;(z=i==null?void 0:i.current)==null||z.setSelectedSections(S),(R=i==null?void 0:i.current)==null||R.focusField(S)}))},[S]),wn(()=>{if(!a)return;let z=S;L==="field"&&I!=null&&(z=I),z!==E&&N[z]==="UI"&&N[E]==="UI"&&(z=E),z!==S&&C(z),w(z,!0)},[a]),{hasUIView:A,shouldRestoreFocus:k,layoutProps:{views:f,view:I,onViewChange:C},renderCurrentView:()=>{if(I==null)return null;const z=g[I];if(z==null)return null;const R=te({},y,n,e,{views:f,timezone:b,onChange:O,view:I,onViewChange:C,focusedView:T,onFocusedViewChange:w,showViewSwitcher:D>1,timeViewsCount:D});return o?o(g,I,R):z(R)}}};function $T(){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 Zj=(t,e)=>{const[n,r]=_.useState($T);return wn(()=>{const i=()=>{r($T())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),Tz(t,["hours","minutes","seconds"])?!1:(e||n)==="landscape"},Xj=({props:t,propsFromPickerValue:e,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=t,i=Zj(n.views,o),s=eo();return{layoutProps:te({},n,e,{isLandscape:i,isRtl:s,wrapperVariant:r,disabled:t.disabled,readOnly:t.readOnly})}};function Qj(t){const{props:e,pickerValueResponse:n}=t;return _.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:e.disabled??!1,readOnly:e.readOnly??!1}),[n.viewProps.value,n.open,e.disabled,e.readOnly])}const FT=({props:t,valueManager:e,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:s,rendererInterceptor:a,fieldRef:l})=>{process.env.NODE_ENV!=="production"&&t.renderInput!=null&&HC(["MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const u=Yj({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:i}),f=Jj({props:t,additionalViewProps:o,autoFocusView:s,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:a}),h=Xj({props:t,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:f.layoutProps}),m=Qj({props:t,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:f.renderCurrentView,hasUIView:f.hasUIView,shouldRestoreFocus:f.shouldRestoreFocus,layoutProps:h.layoutProps,contextValue:u.contextValue,ownerState:m}};function RT(t){return Ue("MuiPickersLayout",t)}const ys=We("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]);function e6(t){return Ue("MuiButton",t)}const bs=We("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"]),BT=_.createContext({});process.env.NODE_ENV!=="production"&&(BT.displayName="ButtonGroupContext");const VT=_.createContext(void 0);process.env.NODE_ENV!=="production"&&(VT.displayName="ButtonGroupButtonContext");const t6=t=>{const{color:e,disableElevation:n,fullWidth:r,size:o,variant:i,loading:s,loadingPosition:a,classes:l}=t,u={root:["root",s&&"loading",i,`${i}${Ae(e)}`,`size${Ae(o)}`,`${i}Size${Ae(o)}`,`color${Ae(e)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${Ae(a)}`],startIcon:["icon","startIcon",`iconSize${Ae(o)}`],endIcon:["icon","endIcon",`iconSize${Ae(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},f=qe(u,e6,l);return{...l,...f}},zT=[{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}}}],n6=ye(ya,{shouldForwardProp:t=>to(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Ae(n.color)}`],e[`size${Ae(n.size)}`],e[`${n.variant}Size${Ae(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(Dt(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],n=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${bs.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${bs.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${bs.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).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)",[`&.${bs.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(Vn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(t.vars||t).palette[r].main,"--variant-outlinedColor":(t.vars||t).palette[r].main,"--variant-outlinedBorder":t.vars?`rgba(${t.vars.palette[r].mainChannel} / 0.5)`:Rt(t.palette[r].main,.5),"--variant-containedColor":(t.vars||t).palette[r].contrastText,"--variant-containedBg":(t.vars||t).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[r].dark,"--variant-textBg":t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette[r].main,t.palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[r].main,"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette[r].main,t.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette.text.primary,t.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${bs.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${bs.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${bs.loading}`]:{color:"transparent"}}}]}})),r6=ye("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${Ae(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...zT]})),o6=ye("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${Ae(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...zT]})),i6=ye("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({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:(t.vars||t).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}}]})),HT=ye("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(t,e)=>e.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),sc=_.forwardRef(function(e,n){const r=_.useContext(BT),o=_.useContext(VT),i=vl(r,e),s=xt({props:i,name:"MuiButton"}),{children:a,color:l="primary",component:u="button",className:f,disabled:h=!1,disableElevation:m=!1,disableFocusRipple:g=!1,endIcon:b,focusVisibleClassName:y,fullWidth:S=!1,id:C,loading:E=null,loadingIndicator:T,loadingPosition:w="center",size:O="medium",startIcon:A,type:N,variant:D="text",...L}=s,k=yo(C),I=T??v.jsx(Nm,{"aria-labelledby":k,color:"inherit",size:16}),$={...s,color:l,component:u,disabled:h,disableElevation:m,disableFocusRipple:g,fullWidth:S,loading:E,loadingIndicator:I,loadingPosition:w,size:O,type:N,variant:D},H=t6($),z=(A||E&&w==="start")&&v.jsx(r6,{className:H.startIcon,ownerState:$,children:A||v.jsx(HT,{className:H.loadingIconPlaceholder,ownerState:$})}),R=(b||E&&w==="end")&&v.jsx(o6,{className:H.endIcon,ownerState:$,children:b||v.jsx(HT,{className:H.loadingIconPlaceholder,ownerState:$})}),B=o||"",W=typeof E=="boolean"?v.jsx("span",{className:H.loadingWrapper,style:{display:"contents"},children:E&&v.jsx(i6,{className:H.loadingIndicator,ownerState:$,children:I})}):null;return v.jsxs(n6,{ownerState:$,className:_e(r.className,H.root,f,B),component:u,disabled:h||E,focusRipple:!g,focusVisibleClassName:_e(H.focusVisible,y),ref:n,type:N,id:E?k:C,...L,classes:H,children:[z,w!=="end"&&W,a,w==="end"&&W,R]})});process.env.NODE_ENV!=="production"&&(sc.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","success","error","info","warning"]),c.string]),component:c.elementType,disabled:c.bool,disableElevation:c.bool,disableFocusRipple:c.bool,disableRipple:c.bool,endIcon:c.node,focusVisibleClassName:c.string,fullWidth:c.bool,href:c.string,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:c.oneOf(["center","end","start"]),size:c.oneOfType([c.oneOf(["small","medium","large"]),c.string]),startIcon:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.oneOfType([c.oneOf(["button","reset","submit"]),c.string]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});function s6(t){return Ue("MuiDialogActions",t)}We("MuiDialogActions",["root","spacing"]);const a6=t=>{const{classes:e,disableSpacing:n}=t;return qe({root:["root",!n&&"spacing"]},s6,e)},l6=ye("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:t})=>!t.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),jT=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...s}=r,a={...r,disableSpacing:i},l=a6(a);return v.jsx(l6,{className:_e(l.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(jT.propTypes={children:c.node,classes:c.object,className:c.string,disableSpacing:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const c6=["onAccept","onClear","onCancel","onSetToday","actions"];function WT(t){const{onAccept:e,onClear:n,onCancel:r,onSetToday:o,actions:i}=t,s=nt(t,c6),a=Wo();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(u=>{switch(u){case"clear":return v.jsx(sc,{onClick:n,children:a.clearButtonLabel},u);case"cancel":return v.jsx(sc,{onClick:r,children:a.cancelButtonLabel},u);case"accept":return v.jsx(sc,{onClick:e,children:a.okButtonLabel},u);case"today":return v.jsx(sc,{onClick:o,children:a.todayButtonLabel},u);default:return null}});return v.jsx(jT,te({},s,{children:l}))}process.env.NODE_ENV!=="production"&&(WT.propTypes={actions:c.arrayOf(c.oneOf(["accept","cancel","clear","today"]).isRequired),disableSpacing:c.bool,onAccept:c.func.isRequired,onCancel:c.func.isRequired,onClear:c.func.isRequired,onSetToday:c.func.isRequired,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function u6(t){return Ue("MuiListItem",t)}We("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const d6=We("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function f6(t){return Ue("MuiListItemSecondaryAction",t)}We("MuiListItemSecondaryAction",["root","disableGutters"]);const p6=t=>{const{disableGutters:e,classes:n}=t;return qe({root:["root",e&&"disableGutters"]},f6,n)},h6=ye("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:t})=>t.disableGutters,style:{right:0}}]}),Jm=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,s=_.useContext(da),a={...r,disableGutters:s.disableGutters},l=p6(a);return v.jsx(h6,{className:_e(l.root,o),ownerState:a,ref:n,...i})});process.env.NODE_ENV!=="production"&&(Jm.propTypes={children:c.node,classes:c.object,className:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])}),Jm.muiName="ListItemSecondaryAction";const m6=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.hasSecondaryAction&&e.secondaryAction]},g6=t=>{const{alignItems:e,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:s,hasSecondaryAction:a}=t;return qe({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",s&&"divider",e==="flex-start"&&"alignItemsFlexStart",a&&"secondaryAction"],container:["container"]},u6,n)},y6=ye("div",{name:"MuiListItem",slot:"Root",overridesResolver:m6})(Dt(({theme:t})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${d6.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),b6=ye("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),qT=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiListItem"}),{alignItems:o="center",children:i,className:s,component:a,components:l={},componentsProps:u={},ContainerComponent:f="li",ContainerProps:{className:h,...m}={},dense:g=!1,disableGutters:b=!1,disablePadding:y=!1,divider:S=!1,secondaryAction:C,slotProps:E={},slots:T={},...w}=r,O=_.useContext(da),A=_.useMemo(()=>({dense:g||O.dense||!1,alignItems:o,disableGutters:b}),[o,O.dense,g,b]),N=_.useRef(null),D=_.Children.toArray(i),L=D.length&&bl(D[D.length-1],["ListItemSecondaryAction"]),k={...r,alignItems:o,dense:A.dense,disableGutters:b,disablePadding:y,divider:S,hasSecondaryAction:L},I=g6(k),$=Mt(N,n),H=T.root||l.Root||y6,z=E.root||u.root||{},R={className:_e(I.root,z.className,s),...w};let B=a||"li";return L?(B=!R.component&&!a?"div":B,f==="li"&&(B==="li"?B="div":R.component==="li"&&(R.component="div")),v.jsx(da.Provider,{value:A,children:v.jsxs(b6,{as:f,className:_e(I.container,h),ref:$,ownerState:k,...m,children:[v.jsx(H,{...z,...!Nl(H)&&{as:B,ownerState:{...k,...z.ownerState}},...R,children:D}),D.pop()]})})):v.jsx(da.Provider,{value:A,children:v.jsxs(H,{...z,as:B,ref:$,...!Nl(H)&&{ownerState:{...k,...z.ownerState}},...R,children:[D,C&&v.jsx(Jm,{children:C})]})})});process.env.NODE_ENV!=="production"&&(qT.propTypes={alignItems:c.oneOf(["center","flex-start"]),children:Fo(c.node,t=>{const e=_.Children.toArray(t.children);let n=-1;for(let r=e.length-1;r>=0;r-=1){const o=e[r];if(bl(o,["ListItemSecondaryAction"])){n=r;break}}return n!==-1&&n!==e.length-1?new Error("MUI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem."):null}),classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),ContainerComponent:wu,ContainerProps:c.object,dense:c.bool,disableGutters:c.bool,disablePadding:c.bool,divider:c.bool,secondaryAction:c.node,slotProps:c.shape({root:c.object}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const v6=Be(v.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"}),"Cancel");function x6(t){return Ue("MuiChip",t)}const ft=We("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"]),S6=t=>{const{classes:e,disabled:n,size:r,color:o,iconColor:i,onDelete:s,clickable:a,variant:l}=t,u={root:["root",l,n&&"disabled",`size${Ae(r)}`,`color${Ae(o)}`,a&&"clickable",a&&`clickableColor${Ae(o)}`,s&&"deletable",s&&`deletableColor${Ae(o)}`,`${l}${Ae(o)}`],label:["label",`label${Ae(r)}`],avatar:["avatar",`avatar${Ae(r)}`,`avatarColor${Ae(o)}`],icon:["icon",`icon${Ae(r)}`,`iconColor${Ae(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Ae(r)}`,`deleteIconColor${Ae(o)}`,`deleteIcon${Ae(l)}Color${Ae(o)}`]};return qe(u,x6,e)},C6=ye("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:r,iconColor:o,clickable:i,onDelete:s,size:a,variant:l}=n;return[{[`& .${ft.avatar}`]:e.avatar},{[`& .${ft.avatar}`]:e[`avatar${Ae(a)}`]},{[`& .${ft.avatar}`]:e[`avatarColor${Ae(r)}`]},{[`& .${ft.icon}`]:e.icon},{[`& .${ft.icon}`]:e[`icon${Ae(a)}`]},{[`& .${ft.icon}`]:e[`iconColor${Ae(o)}`]},{[`& .${ft.deleteIcon}`]:e.deleteIcon},{[`& .${ft.deleteIcon}`]:e[`deleteIcon${Ae(a)}`]},{[`& .${ft.deleteIcon}`]:e[`deleteIconColor${Ae(r)}`]},{[`& .${ft.deleteIcon}`]:e[`deleteIcon${Ae(l)}Color${Ae(r)}`]},e.root,e[`size${Ae(a)}`],e[`color${Ae(r)}`],i&&e.clickable,i&&r!=="default"&&e[`clickableColor${Ae(r)})`],s&&e.deletable,s&&r!=="default"&&e[`deletableColor${Ae(r)}`],e[l],e[`${l}${Ae(r)}`]]}})(Dt(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return{maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${ft.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${ft.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:e,fontSize:t.typography.pxToRem(12)},[`& .${ft.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${ft.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${ft.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${ft.icon}`]:{marginLeft:5,marginRight:-6},[`& .${ft.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:Rt(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:Rt(t.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${ft.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${ft.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(t.palette).filter(Vn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main,color:(t.vars||t).palette[n].contrastText,[`& .${ft.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].contrastTextChannel} / 0.7)`:Rt(t.palette[n].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${ft.icon}`]:{color:t.vars?t.vars.palette.Chip.defaultIconColor:e}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${ft.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${ft.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Rt(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}},...Object.entries(t.palette).filter(Vn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${ft.focusVisible}`]:{background:(t.vars||t).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Rt(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${ft.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Rt(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}}},...Object.entries(t.palette).filter(Vn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${ft.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${ft.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${ft.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${ft.avatar}`]:{marginLeft:4},[`& .${ft.avatarSmall}`]:{marginLeft:2},[`& .${ft.icon}`]:{marginLeft:4},[`& .${ft.iconSmall}`]:{marginLeft:2},[`& .${ft.deleteIcon}`]:{marginRight:5},[`& .${ft.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(t.palette).filter(Vn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(t.vars||t).palette[n].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.7)`:Rt(t.palette[n].main,.7)}`,[`&.${ft.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette[n].main,t.palette.action.hoverOpacity)},[`&.${ft.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.focusOpacity})`:Rt(t.palette[n].main,t.palette.action.focusOpacity)},[`& .${ft.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.7)`:Rt(t.palette[n].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].main}}}}))]}})),w6=ye("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:r}=n;return[e.label,e[`label${Ae(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 UT(t){return t.key==="Backspace"||t.key==="Delete"}const KT=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiChip"}),{avatar:o,className:i,clickable:s,color:a="default",component:l,deleteIcon:u,disabled:f=!1,icon:h,label:m,onClick:g,onDelete:b,onKeyDown:y,onKeyUp:S,size:C="medium",variant:E="filled",tabIndex:T,skipFocusWhenDisabled:w=!1,...O}=r,A=_.useRef(null),N=Mt(A,n),D=G=>{G.stopPropagation(),b&&b(G)},L=G=>{G.currentTarget===G.target&&UT(G)&&G.preventDefault(),y&&y(G)},k=G=>{G.currentTarget===G.target&&b&&UT(G)&&b(G),S&&S(G)},I=s!==!1&&g?!0:s,$=I||b?ya:l||"div",H={...r,component:$,disabled:f,size:C,color:a,iconColor:_.isValidElement(h)&&h.props.color||a,onDelete:!!b,clickable:I,variant:E},z=S6(H),R=$===ya?{component:l||"div",focusVisibleClassName:z.focusVisible,...b&&{disableRipple:!0}}:{};let B=null;b&&(B=u&&_.isValidElement(u)?_.cloneElement(u,{className:_e(u.props.className,z.deleteIcon),onClick:D}):v.jsx(v6,{className:_e(z.deleteIcon),onClick:D}));let W=null;o&&_.isValidElement(o)&&(W=_.cloneElement(o,{className:_e(z.avatar,o.props.className)}));let U=null;return h&&_.isValidElement(h)&&(U=_.cloneElement(h,{className:_e(z.icon,h.props.className)})),process.env.NODE_ENV!=="production"&&W&&U&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."),v.jsxs(C6,{as:$,className:_e(z.root,i),disabled:I&&f?!0:void 0,onClick:g,onKeyDown:L,onKeyUp:k,ref:N,tabIndex:w&&f?-1:T,ownerState:H,...R,...O,children:[W||U,v.jsx(w6,{className:_e(z.label),ownerState:H,children:m}),B]})});process.env.NODE_ENV!=="production"&&(KT.propTypes={avatar:c.element,children:w$,classes:c.object,className:c.string,clickable:c.bool,color:c.oneOfType([c.oneOf(["default","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,deleteIcon:c.element,disabled:c.bool,icon:c.element,label:c.node,onClick:c.func,onDelete:c.func,onKeyDown:c.func,onKeyUp:c.func,size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),skipFocusWhenDisabled:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,variant:c.oneOfType([c.oneOf(["filled","outlined"]),c.string])});const ac=36,Md=2,Od=320,T6=280,Zm=336,E6=["items","changeImportance","isLandscape","onChange","isValid"],M6=["getValue"];function YT(t){const{items:e,changeImportance:n="accept",onChange:r,isValid:o}=t,i=nt(t,E6);if(e==null||e.length===0)return null;const s=e.map(a=>{let{getValue:l}=a,u=nt(a,M6);const f=l({isValid:o});return te({},u,{label:u.label,onClick:()=>{r(f,n,u)},disabled:!o(f)})});return v.jsx(am,te({dense:!0,sx:[{maxHeight:Zm,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:s.map(a=>v.jsx(qT,{children:v.jsx(KT,te({},a))},a.id??a.label))}))}process.env.NODE_ENV!=="production"&&(YT.propTypes={changeImportance:c.oneOf(["accept","set"]),className:c.string,component:c.elementType,dense:c.bool,disablePadding:c.bool,isLandscape:c.bool.isRequired,isValid:c.func.isRequired,items:c.arrayOf(c.shape({getValue:c.func.isRequired,id:c.string,label:c.string.isRequired})),onChange:c.func.isRequired,style:c.object,subheader:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function O6(t){return t.view!==null}const k6=t=>{const{classes:e,isLandscape:n}=t;return qe({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},RT,e)},A6=t=>{const{wrapperVariant:e,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:s,views:a,onViewChange:l,value:u,onChange:f,onSelectShortcut:h,isValid:m,isLandscape:g,disabled:b,readOnly:y,children:S,slots:C,slotProps:E}=t,T=k6(t),w=(C==null?void 0:C.actionBar)??WT,O=Ct({elementType:w,externalSlotProps:E==null?void 0:E.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:e==="desktop"?[]:["cancel","accept"]},className:T.actionBar,ownerState:te({},t,{wrapperVariant:e})}),A=v.jsx(w,te({},O)),N=C==null?void 0:C.toolbar,D=Ct({elementType:N,externalSlotProps:E==null?void 0:E.toolbar,additionalProps:{isLandscape:g,onChange:f,value:u,view:s,onViewChange:l,views:a,disabled:b,readOnly:y},className:T.toolbar,ownerState:te({},t,{wrapperVariant:e})}),L=O6(D)&&N?v.jsx(N,te({},D)):null,k=S,I=C==null?void 0:C.tabs,$=s&&I?v.jsx(I,te({view:s,onViewChange:l,className:T.tabs},E==null?void 0:E.tabs)):null,H=(C==null?void 0:C.shortcuts)??YT,z=Ct({elementType:H,externalSlotProps:E==null?void 0:E.shortcuts,additionalProps:{isValid:m,isLandscape:g,onChange:h},className:T.shortcuts,ownerState:{isValid:m,isLandscape:g,onChange:h,wrapperVariant:e}}),R=s&&H?v.jsx(H,te({},z)):null;return{toolbar:L,content:k,tabs:$,actionBar:A,shortcuts:R}},I6=t=>{const{isLandscape:e,classes:n}=t;return qe({root:["root",e&&"landscape"],contentWrapper:["contentWrapper"]},RT,n)},D6=ye("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${ys.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${ys.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${ys.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${ys.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${ys.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${ys.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${ys.shortcuts}`]:{gridColumn:3}}}]}),P6=ye("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(t,e)=>e.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Xm=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:s,actionBar:a,shortcuts:l}=A6(r),{sx:u,className:f,isLandscape:h,wrapperVariant:m}=r,g=I6(r);return v.jsxs(D6,{ref:n,sx:u,className:_e(g.root,f),ownerState:r,children:[h?l:o,h?o:l,v.jsx(P6,{className:g.contentWrapper,children:m==="desktop"?v.jsxs(_.Fragment,{children:[i,s]}):v.jsxs(_.Fragment,{children:[s,i]})}),a]})});process.env.NODE_ENV!=="production"&&(Xm.propTypes={children:c.node,classes:c.object,className:c.string,disabled:c.bool,isLandscape:c.bool.isRequired,isRtl:c.bool.isRequired,isValid:c.func.isRequired,onAccept:c.func.isRequired,onCancel:c.func.isRequired,onChange:c.func.isRequired,onClear:c.func.isRequired,onClose:c.func.isRequired,onDismiss:c.func.isRequired,onOpen:c.func.isRequired,onSelectShortcut:c.func.isRequired,onSetToday:c.func.isRequired,onViewChange:c.func.isRequired,orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.any,view:c.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),views:c.arrayOf(c.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]).isRequired).isRequired,wrapperVariant:c.oneOf(["desktop","mobile"])});const _6=["props","getOpenDialogAriaText"],N6=["ownerState"],L6=["ownerState"],$6=t=>{var ge;let{props:e,getOpenDialogAriaText:n}=t,r=nt(t,_6);const{slots:o,slotProps:i,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:h,onSelectedSectionsChange:m,timezone:g,name:b,label:y,inputRef:S,readOnly:C,disabled:E,autoFocus:T,localeText:w,reduceAnimations:O}=e,A=_.useRef(null),N=_.useRef(null),D=yo(),L=((ge=i==null?void 0:i.toolbar)==null?void 0:ge.hidden)??!1,{open:k,actions:I,hasUIView:$,layoutProps:H,renderCurrentView:z,shouldRestoreFocus:R,fieldProps:B,contextValue:W,ownerState:U}=FT(te({},r,{props:e,fieldRef:N,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),G=o.inputAdornment??Lm,Y=Ct({elementType:G,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:e}),Z=nt(Y,N6),me=o.openPickerButton??ba,fe=Ct({elementType:me,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:E||C,onClick:k?I.onClose:I.onOpen,"aria-label":n(B.value),edge:Z.position},ownerState:e}),pe=nt(fe,L6),re=o.openPickerIcon,ue=Ct({elementType:re,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:U}),ae=o.field,K=Ct({elementType:ae,externalSlotProps:i==null?void 0:i.field,additionalProps:te({},B,L&&{id:D},{readOnly:C,disabled:E,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:h,onSelectedSectionsChange:m,timezone:g,label:y,name:b,autoFocus:T&&!e.open,focused:k?!0:void 0},S?{inputRef:S}:{}),ownerState:e});$&&(K.InputProps=te({},K.InputProps,{ref:A},!e.disableOpenPicker&&{[`${Z.position}Adornment`]:v.jsx(G,te({},Z,{children:v.jsx(me,te({},pe,{children:v.jsx(re,te({},ue))}))}))}));const Q=te({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},K.slots),ie=o.layout??Xm;let he=D;L&&(y?he=`${D}-label`:he=void 0);const ee=te({},i,{toolbar:te({},i==null?void 0:i.toolbar,{titleId:D}),popper:te({"aria-labelledby":he},i==null?void 0:i.popper)}),se=Mt(N,K.unstableFieldRef);return{renderPicker:()=>v.jsxs(Zw,{contextValue:W,localeText:w,children:[v.jsx(ae,te({},K,{slots:Q,slotProps:ee,unstableFieldRef:se})),v.jsx(jj,te({role:"dialog",placement:"bottom-start",anchorEl:A.current},I,{open:k,slots:o,slotProps:ee,shouldRestoreFocus:R,reduceAnimations:O,children:v.jsx(ie,te({},H,ee==null?void 0:ee.layout,{slots:o,slotProps:ee,children:z()}))}))]})}},GT=({shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s,timezone:a})=>{const l=ps();return _.useCallback(u=>Gl({adapter:l,value:u,timezone:a,props:{shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s}})!==null,[l,t,e,n,r,o,i,s,a])},F6=(t,e,n)=>(r,o)=>{switch(o.type){case"changeMonth":return te({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!t});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let s=n.setTimezone(r.currentMonth,i);return n.getMonth(s)!==n.getMonth(r.currentMonth)&&(s=n.setMonth(s,n.getMonth(r.currentMonth))),te({},r,{currentMonth:s})}case"finishMonthSwitchingAnimation":return te({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!e&&!n.isSameMonth(r.currentMonth,o.focusedDay);return te({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!t&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},R6=t=>{const{value:e,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:s,minDate:a,onMonthChange:l,reduceAnimations:u,shouldDisableDate:f,timezone:h}=t,m=Wt(),g=_.useRef(F6(!!u,i,m)).current,b=_.useMemo(()=>So.getInitialReferenceValue({value:e,utils:m,timezone:h,props:t,referenceDate:n,granularity:xo.day}),[n,h]),[y,S]=_.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:m.startOfMonth(b),slideDirection:"left"});_.useEffect(()=>{S({type:"changeMonthTimezone",newTimezone:m.getTimezone(b)})},[b,m]);const C=_.useCallback(A=>{S(te({type:"changeMonth"},A)),l&&l(A.newMonth)},[l]),E=_.useCallback(A=>{const N=A;m.isSameMonth(N,y.currentMonth)||C({newMonth:m.startOfMonth(N),direction:m.isAfterDay(N,y.currentMonth)?"left":"right"})},[y.currentMonth,C,m]),T=GT({shouldDisableDate:f,minDate:a,maxDate:s,disableFuture:r,disablePast:o,timezone:h}),w=_.useCallback(()=>{S({type:"finishMonthSwitchingAnimation"})},[]),O=Fe((A,N)=>{T(A)||S({type:"changeFocusedDay",focusedDay:A,withoutMonthSwitchingAnimation:N})});return{referenceDate:b,calendarState:y,changeMonth:E,changeFocusedDay:O,isDateDisabled:T,onMonthSwitchingAnimationEnd:w,handleChangeMonth:C}},B6=t=>Ue("MuiPickersFadeTransitionGroup",t);We("MuiPickersFadeTransitionGroup",["root"]);const V6=t=>{const{classes:e}=t;return qe({root:["root"]},B6,e)},z6=ye(Vl,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"block",position:"relative"});function JT(t){const e=jt({props:t,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=V6(e),a=bi();return o?n:v.jsx(z6,{className:_e(s.root,r),children:v.jsx(xi,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:a.transitions.duration.enteringScreen,enter:a.transitions.duration.enteringScreen,exit:0},children:n},i)})}function H6(t){return Ue("MuiPickersDay",t)}const vs=We("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),j6=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],W6=t=>{const{selected:e,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:a,classes:l}=t,u=s&&!a;return qe({root:["root",e&&!u&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",s&&a&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},H6,l)},ZT=({theme:t})=>te({},t.typography.caption,{width:ac,height:ac,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),color:(t.vars||t).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:Rt(t.palette.primary.main,t.palette.action.focusOpacity),[`&.${vs.selected}`]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${vs.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${vs.disabled}:not(.${vs.selected})`]:{color:(t.vars||t).palette.text.disabled},[`&.${vs.disabled}&.${vs.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Md}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(t.vars||t).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${vs.selected})`]:{border:`1px solid ${(t.vars||t).palette.text.secondary}`}}}]}),XT=(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableMargin&&e.dayWithMargin,!n.disableHighlightToday&&n.today&&e.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&e.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&e.hiddenDaySpacingFiller]},q6=ye(ya,{name:"MuiPickersDay",slot:"Root",overridesResolver:XT})(ZT),U6=ye("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:XT})(({theme:t})=>te({},ZT({theme:t}),{opacity:0,pointerEvents:"none"})),lc=()=>{},QT=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:s,disabled:a=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:f,onClick:h,onDaySelect:m,onFocus:g=lc,onBlur:b=lc,onKeyDown:y=lc,onMouseDown:S=lc,onMouseEnter:C=lc,outsideCurrentMonth:E,selected:T=!1,showDaysOutsideCurrentMonth:w=!1,children:O,today:A=!1}=r,N=nt(r,j6),D=te({},r,{autoFocus:o,disabled:a,disableHighlightToday:l,disableMargin:u,selected:T,showDaysOutsideCurrentMonth:w,today:A}),L=W6(D),k=Wt(),I=_.useRef(null),$=Mt(I,n);wn(()=>{o&&!a&&!f&&!E&&I.current.focus()},[o,a,f,E]);const H=R=>{S(R),E&&R.preventDefault()},z=R=>{a||m(s),E&&R.currentTarget.focus(),h&&h(R)};return E&&!w?v.jsx(U6,{className:_e(L.root,L.hiddenDaySpacingFiller,i),ownerState:D,role:N.role}):v.jsx(q6,te({className:_e(L.root,i),ref:$,centerRipple:!0,disabled:a,tabIndex:T?0:-1,onKeyDown:R=>y(R,s),onFocus:R=>g(R,s),onBlur:R=>b(R,s),onMouseEnter:R=>C(R,s),onClick:z,onMouseDown:H},N,{ownerState:D,children:O||k.format(s,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(QT.propTypes={action:c.oneOfType([c.func,c.shape({current:c.shape({focusVisible:c.func.isRequired})})]),centerRipple:c.bool,classes:c.object,className:c.string,component:c.elementType,day:c.object.isRequired,disabled:c.bool,disableHighlightToday:c.bool,disableMargin:c.bool,disableRipple:c.bool,disableTouchRipple:c.bool,focusRipple:c.bool,focusVisibleClassName:c.string,isAnimating:c.bool,isFirstVisibleCell:c.bool.isRequired,isLastVisibleCell:c.bool.isRequired,onBlur:c.func,onDaySelect:c.func.isRequired,onFocus:c.func,onFocusVisible:c.func,onKeyDown:c.func,onMouseEnter:c.func,outsideCurrentMonth:c.bool.isRequired,selected:c.bool,showDaysOutsideCurrentMonth:c.bool,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,today:c.bool,TouchRippleProps:c.object,touchRippleRef:c.oneOfType([c.func,c.shape({current:c.shape({pulsate:c.func.isRequired,start:c.func.isRequired,stop:c.func.isRequired})})])});const K6=_.memo(QT),Y6=t=>Ue("MuiPickersSlideTransition",t),Fr=We("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),G6=["children","className","reduceAnimations","slideDirection","transKey","classes"],J6=t=>{const{classes:e,slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return qe(r,Y6,e)},Z6=ye(Vl,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`.${Fr["slideEnter-left"]}`]:e["slideEnter-left"]},{[`.${Fr["slideEnter-right"]}`]:e["slideEnter-right"]},{[`.${Fr.slideEnterActive}`]:e.slideEnterActive},{[`.${Fr.slideExit}`]:e.slideExit},{[`.${Fr["slideExitActiveLeft-left"]}`]:e["slideExitActiveLeft-left"]},{[`.${Fr["slideExitActiveLeft-right"]}`]:e["slideExitActiveLeft-right"]}]})(({theme:t})=>{const e=t.transitions.create("transform",{duration:t.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},[`& .${Fr["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Fr["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Fr.slideEnterActive}`]:{transform:"translate(0%)",transition:e},[`& .${Fr.slideExit}`]:{transform:"translate(0%)"},[`& .${Fr["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:e,zIndex:0},[`& .${Fr["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:e,zIndex:0}}});function X6(t){const e=jt({props:t,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=nt(e,G6),a=J6(e),l=bi();if(o)return v.jsx("div",{className:_e(a.root,r),children:n});const u={exit:a.exit,enterActive:a.enterActive,enter:a.enter,exitActive:a.exitActive};return v.jsx(Z6,{className:_e(a.root,r),childFactory:f=>_.cloneElement(f,{classNames:u}),role:"presentation",children:v.jsx(pm,te({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},s,{children:n}),i)})}const Q6=t=>Ue("MuiDayCalendar",t);We("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const eW=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],tW=["ownerState"],nW=t=>{const{classes:e}=t;return qe({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Q6,e)},eE=(ac+Md*2)*6,rW=ye("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),oW=ye("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(t,e)=>e.header})({display:"flex",justifyContent:"center",alignItems:"center"}),iW=ye(Ci,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(t,e)=>e.weekDayLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(t.vars||t).palette.text.secondary})),sW=ye(Ci,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(t,e)=>e.weekNumberLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.disabled})),aW=ye(Ci,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(t,e)=>e.weekNumber})(({theme:t})=>te({},t.typography.caption,{width:ac,height:ac,padding:0,margin:`0 ${Md}px`,color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),lW=ye("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(t,e)=>e.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:eE}),cW=ye(X6,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(t,e)=>e.slideTransition})({minHeight:eE}),uW=ye("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(t,e)=>e.monthContainer})({overflow:"hidden"}),dW=ye("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(t,e)=>e.weekContainer})({margin:`${Md}px 0`,display:"flex",justifyContent:"center"});function fW(t){let{parentProps:e,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:s,isViewFocused:a}=t,l=nt(t,eW);const{disabled:u,disableHighlightToday:f,isMonthSwitchingAnimating:h,showDaysOutsideCurrentMonth:m,slots:g,slotProps:b,timezone:y}=e,S=Wt(),C=hd(y),E=r!==null&&S.isSameDay(n,r),T=o.some($=>S.isSameDay($,n)),w=S.isSameDay(n,C),O=(g==null?void 0:g.day)??K6,A=Ct({elementType:O,externalSlotProps:b==null?void 0:b.day,additionalProps:te({disableHighlightToday:f,showDaysOutsideCurrentMonth:m,role:"gridcell",isAnimating:h,"data-timestamp":S.toJsDate(n).valueOf()},l),ownerState:te({},e,{day:n,selected:T})}),N=nt(A,tW),D=_.useMemo(()=>u||i(n),[u,i,n]),L=_.useMemo(()=>S.getMonth(n)!==s,[S,n,s]),k=_.useMemo(()=>{const $=S.startOfMonth(S.setMonth(n,s));return m?S.isSameDay(n,S.startOfWeek($)):S.isSameDay(n,$)},[s,n,m,S]),I=_.useMemo(()=>{const $=S.endOfMonth(S.setMonth(n,s));return m?S.isSameDay(n,S.endOfWeek($)):S.isSameDay(n,$)},[s,n,m,S]);return v.jsx(O,te({},N,{day:n,disabled:D,autoFocus:a&&E,today:w,outsideCurrentMonth:L,isFirstVisibleCell:k,isLastVisibleCell:I,selected:T,tabIndex:E?0:-1,"aria-selected":T,"aria-current":w?"date":void 0}))}function pW(t){const e=jt({props:t,name:"MuiDayCalendar"}),n=Wt(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:s,focusedDay:a,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:f,readOnly:h,reduceAnimations:m,renderLoading:g=()=>v.jsx("span",{children:"..."}),slideDirection:b,TransitionProps:y,disablePast:S,disableFuture:C,minDate:E,maxDate:T,shouldDisableDate:w,shouldDisableMonth:O,shouldDisableYear:A,dayOfWeekFormatter:N=we=>n.format(we,"weekdayShort").charAt(0).toUpperCase(),hasFocus:D,onFocusedViewChange:L,gridLabelId:k,displayWeekNumber:I,fixedWeekNumber:$,autoFocus:H,timezone:z}=e,R=hd(z),B=nW(e),W=eo(),U=GT({shouldDisableDate:w,shouldDisableMonth:O,shouldDisableYear:A,minDate:E,maxDate:T,disablePast:S,disableFuture:C,timezone:z}),G=Wo(),[Y,Z]=Vo({name:"DayCalendar",state:"hasFocus",controlled:D,default:H??!1}),[me,fe]=_.useState(()=>a||R),pe=Fe(we=>{h||u(we)}),re=we=>{U(we)||(r(we),fe(we),L==null||L(!0),Z(!0))},ue=Fe((we,xe)=>{switch(we.key){case"ArrowUp":re(n.addDays(xe,-7)),we.preventDefault();break;case"ArrowDown":re(n.addDays(xe,7)),we.preventDefault();break;case"ArrowLeft":{const Oe=n.addDays(xe,W?1:-1),Le=n.addMonths(xe,W?1:-1),He=Kl({utils:n,date:Oe,minDate:W?Oe:n.startOfMonth(Le),maxDate:W?n.endOfMonth(Le):Oe,isDateDisabled:U,timezone:z});re(He||Oe),we.preventDefault();break}case"ArrowRight":{const Oe=n.addDays(xe,W?-1:1),Le=n.addMonths(xe,W?-1:1),He=Kl({utils:n,date:Oe,minDate:W?n.startOfMonth(Le):Oe,maxDate:W?Oe:n.endOfMonth(Le),isDateDisabled:U,timezone:z});re(He||Oe),we.preventDefault();break}case"Home":re(n.startOfWeek(xe)),we.preventDefault();break;case"End":re(n.endOfWeek(xe)),we.preventDefault();break;case"PageUp":re(n.addMonths(xe,1)),we.preventDefault();break;case"PageDown":re(n.addMonths(xe,-1)),we.preventDefault();break}}),ae=Fe((we,xe)=>re(xe)),K=Fe((we,xe)=>{Y&&n.isSameDay(me,xe)&&(L==null||L(!1))}),Q=n.getMonth(i),ie=n.getYear(i),he=_.useMemo(()=>s.filter(we=>!!we).map(we=>n.startOfDay(we)),[n,s]),ee=`${ie}-${Q}`,se=_.useMemo(()=>_.createRef(),[ee]),le=_.useMemo(()=>{const we=n.startOfMonth(i),xe=n.endOfMonth(i);return U(me)||n.isAfterDay(me,xe)||n.isBeforeDay(me,we)?Kl({utils:n,date:me,minDate:we,maxDate:xe,disablePast:S,disableFuture:C,isDateDisabled:U,timezone:z}):me},[i,C,S,me,U,n,z]),ge=_.useMemo(()=>{const we=n.getWeekArray(i);let xe=n.addMonths(i,1);for(;$&&we.length<$;){const Oe=n.getWeekArray(xe),Le=n.isSameDay(we[we.length-1][0],Oe[0][0]);Oe.slice(Le?1:0).forEach(He=>{we.length<$&&we.push(He)}),xe=n.addMonths(xe,1)}return we},[i,$,n]);return v.jsxs(rW,{role:"grid","aria-labelledby":k,className:B.root,children:[v.jsxs(oW,{role:"row",className:B.header,children:[I&&v.jsx(sW,{variant:"caption",role:"columnheader","aria-label":G.calendarWeekNumberHeaderLabel,className:B.weekNumberLabel,children:G.calendarWeekNumberHeaderText}),jV(n,R).map((we,xe)=>v.jsx(iW,{variant:"caption",role:"columnheader","aria-label":n.format(we,"weekday"),className:B.weekDayLabel,children:N(we)},xe.toString()))]}),l?v.jsx(lW,{className:B.loadingContainer,children:g()}):v.jsx(cW,te({transKey:ee,onExited:f,reduceAnimations:m,slideDirection:b,className:_e(o,B.slideTransition)},y,{nodeRef:se,children:v.jsx(uW,{ref:se,role:"rowgroup",className:B.monthContainer,children:ge.map((we,xe)=>v.jsxs(dW,{role:"row",className:B.weekContainer,"aria-rowindex":xe+1,children:[I&&v.jsx(aW,{className:B.weekNumber,role:"rowheader","aria-label":G.calendarWeekNumberAriaLabelText(n.getWeekNumber(we[0])),children:G.calendarWeekNumberText(n.getWeekNumber(we[0]))}),we.map((Oe,Le)=>v.jsx(fW,{parentProps:e,day:Oe,selectedDays:he,focusableDay:le,onKeyDown:ue,onFocus:ae,onBlur:K,onDaySelect:pe,isDateDisabled:U,currentMonthNumber:Q,isViewFocused:Y,"aria-colindex":Le+1},Oe.toString()))]},`week-${we[0]}`))})}))]})}function hW(t){return Ue("MuiPickersMonth",t)}const kd=We("MuiPickersMonth",["root","monthButton","disabled","selected"]),mW=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],gW=t=>{const{disabled:e,selected:n,classes:r}=t;return qe({root:["root"],monthButton:["monthButton",e&&"disabled",n&&"selected"]},hW,r)},yW=ye("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(t,e)=>[e.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),bW=ye("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(t,e)=>[e.monthButton,{[`&.${kd.disabled}`]:e.disabled},{[`&.${kd.selected}`]:e.selected}]})(({theme:t})=>te({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette.action.active,t.palette.action.hoverOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${kd.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${kd.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),vW=_.memo(function(e){const n=jt({props:e,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:l,tabIndex:u,onClick:f,onKeyDown:h,onFocus:m,onBlur:g,"aria-current":b,"aria-label":y,slots:S,slotProps:C}=n,E=nt(n,mW),T=_.useRef(null),w=gW(n);wn(()=>{var N;r&&((N=T.current)==null||N.focus())},[r]);const O=(S==null?void 0:S.monthButton)??bW,A=Ct({elementType:O,externalSlotProps:C==null?void 0:C.monthButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:T,type:"button",role:"radio","aria-current":b,"aria-checked":a,"aria-label":y,onClick:N=>f(N,l),onKeyDown:N=>h(N,l),onFocus:N=>m(N,l),onBlur:N=>g(N,l)},ownerState:n,className:w.monthButton});return v.jsx(yW,te({className:_e(w.root,o),ownerState:n},E,{children:v.jsx(O,te({},A))}))});function xW(t){return Ue("MuiMonthCalendar",t)}We("MuiMonthCalendar",["root"]);const SW=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],CW=t=>{const{classes:e}=t;return qe({root:["root"]},xW,e)};function wW(t,e){const n=Wt(),r=Jl(),o=jt({props:t,name:e});return te({disableFuture:!1,disablePast:!1},o,{minDate:Pr(n,o.minDate,r.minDate),maxDate:Pr(n,o.maxDate,r.maxDate)})}const TW=ye("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Od,boxSizing:"border-box"}),tE=_.forwardRef(function(e,n){const r=wW(e,"MuiMonthCalendar"),{className:o,value:i,defaultValue:s,referenceDate:a,disabled:l,disableFuture:u,disablePast:f,maxDate:h,minDate:m,onChange:g,shouldDisableMonth:b,readOnly:y,autoFocus:S=!1,onMonthFocus:C,hasFocus:E,onFocusedViewChange:T,monthsPerRow:w=3,timezone:O,gridLabelId:A,slots:N,slotProps:D}=r,L=nt(r,SW),{value:k,handleValueChange:I,timezone:$}=Im({name:"MonthCalendar",timezone:O,value:i,defaultValue:s,referenceDate:a,onChange:g,valueManager:So}),H=hd($),z=eo(),R=Wt(),B=_.useMemo(()=>So.getInitialReferenceValue({value:k,utils:R,props:r,timezone:$,referenceDate:a,granularity:xo.month}),[]),W=r,U=CW(W),G=_.useMemo(()=>R.getMonth(H),[R,H]),Y=_.useMemo(()=>k!=null?R.getMonth(k):null,[k,R]),[Z,me]=_.useState(()=>Y||R.getMonth(B)),[fe,pe]=Vo({name:"MonthCalendar",state:"hasFocus",controlled:E,default:S??!1}),re=Fe(ee=>{pe(ee),T&&T(ee)}),ue=_.useCallback(ee=>{const se=R.startOfMonth(f&&R.isAfter(H,m)?H:m),le=R.startOfMonth(u&&R.isBefore(H,h)?H:h),ge=R.startOfMonth(ee);return R.isBefore(ge,se)||R.isAfter(ge,le)?!0:b?b(ge):!1},[u,f,h,m,H,b,R]),ae=Fe((ee,se)=>{if(y)return;const le=R.setMonth(k??B,se);I(le)}),K=Fe(ee=>{ue(R.setMonth(k??B,ee))||(me(ee),re(!0),C&&C(ee))});_.useEffect(()=>{me(ee=>Y!==null&&ee!==Y?Y:ee)},[Y]);const Q=Fe((ee,se)=>{switch(ee.key){case"ArrowUp":K((12+se-3)%12),ee.preventDefault();break;case"ArrowDown":K((12+se+3)%12),ee.preventDefault();break;case"ArrowLeft":K((12+se+(z?1:-1))%12),ee.preventDefault();break;case"ArrowRight":K((12+se+(z?-1:1))%12),ee.preventDefault();break}}),ie=Fe((ee,se)=>{K(se)}),he=Fe((ee,se)=>{Z===se&&re(!1)});return v.jsx(TW,te({ref:n,className:_e(U.root,o),ownerState:W,role:"radiogroup","aria-labelledby":A},L,{children:wm(R,k??B).map(ee=>{const se=R.getMonth(ee),le=R.format(ee,"monthShort"),ge=R.format(ee,"month"),we=se===Y,xe=l||ue(ee);return v.jsx(vW,{selected:we,value:se,onClick:ae,onKeyDown:Q,autoFocus:fe&&se===Z,disabled:xe,tabIndex:se===Z&&!xe?0:-1,onFocus:ie,onBlur:he,"aria-current":G===se?"date":void 0,"aria-label":ge,monthsPerRow:w,slots:N,slotProps:D,children:le},le)})}))});process.env.NODE_ENV!=="production"&&(tE.propTypes={autoFocus:c.bool,classes:c.object,className:c.string,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disablePast:c.bool,gridLabelId:c.string,hasFocus:c.bool,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),onChange:c.func,onFocusedViewChange:c.func,onMonthFocus:c.func,readOnly:c.bool,referenceDate:c.object,shouldDisableMonth:c.func,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object});function EW(t){return Ue("MuiPickersYear",t)}const Ad=We("MuiPickersYear",["root","yearButton","selected","disabled"]),MW=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],OW=t=>{const{disabled:e,selected:n,classes:r}=t;return qe({root:["root"],yearButton:["yearButton",e&&"disabled",n&&"selected"]},EW,r)},kW=ye("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(t,e)=>[e.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),AW=ye("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(t,e)=>[e.yearButton,{[`&.${Ad.disabled}`]:e.disabled},{[`&.${Ad.selected}`]:e.selected}]})(({theme:t})=>te({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.focusOpacity})`:Rt(t.palette.action.active,t.palette.action.focusOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Rt(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Ad.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${Ad.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),IW=_.memo(function(e){const n=jt({props:e,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:l,tabIndex:u,onClick:f,onKeyDown:h,onFocus:m,onBlur:g,"aria-current":b,slots:y,slotProps:S}=n,C=nt(n,MW),E=_.useRef(null),T=OW(n);wn(()=>{var A;r&&((A=E.current)==null||A.focus())},[r]);const w=(y==null?void 0:y.yearButton)??AW,O=Ct({elementType:w,externalSlotProps:S==null?void 0:S.yearButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:E,type:"button",role:"radio","aria-current":b,"aria-checked":a,onClick:A=>f(A,l),onKeyDown:A=>h(A,l),onFocus:A=>m(A,l),onBlur:A=>g(A,l)},ownerState:n,className:T.yearButton});return v.jsx(kW,te({className:_e(T.root,o),ownerState:n},C,{children:v.jsx(w,te({},O))}))});function DW(t){return Ue("MuiYearCalendar",t)}We("MuiYearCalendar",["root"]);const PW=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],_W=t=>{const{classes:e}=t;return qe({root:["root"]},DW,e)};function NW(t,e){const n=Wt(),r=Jl(),o=jt({props:t,name:e});return te({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Pr(n,o.minDate,r.minDate),maxDate:Pr(n,o.maxDate,r.maxDate)})}const LW=ye("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Od,maxHeight:T6,boxSizing:"border-box",position:"relative"}),nE=_.forwardRef(function(e,n){const r=NW(e,"MuiYearCalendar"),{autoFocus:o,className:i,value:s,defaultValue:a,referenceDate:l,disabled:u,disableFuture:f,disablePast:h,maxDate:m,minDate:g,onChange:b,readOnly:y,shouldDisableYear:S,onYearFocus:C,hasFocus:E,onFocusedViewChange:T,yearsOrder:w="asc",yearsPerRow:O,timezone:A,gridLabelId:N,slots:D,slotProps:L}=r,k=nt(r,PW),{value:I,handleValueChange:$,timezone:H}=Im({name:"YearCalendar",timezone:A,value:s,defaultValue:a,referenceDate:l,onChange:b,valueManager:So}),z=hd(H),R=eo(),B=Wt(),W=_.useMemo(()=>So.getInitialReferenceValue({value:I,utils:B,props:r,timezone:H,referenceDate:l,granularity:xo.year}),[]),U=r,G=_W(U),Y=_.useMemo(()=>B.getYear(z),[B,z]),Z=_.useMemo(()=>I!=null?B.getYear(I):null,[I,B]),[me,fe]=_.useState(()=>Z||B.getYear(W)),[pe,re]=Vo({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),ue=Fe(Oe=>{re(Oe),T&&T(Oe)}),ae=_.useCallback(Oe=>{if(h&&B.isBeforeYear(Oe,z)||f&&B.isAfterYear(Oe,z)||g&&B.isBeforeYear(Oe,g)||m&&B.isAfterYear(Oe,m))return!0;if(!S)return!1;const Le=B.startOfYear(Oe);return S(Le)},[f,h,m,g,z,S,B]),K=Fe((Oe,Le)=>{if(y)return;const He=B.setYear(I??W,Le);$(He)}),Q=Fe(Oe=>{ae(B.setYear(I??W,Oe))||(fe(Oe),ue(!0),C==null||C(Oe))});_.useEffect(()=>{fe(Oe=>Z!==null&&Oe!==Z?Z:Oe)},[Z]);const ie=w!=="desc"?O*1:O*-1,he=R&&w==="asc"||!R&&w==="desc"?-1:1,ee=Fe((Oe,Le)=>{switch(Oe.key){case"ArrowUp":Q(Le-ie),Oe.preventDefault();break;case"ArrowDown":Q(Le+ie),Oe.preventDefault();break;case"ArrowLeft":Q(Le-he),Oe.preventDefault();break;case"ArrowRight":Q(Le+he),Oe.preventDefault();break}}),se=Fe((Oe,Le)=>{Q(Le)}),le=Fe((Oe,Le)=>{me===Le&&ue(!1)}),ge=_.useRef(null),we=Mt(n,ge);_.useEffect(()=>{if(o||ge.current===null)return;const Oe=ge.current.querySelector('[tabindex="0"]');if(!Oe)return;const Le=Oe.offsetHeight,He=Oe.offsetTop,Ge=ge.current.clientHeight,De=ge.current.scrollTop,lt=He+Le;Le>Ge||He<De||(ge.current.scrollTop=lt-Ge/2-Le/2)},[o]);const xe=B.getYearRange([g,m]);return w==="desc"&&xe.reverse(),v.jsx(LW,te({ref:we,className:_e(G.root,i),ownerState:U,role:"radiogroup","aria-labelledby":N},k,{children:xe.map(Oe=>{const Le=B.getYear(Oe),He=Le===Z,Ge=u||ae(Oe);return v.jsx(IW,{selected:He,value:Le,onClick:K,onKeyDown:ee,autoFocus:pe&&Le===me,disabled:Ge,tabIndex:Le===me&&!Ge?0:-1,onFocus:se,onBlur:le,"aria-current":Y===Le?"date":void 0,yearsPerRow:O,slots:D,slotProps:L,children:B.format(Oe,"year")},B.format(Oe,"year"))})}))});process.env.NODE_ENV!=="production"&&(nE.propTypes={autoFocus:c.bool,classes:c.object,className:c.string,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disablePast:c.bool,gridLabelId:c.string,hasFocus:c.bool,maxDate:c.object,minDate:c.object,onChange:c.func,onFocusedViewChange:c.func,onYearFocus:c.func,readOnly:c.bool,referenceDate:c.object,shouldDisableYear:c.func,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])});const $W=t=>Ue("MuiPickersCalendarHeader",t),FW=We("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function RW(t){return Ue("MuiPickersArrowSwitcher",t)}We("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const BW=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],VW=["ownerState"],zW=["ownerState"],HW=ye("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex"}),jW=ye("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})(({theme:t})=>({width:t.spacing(3)})),rE=ye(ba,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(t,e)=>e.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),WW=t=>{const{classes:e}=t;return qe({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},RW,e)},qW=_.forwardRef(function(e,n){const r=eo(),o=jt({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:s,slots:a,slotProps:l,isNextDisabled:u,isNextHidden:f,onGoToNext:h,nextLabel:m,isPreviousDisabled:g,isPreviousHidden:b,onGoToPrevious:y,previousLabel:S,labelId:C}=o,E=nt(o,BW),T=o,w=WW(T),O={isDisabled:u,isHidden:f,goTo:h,label:m},A={isDisabled:g,isHidden:b,goTo:y,label:S},N=(a==null?void 0:a.previousIconButton)??rE,D=Ct({elementType:N,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:A.label,"aria-label":A.label,disabled:A.isDisabled,edge:"end",onClick:A.goTo},ownerState:te({},T,{hidden:A.isHidden}),className:_e(w.button,w.previousIconButton)}),L=(a==null?void 0:a.nextIconButton)??rE,k=Ct({elementType:L,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:O.label,"aria-label":O.label,disabled:O.isDisabled,edge:"start",onClick:O.goTo},ownerState:te({},T,{hidden:O.isHidden}),className:_e(w.button,w.nextIconButton)}),I=(a==null?void 0:a.leftArrowIcon)??u4,$=Ct({elementType:I,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:T,className:w.leftArrowIcon}),H=nt($,VW),z=(a==null?void 0:a.rightArrowIcon)??d4,R=Ct({elementType:z,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:T,className:w.rightArrowIcon}),B=nt(R,zW);return v.jsxs(HW,te({ref:n,className:_e(w.root,s),ownerState:T},E,{children:[v.jsx(N,te({},D,{children:r?v.jsx(z,te({},B)):v.jsx(I,te({},H))})),i?v.jsx(Ci,{variant:"subtitle1",component:"span",id:C,children:i}):v.jsx(jW,{className:w.spacer,ownerState:T}),v.jsx(L,te({},k,{children:r?v.jsx(I,te({},H)):v.jsx(z,te({},B))}))]}))});function UW(t,{disableFuture:e,maxDate:n,timezone:r}){const o=Wt();return _.useMemo(()=>{const i=o.date(void 0,r),s=o.startOfMonth(e&&o.isBefore(i,n)?i:n);return!o.isAfter(s,t)},[e,n,t,o,r])}function KW(t,{disablePast:e,minDate:n,timezone:r}){const o=Wt();return _.useMemo(()=>{const i=o.date(void 0,r),s=o.startOfMonth(e&&o.isAfter(i,n)?i:n);return!o.isBefore(s,t)},[e,n,t,o,r])}const YW=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],GW=["ownerState"],JW=t=>{const{classes:e}=t;return qe({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},$W,e)},ZW=ye("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),XW=ye("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(t,e)=>e.labelContainer})(({theme:t})=>te({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})),QW=ye("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(t,e)=>e.label})({marginRight:6}),eq=ye(ba,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(t,e)=>e.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${FW.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),tq=ye(c4,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(t,e)=>e.switchViewIcon})(({theme:t})=>({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"})),oE=_.forwardRef(function(e,n){const r=Wo(),o=Wt(),i=jt({props:e,name:"MuiPickersCalendarHeader"}),{slots:s,slotProps:a,currentMonth:l,disabled:u,disableFuture:f,disablePast:h,maxDate:m,minDate:g,onMonthChange:b,onViewChange:y,view:S,reduceAnimations:C,views:E,labelId:T,className:w,timezone:O,format:A=`${o.formats.month} ${o.formats.year}`}=i,N=nt(i,YW),D=i,L=JW(i),k=(s==null?void 0:s.switchViewButton)??eq,I=Ct({elementType:k,externalSlotProps:a==null?void 0:a.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(S)},ownerState:D,className:L.switchViewButton}),$=(s==null?void 0:s.switchViewIcon)??tq,H=Ct({elementType:$,externalSlotProps:a==null?void 0:a.switchViewIcon,ownerState:D,className:L.switchViewIcon}),z=nt(H,GW),R=()=>b(o.addMonths(l,1),"left"),B=()=>b(o.addMonths(l,-1),"right"),W=UW(l,{disableFuture:f,maxDate:m,timezone:O}),U=KW(l,{disablePast:h,minDate:g,timezone:O}),G=()=>{if(!(E.length===1||!y||u))if(E.length===2)y(E.find(Z=>Z!==S)||E[0]);else{const Z=E.indexOf(S)!==0?0:1;y(E[Z])}};if(E.length===1&&E[0]==="year")return null;const Y=o.formatByString(l,A);return v.jsxs(ZW,te({},N,{ownerState:D,className:_e(L.root,w),ref:n,children:[v.jsxs(XW,{role:"presentation",onClick:G,ownerState:D,"aria-live":"polite",className:L.labelContainer,children:[v.jsx(JT,{reduceAnimations:C,transKey:Y,children:v.jsx(QW,{id:T,ownerState:D,className:L.label,children:Y})}),E.length>1&&!u&&v.jsx(k,te({},I,{children:v.jsx($,te({},z))}))]}),v.jsx(xi,{in:S==="day",children:v.jsx(qW,{slots:s,slotProps:a,onGoToPrevious:B,isPreviousDisabled:U,previousLabel:r.previousMonth,onGoToNext:R,isNextDisabled:W,nextLabel:r.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(oE.propTypes={classes:c.object,className:c.string,currentMonth:c.object.isRequired,disabled:c.bool,disableFuture:c.bool,disablePast:c.bool,format:c.string,labelId:c.string,maxDate:c.object.isRequired,minDate:c.object.isRequired,onMonthChange:c.func.isRequired,onViewChange:c.func,reduceAnimations:c.bool.isRequired,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string.isRequired,view:c.oneOf(["day","month","year"]).isRequired,views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired).isRequired});const nq=ye("div")({overflow:"hidden",width:Od,maxHeight:Zm,display:"flex",flexDirection:"column",margin:"0 auto"}),rq=t=>Ue("MuiDateCalendar",t);We("MuiDateCalendar",["root","viewTransitionContainer"]);const oq=["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"],iq=t=>{const{classes:e}=t;return qe({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},rq,e)};function sq(t,e){const n=Wt(),r=Jl(),o=NT(),i=jt({props:t,name:e});return te({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>v.jsx("span",{children:"..."})),minDate:Pr(n,i.minDate,r.minDate),maxDate:Pr(n,i.maxDate,r.maxDate)})}const aq=ye(nq,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"column",height:Zm}),lq=ye(JT,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(t,e)=>e.viewTransitionContainer})({}),iE=_.forwardRef(function(e,n){const r=Wt(),o=yo(),i=sq(e,"MuiDateCalendar"),{autoFocus:s,onViewChange:a,value:l,defaultValue:u,referenceDate:f,disableFuture:h,disablePast:m,onChange:g,onYearChange:b,onMonthChange:y,reduceAnimations:S,shouldDisableDate:C,shouldDisableMonth:E,shouldDisableYear:T,view:w,views:O,openTo:A,className:N,disabled:D,readOnly:L,minDate:k,maxDate:I,disableHighlightToday:$,focusedView:H,onFocusedViewChange:z,showDaysOutsideCurrentMonth:R,fixedWeekNumber:B,dayOfWeekFormatter:W,slots:U,slotProps:G,loading:Y,renderLoading:Z,displayWeekNumber:me,yearsOrder:fe,yearsPerRow:pe,monthsPerRow:re,timezone:ue}=i,ae=nt(i,oq),{value:K,handleValueChange:Q,timezone:ie}=Im({name:"DateCalendar",timezone:ue,value:l,defaultValue:u,referenceDate:f,onChange:g,valueManager:So}),{view:he,setView:ee,focusedView:se,setFocusedView:le,goToNextView:ge,setValueAndGoToNextView:we}=LT({view:w,views:O,openTo:A,onChange:Q,onViewChange:a,autoFocus:s,focusedView:H,onFocusedViewChange:z}),{referenceDate:xe,calendarState:Oe,changeFocusedDay:Le,changeMonth:He,handleChangeMonth:Ge,isDateDisabled:De,onMonthSwitchingAnimationEnd:lt}=R6({value:K,referenceDate:f,reduceAnimations:S,onMonthChange:y,minDate:k,maxDate:I,shouldDisableDate:C,disablePast:m,disableFuture:h,timezone:ie}),St=D&&K||k,Zt=D&&K||I,vn=`${o}-grid-label`,cn=se!==null,$t=(U==null?void 0:U.calendarHeader)??oE,An=Ct({elementType:$t,externalSlotProps:G==null?void 0:G.calendarHeader,additionalProps:{views:O,view:he,currentMonth:Oe.currentMonth,onViewChange:ee,onMonthChange:(tt,Pt)=>Ge({newMonth:tt,direction:Pt}),minDate:St,maxDate:Zt,disabled:D,disablePast:m,disableFuture:h,reduceAnimations:S,timezone:ie,labelId:vn},ownerState:i}),qn=Fe(tt=>{const Pt=r.startOfMonth(tt),tr=r.endOfMonth(tt),fr=De(tt)?Kl({utils:r,date:tt,minDate:r.isBefore(k,Pt)?Pt:k,maxDate:r.isAfter(I,tr)?tr:I,disablePast:m,disableFuture:h,isDateDisabled:De,timezone:ie}):tt;fr?(we(fr,"finish"),y==null||y(Pt)):(ge(),He(Pt)),Le(fr,!0)}),dt=Fe(tt=>{const Pt=r.startOfYear(tt),tr=r.endOfYear(tt),fr=De(tt)?Kl({utils:r,date:tt,minDate:r.isBefore(k,Pt)?Pt:k,maxDate:r.isAfter(I,tr)?tr:I,disablePast:m,disableFuture:h,isDateDisabled:De,timezone:ie}):tt;fr?(we(fr,"finish"),b==null||b(fr)):(ge(),He(Pt)),Le(fr,!0)}),Ln=Fe(tt=>Q(tt&&fd(r,tt,K??xe),"finish",he));_.useEffect(()=>{K!=null&&r.isValid(K)&&He(K)},[K]);const Kt=i,de=iq(Kt),$e={disablePast:m,disableFuture:h,maxDate:I,minDate:k},Ee={disableHighlightToday:$,readOnly:L,disabled:D,timezone:ie,gridLabelId:vn,slots:U,slotProps:G},Re=_.useRef(he);_.useEffect(()=>{Re.current!==he&&(se===Re.current&&le(he,!0),Re.current=he)},[se,le,he]);const Ye=_.useMemo(()=>[K],[K]);return v.jsxs(aq,te({ref:n,className:_e(de.root,N),ownerState:Kt},ae,{children:[v.jsx($t,te({},An,{slots:U,slotProps:G})),v.jsx(lq,{reduceAnimations:S,className:de.viewTransitionContainer,transKey:he,ownerState:Kt,children:v.jsxs("div",{children:[he==="year"&&v.jsx(nE,te({},$e,Ee,{value:K,onChange:dt,shouldDisableYear:T,hasFocus:cn,onFocusedViewChange:tt=>le("year",tt),yearsOrder:fe,yearsPerRow:pe,referenceDate:xe})),he==="month"&&v.jsx(tE,te({},$e,Ee,{hasFocus:cn,className:N,value:K,onChange:qn,shouldDisableMonth:E,onFocusedViewChange:tt=>le("month",tt),monthsPerRow:re,referenceDate:xe})),he==="day"&&v.jsx(pW,te({},Oe,$e,Ee,{onMonthSwitchingAnimationEnd:lt,onFocusedDayChange:Le,reduceAnimations:S,selectedDays:Ye,onSelectedDaysChange:Ln,shouldDisableDate:C,shouldDisableMonth:E,shouldDisableYear:T,hasFocus:cn,onFocusedViewChange:tt=>le("day",tt),showDaysOutsideCurrentMonth:R,fixedWeekNumber:B,dayOfWeekFormatter:W,displayWeekNumber:me,loading:Y,renderLoading:Z}))]})})]}))});process.env.NODE_ENV!=="production"&&(iE.propTypes={autoFocus:c.bool,classes:c.object,className:c.string,dayOfWeekFormatter:c.func,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,fixedWeekNumber:c.number,focusedView:c.oneOf(["day","month","year"]),loading:c.bool,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),onChange:c.func,onFocusedViewChange:c.func,onMonthChange:c.func,onViewChange:c.func,onYearChange:c.func,openTo:c.oneOf(["day","month","year"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])});const Ea=({view:t,onViewChange:e,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:l,className:u,classes:f,disableFuture:h,disablePast:m,minDate:g,maxDate:b,shouldDisableDate:y,shouldDisableMonth:S,shouldDisableYear:C,reduceAnimations:E,onMonthChange:T,monthsPerRow:w,onYearChange:O,yearsOrder:A,yearsPerRow:N,slots:D,slotProps:L,loading:k,renderLoading:I,disableHighlightToday:$,readOnly:H,disabled:z,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:B,sx:W,autoFocus:U,fixedWeekNumber:G,displayWeekNumber:Y,timezone:Z})=>v.jsx(iE,{view:t,onViewChange:e,views:n.filter(Ew),focusedView:r&&Ew(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:l,className:u,classes:f,disableFuture:h,disablePast:m,minDate:g,maxDate:b,shouldDisableDate:y,shouldDisableMonth:S,shouldDisableYear:C,reduceAnimations:E,onMonthChange:T,monthsPerRow:w,onYearChange:O,yearsOrder:A,yearsPerRow:N,slots:D,slotProps:L,loading:k,renderLoading:I,disableHighlightToday:$,readOnly:H,disabled:z,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:B,sx:W,autoFocus:U,fixedWeekNumber:G,displayWeekNumber:Y,timezone:Z}),sE=_.forwardRef(function(e,n){var u,f;const r=Wo(),o=Wt(),i=cT(e,"MuiDesktopDatePicker"),s=te({day:Ea,month:Ea,year:Ea},i.viewRenderers),a=te({},i,{viewRenderers:s,format:Tm(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:te({openPickerIcon:f4,field:bd},i.slots),slotProps:te({},i.slotProps,{field:h=>{var m;return te({},Tu((m=i.slotProps)==null?void 0:m.field,h),Vw(i),{ref:n})},toolbar:te({hidden:!0},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:l}=$6({props:a,valueManager:So,valueType:"date",getOpenDialogAriaText:zw({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:Gl});return l()});sE.propTypes={autoFocus:c.bool,className:c.string,closeOnSelect:c.bool,dayOfWeekFormatter:c.func,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disableOpenPicker:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,enableAccessibleFieldDOMStructure:c.any,fixedWeekNumber:c.number,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),inputRef:hn,label:c.node,loading:c.bool,localeText:c.object,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),name:c.string,onAccept:c.func,onChange:c.func,onClose:c.func,onError:c.func,onMonthChange:c.func,onOpen:c.func,onSelectedSectionsChange:c.func,onViewChange:c.func,onYearChange:c.func,open:c.bool,openTo:c.oneOf(["day","month","year"]),orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),viewRenderers:c.shape({day:c.func,month:c.func,year:c.func}),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])};function cq(t){return Ue("MuiDialogContent",t)}We("MuiDialogContent",["root","dividers"]);const uq=We("MuiDialogTitle",["root"]),dq=t=>{const{classes:e,dividers:n}=t;return qe({root:["root",n&&"dividers"]},cq,e)},fq=ye("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(Dt(({theme:t})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${uq.root} + &`]:{paddingTop:0}}}]}))),aE=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...s}=r,a={...r,dividers:i},l=dq(a);return v.jsx(fq,{className:_e(l.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(aE.propTypes={children:c.node,classes:c.object,className:c.string,dividers:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function pq(t){return Ue("MuiDialog",t)}const cc=We("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),lE=_.createContext({});process.env.NODE_ENV!=="production"&&(lE.displayName="DialogContext");const hq=ye(bm,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),mq=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=t,s={root:["root"],container:["container",`scroll${Ae(n)}`],paper:["paper",`paperScroll${Ae(n)}`,`paperWidth${Ae(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return qe(s,pq,e)},gq=ye(vm,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),yq=ye("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${Ae(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"}}}]}),bq=ye(ha,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${Ae(n.scroll)}`],e[`paperWidth${Ae(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(Dt(({theme:t})=>({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:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${cc.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(t.breakpoints.values).filter(e=>e!=="xs").map(e=>({props:{maxWidth:e},style:{maxWidth:`${t.breakpoints.values[e]}${t.breakpoints.unit}`,[`&.${cc.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${cc.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),cE=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiDialog"}),o=bi(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:f,children:h,className:m,disableEscapeKeyDown:g=!1,fullScreen:b=!1,fullWidth:y=!1,maxWidth:S="sm",onBackdropClick:C,onClick:E,onClose:T,open:w,PaperComponent:O=ha,PaperProps:A={},scroll:N="paper",slots:D={},slotProps:L={},TransitionComponent:k=xi,transitionDuration:I=i,TransitionProps:$,...H}=r,z={...r,disableEscapeKeyDown:g,fullScreen:b,fullWidth:y,maxWidth:S,scroll:N},R=mq(z),B=_.useRef(),W=le=>{B.current=le.target===le.currentTarget},U=le=>{E&&E(le),B.current&&(B.current=null,C&&C(le),T&&T(le,"backdropClick"))},G=yo(a),Y=_.useMemo(()=>({titleId:G}),[G]),Z={transition:k,...D},me={transition:$,paper:A,backdrop:f,...L},fe={slots:Z,slotProps:me},[pe,re]=Bt("root",{elementType:gq,shouldForwardComponentProp:!0,externalForwardedProps:fe,ownerState:z,className:_e(R.root,m),ref:n}),[ue,ae]=Bt("backdrop",{elementType:hq,shouldForwardComponentProp:!0,externalForwardedProps:fe,ownerState:z}),[K,Q]=Bt("paper",{elementType:bq,shouldForwardComponentProp:!0,externalForwardedProps:fe,ownerState:z,className:_e(R.paper,A.className)}),[ie,he]=Bt("container",{elementType:yq,externalForwardedProps:fe,ownerState:z,className:_e(R.container)}),[ee,se]=Bt("transition",{elementType:xi,externalForwardedProps:fe,ownerState:z,additionalProps:{appear:!0,in:w,timeout:I,role:"presentation"}});return v.jsx(pe,{closeAfterTransition:!0,slots:{backdrop:ue},slotProps:{backdrop:{transitionDuration:I,as:u,...ae}},disableEscapeKeyDown:g,onClose:T,open:w,onClick:U,...re,...H,children:v.jsx(ee,{...se,children:v.jsx(ie,{onMouseDown:W,...he,children:v.jsx(K,{as:O,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":G,"aria-modal":l,...Q,children:v.jsx(lE.Provider,{value:Y,children:h})})})})})});process.env.NODE_ENV!=="production"&&(cE.propTypes={"aria-describedby":c.string,"aria-labelledby":c.string,"aria-modal":c.oneOfType([c.oneOf(["false","true"]),c.bool]),BackdropComponent:c.elementType,BackdropProps:c.object,children:c.node,classes:c.object,className:c.string,disableEscapeKeyDown:c.bool,fullScreen:c.bool,fullWidth:c.bool,maxWidth:c.oneOfType([c.oneOf(["xs","sm","md","lg","xl",!1]),c.string]),onBackdropClick:c.func,onClick:c.func,onClose:c.func,open:c.bool.isRequired,PaperComponent:c.elementType,PaperProps:c.object,scroll:c.oneOf(["body","paper"]),slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),container:c.oneOfType([c.func,c.object]),paper:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,container:c.elementType,paper:c.elementType,root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})]),TransitionProps:c.object});const vq=ye(cE)({[`& .${cc.container}`]:{outline:0},[`& .${cc.paper}`]:{outline:0,minWidth:Od}}),xq=ye(aE)({"&:first-of-type":{padding:0}});function Sq(t){const{children:e,onDismiss:n,open:r,slots:o,slotProps:i}=t,s=(o==null?void 0:o.dialog)??vq,a=(o==null?void 0:o.mobileTransition)??xi;return v.jsx(s,te({open:r,onClose:n},i==null?void 0:i.dialog,{TransitionComponent:a,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:o==null?void 0:o.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:v.jsx(xq,{children:e})}))}const Cq=["props","getOpenDialogAriaText"],wq=t=>{var Z;let{props:e,getOpenDialogAriaText:n}=t,r=nt(t,Cq);const{slots:o,slotProps:i,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:h,onSelectedSectionsChange:m,timezone:g,name:b,label:y,inputRef:S,readOnly:C,disabled:E,localeText:T}=e,w=_.useRef(null),O=yo(),A=((Z=i==null?void 0:i.toolbar)==null?void 0:Z.hidden)??!1,{open:N,actions:D,layoutProps:L,renderCurrentView:k,fieldProps:I,contextValue:$}=FT(te({},r,{props:e,fieldRef:w,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),H=o.field,z=Ct({elementType:H,externalSlotProps:i==null?void 0:i.field,additionalProps:te({},I,A&&{id:O},!(E||C)&&{onClick:D.onOpen,onKeyDown:Ez(D.onOpen)},{readOnly:C??!0,disabled:E,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:h,onSelectedSectionsChange:m,timezone:g,label:y,name:b},S?{inputRef:S}:{}),ownerState:e});z.inputProps=te({},z.inputProps,{"aria-label":n(I.value)});const R=te({textField:o.textField},z.slots),B=o.layout??Xm;let W=O;A&&(y?W=`${O}-label`:W=void 0);const U=te({},i,{toolbar:te({},i==null?void 0:i.toolbar,{titleId:O}),mobilePaper:te({"aria-labelledby":W},i==null?void 0:i.mobilePaper)}),G=Mt(w,z.unstableFieldRef);return{renderPicker:()=>v.jsxs(Zw,{contextValue:$,localeText:T,children:[v.jsx(H,te({},z,{slots:R,slotProps:U,unstableFieldRef:G})),v.jsx(Sq,te({},D,{open:N,slots:o,slotProps:U,children:v.jsx(B,te({},L,U==null?void 0:U.layout,{slots:o,slotProps:U,children:k()}))}))]})}},uE=_.forwardRef(function(e,n){var u,f;const r=Wo(),o=Wt(),i=cT(e,"MuiMobileDatePicker"),s=te({day:Ea,month:Ea,year:Ea},i.viewRenderers),a=te({},i,{viewRenderers:s,format:Tm(o,i,!1),slots:te({field:bd},i.slots),slotProps:te({},i.slotProps,{field:h=>{var m;return te({},Tu((m=i.slotProps)==null?void 0:m.field,h),Vw(i),{ref:n})},toolbar:te({hidden:!1},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:l}=wq({props:a,valueManager:So,valueType:"date",getOpenDialogAriaText:zw({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:Gl});return l()});uE.propTypes={autoFocus:c.bool,className:c.string,closeOnSelect:c.bool,dayOfWeekFormatter:c.func,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disableOpenPicker:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,enableAccessibleFieldDOMStructure:c.any,fixedWeekNumber:c.number,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),inputRef:hn,label:c.node,loading:c.bool,localeText:c.object,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),name:c.string,onAccept:c.func,onChange:c.func,onClose:c.func,onError:c.func,onMonthChange:c.func,onOpen:c.func,onSelectedSectionsChange:c.func,onViewChange:c.func,onYearChange:c.func,open:c.bool,openTo:c.oneOf(["day","month","year"]),orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),viewRenderers:c.shape({day:c.func,month:c.func,year:c.func}),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])};const Tq=["desktopModeMediaQuery"],dE=_.forwardRef(function(e,n){const r=jt({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=Mz}=r,i=nt(r,Tq);return aT(o,{defaultMatches:!0})?v.jsx(sE,te({ref:n},i)):v.jsx(uE,te({ref:n},i))});process.env.NODE_ENV!=="production"&&(dE.propTypes={autoFocus:c.bool,className:c.string,closeOnSelect:c.bool,dayOfWeekFormatter:c.func,defaultValue:c.object,desktopModeMediaQuery:c.string,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disableOpenPicker:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,enableAccessibleFieldDOMStructure:c.any,fixedWeekNumber:c.number,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),inputRef:hn,label:c.node,loading:c.bool,localeText:c.object,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),name:c.string,onAccept:c.func,onChange:c.func,onClose:c.func,onError:c.func,onMonthChange:c.func,onOpen:c.func,onSelectedSectionsChange:c.func,onViewChange:c.func,onYearChange:c.func,open:c.bool,openTo:c.oneOf(["day","month","year"]),orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),viewRenderers:c.shape({day:c.func,month:c.func,year:c.func}),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])});const Eq={invalidDate:"Date selected is invalid",minDate:"Date selected is too far in the past",maxDate:"Date selected is too far in the future",disableFuture:"Date selected cannot be in the future",disablePast:"Date selected cannot be in the past"},Id=t=>{var D;const{name:e,label:n=Cn(e),required:r=!1,readOnly:o=!1,format:i="MM/DD/YYYY",errorMessages:s,isDatePicker:a=!1,margin:l="dense",staticLabel:u=!1,staticLabelProps:f={fontSize:".9em",color:"#808080"}}=t,[h,m,g]=Ht.useField({name:e}),{setValue:b,setError:y}=g,{value:S}=h,{error:C}=m,[E,T]=_.useState(null),w={...Eq,...s},O=["staticLabel","staticLabelProps","label","errorMessages","isDatePicker","dateFieldProps","datePickerProps","useIso","onChange"];_.useEffect(()=>{const L=E?w[E]??E:"";y(L)},[E]);const A=L=>{if(L!=null)return L==null||L==""?null:mn.utc(L)},N={label:u?void 0:n,onChange:(L,k)=>{let I="";try{const $=L==null?void 0:L.utc();I=($==null?void 0:$.toISOString())??""}catch{}b(I),t.onChange&&t.onChange(I,k)},format:i,onError:T,value:A(S),...Yn({...t},O)};return v.jsxs(F.FormControl,{fullWidth:!0,margin:l,children:[(u||o)&&v.jsx(F.Typography,{...f,children:n}),o?v.jsx(F.Typography,{children:(D=A(S))==null?void 0:D.format(i)}):v.jsxs(F.Box,{children:[v.jsx(nm,{dateAdapter:z5,children:v.jsx(F.Box,{children:a?v.jsx(dE,{...N,slotProps:{textField:{fullWidth:!0,error:!!C,required:!!r}}}):v.jsx(bd,{id:`${e}-df`,...N,fullWidth:!0,slotProps:{textField:{error:!!C}}})})}),v.jsx(Jn,{name:e,id:`${e}-err`})]})]})},Mq=t=>{const{nameTo:e,nameFrom:n,labelTo:r=Cn(e),labelFrom:o=Cn(n),fromFieldProps:i,toFieldProps:s,staticLabels:a=!1}=t,l=["nameTo","nameFrom","toFieldProps","fromFieldProps","labelTo","labelFrom"],u=F.useMediaQuery(F.useTheme().breakpoints.down("sm"));return v.jsxs("div",{style:{display:"flex",flexDirection:u?"column":"row",justifyContent:"space-between",gap:"10px"},children:[v.jsx(Id,{name:n,staticLabel:a,label:o,...Yn({...t,...i},l)}),v.jsx(Id,{name:e,staticLabel:a,label:r,...Yn({...t,...s},l)})]})};function Dn(t){this.content=t}Dn.prototype={constructor:Dn,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new Dn(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Dn(n)},addToStart:function(t,e){return new Dn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Dn(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new Dn(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Dn.from(t),t.size?new Dn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Dn.from(t),t.size?new Dn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Dn.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},Dn.from=function(t){if(t instanceof Dn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Dn(e)};function fE(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=fE(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function pE(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),a=e.child(--i),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,f=Math.min(s.text.length,a.text.length);for(;u<f&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=pE(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class Te{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,o+a,i||null,s)!==!1&&l.content.size){let f=a+1;l.nodesBetween(Math.max(0,e-f),Math.min(l.content.size,n-f),r,o+f)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new Te(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let a=this.content[i],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=l}return new Te(r,o)}cutByIndex(e,n){return e==n?Te.empty:e==0&&n==this.content.length?this:new Te(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new Te(o,i)}addToStart(e){return new Te([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Te(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return fE(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return pE(this,e,n,r)}findIndex(e,n=-1){if(e==0)return Dd(0,e);if(e==this.size)return Dd(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||n>0?Dd(r+1,s):Dd(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Te.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Te(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Te.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Te(n||e,r)}static from(e){if(!e)return Te.empty;if(e instanceof Te)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Te([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Te.empty=new Te([],0);const Qm={index:0,offset:0};function Dd(t,e){return Qm.index=t,Qm.offset=e,Qm}function Pd(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Pd(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Pd(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Lt=class Nx{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Pd(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Nx.none;if(e instanceof Nx)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};Lt.none=[];class _d extends Error{}class Ie{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=mE(this.content,e+this.openStart,n);return r&&new Ie(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Ie(hE(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Ie.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ie(Te.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new Ie(e,r,o)}}Ie.empty=new Ie(Te.empty,0,0);function hE(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(o==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(hE(i.content,e-o-1,n-o-1)))}function mE(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return t.cut(0,e).append(n).append(t.cut(e));let a=mE(s.content,e-i-1,n);return a&&t.replaceChild(o,s.copy(a))}function Oq(t,e,n){if(n.openStart>t.depth)throw new _d("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new _d("Inconsistent open depths");return gE(t,e,n,0)}function gE(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=gE(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,a=s.content;return Ss(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=kq(n,t);return Ss(i,bE(t,s,a,e,r))}else return Ss(i,Nd(t,e,r))}function yE(t,e){if(!e.type.compatibleContent(t.type))throw new _d("Cannot join "+e.type.name+" onto "+t.type.name)}function eg(t,e,n){let r=t.node(n);return yE(r,e.node(n)),r}function xs(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function uc(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(xs(t.nodeAfter,r),i++));for(let a=i;a<s;a++)xs(o.child(a),r);e&&e.depth==n&&e.textOffset&&xs(e.nodeBefore,r)}function Ss(t,e){return t.type.checkContent(e),t.copy(e)}function bE(t,e,n,r,o){let i=t.depth>o&&eg(t,e,o+1),s=r.depth>o&&eg(n,r,o+1),a=[];return uc(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(yE(i,s),xs(Ss(i,bE(t,e,n,r,o+1)),a)):(i&&xs(Ss(i,Nd(t,e,o+1)),a),uc(e,n,o,a),s&&xs(Ss(s,Nd(n,r,o+1)),a)),uc(r,null,o,a),new Te(a)}function Nd(t,e,n){let r=[];if(uc(null,t,n,r),t.depth>n){let o=eg(t,e,n+1);xs(Ss(o,Nd(t,e,n+1)),r)}return uc(e,null,n,r),new Te(r)}function kq(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(Te.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class dc{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Lt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let a=r;r=o,o=a}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ld(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,a,o+l),!u||(s=s.child(a),s.isText))break;i=u-1,o+=l+1}return new dc(n,r,i)}static resolveCached(e,n){let r=vE.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else vE.set(e,r=new Aq);let o=r.elts[r.i]=dc.resolve(e,n);return r.i=(r.i+1)%Iq,o}}class Aq{constructor(){this.elts=[],this.i=0}}const Iq=12,vE=new WeakMap;class Ld{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Dq=Object.create(null);let Ti=class Lx{constructor(e,n,r,o=Lt.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||Te.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Pd(this.attrs,n||e.defaultAttrs||Dq)&&Lt.sameSet(this.marks,r||Lt.none)}copy(e=null){return e==this.content?this:new Lx(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Lx(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Ie.empty;let o=this.resolve(e),i=this.resolve(n),s=r?0:o.sharedDepth(n),a=o.start(s),u=o.node(s).content.cut(o.pos-a,i.pos-a);return new Ie(u,o.depth-s,i.depth-s)}replace(e,n,r){return Oq(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return dc.resolveCached(this,e)}resolveNoCache(e){return dc.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),xE(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=Te.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Lt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Lt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=Te.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Ti.prototype.text=void 0;class $d extends Ti{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):xE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new $d(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new $d(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function xE(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Cs{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Pq(e,n);if(r.next==null)return Cs.empty;let o=SE(r);r.next&&r.err("Unexpected trailing text");let i=Bq(Rq(o));return Vq(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return Te.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:f,next:h}=s.next[u];if(!(f.isText||f.hasRequiredAttrs())&&o.indexOf(h)==-1){o.push(h);let m=i(h,a.concat(f));if(m)return m}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let a=o;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:a,next:l}=i.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!o.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:o}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
235
+ `)}}Cs.empty=new Cs(!0);class Pq{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function SE(t){let e=[];do e.push(_q(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function _q(t){let e=[];do e.push(Nq(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Nq(t){let e=Fq(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Lq(t,e);else break;return e}function CE(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Lq(t,e){let n=CE(t),r=n;return t.eat(",")&&(t.next!="}"?r=CE(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function $q(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function Fq(t){if(t.eat("(")){let e=SE(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=$q(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Rq(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,a,l){let u={term:l,to:a};return e[s].push(u),u}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(i(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=i(s.exprs[l],a);if(l==s.exprs.length-1)return u;o(u,a=n())}else if(s.type=="star"){let l=n();return r(a,l),o(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return o(i(s.expr,a),l),o(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let f=n();o(i(s.expr,l),f),l=f}if(s.max==-1)o(i(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let f=n();r(l,f),o(i(s.expr,l),f),l=f}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function wE(t,e){return e-t}function TE(t,e){let n=[];return r(e),n.sort(wE);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:a,to:l}=i[s];!a&&n.indexOf(l)==-1&&r(l)}}}function Bq(t){let e=Object.create(null);return n(TE(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let f=0;f<o.length;f++)o[f][0]==a&&(u=o[f][1]);TE(t,l).forEach(f=>{u||o.push([a,u=[]]),u.indexOf(f)==-1&&u.push(f)})})});let i=e[r.join(",")]=new Cs(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let a=o[s][1].sort(wE);i.next.push({type:o[s][0],next:e[a.join(",")]||n(a)})}return i}}function Vq(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let a=0;a<o.next.length;a++){let{type:l,next:u}=o.next[a];s.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(u)==-1&&r.push(u)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function EE(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function ME(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function OE(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function kE(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Hq(t,r,e[r]);return n}let AE=class QL{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=kE(e,r.attrs),this.defaultAttrs=EE(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Cs.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ME(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ti(this,this.computeAttrs(e),Te.from(n),Lt.setFrom(r))}createChecked(e=null,n,r){return n=Te.from(n),this.checkContent(n),new Ti(this,this.computeAttrs(e),n,Lt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=Te.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(Te.empty,!0);return i?new Ti(this,e,n.append(i),Lt.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){OE(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:Lt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new QL(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function zq(t,e,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class Hq{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?zq(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Fd{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=kE(e,o.attrs),this.excluded=null;let i=EE(this.attrs);this.instance=i?new Lt(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Lt(this,ME(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Fd(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){OE(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let IE=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=Dn.from(e.nodes),n.marks=Dn.from(e.marks||{}),this.nodes=AE.compile(this.spec.nodes,this),this.marks=Fd.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=Cs.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?DE(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:DE(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof AE){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new $d(r,r.defaultAttrs,e,Lt.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return Ti.fromJSON(this,e)}markFromJSON(e){return Lt.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function DE(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let a in t.marks){let l=t.marks[a];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function jq(t){return t.tag!=null}function Wq(t){return t.style!=null}class Ei{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(jq(o))this.tags.push(o);else if(Wq(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new LE(this,n,!1);return r.addAll(e,Lt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new LE(this,n,!0);return r.addAll(e,Lt.none,n.from,n.to),Ie.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(Kq(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<i)break}n.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=$E(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=$E(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ei(e,Ei.schemaRules(e)))}}const PE={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},qq={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},_E={ol:!0,ul:!0},fc=1,tg=2,pc=4;function NE(t,e,n){return e!=null?(e?fc:0)|(e==="full"?tg:0):t&&t.whitespace=="pre"?fc|tg:n&~pc}class Rd{constructor(e,n,r,o,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=Lt.none,this.match=i||(s&pc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Te.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&fc)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=Te.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Te.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!PE.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class LE{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=NE(null,n.preserveWhitespace,0)|(r?pc:0);o?i=new Rd(o.type,o.attrs,Lt.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new Rd(null,null,Lt.none,!0,null,s):i=new Rd(e.schema.topNodeType,null,Lt.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&tg?"full":this.localPreserveWS||(o.options&fc)>0;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
236
+ `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=o.content[o.content.length-1],a=e.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;_E.hasOwnProperty(s)&&this.parser.normalizeLists&&Uq(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:qq.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,f=this.needsBlock;if(PE.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let h=l&&l.skip?n:this.readStyles(e,n);h&&this.addAll(e,h),u&&this.sync(i),this.needsBlock=f}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
237
+ `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(i,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r)||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(a)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=o==null?null:e.childNodes[o];s!=a;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n){let r,o;for(let i=this.open;i>=0;i--){let s=this.nodes[i],a=s.findWrapping(e);if(a&&(!r||r.length>a.length)&&(r=a,o=s,!a.length)||s.solid)break}if(!r)return null;this.sync(o);for(let i=0;i<r.length;i++)n=this.enterInner(r[i],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let r=this.findPlace(e,n);if(r){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let i=Lt.none;for(let s of r.concat(e.marks))(o.type?o.type.allowsMarkType(s.type):FE(s.type,e.type))&&(i=s.addToSet(i));return o.content.push(e.mark(i)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=NE(e,i,s.options);s.options&pc&&s.content.length==0&&(a|=pc);let l=Lt.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):FE(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Rd(e,n,l,o,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=fc)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let f=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!f||f.name!=u&&!f.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Uq(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&_E.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Kq(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function $E(t){let e={};for(let n in t)e[n]=t[n];return e}function FE(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=a=>{i.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:f}=a.edge(l);if(u==e||i.indexOf(f)<0&&s(f))return!0}};if(s(o.contentMatch))return!0}}class ws{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=ng(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let a=0,l=0;for(;a<i.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(i[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<i.length;)o=i.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],f=this.serializeMark(u,s.isInline,n);f&&(i.push([u,o]),o.appendChild(f.dom),o=f.contentDOM||f.dom)}}o.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=Bd(ng(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Bd(ng(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return Bd(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ws(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=RE(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return RE(e.marks)}}function RE(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ng(t){return t.document||window.document}const BE=new WeakMap;function Yq(t){let e=BE.get(t);return e===void 0&&BE.set(t,e=Gq(t)),e}function Gq(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function Bd(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Yq(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let a,l=n?t.createElementNS(n,o):t.createElement(o),u=e[1],f=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){f=2;for(let h in u)if(u[h]!=null){let m=h.indexOf(" ");m>0?l.setAttributeNS(h.slice(0,m),h.slice(m+1),u[h]):l.setAttribute(h,u[h])}}for(let h=f;h<e.length;h++){let m=e[h];if(m===0){if(h<e.length-1||h>f)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:g,contentDOM:b}=Bd(t,m,n,r);if(l.appendChild(g),b){if(a)throw new RangeError("Multiple content holes");a=b}}}return{dom:l,contentDOM:a}}const VE=65535,zE=Math.pow(2,16);function Jq(t,e){return t+e*zE}function HE(t){return t&VE}function Zq(t){return(t-(t&VE))/zE}const jE=1,WE=2,Vd=4,qE=8;class rg{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&qE)>0}get deletedBefore(){return(this.delInfo&(jE|Vd))>0}get deletedAfter(){return(this.delInfo&(WE|Vd))>0}get deletedAcross(){return(this.delInfo&Vd)>0}}class xr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&xr.empty)return xr.empty}recover(e){let n=0,r=HE(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+Zq(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?o:0);if(l>e)break;let u=this.ranges[a+i],f=this.ranges[a+s],h=l+u;if(e<=h){let m=u?e==l?-1:e==h?1:n:n,g=l+o+(m<0?0:f);if(r)return g;let b=e==(n<0?l:h)?null:Jq(a/3,e-l),y=e==l?WE:e==h?jE:Vd;return(n<0?e!=l:e!=h)&&(y|=qE),new rg(g,y,b)}o+=f-u}return r?e+o:new rg(e+o,0,null)}touches(e,n){let r=0,o=HE(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+i],f=l+u;if(e<=f&&a==o*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],a=s-(this.inverted?i:0),l=s+(this.inverted?0:i),u=this.ranges[o+n],f=this.ranges[o+r];e(a,a+u,l,l+f),i+=f-u}}invert(){return new xr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?xr.empty:new xr(e<0?[0,-e,0]:[0,0,e])}}xr.empty=new xr([]);class hc{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new hc(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new hc;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],a=s.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(a.recover);continue}}o|=a.delInfo,e=a.pos}return r?e:new rg(e,o,null)}}const og=Object.create(null);class zn{getMap(){return xr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=og[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in og)throw new RangeError("Duplicate use of step JSON ID "+e);return og[e]=n,n.prototype.jsonID=e,n}}class gn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new gn(e,null)}static fail(e){return new gn(null,e)}static fromReplace(e,n,r,o){try{return gn.ok(e.replace(n,r,o))}catch(i){if(i instanceof _d)return gn.fail(i.message);throw i}}}function ig(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(ig(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return Te.fromArray(r)}class Mi extends zn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Ie(ig(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return gn.fromReplace(e,this.from,this.to,i)}invert(){return new To(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Mi(n.pos,r.pos,this.mark)}merge(e){return e instanceof Mi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Mi(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Mi(n.from,n.to,e.markFromJSON(n.mark))}}zn.jsonID("addMark",Mi);class To extends zn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Ie(ig(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return gn.fromReplace(e,this.from,this.to,r)}invert(){return new Mi(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new To(n.pos,r.pos,this.mark)}merge(e){return e instanceof To&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new To(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new To(n.from,n.to,e.markFromJSON(n.mark))}}zn.jsonID("removeMark",To);class Oi extends zn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return gn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return gn.fromReplace(e,this.pos,this.pos+1,new Ie(Te.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new Oi(this.pos,n.marks[o]);return new Oi(this.pos,this.mark)}}return new Ma(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Oi(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Oi(n.pos,e.markFromJSON(n.mark))}}zn.jsonID("addNodeMark",Oi);class Ma extends zn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return gn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return gn.fromReplace(e,this.pos,this.pos+1,new Ie(Te.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Oi(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Ma(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ma(n.pos,e.markFromJSON(n.mark))}}zn.jsonID("removeNodeMark",Ma);class Tn extends zn{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&sg(e,this.from,this.to)?gn.fail("Structure replace would overwrite content"):gn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new xr([this.from,this.to-this.from,this.slice.size])}invert(e){return new Tn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Tn(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Tn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Ie.empty:new Ie(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Tn(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Ie.empty:new Ie(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Tn(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Tn(n.from,n.to,Ie.fromJSON(e,n.slice),!!n.structure)}}zn.jsonID("replace",Tn);class En extends zn{constructor(e,n,r,o,i,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=a}apply(e){if(this.structure&&(sg(e,this.from,this.gapFrom)||sg(e,this.gapTo,this.to)))return gn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return gn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?gn.fromReplace(e,this.from,this.to,r):gn.fail("Content does not fit in gap")}getMap(){return new xr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new En(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new En(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new En(n.from,n.to,n.gapFrom,n.gapTo,Ie.fromJSON(e,n.slice),n.insert,!!n.structure)}}zn.jsonID("replaceAround",En);function sg(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function Xq(t,e,n,r){let o=[],i=[],s,a;t.doc.nodesBetween(e,n,(l,u,f)=>{if(!l.isInline)return;let h=l.marks;if(!r.isInSet(h)&&f.type.allowsMarkType(r.type)){let m=Math.max(u,e),g=Math.min(u+l.nodeSize,n),b=r.addToSet(h);for(let y=0;y<h.length;y++)h[y].isInSet(b)||(s&&s.to==m&&s.mark.eq(h[y])?s.to=g:o.push(s=new To(m,g,h[y])));a&&a.to==m?a.to=g:i.push(a=new Mi(m,g,r))}}),o.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function Qq(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof Fd){let u=s.marks,f;for(;f=r.isInSet(u);)(l||(l=[])).push(f),u=f.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(a+s.nodeSize,n);for(let f=0;f<l.length;f++){let h=l[f],m;for(let g=0;g<o.length;g++){let b=o[g];b.step==i-1&&h.eq(o[g].style)&&(m=b)}m?(m.to=u,m.step=i):o.push({style:h,from:Math.max(a,e),to:u,step:i})}}}),o.forEach(s=>t.step(new To(s.from,s.to,s.style)))}function ag(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<i.childCount;l++){let u=i.child(l),f=a+u.nodeSize,h=r.matchType(u.type);if(!h)s.push(new Tn(a,f,Ie.empty));else{r=h;for(let m=0;m<u.marks.length;m++)n.allowsMarkType(u.marks[m].type)||t.step(new To(a,f,u.marks[m]));if(o&&u.isText&&n.whitespace!="pre"){let m,g=/\r?\n|\r/g,b;for(;m=g.exec(u.text);)b||(b=new Ie(Te.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Tn(a+m.index,a+m.index+m[0].length,b))}}a=f}if(!r.validEnd){let l=r.fillBefore(Te.empty,!0);t.replace(a,a,new Ie(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function e9(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Oa(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),i=t.$from.index(r),s=t.$to.indexAfter(r);if(r<t.depth&&o.canReplace(i,s,n))return r;if(r==0||o.type.spec.isolating||!e9(o,i,s))break}return null}function t9(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),a=o.after(i+1),l=s,u=a,f=Te.empty,h=0;for(let b=i,y=!1;b>n;b--)y||r.index(b)>0?(y=!0,f=Te.from(r.node(b).copy(f)),h++):l--;let m=Te.empty,g=0;for(let b=i,y=!1;b>n;b--)y||o.after(b+1)<o.end(b)?(y=!0,m=Te.from(o.node(b).copy(m)),g++):u++;t.step(new En(l,u,s,a,new Ie(f.append(m),h,g),f.size-h,!0))}function lg(t,e,n=null,r=t){let o=n9(t,e),i=o&&r9(r,e);return i?o.map(UE).concat({type:e,attrs:n}).concat(i.map(UE)):null}function UE(t){return{type:t,attrs:null}}function n9(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function r9(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let u=r;l&&u<o;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function o9(t,e,n){let r=Te.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Te.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new En(o,i,o,i,new Ie(r,0,0),n.length,!0))}function i9(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,a)=>{let l=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,l)&&s9(t.doc,t.mapping.slice(i).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let g=r.whitespace=="pre",b=!!r.contentMatch.matchType(r.schema.linebreakReplacement);g&&!b?u=!1:!g&&b&&(u=!0)}u===!1&&YE(t,s,a,i),ag(t,t.mapping.slice(i).map(a,1),r,void 0,u===null);let f=t.mapping.slice(i),h=f.map(a,1),m=f.map(a+s.nodeSize,1);return t.step(new En(h,m,h+1,m-1,new Ie(Te.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&KE(t,s,a,i),!1}})}function KE(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(o.text);){let l=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function YE(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
238
+ `))}})}function s9(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function a9(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new En(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Ie(Te.from(s),0,0),1,!0))}function ka(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,f=n-2;u>i;u--,f--){let h=o.node(u),m=o.index(u);if(h.type.spec.isolating)return!1;let g=h.content.cutByIndex(m,h.childCount),b=r&&r[f+1];b&&(g=g.replaceChild(0,b.type.create(b.attrs)));let y=r&&r[f]||h;if(!h.canReplace(m+1,h.childCount)||!y.type.validContent(g))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function l9(t,e,n=1,r){let o=t.doc.resolve(e),i=Te.empty,s=Te.empty;for(let a=o.depth,l=o.depth-n,u=n-1;a>l;a--,u--){i=Te.from(o.node(a).copy(i));let f=r&&r[u];s=Te.from(f?f.type.create(f.attrs,s):o.node(a).copy(s))}t.step(new Tn(e,e,new Ie(i.append(s),n,n),!0))}function ki(t,e){let n=t.resolve(e),r=n.index();return GE(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function c9(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function GE(t,e){return!!(t&&e&&!t.isLeaf&&c9(t,e))}function zd(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,a=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&GE(i,s)&&r.node(o).canReplace(a,a+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function u9(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let f=s.whitespace=="pre",h=!!s.contentMatch.matchType(o);f&&!h?r=!1:!f&&h&&(r=!0)}let a=t.steps.length;if(r===!1){let f=t.doc.resolve(e+n);YE(t,f.node(),f.before(),a)}s.inlineContent&&ag(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(a),u=l.map(e-n);if(t.step(new Tn(u,l.map(e+n,-1),Ie.empty,!0)),r===!0){let f=t.doc.resolve(u);KE(t,f.node(),f.before(),t.steps.length)}return t}function d9(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function JE(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),u=r.node(s),f=!1;if(i==1)f=u.canReplace(l,l,o);else{let h=u.contentMatchAt(l).findWrapping(o.firstChild.type);f=h&&u.canReplaceWith(l,l,h[0])}if(f)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Hd(t,e,n=e,r=Ie.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return ZE(o,i,r)?new Tn(e,n,r):new f9(o,i,r).fit()}function ZE(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class f9{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Te.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=Te.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let l=new Ie(i,s,a);return e>-1?new En(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Tn(r.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=cg(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],f,h=null;if(n==1&&(s?u.matchType(s.type)||(h=u.fillBefore(Te.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:h};if(n==2&&s&&(f=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:f};if(i&&u.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=cg(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Ie(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=cg(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new Ie(mc(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Ie(mc(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let y=0;y<i.length;y++)this.openFrontierNode(i[y]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,f=[],{match:h,type:m}=this.frontier[n];if(o){for(let y=0;y<o.childCount;y++)f.push(o.child(y));h=h.matchFragment(o)}let g=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let y=a.child(u),S=h.matchType(y.type);if(!S)break;u++,(u>1||l==0||y.content.size)&&(h=S,f.push(XE(y.mark(m.allowedMarks(y.marks)),u==1?l:0,u==a.childCount?g:-1)))}let b=u==a.childCount;b||(g=-1),this.placed=gc(this.placed,n,Te.from(f)),this.frontier[n].match=h,b&&g<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,S=a;y<g;y++){let C=S.lastChild;this.frontier.push({type:C.type,match:C.contentMatchAt(C.childCount)}),S=C.content}this.unplaced=b?e==0?Ie.empty:new Ie(mc(s.content,e-1,1),e-1,g<0?s.openEnd:e-1):new Ie(mc(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!ug(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=ug(e,n,o,r,i);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],f=ug(e,a,u,l,!0);if(!f||f.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=gc(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=gc(this.placed,this.depth,Te.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Te.empty,!0);n.childCount&&(this.placed=gc(this.placed,this.frontier.length,n))}}function mc(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(mc(t.firstChild.content,e-1,n)))}function gc(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(gc(t.lastChild.content,e-1,n)))}function cg(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function XE(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,XE(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Te.empty,!0)))),t.copy(r)}function ug(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!p9(n,i.content,s)?a:null}function p9(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function h9(t){return t.spec.defining||t.spec.definingForContent}function m9(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(ZE(o,i,r))return t.step(new Tn(e,n,r));let s=eM(o,t.doc.resolve(n));s[s.length-1]==0&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let m=o.depth,g=o.pos-1;m>0;m--,g--){let b=o.node(m).type.spec;if(b.defining||b.definingAsContext||b.isolating)break;s.indexOf(m)>-1?a=m:o.before(m)==g&&s.splice(1,0,-m)}let l=s.indexOf(a),u=[],f=r.openStart;for(let m=r.content,g=0;;g++){let b=m.firstChild;if(u.push(b),g==r.openStart)break;m=b.content}for(let m=f-1;m>=0;m--){let g=u[m],b=h9(g.type);if(b&&!g.sameMarkup(o.node(Math.abs(a)-1)))f=m;else if(b||!g.type.isTextblock)break}for(let m=r.openStart;m>=0;m--){let g=(m+f+1)%(r.openStart+1),b=u[g];if(b)for(let y=0;y<s.length;y++){let S=s[(y+l)%s.length],C=!0;S<0&&(C=!1,S=-S);let E=o.node(S-1),T=o.index(S-1);if(E.canReplaceWith(T,T,b.type,b.marks))return t.replace(o.before(S),C?i.after(S):n,new Ie(QE(r.content,0,r.openStart,g),g,r.openEnd))}}let h=t.steps.length;for(let m=s.length-1;m>=0&&(t.replace(e,n,r),!(t.steps.length>h));m--){let g=s[m];g<0||(e=o.before(g),n=i.after(g))}}function QE(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(QE(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(Te.empty,!0))}return t}function g9(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=d9(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Ie(Te.from(r),0,0))}function y9(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=eM(r,o);for(let s=0;s<i.length;s++){let a=i[s],l=s==i.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),o.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return t.delete(r.before(a),o.after(a))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function eM(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class Aa extends zn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return gn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return gn.fromReplace(e,this.pos,this.pos+1,new Ie(Te.from(o),0,n.isLeaf?0:1))}getMap(){return xr.empty}invert(e){return new Aa(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Aa(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Aa(n.pos,n.attr,n.value)}}zn.jsonID("attr",Aa);class yc extends zn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return gn.ok(r)}getMap(){return xr.empty}invert(e){return new yc(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new yc(n.attr,n.value)}}zn.jsonID("docAttr",yc);let Ia=class extends Error{};Ia=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},Ia.prototype=Object.create(Error.prototype),Ia.prototype.constructor=Ia,Ia.prototype.name="TransformError";class dg{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new hc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Ia(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Ie.empty){let o=Hd(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Ie(Te.from(r),0,0))}delete(e,n){return this.replace(e,n,Ie.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return m9(this,e,n,r),this}replaceRangeWith(e,n,r){return g9(this,e,n,r),this}deleteRange(e,n){return y9(this,e,n),this}lift(e,n){return t9(this,e,n),this}join(e,n=1){return u9(this,e,n),this}wrap(e,n){return o9(this,e,n),this}setBlockType(e,n=e,r,o=null){return i9(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return a9(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new Aa(e,n,r)),this}setDocAttribute(e,n){return this.step(new yc(e,n)),this}addNodeMark(e,n){return this.step(new Oi(e,n)),this}removeNodeMark(e,n){if(!(n instanceof Lt)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Ma(e,n)),this}split(e,n=1,r){return l9(this,e,n,r),this}addMark(e,n,r){return Xq(this,e,n,r),this}removeMark(e,n,r){return Qq(this,e,n,r),this}clearIncompatible(e,n,r){return ag(this,e,n,r),this}}const fg=Object.create(null);class Xe{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new tM(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Ie.empty){let r=n.content.lastChild,o=null;for(let a=0;a<n.openEnd;a++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],f=e.mapping.slice(i);e.replaceRange(f.map(l.pos),f.map(u.pos),a?Ie.empty:n),a==0&&oM(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:a}=o[i],l=e.mapping.slice(r),u=l.map(s.pos),f=l.map(a.pos);i?e.deleteRange(u,f):(e.replaceRangeWith(u,f,n),oM(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new Je(e):Da(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=n<0?Da(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Da(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Rr(e.node(0))}static atStart(e){return Da(e,e,0,0,1)||new Rr(e)}static atEnd(e){return Da(e,e,e.content.size,e.childCount,-1)||new Rr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=fg[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in fg)throw new RangeError("Duplicate use of selection JSON ID "+e);return fg[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Je.between(this.$anchor,this.$head).getBookmark()}}Xe.prototype.visible=!0;class tM{constructor(e,n){this.$from=e,this.$to=n}}let nM=!1;function rM(t){!nM&&!t.parent.inlineContent&&(nM=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Je extends Xe{constructor(e,n=e){rM(e),rM(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Xe.near(r);let o=e.resolve(n.map(this.anchor));return new Je(o.parent.inlineContent?o:r,r)}replace(e,n=Ie.empty){if(super.replace(e,n),n==Ie.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Je&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new jd(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Je(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Xe.findFrom(n,r,!0)||Xe.findFrom(n,-r,!0);if(i)n=i.$head;else return Xe.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Xe.findFrom(e,-r,!0)||Xe.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new Je(e,n)}}Xe.jsonID("text",Je);class jd{constructor(e,n){this.anchor=e,this.head=n}map(e){return new jd(e.map(this.anchor),e.map(this.head))}resolve(e){return Je.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ke extends Xe{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?Xe.near(i):new Ke(i)}content(){return new Ie(Te.from(this.node),0,0)}eq(e){return e instanceof Ke&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new pg(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ke(e.resolve(n.anchor))}static create(e,n){return new Ke(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Ke.prototype.visible=!1,Xe.jsonID("node",Ke);class pg{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new jd(r,r):new pg(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Ke.isSelectable(r)?new Ke(n):Xe.near(n)}}class Rr extends Xe{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Ie.empty){if(n==Ie.empty){e.delete(0,e.doc.content.size);let r=Xe.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Rr(e)}map(e){return new Rr(e)}eq(e){return e instanceof Rr}getBookmark(){return b9}}Xe.jsonID("all",Rr);const b9={map(){return this},resolve(t){return new Rr(t)}};function Da(t,e,n,r,o,i=!1){if(e.inlineContent)return Je.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let a=e.child(s);if(a.isAtom){if(!i&&Ke.isSelectable(a))return Ke.create(t,n-(o<0?a.nodeSize:0))}else{let l=Da(t,a,n+o,o<0?a.childCount:0,o,i);if(l)return l}n+=a.nodeSize*o}return null}function oM(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof Tn||o instanceof En))return;let i=t.mapping.maps[r],s;i.forEach((a,l,u,f)=>{s==null&&(s=f)}),t.setSelection(Xe.near(t.doc.resolve(s),n))}const iM=1,Wd=2,sM=4;class v9 extends dg{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|iM)&~Wd,this.storedMarks=null,this}get selectionSet(){return(this.updated&iM)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Wd,this}ensureMarks(e){return Lt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Wd)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Wd,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Lt.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),this.selection.empty||this.setSelection(Xe.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=sM,this}get scrolledIntoView(){return(this.updated&sM)>0}}function aM(t,e){return!e||!t?t:t.bind(e)}class bc{constructor(e,n,r){this.name=e,this.init=aM(n.init,r),this.apply=aM(n.apply,r)}}const x9=[new bc("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new bc("selection",{init(t,e){return t.selection||Xe.atStart(e.doc)},apply(t){return t.selection}}),new bc("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new bc("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class hg{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x9.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new bc(r.key,r.spec.state,r))})}}class Pa{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=o?o[s].n:0,u=o?o[s].state:this,f=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(f&&r.filterTransaction(f,s)){if(f.setMeta("appendedTransaction",e),!o){o=[];for(let h=0;h<this.config.plugins.length;h++)o.push(h<s?{state:r,n:n.length}:{state:this,n:0})}n.push(f),r=r.applyInner(f),i=!0}o&&(o[s]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Pa(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new v9(this)}static create(e){let n=new hg(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Pa(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new hg(this.schema,e.plugins),r=n.fields,o=new Pa(n);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new hg(e.schema,e.plugins),i=new Pa(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Ti.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=Xe.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=u.fromJSON.call(l,e,n[a],i);return}}i[s.name]=s.init(e,i)}}),i}}function lM(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=lM(o,e,{})),n[r]=o}return n}class Qt{constructor(e){this.spec=e,this.props={},e.props&&lM(e.props,this,this.props),this.key=e.key?e.key.key:cM("plugin")}getState(e){return e[this.key]}}const mg=Object.create(null);function cM(t){return t in mg?t+"$"+ ++mg[t]:(mg[t]=0,t+"$")}class yn{constructor(e="key"){this.key=cM(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Pn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},_a=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let gg=null;const Ko=function(t,e,n){let r=gg||(gg=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},S9=function(){gg=null},Ts=function(t,e,n,r){return n&&(uM(t,e,n,r,-1)||uM(t,e,n,r,1))},C9=/^(img|br|input|textarea|hr)$/i;function uM(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Br(t))){let i=t.parentNode;if(!i||i.nodeType!=1||vc(t)||C9.test(t.nodeName)||t.contentEditable=="false")return!1;e=Pn(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.contentEditable=="false")return!1;e=o<0?Br(t):0}else return!1}}function Br(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function w9(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Br(t)}else if(t.parentNode&&!vc(t))e=Pn(t),t=t.parentNode;else return null}}function T9(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!vc(t))e=Pn(t)+1,t=t.parentNode;else return null}}function E9(t,e,n){for(let r=e==0,o=e==Br(t);r||o;){if(t==n)return!0;let i=Pn(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==Br(t)}}function vc(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const qd=function(t){return t.focusNode&&Ts(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Es(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function M9(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function O9(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Br(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Br(r.startContainer),r.startOffset)}}}const Eo=typeof navigator<"u"?navigator:null,dM=typeof document<"u"?document:null,Ai=Eo&&Eo.userAgent||"",yg=/Edge\/(\d+)/.exec(Ai),fM=/MSIE \d/.exec(Ai),bg=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ai),ar=!!(fM||bg||yg),Ii=fM?document.documentMode:bg?+bg[1]:yg?+yg[1]:0,io=!ar&&/gecko\/(\d+)/i.test(Ai);io&&+(/Firefox\/(\d+)/.exec(Ai)||[0,0])[1];const vg=!ar&&/Chrome\/(\d+)/.exec(Ai),Hn=!!vg,pM=vg?+vg[1]:0,Zn=!ar&&!!Eo&&/Apple Computer/.test(Eo.vendor),Na=Zn&&(/Mobile\/\w+/.test(Ai)||!!Eo&&Eo.maxTouchPoints>2),Vr=Na||(Eo?/Mac/.test(Eo.platform):!1),k9=Eo?/Win/.test(Eo.platform):!1,Yo=/Android \d/.test(Ai),xc=!!dM&&"webkitFontSmoothing"in dM.documentElement.style,A9=xc?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function I9(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Go(t,e){return typeof t=="number"?t:t[e]}function D9(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function hM(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=_a(s);continue}let a=s,l=a==i.body,u=l?I9(i):D9(a),f=0,h=0;if(e.top<u.top+Go(r,"top")?h=-(u.top-e.top+Go(o,"top")):e.bottom>u.bottom-Go(r,"bottom")&&(h=e.bottom-e.top>u.bottom-u.top?e.top+Go(o,"top")-u.top:e.bottom-u.bottom+Go(o,"bottom")),e.left<u.left+Go(r,"left")?f=-(u.left-e.left+Go(o,"left")):e.right>u.right-Go(r,"right")&&(f=e.right-u.right+Go(o,"right")),f||h)if(l)i.defaultView.scrollBy(f,h);else{let g=a.scrollLeft,b=a.scrollTop;h&&(a.scrollTop+=h),f&&(a.scrollLeft+=f);let y=a.scrollLeft-g,S=a.scrollTop-b;e={left:e.left-y,top:e.top-S,right:e.right-y,bottom:e.bottom-S}}let m=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(m))break;s=m=="absolute"?s.offsetParent:_a(s)}}function P9(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let a=t.root.elementFromPoint(i,s);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,o=l.top;break}}return{refDOM:r,refTop:o,stack:mM(t.dom)}}function mM(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=_a(r));return e}function _9({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;gM(n,r==0?0:r-e)}function gM(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let La=null;function N9(t){if(t.setActive)return t.setActive();if(La)return t.focus(La);let e=mM(t);t.focus(La==null?{get preventScroll(){return La={preventScroll:!0},!0}}:void 0),La||(La=!1,gM(e,0))}function yM(t,e){let n,r=2e8,o,i=0,s=e.top,a=e.top,l,u;for(let f=t.firstChild,h=0;f;f=f.nextSibling,h++){let m;if(f.nodeType==1)m=f.getClientRects();else if(f.nodeType==3)m=Ko(f).getClientRects();else continue;for(let g=0;g<m.length;g++){let b=m[g];if(b.top<=s&&b.bottom>=a){s=Math.max(b.bottom,s),a=Math.min(b.top,a);let y=b.left>e.left?b.left-e.left:b.right<e.left?e.left-b.right:0;if(y<r){n=f,r=y,o=y&&n.nodeType==3?{left:b.right<e.left?b.right:b.left,top:e.top}:e,f.nodeType==1&&y&&(i=h+(e.left>=(b.left+b.right)/2?1:0));continue}}else b.top>e.top&&!l&&b.left<=e.left&&b.right>=e.left&&(l=f,u={left:Math.max(b.left,Math.min(b.right,e.left)),top:b.top});!n&&(e.left>=b.right&&e.top>=b.top||e.left>=b.left&&e.top>=b.bottom)&&(i=h+1)}}return!n&&l&&(n=l,o=u,r=0),n&&n.nodeType==3?L9(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:yM(n,o)}function L9(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let i=Di(r,1);if(i.top!=i.bottom&&xg(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function xg(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function $9(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function F9(t,e,n){let{node:r,offset:o}=yM(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function R9(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let a=t.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&(!s&&l.left>r.left||l.top>r.top?o=a.posBefore:(!s&&l.right<r.left||l.bottom<r.top)&&(o=a.posAfter),s=!0),!a.contentDOM&&o<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;i=a.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function bM(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let s=t.childNodes[i];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(xg(e,u))return bM(s,e,u)}}if((i=(i+1)%r)==o)break}return t}function B9(t,e){let n=t.dom.ownerDocument,r,o=0,i=O9(n,e.left,e.top);i&&({node:r,offset:o}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let u=t.dom.getBoundingClientRect();if(!xg(e,u)||(s=bM(t.dom,e,u),!s))return null}if(Zn)for(let u=s;r&&u;u=_a(u))u.draggable&&(r=void 0);if(s=$9(s,e),r){if(io&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let f=r.childNodes[o],h;f.nodeName=="IMG"&&(h=f.getBoundingClientRect()).right<=e.left&&h.bottom>e.top&&o++}let u;xc&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=R9(t,r,o,e))}a==null&&(a=F9(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function vM(t){return t.top<t.bottom||t.left<t.right}function Di(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(vM(r))return r}return Array.prototype.find.call(n,vM)||t.getBoundingClientRect()}const V9=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function xM(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=xc||io;if(r.nodeType==3)if(s&&(V9.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=Di(Ko(r,o,o),n);if(io&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let u=Di(Ko(r,o-1,o-1),-1);if(u.top==l.top){let f=Di(Ko(r,o,o+1),-1);if(f.top!=l.top)return Sc(f,f.left<u.left)}}return l}else{let l=o,u=o,f=n<0?1:-1;return n<0&&!o?(u++,f=-1):n>=0&&o==r.nodeValue.length?(l--,f=1):n<0?l--:u++,Sc(Di(Ko(r,l,u),f),f<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==Br(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Sg(l.getBoundingClientRect(),!1)}if(i==null&&o<Br(r)){let l=r.childNodes[o];if(l.nodeType==1)return Sg(l.getBoundingClientRect(),!0)}return Sg(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==Br(r))){let l=r.childNodes[o-1],u=l.nodeType==3?Ko(l,Br(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Sc(Di(u,1),!1)}if(i==null&&o<Br(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?Ko(l,0,s?0:1):l.nodeType==1?l:null:null;if(u)return Sc(Di(u,-1),!0)}return Sc(Di(r.nodeType==3?Ko(r):r,-n),n>=0)}function Sc(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Sg(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function SM(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function z9(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return SM(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=xM(t,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Ko(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let f=l[u];if(f.bottom>f.top+1&&(n=="up"?s.top-f.top>(f.bottom-s.top)*2:f.bottom-s.bottom>(s.bottom-f.top)*2))return!1}}return!0})}const H9=/[\u0590-\u08ac]/;function j9(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=t.domSelection();return a?!H9.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:SM(t,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:f,anchorOffset:h}=t.domSelectionRange(),m=a.caretBidiLevel;a.modify("move",n,"character");let g=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:b,focusOffset:y}=t.domSelectionRange(),S=b&&!g.contains(b.nodeType==1?b:b.parentNode)||l==b&&u==y;try{a.collapse(f,h),l&&(l!=f||u!=h)&&a.extend&&a.extend(l,u)}catch{}return m!=null&&(a.caretBidiLevel=m),S}):r.pos==r.start()||r.pos==r.end()}let CM=null,wM=null,TM=!1;function W9(t,e,n){return CM==e&&wM==n?TM:(CM=e,wM=n,TM=n=="up"||n=="down"?z9(t,e,n):j9(t,e,n))}const zr=0,EM=1,Ms=2,Mo=3;class Cc{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=zr,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>Pn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let s=0;s<o.children.length;s++){let a=o.children[s];if(a.size){o=a;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],a=i+s.size;if(a>e||s instanceof kM){o=e-i;break}i=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof MM&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Pn(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Pn(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,a=0;;a++){let l=this.children[a],u=s+l.size;if(o==-1&&e<=u){let f=s+l.border;if(e>=f&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,f);e=s;for(let h=a;h>0;h--){let m=this.children[h-1];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(1)){o=Pn(m.dom)+1;break}e-=m.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let f=a+1;f<this.children.length;f++){let h=this.children[f];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){i=Pn(h.dom);break}n+=h.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let g=0,b=0;g<this.children.length;g++){let y=this.children[g],S=b+y.size;if(i>b&&s<S)return y.setSelection(e-b-y.border,n-b-y.border,r,o);b=S}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),f=r.domSelectionRange(),h=!1;if((io||Zn)&&e==n){let{node:g,offset:b}=a;if(g.nodeType==3){if(h=!!(b&&g.nodeValue[b-1]==`
239
+ `),h&&b==g.nodeValue.length)for(let y=g,S;y;y=y.parentNode){if(S=y.nextSibling){S.nodeName=="BR"&&(a=l={node:S.parentNode,offset:Pn(S)+1});break}let C=y.pmViewDesc;if(C&&C.node&&C.node.isBlock)break}}else{let y=g.childNodes[b-1];h=y&&(y.nodeName=="BR"||y.contentEditable=="false")}}if(io&&f.focusNode&&f.focusNode!=l.node&&f.focusNode.nodeType==1){let g=f.focusNode.childNodes[f.focusOffset];g&&g.contentEditable=="false"&&(o=!0)}if(!(o||h&&Zn)&&Ts(a.node,a.offset,f.anchorNode,f.anchorOffset)&&Ts(l.node,l.offset,f.focusNode,f.focusOffset))return;let m=!1;if((u.extend||e==n)&&!h){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),m=!0}catch{}}if(!m){if(e>n){let b=a;a=l,l=b}let g=document.createRange();g.setEnd(l.node,l.offset),g.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(g)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let a=r+i.border,l=s-i.border;if(e>=a&&n<=l){this.dirty=e==r||n==s?Ms:EM,e==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Mo:i.markDirty(e-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Ms:Mo}r=s}this.dirty=Ms}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Ms:EM;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class MM extends Cc{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==zr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class q9 extends Cc{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Os extends Cc{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=ws.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Os(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Mo||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Mo&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=zr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=zr}}slice(e,n,r){let o=Os.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=wg(i,n,s,r)),e>0&&(i=wg(i,0,e,r));for(let a=0;a<i.length;a++)i[a].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Pi extends Cc{constructor(e,n,r,o,i,s,a,l,u){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=a}static create(e,n,r,o,i,s){let a=i.nodeViews[n.type.name],l,u=a&&a(n,i,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,o),f=u&&u.dom,h=u&&u.contentDOM;if(n.isText){if(!f)f=document.createTextNode(n.text);else if(f.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else f||({dom:f,contentDOM:h}=ws.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!h&&!n.isText&&f.nodeName!="BR"&&(f.hasAttribute("contenteditable")||(f.contentEditable="false"),n.type.spec.draggable&&(f.draggable=!0));let m=f;return f=DM(f,r,n),u?l=new U9(e,n,r,o,f,h||null,m,u,i,s+1):n.isText?new Ud(e,n,r,o,f,m,i):new Pi(e,n,r,o,f,h||null,m,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Te.empty)}return e}matchesNode(e,n,r){return this.dirty==zr&&e.eq(this.node)&&Kd(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new Y9(this,s&&s.node,e);Z9(this.node,this.innerDeco,(u,f,h)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!h&&l.syncToMarks(f==this.node.childCount?Lt.none:this.node.child(f).marks,r,e),l.placeWidget(u,e,o)},(u,f,h,m)=>{l.syncToMarks(u.marks,r,e);let g;l.findNodeMatch(u,f,h,m)||a&&e.state.selection.from>o&&e.state.selection.to<o+u.nodeSize&&(g=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(u,f,h,g,e)||l.updateNextNode(u,f,h,e,m,o)||l.addNode(u,f,h,e,o),o+=u.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Ms)&&(s&&this.protectLocalComposition(e,s),AM(this.contentDOM,this.children,e),Na&&X9(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Je)||r<n||o>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,a=Q9(this.node.content,s,r-n,o-n);return a<0?null:{node:i,pos:a,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new q9(this,i,n,o);e.input.compositionNodes.push(s),this.children=wg(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==Mo||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=zr}updateOuterDeco(e){if(Kd(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=IM(this.dom,this.nodeDOM,Cg(this.outerDeco,this.node,n),Cg(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function OM(t,e,n,r,o){DM(r,e,t);let i=new Pi(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Ud extends Pi{constructor(e,n,r,o,i,s,a){super(e,n,r,o,i,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==Mo||this.dirty!=zr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=zr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=zr,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new Ud(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Mo)}get domAtom(){return!1}isText(e){return this.node.text==e}}class kM extends Cc{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==zr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class U9 extends Pi{constructor(e,n,r,o,i,s,a,l,u,f){super(e,n,r,o,i,s,a,u,f),this.spec=l}update(e,n,r,o){if(this.dirty==Mo)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function AM(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=PM(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(a,r);if(s instanceof Os){let l=r?r.previousSibling:t.lastChild;AM(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=PM(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const wc=function(t){t&&(this.nodeName=t)};wc.prototype=Object.create(null);const ks=[new wc];function Cg(t,e,n){if(t.length==0)return ks;let r=n?ks[0]:new wc,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new wc(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&o.length==1&&o.push(r=new wc(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return o}function IM(t,e,n,r){if(n==ks&&r==ks)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],a=n[i];if(i){let l;a&&a.nodeName==s.nodeName&&o!=t&&(l=o.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(o),a=ks[0]),o=l}K9(o,a||ks[0],s)}return o}function K9(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function DM(t,e,n){return IM(t,t,ks,Cg(e,n,t.nodeType!=1))}function Kd(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function PM(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Y9{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=G9(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let o=0,i=this.stack.length>>1,s=Math.min(i,e.length);for(;o<s&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=zr,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let u=this.top.children[l];if(u.matchesMark(e[i])&&!this.isLocked(u.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Os.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){i=a;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let s=this.top.children[o];return s.dirty==Mo&&s.dom==s.contentDOM&&(s.dirty=Ms),s.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Pi){let u=this.preMatch.matched.get(l);if(u!=null&&u!=i)return!1;let f=l.dom,h,m=this.isLocked(f)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Mo&&Kd(n,l.outerDeco));if(!m&&l.update(e,n,r,o))return this.destroyBetween(this.index,a),l.dom!=f&&(this.changed=!0),this.index++,!0;if(!m&&(h=this.recreateWrapper(l,e,n,r,o,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=Ms,h.updateChildren(o,s+1),h.dirty=zr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Kd(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let a=Pi.create(this.top,n,r,o,i,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,o,i){let s=Pi.create(this.top,e,n,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new MM(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Os;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Ud)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Zn||Hn)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new kM(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function G9(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];e:for(;o>0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof Os)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function J9(t,e){return t.type.side-e.type.side}function Z9(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let u=0;u<t.childCount;u++){let f=t.child(u);r(f,o,e.forChild(i,f),u),i+=f.nodeSize}return}let s=0,a=[],l=null;for(let u=0;;){let f,h;for(;s<o.length&&o[s].to==i;){let S=o[s++];S.widget&&(f?(h||(h=[f])).push(S):f=S)}if(f)if(h){h.sort(J9);for(let S=0;S<h.length;S++)n(h[S],u,!!l)}else n(f,u,!!l);let m,g;if(l)g=-1,m=l,l=null;else if(u<t.childCount)g=u,m=t.child(u++);else break;for(let S=0;S<a.length;S++)a[S].to<=i&&a.splice(S--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let b=i+m.nodeSize;if(m.isText){let S=b;s<o.length&&o[s].from<S&&(S=o[s].from);for(let C=0;C<a.length;C++)a[C].to<S&&(S=a[C].to);S<b&&(l=m.cut(S-i),m=m.cut(0,S-i),b=S,g=-1)}else for(;s<o.length&&o[s].to<b;)s++;let y=m.isInline&&!m.isLeaf?a.filter(S=>!S.inline):a.slice();r(m,y,e.forChild(i,m),g),i=b}}function X9(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function Q9(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<t.childCount;){let u=t.child(o++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){if(i>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let u=a<r?l.lastIndexOf(e,r-a-1):-1;if(u>=0&&u+e.length+a>=n)return a+u;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function wg(t,e,n,r,o){let i=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],u=a,f=a+=l.size;u>=n||f<=e?i.push(l):(u<e&&i.push(l.slice(0,e-u,r)),o&&(i.push(o),o=void 0),f>n&&i.push(l.slice(n-u,l.size,r)))}return i}function Tg(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,u;if(qd(n)){for(l=s;o&&!o.node;)o=o.parent;let h=o.node;if(o&&h.isAtom&&Ke.isSelectable(h)&&o.parent&&!(h.isInline&&E9(n.focusNode,n.focusOffset,o.dom))){let m=o.posBefore;u=new Ke(s==m?a:r.resolve(m))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=s,m=s;for(let g=0;g<n.rangeCount;g++){let b=n.getRangeAt(g);h=Math.min(h,t.docView.posFromDOM(b.startContainer,b.startOffset,1)),m=Math.max(m,t.docView.posFromDOM(b.endContainer,b.endOffset,-1))}if(h<0)return null;[l,s]=m==t.state.selection.anchor?[m,h]:[h,m],a=r.resolve(s)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let f=r.resolve(l);if(!u){let h=e=="pointer"||t.state.selection.head<a.pos&&!i?1:-1;u=Mg(t,f,a,h)}return u}function _M(t){return t.editable?t.hasFocus():VM(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Jo(t,e=!1){let n=t.state.selection;if(FM(t,n),!!_M(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Hn){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Ts(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)t8(t);else{let{anchor:r,head:o}=n,i,s;NM&&!(n instanceof Je)&&(n.$from.parent.inlineContent||(i=LM(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=LM(t,n.to))),t.docView.setSelection(r,o,t,e),NM&&(i&&$M(i),s&&$M(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&e8(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const NM=Zn||Hn&&pM<63;function LM(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Zn&&o&&o.contentEditable=="false")return Eg(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return Eg(o);if(i)return Eg(i)}}function Eg(t){return t.contentEditable="true",Zn&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function $M(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function e8(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!_M(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function t8(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setStart(r.parentNode,Pn(r)+1):n.setStart(r,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&ar&&Ii<=11&&(r.disabled=!0,r.disabled=!1)}function FM(t,e){if(e instanceof Ke){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(RM(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else RM(t)}function RM(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Mg(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||Je.between(e,n,r)}function BM(t){return t.editable&&!t.hasFocus()?!1:VM(t)}function VM(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function n8(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Ts(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Og(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Xe.findFrom(i,e)}function _i(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function zM(t,e,n){let r=t.state.selection;if(r instanceof Je)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return _i(t,new Je(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=Og(t.state,e);return o&&o instanceof Ke?_i(t,o):!1}else if(!(Vr&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(a))&&!s.contentDOM?Ke.isSelectable(i)?_i(t,new Ke(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):xc?_i(t,new Je(t.state.doc.resolve(e<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Ke&&r.node.isInline)return _i(t,new Je(e>0?r.$to:r.$from));{let o=Og(t.state,e);return o?_i(t,o):!1}}}function Yd(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Tc(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function $a(t,e){return e<0?r8(t):o8(t)}function r8(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(io&&n.nodeType==1&&r<Yd(n)&&Tc(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Tc(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(HM(n))break;{let a=n.previousSibling;for(;a&&Tc(a,-1);)o=n.parentNode,i=Pn(a),a=a.previousSibling;if(a)n=a,r=Yd(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?kg(t,n,r):o&&kg(t,o,i)}function o8(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Yd(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Tc(a,1))i=n,s=++r;else break}else{if(HM(n))break;{let a=n.nextSibling;for(;a&&Tc(a,1);)i=a.parentNode,s=Pn(a)+1,a=a.nextSibling;if(a)n=a,r=0,o=Yd(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&kg(t,i,s)}function HM(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function i8(t,e){for(;t&&e==t.childNodes.length&&!vc(t);)e=Pn(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function s8(t,e){for(;t&&!e&&!vc(t);)e=Pn(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function kg(t,e,n){if(e.nodeType!=3){let i,s;(s=i8(e,n))?(e=s,n=0):(i=s8(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(qd(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&Jo(t)},50)}function jM(t,e){let n=t.state.doc.resolve(e);if(!(Hn||k9)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function WM(t,e,n){let r=t.state.selection;if(r instanceof Je&&!r.empty||n.indexOf("s")>-1||Vr&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=Og(t.state,e);if(s&&s instanceof Ke)return _i(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,a=r instanceof Rr?Xe.near(s,e):Xe.findFrom(s,e);return a?_i(t,a):!1}return!1}function qM(t,e){if(!(t.state.selection instanceof Je))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function UM(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function a8(t){if(!Zn||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;UM(t,r,"true"),setTimeout(()=>UM(t,r,"false"),20)}return!1}function l8(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function c8(t,e){let n=e.keyCode,r=l8(e);if(n==8||Vr&&n==72&&r=="c")return qM(t,-1)||$a(t,-1);if(n==46&&!e.shiftKey||Vr&&n==68&&r=="c")return qM(t,1)||$a(t,1);if(n==13||n==27)return!0;if(n==37||Vr&&n==66&&r=="c"){let o=n==37?jM(t,t.state.selection.from)=="ltr"?-1:1:-1;return zM(t,o,r)||$a(t,o)}else if(n==39||Vr&&n==70&&r=="c"){let o=n==39?jM(t,t.state.selection.from)=="ltr"?1:-1:1;return zM(t,o,r)||$a(t,o)}else{if(n==38||Vr&&n==80&&r=="c")return WM(t,-1,r)||$a(t,-1);if(n==40||Vr&&n==78&&r=="c")return a8(t)||WM(t,1,r)||$a(t,1);if(r==(Vr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Ag(t,e){t.someProp("transformCopied",g=>{e=g(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let g=r.firstChild;n.push(g.type.name,g.attrs!=g.type.defaultAttrs?g.attrs:null),r=g.content}let s=t.someProp("clipboardSerializer")||ws.fromSchema(t.state.schema),a=eO(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u=l.firstChild,f,h=0;for(;u&&u.nodeType==1&&(f=XM[u.nodeName.toLowerCase()]);){for(let g=f.length-1;g>=0;g--){let b=a.createElement(f[g]);for(;l.firstChild;)b.appendChild(l.firstChild);l.appendChild(b),h++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${h?` -${h}`:""} ${JSON.stringify(n)}`);let m=t.someProp("clipboardTextSerializer",g=>g(e,t))||e.content.textBetween(0,e.content.size,`
240
+
241
+ `);return{dom:l,text:m,slice:e}}function KM(t,e,n,r,o){let i=o.parent.type.spec.code,s,a;if(!n&&!e)return null;let l=e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",m=>{e=m(e,i||r,t)}),i)return e?new Ie(Te.from(t.state.schema.text(e.replace(/\r\n?/g,`
242
+ `))),0,0):Ie.empty;let h=t.someProp("clipboardTextParser",m=>m(e,o,r,t));if(h)a=h;else{let m=o.marks(),{schema:g}=t.state,b=ws.fromSchema(g);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(y=>{let S=s.appendChild(document.createElement("p"));y&&S.appendChild(b.serializeNode(g.text(y,m)))})}}else t.someProp("transformPastedHTML",h=>{n=h(n,t)}),s=p8(n),xc&&h8(s);let u=s&&s.querySelector("[data-pm-slice]"),f=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(f&&f[3])for(let h=+f[3];h>0;h--){let m=s.firstChild;for(;m&&m.nodeType!=1;)m=m.nextSibling;if(!m)break;s=m}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Ei.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||f),context:o,ruleFromNode(m){return m.nodeName=="BR"&&!m.nextSibling&&m.parentNode&&!u8.test(m.parentNode.nodeName)?{ignore:!0}:null}})),f)a=m8(ZM(a,+f[1],+f[2]),f[4]);else if(a=Ie.maxOpen(d8(a.content,o),!0),a.openStart||a.openEnd){let h=0,m=0;for(let g=a.content.firstChild;h<a.openStart&&!g.type.spec.isolating;h++,g=g.firstChild);for(let g=a.content.lastChild;m<a.openEnd&&!g.type.spec.isolating;m++,g=g.lastChild);a=ZM(a,h,m)}return t.someProp("transformPasted",h=>{a=h(a,t)}),a}const u8=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function d8(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(a=>{if(!s)return;let l=o.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&i.length&&GM(l,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=JM(s[s.length-1],i.length));let f=YM(a,l);s.push(f),o=o.matchType(f.type),i=l}}),s)return Te.from(s)}return t}function YM(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Te.from(t));return t}function GM(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=GM(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(Te.from(YM(n,t,o+1))))}}function JM(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,JM(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Te.empty,!0);return t.copy(n.append(r))}function Ig(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(i=0),o<r-1&&(a=Ig(a,e,n,r,o+1,i)),o>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Te.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function ZM(t,e,n){return e<t.openStart&&(t=new Ie(Ig(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Ie(Ig(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const XM={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let QM=null;function eO(){return QM||(QM=document.implementation.createHTMLDocument("title"))}let Dg=null;function f8(t){let e=window.trustedTypes;return e?(Dg||(Dg=e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Dg.createHTML(t)):t}function p8(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=eO().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&XM[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=f8(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function h8(t){let e=t.querySelectorAll(Hn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function m8(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;o=Te.from(l.create(r[a+1],o)),i++,s++}return new Ie(o,i,s)}const Xn={},Qn={},g8={touchstart:!0,touchmove:!0};class y8{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function b8(t){for(let e in Xn){let n=Xn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{x8(t,r)&&!_g(t,r)&&(t.editable||!(r.type in Qn))&&n(t,r)},g8[e]?{passive:!0}:void 0)}Zn&&t.dom.addEventListener("input",()=>null),Pg(t)}function Ni(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function v8(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Pg(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>_g(t,r))})}function _g(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function x8(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function S8(t,e){!_g(t,e)&&Xn[e.type]&&(t.editable||!(e.type in Qn))&&Xn[e.type](t,e)}Qn.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!nO(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Yo&&Hn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Na&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Es(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||c8(t,n)?n.preventDefault():Ni(t,"key")},Qn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},Qn.keypress=(t,e)=>{let n=e;if(nO(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Vr&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Je)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o))&&t.dispatch(t.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function Gd(t){return{left:t.clientX,top:t.clientY}}function C8(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Ng(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,a=>s>i.depth?a(t,n,i.nodeAfter,i.before(s),o,!0):a(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function Fa(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function w8(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Ke.isSelectable(r)?(Fa(t,new Ke(n)),!0):!1}function T8(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof Ke&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(Ke.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(Fa(t,Ke.create(t.state.doc,o)),!0):!1}function E8(t,e,n,r,o){return Ng(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?T8(t,n):w8(t,n))}function M8(t,e,n,r){return Ng(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function O8(t,e,n,r){return Ng(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||k8(t,n,r)}function k8(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Fa(t,Je.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)Fa(t,Je.create(r,a+1,a+1+s.content.size));else if(Ke.isSelectable(s))Fa(t,Ke.create(r,a));else continue;return!0}}function Lg(t){return Jd(t)}const tO=Vr?"metaKey":"ctrlKey";Xn.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Lg(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&C8(n,t.input.lastClick)&&!n[tO]&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(Gd(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new A8(t,s,n,!!r)):(i=="doubleClick"?M8:O8)(t,s.pos,s.inside,n)?n.preventDefault():Ni(t,"pointer"))};class A8{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[tO],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let f=e.state.doc.resolve(n.pos);i=f.parent,s=f.depth?f.before():0}const a=o?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:u}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Ke&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&io&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ni(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Jo(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Gd(e))),this.updateAllowDefault(e),this.allowDefault||!n?Ni(this.view,"pointer"):E8(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Zn&&this.mightDrag&&!this.mightDrag.node.isAtom||Hn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Fa(this.view,Xe.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Ni(this.view,"pointer")}move(e){this.updateAllowDefault(e),Ni(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Xn.touchstart=t=>{t.input.lastTouch=Date.now(),Lg(t),Ni(t,"pointer")},Xn.touchmove=t=>{t.input.lastTouch=Date.now(),Ni(t,"pointer")},Xn.contextmenu=t=>Lg(t);function nO(t,e){return t.composing?!0:Zn&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const I8=Yo?5e3:-1;Qn.compositionstart=Qn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Je&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Jd(t,!0),t.markCursor=null;else if(Jd(t,!e.selection.empty),io&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let a=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}rO(t,I8)},Qn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,rO(t,20))};function rO(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Jd(t),e))}function oO(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=P8());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function D8(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=w9(e.focusNode,e.focusOffset),r=T9(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function P8(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Jd(t,e=!1){if(!(Yo&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),oO(t),e||t.docView&&t.docView.dirty){let n=Tg(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function _8(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Ec=ar&&Ii<15||Na&&A9<604;Xn.copy=Qn.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=Ec?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Ag(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):_8(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function N8(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function L8(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Mc(t,r.value,null,o,e):Mc(t,r.textContent,r.innerHTML,o,e)},50)}function Mc(t,e,n,r,o){let i=KM(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,i||Ie.empty)))return!0;if(!i)return!1;let s=N8(i),a=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function iO(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Qn.paste=(t,e)=>{let n=e;if(t.composing&&!Yo)return;let r=Ec?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Mc(t,iO(r),r.getData("text/html"),o,n)?n.preventDefault():L8(t,n)};class sO{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const aO=Vr?"altKey":"ctrlKey";Xn.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(Gd(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Ke?o.to-1:o.to))){if(r&&r.mightDrag)s=Ke.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=t.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=t.docView&&(s=Ke.create(t.state.doc,h.posBefore))}}let a=(s||t.state.selection).content(),{dom:l,text:u,slice:f}=Ag(t,a);(!n.dataTransfer.files.length||!Hn||pM>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ec?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ec||n.dataTransfer.setData("text/plain",u),t.dragging=new sO(f,!n[aO],s)},Xn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},Qn.dragover=Qn.dragenter=(t,e)=>e.preventDefault(),Qn.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(Gd(n));if(!o)return;let i=t.state.doc.resolve(o.pos),s=r&&r.slice;s?t.someProp("transformPasted",b=>{s=b(s,t)}):s=KM(t,iO(n.dataTransfer),Ec?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&!n[aO]);if(t.someProp("handleDrop",b=>b(t,n,s||Ie.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?JE(t.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let u=t.state.tr;if(a){let{node:b}=r;b?b.replace(u):u.deleteSelection()}let f=u.mapping.map(l),h=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,m=u.doc;if(h?u.replaceRangeWith(f,f,s.content.firstChild):u.replaceRange(f,f,s),u.doc.eq(m))return;let g=u.doc.resolve(f);if(h&&Ke.isSelectable(s.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Ke(g));else{let b=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((y,S,C,E)=>b=E),u.setSelection(Mg(t,g,u.doc.resolve(b)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))},Xn.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Jo(t)},20))},Xn.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},Xn.beforeinput=(t,e)=>{if(Hn&&Yo&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Es(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in Qn)Xn[t]=Qn[t];function Oc(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Zd{constructor(e,n){this.toDOM=e,this.spec=n||As,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new _n(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Zd&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Oc(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Li{constructor(e,n){this.attrs=e,this.spec=n||As}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new _n(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Li&&Oc(this.attrs,e.attrs)&&Oc(this.spec,e.spec)}static is(e){return e.type instanceof Li}destroy(){}}class $g{constructor(e,n){this.attrs=e,this.spec=n||As}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let s=e.mapResult(n.to+o,-1);return s.deleted||s.pos<=i.pos?null:new _n(i.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof $g&&Oc(this.attrs,e.attrs)&&Oc(this.spec,e.spec)}destroy(){}}class _n{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new _n(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new _n(e,e,new Zd(n,r))}static inline(e,n,r,o){return new _n(e,n,new Li(r,o))}static node(e,n,r,o){return new _n(e,n,new $g(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Li}get widget(){return this.type instanceof Zd}}const Ra=[],As={};class Jt{constructor(e,n){this.local=e.length?e:Ra,this.children=n.length?n:Ra}static create(e,n){return n.length?Xd(n,e,0,As):jn}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,r,o+a,i)}}map(e,n,r){return this==jn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||As)}mapInner(e,n,r,o,i){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,o);l&&l.type.valid(n,l)?(s||(s=[])).push(l):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?$8(this.children,s||[],e,n,r,o,i):s?new Jt(s.sort(Is),Ra):jn}add(e,n){return n.length?this==jn?Jt.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((a,l)=>{let u=l+r,f;if(f=cO(n,a,u)){for(o||(o=this.children.slice());i<o.length&&o[i]<l;)i+=3;o[i]==l?o[i+2]=o[i+2].addInner(a,f,u+1):o.splice(i,0,l,l+a.nodeSize,Xd(f,a,u+1,As)),i+=3}});let s=lO(i?uO(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Jt(s.length?this.local.concat(s).sort(Is):this.local,o||this.children)}remove(e){return e.length==0||this==jn?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,a=r[i]+n,l=r[i+1]+n;for(let f=0,h;f<e.length;f++)(h=e[f])&&h.from>a&&h.to<l&&(e[f]=null,(s||(s=[])).push(h));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[i+2].removeInner(s,a+1);u!=jn?r[i+2]=u:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let a=0;a<o.length;a++)o[a].eq(s,n)&&(o==this.local&&(o=this.local.slice()),o.splice(a--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new Jt(o,r):jn}forChild(e,n){if(this==jn)return this;if(n.isLeaf)return Jt.empty;let r,o;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let i=e+1,s=i+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>i&&l.type instanceof Li){let u=Math.max(i,l.from)-i,f=Math.min(s,l.to)-i;u<f&&(o||(o=[])).push(l.copy(u,f))}}if(o){let a=new Jt(o.sort(Is),Ra);return r?new $i([a,r]):a}return r||jn}eq(e){if(this==e)return!0;if(!(e instanceof Jt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Fg(this.localsInner(e))}localsInner(e){if(this==jn)return Ra;if(e.inlineContent||!this.local.some(Li.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Li||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Jt.empty=new Jt([],[]),Jt.removeOverlap=Fg;const jn=Jt.empty;class $i{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,As));return $i.from(r)}forChild(e,n){if(n.isLeaf)return Jt.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=jn&&(i instanceof $i?r=r.concat(i.members):r.push(i))}return $i.from(r)}eq(e){if(!(e instanceof $i)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let s=0;s<i.length;s++)n.push(i[s])}}return n?Fg(r?n:n.sort(Is)):Ra}static from(e){switch(e.length){case 0:return jn;case 1:return e[0];default:return new $i(e.every(n=>n instanceof Jt)?e:e.reduce((n,r)=>n.concat(r instanceof Jt?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function $8(t,e,n,r,o,i,s){let a=t.slice();for(let u=0,f=i;u<n.maps.length;u++){let h=0;n.maps[u].forEach((m,g,b,y)=>{let S=y-b-(g-m);for(let C=0;C<a.length;C+=3){let E=a[C+1];if(E<0||m>E+f-h)continue;let T=a[C]+f-h;g>=T?a[C+1]=m<=T?-2:-1:m>=f&&S&&(a[C]+=S,a[C+1]+=S)}h+=S}),f=n.maps[u].map(f,-1)}let l=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){l=!0,a[u+1]=-1;continue}let f=n.map(t[u]+i),h=f-o;if(h<0||h>=r.content.size){l=!0;continue}let m=n.map(t[u+1]+i,-1),g=m-o,{index:b,offset:y}=r.content.findIndex(h),S=r.maybeChild(b);if(S&&y==h&&y+S.nodeSize==g){let C=a[u+2].mapInner(n,S,f+1,t[u]+i+1,s);C!=jn?(a[u]=h,a[u+1]=g,a[u+2]=C):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=F8(a,t,e,n,o,i,s),f=Xd(u,r,0,s);e=f.local;for(let h=0;h<a.length;h+=3)a[h+1]<0&&(a.splice(h,3),h-=3);for(let h=0,m=0;h<f.children.length;h+=3){let g=f.children[h];for(;m<a.length&&a[m]<g;)m+=3;a.splice(m,0,f.children[h],f.children[h+1],f.children[h+2])}}return new Jt(e.sort(Is),a)}function lO(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new _n(o.from+e,o.to+e,o.type))}return n}function F8(t,e,n,r,o,i,s){function a(l,u){for(let f=0;f<l.local.length;f++){let h=l.local[f].map(r,o,u);h?n.push(h):s.onRemove&&s.onRemove(l.local[f].spec)}for(let f=0;f<l.children.length;f+=3)a(l.children[f+2],l.children[f]+u+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+i+1);return n}function cO(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,s;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function uO(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Xd(t,e,n,r){let o=[],i=!1;e.forEach((a,l)=>{let u=cO(t,a,l+n);if(u){i=!0;let f=Xd(u,a,n+l+1,r);f!=jn&&o.push(l,l+a.nodeSize,f)}});let s=lO(i?uO(t):t,-n).sort(Is);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||o.length?new Jt(s,o):jn}function Is(t,e){return t.from-e.from||t.to-e.to}function Fg(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),dO(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),dO(e,o,r.copy(i.from,r.to)));break}}}return e}function dO(t,e,n){for(;e<t.length&&Is(n,t[e])>0;)e++;t.splice(e,0,n)}function Rg(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=jn&&e.push(r)}),t.cursorWrapper&&e.push(Jt.create(t.state.doc,[t.cursorWrapper.deco])),$i.from(e)}const R8={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},B8=ar&&Ii<=11;class V8{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class z8{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new V8,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);ar&&Ii<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),B8&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,R8)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(BM(this.view)){if(this.suppressingSelectionUpdates)return Jo(this.view);if(ar&&Ii<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ts(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=_a(i))n.add(i);for(let i=e.anchorNode;i;i=_a(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&BM(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,l=[];if(e.editable)for(let f=0;f<n.length;f++){let h=this.registerMutation(n[f],l);h&&(i=i<0?h.from:Math.min(h.from,i),s=s<0?h.to:Math.max(h.to,s),h.typeOver&&(a=!0))}if(io&&l.length){let f=l.filter(h=>h.nodeName=="BR");if(f.length==2){let[h,m]=f;h.parentNode&&h.parentNode.parentNode==m.parentNode?m.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let m of f){let g=m.parentNode;g&&g.nodeName=="LI"&&(!h||W8(e,h)!=g)&&m.remove()}}}let u=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&qd(r)&&(u=Tg(e))&&u.eq(Xe.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Jo(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),H8(e)),this.handleDOMChange(i,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Jo(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let f=0;f<e.addedNodes.length;f++){let h=e.addedNodes[f];n.push(h),h.nodeType==3&&(this.lastChangedTextNode=h)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(ar&&Ii<=11&&e.addedNodes.length)for(let f=0;f<e.addedNodes.length;f++){let{previousSibling:h,nextSibling:m}=e.addedNodes[f];(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h),(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(i=m)}let s=o&&o.parentNode==e.target?Pn(o)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=i&&i.parentNode==e.target?Pn(i):e.target.childNodes.length,u=r.localPosFromDOM(e.target,l,1);return{from:a,to:u}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let fO=new WeakMap,pO=!1;function H8(t){if(!fO.has(t)&&(fO.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=io,pO)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),pO=!0}}function hO(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return Ts(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function j8(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return hO(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?hO(t,n):null}function W8(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function q8(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:s,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),u,f=l.anchorNode;if(f&&t.dom.contains(f.nodeType==1?f:f.parentNode)&&(u=[{node:f,offset:l.anchorOffset}],qd(l)||u.push({node:l.focusNode,offset:l.focusOffset})),Hn&&t.input.lastKeyCode===8)for(let S=i;S>o;S--){let C=r.childNodes[S-1],E=C.pmViewDesc;if(C.nodeName=="BR"&&!E){i=S;break}if(!E||E.size)break}let h=t.state.doc,m=t.someProp("domParser")||Ei.fromSchema(t.state.schema),g=h.resolve(s),b=null,y=m.parse(r,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:o,to:i,preserveWhitespace:g.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:U8,context:g});if(u&&u[0].pos!=null){let S=u[0].pos,C=u[1]&&u[1].pos;C==null&&(C=S),b={anchor:S+s,head:C+s}}return{doc:y,sel:b,from:s,to:a}}function U8(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Zn&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Zn&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const K8=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Y8(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let L=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,k=Tg(t,L);if(k&&!t.state.selection.eq(k)){if(Hn&&Yo&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",$=>$(t,Es(13,"Enter"))))return;let I=t.state.tr.setSelection(k);L=="pointer"?I.setMeta("pointer",!0):L=="key"&&I.scrollIntoView(),i&&I.setMeta("composition",i),t.dispatch(I)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(n);e=s.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,u=q8(t,e,n),f=t.state.doc,h=f.slice(u.from,u.to),m,g;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(m=t.state.selection.to,g="end"):(m=t.state.selection.from,g="start"),t.input.lastKeyCode=null;let b=Z8(h.content,u.doc.content,u.from,m,g);if(b&&t.input.domChangeCount++,(Na&&t.input.lastIOSEnter>Date.now()-225||Yo)&&o.some(L=>L.nodeType==1&&!K8.test(L.nodeName))&&(!b||b.endA>=b.endB)&&t.someProp("handleKeyDown",L=>L(t,Es(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!b)if(r&&l instanceof Je&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))b={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let L=mO(t,t.state.doc,u.sel);if(L&&!L.eq(t.state.selection)){let k=t.state.tr.setSelection(L);i&&k.setMeta("composition",i),t.dispatch(k)}}return}t.state.selection.from<t.state.selection.to&&b.start==b.endB&&t.state.selection instanceof Je&&(b.start>t.state.selection.from&&b.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?b.start=t.state.selection.from:b.endA<t.state.selection.to&&b.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(b.endB+=t.state.selection.to-b.endA,b.endA=t.state.selection.to)),ar&&Ii<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>u.from&&u.doc.textBetween(b.start-u.from-1,b.start-u.from+1)=="  "&&(b.start--,b.endA--,b.endB--);let y=u.doc.resolveNoCache(b.start-u.from),S=u.doc.resolveNoCache(b.endB-u.from),C=f.resolve(b.start),E=y.sameParent(S)&&y.parent.inlineContent&&C.end()>=b.endA,T;if((Na&&t.input.lastIOSEnter>Date.now()-225&&(!E||o.some(L=>L.nodeName=="DIV"||L.nodeName=="P"))||!E&&y.pos<u.doc.content.size&&!y.sameParent(S)&&(T=Xe.findFrom(u.doc.resolve(y.pos+1),1,!0))&&T.head==S.pos)&&t.someProp("handleKeyDown",L=>L(t,Es(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>b.start&&J8(f,b.start,b.endA,y,S)&&t.someProp("handleKeyDown",L=>L(t,Es(8,"Backspace")))){Yo&&Hn&&t.domObserver.suppressSelectionUpdates();return}Hn&&b.endB==b.start&&(t.input.lastChromeDelete=Date.now()),Yo&&!E&&y.start()!=S.start()&&S.parentOffset==0&&y.depth==S.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==b.endA&&(b.endB-=2,S=u.doc.resolveNoCache(b.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(L){return L(t,Es(13,"Enter"))})},20));let w=b.start,O=b.endA,A,N,D;if(E){if(y.pos==S.pos)ar&&Ii<=11&&y.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Jo(t),20)),A=t.state.tr.delete(w,O),N=f.resolve(b.start).marksAcross(f.resolve(b.endA));else if(b.endA==b.endB&&(D=G8(y.parent.content.cut(y.parentOffset,S.parentOffset),C.parent.content.cut(C.parentOffset,b.endA-C.start()))))A=t.state.tr,D.type=="add"?A.addMark(w,O,D.mark):A.removeMark(w,O,D.mark);else if(y.parent.child(y.index()).isText&&y.index()==S.index()-(S.textOffset?0:1)){let L=y.parent.textBetween(y.parentOffset,S.parentOffset);if(t.someProp("handleTextInput",k=>k(t,w,O,L)))return;A=t.state.tr.insertText(L,w,O)}}if(A||(A=t.state.tr.replace(w,O,u.doc.slice(b.start-u.from,b.endB-u.from))),u.sel){let L=mO(t,A.doc,u.sel);L&&!(Hn&&t.composing&&L.empty&&(b.start!=b.endB||t.input.lastChromeDelete<Date.now()-100)&&(L.head==w||L.head==A.mapping.map(O)-1)||ar&&L.empty&&L.head==w)&&A.setSelection(L)}N&&A.ensureMarks(N),i&&A.setMeta("composition",i),t.dispatch(A.scrollIntoView())}function mO(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Mg(t,e.resolve(n.anchor),e.resolve(n.head))}function G8(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,a,l;for(let f=0;f<r.length;f++)o=r[f].removeFromSet(o);for(let f=0;f<n.length;f++)i=n[f].removeFromSet(i);if(o.length==1&&i.length==0)a=o[0],s="add",l=f=>f.mark(a.addToSet(f.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",l=f=>f.mark(a.removeFromSet(f.marks));else return null;let u=[];for(let f=0;f<e.childCount;f++)u.push(l(e.child(f)));if(Te.from(u).eq(t))return{mark:a,type:s}}function J8(t,e,n,r,o){if(n-e<=o.pos-r.pos||Bg(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let a=i.nodeAfter;return a!=null&&n==e+a.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(Bg(i,!0,!0));return!s.parent.isTextblock||s.pos>n||Bg(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Bg(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function Z8(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let l=Math.max(0,i-Math.min(s,a));r-=s+l-i}if(s<i&&t.size<e.size){let l=r<=i&&r>=s?i-r:0;i-=l,i&&i<e.size&&gO(e.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-s),s=i}else if(a<i){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<t.size&&gO(t.textBetween(i-1,i+1))&&(i+=l?1:-1),s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}function gO(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class X8{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new y8,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(SO),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=vO(this),bO(this),this.nodeViews=xO(this),this.docView=OM(this.state.doc,yO(this),Rg(this),this.dom,this),this.domObserver=new z8(this,(r,o,i,s)=>Y8(this,r,o,i,s)),this.domObserver.start(),b8(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Pg(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(SO),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(oO(this),s=!0),this.state=e;let a=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let g=xO(this);eU(g,this.nodeViews)&&(this.nodeViews=g,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Pg(this),this.editable=vO(this),bO(this);let l=Rg(this),u=yO(this),f=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",h=i||!this.docView.matchesNode(e.doc,u,l);(h||!e.selection.eq(o.selection))&&(s=!0);let m=f=="preserve"&&s&&this.dom.style.overflowAnchor==null&&P9(this);if(s){this.domObserver.stop();let g=h&&(ar||Hn)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&Q8(o.selection,e.selection);if(h){let b=Hn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=D8(this)),(i||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=OM(e.doc,u,l,this.dom,this)),b&&!this.trackWrites&&(g=!0)}g||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&n8(this))?Jo(this,g):(FM(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),f=="reset"?this.dom.scrollTop=0:f=="to selection"?this.scrollToSelection():m&&_9(m)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Ke){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&hM(this,n.getBoundingClientRect(),e)}else hM(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new sO(e.slice,e.move,o<0?void 0:Ke.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(o=n?n(a):a))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let a=i[s].props[e];if(a!=null&&(o=n?n(a):a))return o}}hasFocus(){if(ar){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&N9(this.dom),Jo(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return B9(this,e)}coordsAtPos(e,n=1){return xM(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return W9(this,n||this.state,e)}pasteHTML(e,n){return Mc(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Mc(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Ag(this,e)}destroy(){this.docView&&(v8(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Rg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,S9())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return S8(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?Zn&&this.root.nodeType===11&&M9(this.dom.ownerDocument)==this.dom&&j8(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function yO(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[_n.node(0,t.state.doc.content.size,e)]}function bO(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:_n.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function vO(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Q8(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function xO(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function eU(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function SO(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Fi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Qd={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},tU=typeof navigator<"u"&&/Mac/.test(navigator.platform),nU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Nn=0;Nn<10;Nn++)Fi[48+Nn]=Fi[96+Nn]=String(Nn);for(var Nn=1;Nn<=24;Nn++)Fi[Nn+111]="F"+Nn;for(var Nn=65;Nn<=90;Nn++)Fi[Nn]=String.fromCharCode(Nn+32),Qd[Nn]=String.fromCharCode(Nn);for(var Vg in Fi)Qd.hasOwnProperty(Vg)||(Qd[Vg]=Fi[Vg]);function rU(t){var e=tU&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||nU&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Qd:Fi)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const oU=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function iU(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))oU?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function sU(t){let e=Object.create(null);for(let n in t)e[iU(n)]=t[n];return e}function zg(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function aU(t){return new Qt({props:{handleKeyDown:Hg(t)}})}function Hg(t){let e=sU(t);return function(n,r){let o=rU(r),i,s=e[zg(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[zg(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=Fi[r.keyCode])&&i!=o){let a=e[zg(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const lU=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function CO(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const cU=(t,e,n)=>{let r=CO(t,n);if(!r)return!1;let o=jg(r);if(!o){let s=r.blockRange(),a=s&&Oa(s);return a==null?!1:(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(MO(t,o,e,-1))return!0;if(r.parent.content.size==0&&(Ba(i,"end")||Ke.isSelectable(i)))for(let s=r.depth;;s--){let a=Hd(t.doc,r.before(s),r.after(s),Ie.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(Ba(i,"end")?Xe.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Ke.create(l.doc,o.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},uU=(t,e,n)=>{let r=CO(t,n);if(!r)return!1;let o=jg(r);return o?wO(t,o,e):!1},dU=(t,e,n)=>{let r=TO(t,n);if(!r)return!1;let o=Wg(r);return o?wO(t,o,e):!1};function wO(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let f=o.lastChild;if(!f)return!1;o=f}let s=e.nodeAfter,a=s,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let f=a.firstChild;if(!f)return!1;a=f}let u=Hd(t.doc,i,l,Ie.empty);if(!u||u.from!=i||u instanceof Tn&&u.slice.size>=l-i)return!1;if(n){let f=t.tr.step(u);f.setSelection(Je.create(f.doc,i)),n(f.scrollIntoView())}return!0}function Ba(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const fU=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=jg(r)}let s=i&&i.nodeBefore;return!s||!Ke.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Ke.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function jg(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function TO(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const pU=(t,e,n)=>{let r=TO(t,n);if(!r)return!1;let o=Wg(r);if(!o)return!1;let i=o.nodeAfter;if(MO(t,o,e,1))return!0;if(r.parent.content.size==0&&(Ba(i,"start")||Ke.isSelectable(i))){let s=Hd(t.doc,r.before(),r.after(),Ie.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(Ba(i,"start")?Xe.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):Ke.create(a.doc,a.mapping.map(o.pos))),e(a.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},hU=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=Wg(r)}let s=i&&i.nodeAfter;return!s||!Ke.isSelectable(s)?!1:(e&&e(t.tr.setSelection(Ke.create(t.doc,i.pos)).scrollIntoView()),!0)};function Wg(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const mU=(t,e)=>{let n=t.selection,r=n instanceof Ke,o;if(r){if(n.node.isTextblock||!ki(t.doc,n.from))return!1;o=n.from}else if(o=zd(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(Ke.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},gU=(t,e)=>{let n=t.selection,r;if(n instanceof Ke){if(n.node.isTextblock||!ki(t.doc,n.to))return!1;r=n.to}else if(r=zd(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},yU=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&Oa(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},bU=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
243
+ `).scrollIntoView()),!0)};function EO(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const vU=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=EO(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(Xe.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},xU=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Rr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=EO(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=t.tr.insert(s,i.createAndFill());a.setSelection(Je.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},SU=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(ka(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Oa(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)},CU=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(Ke.create(t.doc,o))),!0)};function wU(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||ki(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function MO(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,a,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&wU(t,e,n))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(s=(a=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&a.matchType(s[0]||i.type).validEnd){if(n){let g=e.pos+i.nodeSize,b=Te.empty;for(let C=s.length-1;C>=0;C--)b=Te.from(s[C].create(null,b));b=Te.from(o.copy(b));let y=t.tr.step(new En(e.pos-1,g,e.pos,g,new Ie(b,1,0),s.length,!0)),S=y.doc.resolve(g+2*s.length);S.nodeAfter&&S.nodeAfter.type==o.type&&ki(y.doc,S.pos)&&y.join(S.pos),n(y.scrollIntoView())}return!0}let f=i.type.spec.isolating||r>0&&l?null:Xe.findFrom(e,1),h=f&&f.$from.blockRange(f.$to),m=h&&Oa(h);if(m!=null&&m>=e.depth)return n&&n(t.tr.lift(h,m).scrollIntoView()),!0;if(u&&Ba(i,"start",!0)&&Ba(o,"end")){let g=o,b=[];for(;b.push(g),!g.isTextblock;)g=g.lastChild;let y=i,S=1;for(;!y.isTextblock;y=y.firstChild)S++;if(g.canReplace(g.childCount,g.childCount,y.content)){if(n){let C=Te.empty;for(let T=b.length-1;T>=0;T--)C=Te.from(b[T].copy(C));let E=t.tr.step(new En(e.pos-b.length,e.pos+i.nodeSize,e.pos+S,e.pos+i.nodeSize-S,new Ie(C,b.length,0),0,!0));n(E.scrollIntoView())}return!0}}return!1}function OO(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(Je.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const TU=OO(-1),EU=OO(1);function MU(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&lg(s,t,e);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function kO(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[i];n.doc.nodesBetween(s,a,(l,u)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)o=!0;else{let f=n.doc.resolve(u),h=f.index();o=f.parent.canReplaceWith(h,h+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];i.setBlockType(a,l,t,e)}r(i.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function OU(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i);if(!s)return!1;let a=r?n.tr:null;return kU(a,s,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function kU(t,e,n,r=null){let o=!1,i=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=s.resolve(e.start-2);i=new Ld(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Ld(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let a=lg(i,n,r,e);return a?(t&&AU(t,e,a,o,n),!0):!1}function AU(t,e,n,r,o){let i=Te.empty;for(let f=n.length-1;f>=0;f--)i=Te.from(n[f].type.create(n[f].attrs,i));t.step(new En(e.start-(r?2:0),e.end,e.start,e.end,new Ie(i,0,0),n.length,!0));let s=0;for(let f=0;f<n.length;f++)n[f].type==o&&(s=f+1);let a=n.length-s,l=e.start+n.length-(r?2:0),u=e.parent;for(let f=e.startIndex,h=e.endIndex,m=!0;f<h;f++,m=!1)!m&&ka(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=u.child(f).nodeSize;return t}function IU(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?DU(e,n,t,i):PU(e,n,i):!0:!1}}function DU(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new En(i-1,s,i,s,new Ie(Te.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Ld(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const a=Oa(r);if(a==null)return!1;o.lift(r,a);let l=o.doc.resolve(o.mapping.map(i,-1)-1);return ki(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function PU(t,e,n){let r=t.tr,o=n.parent;for(let g=n.end,b=n.endIndex-1,y=n.startIndex;b>y;b--)g-=o.child(b).nodeSize,r.delete(g-1,g+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==o.childCount,u=i.node(-1),f=i.index(-1);if(!u.canReplace(f+(a?0:1),f+1,s.content.append(l?Te.empty:Te.from(o))))return!1;let h=i.pos,m=h+s.nodeSize;return r.step(new En(h-(a?1:0),m+(l?1:0),h+1,m-1,new Ie((a?Te.empty:Te.from(o.copy(Te.empty))).append(l?Te.empty:Te.from(o.copy(Te.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function _U(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==t);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let a=i.parent,l=a.child(s-1);if(l.type!=t)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,f=Te.from(u?t.create():null),h=new Ie(Te.from(t.create(null,Te.from(a.type.create(null,f)))),u?3:1,0),m=i.start,g=i.end;n(e.tr.step(new En(m-(u?3:1),g,m,g,h,1,!0)).scrollIntoView())}return!0}}function ef(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}class tf{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...f)=>{const h=l(...f)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a=[],l=!!e,u=e||i.tr,f=()=>(!l&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(m=>m===!0)),h={...Object.fromEntries(Object.entries(r).map(([m,g])=>[m,(...y)=>{const S=this.buildProps(u,n),C=g(...y)(S);return a.push(C),h}])),run:f};return h}createCan(e){const{rawCommands:n,state:r}=this,o=!1,i=e||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...f)=>u(...f)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a={tr:e,editor:o,view:s,state:ef({state:i,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...f)=>u(...f)(a)]))}};return a}}class NU{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,n)),this}off(e,n){const r=this.callbacks[e];return r&&(n?this.callbacks[e]=r.filter(o=>o!==n):delete this.callbacks[e]),this}once(e,n){const r=(...o)=>{this.off(e,r),n.apply(this,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function ze(t,e,n){return t.config[e]===void 0&&t.parent?ze(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?ze(t.parent,e,n):null}):t.config[e]}function nf(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function AO(t){const e=[],{nodeExtensions:n,markExtensions:r}=nf(t),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage,extensions:o},l=ze(s,"addGlobalAttributes",a);if(!l)return;l().forEach(f=>{f.types.forEach(h=>{Object.entries(f.attributes).forEach(([m,g])=>{e.push({type:h,name:m,attribute:{...i,...g}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=ze(s,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([f,h])=>{const m={...i,...h};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:s.name,name:f,attribute:m})})}),e}function bn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function gt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const a=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],u=a.filter(f=>!l.includes(f));r[o]=[...l,...u].join(" ")}else if(o==="style"){const a=i?i.split(";").map(f=>f.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(f=>f.trim()).filter(Boolean):[],u=new Map;l.forEach(f=>{const[h,m]=f.split(":").map(g=>g.trim());u.set(h,m)}),a.forEach(f=>{const[h,m]=f.split(":").map(g=>g.trim());u.set(h,m)}),r[o]=Array.from(u.entries()).map(([f,h])=>`${f}: ${h}`).join("; ")}else r[o]=i}),r},{})}function rf(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>gt(n,r),{})}function IO(t){return typeof t=="function"}function st(t,e=void 0,...n){return IO(t)?e?t.bind(e)(...n):t(...n):t}function LU(t={}){return Object.keys(t).length===0&&t.constructor===Object}function $U(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function DO(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):$U(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function PO(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&LU(n)?!1:n!=null))}function FU(t,e){var n;const r=AO(t),{nodeExtensions:o,markExtensions:i}=nf(t),s=(n=o.find(u=>ze(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(C=>C.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},m=t.reduce((C,E)=>{const T=ze(E,"extendNodeSchema",h);return{...C,...T?T(u):{}}},{}),g=PO({...m,content:st(ze(u,"content",h)),marks:st(ze(u,"marks",h)),group:st(ze(u,"group",h)),inline:st(ze(u,"inline",h)),atom:st(ze(u,"atom",h)),selectable:st(ze(u,"selectable",h)),draggable:st(ze(u,"draggable",h)),code:st(ze(u,"code",h)),whitespace:st(ze(u,"whitespace",h)),linebreakReplacement:st(ze(u,"linebreakReplacement",h)),defining:st(ze(u,"defining",h)),isolating:st(ze(u,"isolating",h)),attrs:Object.fromEntries(f.map(C=>{var E;return[C.name,{default:(E=C==null?void 0:C.attribute)===null||E===void 0?void 0:E.default}]}))}),b=st(ze(u,"parseHTML",h));b&&(g.parseDOM=b.map(C=>DO(C,f)));const y=ze(u,"renderHTML",h);y&&(g.toDOM=C=>y({node:C,HTMLAttributes:rf(C,f)}));const S=ze(u,"renderText",h);return S&&(g.toText=S),[u.name,g]})),l=Object.fromEntries(i.map(u=>{const f=r.filter(S=>S.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},m=t.reduce((S,C)=>{const E=ze(C,"extendMarkSchema",h);return{...S,...E?E(u):{}}},{}),g=PO({...m,inclusive:st(ze(u,"inclusive",h)),excludes:st(ze(u,"excludes",h)),group:st(ze(u,"group",h)),spanning:st(ze(u,"spanning",h)),code:st(ze(u,"code",h)),attrs:Object.fromEntries(f.map(S=>{var C;return[S.name,{default:(C=S==null?void 0:S.attribute)===null||C===void 0?void 0:C.default}]}))}),b=st(ze(u,"parseHTML",h));b&&(g.parseDOM=b.map(S=>DO(S,f)));const y=ze(u,"renderHTML",h);return y&&(g.toDOM=S=>y({mark:S,HTMLAttributes:rf(S,f)})),[u.name,g]}));return new IE({topNode:s,nodes:a,marks:l})}function qg(t,e){return e.nodes[t]||e.marks[t]||null}function _O(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Ug(t,e){const n=ws.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const RU=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,a)=>{var l,u;const f=((u=(l=o.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:o,pos:i,parent:s,index:a}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?f:f.slice(0,Math.max(0,r-i))}),n};function Kg(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class kc{constructor(e){this.find=e.find,this.handler=e.handler}}const BU=(t,e)=>{if(Kg(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function of(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const u=l.state.doc.resolve(r);if(u.parent.type.spec.code||!((e=u.nodeBefore||u.nodeAfter)===null||e===void 0)&&e.marks.find(m=>m.type.spec.code))return!1;let f=!1;const h=RU(u)+i;return s.forEach(m=>{if(f)return;const g=BU(h,m.find);if(!g)return;const b=l.state.tr,y=ef({state:l.state,transaction:b}),S={from:r-(g[0].length-i.length),to:o},{commands:C,chain:E,can:T}=new tf({editor:n,state:y});m.handler({state:y,range:S,match:g,commands:C,chain:E,can:T})===null||!b.steps.length||(b.setMeta(a,{transform:b,from:r,to:o,text:i}),l.dispatch(b),f=!0)}),f}function VU(t){const{editor:e,rules:n}=t,r=new Qt({state:{init(){return null},apply(o,i,s){const a=o.getMeta(r);if(a)return a;const l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:f}=l;typeof f=="string"?f=f:f=Ug(Te.from(f),s.schema);const{from:h}=l,m=h+f.length;of({editor:e,from:h,to:m,text:f,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,a){return of({editor:e,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&of({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?of({editor:e,from:s.pos,to:s.pos,text:`
244
+ `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function zU(t){return Object.prototype.toString.call(t).slice(8,-1)}function sf(t){return zU(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function af(t,e){const n={...t};return sf(t)&&sf(e)&&Object.keys(e).forEach(r=>{sf(e[r])&&sf(t[r])?n[r]=af(t[r],e[r]):n[r]=e[r]}),n}class lr{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=st(ze(this,"addOptions",{name:this.name}))),this.storage=st(ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new lr(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>af(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new lr(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=st(ze(n,"addOptions",{name:n.name})),n.storage=st(ze(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=s.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}function HU(t){return typeof t=="number"}class jU{constructor(e){this.find=e.find,this.handler=e.handler}}const WU=(t,e,n)=>{if(Kg(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function qU(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:u,can:f}=new tf({editor:e,state:n}),h=[];return n.doc.nodesBetween(r,o,(g,b)=>{if(!g.isTextblock||g.type.spec.code)return;const y=Math.max(r,b),S=Math.min(o,b+g.content.size),C=g.textBetween(y-b,S-b,void 0,"");WU(C,i.find,s).forEach(T=>{if(T.index===void 0)return;const w=y+T.index+1,O=w+T[0].length,A={from:n.tr.mapping.map(w),to:n.tr.mapping.map(O)},N=i.handler({state:n,range:A,match:T,commands:l,chain:u,can:f,pasteEvent:s,dropEvent:a});h.push(N)})}),h.every(g=>g!==null)}let lf=null;const UU=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function KU(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:f,from:h,to:m,rule:g,pasteEvt:b})=>{const y=f.tr,S=ef({state:f,transaction:y});if(!(!qU({editor:e,state:S,from:Math.max(h-1,0),to:m.b-1,rule:g,pasteEvent:b,dropEvent:a})||!y.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,y}};return n.map(f=>new Qt({view(h){const m=b=>{var y;r=!((y=h.dom.parentElement)===null||y===void 0)&&y.contains(b.target)?h.dom.parentElement:null,r&&(lf=e)},g=()=>{lf&&(lf=null)};return window.addEventListener("dragstart",m),window.addEventListener("dragend",g),{destroy(){window.removeEventListener("dragstart",m),window.removeEventListener("dragend",g)}}},props:{handleDOMEvents:{drop:(h,m)=>{if(i=r===h.dom.parentElement,a=m,!i){const g=lf;g&&setTimeout(()=>{const b=g.state.selection;b&&g.commands.deleteRange({from:b.from,to:b.to})},10)}return!1},paste:(h,m)=>{var g;const b=(g=m.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return s=m,o=!!(b!=null&&b.includes("data-pm-slice")),!1}}},appendTransaction:(h,m,g)=>{const b=h[0],y=b.getMeta("uiEvent")==="paste"&&!o,S=b.getMeta("uiEvent")==="drop"&&!i,C=b.getMeta("applyPasteRules"),E=!!C;if(!y&&!S&&!E)return;if(E){let{text:O}=C;typeof O=="string"?O=O:O=Ug(Te.from(O),g.schema);const{from:A}=C,N=A+O.length,D=UU(O);return l({rule:f,state:g,from:A,to:{b:N},pasteEvt:D})}const T=m.doc.content.findDiffStart(g.doc.content),w=m.doc.content.findDiffEnd(g.doc.content);if(!(!HU(T)||!w||T===w.b))return l({rule:f,state:g,from:T,to:w,pasteEvt:s})}}))}function YU(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}class Va{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=Va.resolve(e),this.schema=FU(this.extensions,n),this.setupExtensions()}static resolve(e){const n=Va.sort(Va.flatten(e)),r=YU(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=ze(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=ze(r,"priority")||100,s=ze(o,"priority")||100;return i>s?-1:i<s?1:0})}get commands(){return this.extensions.reduce((e,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:qg(n.name,this.schema)},o=ze(n,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,n=Va.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:qg(s.name,this.schema)},l=[],u=ze(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&ze(s,"exitable",a)&&(f.ArrowRight=()=>lr.handleExit({editor:e,mark:s})),u){const y=Object.fromEntries(Object.entries(u()).map(([S,C])=>[S,()=>C({editor:e})]));f={...f,...y}}const h=aU(f);l.push(h);const m=ze(s,"addInputRules",a);_O(s,e.options.enableInputRules)&&m&&r.push(...m());const g=ze(s,"addPasteRules",a);_O(s,e.options.enablePasteRules)&&g&&o.push(...g());const b=ze(s,"addProseMirrorPlugins",a);if(b){const y=b();l.push(...y)}return l}).flat();return[VU({editor:e,rules:r}),...KU({editor:e,rules:o}),...i]}get attributes(){return AO(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=nf(this.extensions);return Object.fromEntries(n.filter(r=>!!ze(r,"addNodeView")).map(r=>{const o=this.attributes.filter(l=>l.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:bn(r.name,this.schema)},s=ze(r,"addNodeView",i);if(!s)return[];const a=(l,u,f,h,m)=>{const g=rf(l,o);return s()({node:l,view:u,getPos:f,decorations:h,innerDecorations:m,editor:e,extension:r,HTMLAttributes:g})};return[r.name,a]}))}setupExtensions(){this.extensions.forEach(e=>{var n;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:qg(e.name,this.schema)};e.type==="mark"&&(!((n=st(ze(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const o=ze(e,"onBeforeCreate",r),i=ze(e,"onCreate",r),s=ze(e,"onUpdate",r),a=ze(e,"onSelectionUpdate",r),l=ze(e,"onTransaction",r),u=ze(e,"onFocus",r),f=ze(e,"onBlur",r),h=ze(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),f&&this.editor.on("blur",f),h&&this.editor.on("destroy",h)})}}class on{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=st(ze(this,"addOptions",{name:this.name}))),this.storage=st(ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new on(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>af(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new on({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=st(ze(n,"addOptions",{name:n.name})),n.storage=st(ze(n,"addStorage",{name:n.name,options:n.options})),n}}function NO(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
245
+
246
+ `,textSerializers:s={}}=n||{};let a="";return t.nodesBetween(r,o,(l,u,f,h)=>{var m;l.isBlock&&u>r&&(a+=i);const g=s==null?void 0:s[l.type.name];if(g)return f&&(a+=g({node:l,pos:u,parent:f,index:h,range:e})),!1;l.isText&&(a+=(m=l==null?void 0:l.text)===null||m===void 0?void 0:m.slice(Math.max(r,u)-u,o-u))}),a}function Yg(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const GU=on.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Qt({key:new yn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o,s=Math.min(...i.map(f=>f.$from.pos)),a=Math.max(...i.map(f=>f.$to.pos)),l=Yg(n);return NO(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),JU=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),ZU=(t=!1)=>({commands:e})=>e.setContent("",t),XU=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{t.doc.nodesBetween(i.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:f}=e,h=u.resolve(f.map(l)),m=u.resolve(f.map(l+a.nodeSize)),g=h.blockRange(m);if(!g)return;const b=Oa(g);if(a.type.isTextblock){const{defaultType:y}=h.parent.contentMatchAt(h.index());e.setNodeMarkup(g.start,y)}(b||b===0)&&e.lift(g,b)})}),!0},QU=t=>e=>t(e),e7=()=>({state:t,dispatch:e})=>xU(t,e),t7=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new Je(r.doc.resolve(s-1))),!0},n7=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const a=o.before(i),l=o.after(i);t.delete(a,l).scrollIntoView()}return!0}return!1},r7=t=>({tr:e,state:n,dispatch:r})=>{const o=bn(t,n.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const l=i.before(s),u=i.after(s);e.delete(l,u).scrollIntoView()}return!0}return!1},o7=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},i7=()=>({state:t,dispatch:e})=>lU(t,e),s7=()=>({commands:t})=>t.keyboardShortcut("Enter"),a7=()=>({state:t,dispatch:e})=>vU(t,e);function cf(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Kg(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function LO(t,e,n={}){return t.find(r=>r.type===e&&cf(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function $O(t,e,n={}){return!!LO(t,e,n)}function Ac(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(f=>f.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(f=>f.type===e)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!LO([...o.node.marks],e,n)))return;let s=o.index,a=t.start()+o.offset,l=s+1,u=a+o.node.nodeSize;for(;s>0&&$O([...t.parent.child(s-1).marks],e,n);)s-=1,a-=t.parent.child(s).nodeSize;for(;l<t.parent.childCount&&$O([...t.parent.child(l).marks],e,n);)u+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function so(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const l7=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=so(t,r.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:f}=a;if(o){const h=Ac(l,i,e);if(h&&h.from<=u&&h.to>=f){const m=Je.create(s,h.from,h.to);n.setSelection(m)}}return!0},c7=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function FO(t){return t instanceof Je}function Zo(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function RO(t,e=null){if(!e)return null;const n=Xe.atStart(t),r=Xe.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?Je.create(t,Zo(0,o,i),Zo(t.content.size,o,i)):Je.create(t,Zo(e,o,i),Zo(e,o,i))}function BO(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function uf(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const u7=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(uf()||BO())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(i&&t===null&&!FO(n.state.selection))return s(),!0;const a=RO(o.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},d7=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),f7=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),VO=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&VO(r)}return t};function df(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return VO(n)}function ff(t,e,n){if(t instanceof Ti||t instanceof Te)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return Te.fromArray(t.map(a=>e.nodeFromJSON(a)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),ff("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,a="";const l=new IE({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?Ei.fromSchema(l).parseSlice(df(t),n.parseOptions):Ei.fromSchema(l).parse(df(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=Ei.fromSchema(e);return n.slice?i.parseSlice(df(t),n.parseOptions).content:i.parse(df(t),n.parseOptions)}return ff("",e,n)}function p7(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof Tn||o instanceof En))return;const i=t.mapping.maps[r];let s=0;i.forEach((a,l,u,f)=>{s===0&&(s=f)}),t.setSelection(Xe.near(t.doc.resolve(s),n))}const h7=t=>!("type"in t),m7=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;try{a=ff(e,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(s=n.errorOnInvalidContent)!==null&&s!==void 0?s:i.options.enableContentCheck})}catch(b){return i.emit("contentError",{editor:i,error:b,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:u}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},f=!0,h=!0;if((h7(a)?a:[a]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,h=h?b.isBlock:!1}),l===u&&h){const{parent:b}=r.doc.resolve(l);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(l-=1,u+=1)}let g;if(f){if(Array.isArray(e))g=e.map(b=>b.text||"").join("");else if(e instanceof Te){let b="";e.forEach(y=>{y.text&&(b+=y.text)}),g=b}else typeof e=="object"&&e&&e.text?g=e.text:g=e;r.insertText(g,l,u)}else g=a,r.replaceWith(l,u,g);n.updateSelection&&p7(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:g})}return!0},g7=()=>({state:t,dispatch:e})=>mU(t,e),y7=()=>({state:t,dispatch:e})=>gU(t,e),b7=()=>({state:t,dispatch:e})=>cU(t,e),v7=()=>({state:t,dispatch:e})=>pU(t,e),x7=()=>({state:t,dispatch:e,tr:n})=>{try{const r=zd(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},S7=()=>({state:t,dispatch:e,tr:n})=>{try{const r=zd(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},C7=()=>({state:t,dispatch:e})=>uU(t,e),w7=()=>({state:t,dispatch:e})=>dU(t,e);function zO(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function T7(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))uf()||zO()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}const E7=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=T7(t).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l==null||l.steps.forEach(u=>{const f=u.map(r.mapping);f&&o&&r.maybeStep(f)}),!0};function Ic(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?bn(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,(h,m)=>{if(h.isText)return;const g=Math.max(r,m),b=Math.min(o,m+h.nodeSize);a.push({node:h,from:g,to:b})});const l=o-r,u=a.filter(h=>s?s.name===h.node.type.name:!0).filter(h=>cf(h.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((h,m)=>h+m.to-m.from,0)>=l}const M7=(t,e={})=>({state:n,dispatch:r})=>{const o=bn(t,n.schema);return Ic(n,o,e)?yU(n,r):!1},O7=()=>({state:t,dispatch:e})=>SU(t,e),k7=t=>({state:e,dispatch:n})=>{const r=bn(t,e.schema);return IU(r)(e,n)},A7=()=>({state:t,dispatch:e})=>bU(t,e);function Dc(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function HO(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}const I7=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=Dc(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=bn(t,r.schema)),a==="mark"&&(s=so(t,r.schema)),o&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,f)=>{i&&i===u.type&&n.setNodeMarkup(f,void 0,HO(u.attrs,e)),s&&u.marks.length&&u.marks.forEach(h=>{s===h.type&&n.addMark(f,f+u.nodeSize,s.create(HO(h.attrs,e)))})})}),!0):!1},D7=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),P7=()=>({tr:t,dispatch:e})=>{if(e){const n=new Rr(t.doc);t.setSelection(n)}return!0},_7=()=>({state:t,dispatch:e})=>fU(t,e),N7=()=>({state:t,dispatch:e})=>hU(t,e),L7=()=>({state:t,dispatch:e})=>CU(t,e),$7=()=>({state:t,dispatch:e})=>EU(t,e),F7=()=>({state:t,dispatch:e})=>TU(t,e);function Gg(t,e,n={},r={}){return ff(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const R7=(t,e=!1,n={},r={})=>({editor:o,tr:i,dispatch:s,commands:a})=>{var l,u;const{doc:f}=i;if(n.preserveWhitespace!=="full"){const h=Gg(t,o.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return s&&i.replaceWith(0,f.content.size,h).setMeta("preventUpdate",!e),!0}return s&&i.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:f.content.size},t,{parseOptions:n,errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:o.options.enableContentCheck})};function jO(t,e){const n=so(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function B7(t,e){const n=new dg(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function V7(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function z7(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function Jg(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Zg(t){return e=>Jg(e.$from,t)}function WO(t,e){const n={from:0,to:t.content.size};return NO(t,n,e)}function H7(t,e){const n=bn(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,a=>{i.push(a)});const s=i.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function Xg(t,e){const n=Dc(typeof e=="string"?e:e.name,t.schema);return n==="node"?H7(t,e):n==="mark"?jO(t,e):{}}function j7(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function W7(t){const e=j7(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function q7(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const u=e.slice(i).map(a,-1),f=e.slice(i).map(l),h=e.invert().map(u,-1),m=e.invert().map(f);r.push({oldRange:{from:h,to:m},newRange:{from:u,to:f}})})}),W7(r)}function Qg(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),s=Ac(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}function pf(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function ey(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?so(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(h=>i?i.name===h.type.name:!0).find(h=>cf(h.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:h,$to:m})=>{const g=h.pos,b=m.pos;t.doc.nodesBetween(g,b,(y,S)=>{if(!y.isText&&!y.marks.length)return;const C=Math.max(g,S),E=Math.min(b,S+y.nodeSize),T=E-C;s+=T,a.push(...y.marks.map(w=>({mark:w,from:C,to:E})))})}),s===0)return!1;const l=a.filter(h=>i?i.name===h.mark.type.name:!0).filter(h=>cf(h.mark.attrs,n,{strict:!1})).reduce((h,m)=>h+m.to-m.from,0),u=a.filter(h=>i?h.mark.type!==i&&h.mark.type.excludes(i):!0).reduce((h,m)=>h+m.to-m.from,0);return(l>0?l+u:l)>=s}function U7(t,e,n={}){if(!e)return Ic(t,null,n)||ey(t,null,n);const r=Dc(e,t.schema);return r==="node"?Ic(t,e,n):r==="mark"?ey(t,e,n):!1}function qO(t,e){const{nodeExtensions:n}=nf(e),r=n.find(s=>s.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=st(ze(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function hf(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!==null&&r!==void 0?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(hf(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function UO(t){return t instanceof Ke}function KO(t,e,n){const o=t.state.doc.content.size,i=Zo(e,0,o),s=Zo(n,0,o),a=t.coordsAtPos(i),l=t.coordsAtPos(s,-1),u=Math.min(a.top,l.top),f=Math.max(a.bottom,l.bottom),h=Math.min(a.left,l.left),m=Math.max(a.right,l.right),g=m-h,b=f-u,C={top:u,bottom:f,left:h,right:m,width:g,height:b,x:h,y:u};return{...C,toJSON:()=>C}}function K7(t,e,n){var r;const{selection:o}=e;let i=null;if(FO(o)&&(i=o.$cursor),i){const a=(r=t.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:s}=o;return s.some(({$from:a,$to:l})=>{let u=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(f,h,m)=>{if(u)return!1;if(f.isInline){const g=!m||m.type.allowsMarkType(n),b=!!n.isInSet(f.marks)||!f.marks.some(y=>y.type.excludes(n));u=g&&b}return!u}),u})}const Y7=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=so(t,r.schema);if(o)if(s){const u=jO(r,l);n.addStoredMark(l.create({...u,...e}))}else a.forEach(u=>{const f=u.$from.pos,h=u.$to.pos;r.doc.nodesBetween(f,h,(m,g)=>{const b=Math.max(g,f),y=Math.min(g+m.nodeSize,h);m.marks.find(C=>C.type===l)?m.marks.forEach(C=>{l===C.type&&n.addMark(b,y,l.create({...C.attrs,...e}))}):n.addMark(b,y,l.create(e))})});return K7(r,n,l)},G7=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),J7=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=bn(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:a})=>kO(i,{...s,...e})(n)?!0:a.clearNodes()).command(({state:a})=>kO(i,{...s,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Z7=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Zo(t,0,r.content.size),i=Ke.create(r,o);e.setSelection(i)}return!0},X7=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,s=Je.atStart(r).from,a=Je.atEnd(r).to,l=Zo(o,s,a),u=Zo(i,s,a),f=Je.create(r,l,u);e.setSelection(f)}return!0},Q7=t=>({state:e,dispatch:n})=>{const r=bn(t,e.schema);return _U(r)(e,n)};function YO(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}const eK=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:a,$to:l}=i,u=o.extensionManager.attributes,f=pf(u,a.node().type.name,a.node().attrs);if(i instanceof Ke&&i.node.isBlock)return!a.parentOffset||!ka(s,a.pos)?!1:(r&&(t&&YO(n,o.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const h=l.parentOffset===l.parent.content.size,m=a.depth===0?void 0:V7(a.node(-1).contentMatchAt(a.indexAfter(-1)));let g=h&&m?[{type:m,attrs:f}]:void 0,b=ka(e.doc,e.mapping.map(a.pos),1,g);if(!g&&!b&&ka(e.doc,e.mapping.map(a.pos),1,m?[{type:m}]:void 0)&&(b=!0,g=m?[{type:m,attrs:f}]:void 0),r){if(b&&(i instanceof Je&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,g),m&&!h&&!a.parentOffset&&a.parent.type!==m)){const y=e.mapping.map(a.before()),S=e.doc.resolve(y);a.node(-1).canReplaceWith(S.index(),S.index()+1,m)&&e.setNodeMarkup(e.mapping.map(a.before()),m)}t&&YO(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return b},tK=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const a=bn(t,r.schema),{$from:l,$to:u}=r.selection,f=r.selection.node;if(f&&f.isBlock||l.depth<2||!l.sameParent(u))return!1;const h=l.node(-1);if(h.type!==a)return!1;const m=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let C=Te.empty;const E=l.index(-1)?1:l.index(-2)?2:3;for(let D=l.depth-E;D>=l.depth-3;D-=1)C=Te.from(l.node(D).copy(C));const T=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,w={...pf(m,l.node().type.name,l.node().attrs),...e},O=((s=a.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(w))||void 0;C=C.append(Te.from(a.createAndFill(null,O)||void 0));const A=l.before(l.depth-(E-1));n.replace(A,l.after(-T),new Ie(C,4-E,0));let N=-1;n.doc.nodesBetween(A,n.doc.content.size,(D,L)=>{if(N>-1)return!1;D.isTextblock&&D.content.size===0&&(N=L+1)}),N>-1&&n.setSelection(Je.near(n.doc.resolve(N))),n.scrollIntoView()}return!0}const g=u.pos===l.end()?h.contentMatchAt(0).defaultType:null,b={...pf(m,h.type.name,h.attrs),...e},y={...pf(m,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,u.pos);const S=g?[{type:a,attrs:b},{type:g,attrs:y}]:[{type:a,attrs:b}];if(!ka(n.doc,l.pos,2))return!1;if(o){const{selection:C,storedMarks:E}=r,{splittableMarks:T}=i.extensionManager,w=E||C.$to.parentOffset&&C.$from.marks();if(n.split(l.pos,2,S).scrollIntoView(),!w||!o)return!0;const O=w.filter(A=>T.includes(A.type.name));n.ensureMarks(O)}return!0},ty=(t,e)=>{const n=Zg(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&ki(t.doc,n.pos)&&t.join(n.pos),!0},ny=(t,e)=>{const n=Zg(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&ki(t.doc,r)&&t.join(r),!0};var nK=Object.freeze({__proto__:null,blur:JU,clearContent:ZU,clearNodes:XU,command:QU,createParagraphNear:e7,cut:t7,deleteCurrentNode:n7,deleteNode:r7,deleteRange:o7,deleteSelection:i7,enter:s7,exitCode:a7,extendMarkRange:l7,first:c7,focus:u7,forEach:d7,insertContent:f7,insertContentAt:m7,joinBackward:b7,joinDown:y7,joinForward:v7,joinItemBackward:x7,joinItemForward:S7,joinTextblockBackward:C7,joinTextblockForward:w7,joinUp:g7,keyboardShortcut:E7,lift:M7,liftEmptyBlock:O7,liftListItem:k7,newlineInCode:A7,resetAttributes:I7,scrollIntoView:D7,selectAll:P7,selectNodeBackward:_7,selectNodeForward:N7,selectParentNode:L7,selectTextblockEnd:$7,selectTextblockStart:F7,setContent:R7,setMark:Y7,setMeta:G7,setNode:J7,setNodeSelection:Z7,setTextSelection:X7,sinkListItem:Q7,splitBlock:eK,splitListItem:tK,toggleList:(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:u,can:f})=>{const{extensions:h,splittableMarks:m}=o.extensionManager,g=bn(t,s.schema),b=bn(e,s.schema),{selection:y,storedMarks:S}=s,{$from:C,$to:E}=y,T=C.blockRange(E),w=S||y.$to.parentOffset&&y.$from.marks();if(!T)return!1;const O=Zg(A=>qO(A.type.name,h))(y);if(T.depth>=1&&O&&T.depth-O.depth<=1){if(O.node.type===g)return u.liftListItem(b);if(qO(O.node.type.name,h)&&g.validContent(O.node.content)&&a)return l().command(()=>(i.setNodeMarkup(O.pos,g),!0)).command(()=>ty(i,g)).command(()=>ny(i,g)).run()}return!n||!w||!a?l().command(()=>f().wrapInList(g,r)?!0:u.clearNodes()).wrapInList(g,r).command(()=>ty(i,g)).command(()=>ny(i,g)).run():l().command(()=>{const A=f().wrapInList(g,r),N=w.filter(D=>m.includes(D.type.name));return i.ensureMarks(N),A?!0:u.clearNodes()}).wrapInList(g,r).command(()=>ty(i,g)).command(()=>ny(i,g)).run()},toggleMark:(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=so(t,r.schema);return ey(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},toggleNode:(t,e,n={})=>({state:r,commands:o})=>{const i=bn(t,r.schema),s=bn(e,r.schema),a=Ic(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?o.setNode(s,l):o.setNode(i,{...l,...n})},toggleWrap:(t,e={})=>({state:n,commands:r})=>{const o=bn(t,n.schema);return Ic(n,o,e)?r.lift(o):r.wrapIn(o,e)},undoInputRule:()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const s=t.tr,a=i.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(i.text){const l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else s.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},unsetMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=so(t,r.schema),{$from:u,empty:f,ranges:h}=a;if(!o)return!0;if(f&&s){let{from:m,to:g}=a;const b=(i=u.marks().find(S=>S.type===l))===null||i===void 0?void 0:i.attrs,y=Ac(u,l,b);y&&(m=y.from,g=y.to),n.removeMark(m,g,l)}else h.forEach(m=>{n.removeMark(m.$from.pos,m.$to.pos,l)});return n.removeStoredMark(l),!0},updateAttributes:(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=Dc(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=bn(t,r.schema)),a==="mark"&&(s=so(t,r.schema)),o&&n.selection.ranges.forEach(l=>{const u=l.$from.pos,f=l.$to.pos;let h,m,g,b;n.selection.empty?r.doc.nodesBetween(u,f,(y,S)=>{i&&i===y.type&&(g=Math.max(S,u),b=Math.min(S+y.nodeSize,f),h=S,m=y)}):r.doc.nodesBetween(u,f,(y,S)=>{S<u&&i&&i===y.type&&(g=Math.max(S,u),b=Math.min(S+y.nodeSize,f),h=S,m=y),S>=u&&S<=f&&(i&&i===y.type&&n.setNodeMarkup(S,void 0,{...y.attrs,...e}),s&&y.marks.length&&y.marks.forEach(C=>{if(s===C.type){const E=Math.max(S,u),T=Math.min(S+y.nodeSize,f);n.addMark(E,T,s.create({...C.attrs,...e}))}}))}),m&&(h!==void 0&&n.setNodeMarkup(h,void 0,{...m.attrs,...e}),s&&m.marks.length&&m.marks.forEach(y=>{s===y.type&&n.addMark(g,b,s.create({...y.attrs,...e}))}))}),!0):!1},wrapIn:(t,e={})=>({state:n,dispatch:r})=>{const o=bn(t,n.schema);return MU(o,e)(n,r)},wrapInList:(t,e={})=>({state:n,dispatch:r})=>{const o=bn(t,n.schema);return OU(o,e)(n,r)}});const rK=on.create({name:"commands",addCommands(){return{...nK}}}),oK=on.create({name:"drop",addProseMirrorPlugins(){return[new Qt({key:new yn("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),iK=on.create({name:"editable",addProseMirrorPlugins(){return[new Qt({key:new yn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),sK=new yn("focusEvents"),aK=on.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Qt({key:sK,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),lK=on.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:f,$anchor:h}=l,{pos:m,parent:g}=h,b=h.parent.isTextblock&&m>0?a.doc.resolve(m-1):h,y=b.parent.type.spec.isolating,S=h.pos-h.parentOffset,C=y&&b.parent.childCount===1?S===h.pos:Xe.atStart(u).from===m;return!f||!g.type.isTextblock||g.textContent.length||!C||C&&h.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return uf()||zO()?i:o},addProseMirrorPlugins(){return[new Qt({key:new yn("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(y=>y.getMeta("composition")))return;const r=t.some(y=>y.docChanged)&&!e.doc.eq(n.doc),o=t.some(y=>y.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:a}=e.selection,l=Xe.atStart(e.doc).from,u=Xe.atEnd(e.doc).to;if(i||!(s===l&&a===u)||!hf(n.doc))return;const m=n.tr,g=ef({state:n,transaction:m}),{commands:b}=new tf({editor:this.editor,state:g});if(b.clearNodes(),!!m.steps.length)return m}})]}}),cK=on.create({name:"paste",addProseMirrorPlugins(){return[new Qt({key:new yn("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),uK=on.create({name:"tabindex",addProseMirrorPlugins(){return[new Qt({key:new yn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Ds{get name(){return this.node.type.name}constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Ds(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Ds(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Ds(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1),a=this.resolvedPos.doc.resolve(s);if(!o&&a.depth<=this.depth)return;const l=new Ds(a,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),e.push(new Ds(a,this.editor,o,o?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const i=o.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){const l=s[a];if(i[l]!==n[l])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(s=>{r&&o.length>0||(s.node.type.name===e&&i.every(l=>n[l]===s.node.attrs[l])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}}const dK=`.ProseMirror {
247
+ position: relative;
248
+ }
249
+
250
+ .ProseMirror {
251
+ word-wrap: break-word;
252
+ white-space: pre-wrap;
253
+ white-space: break-spaces;
254
+ -webkit-font-variant-ligatures: none;
255
+ font-variant-ligatures: none;
256
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
257
+ }
258
+
259
+ .ProseMirror [contenteditable="false"] {
260
+ white-space: normal;
261
+ }
262
+
263
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
264
+ white-space: pre-wrap;
265
+ }
266
+
267
+ .ProseMirror pre {
268
+ white-space: pre-wrap;
269
+ }
270
+
271
+ img.ProseMirror-separator {
272
+ display: inline !important;
273
+ border: none !important;
274
+ margin: 0 !important;
275
+ width: 0 !important;
276
+ height: 0 !important;
277
+ }
278
+
279
+ .ProseMirror-gapcursor {
280
+ display: none;
281
+ pointer-events: none;
282
+ position: absolute;
283
+ margin: 0;
284
+ }
285
+
286
+ .ProseMirror-gapcursor:after {
287
+ content: "";
288
+ display: block;
289
+ position: absolute;
290
+ top: -2px;
291
+ width: 20px;
292
+ border-top: 1px solid black;
293
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
294
+ }
295
+
296
+ @keyframes ProseMirror-cursor-blink {
297
+ to {
298
+ visibility: hidden;
299
+ }
300
+ }
301
+
302
+ .ProseMirror-hideselection *::selection {
303
+ background: transparent;
304
+ }
305
+
306
+ .ProseMirror-hideselection *::-moz-selection {
307
+ background: transparent;
308
+ }
309
+
310
+ .ProseMirror-hideselection * {
311
+ caret-color: transparent;
312
+ }
313
+
314
+ .ProseMirror-focused .ProseMirror-gapcursor {
315
+ display: block;
316
+ }
317
+
318
+ .tippy-box[data-animation=fade][data-state=hidden] {
319
+ opacity: 0
320
+ }`;function fK(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}class pK extends NU{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:o})=>this.options.onDrop(n,r,o)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=fK(dK,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,n){const r=IO(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(e).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;r=n.filter(a=>!a.key.startsWith(s))}),n.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var e,n;const o=[...this.options.enableCoreExtensions?[iK,GU.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),rK,aK,lK,uK,oK,cK].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new Va(o,this)}createCommandManager(){this.commandManager=new tf({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=Gg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),n=Gg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=RO(n,this.options.autofocus);this.view=new X8(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Pa.create({doc:n,selection:r||void 0})});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return Xg(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return U7(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ug(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
321
+
322
+ `,textSerializers:r={}}=e||{};return WO(this.state.doc,{blockSeparator:n,textSerializers:{...Yg(this.schema),...r}})}get isEmpty(){return hf(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new Ds(n,this)}get $doc(){return this.$pos(0)}}function Ps(t){return new kc({find:t.find,handler:({state:e,range:n,match:r})=>{const o=st(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(Qg(n.from,n.to,e.doc).filter(g=>g.mark.type.excluded.find(y=>y===t.type&&y!==g.mark.type)).filter(g=>g.to>u).length)return null;f<n.to&&i.delete(f,n.to),u>n.from&&i.delete(n.from+l,u);const m=n.from+l+s.length;i.addMark(n.from+l,m,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function GO(t){return new kc({find:t.find,handler:({state:e,range:n,match:r})=>{const o=st(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from;let a=n.to;const l=t.type.create(o);if(r[1]){const u=r[0].lastIndexOf(r[1]);let f=s+u;f>a?f=a:a=f+r[1].length;const h=r[0][r[0].length-1];i.insertText(h,s+r[0].length-1),i.replaceWith(f,a,l)}else if(r[0]){const u=t.type.isInline?s:s-1;i.insert(u,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a))}i.scrollIntoView()}})}function ry(t){return new kc({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=st(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function za(t){return new kc({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=st(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&lg(l,t.type,i);if(!u)return null;if(s.wrap(l,u),t.keepMarks&&t.editor){const{selection:h,storedMarks:m}=e,{splittableMarks:g}=t.editor.extensionManager,b=m||h.$to.parentOffset&&h.$from.marks();if(b){const y=b.filter(S=>g.includes(S.type.name));s.ensureMarks(y)}}if(t.keepAttributes){const h=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(h,i).run()}const f=s.doc.resolve(n.from-1).nodeBefore;f&&f.type===t.type&&ki(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,f))&&s.join(n.from-1)}})}class en{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=st(ze(this,"addOptions",{name:this.name}))),this.storage=st(ze(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new en(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>af(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new en(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=st(ze(n,"addOptions",{name:n.name})),n.storage=st(ze(n,"addStorage",{name:n.name,options:n.options})),n}}class hK{constructor(e,n,r){this.isDragging=!1,this.component=e,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var n,r,o,i,s,a,l;const{view:u}=this.editor,f=e.target,h=f.nodeType===3?(n=f.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):f.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(f)||!h)return;let m=0,g=0;if(this.dom!==h){const C=this.dom.getBoundingClientRect(),E=h.getBoundingClientRect(),T=(o=e.offsetX)!==null&&o!==void 0?o:(i=e.nativeEvent)===null||i===void 0?void 0:i.offsetX,w=(s=e.offsetY)!==null&&s!==void 0?s:(a=e.nativeEvent)===null||a===void 0?void 0:a.offsetY;m=E.x-C.x+T,g=E.y-C.y+w}(l=e.dataTransfer)===null||l===void 0||l.setDragImage(this.dom,m,g);const b=this.getPos();if(typeof b!="number")return;const y=Ke.create(u.state.doc,b),S=u.state.tr.setSelection(y);u.dispatch(S)}stopEvent(e){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const r=e.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const i=e.type.startsWith("drag"),s=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!s&&!i)return!0;const{isEditable:l}=this.editor,{isDragging:u}=this,f=!!this.node.type.spec.draggable,h=Ke.isSelectable(this.node),m=e.type==="copy",g=e.type==="paste",b=e.type==="cut",y=e.type==="mousedown";if(!f&&h&&i&&e.target===this.dom&&e.preventDefault(),f&&i&&!u&&e.target===this.dom)return e.preventDefault(),!1;if(f&&l&&!u&&y){const S=r.closest("[data-drag-handle]");S&&(this.dom===S||this.dom.contains(S))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(u||s||m||g||b||y&&h)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(uf()||BO())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return typeof r!="number"?!1:(n.setNodeMarkup(r,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const n=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:n})}}function Ri(t){return new jU({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=st(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let u=n.to;if(a){const f=l.search(/\S/),h=n.from+l.indexOf(a),m=h+a.length;if(Qg(n.from,n.to,e.doc).filter(b=>b.mark.type.excluded.find(S=>S===t.type&&S!==b.mark.type)).filter(b=>b.to>h).length)return null;m<n.to&&s.delete(m,n.to),h>n.from&&s.delete(n.from+f,h),u=n.from+f+a.length,s.addMark(n.from+f,u,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function mK(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}const JO=Object.fromEntries?Object.fromEntries:t=>{if(!t||!t[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const e={};return Object.keys(t).forEach(n=>{const[r,o]=t[n];e[r]=o}),e};function Bi(t){return Object.keys(t)}function _s(t,e){if(!t)throw new Error(e)}function oy(t,e){return e}const iy=t=>{const e=t.length;let n=0,r="";for(;n<e;n++){const o=t[n];if(o==null)continue;let i;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=iy(o);else{_s(!oy(o,!1)),process.env.NODE_ENV!=="production"&&o.styles!==void 0&&o.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),i="";for(const s in o)o[s]&&s&&(i&&(i+=" "),i+=s)}break}default:i=o}i&&(r&&(r+=" "),r+=i)}return r};function gK(t,e,n){var r="";return n.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):o&&(r+=o+" ")}),r}var yK=function(e,n,r){var o=e.key+"-"+n.name;e.registered[o]===void 0&&(e.registered[o]=n.styles)},bK=function(e,n,r){yK(e,n);var o=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var i=n;do e.insert(n===i?"."+o:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};function vK(t,e){var n;const r=J.useRef();return(!r.current||e.length!==((n=r.current.prevDeps)===null||n===void 0?void 0:n.length)||r.current.prevDeps.map((o,i)=>o===e[i]).indexOf(!1)>=0)&&(r.current={v:t(),prevDeps:[...e]}),r.current.v}function xK(t){return t instanceof Object&&!("styles"in t)&&!("length"in t)&&!("__emotion_styles"in t)}const{createCssAndCx:SK}=(()=>{function t(n,r,o){const i=[],s=gK(n,i,o);return i.length<2?o:s+r(i)}function e(n){const{cache:r}=n,o=(...s)=>{const a=DS(s,r.registered);bK(r,a);const l=`${r.key}-${a.name}`;e:{const u=s[0];if(!xK(u))break e;XO.saveClassNameCSSObjectMapping(r,l,u)}return l};return{css:o,cx:(...s)=>{const a=iy(s),l=XO.fixClassName(r,a,o);return t(r.registered,o,l)}}}return{createCssAndCx:e}})();function ZO(t){const{useCache:e}=t;function n(){const r=e(),{css:o,cx:i}=vK(()=>SK({cache:r}),[r]);return{css:o,cx:i}}return{useCssAndCx:n}}const XO=(()=>{const t=new WeakMap;return{saveClassNameCSSObjectMapping:(e,n,r)=>{let o=t.get(e);o===void 0&&(o=new Map,t.set(e,o)),o.set(n,r)},fixClassName:(()=>{function e(n){let r=!1;return n.map(([o,i])=>{if(i===void 0)return o;let s;if(r)s={"&&":i};else{s=o;for(const a in i)if(a.startsWith("@media")){r=!0;break}}return s})}return(n,r,o)=>{const i=t.get(n);return iy(e(r.split(" ").map(s=>[s,i==null?void 0:i.get(s)])).map(s=>typeof s=="string"?s:o(s)))}})()}})();function Vi(t){if(!(t instanceof Object)||typeof t=="function")return t;const e=[];for(const n in t){const r=t[n],o=typeof r;if(!(o==="string"||o==="number"&&!isNaN(r)||o==="boolean"||r===void 0||r===null))return t;e.push(`${n}:${o}_${r}`)}return"xSqLiJdLMd9s"+e.join("|")}function sy(t,e,n){if(!(e instanceof Object))return t;const r={};return Bi(t).forEach(o=>r[o]=n(t[o],e[o])),Bi(e).forEach(o=>{if(o in t)return;const i=e[o];typeof i=="string"&&(r[o]=i)}),r}const QO=({classes:t,theme:e,muiStyleOverridesParams:n,css:r,cx:o,name:i})=>{var s,a;e:{if(i==="makeStyle no name"){i=void 0;break e}if(n!==void 0&&i===void 0)throw new Error("To use muiStyleOverridesParams, you must specify a name using .withName('MyComponent')")}let l;try{l=i===void 0?void 0:((a=(s=e.components)===null||s===void 0?void 0:s[i])===null||a===void 0?void 0:a.styleOverrides)||void 0}catch{}const u=J.useMemo(()=>{if(l===void 0)return;const f={};for(const h in l){const m=l[h];m instanceof Object&&(f[h]=r(typeof m=="function"?m({theme:e,ownerState:n==null?void 0:n.ownerState,...n==null?void 0:n.props}):m))}return f},[l,Vi(n==null?void 0:n.props),Vi(n==null?void 0:n.ownerState),r]);return t=J.useMemo(()=>sy(t,u,o),[t,u,o]),{classes:t}};let CK=0;function ek(t){const{useTheme:e,cache:n}=t,{useCache:r}=tk({cacheProvidedAtInception:n}),{useCssAndCx:o}=ZO({useCache:r});function i(a){const{name:l,uniqId:u=`${CK++}`}=a??{},f=typeof l!="object"?l:Object.keys(l)[0];return function(h){const m=typeof h=="function"?h:()=>h;return function(b,y){const S=e();let{css:C,cx:E}=o();const T=r();let w=J.useMemo(()=>{const O={},A=typeof Proxy<"u"&&new Proxy({},{get:(L,k)=>(typeof k=="symbol"&&_s(!1),O[k]=`${T.key}-${u}${f!==void 0?`-${f}`:""}-${k}-ref`)}),N=m(S,b,A||{}),D=JO(Bi(N).map(L=>{const k=N[L];return k.label||(k.label=`${f!==void 0?`${f}-`:""}${L}`),[L,`${C(k)}${oy(L,L in O)?` ${O[L]}`:""}`]}));return Bi(O).forEach(L=>{L in D||(D[L]=O[L])}),D},[T,C,E,S,Vi(b)]);{const O=y==null?void 0:y.props.classes;w=J.useMemo(()=>sy(w,O,E),[w,Vi(O),E])}{const O=QO({classes:w,css:C,cx:E,name:f??"makeStyle no name",idOfUseStyles:u,muiStyleOverridesParams:y,theme:S});O.classes!==void 0&&(w=O.classes),O.css!==void 0&&(C=O.css),O.cx!==void 0&&(E=O.cx)}return{classes:w,theme:S,css:C,cx:E}}}}function s(){const a=e(),{css:l,cx:u}=o();return{theme:a,css:l,cx:u}}return{makeStyles:i,useStyles:s}}const wK=J.createContext(void 0),{createUseCache:tk}=(()=>{function t(){return J.useContext(wK)}function e(n){const{cacheProvidedAtInception:r}=n;function o(){var i;const s=Qr.__unsafe_useEmotionCache(),a=t(),l=(i=r??a)!==null&&i!==void 0?i:s;if(l===null)throw new Error(["In order to get SSR working with tss-react you need to explicitly provide an Emotion cache.","MUI users be aware: This is not an error strictly related to tss-react, with or without tss-react,","MUI needs an Emotion cache to be provided for SSR to work.","Here is the MUI documentation related to SSR setup: https://mui.com/material-ui/guides/server-rendering/","TSS provides helper that makes the process of setting up SSR easier: https://docs.tss-react.dev/ssr"].join(`
323
+ `));return l}return{useCache:o}}return{createUseCache:e}})();function nk(t){return t.charAt(0).toUpperCase()+t.slice(1)}function TK(t){const{useTheme:e,cache:n}=t,{makeStyles:r}=ek({useTheme:e,cache:n});function o(i,s,a){const l=typeof i=="string"?(()=>{const g=i,b=function({children:y,...S}){return J.createElement(g,S,y)};return Object.defineProperty(b,"name",{value:nk(g)}),b})():i,u=(()=>{{const{name:b}=a??{};if(b!==void 0)return typeof b!="object"?b:Object.keys(b)[0]}let g;e:{const b=l.displayName;if(typeof b!="string"||b==="")break e;g=b}e:{if(g!==void 0)break e;const b=l.name;if(typeof b!="string"||b==="")break e;g=b}if(g!==void 0)return g=g.replace(/\$/g,"usd"),g=g.replace(/\(/g,"_").replace(/\)/g,"_"),g=g.replace(/[^a-zA-Z0-9-_]/g,"_"),g})(),f=r({...a,name:u})(typeof s=="function"?(g,b,y)=>ik(s(g,b,y)):ik(s));function h(g){for(const b in g)if(b!=="root")return!0;return!1}const m=J.forwardRef(function(g,b){const{className:y,classes:S,...C}=g,{classes:E,cx:T}=f(g,{props:g}),w=T(E.root,y);return rk.set(E,{...E,root:w}),J.createElement(l,{ref:b,className:h(E)?y:w,...typeof i=="string"?{}:{classes:E},...C})});return u!==void 0&&(m.displayName=`${nk(u)}WithStyles`,Object.defineProperty(m,"name",{value:m.displayName})),m}return o.getClasses=EK,{withStyles:o}}const rk=new WeakMap,ok="getClasses should only be used in conjunction with withStyles";function EK(t){const e=t.classes;if(e===void 0)throw new Error(ok);const n=rk.get(e);if(n===void 0)throw new Error(ok);return n}function ik(t){const e={},n={};return Object.keys(t).forEach(r=>(r.startsWith("@media")?n:e)[r]=t[r]),Object.keys(n).forEach(r=>{const o=n[r];Object.keys(o).forEach(i=>{var s;return e[i]={...(s=e[i])!==null&&s!==void 0?s:{},[r]:o[i]}})}),e}const MK=!(typeof document=="object"&&typeof(document==null?void 0:document.getElementById)=="function")&&!(typeof jest<"u")&&!(typeof mocha<"u")&&!(typeof __vitest_worker__<"u");function sk(t){ak=0,zi.splice(0,zi.length);const{useContext:e,usePlugin:n,cache:r}=t,{useCache:o}=tk({cacheProvidedAtInception:r}),{useCssAndCx:i}=ZO({useCache:o});return{tss:mf({useContext:e,useCache:o,useCssAndCx:i,usePlugin:n??(({classes:l,cx:u,css:f})=>({classes:l,cx:u,css:f})),name:void 0,doesUseNestedSelectors:!1})}}let ak=0;const zi=[];function mf(t){const{useContext:e,useCache:n,useCssAndCx:r,usePlugin:o,name:i,doesUseNestedSelectors:s}=t;return{withParams:()=>mf({...t}),withName:a=>mf({...t,name:typeof a!="object"?a:Object.keys(a)[0]}),withNestedSelectors:()=>mf({...t,doesUseNestedSelectors:!0}),create:a=>{const l=`x${ak++}`;if(i!==void 0)for(;;){const f=zi.find(h=>h.name===i);if(f===void 0)break;zi.splice(zi.indexOf(f),1)}const u=typeof a=="function"?a:()=>a;return function(h){var m,g,b;const{classesOverrides:y,...S}=h??{},C=e(),{css:E,cx:T}=r(),w=n(),O=()=>{const D={},L=u({...h,...C,...s?{classes:typeof Proxy>"u"?{}:new Proxy({},{get:(I,$)=>{if(typeof $=="symbol"&&_s(!1),MK&&i===void 0)throw new Error(["tss-react: In SSR setups, in order to use nested selectors, you must also give a unique name to the useStyle function.",'Solution: Use tss.withName("ComponentName").withNestedSelectors<...>()... to set a name.'].join(`
324
+ `));e:{if(i===void 0)break e;let H=zi.find(z=>z.name===i&&z.idOfUseStyles===l);H===void 0&&(H={name:i,idOfUseStyles:l,nestedSelectorRuleNames:new Set},zi.push(H)),H.nestedSelectorRuleNames.add($)}e:{if(i===void 0||!(zi.find(z=>z.name===i&&z.idOfUseStyles!==l&&z.nestedSelectorRuleNames.has($))!==void 0))break e;throw new Error([`tss-react: There are in your codebase two different useStyles named "${i}" that`,`both use use the nested selector ${$}.
325
+ `,`This may lead to CSS class name collisions, causing nested selectors to target elements outside of the intended scope.
326
+ `,`Solution: Ensure each useStyles using nested selectors has a unique name.
327
+ `,'Use: tss.withName("UniqueName").withNestedSelectors<...>()...'].join(" "))}return D[$]=`${w.key}-${i!==void 0?i:l}-${$}-ref`}})}:{}});let k=JO(Bi(L).map(I=>{const $=L[I];return $.label||($.label=`${i!==void 0?`${i}-`:""}${I}`),[I,`${E($)}${oy(I,I in D)?` ${D[I]}`:""}`]}));return Bi(D).forEach(I=>{I in k||(k[I]=D[I])}),k=sy(k,y,T),k},A=OK({cache:w,cssObjectByRuleNameOrGetCssObjectByRuleName:a,classesOverridesRef:Vi(y),paramsAndPluginParamsRef:Vi(S),idOfUseStyles:l,context:C,getClasses:O}),N=o({classes:A,css:E,cx:T,idOfUseStyles:l,name:i,...C,...S});return{classes:(m=N.classes)!==null&&m!==void 0?m:A,css:(g=N.css)!==null&&g!==void 0?g:E,cx:(b=N.cx)!==null&&b!==void 0?b:T,...C}}}}}const gf=new WeakMap;function OK(t){const{cache:e,cssObjectByRuleNameOrGetCssObjectByRuleName:n,classesOverridesRef:r,paramsAndPluginParamsRef:o,idOfUseStyles:i,context:s,getClasses:a}=t;e:{const u=gf.get(e);if(u===void 0)break e;const f=u.get(n);if(f===void 0)break e;const h=f.get(r);if(h===void 0)break e;const m=h.get(o);if(m===void 0)break e;const g=m.find(({context:b})=>{if(b===s)return!0;if(Bi(b).length!==Bi(s).length)return!1;for(const y in b)if(Vi(b[y])!==Vi(s[y]))return!1;return!0});if(g===void 0)break e;if((g==null?void 0:g.idOfUseStyles)!==i){m.splice(m.indexOf(g),1);break e}return g.result}const l=a();{gf.has(e)||gf.set(e,new WeakMap);const u=gf.get(e);_s(u!==void 0),u.has(n)||u.set(n,new Map);const f=u.get(n);_s(f!==void 0),f.has(r)||(f.size>200&&f.clear(),f.set(r,new Map));const h=f.get(r);if(_s(h!==void 0),!h.has(o)){e:{const g=typeof o=="string"?257:5;if(h.size<g)break e;h.clear()}h.set(o,[])}let m=h.get(o);_s(m!==void 0),m.length>5&&(m=[]),m.push({idOfUseStyles:i,context:s,result:l})}return l}function kK(t){return{...ek(t),...TK(t)}}const{tss:AK}=sk({useContext:()=>({})});AK.create({});const{makeStyles:qt,withStyles:nue}=kK({useTheme:bi}),{tss:IK}=sk({useContext:function(){return{theme:bi()}},usePlugin:QO});IK.create({});var ay,lk;function ck(){if(lk)return ay;lk=1;function t(e,n){for(var r=-1,o=e==null?0:e.length,i=Array(o);++r<o;)i[r]=n(e[r],r,e);return i}return ay=t,ay}var ly,uk;function DK(){if(uk)return ly;uk=1;function t(){this.__data__=[],this.size=0}return ly=t,ly}var cy,dk;function fk(){if(dk)return cy;dk=1;function t(e,n){return e===n||e!==e&&n!==n}return cy=t,cy}var uy,pk;function yf(){if(pk)return uy;pk=1;var t=fk();function e(n,r){for(var o=n.length;o--;)if(t(n[o][0],r))return o;return-1}return uy=e,uy}var dy,hk;function PK(){if(hk)return dy;hk=1;var t=yf(),e=Array.prototype,n=e.splice;function r(o){var i=this.__data__,s=t(i,o);if(s<0)return!1;var a=i.length-1;return s==a?i.pop():n.call(i,s,1),--this.size,!0}return dy=r,dy}var fy,mk;function _K(){if(mk)return fy;mk=1;var t=yf();function e(n){var r=this.__data__,o=t(r,n);return o<0?void 0:r[o][1]}return fy=e,fy}var py,gk;function NK(){if(gk)return py;gk=1;var t=yf();function e(n){return t(this.__data__,n)>-1}return py=e,py}var hy,yk;function LK(){if(yk)return hy;yk=1;var t=yf();function e(n,r){var o=this.__data__,i=t(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}return hy=e,hy}var my,bk;function bf(){if(bk)return my;bk=1;var t=DK(),e=PK(),n=_K(),r=NK(),o=LK();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,my=i,my}var gy,vk;function $K(){if(vk)return gy;vk=1;var t=bf();function e(){this.__data__=new t,this.size=0}return gy=e,gy}var yy,xk;function FK(){if(xk)return yy;xk=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return yy=t,yy}var by,Sk;function RK(){if(Sk)return by;Sk=1;function t(e){return this.__data__.get(e)}return by=t,by}var vy,Ck;function BK(){if(Ck)return vy;Ck=1;function t(e){return this.__data__.has(e)}return vy=t,vy}var xy,wk;function Tk(){if(wk)return xy;wk=1;var t=as(),e=jo(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function s(a){if(!e(a))return!1;var l=t(a);return l==r||l==o||l==n||l==i}return xy=s,xy}var Sy,Ek;function VK(){if(Ek)return Sy;Ek=1;var t=no(),e=t["__core-js_shared__"];return Sy=e,Sy}var Cy,Mk;function zK(){if(Mk)return Cy;Mk=1;var t=VK(),e=function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!e&&e in r}return Cy=n,Cy}var wy,Ok;function kk(){if(Ok)return wy;Ok=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return wy=n,wy}var Ty,Ak;function HK(){if(Ak)return Ty;Ak=1;var t=Tk(),e=zK(),n=jo(),r=kk(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,l=s.toString,u=a.hasOwnProperty,f=RegExp("^"+l.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!n(m)||e(m))return!1;var g=t(m)?f:i;return g.test(r(m))}return Ty=h,Ty}var Ey,Ik;function jK(){if(Ik)return Ey;Ik=1;function t(e,n){return e==null?void 0:e[n]}return Ey=t,Ey}var My,Dk;function Ns(){if(Dk)return My;Dk=1;var t=HK(),e=jK();function n(r,o){var i=e(r,o);return t(i)?i:void 0}return My=n,My}var Oy,Pk;function ky(){if(Pk)return Oy;Pk=1;var t=Ns(),e=no(),n=t(e,"Map");return Oy=n,Oy}var Ay,_k;function vf(){if(_k)return Ay;_k=1;var t=Ns(),e=t(Object,"create");return Ay=e,Ay}var Iy,Nk;function WK(){if(Nk)return Iy;Nk=1;var t=vf();function e(){this.__data__=t?t(null):{},this.size=0}return Iy=e,Iy}var Dy,Lk;function qK(){if(Lk)return Dy;Lk=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return Dy=t,Dy}var Py,$k;function UK(){if($k)return Py;$k=1;var t=vf(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(i){var s=this.__data__;if(t){var a=s[i];return a===e?void 0:a}return r.call(s,i)?s[i]:void 0}return Py=o,Py}var _y,Fk;function KK(){if(Fk)return _y;Fk=1;var t=vf(),e=Object.prototype,n=e.hasOwnProperty;function r(o){var i=this.__data__;return t?i[o]!==void 0:n.call(i,o)}return _y=r,_y}var Ny,Rk;function YK(){if(Rk)return Ny;Rk=1;var t=vf(),e="__lodash_hash_undefined__";function n(r,o){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=t&&o===void 0?e:o,this}return Ny=n,Ny}var Ly,Bk;function GK(){if(Bk)return Ly;Bk=1;var t=WK(),e=qK(),n=UK(),r=KK(),o=YK();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Ly=i,Ly}var $y,Vk;function JK(){if(Vk)return $y;Vk=1;var t=GK(),e=bf(),n=ky();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return $y=r,$y}var Fy,zk;function ZK(){if(zk)return Fy;zk=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return Fy=t,Fy}var Ry,Hk;function xf(){if(Hk)return Ry;Hk=1;var t=ZK();function e(n,r){var o=n.__data__;return t(r)?o[typeof r=="string"?"string":"hash"]:o.map}return Ry=e,Ry}var By,jk;function XK(){if(jk)return By;jk=1;var t=xf();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return By=e,By}var Vy,Wk;function QK(){if(Wk)return Vy;Wk=1;var t=xf();function e(n){return t(this,n).get(n)}return Vy=e,Vy}var zy,qk;function eY(){if(qk)return zy;qk=1;var t=xf();function e(n){return t(this,n).has(n)}return zy=e,zy}var Hy,Uk;function tY(){if(Uk)return Hy;Uk=1;var t=xf();function e(n,r){var o=t(this,n),i=o.size;return o.set(n,r),this.size+=o.size==i?0:1,this}return Hy=e,Hy}var jy,Kk;function Yk(){if(Kk)return jy;Kk=1;var t=JK(),e=XK(),n=QK(),r=eY(),o=tY();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,jy=i,jy}var Wy,Gk;function nY(){if(Gk)return Wy;Gk=1;var t=bf(),e=ky(),n=Yk(),r=200;function o(i,s){var a=this.__data__;if(a instanceof t){var l=a.__data__;if(!e||l.length<r-1)return l.push([i,s]),this.size=++a.size,this;a=this.__data__=new n(l)}return a.set(i,s),this.size=a.size,this}return Wy=o,Wy}var qy,Jk;function rY(){if(Jk)return qy;Jk=1;var t=bf(),e=$K(),n=FK(),r=RK(),o=BK(),i=nY();function s(a){var l=this.__data__=new t(a);this.size=l.size}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=o,s.prototype.set=i,qy=s,qy}var Uy,Zk;function oY(){if(Zk)return Uy;Zk=1;function t(e,n){for(var r=-1,o=e==null?0:e.length;++r<o&&n(e[r],r,e)!==!1;);return e}return Uy=t,Uy}var Ky,Xk;function Qk(){if(Xk)return Ky;Xk=1;var t=Ns(),e=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}}();return Ky=e,Ky}var Yy,eA;function tA(){if(eA)return Yy;eA=1;var t=Qk();function e(n,r,o){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return Yy=e,Yy}var Gy,nA;function rA(){if(nA)return Gy;nA=1;var t=tA(),e=fk(),n=Object.prototype,r=n.hasOwnProperty;function o(i,s,a){var l=i[s];(!(r.call(i,s)&&e(l,a))||a===void 0&&!(s in i))&&t(i,s,a)}return Gy=o,Gy}var Jy,oA;function Pc(){if(oA)return Jy;oA=1;var t=rA(),e=tA();function n(r,o,i,s){var a=!i;i||(i={});for(var l=-1,u=o.length;++l<u;){var f=o[l],h=s?s(i[f],r[f],f,i,r):void 0;h===void 0&&(h=r[f]),a?e(i,f,h):t(i,f,h)}return i}return Jy=n,Jy}var Zy,iA;function iY(){if(iA)return Zy;iA=1;function t(e,n){for(var r=-1,o=Array(e);++r<e;)o[r]=n(r);return o}return Zy=t,Zy}var Xy,sA;function sY(){if(sA)return Xy;sA=1;var t=as(),e=vi(),n="[object Arguments]";function r(o){return e(o)&&t(o)==n}return Xy=r,Xy}var Qy,aA;function lA(){if(aA)return Qy;aA=1;var t=sY(),e=vi(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(s){return e(s)&&r.call(s,"callee")&&!o.call(s,"callee")};return Qy=i,Qy}var eb,cA;function Ls(){if(cA)return eb;cA=1;var t=Array.isArray;return eb=t,eb}var _c={exports:{}},tb,uA;function aY(){if(uA)return tb;uA=1;function t(){return!1}return tb=t,tb}_c.exports;var dA;function fA(){return dA||(dA=1,function(t,e){var n=no(),r=aY(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===o,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,u=l||r;t.exports=u}(_c,_c.exports)),_c.exports}var nb,pA;function lY(){if(pA)return nb;pA=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,o){var i=typeof r;return o=o??t,!!o&&(i=="number"||i!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<o}return nb=n,nb}var rb,hA;function mA(){if(hA)return rb;hA=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return rb=e,rb}var ob,gA;function cY(){if(gA)return ob;gA=1;var t=as(),e=mA(),n=vi(),r="[object Arguments]",o="[object Array]",i="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",u="[object Map]",f="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",S="[object ArrayBuffer]",C="[object DataView]",E="[object Float32Array]",T="[object Float64Array]",w="[object Int8Array]",O="[object Int16Array]",A="[object Int32Array]",N="[object Uint8Array]",D="[object Uint8ClampedArray]",L="[object Uint16Array]",k="[object Uint32Array]",I={};I[E]=I[T]=I[w]=I[O]=I[A]=I[N]=I[D]=I[L]=I[k]=!0,I[r]=I[o]=I[S]=I[i]=I[C]=I[s]=I[a]=I[l]=I[u]=I[f]=I[h]=I[m]=I[g]=I[b]=I[y]=!1;function $(H){return n(H)&&e(H.length)&&!!I[t(H)]}return ob=$,ob}var ib,yA;function Sf(){if(yA)return ib;yA=1;function t(e){return function(n){return e(n)}}return ib=t,ib}var Nc={exports:{}};Nc.exports;var bA;function Cf(){return bA||(bA=1,function(t,e){var n=pC(),r=e&&!e.nodeType&&e,o=r&&!0&&t&&!t.nodeType&&t,i=o&&o.exports===r,s=i&&n.process,a=function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=a}(Nc,Nc.exports)),Nc.exports}var sb,vA;function uY(){if(vA)return sb;vA=1;var t=cY(),e=Sf(),n=Cf(),r=n&&n.isTypedArray,o=r?e(r):t;return sb=o,sb}var ab,xA;function SA(){if(xA)return ab;xA=1;var t=iY(),e=lA(),n=Ls(),r=fA(),o=lY(),i=uY(),s=Object.prototype,a=s.hasOwnProperty;function l(u,f){var h=n(u),m=!h&&e(u),g=!h&&!m&&r(u),b=!h&&!m&&!g&&i(u),y=h||m||g||b,S=y?t(u.length,String):[],C=S.length;for(var E in u)(f||a.call(u,E))&&!(y&&(E=="length"||g&&(E=="offset"||E=="parent")||b&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||o(E,C)))&&S.push(E);return S}return ab=l,ab}var lb,CA;function cb(){if(CA)return lb;CA=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||t;return n===o}return lb=e,lb}var ub,wA;function TA(){if(wA)return ub;wA=1;function t(e,n){return function(r){return e(n(r))}}return ub=t,ub}var db,EA;function dY(){if(EA)return db;EA=1;var t=TA(),e=t(Object.keys,Object);return db=e,db}var fb,MA;function fY(){if(MA)return fb;MA=1;var t=cb(),e=dY(),n=Object.prototype,r=n.hasOwnProperty;function o(i){if(!t(i))return e(i);var s=[];for(var a in Object(i))r.call(i,a)&&a!="constructor"&&s.push(a);return s}return fb=o,fb}var pb,OA;function kA(){if(OA)return pb;OA=1;var t=Tk(),e=mA();function n(r){return r!=null&&e(r.length)&&!t(r)}return pb=n,pb}var hb,AA;function mb(){if(AA)return hb;AA=1;var t=SA(),e=fY(),n=kA();function r(o){return n(o)?t(o):e(o)}return hb=r,hb}var gb,IA;function pY(){if(IA)return gb;IA=1;var t=Pc(),e=mb();function n(r,o){return r&&t(o,e(o),r)}return gb=n,gb}var yb,DA;function hY(){if(DA)return yb;DA=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return yb=t,yb}var bb,PA;function mY(){if(PA)return bb;PA=1;var t=jo(),e=cb(),n=hY(),r=Object.prototype,o=r.hasOwnProperty;function i(s){if(!t(s))return n(s);var a=e(s),l=[];for(var u in s)u=="constructor"&&(a||!o.call(s,u))||l.push(u);return l}return bb=i,bb}var vb,_A;function xb(){if(_A)return vb;_A=1;var t=SA(),e=mY(),n=kA();function r(o){return n(o)?t(o,!0):e(o)}return vb=r,vb}var Sb,NA;function gY(){if(NA)return Sb;NA=1;var t=Pc(),e=xb();function n(r,o){return r&&t(o,e(o),r)}return Sb=n,Sb}var Lc={exports:{}};Lc.exports;var LA;function yY(){return LA||(LA=1,function(t,e){var n=no(),r=e&&!e.nodeType&&e,o=r&&!0&&t&&!t.nodeType&&t,i=o&&o.exports===r,s=i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(u,f){if(f)return u.slice();var h=u.length,m=a?a(h):new u.constructor(h);return u.copy(m),m}t.exports=l}(Lc,Lc.exports)),Lc.exports}var Cb,$A;function bY(){if($A)return Cb;$A=1;function t(e,n){var r=-1,o=e.length;for(n||(n=Array(o));++r<o;)n[r]=e[r];return n}return Cb=t,Cb}var wb,FA;function vY(){if(FA)return wb;FA=1;function t(e,n){for(var r=-1,o=e==null?0:e.length,i=0,s=[];++r<o;){var a=e[r];n(a,r,e)&&(s[i++]=a)}return s}return wb=t,wb}var Tb,RA;function BA(){if(RA)return Tb;RA=1;function t(){return[]}return Tb=t,Tb}var Eb,VA;function Mb(){if(VA)return Eb;VA=1;var t=vY(),e=BA(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(s){return s==null?[]:(s=Object(s),t(o(s),function(a){return r.call(s,a)}))}:e;return Eb=i,Eb}var Ob,zA;function xY(){if(zA)return Ob;zA=1;var t=Pc(),e=Mb();function n(r,o){return t(r,e(r),o)}return Ob=n,Ob}var kb,HA;function Ab(){if(HA)return kb;HA=1;function t(e,n){for(var r=-1,o=n.length,i=e.length;++r<o;)e[i+r]=n[r];return e}return kb=t,kb}var Ib,jA;function Db(){if(jA)return Ib;jA=1;var t=TA(),e=t(Object.getPrototypeOf,Object);return Ib=e,Ib}var Pb,WA;function qA(){if(WA)return Pb;WA=1;var t=Ab(),e=Db(),n=Mb(),r=BA(),o=Object.getOwnPropertySymbols,i=o?function(s){for(var a=[];s;)t(a,n(s)),s=e(s);return a}:r;return Pb=i,Pb}var _b,UA;function SY(){if(UA)return _b;UA=1;var t=Pc(),e=qA();function n(r,o){return t(r,e(r),o)}return _b=n,_b}var Nb,KA;function YA(){if(KA)return Nb;KA=1;var t=Ab(),e=Ls();function n(r,o,i){var s=o(r);return e(r)?s:t(s,i(r))}return Nb=n,Nb}var Lb,GA;function CY(){if(GA)return Lb;GA=1;var t=YA(),e=Mb(),n=mb();function r(o){return t(o,n,e)}return Lb=r,Lb}var $b,JA;function ZA(){if(JA)return $b;JA=1;var t=YA(),e=qA(),n=xb();function r(o){return t(o,n,e)}return $b=r,$b}var Fb,XA;function wY(){if(XA)return Fb;XA=1;var t=Ns(),e=no(),n=t(e,"DataView");return Fb=n,Fb}var Rb,QA;function TY(){if(QA)return Rb;QA=1;var t=Ns(),e=no(),n=t(e,"Promise");return Rb=n,Rb}var Bb,eI;function EY(){if(eI)return Bb;eI=1;var t=Ns(),e=no(),n=t(e,"Set");return Bb=n,Bb}var Vb,tI;function MY(){if(tI)return Vb;tI=1;var t=Ns(),e=no(),n=t(e,"WeakMap");return Vb=n,Vb}var zb,nI;function Hb(){if(nI)return zb;nI=1;var t=wY(),e=ky(),n=TY(),r=EY(),o=MY(),i=as(),s=kk(),a="[object Map]",l="[object Object]",u="[object Promise]",f="[object Set]",h="[object WeakMap]",m="[object DataView]",g=s(t),b=s(e),y=s(n),S=s(r),C=s(o),E=i;return(t&&E(new t(new ArrayBuffer(1)))!=m||e&&E(new e)!=a||n&&E(n.resolve())!=u||r&&E(new r)!=f||o&&E(new o)!=h)&&(E=function(T){var w=i(T),O=w==l?T.constructor:void 0,A=O?s(O):"";if(A)switch(A){case g:return m;case b:return a;case y:return u;case S:return f;case C:return h}return w}),zb=E,zb}var jb,rI;function OY(){if(rI)return jb;rI=1;var t=Object.prototype,e=t.hasOwnProperty;function n(r){var o=r.length,i=new r.constructor(o);return o&&typeof r[0]=="string"&&e.call(r,"index")&&(i.index=r.index,i.input=r.input),i}return jb=n,jb}var Wb,oI;function kY(){if(oI)return Wb;oI=1;var t=no(),e=t.Uint8Array;return Wb=e,Wb}var qb,iI;function Ub(){if(iI)return qb;iI=1;var t=kY();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return qb=e,qb}var Kb,sI;function AY(){if(sI)return Kb;sI=1;var t=Ub();function e(n,r){var o=r?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return Kb=e,Kb}var Yb,aI;function IY(){if(aI)return Yb;aI=1;var t=/\w*$/;function e(n){var r=new n.constructor(n.source,t.exec(n));return r.lastIndex=n.lastIndex,r}return Yb=e,Yb}var Gb,lI;function DY(){if(lI)return Gb;lI=1;var t=Pl(),e=t?t.prototype:void 0,n=e?e.valueOf:void 0;function r(o){return n?Object(n.call(o)):{}}return Gb=r,Gb}var Jb,cI;function PY(){if(cI)return Jb;cI=1;var t=Ub();function e(n,r){var o=r?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return Jb=e,Jb}var Zb,uI;function _Y(){if(uI)return Zb;uI=1;var t=Ub(),e=AY(),n=IY(),r=DY(),o=PY(),i="[object Boolean]",s="[object Date]",a="[object Map]",l="[object Number]",u="[object RegExp]",f="[object Set]",h="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",y="[object Float32Array]",S="[object Float64Array]",C="[object Int8Array]",E="[object Int16Array]",T="[object Int32Array]",w="[object Uint8Array]",O="[object Uint8ClampedArray]",A="[object Uint16Array]",N="[object Uint32Array]";function D(L,k,I){var $=L.constructor;switch(k){case g:return t(L);case i:case s:return new $(+L);case b:return e(L,I);case y:case S:case C:case E:case T:case w:case O:case A:case N:return o(L,I);case a:return new $;case l:case h:return new $(L);case u:return n(L);case f:return new $;case m:return r(L)}}return Zb=D,Zb}var Xb,dI;function NY(){if(dI)return Xb;dI=1;var t=jo(),e=Object.create,n=function(){function r(){}return function(o){if(!t(o))return{};if(e)return e(o);r.prototype=o;var i=new r;return r.prototype=void 0,i}}();return Xb=n,Xb}var Qb,fI;function LY(){if(fI)return Qb;fI=1;var t=NY(),e=Db(),n=cb();function r(o){return typeof o.constructor=="function"&&!n(o)?t(e(o)):{}}return Qb=r,Qb}var ev,pI;function $Y(){if(pI)return ev;pI=1;var t=Hb(),e=vi(),n="[object Map]";function r(o){return e(o)&&t(o)==n}return ev=r,ev}var tv,hI;function FY(){if(hI)return tv;hI=1;var t=$Y(),e=Sf(),n=Cf(),r=n&&n.isMap,o=r?e(r):t;return tv=o,tv}var nv,mI;function RY(){if(mI)return nv;mI=1;var t=Hb(),e=vi(),n="[object Set]";function r(o){return e(o)&&t(o)==n}return nv=r,nv}var rv,gI;function BY(){if(gI)return rv;gI=1;var t=RY(),e=Sf(),n=Cf(),r=n&&n.isSet,o=r?e(r):t;return rv=o,rv}var ov,yI;function VY(){if(yI)return ov;yI=1;var t=rY(),e=oY(),n=rA(),r=pY(),o=gY(),i=yY(),s=bY(),a=xY(),l=SY(),u=CY(),f=ZA(),h=Hb(),m=OY(),g=_Y(),b=LY(),y=Ls(),S=fA(),C=FY(),E=jo(),T=BY(),w=mb(),O=xb(),A=1,N=2,D=4,L="[object Arguments]",k="[object Array]",I="[object Boolean]",$="[object Date]",H="[object Error]",z="[object Function]",R="[object GeneratorFunction]",B="[object Map]",W="[object Number]",U="[object Object]",G="[object RegExp]",Y="[object Set]",Z="[object String]",me="[object Symbol]",fe="[object WeakMap]",pe="[object ArrayBuffer]",re="[object DataView]",ue="[object Float32Array]",ae="[object Float64Array]",K="[object Int8Array]",Q="[object Int16Array]",ie="[object Int32Array]",he="[object Uint8Array]",ee="[object Uint8ClampedArray]",se="[object Uint16Array]",le="[object Uint32Array]",ge={};ge[L]=ge[k]=ge[pe]=ge[re]=ge[I]=ge[$]=ge[ue]=ge[ae]=ge[K]=ge[Q]=ge[ie]=ge[B]=ge[W]=ge[U]=ge[G]=ge[Y]=ge[Z]=ge[me]=ge[he]=ge[ee]=ge[se]=ge[le]=!0,ge[H]=ge[z]=ge[fe]=!1;function we(xe,Oe,Le,He,Ge,De){var lt,St=Oe&A,Zt=Oe&N,vn=Oe&D;if(Le&&(lt=Ge?Le(xe,He,Ge,De):Le(xe)),lt!==void 0)return lt;if(!E(xe))return xe;var cn=y(xe);if(cn){if(lt=m(xe),!St)return s(xe,lt)}else{var $t=h(xe),An=$t==z||$t==R;if(S(xe))return i(xe,St);if($t==U||$t==L||An&&!Ge){if(lt=Zt||An?{}:b(xe),!St)return Zt?l(xe,o(lt,xe)):a(xe,r(lt,xe))}else{if(!ge[$t])return Ge?xe:{};lt=g(xe,$t,St)}}De||(De=new t);var qn=De.get(xe);if(qn)return qn;De.set(xe,lt),T(xe)?xe.forEach(function(Kt){lt.add(we(Kt,Oe,Le,Kt,xe,De))}):C(xe)&&xe.forEach(function(Kt,de){lt.set(de,we(Kt,Oe,Le,de,xe,De))});var dt=vn?Zt?f:u:Zt?O:w,Ln=cn?void 0:dt(xe);return e(Ln||xe,function(Kt,de){Ln&&(de=Kt,Kt=xe[de]),n(lt,de,we(Kt,Oe,Le,de,xe,De))}),lt}return ov=we,ov}var iv,bI;function zY(){if(bI)return iv;bI=1;var t=Ls(),e=ju(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,s){if(t(i))return!1;var a=typeof i;return a=="number"||a=="symbol"||a=="boolean"||i==null||e(i)?!0:r.test(i)||!n.test(i)||s!=null&&i in Object(s)}return iv=o,iv}var sv,vI;function HY(){if(vI)return sv;vI=1;var t=Yk(),e="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(e);var i=function(){var s=arguments,a=o?o.apply(this,s):s[0],l=i.cache;if(l.has(a))return l.get(a);var u=r.apply(this,s);return i.cache=l.set(a,u)||l,u};return i.cache=new(n.Cache||t),i}return n.Cache=t,sv=n,sv}var av,xI;function jY(){if(xI)return av;xI=1;var t=HY(),e=500;function n(r){var o=t(r,function(s){return i.size===e&&i.clear(),s}),i=o.cache;return o}return av=n,av}var lv,SI;function WY(){if(SI)return lv;SI=1;var t=jY(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(e,function(s,a,l,u){i.push(l?u.replace(n,"$1"):a||s)}),i});return lv=r,lv}var cv,CI;function wI(){if(CI)return cv;CI=1;var t=Pl(),e=ck(),n=Ls(),r=ju(),o=1/0,i=t?t.prototype:void 0,s=i?i.toString:void 0;function a(l){if(typeof l=="string")return l;if(n(l))return e(l,a)+"";if(r(l))return s?s.call(l):"";var u=l+"";return u=="0"&&1/l==-o?"-0":u}return cv=a,cv}var uv,TI;function EI(){if(TI)return uv;TI=1;var t=wI();function e(n){return n==null?"":t(n)}return uv=e,uv}var dv,MI;function fv(){if(MI)return dv;MI=1;var t=Ls(),e=zY(),n=WY(),r=EI();function o(i,s){return t(i)?i:e(i,s)?[i]:n(r(i))}return dv=o,dv}var pv,OI;function qY(){if(OI)return pv;OI=1;function t(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}return pv=t,pv}var hv,kI;function AI(){if(kI)return hv;kI=1;var t=ju(),e=1/0;function n(r){if(typeof r=="string"||t(r))return r;var o=r+"";return o=="0"&&1/r==-e?"-0":o}return hv=n,hv}var mv,II;function UY(){if(II)return mv;II=1;var t=fv(),e=AI();function n(r,o){o=t(o,r);for(var i=0,s=o.length;r!=null&&i<s;)r=r[e(o[i++])];return i&&i==s?r:void 0}return mv=n,mv}var gv,DI;function PI(){if(DI)return gv;DI=1;function t(e,n,r){var o=-1,i=e.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var s=Array(i);++o<i;)s[o]=e[o+n];return s}return gv=t,gv}var yv,_I;function KY(){if(_I)return yv;_I=1;var t=UY(),e=PI();function n(r,o){return o.length<2?r:t(r,e(o,0,-1))}return yv=n,yv}var bv,NI;function YY(){if(NI)return bv;NI=1;var t=fv(),e=qY(),n=KY(),r=AI();function o(i,s){return s=t(s,i),i=n(i,s),i==null||delete i[r(e(s))]}return bv=o,bv}var vv,LI;function GY(){if(LI)return vv;LI=1;var t=as(),e=Db(),n=vi(),r="[object Object]",o=Function.prototype,i=Object.prototype,s=o.toString,a=i.hasOwnProperty,l=s.call(Object);function u(f){if(!n(f)||t(f)!=r)return!1;var h=e(f);if(h===null)return!0;var m=a.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&s.call(m)==l}return vv=u,vv}var xv,$I;function JY(){if($I)return xv;$I=1;var t=GY();function e(n){return t(n)?void 0:n}return xv=e,xv}var Sv,FI;function ZY(){if(FI)return Sv;FI=1;var t=Pl(),e=lA(),n=Ls(),r=t?t.isConcatSpreadable:void 0;function o(i){return n(i)||e(i)||!!(r&&i&&i[r])}return Sv=o,Sv}var Cv,RI;function XY(){if(RI)return Cv;RI=1;var t=Ab(),e=ZY();function n(r,o,i,s,a){var l=-1,u=r.length;for(i||(i=e),a||(a=[]);++l<u;){var f=r[l];o>0&&i(f)?o>1?n(f,o-1,i,s,a):t(a,f):s||(a[a.length]=f)}return a}return Cv=n,Cv}var wv,BI;function QY(){if(BI)return wv;BI=1;var t=XY();function e(n){var r=n==null?0:n.length;return r?t(n,1):[]}return wv=e,wv}var Tv,VI;function eG(){if(VI)return Tv;VI=1;function t(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}return Tv=t,Tv}var Ev,zI;function tG(){if(zI)return Ev;zI=1;var t=eG(),e=Math.max;function n(r,o,i){return o=e(o===void 0?r.length-1:o,0),function(){for(var s=arguments,a=-1,l=e(s.length-o,0),u=Array(l);++a<l;)u[a]=s[o+a];a=-1;for(var f=Array(o+1);++a<o;)f[a]=s[a];return f[o]=i(u),t(r,this,f)}}return Ev=n,Ev}var Mv,HI;function nG(){if(HI)return Mv;HI=1;function t(e){return function(){return e}}return Mv=t,Mv}var Ov,jI;function rG(){if(jI)return Ov;jI=1;function t(e){return e}return Ov=t,Ov}var kv,WI;function oG(){if(WI)return kv;WI=1;var t=nG(),e=Qk(),n=rG(),r=e?function(o,i){return e(o,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:n;return kv=r,kv}var Av,qI;function iG(){if(qI)return Av;qI=1;var t=800,e=16,n=Date.now;function r(o){var i=0,s=0;return function(){var a=n(),l=e-(a-s);if(s=a,l>0){if(++i>=t)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return Av=r,Av}var Iv,UI;function sG(){if(UI)return Iv;UI=1;var t=oG(),e=iG(),n=e(t);return Iv=n,Iv}var Dv,KI;function aG(){if(KI)return Dv;KI=1;var t=QY(),e=tG(),n=sG();function r(o){return n(e(o,void 0,t),o+"")}return Dv=r,Dv}var Pv,YI;function lG(){if(YI)return Pv;YI=1;var t=ck(),e=VY(),n=YY(),r=fv(),o=Pc(),i=JY(),s=aG(),a=ZA(),l=1,u=2,f=4,h=s(function(m,g){var b={};if(m==null)return b;var y=!1;g=t(g,function(C){return C=r(C,m),y||(y=C.length>1),C}),o(m,a(m),b),y&&(b=e(b,l|u|f,i));for(var S=g.length;S--;)n(b,g[S]);return b});return Pv=h,Pv}var cG=lG();const Ha=Gn(cG),wf={TABLE_ELEMENT:1,MENU_BAR:2,NOTCHED_OUTLINE:2};function GI(t){const e=Object.keys(t.typography.h1).some(r=>r.includes("@media")),n=Qr.keyframes`
328
+ 0%, 95% {
329
+ opacity: 1;
330
+ }
331
+ 100% {
332
+ opacity: 0;
333
+ }
334
+ `;return{...Ha(t.typography.body1,["lineHeight"]),"&:focus":{outline:"none"},"& h1":{fontFamily:t.typography.h3.fontFamily,fontWeight:"bold",...e?{fontSize:`${(1.5625*1.2).toFixed(4)}rem`,[t.breakpoints.up("sm")]:{fontSize:`${(1.8219*1.2).toFixed(4)}rem`},[t.breakpoints.up("md")]:{fontSize:`${(2.0243*1.2).toFixed(4)}rem`},[t.breakpoints.up("lg")]:{fontSize:`${(2.0243*1.2).toFixed(4)}rem`}}:{fontSize:`${(2.0243*1.2).toFixed(4)}rem`}},"& h2":{...Ha(t.typography.h4,["lineHeight"]),fontWeight:500},"& h3":{...Ha(t.typography.h5,["lineHeight"]),fontWeight:500},"& h4":{...Ha(t.typography.h6,["lineHeight"]),fontWeight:500},"& h5":{...Ha(t.typography.subtitle1,["lineHeight"]),fontWeight:500},"& h6":{...Ha(t.typography.subtitle2,["lineHeight"]),fontWeight:500},"& h1, & h2, & h3, & h4, & h5, & h6, & p":{marginBlockStart:0,marginBlockEnd:0},'& a:not([data-type="mention"])':{color:t.palette.primary.main,textDecoration:"none","&:hover":{textDecoration:"underline"}},"& ul, & ol":{marginBlockStart:0,marginBlockEnd:0},"& ol":{listStyleType:"decimal","& ol":{listStyleType:"lower-alpha","& ol":{listStyleType:"lower-roman","& ol":{listStyleType:"decimal","& ol":{listStyleType:"lower-alpha","& ol":{listStyleType:"lower-roman"}}}}}},"& ul":{listStyleType:"disc","& ul":{listStyleType:"circle","& ul":{listStyleType:"square","& ul":{listStyleType:"disc","& ul":{listStyleType:"circle","& ul":{listStyleType:"square"}}}}}},'& ul[data-type="taskList"]':{listStyle:"none",padding:0,"& li":{display:"flex","& > label":{flex:"0 0 auto",marginRight:"0.5rem",userSelect:"none"},"& > div":{flex:"1 1 auto"}}},"& blockquote":{paddingLeft:"1rem",marginInlineStart:t.spacing(1),marginInlineEnd:t.spacing(1),position:"relative","&:before":{position:"absolute",top:0,bottom:0,left:0,display:"block",width:4,borderRadius:t.shape.borderRadius,background:t.palette.text.disabled,content:'""'}},"& :not(pre) > code":{padding:"2px 3px 1px",borderWidth:1,borderStyle:"solid",borderColor:t.palette.divider,borderRadius:3,backgroundColor:t.palette.action.hover,color:t.palette.mode==="dark"?t.palette.secondary.main:F.darken(t.palette.secondary.dark,.1)},"& pre":{marginTop:t.spacing(.5),marginBottom:t.spacing(.5),padding:t.spacing(1),borderWidth:1,borderStyle:"solid",borderColor:t.palette.divider,borderRadius:t.shape.borderRadius,background:t.palette.action.hover,lineHeight:1.4,overflowX:"auto",whiteSpace:"pre !important"},'& [data-type="mention"]':{padding:"0 0.25rem",lineHeight:"1.3em",borderRadius:t.shape.borderRadius,color:t.palette.primary.main,background:t.palette.mode==="dark"?F.alpha(F.darken(t.palette.primary.dark,.7),.5):F.alpha(F.lighten(t.palette.primary.light,.6),.3),textDecoration:"none"},"& img:not(.ProseMirror-separator)":{maxWidth:"100%",height:"auto",display:"inline-flex",...uG(t),"&.ProseMirror-selectednode":{outline:`3px solid ${t.palette.primary.main}`}},"& hr":{borderWidth:0,borderTopWidth:"thin",borderStyle:"solid",borderColor:t.palette.text.secondary,"&.ProseMirror-selectednode":{borderColor:t.palette.primary.main}},"& table":{borderCollapse:"collapse",tableLayout:"fixed",margin:0,overflowY:"hidden",overflowX:"auto",display:"block","& td, th":{minWidth:"1em",borderWidth:1,borderStyle:"solid",borderColor:t.palette.mode==="dark"?t.palette.grey[500]:t.palette.grey[400],padding:"3px 5px",verticalAlign:"top",boxSizing:"border-box",position:"relative","& > *":{marginBottom:0}},"& th":{fontWeight:500,textAlign:"left",backgroundColor:t.palette.action.selected}},"& .tableWrapper":{overflowX:"auto","& table":{overflow:"hidden",display:"table"}},"& .selectedCell:after":{zIndex:wf.TABLE_ELEMENT,position:"absolute",content:'""',left:0,right:0,top:0,bottom:0,background:"rgba(200, 200, 255, 0.4)",pointerEvents:"none"},'&[contenteditable="true"]':{"& .column-resize-handle":{position:"absolute",right:-2,top:-1,bottom:-2,width:4,zIndex:wf.TABLE_ELEMENT,backgroundColor:t.palette.primary.light,pointerEvents:"none"},"&.resize-cursor":{cursor:"col-resize"}},'&[contenteditable="false"]':{"& .column-resize-handle":{display:"none"},"&.resize-cursor":{pointerEvents:"none"}},"& p.is-editor-empty:first-of-type::before":{color:t.palette.text.disabled,content:"attr(data-placeholder)",float:"left",height:0,pointerEvents:"none"},"& .ProseMirror-gapcursor:after":{borderColor:t.palette.text.primary},"& .collaboration-cursor__caret":{borderLeft:"1px solid #0d0d0d",borderRight:"1px solid #0d0d0d",marginLeft:"-1px",marginRight:"-1px",position:"relative",wordBreak:"normal",cursor:"text","&:after":{position:"absolute",content:'""',left:-3,right:0,top:-2,borderWidth:3,borderStyle:"solid",borderColor:"inherit"},"&:hover .collaboration-cursor__label":{opacity:1,transition:t.transitions.create("opacity",{delay:0,duration:100,easing:"linear"})}},"& .collaboration-cursor__label":{borderRadius:"3px 3px 3px 0",color:"#0d0d0d",fontSize:12,fontStyle:"normal",fontWeight:600,fontFamily:t.typography.body1.fontFamily,left:-1,lineHeight:"normal",padding:"0.1rem 0.3rem",position:"absolute",top:"-1.4em",userSelect:"none",whiteSpace:"nowrap",pointerEvents:"none",opacity:0,transition:t.transitions.create("opacity",{delay:500,duration:100,easing:"linear"}),animation:`${n} 3s linear 1`}}}function uG(t){if(t.palette.mode!=="dark")return{};const e=t.palette.grey[200];return{backgroundColor:e,color:t.palette.getContrastText(e)}}const dG="MuiTiptap-";function fG(t,e){return`${dG}${t}-${e}`}function $s(t,e){const n={};return e.forEach(r=>{n[r]=fG(t,r)}),n}const JI=$s("ControlledBubbleMenu",["root","paper"]),pG=qt({name:{ControlledBubbleMenu:Tf}})(t=>({root:{zIndex:t.zIndex.tooltip},paper:{backgroundColor:t.palette.background.default}}));function Tf({editor:t,open:e,className:n,classes:r={},sx:o,children:i,anchorEl:s,container:a,disablePortal:l,placement:u="top",fallbackPlacements:f=["top","bottom","top-start","bottom-start","top-end","bottom-end"],flipPadding:h=8,PaperProps:m}){const{classes:g,cx:b}=pG(void 0,{props:{classes:r}}),y=F.useTheme(),S=J.useCallback(()=>{const{ranges:C}=t.state.selection,E=Math.min(...C.map(w=>w.$from.pos)),T=Math.max(...C.map(w=>w.$to.pos));return{getBoundingClientRect:()=>{if(UO(t.state.selection)){const w=t.view.nodeDOM(E);if(w instanceof HTMLElement)return w.getBoundingClientRect()}return KO(t.view,E,T)}}},[t]);return v.jsx(F.Popper,{open:e,placement:u,modifiers:[{name:"offset",options:{offset:[0,6]}},{name:"flip",enabled:!0,options:{boundary:t.options.element,fallbackPlacements:f,padding:h}},{name:"preventOverflow",enabled:!0,options:{altAxis:!0,boundary:"clippingParents",padding:8}}],anchorEl:s??S,className:b(JI.root,g.root,n),sx:o,container:a,disablePortal:l,transition:!0,children:({TransitionProps:C})=>v.jsx(F.Fade,{...C,timeout:{enter:y.transitions.duration.enteringScreen,exit:0},children:v.jsx(F.Paper,{elevation:7,...m,className:b(JI.paper,g.paper,m==null?void 0:m.className),children:i})})})}const ZI=J.createContext(void 0);function yt(){const t=J.useContext(ZI);if(t===void 0)throw new Error("Tiptap editor not found in component context. Be sure to use <RichTextEditorProvider editor={editor} />!");return t}var er;(function(t){t[t.HIDDEN=0]="HIDDEN",t[t.VIEW_LINK_DETAILS=1]="VIEW_LINK_DETAILS",t[t.EDIT_LINK=2]="EDIT_LINK"})(er||(er={}));const hG=on.create({name:"linkBubbleMenuHandler",addStorage(){return{state:er.HIDDEN,bubbleMenuOptions:void 0}},addCommands(){return{openLinkBubbleMenu:(t={})=>({editor:e,chain:n,dispatch:r})=>{const o=this.storage.state;let i;return e.isActive("link")?(o!==er.VIEW_LINK_DETAILS&&n().extendMarkRange("link").focus().run(),i=er.VIEW_LINK_DETAILS):i=er.EDIT_LINK,r&&(this.storage.state=i,this.storage.bubbleMenuOptions=t),!0},editLinkInBubbleMenu:()=>({dispatch:t})=>{const e=this.storage.state,n=er.EDIT_LINK;return e===n?!1:(t&&(this.storage.state=n),!0)},closeLinkBubbleMenu:()=>({commands:t,dispatch:e})=>this.storage.state===er.HIDDEN?!1:(t.focus(),e&&(this.storage.state=er.HIDDEN),!0)}},onSelectionUpdate(){this.storage.state===er.EDIT_LINK?this.editor.commands.closeLinkBubbleMenu():this.storage.state===er.VIEW_LINK_DETAILS&&!this.editor.isActive("link")&&this.editor.commands.closeLinkBubbleMenu()},addKeyboardShortcuts(){return{"Mod-Shift-u":()=>(this.editor.commands.openLinkBubbleMenu(),!0)}},addProseMirrorPlugins(){return[new Qt({key:new yn("handleClickLinkForMenu"),props:{handleClick:(t,e,n)=>{const r=Xg(t.state,"link");return n.target.closest("a")&&r.href&&this.storage.state===er.HIDDEN?this.editor.commands.openLinkBubbleMenu():this.editor.commands.closeLinkBubbleMenu(),!1}}})]}});function XI(t,e){const n=J.useRef(e);J.useEffect(()=>{n.current=e},[e]),J.useEffect(()=>{function r(o){t===o.key&&n.current(o)}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t])}/*!
335
+ * encodeurl
336
+ * Copyright(c) 2016 Douglas Christopher Wilson
337
+ * MIT Licensed
338
+ */var _v,QI;function mG(){if(QI)return _v;QI=1,_v=r;var t=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g,e=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g,n="$1�$2";function r(o){return String(o).replace(e,n).replace(t,encodeURI)}return _v}var gG=mG();const yG=Gn(gG);function e2(t){let e=t.trim();return e&&!/^(https?:\/\/|mailto:|tel:|sms:|\/|#)/.test(e)&&(e=`http://${e}`),yG(e)}function bG({editor:t,onCancel:e,onSave:n,labels:r,formatHref:o=e2}){var i,s,a,l,u,f;const h=t.isActive("link")?t.getAttributes("link").href:"",m=Ac(t.state.selection.$from,so("link",t.schema)),g=m?t.state.doc.textBetween(m.from,m.to):"",b=t.state.doc.textBetween(t.state.selection.$from.pos,t.state.selection.$to.pos),y=g||b,[S,C]=J.useState(y),[E,T]=J.useState(h),w=J.useRef(null),O=J.useRef(null),A=!h,N=(i=r==null?void 0:r.editLinkAddTitle)!==null&&i!==void 0?i:"Add link",D=(s=r==null?void 0:r.editLinkEditTitle)!==null&&s!==void 0?s:"Edit link",L=A?N:D;J.useEffect(()=>{var H,z;!A||!y?(H=w.current)===null||H===void 0||H.focus():(z=O.current)===null||z===void 0||z.focus()},[A,y]),XI("Escape",e);function k(){O.current&&T(o(O.current.value))}const[I,$]=J.useState(!1);return v.jsxs("form",{onSubmit:H=>{var z,R,B,W;H.preventDefault(),H.stopPropagation(),$(!0);const U=(R=(z=w.current)===null||z===void 0?void 0:z.value)!==null&&R!==void 0?R:"",G=(W=(B=O.current)===null||B===void 0?void 0:B.value)!==null&&W!==void 0?W:"";n({text:U,link:G}),$(!1)},autoComplete:"off",children:[v.jsx(F.Typography,{variant:"h6",children:L}),v.jsx(F.TextField,{inputRef:w,value:S,disabled:I,onChange:H=>{C(H.target.value)},label:(a=r==null?void 0:r.editLinkTextInputLabel)!==null&&a!==void 0?a:"Text",margin:"normal",size:"small",fullWidth:!0,required:!0}),v.jsx(F.TextField,{inputRef:O,value:E,onChange:H=>{T(H.target.value)},disabled:I,label:(l=r==null?void 0:r.editLinkHrefInputLabel)!==null&&l!==void 0?l:"Link",margin:"dense",size:"small",type:"text",onBlur:k,onKeyDown:H=>{H.key==="Enter"&&k()},fullWidth:!0,required:!0}),v.jsxs(F.DialogActions,{sx:{px:0},children:[v.jsx(F.Button,{onClick:e,variant:"outlined",size:"small",children:(u=r==null?void 0:r.editLinkCancelButtonLabel)!==null&&u!==void 0?u:"Cancel"}),v.jsx(F.Button,{type:"submit",color:"primary",variant:"outlined",size:"small",disabled:I,children:(f=r==null?void 0:r.editLinkSaveButtonLabel)!==null&&f!==void 0?f:"Save"})]})]})}var Nv,t2;function vG(){if(t2)return Nv;t2=1;var t=PI();function e(n,r,o){var i=n.length;return o=o===void 0?i:o,!r&&o>=i?n:t(n,r,o)}return Nv=e,Nv}var Lv,n2;function $v(){if(n2)return Lv;n2=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=e+n+r,i="\\ufe0e\\ufe0f",s="\\u200d",a=RegExp("["+s+t+o+i+"]");function l(u){return a.test(u)}return Lv=l,Lv}var Fv,r2;function xG(){if(r2)return Fv;r2=1;var t=as(),e=vi(),n="[object RegExp]";function r(o){return e(o)&&t(o)==n}return Fv=r,Fv}var Rv,o2;function SG(){if(o2)return Rv;o2=1;var t=xG(),e=Sf(),n=Cf(),r=n&&n.isRegExp,o=r?e(r):t;return Rv=o,Rv}var Bv,i2;function CG(){if(i2)return Bv;i2=1;function t(e){return function(n){return n==null?void 0:n[e]}}return Bv=t,Bv}var Vv,s2;function wG(){if(s2)return Vv;s2=1;var t=CG(),e=t("length");return Vv=e,Vv}var zv,a2;function TG(){if(a2)return zv;a2=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=e+n+r,i="\\ufe0e\\ufe0f",s="["+t+"]",a="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+l+")",f="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=u+"?",y="["+i+"]?",S="(?:"+g+"(?:"+[f,h,m].join("|")+")"+y+b+")*",C=y+b+S,E="(?:"+[f+a+"?",a,h,m,s].join("|")+")",T=RegExp(l+"(?="+l+")|"+E+C,"g");function w(O){for(var A=T.lastIndex=0;T.test(O);)++A;return A}return zv=w,zv}var Hv,l2;function EG(){if(l2)return Hv;l2=1;var t=wG(),e=$v(),n=TG();function r(o){return e(o)?n(o):t(o)}return Hv=r,Hv}var jv,c2;function MG(){if(c2)return jv;c2=1;function t(e){return e.split("")}return jv=t,jv}var Wv,u2;function OG(){if(u2)return Wv;u2=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=e+n+r,i="\\ufe0e\\ufe0f",s="["+t+"]",a="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+l+")",f="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=u+"?",y="["+i+"]?",S="(?:"+g+"(?:"+[f,h,m].join("|")+")"+y+b+")*",C=y+b+S,E="(?:"+[f+a+"?",a,h,m,s].join("|")+")",T=RegExp(l+"(?="+l+")|"+E+C,"g");function w(O){return O.match(T)||[]}return Wv=w,Wv}var qv,d2;function kG(){if(d2)return qv;d2=1;var t=MG(),e=$v(),n=OG();function r(o){return e(o)?n(o):t(o)}return qv=r,qv}var Uv,f2;function AG(){if(f2)return Uv;f2=1;var t=EC(),e=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=t(o),o===e||o===-e){var i=o<0?-1:1;return i*n}return o===o?o:0}return Uv=r,Uv}var Kv,p2;function IG(){if(p2)return Kv;p2=1;var t=AG();function e(n){var r=t(n),o=r%1;return r===r?o?r-o:r:0}return Kv=e,Kv}var Yv,h2;function DG(){if(h2)return Yv;h2=1;var t=wI(),e=vG(),n=$v(),r=jo(),o=SG(),i=EG(),s=kG(),a=IG(),l=EI(),u=30,f="...",h=/\w*$/;function m(g,b){var y=u,S=f;if(r(b)){var C="separator"in b?b.separator:C;y="length"in b?a(b.length):y,S="omission"in b?t(b.omission):S}g=l(g);var E=g.length;if(n(g)){var T=s(g);E=T.length}if(y>=E)return g;var w=y-i(S);if(w<1)return S;var O=T?e(T,0,w).join(""):g.slice(0,w);if(C===void 0)return O+S;if(T&&(w+=O.length-w),o(C)){if(g.slice(w).search(C)){var A,N=O;for(C.global||(C=RegExp(C.source,l(h.exec(C))+"g")),C.lastIndex=0;A=C.exec(N);)var D=A.index;O=O.slice(0,D===void 0?w:D)}}else if(g.indexOf(t(C),w)!=w){var L=O.lastIndexOf(C);L>-1&&(O=O.slice(0,L))}return O+S}return Yv=m,Yv}var PG=DG();const _G=Gn(PG);function NG(t,e=20){if(t.length<=e)return t;const n=Math.floor(e/2);return`${t.slice(0,n).trim()}…${t.slice(-n).trim()}`}const LG=qt({name:{ViewLinkMenuContent:m2}})({linkPreviewText:{overflowWrap:"anywhere"}});function m2({editor:t,onCancel:e,onEdit:n,onRemove:r,labels:o}){var i,s,a;const{classes:l}=LG(),u=Ac(t.state.selection.$to,so("link",t.schema)),f=u?t.state.doc.textBetween(u.from,u.to):"",h=(i=t.getAttributes("link").href)!==null&&i!==void 0?i:"";return XI("Escape",e),v.jsxs(v.Fragment,{children:[v.jsx("div",{className:l.linkPreviewText,children:_G(f,{length:50,omission:"…"})}),v.jsx("div",{className:l.linkPreviewText,children:v.jsx(F.Link,{href:h,target:"_blank",rel:"noopener",children:NG(h,50)})}),v.jsxs(F.DialogActions,{sx:{px:0},children:[v.jsx(F.Button,{onClick:n,color:"primary",variant:"outlined",size:"small",children:(s=o==null?void 0:o.viewLinkEditButtonLabel)!==null&&s!==void 0?s:"Edit"}),v.jsx(F.Button,{onClick:r,color:"error",variant:"outlined",size:"small",children:(a=o==null?void 0:o.viewLinkRemoveButtonLabel)!==null&&a!==void 0?a:"Remove"})]})]})}const $G=qt({name:{LinkBubbleMenu:g2}})(t=>({content:{padding:t.spacing(1.5,2,.5)}}));function g2({labels:t,formatHref:e,...n}){const{classes:r}=$G(),o=yt();if(!(o!=null&&o.isEditable))return null;if(!("linkBubbleMenuHandler"in o.storage))throw new Error("You must add the LinkBubbleMenuHandler extension to the useEditor `extensions` array in order to use this component!");const i=o.storage.linkBubbleMenuHandler,s=i.state;let a=null;return s===er.VIEW_LINK_DETAILS?a=v.jsx(m2,{editor:o,onCancel:o.commands.closeLinkBubbleMenu,onEdit:o.commands.editLinkInBubbleMenu,onRemove:()=>{o.chain().unsetLink().setTextSelection(o.state.selection.to).focus().run()},labels:t}):s===er.EDIT_LINK&&(a=v.jsx(bG,{editor:o,onCancel:o.commands.closeLinkBubbleMenu,onSave:({text:l,link:u})=>{o.chain().extendMarkRange("link").insertContent({type:"text",marks:[{type:"link",attrs:{href:u}}],text:l}).setLink({href:u}).focus().run(),o.commands.closeLinkBubbleMenu()},labels:t,formatHref:e})),v.jsx(Tf,{editor:o,open:s!==er.HIDDEN,...i.bubbleMenuOptions,...n,children:v.jsx("div",{className:r.content,children:a})})}const Gv=$s("MenuBar",["root","sticky","nonSticky","content"]),FG=qt({name:{MenuBar:y2}})((t,{stickyOffset:e})=>({root:{borderBottomColor:t.palette.divider,borderBottomStyle:"solid",borderBottomWidth:1},sticky:{position:"sticky",top:e??0,zIndex:wf.MENU_BAR,background:t.palette.background.default},nonSticky:{},content:{}}));function y2({hide:t,disableSticky:e,stickyOffset:n,children:r,className:o,classes:i}){const{classes:s,cx:a}=FG({stickyOffset:n},{props:{classes:i}});return v.jsx(F.Collapse,{in:!t,unmountOnExit:!0,className:a(Gv.root,s.root,e?[Gv.nonSticky,s.nonSticky]:[Gv.sticky,s.sticky],o),children:v.jsx("div",{className:s.content,children:r})})}const RG=qt({name:{MenuDivider:Mn}})(t=>({root:{height:18,margin:t.spacing(0,.5)}}));function Mn(t){const{classes:e,cx:n}=RG();return v.jsx(F.Divider,{orientation:"vertical",...t,className:n(e.root,t.className)})}var BG="tippy-box",b2="tippy-content",VG="tippy-backdrop",v2="tippy-arrow",x2="tippy-svg-arrow",Fs={passive:!0,capture:!0},S2=function(){return document.body};function zG(t,e){return{}.hasOwnProperty.call(t,e)}function Jv(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function Zv(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function C2(t,e){return typeof t=="function"?t.apply(void 0,e):t}function w2(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function HG(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function jG(t){return t.split(/\s+/).filter(Boolean)}function ja(t){return[].concat(t)}function T2(t,e){t.indexOf(e)===-1&&t.push(e)}function WG(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function qG(t){return t.split("-")[0]}function Ef(t){return[].slice.call(t)}function E2(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function $c(){return document.createElement("div")}function Fc(t){return["Element","Fragment"].some(function(e){return Zv(t,e)})}function UG(t){return Zv(t,"NodeList")}function KG(t){return Zv(t,"MouseEvent")}function YG(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function GG(t){return Fc(t)?[t]:UG(t)?Ef(t):Array.isArray(t)?t:Ef(document.querySelectorAll(t))}function Xv(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function M2(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function JG(t){var e,n=ja(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function ZG(t,e){var n=e.clientX,r=e.clientY;return t.every(function(o){var i=o.popperRect,s=o.popperState,a=o.props,l=a.interactiveBorder,u=qG(s.placement),f=s.modifiersData.offset;if(!f)return!0;var h=u==="bottom"?f.top.y:0,m=u==="top"?f.bottom.y:0,g=u==="right"?f.left.x:0,b=u==="left"?f.right.x:0,y=i.top-r+h>l,S=r-i.bottom-m>l,C=i.left-n+g>l,E=n-i.right-b>l;return y||S||C||E})}function Qv(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){t[r](o,n)})}function O2(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Oo={isTouch:!1},k2=0;function XG(){Oo.isTouch||(Oo.isTouch=!0,window.performance&&document.addEventListener("mousemove",A2))}function A2(){var t=performance.now();t-k2<20&&(Oo.isTouch=!1,document.removeEventListener("mousemove",A2)),k2=t}function QG(){var t=document.activeElement;if(YG(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function eJ(){document.addEventListener("touchstart",XG,Fs),window.addEventListener("blur",QG)}var tJ=typeof window<"u"&&typeof document<"u",nJ=tJ?!!window.msCrypto:!1;function Wa(t){var e=t==="destroy"?"n already-":" ";return[t+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function I2(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function rJ(t){return I2(`
339
+ %ctippy.js
340
+
341
+ %c`+I2(t)+`
342
+
343
+ %c👷‍ This is a development-only message. It will be removed in production.
344
+ `)}function D2(t){return[rJ(t),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Rc;process.env.NODE_ENV!=="production"&&oJ();function oJ(){Rc=new Set}function Xo(t,e){if(t&&!Rc.has(e)){var n;Rc.add(e),(n=console).warn.apply(n,D2(e))}}function e0(t,e){if(t&&!Rc.has(e)){var n;Rc.add(e),(n=console).error.apply(n,D2(e))}}function iJ(t){var e=!t,n=Object.prototype.toString.call(t)==="[object Object]"&&!t.addEventListener;e0(e,["tippy() was passed","`"+String(t)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),e0(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var P2={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},sJ={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Sr=Object.assign({appendTo:S2,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},P2,sJ),aJ=Object.keys(Sr),lJ=function(e){process.env.NODE_ENV!=="production"&&L2(e,[]);var n=Object.keys(e);n.forEach(function(r){Sr[r]=e[r]})};function _2(t){var e=t.plugins||[],n=e.reduce(function(r,o){var i=o.name,s=o.defaultValue;if(i){var a;r[i]=t[i]!==void 0?t[i]:(a=Sr[i])!=null?a:s}return r},{});return Object.assign({},t,n)}function cJ(t,e){var n=e?Object.keys(_2(Object.assign({},Sr,{plugins:e}))):aJ,r=n.reduce(function(o,i){var s=(t.getAttribute("data-tippy-"+i)||"").trim();if(!s)return o;if(i==="content")o[i]=s;else try{o[i]=JSON.parse(s)}catch{o[i]=s}return o},{});return r}function N2(t,e){var n=Object.assign({},e,{content:C2(e.content,[t])},e.ignoreAttributes?{}:cJ(t,e.plugins));return n.aria=Object.assign({},Sr.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}function L2(t,e){t===void 0&&(t={}),e===void 0&&(e=[]);var n=Object.keys(t);n.forEach(function(r){var o=HG(Sr,Object.keys(P2)),i=!zG(o,r);i&&(i=e.filter(function(s){return s.name===r}).length===0),Xo(i,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
345
+
346
+ `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
347
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var uJ=function(){return"innerHTML"};function t0(t,e){t[uJ()]=e}function $2(t){var e=$c();return t===!0?e.className=v2:(e.className=x2,Fc(t)?e.appendChild(t):t0(e,t)),e}function F2(t,e){Fc(e.content)?(t0(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?t0(t,e.content):t.textContent=e.content)}function n0(t){var e=t.firstElementChild,n=Ef(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(b2)}),arrow:n.find(function(r){return r.classList.contains(v2)||r.classList.contains(x2)}),backdrop:n.find(function(r){return r.classList.contains(VG)})}}function R2(t){var e=$c(),n=$c();n.className=BG,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=$c();r.className=b2,r.setAttribute("data-state","hidden"),F2(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props);function o(i,s){var a=n0(e),l=a.box,u=a.content,f=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(i.content!==s.content||i.allowHTML!==s.allowHTML)&&F2(u,t.props),s.arrow?f?i.arrow!==s.arrow&&(l.removeChild(f),l.appendChild($2(s.arrow))):l.appendChild($2(s.arrow)):f&&l.removeChild(f)}return{popper:e,onUpdate:o}}R2.$$tippy=!0;var dJ=1,Mf=[],r0=[];function fJ(t,e){var n=N2(t,Object.assign({},Sr,_2(E2(e)))),r,o,i,s=!1,a=!1,l=!1,u=!1,f,h,m,g=[],b=w2(le,n.interactiveDebounce),y,S=dJ++,C=null,E=WG(n.plugins),T={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:S,reference:t,popper:$c(),popperInstance:C,props:n,state:T,plugins:E,clearDelayTimeouts:vn,setProps:cn,setContent:$t,show:An,hide:qn,hideWithInteractivity:dt,enable:St,disable:Zt,unmount:Ln,destroy:Kt};if(!n.render)return process.env.NODE_ENV!=="production"&&e0(!0,"render() function has not been supplied."),w;var O=n.render(w),A=O.popper,N=O.onUpdate;A.setAttribute("data-tippy-root",""),A.id="tippy-"+w.id,w.popper=A,t._tippy=w,A._tippy=w;var D=E.map(function(de){return de.fn(w)}),L=t.hasAttribute("aria-expanded");return he(),Y(),W(),U("onCreate",[w]),n.showOnCreate&&De(),A.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),A.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&z().addEventListener("mousemove",b)}),w;function k(){var de=w.props.touch;return Array.isArray(de)?de:[de,0]}function I(){return k()[0]==="hold"}function $(){var de;return!!((de=w.props.render)!=null&&de.$$tippy)}function H(){return y||t}function z(){var de=H().parentNode;return de?JG(de):document}function R(){return n0(A)}function B(de){return w.state.isMounted&&!w.state.isVisible||Oo.isTouch||f&&f.type==="focus"?0:Jv(w.props.delay,de?0:1,Sr.delay)}function W(de){de===void 0&&(de=!1),A.style.pointerEvents=w.props.interactive&&!de?"":"none",A.style.zIndex=""+w.props.zIndex}function U(de,$e,Ee){if(Ee===void 0&&(Ee=!0),D.forEach(function(Ye){Ye[de]&&Ye[de].apply(Ye,$e)}),Ee){var Re;(Re=w.props)[de].apply(Re,$e)}}function G(){var de=w.props.aria;if(de.content){var $e="aria-"+de.content,Ee=A.id,Re=ja(w.props.triggerTarget||t);Re.forEach(function(Ye){var tt=Ye.getAttribute($e);if(w.state.isVisible)Ye.setAttribute($e,tt?tt+" "+Ee:Ee);else{var Pt=tt&&tt.replace(Ee,"").trim();Pt?Ye.setAttribute($e,Pt):Ye.removeAttribute($e)}})}}function Y(){if(!(L||!w.props.aria.expanded)){var de=ja(w.props.triggerTarget||t);de.forEach(function($e){w.props.interactive?$e.setAttribute("aria-expanded",w.state.isVisible&&$e===H()?"true":"false"):$e.removeAttribute("aria-expanded")})}}function Z(){z().removeEventListener("mousemove",b),Mf=Mf.filter(function(de){return de!==b})}function me(de){if(!(Oo.isTouch&&(l||de.type==="mousedown"))){var $e=de.composedPath&&de.composedPath()[0]||de.target;if(!(w.props.interactive&&O2(A,$e))){if(ja(w.props.triggerTarget||t).some(function(Ee){return O2(Ee,$e)})){if(Oo.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else U("onClickOutside",[w,de]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),a=!0,setTimeout(function(){a=!1}),w.state.isMounted||ue())}}}function fe(){l=!0}function pe(){l=!1}function re(){var de=z();de.addEventListener("mousedown",me,!0),de.addEventListener("touchend",me,Fs),de.addEventListener("touchstart",pe,Fs),de.addEventListener("touchmove",fe,Fs)}function ue(){var de=z();de.removeEventListener("mousedown",me,!0),de.removeEventListener("touchend",me,Fs),de.removeEventListener("touchstart",pe,Fs),de.removeEventListener("touchmove",fe,Fs)}function ae(de,$e){Q(de,function(){!w.state.isVisible&&A.parentNode&&A.parentNode.contains(A)&&$e()})}function K(de,$e){Q(de,$e)}function Q(de,$e){var Ee=R().box;function Re(Ye){Ye.target===Ee&&(Qv(Ee,"remove",Re),$e())}if(de===0)return $e();Qv(Ee,"remove",h),Qv(Ee,"add",Re),h=Re}function ie(de,$e,Ee){Ee===void 0&&(Ee=!1);var Re=ja(w.props.triggerTarget||t);Re.forEach(function(Ye){Ye.addEventListener(de,$e,Ee),g.push({node:Ye,eventType:de,handler:$e,options:Ee})})}function he(){I()&&(ie("touchstart",se,{passive:!0}),ie("touchend",ge,{passive:!0})),jG(w.props.trigger).forEach(function(de){if(de!=="manual")switch(ie(de,se),de){case"mouseenter":ie("mouseleave",ge);break;case"focus":ie(nJ?"focusout":"blur",we);break;case"focusin":ie("focusout",we);break}})}function ee(){g.forEach(function(de){var $e=de.node,Ee=de.eventType,Re=de.handler,Ye=de.options;$e.removeEventListener(Ee,Re,Ye)}),g=[]}function se(de){var $e,Ee=!1;if(!(!w.state.isEnabled||xe(de)||a)){var Re=(($e=f)==null?void 0:$e.type)==="focus";f=de,y=de.currentTarget,Y(),!w.state.isVisible&&KG(de)&&Mf.forEach(function(Ye){return Ye(de)}),de.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||s)&&w.props.hideOnClick!==!1&&w.state.isVisible?Ee=!0:De(de),de.type==="click"&&(s=!Ee),Ee&&!Re&&lt(de)}}function le(de){var $e=de.target,Ee=H().contains($e)||A.contains($e);if(!(de.type==="mousemove"&&Ee)){var Re=Ge().concat(A).map(function(Ye){var tt,Pt=Ye._tippy,tr=(tt=Pt.popperInstance)==null?void 0:tt.state;return tr?{popperRect:Ye.getBoundingClientRect(),popperState:tr,props:n}:null}).filter(Boolean);ZG(Re,de)&&(Z(),lt(de))}}function ge(de){var $e=xe(de)||w.props.trigger.indexOf("click")>=0&&s;if(!$e){if(w.props.interactive){w.hideWithInteractivity(de);return}lt(de)}}function we(de){w.props.trigger.indexOf("focusin")<0&&de.target!==H()||w.props.interactive&&de.relatedTarget&&A.contains(de.relatedTarget)||lt(de)}function xe(de){return Oo.isTouch?I()!==de.type.indexOf("touch")>=0:!1}function Oe(){Le();var de=w.props,$e=de.popperOptions,Ee=de.placement,Re=de.offset,Ye=de.getReferenceClientRect,tt=de.moveTransition,Pt=$()?n0(A).arrow:null,tr=Ye?{getBoundingClientRect:Ye,contextElement:Ye.contextElement||H()}:t,fr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(el){var Yi=el.state;if($()){var Op=R(),ru=Op.box;["placement","reference-hidden","escaped"].forEach(function(tl){tl==="placement"?ru.setAttribute("data-placement",Yi.placement):Yi.attributes.popper["data-popper-"+tl]?ru.setAttribute("data-"+tl,""):ru.removeAttribute("data-"+tl)}),Yi.attributes.popper={}}}},ri=[{name:"offset",options:{offset:Re}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!tt}},fr];$()&&Pt&&ri.push({name:"arrow",options:{element:Pt,padding:3}}),ri.push.apply(ri,($e==null?void 0:$e.modifiers)||[]),w.popperInstance=AT(tr,A,Object.assign({},$e,{placement:Ee,onFirstUpdate:m,modifiers:ri}))}function Le(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function He(){var de=w.props.appendTo,$e,Ee=H();w.props.interactive&&de===S2||de==="parent"?$e=Ee.parentNode:$e=C2(de,[Ee]),$e.contains(A)||$e.appendChild(A),w.state.isMounted=!0,Oe(),process.env.NODE_ENV!=="production"&&Xo(w.props.interactive&&de===Sr.appendTo&&Ee.nextElementSibling!==A,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
348
+
349
+ `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
350
+
351
+ `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
352
+
353
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ge(){return Ef(A.querySelectorAll("[data-tippy-root]"))}function De(de){w.clearDelayTimeouts(),de&&U("onTrigger",[w,de]),re();var $e=B(!0),Ee=k(),Re=Ee[0],Ye=Ee[1];Oo.isTouch&&Re==="hold"&&Ye&&($e=Ye),$e?r=setTimeout(function(){w.show()},$e):w.show()}function lt(de){if(w.clearDelayTimeouts(),U("onUntrigger",[w,de]),!w.state.isVisible){ue();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(de.type)>=0&&s)){var $e=B(!1);$e?o=setTimeout(function(){w.state.isVisible&&w.hide()},$e):i=requestAnimationFrame(function(){w.hide()})}}function St(){w.state.isEnabled=!0}function Zt(){w.hide(),w.state.isEnabled=!1}function vn(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function cn(de){if(process.env.NODE_ENV!=="production"&&Xo(w.state.isDestroyed,Wa("setProps")),!w.state.isDestroyed){U("onBeforeUpdate",[w,de]),ee();var $e=w.props,Ee=N2(t,Object.assign({},$e,E2(de),{ignoreAttributes:!0}));w.props=Ee,he(),$e.interactiveDebounce!==Ee.interactiveDebounce&&(Z(),b=w2(le,Ee.interactiveDebounce)),$e.triggerTarget&&!Ee.triggerTarget?ja($e.triggerTarget).forEach(function(Re){Re.removeAttribute("aria-expanded")}):Ee.triggerTarget&&t.removeAttribute("aria-expanded"),Y(),W(),N&&N($e,Ee),w.popperInstance&&(Oe(),Ge().forEach(function(Re){requestAnimationFrame(Re._tippy.popperInstance.forceUpdate)})),U("onAfterUpdate",[w,de])}}function $t(de){w.setProps({content:de})}function An(){process.env.NODE_ENV!=="production"&&Xo(w.state.isDestroyed,Wa("show"));var de=w.state.isVisible,$e=w.state.isDestroyed,Ee=!w.state.isEnabled,Re=Oo.isTouch&&!w.props.touch,Ye=Jv(w.props.duration,0,Sr.duration);if(!(de||$e||Ee||Re)&&!H().hasAttribute("disabled")&&(U("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,$()&&(A.style.visibility="visible"),W(),re(),w.state.isMounted||(A.style.transition="none"),$()){var tt=R(),Pt=tt.box,tr=tt.content;Xv([Pt,tr],0)}m=function(){var ri;if(!(!w.state.isVisible||u)){if(u=!0,A.offsetHeight,A.style.transition=w.props.moveTransition,$()&&w.props.animation){var nu=R(),el=nu.box,Yi=nu.content;Xv([el,Yi],Ye),M2([el,Yi],"visible")}G(),Y(),T2(r0,w),(ri=w.popperInstance)==null||ri.forceUpdate(),U("onMount",[w]),w.props.animation&&$()&&K(Ye,function(){w.state.isShown=!0,U("onShown",[w])})}},He()}}function qn(){process.env.NODE_ENV!=="production"&&Xo(w.state.isDestroyed,Wa("hide"));var de=!w.state.isVisible,$e=w.state.isDestroyed,Ee=!w.state.isEnabled,Re=Jv(w.props.duration,1,Sr.duration);if(!(de||$e||Ee)&&(U("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,u=!1,s=!1,$()&&(A.style.visibility="hidden"),Z(),ue(),W(!0),$()){var Ye=R(),tt=Ye.box,Pt=Ye.content;w.props.animation&&(Xv([tt,Pt],Re),M2([tt,Pt],"hidden"))}G(),Y(),w.props.animation?$()&&ae(Re,w.unmount):w.unmount()}}function dt(de){process.env.NODE_ENV!=="production"&&Xo(w.state.isDestroyed,Wa("hideWithInteractivity")),z().addEventListener("mousemove",b),T2(Mf,b),b(de)}function Ln(){process.env.NODE_ENV!=="production"&&Xo(w.state.isDestroyed,Wa("unmount")),w.state.isVisible&&w.hide(),w.state.isMounted&&(Le(),Ge().forEach(function(de){de._tippy.unmount()}),A.parentNode&&A.parentNode.removeChild(A),r0=r0.filter(function(de){return de!==w}),w.state.isMounted=!1,U("onHidden",[w]))}function Kt(){process.env.NODE_ENV!=="production"&&Xo(w.state.isDestroyed,Wa("destroy")),!w.state.isDestroyed&&(w.clearDelayTimeouts(),w.unmount(),ee(),delete t._tippy,w.state.isDestroyed=!0,U("onDestroy",[w]))}}function Bc(t,e){e===void 0&&(e={});var n=Sr.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(iJ(t),L2(e,n)),eJ();var r=Object.assign({},e,{plugins:n}),o=GG(t);if(process.env.NODE_ENV!=="production"){var i=Fc(r.content),s=o.length>1;Xo(i&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
354
+
355
+ `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
356
+
357
+ `,`1) content: element.innerHTML
358
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce(function(l,u){var f=u&&fJ(u,r);return f&&l.push(f),l},[]);return Fc(t)?a[0]:a}Bc.defaultProps=Sr,Bc.setDefaultProps=lJ,Bc.currentInput=Oo,Object.assign({},pT,{effect:function(e){var n=e.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),Bc.setDefaultProps({render:R2});function pJ(t){return t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var o0={exports:{}},i0={};/**
359
+ * @license React
360
+ * use-sync-external-store-shim.production.min.js
361
+ *
362
+ * Copyright (c) Facebook, Inc. and its affiliates.
363
+ *
364
+ * This source code is licensed under the MIT license found in the
365
+ * LICENSE file in the root directory of this source tree.
366
+ */var B2;function hJ(){if(B2)return i0;B2=1;var t=J;function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function a(h,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),y=b[0].inst,S=b[1];return i(function(){y.value=g,y.getSnapshot=m,l(y)&&S({inst:y})},[h,g,m]),o(function(){return l(y)&&S({inst:y}),h(function(){l(y)&&S({inst:y})})},[h]),s(g),g}function l(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!n(h,g)}catch{return!0}}function u(h,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return i0.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:f,i0}var s0={};/**
367
+ * @license React
368
+ * use-sync-external-store-shim.development.js
369
+ *
370
+ * Copyright (c) Facebook, Inc. and its affiliates.
371
+ *
372
+ * This source code is licensed under the MIT license found in the
373
+ * LICENSE file in the root directory of this source tree.
374
+ */var V2;function mJ(){return V2||(V2=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=J,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(T){{for(var w=arguments.length,O=new Array(w>1?w-1:0),A=1;A<w;A++)O[A-1]=arguments[A];r("error",T,O)}}function r(T,w,O){{var A=e.ReactDebugCurrentFrame,N=A.getStackAddendum();N!==""&&(w+="%s",O=O.concat([N]));var D=O.map(function(L){return String(L)});D.unshift("Warning: "+w),Function.prototype.apply.call(console[T],console,D)}}function o(T,w){return T===w&&(T!==0||1/T===1/w)||T!==T&&w!==w}var i=typeof Object.is=="function"?Object.is:o,s=t.useState,a=t.useEffect,l=t.useLayoutEffect,u=t.useDebugValue,f=!1,h=!1;function m(T,w,O){f||t.startTransition!==void 0&&(f=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var A=w();if(!h){var N=w();i(A,N)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}var D=s({inst:{value:A,getSnapshot:w}}),L=D[0].inst,k=D[1];return l(function(){L.value=A,L.getSnapshot=w,g(L)&&k({inst:L})},[T,A,w]),a(function(){g(L)&&k({inst:L});var I=function(){g(L)&&k({inst:L})};return T(I)},[T]),u(A),A}function g(T){var w=T.getSnapshot,O=T.value;try{var A=w();return!i(O,A)}catch{return!0}}function b(T,w,O){return w()}var y=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",S=!y,C=S?b:m,E=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:C;s0.useSyncExternalStore=E,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),s0}process.env.NODE_ENV==="production"?o0.exports=hJ():o0.exports=mJ();var Of=o0.exports;const gJ=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},yJ=({contentComponent:t})=>{const e=Of.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return J.createElement(J.Fragment,null,Object.values(e))};function bJ(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:is.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(o=>o())}}}class vJ extends J.Component{constructor(e){var n;super(e),this.editorContentRef=J.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=e.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.options.element.childNodes),e.setOptions({element:n}),e.contentComponent=bJ(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const e=this.props.editor;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild))return;const n=document.createElement("div");n.append(...e.options.element.childNodes),e.setOptions({element:n})}render(){const{editor:e,innerRef:n,...r}=this.props;return J.createElement(J.Fragment,null,J.createElement("div",{ref:gJ(n,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&J.createElement(yJ,{contentComponent:e.contentComponent}))}}const xJ=J.forwardRef((t,e)=>{const n=J.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return J.createElement(vJ,{key:n,innerRef:e,...t})}),SJ=J.memo(xJ);var CJ=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;for(o of e.entries())if(!t(o[1],n.get(o[0])))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(e[o]!==n[o])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},wJ=pJ(CJ),a0={exports:{}},l0={};/**
375
+ * @license React
376
+ * use-sync-external-store-shim/with-selector.production.min.js
377
+ *
378
+ * Copyright (c) Facebook, Inc. and its affiliates.
379
+ *
380
+ * This source code is licensed under the MIT license found in the
381
+ * LICENSE file in the root directory of this source tree.
382
+ */var z2;function TJ(){if(z2)return l0;z2=1;var t=J,e=Of;function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;return l0.useSyncExternalStoreWithSelector=function(u,f,h,m,g){var b=i(null);if(b.current===null){var y={hasValue:!1,value:null};b.current=y}else y=b.current;b=a(function(){function C(A){if(!E){if(E=!0,T=A,A=m(A),g!==void 0&&y.hasValue){var N=y.value;if(g(N,A))return w=N}return w=A}if(N=w,r(T,A))return N;var D=m(A);return g!==void 0&&g(N,D)?N:(T=A,w=D)}var E=!1,T,w,O=h===void 0?null:h;return[function(){return C(f())},O===null?void 0:function(){return C(O())}]},[f,h,m,g]);var S=o(u,b[0],b[1]);return s(function(){y.hasValue=!0,y.value=S},[S]),l(S),S},l0}var c0={};/**
383
+ * @license React
384
+ * use-sync-external-store-shim/with-selector.development.js
385
+ *
386
+ * Copyright (c) Facebook, Inc. and its affiliates.
387
+ *
388
+ * This source code is licensed under the MIT license found in the
389
+ * LICENSE file in the root directory of this source tree.
390
+ */var H2;function EJ(){return H2||(H2=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=J,e=Of;function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function u(f,h,m,g,b){var y=i(null),S;y.current===null?(S={hasValue:!1,value:null},y.current=S):S=y.current;var C=a(function(){var O=!1,A,N,D=function($){if(!O){O=!0,A=$;var H=g($);if(b!==void 0&&S.hasValue){var z=S.value;if(b(z,H))return N=z,z}return N=H,H}var R=A,B=N;if(r(R,$))return B;var W=g($);return b!==void 0&&b(B,W)?B:(A=$,N=W,W)},L=m===void 0?null:m,k=function(){return D(h())},I=L===null?void 0:function(){return D(L())};return[k,I]},[h,m,g,b]),E=C[0],T=C[1],w=o(f,E,T);return s(function(){S.hasValue=!0,S.value=w},[w]),l(w),w}c0.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),c0}process.env.NODE_ENV==="production"?a0.exports=TJ():a0.exports=EJ();var MJ=a0.exports;const OJ=typeof window<"u"?J.useLayoutEffect:J.useEffect;class kJ{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const n=()=>{this.transactionNumber+=1,this.subscribers.forEach(o=>o())},r=this.editor;return r.on("transaction",n),()=>{r.off("transaction",n)}}}}function AJ(t){var e;const[n]=J.useState(()=>new kJ(t.editor)),r=MJ.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!==null&&e!==void 0?e:wJ);return OJ(()=>n.watch(t.editor),[t.editor,n]),J.useDebugValue(r),r}const j2=process.env.NODE_ENV!=="production",u0=typeof window>"u",IJ=u0||!!(typeof window<"u"&&window.next);class d0{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return u0||IJ?(j2&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&u0&&j2)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)===null||i===void 0?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)===null||i===void 0?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)===null||i===void 0?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)===null||i===void 0?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)===null||i===void 0?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)===null||i===void 0?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)===null||i===void 0?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)===null||i===void 0?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)===null||i===void 0?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)===null||i===void 0?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)===null||i===void 0?void 0:i.call(o,...r)}};return new pK(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((o,i)=>{var s;return o===((s=n.extensions)===null||s===void 0?void 0:s[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?d0.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,o)=>r===e[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}}function W2(t={},e=[]){const n=J.useRef(t);n.current=t;const[r]=J.useState(()=>new d0(n)),o=Of.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return J.useDebugValue(o),J.useEffect(r.onRender(e)),AJ({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&i===0?0:i+1}),o}J.createContext({editor:null}).Consumer;const q2=J.createContext({onDragStart:void 0}),U2=()=>J.useContext(q2),DJ=t=>{const e=t.as||"div",{nodeViewContentRef:n}=U2();return J.createElement(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},f0=J.forwardRef((t,e)=>{const{onDragStart:n}=U2(),r=t.as||"div";return J.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function PJ(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function _J(t){var e;return typeof t=="object"&&((e=t.$$typeof)===null||e===void 0?void 0:e.toString())==="Symbol(react.forward_ref)"}class K2{constructor(e,{editor:n,props:r={},as:o="div",className:i=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=n,this.props=r,this.element=document.createElement(o),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?is.flushSync(()=>{this.render()}):this.render()}render(){var e;const n=this.component,r=this.props,o=this.editor;(PJ(n)||_J(n))&&(r.ref=i=>{this.ref=i}),this.reactElement=J.createElement(n,{...r}),(e=o==null?void 0:o.contentComponent)===null||e===void 0||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;const n=this.editor;(e=n==null?void 0:n.contentComponent)===null||e===void 0||e.removeRenderer(this.id)}updateAttributes(e){Object.keys(e).forEach(n=>{this.element.setAttribute(n,e[n])})}}class NJ extends hK{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(u={})=>this.updateAttributes(u),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const u=f=>f.charAt(0).toUpperCase()+f.substring(1);this.component.displayName=u(this.extension.name)}const o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:u=>{u&&this.contentDOMElement&&u.firstChild!==this.contentDOMElement&&u.appendChild(this.contentDOMElement)}},i=this.component,s=J.memo(u=>J.createElement(q2.Provider,{value:o},J.createElement(i,u)));s.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let a=this.node.isInline?"span":"div";this.options.as&&(a=this.options.as);const{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new K2(s,{editor:this.editor,props:e,as:a,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(!((e=this.renderer.element.firstElementChild)===null||e===void 0)&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:e,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(e<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,n,r){const o=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,s=this.decorations,a=this.innerDecorations;return this.node=e,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:s,newNode:e,newDecorations:n,oldInnerDecorations:a,innerDecorations:r,updateProps:()=>o({node:e,decorations:n,innerDecorations:r})})}return e===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=e,this.decorations=n,this.innerDecorations=r,o({node:e,decorations:n,innerDecorations:r})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){const n=this.editor.extensionManager.attributes,r=rf(this.node,n);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function p0(t,e){return n=>n.editor.contentComponent?new NJ(t,n,e):{}}const h0=$s("RichTextContent",["root","readonly","editable"]),LJ=qt({name:{RichTextContent:m0}})(t=>({root:{"& .ProseMirror":{...GI(t)}},readonly:{},editable:{}}));function m0({className:t,classes:e={}}){const{classes:n,cx:r}=LJ(void 0,{props:{classes:e}}),o=yt(),i=J.useMemo(()=>r(h0.root,t,n.root,o!=null&&o.isEditable?[h0.editable,n.editable]:[h0.readonly,n.readonly]),[t,n,r,o==null?void 0:o.isEditable]);return v.jsx(F.Box,{className:i,component:SJ,editor:o})}function Y2({editor:t,children:e}){return v.jsx(ZI.Provider,{value:t,children:e})}const qa=$s("FieldContainer",["root","outlined","standard","focused","disabled","notchedOutline"]),$J=qt({name:{FieldContainer:G2},uniqId:"Os7ZPW"})((t,e,n)=>({root:{},outlined:{borderRadius:t.shape.borderRadius,padding:1,position:"relative",[`&:hover .${n.notchedOutline}`]:{borderColor:t.palette.text.primary},[`&.${n.focused} .${n.notchedOutline}`]:{borderColor:t.palette.primary.main,borderWidth:2},[`&.${n.disabled} .${n.notchedOutline}`]:{borderColor:t.palette.action.disabled}},standard:{},focused:{},disabled:{},notchedOutline:{position:"absolute",inset:0,borderRadius:"inherit",borderColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",borderStyle:"solid",borderWidth:1,pointerEvents:"none",overflow:"hidden",zIndex:wf.NOTCHED_OUTLINE}}));function G2({variant:t="outlined",children:e,focused:n,disabled:r,classes:o={},className:i}){const{classes:s,cx:a}=$J(void 0,{props:{classes:o}});return v.jsxs("div",{className:a(qa.root,s.root,t==="outlined"?[qa.outlined,s.outlined]:[qa.standard,s.standard],n&&[qa.focused,s.focused],r&&[qa.disabled,s.disabled],i),children:[e,t==="outlined"&&v.jsx("div",{className:a(qa.notchedOutline,s.notchedOutline),"aria-hidden":!0})]})}var FJ=OC();const J2=Gn(FJ);function Z2({editor:t,wait:e=250}){const[n,r]=J.useState(!!(t!=null&&t.isFocused)),o=J.useMemo(()=>J2(i=>{r(i)},e),[e]);return J.useEffect(()=>{const i=!!(t!=null&&t.isFocused);return o(i),i&&o.flush(),()=>{o.cancel()}},[t==null?void 0:t.isFocused,o]),n}class g0 extends J.Component{constructor(e){var n,r;super(e),this.updateDebounced=J2(this.forceUpdate,(n=e.wait)!==null&&n!==void 0?n:170,(r=e.options)!==null&&r!==void 0?r:{leading:!0,trailing:!0,maxWait:300})}shouldComponentUpdate(){return this.updateDebounced(),!1}componentWillUnmount(){this.updateDebounced.cancel()}render(){return this.props.children}}const Ua=$s("RichTextField",["root","standard","outlined","menuBar","menuBarContent","content"]),RJ=qt({name:{RichTextField:X2},uniqId:"E2Alw3"})((t,e,n)=>({root:{},standard:{[`& .${n.content}`]:{padding:t.spacing(1.5,0)},[`& .${n.menuBarContent}`]:{padding:t.spacing(1,0)}},outlined:{[`& .${n.content}`]:{padding:t.spacing(1.5)},[`& .${n.menuBarContent}`]:{padding:t.spacing(1,1.5)}},menuBar:{},menuBarContent:{},content:{}}));function X2({variant:t="outlined",controls:e,disableDebounceRenderControls:n=!1,disabled:r,className:o,classes:i={},footer:s,MenuBarProps:a,RichTextContentProps:l}){var u,f;const{classes:h,cx:m}=RJ(void 0,{props:{classes:i}}),g=yt(),b=Z2({editor:g});return v.jsxs(G2,{variant:t,focused:!r&&b,disabled:r,className:m(Ua.root,h.root,t==="outlined"?[Ua.outlined,h.outlined]:[Ua.standard,h.standard],o),children:[e&&v.jsx(y2,{...a,classes:{...a==null?void 0:a.classes,root:m(Ua.menuBar,h.menuBar,(u=a==null?void 0:a.classes)===null||u===void 0?void 0:u.root),content:m(Ua.content,h.menuBarContent,(f=a==null?void 0:a.classes)===null||f===void 0?void 0:f.content)},children:n?e:v.jsx(g0,{children:e})}),v.jsx(m0,{...l,className:m(Ua.content,h.content,l==null?void 0:l.className)}),s]})}const Q2=J.forwardRef(function({className:e,renderControls:n,RichTextFieldProps:r={},children:o,editorDependencies:i=[],editable:s=!0,...a},l){const u=W2({editable:s,...a},i);return J.useImperativeHandle(l,()=>({editor:u}),[u]),J.useEffect(()=>{!u||u.isDestroyed||u.isEditable===s||queueMicrotask(()=>{u.setEditable(s)})},[s,u]),v.jsxs(Y2,{editor:u,children:[v.jsx(X2,{disabled:!s,controls:n==null?void 0:n(u),className:e,...r}),o==null?void 0:o(u)]})});function BJ(t){const e=W2({...t,editable:!1}),n=J.useRef(t.content);return J.useEffect(()=>{!e||e.isDestroyed||t.content===void 0||t.content===n.current||queueMicrotask(()=>{t.content!==void 0&&e.commands.setContent(t.content)})},[t.content,e]),J.useEffect(()=>{n.current=t.content},[t.content]),v.jsx(Y2,{editor:e,children:v.jsx(m0,{})})}function VJ(t){return t.content?v.jsx(BJ,{...t}):null}const zJ=F.createSvgIcon(v.jsxs(v.Fragment,{children:[v.jsx("path",{d:"M20 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zM4 19V7h16l.002 12H4z"}),v.jsx("path",{d:"M9.293 9.293 5.586 13l3.707 3.707 1.414-1.414L8.414 13l2.293-2.293zm5.414 0-1.414 1.414L15.586 13l-2.293 2.293 1.414 1.414L18.414 13z"})]}),"CodeBlock"),HJ=F.createSvgIcon(v.jsx("path",{d:"M12 3C12.5523 3 13 3.44772 13 4L12.9998 11.9998C13.8355 11.372 14.8743 11 16 11C18.7614 11 21 13.2386 21 16C21 18.7614 18.7614 21 16 21C14.9681 21 14.0092 20.6874 13.2129 20.1518L13 20C13 20.5523 12.5523 21 12 21H6C5.44772 21 5 20.5523 5 20V4C5 3.44772 5.44772 3 6 3H12ZM11 5H7V19H11V5ZM19 15H13V17H19V15Z"}),"DeleteColumn"),jJ=F.createSvgIcon(v.jsx("path",{d:"M20 5C20.5523 5 21 5.44772 21 6V12C21 12.5523 20.5523 13 20 13C20.628 13.8355 21 14.8743 21 16C21 18.7614 18.7614 21 16 21C13.2386 21 11 18.7614 11 16C11 14.8743 11.372 13.8355 11.9998 12.9998L4 13C3.44772 13 3 12.5523 3 12V6C3 5.44772 3.44772 5 4 5H20ZM13 15V17H19V15H13ZM19 7H5V11H19V7Z"}),"DeleteRow"),WJ=F.createSvgIcon(v.jsx("path",{d:"M 2 20 h 20 v 4 H 2 v -4 z"}),"FormatColorBar"),qJ=F.createSvgIcon(v.jsx("path",{d:"M 5.49 17 h 2.42 l 1.27 -3.58 h 5.65 L 16.09 17 h 2.42 L 13.25 3 h -2.5 L 5.49 17 z m 4.42 -5.61 l 2.03 -5.79 h 0.12 l 2.03 5.79 H 9.91 z"}),"FormatColorTextNoBar"),UJ=F.createSvgIcon(v.jsx("path",{d:"M 10.6 8 l 5.4 5.425 l -4 4 q -0.6 0.6 -1.413 0.6 t -1.412 -0.6 L 8.5 18 h -5 l 3.15 -3.125 q -0.6 -0.6 -0.625 -1.438 T 6.6 12 l 4 -4 Z M 12 6.575 L 16 2.6 q 0.6 -0.6 1.413 -0.6 t 1.412 0.6 l 2.6 2.575 q 0.6 0.6 0.6 1.413 T 21.425 8 l -4 4 L 12 6.575 Z"}),"FormatInkHighlighterNoBar"),KJ=F.createSvgIcon(v.jsx("path",{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H14C13.4477 21 13 20.5523 13 20V4C13 3.44772 13.4477 3 14 3H20ZM19 5H15V19H19V5ZM6 7C8.76142 7 11 9.23858 11 12C11 14.7614 8.76142 17 6 17C3.23858 17 1 14.7614 1 12C1 9.23858 3.23858 7 6 7ZM7 9H5V10.999L3 11V13L5 12.999V15H7V12.999L9 13V11L7 10.999V9Z"}),"InsertColumnLeft"),YJ=F.createSvgIcon(v.jsx("path",{d:"M10 3C10.5523 3 11 3.44772 11 4V20C11 20.5523 10.5523 21 10 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H10ZM9 5H5V19H9V5ZM18 7C20.7614 7 23 9.23858 23 12C23 14.7614 20.7614 17 18 17C15.2386 17 13 14.7614 13 12C13 9.23858 15.2386 7 18 7ZM19 9H17V10.999L15 11V13L17 12.999V15H19V12.999L21 13V11L19 10.999V9Z"}),"InsertColumnRight"),GJ=F.createSvgIcon(v.jsx("path",{d:"M12 13C14.7614 13 17 15.2386 17 18C17 20.7614 14.7614 23 12 23C9.23858 23 7 20.7614 7 18C7 15.2386 9.23858 13 12 13ZM13 15H11V16.999L9 17V19L11 18.999V21H13V18.999L15 19V17L13 16.999V15ZM20 3C20.5523 3 21 3.44772 21 4V10C21 10.5523 20.5523 11 20 11H4C3.44772 11 3 10.5523 3 10V4C3 3.44772 3.44772 3 4 3H20ZM5 5V9H19V5H5Z"}),"InsertRowBottom"),JJ=F.createSvgIcon(v.jsx("path",{d:"M20 13C20.5523 13 21 13.4477 21 14V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V14C3 13.4477 3.44772 13 4 13H20ZM19 15H5V19H19V15ZM12 1C14.7614 1 17 3.23858 17 6C17 8.76142 14.7614 11 12 11C9.23858 11 7 8.76142 7 6C7 3.23858 9.23858 1 12 1ZM13 3H11V4.999L9 5V7L11 6.999V9H13V6.999L15 7V5L13 4.999V3Z"}),"InsertRowTop"),ZJ=F.createSvgIcon(v.jsx("path",{d:"M12 5V19H19V5H12ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z"}),"LayoutColumnFill"),XJ=F.createSvgIcon(v.jsx("path",{d:"M19 12H5V19H19V12ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z"}),"LayoutRowFill"),QJ=F.createSvgIcon(v.jsx("path",{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V10.999H7V9L10 12L7 15V13H5V19H11V17H13V19H19V13H17V15L14 12L17 9V10.999H19V5H13V7H11V5ZM13 13V15H11V13H13ZM13 9V11H11V9H13Z"}),"MergeCellsHorizontal"),eZ=F.createSvgIcon(v.jsx("path",{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V19H11V15H13V19H19V5H13V9H11V5ZM15 9L18 12L15 15V13H9V15L6 12L9 9V11H15V9Z"}),"SplitCellsHorizontal"),tZ=F.createSvgIcon(v.jsx("path",{d:"M4 21h15.893c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2zm0-2v-5h4v5H4zM14 7v5h-4V7h4zM8 7v5H4V7h4zm2 12v-5h4v5h-4zm6 0v-5h3.894v5H16zm3.893-7H16V7h3.893v5z"}),"Table");let y0,b0;function nZ(){return y0===void 0&&(y0=navigator.platform.includes("Mac")),y0}function rZ(){return nZ()?"⌘":"Ctrl"}function oZ(){return b0===void 0&&(b0=window&&"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),b0}const iZ=qt({name:{MenuButtonTooltip:ao}})(t=>({titleContainer:{textAlign:"center"},label:{fontSize:t.typography.pxToRem(13)},shortcutKey:{fontSize:t.typography.pxToRem(12),border:`1px solid ${F.alpha(t.palette.text.secondary,.2)}`,backgroundColor:F.alpha(t.palette.background.paper,.3),height:"19px",lineHeight:"19px",padding:"0 4px",minWidth:17,borderRadius:t.shape.borderRadius,display:"inline-block","&:not(:first-of-type)":{marginLeft:1}}}));function ao({label:t,shortcutKeys:e,placement:n="top",contentWrapperClassName:r,children:o,...i}){const{classes:s}=iZ();return v.jsx(F.Tooltip,{title:t||e&&e.length>0?v.jsxs("div",{className:s.titleContainer,children:[v.jsx("div",{className:s.label,children:t}),e&&e.length>0&&v.jsx(F.Typography,{variant:"body2",component:"div",children:e.map((a,l)=>v.jsx("span",{className:s.shortcutKey,children:a==="mod"?rZ():a},l))})]}):"",placement:n,arrow:!0,...i,children:v.jsx("span",{className:r,children:o})})}const Vc="1.25rem",sZ=qt({name:{MenuButton:ht}})({root:{[`&& .${F.toggleButtonClasses.root}`]:{border:"none",padding:5}},menuButtonIcon:{fontSize:Vc}});function ht({tooltipLabel:t,tooltipShortcutKeys:e,IconComponent:n,buttonRef:r,children:o,...i}){const{classes:s}=sZ();return v.jsx("span",{className:s.root,children:v.jsx(ao,{label:t,shortcutKeys:e,children:v.jsx(F.ToggleButton,{ref:r,size:"small",value:t,...i,children:o??(n&&v.jsx(n,{className:s.menuButtonIcon}))})})})}const aZ=qt({name:{MenuControlsContainer:kf}})(t=>({root:{display:"flex",rowGap:t.spacing(.3),columnGap:t.spacing(.3),alignItems:"center",flexWrap:"wrap"}}));function kf({children:t,className:e,debounced:n,DebounceProps:r}){const{classes:o,cx:i}=aZ(),s=v.jsx("div",{className:i(o.root,e),children:t});return n?v.jsx(g0,{...r,children:s}):s}function lZ({className:t,labels:e}){var n,r,o,i,s,a,l,u,f,h,m,g,b;const y=yt();return v.jsxs(kf,{className:t,children:[v.jsx(ht,{tooltipLabel:(n=e==null?void 0:e.insertColumnBefore)!==null&&n!==void 0?n:"Insert column before",IconComponent:KJ,onClick:()=>y==null?void 0:y.chain().focus().addColumnBefore().run(),disabled:!(y!=null&&y.can().addColumnBefore())}),v.jsx(ht,{tooltipLabel:(r=e==null?void 0:e.insertColumnAfter)!==null&&r!==void 0?r:"Insert column after",IconComponent:YJ,onClick:()=>y==null?void 0:y.chain().focus().addColumnAfter().run(),disabled:!(y!=null&&y.can().addColumnAfter())}),v.jsx(ht,{tooltipLabel:(o=e==null?void 0:e.deleteColumn)!==null&&o!==void 0?o:"Delete column",IconComponent:HJ,onClick:()=>y==null?void 0:y.chain().focus().deleteColumn().run(),disabled:!(y!=null&&y.can().deleteColumn())}),v.jsx(Mn,{}),v.jsx(ht,{tooltipLabel:(i=e==null?void 0:e.insertRowAbove)!==null&&i!==void 0?i:"Insert row above",IconComponent:JJ,onClick:()=>y==null?void 0:y.chain().focus().addRowBefore().run(),disabled:!(y!=null&&y.can().addRowBefore())}),v.jsx(ht,{tooltipLabel:(s=e==null?void 0:e.insertRowBelow)!==null&&s!==void 0?s:"Insert row below",IconComponent:GJ,onClick:()=>y==null?void 0:y.chain().focus().addRowAfter().run(),disabled:!(y!=null&&y.can().addRowAfter())}),v.jsx(ht,{tooltipLabel:(a=e==null?void 0:e.deleteRow)!==null&&a!==void 0?a:"Delete row",IconComponent:jJ,onClick:()=>y==null?void 0:y.chain().focus().deleteRow().run(),disabled:!(y!=null&&y.can().deleteRow())}),v.jsx(Mn,{}),v.jsx(ht,{tooltipLabel:(l=e==null?void 0:e.mergeCells)!==null&&l!==void 0?l:"Merge cells",IconComponent:QJ,onClick:()=>y==null?void 0:y.chain().focus().mergeCells().run(),disabled:!(y!=null&&y.can().mergeCells())}),v.jsx(ht,{tooltipLabel:(u=e==null?void 0:e.splitCell)!==null&&u!==void 0?u:"Split cell",IconComponent:eZ,onClick:()=>y==null?void 0:y.chain().focus().splitCell().run(),disabled:!(y!=null&&y.can().splitCell())}),v.jsx(Mn,{}),v.jsx(ht,{tooltipLabel:(f=e==null?void 0:e.toggleHeaderRow)!==null&&f!==void 0?f:"Toggle header row",IconComponent:XJ,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderRow().run(),disabled:!(y!=null&&y.can().toggleHeaderRow())}),v.jsx(ht,{tooltipLabel:(h=e==null?void 0:e.toggleHeaderColumn)!==null&&h!==void 0?h:"Toggle header column",IconComponent:ZJ,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderColumn().run(),disabled:!(y!=null&&y.can().toggleHeaderColumn())}),v.jsx(ht,{tooltipLabel:(m=e==null?void 0:e.toggleHeaderCell)!==null&&m!==void 0?m:"Toggle header cell",IconComponent:zB,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderCell().run(),disabled:!(y!=null&&y.can().toggleHeaderCell()),selected:(g=y==null?void 0:y.isActive("tableHeader"))!==null&&g!==void 0?g:!1}),v.jsx(Mn,{}),v.jsx(ht,{tooltipLabel:(b=e==null?void 0:e.deleteTable)!==null&&b!==void 0?b:"Delete table",IconComponent:JB,onClick:()=>y==null?void 0:y.chain().focus().deleteTable().run(),disabled:!(y!=null&&y.can().deleteTable())})]})}const cZ=qt({name:{TableBubbleMenu:eD}})(t=>({controls:{maxWidth:"90vw",padding:t.spacing(.5,1)}}));function eD({disableDebounce:t=!1,DebounceProps:e,labels:n,...r}){const o=yt(),{classes:i}=cZ(),s=Z2({editor:o}),a=J.useMemo(()=>o?{getBoundingClientRect:()=>{const u=o.isActive("table")?Jg(o.state.selection.$anchor,g=>g.type.name==="table"):null;if(u){const g=o.view.nodeDOM(u.pos),b=g==null?void 0:g.querySelector("table");if(b)return b.getBoundingClientRect()}const{ranges:f}=o.state.selection,h=Math.min(...f.map(g=>g.$from.pos)),m=Math.max(...f.map(g=>g.$to.pos));return KO(o.view,h,m)}}:null,[o]);if(!(o!=null&&o.isEditable))return null;const l=v.jsx(lZ,{className:i.controls,labels:n});return v.jsx(Tf,{editor:o,open:s&&o.isActive("table"),anchorEl:a,placement:"top-start",fallbackPlacements:["bottom-start","top","bottom","top-end","bottom-end"],flipPadding:{top:35,left:8,right:8,bottom:-1/0},...r,children:t?l:v.jsx(g0,{...e,children:l})})}function Ka(){return(Ka=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function v0(t,e){if(t==null)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}function x0(t){var e=J.useRef(t),n=J.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var Ya=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},zc=function(t){return"touches"in t},S0=function(t){return t&&t.ownerDocument.defaultView||self},tD=function(t,e,n){var r=t.getBoundingClientRect(),o=zc(e)?function(i,s){for(var a=0;a<i.length;a++)if(i[a].identifier===s)return i[a];return i[0]}(e.touches,n):e;return{left:Ya((o.pageX-(r.left+S0(t).pageXOffset))/r.width),top:Ya((o.pageY-(r.top+S0(t).pageYOffset))/r.height)}},nD=function(t){!zc(t)&&t.preventDefault()},C0=J.memo(function(t){var e=t.onMove,n=t.onKey,r=v0(t,["onMove","onKey"]),o=J.useRef(null),i=x0(e),s=x0(n),a=J.useRef(null),l=J.useRef(!1),u=J.useMemo(function(){var g=function(S){nD(S),(zc(S)?S.touches.length>0:S.buttons>0)&&o.current?i(tD(o.current,S,a.current)):y(!1)},b=function(){return y(!1)};function y(S){var C=l.current,E=S0(o.current),T=S?E.addEventListener:E.removeEventListener;T(C?"touchmove":"mousemove",g),T(C?"touchend":"mouseup",b)}return[function(S){var C=S.nativeEvent,E=o.current;if(E&&(nD(C),!function(w,O){return O&&!zc(w)}(C,l.current)&&E)){if(zc(C)){l.current=!0;var T=C.changedTouches||[];T.length&&(a.current=T[0].identifier)}E.focus(),i(tD(E,C,a.current)),y(!0)}},function(S){var C=S.which||S.keyCode;C<37||C>40||(S.preventDefault(),s({left:C===39?.05:C===37?-.05:0,top:C===40?.05:C===38?-.05:0}))},y]},[s,i]),f=u[0],h=u[1],m=u[2];return J.useEffect(function(){return m},[m]),J.createElement("div",Ka({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:o,onKeyDown:h,tabIndex:0,role:"slider"}))}),Hc=function(t){return t.filter(Boolean).join(" ")},w0=function(t){var e=t.color,n=t.left,r=t.top,o=r===void 0?.5:r,i=Hc(["react-colorful__pointer",t.className]);return J.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},J.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},On=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},rD=function(t){return fZ(T0(t))},T0=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?On(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?On(parseInt(t.substring(6,8),16)/255,2):1}},oD=function(t){return dZ(uZ(t))},iD=function(t){var e=t.s,n=t.v,r=t.a,o=(200-e)*n/100;return{h:On(t.h),s:On(o>0&&o<200?e*n/100/(o<=100?o:200-o)*100:0),l:On(o/2),a:On(r,2)}},E0=function(t){var e=iD(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},M0=function(t){var e=iD(t);return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},uZ=function(t){var e=t.h,n=t.s,r=t.v,o=t.a;e=e/360*6,n/=100,r/=100;var i=Math.floor(e),s=r*(1-n),a=r*(1-(e-i)*n),l=r*(1-(1-e+i)*n),u=i%6;return{r:On(255*[r,a,s,s,l,r][u]),g:On(255*[l,r,r,a,s,s][u]),b:On(255*[s,s,l,r,r,a][u]),a:On(o,2)}},Af=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},dZ=function(t){var e=t.r,n=t.g,r=t.b,o=t.a,i=o<1?Af(On(255*o)):"";return"#"+Af(e)+Af(n)+Af(r)+i},fZ=function(t){var e=t.r,n=t.g,r=t.b,o=t.a,i=Math.max(e,n,r),s=i-Math.min(e,n,r),a=s?i===e?(n-r)/s:i===n?2+(r-e)/s:4+(e-n)/s:0;return{h:On(60*(a<0?a+6:a)),s:On(i?s/i*100:0),v:On(i/255*100),a:o}},sD=J.memo(function(t){var e=t.hue,n=t.onChange,r=Hc(["react-colorful__hue",t.className]);return J.createElement("div",{className:r},J.createElement(C0,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:Ya(e+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":On(e),"aria-valuemax":"360","aria-valuemin":"0"},J.createElement(w0,{className:"react-colorful__hue-pointer",left:e/360,color:E0({h:e,s:100,v:100,a:1})})))}),aD=J.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:E0({h:e.h,s:100,v:100,a:1})};return J.createElement("div",{className:"react-colorful__saturation",style:r},J.createElement(C0,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:Ya(e.s+100*o.left,0,100),v:Ya(e.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+On(e.s)+"%, Brightness "+On(e.v)+"%"},J.createElement(w0,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:E0(e)})))}),lD=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},cD=function(t,e){return t.toLowerCase()===e.toLowerCase()||lD(T0(t),T0(e))};function uD(t,e,n){var r=x0(n),o=J.useState(function(){return t.toHsva(e)}),i=o[0],s=o[1],a=J.useRef({color:e,hsva:i});J.useEffect(function(){if(!t.equal(e,a.current.color)){var u=t.toHsva(e);a.current={hsva:u,color:e},s(u)}},[e,t]),J.useEffect(function(){var u;lD(i,a.current.hsva)||t.equal(u=t.fromHsva(i),a.current.color)||(a.current={hsva:i,color:u},r(u))},[i,t,r]);var l=J.useCallback(function(u){s(function(f){return Object.assign({},f,u)})},[]);return[i,l]}var pZ=typeof window<"u"?J.useLayoutEffect:J.useEffect,hZ=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},dD=new Map,fD=function(t){pZ(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!dD.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,dD.set(e,n);var r=hZ();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},mZ=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=v0(t,["className","colorModel","color","onChange"]),a=J.useRef(null);fD(a);var l=uD(n,o,i),u=l[0],f=l[1],h=Hc(["react-colorful",e]);return J.createElement("div",Ka({},s,{ref:a,className:h}),J.createElement(aD,{hsva:u,onChange:f}),J.createElement(sD,{hue:u.h,onChange:f,className:"react-colorful__last-control"}))},gZ={defaultColor:"000",toHsva:rD,fromHsva:function(t){return oD({h:t.h,s:t.s,v:t.v,a:1})},equal:cD},yZ=function(t){return J.createElement(mZ,Ka({},t,{colorModel:gZ}))},bZ=function(t){var e=t.className,n=t.hsva,r=t.onChange,o={backgroundImage:"linear-gradient(90deg, "+M0(Object.assign({},n,{a:0}))+", "+M0(Object.assign({},n,{a:1}))+")"},i=Hc(["react-colorful__alpha",e]),s=On(100*n.a);return J.createElement("div",{className:i},J.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),J.createElement(C0,{onMove:function(a){r({a:a.left})},onKey:function(a){r({a:Ya(n.a+a.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},J.createElement(w0,{className:"react-colorful__alpha-pointer",left:n.a,color:M0(n)})))},vZ=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=v0(t,["className","colorModel","color","onChange"]),a=J.useRef(null);fD(a);var l=uD(n,o,i),u=l[0],f=l[1],h=Hc(["react-colorful",e]);return J.createElement("div",Ka({},s,{ref:a,className:h}),J.createElement(aD,{hsva:u,onChange:f}),J.createElement(sD,{hue:u.h,onChange:f}),J.createElement(bZ,{hsva:u,onChange:f,className:"react-colorful__last-control"}))},xZ={defaultColor:"0001",toHsva:rD,fromHsva:oD,equal:cD},SZ=function(t){return J.createElement(vZ,Ka({},t,{colorModel:xZ}))};function CZ(t){try{return F.rgbToHex(t)}catch{return null}}const O0=J.forwardRef(({value:t,label:e,padding:n,active:r,...o},i)=>{const{classes:s,cx:a,theme:l}=wZ();return v.jsx("button",{ref:i,type:"button",style:{backgroundColor:t,padding:n},"aria-label":e??t,value:t,...o,className:a(s.root,!t&&s.colorNotSet,o.className),children:r&&v.jsx(AB,{fontSize:"small",className:s.activeIcon,style:{color:t?l.palette.getContrastText(t):void 0}})})}),wZ=qt({name:{ColorSwatchButton:O0}})(t=>({root:{height:t.spacing(2.5),width:t.spacing(2.5),minWidth:t.spacing(2.5),borderRadius:t.shape.borderRadius,borderColor:t.palette.mode==="dark"?t.palette.grey[700]:t.palette.grey[400],borderStyle:"solid",borderWidth:1,cursor:"pointer",padding:0,backgroundClip:"content-box"},activeIcon:{height:"100%",width:"80%",verticalAlign:"middle"},colorNotSet:{background:`repeating-conic-gradient(
391
+ ${t.palette.grey[400]} 0% 25%, ${t.palette.common.white} 0% 50%)
392
+ 50% / 12px 12px`,backgroundClip:"content-box"}}));O0.displayName="ColorSwatchButton";const If=$s("ColorPicker",["gradientPicker","colorTextInput","swatchContainer"]),TZ=qt({name:{ColorPicker:pD}})(t=>({gradientPicker:{"&&":{width:"100%"}},colorTextInput:{marginTop:t.spacing(1)},swatchContainer:{display:"flex",flexWrap:"wrap",gap:5,marginTop:t.spacing(1)}}));function pD({value:t,onChange:e,swatchColors:n,colorToHex:r=CZ,disableAlpha:o=!1,labels:i={},classes:s={}}){const{classes:a,cx:l}=TZ(void 0,{props:{classes:s}}),{textFieldPlaceholder:u='Ex: "#7cb5ec"'}=i,f=J.useRef(null);J.useEffect(()=>{f.current&&f.current!==document.activeElement&&(f.current.value=t)},[t]);const h=(n??[]).map(g=>typeof g=="string"?{value:g}:g),m=r(t);return v.jsxs(v.Fragment,{children:[o?v.jsx(yZ,{color:m??"#000000",className:l(If.gradientPicker,a.gradientPicker),onChange:g=>{e(g,"gradient")}}):v.jsx(SZ,{color:m??"#000000",className:l(If.gradientPicker,a.gradientPicker),onChange:g=>{e(g,"gradient")}}),v.jsx(F.TextField,{placeholder:u,variant:"outlined",size:"small",defaultValue:t||"",inputRef:f,spellCheck:!1,className:l(If.colorTextInput,a.colorTextInput),onChange:g=>{const b=g.target.value,y=r(b);y&&e(y,"text")},fullWidth:!0}),h.length>0&&v.jsx("div",{className:l(If.swatchContainer,a.swatchContainer),children:h.map(g=>v.jsx(O0,{value:g.value,label:g.label,onClick:()=>{var b;e((b=g.value)!==null&&b!==void 0?b:"","swatch")},active:g.value==t||!g.value&&!t||!!g.value&&!!m&&r(g.value)===m},g.value))})]})}function EZ({value:t,onCancel:e,onSave:n,swatchColors:r,labels:o={},ColorPickerProps:i}){const{removeColorButton:s="None",removeColorButtonTooltipTitle:a="",cancelButton:l="Cancel",saveButton:u="OK"}=o,[f,h]=J.useState(t);return J.useEffect(()=>{h(t)},[t]),v.jsxs(v.Fragment,{children:[v.jsx(pD,{swatchColors:r,value:f,onChange:m=>{h(m)},labels:o,...i}),v.jsxs(F.Stack,{direction:"row",justifyContent:"space-between",sx:{mt:1},children:[v.jsx(F.Tooltip,{title:a,arrow:!0,children:v.jsx(F.Button,{onClick:()=>{n("")},size:"small",children:s})}),v.jsx(F.Button,{onClick:e,size:"small",children:l}),v.jsx(F.Button,{onClick:()=>{n(f)},size:"small",children:u})]})]})}const MZ=qt({name:{ColorPickerPopper:hD}})(t=>({root:{zIndex:t.zIndex.tooltip,width:235}}));function hD({value:t,onSave:e,onCancel:n,swatchColors:r,ColorPickerProps:o,labels:i,...s}){const{classes:a,cx:l}=MZ();return v.jsx(F.Popper,{transition:!0,placement:"bottom-start",...s,className:l(a.root,s.className),children:({TransitionProps:u})=>v.jsx(F.Fade,{...u,timeout:100,children:v.jsx("div",{children:v.jsx(F.ClickAwayListener,{mouseEvent:"onMouseDown",touchEvent:"onTouchStart",onClickAway:n,children:v.jsx(F.Paper,{elevation:5,sx:{p:2.5,pb:1},children:v.jsx(EZ,{value:t||"",onSave:e,onCancel:n,swatchColors:r,ColorPickerProps:o,labels:i})})})})})})}function OZ({...t}){const e=yt();return v.jsx(ht,{tooltipLabel:"Insert image",IconComponent:MB,disabled:!(e!=null&&e.isEditable)||!e.can().setImage({src:"http://example.com"}),...t})}function kZ(t){const e=yt();return v.jsx(ht,{tooltipLabel:"Insert table",IconComponent:tZ,disabled:!(e!=null&&e.isEditable)||!e.can().insertTable(),onClick:()=>e==null?void 0:e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),...t})}function AZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Blockquote",tooltipShortcutKeys:["mod","Shift","B"],IconComponent:KB,selected:(e=n==null?void 0:n.isActive("blockquote"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleBlockquote(),onClick:()=>n==null?void 0:n.chain().focus().toggleBlockquote().run(),...t})}function IZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Bold",tooltipShortcutKeys:["mod","B"],IconComponent:BB,selected:(e=n==null?void 0:n.isActive("bold"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleBold(),onClick:()=>n==null?void 0:n.chain().focus().toggleBold().run(),...t})}function DZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Bulleted list",tooltipShortcutKeys:["mod","Shift","8"],IconComponent:qB,selected:(e=n==null?void 0:n.isActive("bulletList"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleBulletList(),onClick:()=>n==null?void 0:n.chain().focus().toggleBulletList().run(),...t})}function PZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Code",tooltipShortcutKeys:["mod","E"],IconComponent:_B,selected:(e=n==null?void 0:n.isActive("code"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleCode(),onClick:()=>n==null?void 0:n.chain().focus().toggleCode().run(),...t})}function _Z(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Code block",tooltipShortcutKeys:["mod","Alt","C"],IconComponent:zJ,selected:(e=n==null?void 0:n.isActive("codeBlock"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleCodeBlock(),onClick:()=>n==null?void 0:n.chain().focus().toggleCodeBlock().run(),...t})}const NZ=qt({name:{MenuButtonColorPicker:k0}})(t=>({menuButtonIcon:{fontSize:Vc},colorIndicatorIcon:{position:"absolute"},colorIndicatorIconDisabled:{color:t.palette.action.disabled}}));function k0({value:t,onChange:e,swatchColors:n,labels:r,hideColorIndicator:o=!1,popperId:i,PopperProps:s,ColorPickerProps:a,...l}){const{classes:u,cx:f}=NZ(),[h,m]=J.useState(null),g=()=>{m(null)},{IconComponent:b,children:y,...S}=l;return v.jsxs(v.Fragment,{children:[v.jsx(ht,{onClick:C=>{h?g():m(C.currentTarget)},"aria-describedby":i,...S,children:y??v.jsxs(v.Fragment,{children:[b&&v.jsx(b,{className:u.menuButtonIcon}),!o&&t&&v.jsx(WJ,{className:f(u.menuButtonIcon,u.colorIndicatorIcon,l.disabled&&u.colorIndicatorIconDisabled),style:l.disabled?void 0:{color:t}})]})}),v.jsx(hD,{id:i,open:!!h,anchorEl:h,value:t??"",onSave:C=>{e(C),g()},onCancel:g,swatchColors:n,ColorPickerProps:a,labels:r,...s})]})}function LZ(t){const e=yt(),n=J.useRef(null);return v.jsx(ht,{buttonRef:n,tooltipLabel:"Link",tooltipShortcutKeys:["mod","Shift","U"],IconComponent:tm,selected:e==null?void 0:e.isActive("link"),disabled:!(e!=null&&e.isEditable),onClick:()=>e==null?void 0:e.commands.openLinkBubbleMenu({anchorEl:n.current,placement:"bottom"}),...t})}function $Z({defaultMarkColor:t="#ffff00",...e}){const n=yt(),r=n!=null&&n.isActive("highlight")?n.getAttributes("highlight").color||t:"";return v.jsx(k0,{IconComponent:UJ,tooltipLabel:"Highlight color",tooltipShortcutKeys:["mod","Shift","H"],value:r,onChange:o=>{o?n==null||n.chain().focus().setHighlight({color:o}).run():n==null||n.chain().focus().unsetHighlight().run()},disabled:!(n!=null&&n.isEditable)||!n.can().toggleHighlight(),...e,labels:{removeColorButton:"None",removeColorButtonTooltipTitle:"Remove highlighting from this text",...e.labels}})}function FZ(t){const e=yt();return v.jsx(ht,{tooltipLabel:"Insert horizontal line",IconComponent:ZB,disabled:!(e!=null&&e.isEditable)||!e.can().setHorizontalRule(),onClick:()=>e==null?void 0:e.chain().focus().setHorizontalRule().run(),...t})}function RZ(t,e){const n=so(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];return i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,a=>{s.push(...a.marks)}),s.filter(a=>a.type.name===n.name).map(a=>({...a.attrs}))}function BZ(t,e){const n=bn(e,t.schema),{from:r,to:o}=t.selection,i=[];return t.doc.nodesBetween(r,o,s=>{i.push(s)}),i.reverse().filter(s=>s.type.name===n.name).map(s=>({...s.attrs}))}function Df(t,e){const n=Dc(typeof e=="string"?e:e.name,t.schema);return n==="node"?BZ(t,e):n==="mark"?RZ(t,e):[]}function A0({images:t,editor:e,position:n}){if(!e||e.isDestroyed||t.length===0)return;const r=t.filter(o=>!!o.src).map(o=>({type:e.schema.nodes.image.name,attrs:o}));e.chain().command(({commands:o})=>n==null?o.insertContent(r):o.insertContentAt(n,r)).focus().run()}function VZ(t){return t.toLowerCase().normalize("NFKD").replace(/[^\w\s-]+/g,"").replace(/[-\s]+/g,"-").replace(/^[\s-_]+|[\s-_]+$/g,"")}function zZ({onUploadFiles:t,inputProps:e,insertImages:n=A0,...r}){const o=yt(),i=J.useRef(null),s=async a=>{if(!o||o.isDestroyed||a.length===0)return;const l=await t(Array.from(a));n({editor:o,images:l})};return v.jsxs(v.Fragment,{children:[v.jsx(OZ,{tooltipLabel:"Upload images",onClick:()=>{var a;return(a=i.current)===null||a===void 0?void 0:a.click()},...r}),v.jsx("input",{ref:i,type:"file",accept:"image/*",multiple:!0,onChange:async a=>{a.target.files&&await s(a.target.files),a.target.value=""},style:{display:"none"},...e})]})}function HZ(t){const e=yt();return v.jsx(ht,{tooltipLabel:"Indent",tooltipShortcutKeys:["Tab"],IconComponent:jB,disabled:!(e!=null&&e.isEditable)||!e.can().sinkListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().sinkListItem("listItem").run(),...t})}function jZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Italic",tooltipShortcutKeys:["mod","I"],IconComponent:WB,selected:(e=n==null?void 0:n.isActive("italic"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleItalic(),onClick:()=>n==null?void 0:n.chain().focus().toggleItalic().run(),...t})}function WZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Ordered list",tooltipShortcutKeys:["mod","Shift","7"],IconComponent:UB,selected:(e=n==null?void 0:n.isActive("orderedList"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleOrderedList(),onClick:()=>n==null?void 0:n.chain().focus().toggleOrderedList().run(),...t})}function qZ(t){const e=yt();return v.jsx(ht,{tooltipLabel:"Redo",tooltipShortcutKeys:["mod","Shift","Z"],IconComponent:o5,disabled:!(e!=null&&e.isEditable)||!e.can().redo(),onClick:()=>e==null?void 0:e.chain().focus().redo().run(),...t})}function UZ(t){const e=yt();return v.jsx(ht,{tooltipLabel:"Remove inline formatting",IconComponent:VB,disabled:!(e!=null&&e.isEditable)||!e.can().unsetAllMarks(),onClick:()=>e==null?void 0:e.chain().focus().unsetAllMarks().run(),...t})}function KZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Strikethrough",tooltipShortcutKeys:["mod","Shift","S"],IconComponent:c5,selected:(e=n==null?void 0:n.isActive("strike"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleStrike(),onClick:()=>n==null?void 0:n.chain().focus().toggleStrike().run(),...t})}function YZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Subscript",tooltipShortcutKeys:["mod",","],IconComponent:u5,selected:(e=n==null?void 0:n.isActive("subscript"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleSubscript(),onClick:()=>n==null?void 0:n.chain().focus().toggleSubscript().run(),...t})}function GZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Superscript",tooltipShortcutKeys:["mod","."],IconComponent:d5,selected:(e=n==null?void 0:n.isActive("superscript"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleSuperscript(),onClick:()=>n==null?void 0:n.chain().focus().toggleSuperscript().run(),...t})}function JZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Task checklist",tooltipShortcutKeys:["mod","Shift","9"],IconComponent:IB,selected:(e=n==null?void 0:n.isActive("taskList"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleTaskList(),onClick:()=>n==null?void 0:n.chain().focus().toggleTaskList().run(),...t})}function ZZ({IconComponent:t=qJ,tooltipLabel:e="Text color",defaultTextColor:n="",...r}){const o=yt(),i=o?Df(o.state,"textStyle"):[],s=!!(o!=null&&o.isActive("textStyle")),a=i.map(f=>f.color||n);s||a.push(n);const l=new Set(a).size;let u;return l===1?u=a[0]:l>1?u="":u=n,v.jsx(k0,{IconComponent:t,tooltipLabel:e,value:u,onChange:f=>{o==null||o.chain().focus().setColor(f).run()},disabled:!(o!=null&&o.isEditable)||!o.can().setColor("#000"),...r,labels:{removeColorButton:"Reset",...r.labels}})}function XZ(t){var e;const n=yt();return v.jsx(ht,{tooltipLabel:"Underline",tooltipShortcutKeys:["mod","U"],IconComponent:GB,selected:(e=n==null?void 0:n.isActive("underline"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleUnderline(),onClick:()=>n==null?void 0:n.chain().focus().toggleUnderline().run(),...t})}function QZ(t){const e=yt();return v.jsx(ht,{tooltipLabel:"Undo",tooltipShortcutKeys:["mod","Z"],IconComponent:f5,disabled:!(e!=null&&e.isEditable)||!e.can().undo(),onClick:()=>e==null?void 0:e.chain().focus().undo().run(),...t})}function eX(t){const e=yt();return v.jsx(ht,{tooltipLabel:"Unindent",tooltipShortcutKeys:["Shift","Tab"],IconComponent:HB,disabled:!(e!=null&&e.isEditable)||!e.can().liftListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().liftListItem("listItem").run(),...t})}const tX=qt({name:{MenuSelect:jc}})(t=>({rootTooltipWrapper:{display:"inline-flex"},selectRoot:{[`&:not(:hover):not(.${F.outlinedInputClasses.focused}) .${F.outlinedInputClasses.notchedOutline}`]:{borderWidth:0},[`& .${F.svgIconClasses.root}`]:{color:t.palette.action.active},[`&.${F.selectClasses.disabled} .${F.svgIconClasses.root}`]:{color:t.palette.action.disabled}},select:{"&&&":{paddingLeft:t.spacing(1),paddingRight:t.spacing(3)}},selectDropdownIcon:{right:1},input:{paddingTop:"3px",paddingBottom:"3px",fontSize:"0.9em"}}));function jc({tooltipTitle:t,...e}){var n,r,o;const{classes:i,cx:s}=tX(),[a,l]=J.useState(!1),u=v.jsx(F.Select,{margin:"none",variant:"outlined",size:"small",...e,onMouseEnter:(...f)=>{var h;l(!0),(h=e.onMouseEnter)===null||h===void 0||h.call(e,...f)},onMouseLeave:(...f)=>{var h;l(!1),(h=e.onMouseLeave)===null||h===void 0||h.call(e,...f)},onClick:(...f)=>{var h;l(!1),(h=e.onClick)===null||h===void 0||h.call(e,...f)},onOpen:(...f)=>{var h;l(!1),(h=e.onOpen)===null||h===void 0||h.call(e,...f)},inputProps:{...e.inputProps,className:s(i.input,(n=e.inputProps)===null||n===void 0?void 0:n.className)},MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},...e.MenuProps},className:s(i.selectRoot,e.className),classes:{...e.classes,select:s(i.select,(r=e.classes)===null||r===void 0?void 0:r.select),icon:s(i.selectDropdownIcon,(o=e.classes)===null||o===void 0?void 0:o.icon)}});return t?v.jsx(ao,{label:t,contentWrapperClassName:i.rootTooltipWrapper,open:a,children:u}):u}const nX=qt({name:{MenuSelectFontFamily:mD}})({selectInput:{width:55}}),I0="MULTIPLE";function mD({options:t,hideUnsetOption:e=!1,unsetOptionLabel:n="Default",emptyLabel:r="Font",...o}){var i;const{classes:s,cx:a}=nX(),l=yt(),u=l?Df(l.state,"textStyle"):[],f=!!(l!=null&&l.isActive("textStyle")),h=u.map(b=>{var y;return(y=b.fontFamily)!==null&&y!==void 0?y:""});f||h.push("");const m=new Set(h).size;let g;return m===1?g=h[0]:m>1?g=I0:g="",v.jsxs(jc,{onChange:b=>{const y=b.target.value;y?l==null||l.chain().setFontFamily(y).focus().run():l==null||l.chain().unsetFontFamily().focus().run()},disabled:!(l!=null&&l.isEditable)||!l.can().setFontFamily("serif"),renderValue:b=>{var y,S;return!b||b===I0?r:(S=(y=t.find(C=>C.value===b))===null||y===void 0?void 0:y.label)!==null&&S!==void 0?S:b},displayEmpty:!0,"aria-label":"Font families",tooltipTitle:"Font",...o,value:g||"",inputProps:{...o.inputProps,className:a(s.selectInput,(i=o.inputProps)===null||i===void 0?void 0:i.className)},children:[!e&&v.jsx(F.MenuItem,{value:"",children:n}),v.jsx(F.MenuItem,{style:{display:"none"},value:I0}),t.map(b=>{var y;return v.jsx(F.MenuItem,{value:b.value,children:v.jsx("span",{style:{fontFamily:b.value},children:(y=b.label)!==null&&y!==void 0?y:b.value})},b.value)})]})}const rX=qt({name:{MenuSelectFontSize:yD}})({selectInput:{width:17,display:"flex",alignItems:"center"},fontSizeIcon:{fontSize:Vc}}),oX=["8px","9px","10px","11px","12px","14px","16px","18px","24px","30px","36px","48px","60px","72px","96px"];function gD(t){return t.replace("px","")}const D0="MULTIPLE";function yD({options:t=oX,sizeOptions:e,hideUnsetOption:n=!1,unsetOptionLabel:r="Default",unsetOptionContent:o,emptyLabel:i,emptyValue:s,...a}){var l;const{classes:u,cx:f}=rX(),h=yt();i=s??i,r=o??r,t=e??t;const m=(t??[]).map(E=>typeof E=="string"?{value:E}:E),g=h?Df(h.state,"textStyle"):[],b=!!(h!=null&&h.isActive("textStyle")),y=g.map(E=>{var T;return(T=E.fontSize)!==null&&T!==void 0?T:""});b||y.push("");const S=new Set(y).size;let C;return S===1?C=y[0]:S>1?C=D0:C="",v.jsxs(jc,{onChange:E=>{const T=E.target.value;T?h==null||h.chain().setFontSize(T).focus().run():h==null||h.chain().unsetFontSize().focus().run()},disabled:!(h!=null&&h.isEditable)||!h.can().setFontSize("12px"),renderValue:E=>!E||E===D0?i??v.jsx(YB,{className:u.fontSizeIcon}):gD(E),displayEmpty:!0,"aria-label":"Font sizes",tooltipTitle:"Font size",...a,value:C||"",inputProps:{...a.inputProps,className:f(u.selectInput,(l=a.inputProps)===null||l===void 0?void 0:l.className)},children:[!n&&v.jsx(F.MenuItem,{value:"",children:r}),v.jsx(F.MenuItem,{style:{display:"none"},value:D0}),m.map(E=>{var T;return v.jsx(F.MenuItem,{value:E.value,children:(T=E.label)!==null&&T!==void 0?T:gD(E.value)},E.value)})]})}const iX=qt({name:{MenuSelectHeading:xD}})(t=>{const e=GI(t);return{selectInput:{width:77},menuOption:{display:"block",width:"100%"},headingOption:{marginBlockStart:0,marginBlockEnd:0,fontWeight:"bold"},headingOption1:{fontSize:e["& h1"].fontSize},headingOption2:{fontSize:e["& h2"].fontSize},headingOption3:{fontSize:e["& h3"].fontSize},headingOption4:{fontSize:e["& h4"].fontSize},headingOption5:{fontSize:e["& h5"].fontSize},headingOption6:{fontSize:e["& h6"].fontSize}}}),bt={Paragraph:"Paragraph",Heading1:"Heading 1",Heading2:"Heading 2",Heading3:"Heading 3",Heading4:"Heading 4",Heading5:"Heading 5",Heading6:"Heading 6"},bD={[bt.Heading1]:1,[bt.Heading2]:2,[bt.Heading3]:3,[bt.Heading4]:4,[bt.Heading5]:5,[bt.Heading6]:6},vD={1:bt.Heading1,2:bt.Heading2,3:bt.Heading3,4:bt.Heading4,5:bt.Heading5,6:bt.Heading6};function xD({labels:t,hideShortcuts:e=!1,...n}){var r,o,i,s,a,l,u,f;const{classes:h,cx:m}=iX(),g=yt(),b=J.useCallback(N=>{const D=N.target.value;D===bt.Paragraph?g==null||g.chain().setParagraph().focus().run():D in bD&&(g==null||g.chain().setHeading({level:bD[D]}).focus().run())},[g]);let y="",S;if(g!=null&&g.isActive("paragraph"))y=bt.Paragraph;else if(g!=null&&g.isActive("heading")){const D=Df(g.state,"heading").map(k=>k.level);S=new Set(D).size===1?D[0]:void 0,S&&S in vD&&(y=vD[S])}const C=y!=="",E=!!(g!=null&&g.can().setParagraph()),T=J.useMemo(()=>{var N;const D=g==null?void 0:g.extensionManager.extensions.find(L=>L.name=="heading");return new Set((N=D==null?void 0:D.options.levels)!==null&&N!==void 0?N:[])},[g]),w=T.values().next(),O=w.done?void 0:w.value,A=O!==void 0&&(S===O||!!(g!=null&&g.can().setHeading({level:O})));return v.jsxs(jc,{onChange:b,disabled:!(g!=null&&g.isEditable)||!C&&!E&&!A,displayEmpty:!0,renderValue:N=>{var D,L;let k;return N===""?k=(L=(D=t==null?void 0:t.emptyValue)!==null&&D!==void 0?D:t==null?void 0:t.empty)!==null&&L!==void 0?L:v.jsx("em",{children:"Change to…"}):N===bt.Paragraph?k=t==null?void 0:t.paragraph:N===bt.Heading1?k=t==null?void 0:t.heading1:N===bt.Heading2?k=t==null?void 0:t.heading2:N===bt.Heading3?k=t==null?void 0:t.heading3:N===bt.Heading4?k=t==null?void 0:t.heading4:N===bt.Heading5?k=t==null?void 0:t.heading5:N===bt.Heading6&&(k=t==null?void 0:t.heading6),k??N},"aria-label":"Text headings",tooltipTitle:"Styles",...n,value:y,inputProps:{...n.inputProps,className:m(h.selectInput,(r=n.inputProps)===null||r===void 0?void 0:r.className)},children:[v.jsx(F.MenuItem,{value:bt.Paragraph,disabled:!C&&!E,children:v.jsx(ao,{label:"",shortcutKeys:e?void 0:["mod","alt","0"],placement:"right",contentWrapperClassName:h.menuOption,children:(o=t==null?void 0:t.paragraph)!==null&&o!==void 0?o:bt.Paragraph})}),T.has(1)&&v.jsx(F.MenuItem,{value:bt.Heading1,disabled:!A,children:v.jsx(ao,{label:"",shortcutKeys:e?void 0:["mod","alt","1"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption1),children:(i=t==null?void 0:t.heading1)!==null&&i!==void 0?i:bt.Heading1})}),T.has(2)&&v.jsx(F.MenuItem,{value:bt.Heading2,disabled:!A,children:v.jsx(ao,{label:"",shortcutKeys:e?void 0:["mod","alt","2"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption2),children:(s=t==null?void 0:t.heading2)!==null&&s!==void 0?s:bt.Heading2})}),T.has(3)&&v.jsx(F.MenuItem,{value:bt.Heading3,disabled:!A,children:v.jsx(ao,{label:"",shortcutKeys:e?void 0:["mod","alt","3"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption3),children:(a=t==null?void 0:t.heading3)!==null&&a!==void 0?a:bt.Heading3})}),T.has(4)&&v.jsx(F.MenuItem,{value:bt.Heading4,disabled:!A,children:v.jsx(ao,{label:"",shortcutKeys:e?void 0:["mod","alt","4"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption4),children:(l=t==null?void 0:t.heading4)!==null&&l!==void 0?l:bt.Heading4})}),T.has(5)&&v.jsx(F.MenuItem,{value:bt.Heading5,disabled:!A,children:v.jsx(ao,{label:"",shortcutKeys:e?void 0:["mod","alt","5"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption5),children:(u=t==null?void 0:t.heading5)!==null&&u!==void 0?u:bt.Heading5})}),T.has(6)&&v.jsx(F.MenuItem,{value:bt.Heading6,disabled:!A,children:v.jsx(ao,{label:"",shortcutKeys:e?void 0:["mod","alt","6"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption6),children:(f=t==null?void 0:t.heading6)!==null&&f!==void 0?f:bt.Heading6})})]})}const sX=qt({name:{MenuSelectTextAlign:SD}})(t=>({selectInput:{width:Vc},menuItem:{paddingLeft:0,paddingRight:0},menuOption:{display:"flex",width:"100%",justifyContent:"center"},menuButtonIcon:{fontSize:Vc,color:t.palette.action.active}})),aX=[{value:"left",label:"Left",shortcutKeys:["mod","Shift","L"],IconComponent:FB},{value:"center",label:"Center",shortcutKeys:["mod","Shift","E"],IconComponent:LB},{value:"right",label:"Right",shortcutKeys:["mod","Shift","R"],IconComponent:RB},{value:"justify",label:"Justify",shortcutKeys:["mod","Shift","J"],IconComponent:$B}];function SD({options:t=aX,emptyLabel:e="",alignmentOptions:n,...r}){var o,i,s;const{classes:a,cx:l}=sX(),u=yt();t=(o=n==null?void 0:n.map(b=>({...b,value:b.alignment})))!==null&&o!==void 0?o:t;const f=J.useCallback(b=>{const y=b.target.value;u==null||u.chain().setTextAlign(y).focus().run()},[u]),h=J.useMemo(()=>{const b=u==null?void 0:u.extensionManager.extensions.find(y=>y.name=="textAlign");return b==null?void 0:b.options},[u]),m=J.useMemo(()=>new Set(h==null?void 0:h.alignments),[h]),g=(i=Array.from(m).find(b=>u==null?void 0:u.isActive({textAlign:b})))!==null&&i!==void 0?i:"";return v.jsx(jc,{onChange:f,disabled:!(u!=null&&u.isEditable)||!Array.from(m).some(b=>u.can().setTextAlign(b)),renderValue:b=>{let y;if(b){const S=t.find(C=>C.value===b);y=S?v.jsx(S.IconComponent,{className:a.menuButtonIcon}):b}else y=e;return v.jsx("span",{className:a.menuOption,children:y})},"aria-label":"Text alignments",tooltipTitle:"Align",value:g,displayEmpty:!0,...r,inputProps:{...r.inputProps,className:l(a.selectInput,(s=r.inputProps)===null||s===void 0?void 0:s.className)},children:t.filter(b=>m.has(b.value)).map(b=>{var y;return v.jsx(F.MenuItem,{value:b.value,disabled:!(u!=null&&u.can().setTextAlign(b.value)),className:a.menuItem,children:v.jsx(ao,{label:(y=b.label)!==null&&y!==void 0?y:"",shortcutKeys:b.shortcutKeys,placement:"right",contentWrapperClassName:a.menuOption,children:v.jsx(b.IconComponent,{className:a.menuButtonIcon})})},b.value)})})}const lX=on.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replace(/['"]+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),CD=en.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,gt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>ry({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),cX=qt({name:{HeadingWithAnchorComponent:wD},uniqId:"kNc4LD"})((t,e,n)=>({root:{[`&:hover .${n.link}`]:{opacity:100}},container:{display:"inline-block",position:"relative"},link:{position:"absolute",left:-21,color:`${t.palette.text.secondary} !important`,opacity:0,transition:t.transitions.create("opacity"),textDecoration:"none",outline:"none",[t.breakpoints.down("sm")]:{left:-18},'.ProseMirror[contenteditable="true"] &':{display:"none"}},linkIcon:{transform:"rotate(-45deg)",fontSize:"1.25rem",[t.breakpoints.down("sm")]:{fontSize:"1.15rem"}}})),Pf=$s("HeadingWithAnchorComponent",["root","container","link","linkIcon"]);function wD({editor:t,node:e,extension:n}){const{classes:r,cx:o}=cX(),a=`h${n.options.levels.includes(e.attrs.level)?e.attrs.level:n.options.levels[0]}`,l=J.useMemo(()=>Yg(t.schema),[t.schema]),u=VZ(WO(e,{textSerializers:l}));return v.jsx(f0,{as:a,id:u,...n.options.HTMLAttributes,className:o(Pf.root,r.root),style:{textAlign:e.attrs.textAlign},children:v.jsxs("span",{className:o(Pf.container,r.container),children:[v.jsx("a",{href:`#${u}`,contentEditable:!1,className:o(Pf.link,r.link),children:v.jsx(tm,{className:o(Pf.linkIcon,r.linkIcon)})}),v.jsx(DJ,{as:"span"})]})})}const uX=CD.extend({addOptions(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),scrollToAnchorOnMount:!0}},onCreate(){this.options.scrollToAnchorOnMount&&setTimeout(()=>{dX(this.editor)})},addNodeView(){return p0(wD)}});function dX(t){if(t.isDestroyed||!("heading"in t.storage))return;const n=window.location.hash.slice(1);if(!n)return;const r=window.document.getElementById(n);r&&t.options.element.contains(r)&&r.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}const fX=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,pX=en.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",gt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[GO({find:fX,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),hX=qt({name:{ResizableImageResizer:TD}})(t=>({root:{position:"absolute",bottom:-3,right:-3,width:12,height:12,background:t.palette.primary.main,cursor:"nwse-resize"}}));function TD({onResize:t,className:e,mouseDown:n,setMouseDown:r}){const{classes:o,cx:i}=hX();J.useEffect(()=>{if(!n)return;const a=l=>{t(l)};return window.addEventListener("mousemove",a),()=>{window.removeEventListener("mousemove",a)}},[n,t]),J.useEffect(()=>{const a=()=>{r(!1)};return window.addEventListener("mouseup",a),()=>{window.removeEventListener("mouseup",a)}},[r]);const s=J.useCallback(a=>{r(!0)},[r]);return v.jsx("div",{className:i(o.root,e),onMouseDown:s})}const mX=15,gX=qt({name:{ResizableImageComponent:ED}})(t=>({imageContainer:{display:"inline-flex",position:"relative"},image:{display:"block"},imageSelected:{outline:`3px solid ${t.palette.primary.main}`},resizer:{'.ProseMirror[contenteditable="false"] &':{display:"none"}}}));function ED(t){var e;const{node:n,selected:r,updateAttributes:o,extension:i}=t,{classes:s,cx:a}=gX(),{attrs:l}=n,u=J.useRef(null),[f,h]=J.useState(!1),m=r||f,g=J.useMemo(()=>AC(y=>{if(!u.current)return;const S=u.current.getBoundingClientRect(),C=y.clientX-S.x,E=y.clientY-S.y,T=Math.max(C,S.width/S.height*E,mX);o({width:Math.round(T)})},50,{trailing:!0}),[o]),b=i.options.ChildComponent;return v.jsx(f0,{style:{textAlign:l.textAlign,width:"100%"},as:i.options.inline?"span":"div",children:v.jsxs("div",{className:s.imageContainer,children:[v.jsx("img",{ref:u,src:l.src,height:"auto",width:l.width?l.width:void 0,alt:l.alt||void 0,title:l.title||void 0,className:a(s.image,m&&"ProseMirror-selectednode",m&&s.imageSelected),style:{maxWidth:l.width?void 0:"auto",aspectRatio:(e=l.aspectRatio)!==null&&e!==void 0?e:void 0},"data-drag-handle":!0,onLoad:y=>{const S={};l.width||(S.width=y.currentTarget.naturalWidth),l.aspectRatio||(S.aspectRatio=String(y.currentTarget.naturalWidth/y.currentTarget.naturalHeight)),(S.width||S.aspectRatio)&&o(S)}}),m&&v.jsx(TD,{onResize:g,className:s.resizer,mouseDown:f,setMouseDown:h}),b&&v.jsx(b,{...t})]})})}const yX=pX.extend({addOptions(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),isAllowedImgSrc:e=>!!e}},addAttributes(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),width:{default:null,renderHTML:e=>({width:e.width}),parseHTML:e=>e.getAttribute("width")},aspectRatio:{default:null,renderHTML:e=>e.aspectRatio?{style:`aspect-ratio: ${e.aspectRatio}`}:{},parseHTML:e=>e.style.aspectRatio}}},renderHTML({HTMLAttributes:t}){return["img",gt({height:"auto"},this.options.HTMLAttributes,t)]},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])',getAttrs:t=>{if(!(t instanceof Element))return!1;const e=t.getAttribute("src");return this.options.isAllowedImgSrc(e)&&null}}]},addInputRules(){var t;const e=(t=this.parent)===null||t===void 0?void 0:t.call(this);if(!e)return[];const n=r=>{const[,,o,i,s]=r;return{src:i,alt:o,title:s}};return e.map(r=>new kc({find:r.find,handler:o=>{const i=n(o.match);if(this.options.isAllowedImgSrc(i.src))return r.handler(o)}}))},addNodeView(){return p0(ED)}});var P0,_0;if(typeof WeakMap<"u"){let t=new WeakMap;P0=e=>t.get(e),_0=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;P0=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},_0=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var sn=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let i=r+1,s=o+1;for(let a=1;i<this.width&&this.map[e+a]==n;a++)i++;for(let a=1;s<this.height&&this.map[e+this.width*a]==n;a++)s++;return{left:r,top:o,right:i,bottom:s}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:i,bottom:s}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?i==0:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:s,right:a,top:l,bottom:u}=this.findCell(e);return{left:Math.min(n,s),top:Math.min(o,l),right:Math.max(r,a),bottom:Math.max(i,u)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,!(o==t.left&&o&&this.map[i-1]==s||r==t.top&&r&&this.map[i-this.width]==s)&&e.push(s))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==t){let s=e+t*this.width;const a=(t+1)*this.width;for(;s<a&&this.map[s]<o;)s++;return s==a?i-1:this.map[s]}o=i}}static get(t){return P0(t)||_0(t,bX(t))}};function bX(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=vX(t),n=t.childCount,r=[];let o=0,i=null;const s=[];for(let u=0,f=e*n;u<f;u++)r[u]=0;for(let u=0,f=0;u<n;u++){const h=t.child(u);f++;for(let b=0;;b++){for(;o<r.length&&r[o]!=0;)o++;if(b==h.childCount)break;const y=h.child(b),{colspan:S,rowspan:C,colwidth:E}=y.attrs;for(let T=0;T<C;T++){if(T+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:f,n:C-T});break}const w=o+T*e;for(let O=0;O<S;O++){r[w+O]==0?r[w+O]=f:(i||(i=[])).push({type:"collision",row:u,pos:f,n:S-O});const A=E&&E[O];if(A){const N=(w+O)%e*2,D=s[N];D==null||D!=A&&s[N+1]==1?(s[N]=A,s[N+1]=1):D==A&&s[N+1]++}}}o+=S,f+=y.nodeSize}const m=(u+1)*e;let g=0;for(;o<m;)r[o++]==0&&g++;g&&(i||(i=[])).push({type:"missing",row:u,n:g}),f++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const a=new sn(e,n,r,i);let l=!1;for(let u=0;!l&&u<s.length;u+=2)s[u]!=null&&s[u+1]<n&&(l=!0);return l&&xX(a,s,t),a}function vX(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let i=0;if(n)for(let s=0;s<r;s++){const a=t.child(s);for(let l=0;l<a.childCount;l++){const u=a.child(l);s+u.attrs.rowspan>r&&(i+=u.attrs.colspan)}}for(let s=0;s<o.childCount;s++){const a=o.child(s);i+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function xX(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const i=t.map[o];if(r[i])continue;r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let a=null;const l=s.attrs;for(let u=0;u<l.colspan;u++){const f=(o+u)%t.width,h=e[f*2];h!=null&&(!l.colwidth||l.colwidth[u]!=h)&&((a||(a=SX(l)))[u]=h)}a&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}function SX(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function Wn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}var Hi=new yn("selectingCells");function Ga(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function CX(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function lo(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function _f(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Ga(e.$head)||wX(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function wX(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function N0(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function TX(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function L0(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function MD(t,e,n){const r=t.node(-1),o=sn.get(r),i=t.start(-1),s=o.nextCell(t.pos-i,e,n);return s==null?null:t.node(0).resolve(i+s)}function Rs(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function OD(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function EX(t,e,n){const r=Wn(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var Vt=class pi extends Xe{constructor(e,n=e){const r=e.node(-1),o=sn.get(r),i=e.start(-1),s=o.rectBetween(e.pos-i,n.pos-i),a=e.node(0),l=o.cellsInRect(s).filter(f=>f!=n.pos-i);l.unshift(n.pos-i);const u=l.map(f=>{const h=r.nodeAt(f);if(!h)throw RangeError(`No cell with offset ${f} found`);const m=i+f+1;return new tM(a.resolve(m),a.resolve(m+h.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(N0(r)&&N0(o)&&L0(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?pi.rowSelection(r,o):i&&this.isColSelection()?pi.colSelection(r,o):new pi(r,o)}return Je.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=sn.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let l=o.top;l<o.bottom;l++){const u=[];for(let f=l*n.width+o.left,h=o.left;h<o.right;h++,f++){const m=n.map[f];if(i[m])continue;i[m]=!0;const g=n.findCell(m);let b=e.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);const y=o.left-g.left,S=g.right-o.right;if(y>0||S>0){let C=b.attrs;if(y>0&&(C=Rs(C,0,y)),S>0&&(C=Rs(C,C.colspan-S,S)),g.left<o.left){if(b=b.type.createAndFill(C),!b)throw RangeError(`Could not create cell with attrs ${JSON.stringify(C)}`)}else b=b.type.create(C,b.content)}if(g.top<o.top||g.bottom>o.bottom){const C={...b.attrs,rowspan:Math.min(g.bottom,o.bottom)-Math.max(g.top,o.top)};g.top<o.top?b=b.type.createAndFill(C):b=b.type.create(C,b.content)}u.push(b)}s.push(e.child(l).copy(Te.from(u)))}const a=this.isColSelection()&&this.isRowSelection()?e:s;return new Ie(Te.from(a),1,1)}replace(e,n=Ie.empty){const r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){const{$from:a,$to:l}=o[s],u=e.mapping.slice(r);e.replace(u.map(a.pos),u.map(l.pos),s?Ie.empty:n)}const i=Xe.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Ie(Te.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=sn.get(n),o=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let s=0;s<i.length;s++)e(n.nodeAt(i[s]),o+i[s])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=sn.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.top<=a.top?(s.top>0&&(e=l.resolve(i+o.map[s.left])),a.bottom<o.height&&(n=l.resolve(i+o.map[o.width*(o.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(i+o.map[a.left])),s.bottom<o.height&&(e=l.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))),new pi(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=sn.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),i=n.colCount(this.$headCell.pos-r);if(Math.min(o,i)>0)return!1;const s=o+this.$anchorCell.nodeAfter.attrs.colspan,a=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(e){return e instanceof pi&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=sn.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.left<=a.left?(s.left>0&&(e=l.resolve(i+o.map[s.top*o.width])),a.right<o.width&&(n=l.resolve(i+o.map[o.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(i+o.map[a.top*o.width])),s.right<o.width&&(e=l.resolve(i+o.map[o.width*(s.top+1)-1]))),new pi(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new pi(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new pi(e.resolve(n),e.resolve(r))}getBookmark(){return new MX(this.$anchorCell.pos,this.$headCell.pos)}};Vt.prototype.visible=!1,Xe.jsonID("cell",Vt);var MX=class e${constructor(e,n){this.anchor=e,this.head=n}map(e){return new e$(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&L0(n,r)?new Vt(n,r):Xe.near(r,1)}};function OX(t){if(!(t.selection instanceof Vt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(_n.node(r,r+n.nodeSize,{class:"selectedCell"}))}),Jt.create(t.doc,e)}function kX({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function AX({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=e.depth;o>0;o--){const i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&e.parentOffset===0}function IX(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,s;if(r instanceof Ke&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=Vt.create(o,r.from);else if(s=="row"){const a=o.resolve(r.from+1);i=Vt.rowSelection(a,a)}else if(!n){const a=sn.get(r.node),l=r.from+1,u=l+a.map[a.width*a.height-1];i=Vt.create(o,l+1,u)}}else r instanceof Je&&kX(r)?i=Je.create(o,r.from):r instanceof Je&&AX(r)&&(i=Je.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var DX=new yn("fix-tables");function kD(t,e,n,r){const o=t.childCount,i=e.childCount;e:for(let s=0,a=0;s<i;s++){const l=e.child(s);for(let u=a,f=Math.min(o,s+3);u<f;u++)if(t.child(u)==l){a=u+1,n+=l.nodeSize;continue e}r(l,n),a<o&&t.child(a).sameMarkup(l)?kD(t.child(a),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function AD(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=PX(t,o,i,n))};return e?e.doc!=t.doc&&kD(e.doc,t.doc,0,r):t.doc.descendants(r),n}function PX(t,e,n,r){const o=sn.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let l=0;l<o.height;l++)i.push(0);for(let l=0;l<o.problems.length;l++){const u=o.problems[l];if(u.type=="collision"){const f=e.nodeAt(u.pos);if(!f)continue;const h=f.attrs;for(let m=0;m<h.rowspan;m++)i[u.row+m]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Rs(h,h.colspan-u.n,u.n))}else if(u.type=="missing")i[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const f=e.nodeAt(u.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...f.attrs,rowspan:f.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const f=e.nodeAt(u.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...f.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){const f=r.mapping.map(n);r.delete(f,f+e.nodeSize)}}let s,a;for(let l=0;l<i.length;l++)i[l]&&(s==null&&(s=l),a=l);for(let l=0,u=n+1;l<o.height;l++){const f=e.child(l),h=u+f.nodeSize,m=i[l];if(m>0){let g="cell";f.firstChild&&(g=f.firstChild.type.spec.tableRole);const b=[];for(let S=0;S<m;S++){const C=Wn(t.schema)[g].createAndFill();C&&b.push(C)}const y=(l==0||s==l-1)&&a==l?u+1:h-1;r.insert(r.mapping.map(y),b)}u=h}return r.setMeta(DX,{fixTables:!0})}function ko(t){const e=t.selection,n=_f(t),r=n.node(-1),o=n.start(-1),i=sn.get(r);return{...e instanceof Vt?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function ID(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;EX(e,r,o+i)&&(i=o==0||o==e.width?null:0);for(let s=0;s<e.height;s++){const a=s*e.width+o;if(o>0&&o<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],u=r.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,OD(u.attrs,o-e.colCount(l))),s+=u.attrs.rowspan-1}else{const l=i==null?Wn(r.type.schema).cell:r.nodeAt(e.map[a+i]).type,u=e.positionAt(s,o,r);t.insert(t.mapping.map(n+u),l.createAndFill())}}return t}function _X(t,e){if(!lo(t))return!1;if(e){const n=ko(t);e(ID(t.tr,n,n.left))}return!0}function NX(t,e){if(!lo(t))return!1;if(e){const n=ko(t);e(ID(t.tr,n,n.right))}return!0}function LX(t,{map:e,table:n,tableStart:r},o){const i=t.mapping.maps.length;for(let s=0;s<e.height;){const a=s*e.width+o,l=e.map[a],u=n.nodeAt(l),f=u.attrs;if(o>0&&e.map[a-1]==l||o<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(i).map(r+l),null,Rs(f,o-e.colCount(l)));else{const h=t.mapping.slice(i).map(r+l);t.delete(h,h+u.nodeSize)}s+=f.rowspan}}function $X(t,e){if(!lo(t))return!1;if(e){const n=ko(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;LX(r,n,o),o!=n.left;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=sn.get(i)}e(r)}return!0}function FX(t,e,n){var r;const o=Wn(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((r=e.nodeAt(t.map[i+n*t.width]))==null?void 0:r.type)!=o)return!1;return!0}function DD(t,{map:e,tableStart:n,table:r},o){var i;let s=n;for(let u=0;u<o;u++)s+=r.child(u).nodeSize;const a=[];let l=o>0?-1:0;FX(e,r,o+l)&&(l=o==0||o==e.height?null:0);for(let u=0,f=e.width*o;u<e.width;u++,f++)if(o>0&&o<e.height&&e.map[f]==e.map[f-e.width]){const h=e.map[f],m=r.nodeAt(h).attrs;t.setNodeMarkup(n+h,null,{...m,rowspan:m.rowspan+1}),u+=m.colspan-1}else{const h=l==null?Wn(r.type.schema).cell:(i=r.nodeAt(e.map[f+l*e.width]))==null?void 0:i.type,m=h==null?void 0:h.createAndFill();m&&a.push(m)}return t.insert(s,Wn(r.type.schema).row.create(null,a)),t}function RX(t,e){if(!lo(t))return!1;if(e){const n=ko(t);e(DD(t.tr,n,n.top))}return!0}function BX(t,e){if(!lo(t))return!1;if(e){const n=ko(t);e(DD(t.tr,n,n.bottom))}return!0}function VX(t,{map:e,table:n,tableStart:r},o){let i=0;for(let u=0;u<o;u++)i+=n.child(u).nodeSize;const s=i+n.child(o).nodeSize,a=t.mapping.maps.length;t.delete(i+r,s+r);const l=new Set;for(let u=0,f=o*e.width;u<e.width;u++,f++){const h=e.map[f];if(!l.has(h)){if(l.add(h),o>0&&h==e.map[f-e.width]){const m=n.nodeAt(h).attrs;t.setNodeMarkup(t.mapping.slice(a).map(h+r),null,{...m,rowspan:m.rowspan-1}),u+=m.colspan-1}else if(o<e.height&&h==e.map[f+e.width]){const m=n.nodeAt(h),g=m.attrs,b=m.type.create({...g,rowspan:m.attrs.rowspan-1},m.content),y=e.positionAt(o+1,u,n);t.insert(t.mapping.slice(a).map(r+y),b),u+=g.colspan-1}}}}function zX(t,e){if(!lo(t))return!1;if(e){const n=ko(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;VX(r,n,o),o!=n.top;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=sn.get(n.table)}e(r)}return!0}function PD(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function HX({width:t,height:e,map:n},r){let o=r.top*t+r.left,i=o,s=(r.bottom-1)*t+r.left,a=o+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[i]==n[i-1]||r.right<t&&n[a]==n[a+1])return!0;i+=t,a+=t}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[s]==n[s+t])return!0;o++,s++}return!1}function _D(t,e){const n=t.selection;if(!(n instanceof Vt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=ko(t),{map:o}=r;if(HX(o,r))return!1;if(e){const i=t.tr,s={};let a=Te.empty,l,u;for(let f=r.top;f<r.bottom;f++)for(let h=r.left;h<r.right;h++){const m=o.map[f*o.width+h],g=r.table.nodeAt(m);if(!(s[m]||!g))if(s[m]=!0,l==null)l=m,u=g;else{PD(g)||(a=a.append(g.content));const b=i.mapping.map(m+r.tableStart);i.delete(b,b+g.nodeSize)}}if(l==null||u==null)return!0;if(i.setNodeMarkup(l+r.tableStart,null,{...OD(u.attrs,u.attrs.colspan,r.right-r.left-u.attrs.colspan),rowspan:r.bottom-r.top}),a.size){const f=l+1+u.content.size,h=PD(u)?l+1:f;i.replaceWith(h+r.tableStart,f+r.tableStart,a)}i.setSelection(new Vt(i.doc.resolve(l+r.tableStart))),e(i)}return!0}function ND(t,e){const n=Wn(t.schema);return jX(({node:r})=>n[r.type.spec.tableRole])(t,e)}function jX(t){return(e,n)=>{var r;const o=e.selection;let i,s;if(o instanceof Vt){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,s=o.$anchorCell.pos}else{if(i=CX(o.$from),!i)return!1;s=(r=Ga(o.$from))==null?void 0:r.pos}if(i==null||s==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let a=i.attrs;const l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const f=ko(e),h=e.tr;for(let g=0;g<f.right-f.left;g++)l.push(u?{...a,colwidth:u&&u[g]?[u[g]]:null}:a);let m;for(let g=f.top;g<f.bottom;g++){let b=f.map.positionAt(g,f.left,f.table);g==f.top&&(b+=i.nodeSize);for(let y=f.left,S=0;y<f.right;y++,S++)y==f.left&&g==f.top||h.insert(m=h.mapping.map(b+f.tableStart,1),t({node:i,row:g,col:y}).createAndFill(l[S]))}h.setNodeMarkup(s,t({node:i,row:f.top,col:f.left}),l[0]),o instanceof Vt&&h.setSelection(new Vt(h.doc.resolve(o.$anchorCell.pos),m?h.doc.resolve(m):void 0)),n(h)}return!0}}function WX(t,e){return function(n,r){if(!lo(n))return!1;const o=_f(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof Vt?n.selection.forEachCell((s,a)=>{s.attrs[t]!==e&&i.setNodeMarkup(a,null,{...s.attrs,[t]:e})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}function qX(t){return function(e,n){if(!lo(e))return!1;if(n){const r=Wn(e.schema),o=ko(e),i=e.tr,s=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),a=s.map(l=>o.table.nodeAt(l));for(let l=0;l<s.length;l++)a[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[l],r.cell,a[l].attrs);if(i.steps.length==0)for(let l=0;l<s.length;l++)i.setNodeMarkup(o.tableStart+s[l],r.header_cell,a[l].attrs);n(i)}return!0}}function LD(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const i=e.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function Wc(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?qX(t):function(n,r){if(!lo(n))return!1;if(r){const o=Wn(n.schema),i=ko(n),s=n.tr,a=LD("row",i,o),l=LD("column",i,o),f=(t==="column"?a:t==="row"?l:!1)?1:0,h=t=="column"?{left:0,top:f,right:1,bottom:i.map.height}:t=="row"?{left:f,top:0,right:i.map.width,bottom:1}:i,m=t=="column"?l?o.cell:o.header_cell:t=="row"?a?o.cell:o.header_cell:o.cell;i.map.cellsInRect(h).forEach(g=>{const b=g+i.tableStart,y=s.doc.nodeAt(b);y&&s.setNodeMarkup(b,m,y.attrs)}),r(s)}return!0}}Wc("row",{useDeprecatedLogic:!0}),Wc("column",{useDeprecatedLogic:!0});var UX=Wc("cell",{useDeprecatedLogic:!0});function KX(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const i=t.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function $D(t){return function(e,n){if(!lo(e))return!1;const r=KX(_f(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(Je.between(o,TX(o))).scrollIntoView())}return!0}}function YX(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Nf(t,e){const n=t.selection;if(!(n instanceof Vt))return!1;if(e){const r=t.tr,o=Wn(t.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new Ie(o,0,0))}),r.docChanged&&e(r)}return!0}function GX(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,s=o.type.schema,a=[];if(i=="row")for(let l=0;l<e.childCount;l++){let u=e.child(l).content;const f=l?0:Math.max(0,n-1),h=l<e.childCount-1?0:Math.max(0,r-1);(f||h)&&(u=$0(Wn(s).row,new Ie(u,f,h)).content),a.push(u)}else if(i=="cell"||i=="header_cell")a.push(n||r?$0(Wn(s).row,new Ie(e,n,r)).content:e);else return null;return JX(s,a)}function JX(t,e){const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(let s=i.childCount-1;s>=0;s--){const{rowspan:a,colspan:l}=i.child(s).attrs;for(let u=o;u<o+a;u++)n[u]=(n[u]||0)+l}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(Te.empty),n[o]<r){const i=Wn(t).cell.createAndFill(),s=[];for(let a=n[o];a<r;a++)s.push(i);e[o]=e[o].append(Te.from(s))}return{height:e.length,width:r,rows:e}}function $0(t,e){const n=t.createAndFill();return new dg(n).replace(0,n.content.size,e).doc}function ZX({width:t,height:e,rows:n},r,o){if(t!=r){const i=[],s=[];for(let a=0;a<n.length;a++){const l=n[a],u=[];for(let f=i[a]||0,h=0;f<r;h++){let m=l.child(h%l.childCount);f+m.attrs.colspan>r&&(m=m.type.createChecked(Rs(m.attrs,m.attrs.colspan,f+m.attrs.colspan-r),m.content)),u.push(m),f+=m.attrs.colspan;for(let g=1;g<m.attrs.rowspan;g++)i[a+g]=(i[a+g]||0)+m.attrs.colspan}s.push(Te.from(u))}n=s,t=r}if(e!=o){const i=[];for(let s=0,a=0;s<o;s++,a++){const l=[],u=n[a%e];for(let f=0;f<u.childCount;f++){let h=u.child(f);s+h.attrs.rowspan>o&&(h=h.type.create({...h.attrs,rowspan:Math.max(1,o-h.attrs.rowspan)},h.content)),l.push(h)}i.push(Te.from(l))}n=i,e=o}return{width:t,height:e,rows:n}}function XX(t,e,n,r,o,i,s){const a=t.doc.type.schema,l=Wn(a);let u,f;if(o>e.width)for(let h=0,m=0;h<e.height;h++){const g=n.child(h);m+=g.nodeSize;const b=[];let y;g.lastChild==null||g.lastChild.type==l.cell?y=u||(u=l.cell.createAndFill()):y=f||(f=l.header_cell.createAndFill());for(let S=e.width;S<o;S++)b.push(y);t.insert(t.mapping.slice(s).map(m-1+r),b)}if(i>e.height){const h=[];for(let b=0,y=(e.height-1)*e.width;b<Math.max(e.width,o);b++){const S=b>=e.width?!1:n.nodeAt(e.map[y+b]).type==l.header_cell;h.push(S?f||(f=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const m=l.row.create(null,Te.from(h)),g=[];for(let b=e.height;b<i;b++)g.push(m);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),g)}return!!(u||f)}function FD(t,e,n,r,o,i,s,a){if(s==0||s==e.height)return!1;let l=!1;for(let u=o;u<i;u++){const f=s*e.width+u,h=e.map[f];if(e.map[f-e.width]==h){l=!0;const m=n.nodeAt(h),{top:g,left:b}=e.findCell(h);t.setNodeMarkup(t.mapping.slice(a).map(h+r),null,{...m.attrs,rowspan:s-g}),t.insert(t.mapping.slice(a).map(e.positionAt(s,b,n)),m.type.createAndFill({...m.attrs,rowspan:g+m.attrs.rowspan-s})),u+=m.attrs.colspan-1}}return l}function RD(t,e,n,r,o,i,s,a){if(s==0||s==e.width)return!1;let l=!1;for(let u=o;u<i;u++){const f=u*e.width+s,h=e.map[f];if(e.map[f-1]==h){l=!0;const m=n.nodeAt(h),g=e.colCount(h),b=t.mapping.slice(a).map(h+r);t.setNodeMarkup(b,null,Rs(m.attrs,s-g,m.attrs.colspan-(s-g))),t.insert(b+m.nodeSize,m.type.createAndFill(Rs(m.attrs,0,s-g))),u+=m.attrs.rowspan-1}}return l}function BD(t,e,n,r,o){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let s=sn.get(i);const{top:a,left:l}=r,u=l+o.width,f=a+o.height,h=t.tr;let m=0;function g(){if(i=n?h.doc.nodeAt(n-1):h.doc,!i)throw new Error("No table found");s=sn.get(i),m=h.mapping.maps.length}XX(h,s,i,n,u,f,m)&&g(),FD(h,s,i,n,l,u,a,m)&&g(),FD(h,s,i,n,l,u,f,m)&&g(),RD(h,s,i,n,a,f,l,m)&&g(),RD(h,s,i,n,a,f,u,m)&&g();for(let b=a;b<f;b++){const y=s.positionAt(b,l,i),S=s.positionAt(b,u,i);h.replace(h.mapping.slice(m).map(y+n),h.mapping.slice(m).map(S+n),new Ie(o.rows[b-a],0,0))}g(),h.setSelection(new Vt(h.doc.resolve(n+s.positionAt(a,l,i)),h.doc.resolve(n+s.positionAt(f-1,u-1,i)))),e(h)}var QX=Hg({ArrowLeft:$f("horiz",-1),ArrowRight:$f("horiz",1),ArrowUp:$f("vert",-1),ArrowDown:$f("vert",1),"Shift-ArrowLeft":Ff("horiz",-1),"Shift-ArrowRight":Ff("horiz",1),"Shift-ArrowUp":Ff("vert",-1),"Shift-ArrowDown":Ff("vert",1),Backspace:Nf,"Mod-Backspace":Nf,Delete:Nf,"Mod-Delete":Nf});function Lf(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function $f(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof Vt)return Lf(n,r,Xe.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const s=VD(o,t,e);if(s==null)return!1;if(t=="horiz")return Lf(n,r,Xe.near(n.doc.resolve(i.head+e),e));{const a=n.doc.resolve(s),l=MD(a,t,e);let u;return l?u=Xe.near(l,1):e<0?u=Xe.near(n.doc.resolve(a.before(-1)),-1):u=Xe.near(n.doc.resolve(a.after(-1)),1),Lf(n,r,u)}}}function Ff(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof Vt)s=i;else{const l=VD(o,t,e);if(l==null)return!1;s=new Vt(n.doc.resolve(l))}const a=MD(s.$headCell,t,e);return a?Lf(n,r,new Vt(s.$anchorCell,a)):!1}}function eQ(t,e){const n=t.state.doc,r=Ga(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Vt(r))),!0):!1}function tQ(t,e,n){if(!lo(t.state))return!1;let r=GX(n);const o=t.state.selection;if(o instanceof Vt){r||(r={width:1,height:1,rows:[Te.from($0(Wn(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),a=sn.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=ZX(r,a.right-a.left,a.bottom-a.top),BD(t.state,t.dispatch,s,a,r),!0}else if(r){const i=_f(t.state),s=i.start(-1);return BD(t.state,t.dispatch,s,sn.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function nQ(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=zD(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof Vt)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=Ga(t.state.selection.$anchor))!=null&&((n=F0(t,e))==null?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(l,u){let f=F0(t,u);const h=Hi.getState(t.state)==null;if(!f||!L0(l,f))if(h)f=l;else return;const m=new Vt(l,f);if(h||!t.state.selection.eq(m)){const g=t.state.tr.setSelection(m);h&&g.setMeta(Hi,l.pos),t.dispatch(g)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",a),Hi.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Hi,-1))}function a(l){const u=l,f=Hi.getState(t.state);let h;if(f!=null)h=t.state.doc.resolve(f);else if(zD(t,u.target)!=r&&(h=F0(t,e),!h))return s();h&&i(h,u)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",a)}function VD(t,e,n){if(!(t.state.selection instanceof Je))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const a=r.before(o),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function zD(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function F0(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Ga(t.state.doc.resolve(n.pos)):null}var rQ=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),R0(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,R0(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function R0(t,e,n,r,o,i){var s;let a=0,l=!0,u=e.firstChild;const f=t.firstChild;if(f){for(let h=0,m=0;h<f.childCount;h++){const{colspan:g,colwidth:b}=f.child(h).attrs;for(let y=0;y<g;y++,m++){const S=o==m?i:b&&b[y],C=S?S+"px":"";if(a+=S||r,S||(l=!1),u)u.style.width!=C&&(u.style.width=C),u=u.nextSibling;else{const E=document.createElement("col");E.style.width=C,e.appendChild(E)}}}for(;u;){const h=u.nextSibling;(s=u.parentNode)==null||s.removeChild(u),u=h}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var Cr=new yn("tableColumnResizing");function HD({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=rQ,lastColumnResizable:o=!0}={}){const i=new Qt({key:Cr,state:{init(s,a){var l,u;const f=(u=(l=i.spec)==null?void 0:l.props)==null?void 0:u.nodeViews,h=Wn(a.schema).table.name;return r&&f&&(f[h]=(m,g)=>new r(m,n,g)),new oQ(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Cr.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{iQ(s,a,t,o)},mouseleave:s=>{sQ(s)},mousedown:(s,a)=>{aQ(s,a,e,n)}},decorations:s=>{const a=Cr.getState(s);if(a&&a.activeHandle>-1)return fQ(s,a.activeHandle)},nodeViews:{}}});return i}var oQ=class gh{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Cr);if(r&&r.setHandle!=null)return new gh(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new gh(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return N0(e.doc.resolve(o))||(o=-1),new gh(o,n.dragging)}return n}};function iQ(t,e,n,r){if(!t.editable)return;const o=Cr.getState(t.state);if(o&&!o.dragging){const i=cQ(e.target);let s=-1;if(i){const{left:a,right:l}=i.getBoundingClientRect();e.clientX-a<=n?s=jD(t,e,"left",n):l-e.clientX<=n&&(s=jD(t,e,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){const a=t.state.doc.resolve(s),l=a.node(-1),u=sn.get(l),f=a.start(-1);if(u.colCount(a.pos-f)+a.nodeAfter.attrs.colspan-1==u.width-1)return}qD(t,s)}}}function sQ(t){if(!t.editable)return;const e=Cr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&qD(t,-1)}function aQ(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!=null?o:window,s=Cr.getState(t.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=t.state.doc.nodeAt(s.activeHandle),l=lQ(t,s.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(Cr,{setDragging:{startX:e.clientX,startWidth:l}}));function u(h){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",f);const m=Cr.getState(t.state);m!=null&&m.dragging&&(uQ(t,m.activeHandle,WD(m.dragging,h,n)),t.dispatch(t.state.tr.setMeta(Cr,{setDragging:null})))}function f(h){if(!h.which)return u(h);const m=Cr.getState(t.state);if(m&&m.dragging){const g=WD(m.dragging,h,n);UD(t,m.activeHandle,g,r)}}return UD(t,s.activeHandle,l,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",f),e.preventDefault(),!0}function lQ(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let a=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let u=0;u<n;u++)r[u]&&(a-=r[u],l--);return a/l}function cQ(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function jD(t,e,n,r){const o=n=="right"?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:s}=i,a=Ga(t.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const l=sn.get(a.node(-1)),u=a.start(-1),f=l.map.indexOf(a.pos-u);return f%l.width==0?-1:u+l.map[f-1]}function WD(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function qD(t,e){t.dispatch(t.state.tr.setMeta(Cr,{setHandle:e}))}function uQ(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=sn.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let u=0;u<i.height;u++){const f=u*i.width+a;if(u&&i.map[f]==i.map[f-i.width])continue;const h=i.map[f],m=o.nodeAt(h).attrs,g=m.colspan==1?0:a-i.colCount(h);if(m.colwidth&&m.colwidth[g]==n)continue;const b=m.colwidth?m.colwidth.slice():dQ(m.colspan);b[g]=n,l.setNodeMarkup(s+h,null,{...m,colwidth:b})}l.docChanged&&t.dispatch(l)}function UD(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),a=sn.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let l=t.domAtPos(o.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&R0(i,l.firstChild,l,r,a,n)}function dQ(t){return Array(t).fill(0)}function fQ(t,e){var n;const r=[],o=t.doc.resolve(e),i=o.node(-1);if(!i)return Jt.empty;const s=sn.get(i),a=o.start(-1),l=s.colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;for(let u=0;u<s.height;u++){const f=l+u*s.width;if((l==s.width-1||s.map[f]!=s.map[f+1])&&(u==0||s.map[f]!=s.map[f-s.width])){const h=s.map[f],m=a+h+i.nodeAt(h).nodeSize-1,g=document.createElement("div");g.className="column-resize-handle",(n=Cr.getState(t))!=null&&n.dragging&&r.push(_n.node(a+h,a+h+i.nodeAt(h).nodeSize,{class:"column-resize-dragging"})),r.push(_n.widget(m,g))}}return Jt.create(t.doc,r)}function KD({allowTableNodeSelection:t=!1}={}){return new Qt({key:Hi,state:{init(){return null},apply(e,n){const r=e.getMeta(Hi);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:i}=e.mapping.mapResult(n);return o?null:i}},props:{decorations:OX,handleDOMEvents:{mousedown:nQ},createSelectionBetween(e){return Hi.getState(e.state)!=null?e.state.selection:null},handleTripleClick:eQ,handleKeyDown:QX,handlePaste:tQ},appendTransaction(e,n,r){return IX(r,AD(r,n),t)}})}function B0(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function YD(t,e,n,r,o,i){var s;let a=0,l=!0,u=e.firstChild;const f=t.firstChild;if(f!==null)for(let h=0,m=0;h<f.childCount;h+=1){const{colspan:g,colwidth:b}=f.child(h).attrs;for(let y=0;y<g;y+=1,m+=1){const S=o===m?i:b&&b[y],C=S?`${S}px`:"";if(a+=S||r,S||(l=!1),u){if(u.style.width!==C){const[E,T]=B0(r,S);u.style.setProperty(E,T)}u=u.nextSibling}else{const E=document.createElement("col"),[T,w]=B0(r,S);E.style.setProperty(T,w),e.appendChild(E)}}}for(;u;){const h=u.nextSibling;(s=u.parentNode)===null||s===void 0||s.removeChild(u),u=h}l?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}class pQ{constructor(e,n){this.node=e,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),YD(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,YD(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function hQ(t,e,n,r){let o=0,i=!0;const s=[],a=t.firstChild;if(!a)return{};for(let h=0,m=0;h<a.childCount;h+=1){const{colspan:g,colwidth:b}=a.child(h).attrs;for(let y=0;y<g;y+=1,m+=1){const S=n===m?r:b&&b[y];o+=S||e,S||(i=!1);const[C,E]=B0(e,S);s.push(["col",{style:`${C}: ${E}`}])}}const l=i?`${o}px`:"",u=i?"":`${o}px`;return{colgroup:["colgroup",{},...s],tableWidth:l,tableMinWidth:u}}function GD(t,e){return t.createAndFill()}function mQ(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function gQ(t,e,n,r,o){const i=mQ(t),s=[],a=[];for(let u=0;u<n;u+=1){const f=GD(i.cell);if(f&&a.push(f),r){const h=GD(i.header_cell);h&&s.push(h)}}const l=[];for(let u=0;u<e;u+=1)l.push(i.row.createChecked(null,r&&u===0?s:a));return i.table.createChecked(null,l)}function yQ(t){return t instanceof Vt}const Rf=({editor:t})=>{const{selection:e}=t.state;if(!yQ(e))return!1;let n=0;const r=Jg(e.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},bQ=en.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:pQ,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=hQ(t,this.options.cellMinWidth);return["table",gt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const s=gQ(i.schema,t,e,n);if(o){const a=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(Je.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>_X(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>NX(t,e),deleteColumn:()=>({state:t,dispatch:e})=>$X(t,e),addRowBefore:()=>({state:t,dispatch:e})=>RX(t,e),addRowAfter:()=>({state:t,dispatch:e})=>BX(t,e),deleteRow:()=>({state:t,dispatch:e})=>zX(t,e),deleteTable:()=>({state:t,dispatch:e})=>YX(t,e),mergeCells:()=>({state:t,dispatch:e})=>_D(t,e),splitCell:()=>({state:t,dispatch:e})=>ND(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Wc("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Wc("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>UX(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>_D(t,e)?!0:ND(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>WX(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>$D(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>$D(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&AD(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Vt.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Rf,"Mod-Backspace":Rf,Delete:Rf,"Mod-Delete":Rf}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[HD({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],KD({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:st(ze(t,"tableRole",e))}}}).extend({addProseMirrorPlugins(){return[...this.options.resizable?[HD({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],KD({allowTableNodeSelection:this.options.allowTableNodeSelection})]}}),vQ=t=>{const{onUploadFiles:e}=t,n=F.useTheme();return v.jsxs(kf,{children:[v.jsx(mD,{options:[{label:"Monospace",value:"monospace"},{label:"Serif",value:"serif"}]}),v.jsx(Mn,{}),v.jsx(xD,{}),v.jsx(Mn,{}),v.jsx(yD,{}),v.jsx(Mn,{}),v.jsx(IZ,{}),v.jsx(jZ,{}),v.jsx(XZ,{}),v.jsx(KZ,{}),v.jsx(YZ,{}),v.jsx(GZ,{}),v.jsx(Mn,{}),v.jsx(ZZ,{defaultTextColor:n.palette.text.primary,swatchColors:[{value:"#000000",label:"Black"},{value:"#ffffff",label:"White"},{value:"#888888",label:"Grey"},{value:"#ff0000",label:"Red"},{value:"#ff9900",label:"Orange"},{value:"#ffff00",label:"Yellow"},{value:"#00d000",label:"Green"},{value:"#0000ff",label:"Blue"}]}),v.jsx($Z,{swatchColors:[{value:"#595959",label:"Dark grey"},{value:"#dddddd",label:"Light grey"},{value:"#ffa6a6",label:"Light red"},{value:"#ffd699",label:"Light orange"},{value:"#ffff00",label:"Yellow"},{value:"#99cc99",label:"Light green"},{value:"#90c6ff",label:"Light blue"},{value:"#8085e9",label:"Light purple"}]}),v.jsx(Mn,{}),v.jsx(LZ,{}),v.jsx(Mn,{}),v.jsx(SD,{}),v.jsx(Mn,{}),v.jsx(WZ,{}),v.jsx(DZ,{}),v.jsx(JZ,{}),oZ()&&v.jsxs(v.Fragment,{children:[v.jsx(HZ,{}),v.jsx(eX,{})]}),v.jsx(Mn,{}),v.jsx(AZ,{}),v.jsx(Mn,{}),v.jsx(PZ,{}),v.jsx(_Z,{}),v.jsx(Mn,{}),v.jsx(zZ,{onUploadFiles:e}),v.jsx(Mn,{}),v.jsx(FZ,{}),v.jsx(kZ,{}),v.jsx(Mn,{}),v.jsx(UZ,{}),v.jsx(Mn,{}),v.jsx(QZ,{}),v.jsx(qZ,{})]})},xQ=/^\s*>\s$/,JD=en.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[za({find:xQ,type:this.type})]}}),SQ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,CQ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,wQ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,TQ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,ZD=lr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ps({find:SQ,type:this.type}),Ps({find:wQ,type:this.type})]},addPasteRules(){return[Ri({find:CQ,type:this.type}),Ri({find:TQ,type:this.type})]}}),EQ="listItem",XD="textStyle",QD=/^\s*([-+*])\s$/,eP=en.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(EQ,this.editor.getAttributes(XD)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=za({find:QD,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=za({find:QD,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(XD),editor:this.editor})),[t]}}),MQ=/(^|[^`])`([^`]+)`(?!`)/,OQ=/(^|[^`])`([^`]+)`(?!`)/g,tP=lr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ps({find:MQ,type:this.type})]},addPasteRules(){return[Ri({find:OQ,type:this.type})]}}),kQ=/^```([a-z]+)?[\s\n]$/,AQ=/^~~~([a-z]+)?[\s\n]$/,nP=en.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,i=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",gt(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
393
+
394
+ `);return!i||!s?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const a=o.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:u})=>(u.setSelection(Xe.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[ry({find:kQ,type:this.type,getAttributes:t=>({language:t[1]})}),ry({find:AQ,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Qt({key:new yn("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o==null?void 0:o.mode;if(!n||!i)return!1;const{tr:s,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
395
+ `));return s.replaceSelectionWith(this.type.create({language:i},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(Je.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),IQ=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,o;const i=n.getAttribute("style"),s=(o=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||o===void 0?void 0:o.getAttribute("style");n.setAttribute("style",`${s};${i}`)})},DQ=lr.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&IQ(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(o=>o.type===this.type).some(o=>Object.values(o.attrs).some(i=>!!i))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),PQ=on.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),rP=en.create({name:"doc",topNode:!0,content:"block+"});function _Q(t={}){return new Qt({view(e){return new NQ(e,t)}})}class NQ{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let u=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(u){let f=u.getBoundingClientRect(),h=a?f.bottom:f.top;a&&l&&(h=(h+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:f.left,right:f.right,top:h-this.width/2,bottom:h+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let i,s;if(!o||o==document.body&&getComputedStyle(o).position=="static")i=-pageXOffset,s=-pageYOffset;else{let a=o.getBoundingClientRect();i=a.left-o.scrollLeft,s=a.top-o.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=JE(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const oP=on.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[_Q(this.options)]}}),LQ=on.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});class an extends Xe{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return an.valid(r)?new an(r):Xe.near(r)}content(){return Ie.empty}eq(e){return e instanceof an&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new an(e.resolve(n.pos))}getBookmark(){return new V0(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!$Q(e)||!FQ(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&an.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let a=e.node(s);if(n>0?e.indexAfter(s)<a.childCount:e.index(s)>0){i=a.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let l=e.doc.resolve(o);if(an.valid(l))return l}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Ke.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let a=e.doc.resolve(o);if(an.valid(a))return a}return null}}}an.prototype.visible=!1,an.findFrom=an.findGapCursorFrom,Xe.jsonID("gapcursor",an);class V0{constructor(e){this.pos=e}map(e){return new V0(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return an.valid(n)?new an(n):Xe.near(n)}}function $Q(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function FQ(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function RQ(){return new Qt({props:{decorations:HQ,createSelectionBetween(t,e,n){return e.pos==n.pos&&an.valid(n)?new an(n):null},handleClick:VQ,handleKeyDown:BQ,handleDOMEvents:{beforeinput:zQ}}})}const BQ=Hg({ArrowLeft:Bf("horiz",-1),ArrowRight:Bf("horiz",1),ArrowUp:Bf("vert",-1),ArrowDown:Bf("vert",1)});function Bf(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof Je){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let u=an.findGapCursorFrom(a,e,l);return u?(o&&o(r.tr.setSelection(new an(u))),!0):!1}}function VQ(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!an.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Ke.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new an(r))),!0)}function zQ(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof an))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=Te.empty;for(let s=r.length-1;s>=0;s--)o=Te.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new Ie(o,0,0));return i.setSelection(Je.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function HQ(t){if(!(t.selection instanceof an))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Jt.create(t.doc,[_n.widget(t.selection.head,e,{key:"gapcursor"})])}const iP=on.create({name:"gapCursor",addProseMirrorPlugins(){return[RQ()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=st(ze(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),sP=en.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",gt(this.options.HTMLAttributes,t)]},renderText(){return`
396
+ `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:f})=>{if(f&&l&&s){const h=l.filter(m=>a.includes(m.type.name));u.ensureMarks(h)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),jQ=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,WQ=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,qQ=lr.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Ps({find:jQ,type:this.type})]},addPasteRules(){return[Ri({find:WQ,type:this.type})]}});var Vf=200,kn=function(){};kn.prototype.append=function(e){return e.length?(e=kn.from(e),!this.length&&e||e.length<Vf&&this.leafAppend(e)||this.length<Vf&&e.leafPrepend(this)||this.appendInner(e)):this},kn.prototype.prepend=function(e){return e.length?kn.from(e).append(this):this},kn.prototype.appendInner=function(e){return new UQ(this,e)},kn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?kn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},kn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},kn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)},kn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o},kn.from=function(e){return e instanceof kn?e:e&&e.length?new aP(e):kn.empty};var aP=function(t){function e(r){t.call(this),this.values=r}e.__proto__=t,e.prototype=Object.create(t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,a){for(var l=i;l<s;l++)if(o(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,s,a){for(var l=i-1;l>=s;l--)if(o(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=Vf)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=Vf)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(kn);kn.empty=new aP([]);var UQ=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e.__proto__=t,e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,s){var a=this.left.length;if(o<a&&this.left.forEachInner(r,o,Math.min(i,a),s)===!1||i>a&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(o,a),i,s)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(kn);const KQ=500;class co{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,a,l,u=[],f=[];return this.items.forEach((h,m)=>{if(!h.step){o||(o=this.remapping(r,m+1),i=o.maps.length),i--,f.push(h);return}if(o){f.push(new Ao(h.map));let g=h.step.map(o.slice(i)),b;g&&s.maybeStep(g).doc&&(b=s.mapping.maps[s.mapping.maps.length-1],u.push(new Ao(b,void 0,void 0,u.length+f.length))),i--,b&&o.appendMap(b,i)}else s.maybeStep(h.step);if(h.selection)return a=o?h.selection.map(o.slice(i)):h.selection,l=new co(this.items.slice(0,r).append(f.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,r,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let f=0;f<e.steps.length;f++){let h=e.steps[f].invert(e.docs[f]),m=new Ao(e.mapping.maps[f],h,n),g;(g=l&&l.merge(m))&&(m=g,f?i.pop():a=a.slice(0,a.length-1)),i.push(m),n&&(s++,n=void 0),o||(l=m)}let u=s-r.depth;return u>GQ&&(a=YQ(a,u),s-=u),new co(a.append(i),s)}remapping(e,n){let r=new hc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new co(this.items.append(e.map(n=>new Ao(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(m=>{m.selection&&a--},o);let l=n;this.items.forEach(m=>{let g=i.getMirror(--l);if(g==null)return;s=Math.min(s,g);let b=i.maps[g];if(m.step){let y=e.steps[g].invert(e.docs[g]),S=m.selection&&m.selection.map(i.slice(l+1,g));S&&a++,r.push(new Ao(b,y,S))}else r.push(new Ao(b))},o);let u=[];for(let m=n;m<s;m++)u.push(new Ao(i.maps[m]));let f=this.items.slice(0,o).append(u).append(r),h=new co(f,a);return h.emptyItemCount()>KQ&&(h=h.compress(this.items.length-r.length)),h}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=e)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let f=s.selection&&s.selection.map(n.slice(r));f&&i++;let h=new Ao(u.invert(),l,f),m,g=o.length-1;(m=o.length&&o[g].merge(h))?o[g]=m:o.push(h)}}else s.map&&r--},this.items.length,0),new co(kn.from(o.reverse()),i)}}co.empty=new co(kn.empty,0);function YQ(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Ao{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Ao(n.getMap().invert(),n,this.selection)}}}class ji{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const GQ=20;function JQ(t,e,n,r){let o=n.getMeta(Bs),i;if(o)return o.historyState;n.getMeta(QQ)&&(t=new ji(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Bs))return s.getMeta(Bs).redo?new ji(t.done.addTransform(n,void 0,r,zf(e)),t.undone,lP(n.mapping.maps),t.prevTime,t.prevComposition):new ji(t.done,t.undone.addTransform(n,void 0,r,zf(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!ZQ(n,t.prevRanges)),u=s?z0(t.prevRanges,n.mapping):lP(n.mapping.maps);return new ji(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,zf(e)),co.empty,u,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new ji(t.done.rebased(n,i),t.undone.rebased(n,i),z0(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ji(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),z0(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function ZQ(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function lP(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,s)=>e.push(i,s));return e}function z0(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function XQ(t,e,n){let r=zf(e),o=Bs.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new ji(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(Bs,{redo:n,historyState:l})}let H0=!1,cP=null;function zf(t){let e=t.plugins;if(cP!=e){H0=!1,cP=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){H0=!0;break}}return H0}const Bs=new yn("history"),QQ=new yn("closeHistory");function eee(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Qt({key:Bs,state:{init(){return new ji(co.empty,co.empty,null,0,-1)},apply(e,n,r){return JQ(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?dP:r=="historyRedo"?fP:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function uP(t,e){return(n,r)=>{let o=Bs.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=XQ(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const dP=uP(!1,!0),fP=uP(!0,!0),pP=on.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>dP(t,e),redo:()=>({state:t,dispatch:e})=>fP(t,e)}},addProseMirrorPlugins(){return[eee(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),hP=en.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",gt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,i=t();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):UO(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:s,dispatch:a})=>{var l;if(a){const{$to:u}=s.selection,f=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?s.setSelection(Je.create(s.doc,u.pos+1)):u.nodeAfter.isBlock?s.setSelection(Ke.create(s.doc,u.pos)):s.setSelection(Je.create(s.doc,u.pos));else{const h=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();h&&(s.insert(f,h),s.setSelection(Je.create(s.doc,f+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[GO({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),tee=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,nee=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,ree=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,oee=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,mP=lr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ps({find:tee,type:this.type}),Ps({find:ree,type:this.type})]},addPasteRules(){return[Ri({find:nee,type:this.type}),Ri({find:oee,type:this.type})]}}),iee="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",see="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Ja=(t,e)=>{for(const n in e)t[n]=e[n];return t},j0="numeric",W0="ascii",q0="alpha",qc="asciinumeric",Uc="alphanumeric",U0="domain",gP="emoji",aee="scheme",lee="slashscheme",K0="whitespace";function cee(t,e){return t in e||(e[t]=[]),e[t]}function Vs(t,e,n){e[j0]&&(e[qc]=!0,e[Uc]=!0),e[W0]&&(e[qc]=!0,e[q0]=!0),e[qc]&&(e[Uc]=!0),e[q0]&&(e[Uc]=!0),e[Uc]&&(e[U0]=!0),e[gP]&&(e[U0]=!0);for(const r in e){const o=cee(r,n);o.indexOf(t)<0&&o.push(t)}}function uee(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function cr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}cr.groups={},cr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],i=e.jr[r][1];if(i&&o.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){r=r||cr.groups;let o;return e&&e.j?o=e:(o=new cr(e),n&&r&&Vs(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const i=t.length;if(!i)return o;for(let s=0;s<i-1;s++)o=o.tt(t[s]);return o.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||cr.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const i=e;let s,a=o.go(t);if(a?(s=new cr,Ja(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new cr,i){if(r)if(s.t&&typeof s.t=="string"){const l=Ja(uee(s.t,r),n);Vs(i,l,r)}else n&&Vs(i,n,r);s.t=i}return o.j[t]=s,s}};const at=(t,e,n,r,o)=>t.ta(e,n,r,o),ln=(t,e,n,r,o)=>t.tr(e,n,r,o),yP=(t,e,n,r,o)=>t.ts(e,n,r,o),ke=(t,e,n,r,o)=>t.tt(e,n,r,o),Qo="WORD",Y0="UWORD",bP="ASCIINUMERICAL",vP="ALPHANUMERICAL",Kc="LOCALHOST",G0="TLD",J0="UTLD",Hf="SCHEME",Za="SLASH_SCHEME",Z0="NUM",X0="WS",Q0="NL",Yc="OPENBRACE",Gc="CLOSEBRACE",jf="OPENBRACKET",Wf="CLOSEBRACKET",qf="OPENPAREN",Uf="CLOSEPAREN",Kf="OPENANGLEBRACKET",Yf="CLOSEANGLEBRACKET",Gf="FULLWIDTHLEFTPAREN",Jf="FULLWIDTHRIGHTPAREN",Zf="LEFTCORNERBRACKET",Xf="RIGHTCORNERBRACKET",Qf="LEFTWHITECORNERBRACKET",ep="RIGHTWHITECORNERBRACKET",tp="FULLWIDTHLESSTHAN",np="FULLWIDTHGREATERTHAN",rp="AMPERSAND",e1="APOSTROPHE",op="ASTERISK",Wi="AT",ip="BACKSLASH",sp="BACKTICK",ap="CARET",qi="COLON",t1="COMMA",lp="DOLLAR",Io="DOT",cp="EQUALS",n1="EXCLAMATION",Hr="HYPHEN",Jc="PERCENT",up="PIPE",dp="PLUS",fp="POUND",Zc="QUERY",r1="QUOTE",xP="FULLWIDTHMIDDLEDOT",o1="SEMI",Do="SLASH",Xc="TILDE",pp="UNDERSCORE",SP="EMOJI",hp="SYM";var CP=Object.freeze({__proto__:null,WORD:Qo,UWORD:Y0,ASCIINUMERICAL:bP,ALPHANUMERICAL:vP,LOCALHOST:Kc,TLD:G0,UTLD:J0,SCHEME:Hf,SLASH_SCHEME:Za,NUM:Z0,WS:X0,NL:Q0,OPENBRACE:Yc,CLOSEBRACE:Gc,OPENBRACKET:jf,CLOSEBRACKET:Wf,OPENPAREN:qf,CLOSEPAREN:Uf,OPENANGLEBRACKET:Kf,CLOSEANGLEBRACKET:Yf,FULLWIDTHLEFTPAREN:Gf,FULLWIDTHRIGHTPAREN:Jf,LEFTCORNERBRACKET:Zf,RIGHTCORNERBRACKET:Xf,LEFTWHITECORNERBRACKET:Qf,RIGHTWHITECORNERBRACKET:ep,FULLWIDTHLESSTHAN:tp,FULLWIDTHGREATERTHAN:np,AMPERSAND:rp,APOSTROPHE:e1,ASTERISK:op,AT:Wi,BACKSLASH:ip,BACKTICK:sp,CARET:ap,COLON:qi,COMMA:t1,DOLLAR:lp,DOT:Io,EQUALS:cp,EXCLAMATION:n1,HYPHEN:Hr,PERCENT:Jc,PIPE:up,PLUS:dp,POUND:fp,QUERY:Zc,QUOTE:r1,FULLWIDTHMIDDLEDOT:xP,SEMI:o1,SLASH:Do,TILDE:Xc,UNDERSCORE:pp,EMOJI:SP,SYM:hp});const ei=/[a-z]/,Qc=new RegExp("\\p{L}","u"),i1=new RegExp("\\p{Emoji}","u"),ti=/\d/,s1=/\s/,wP="\r",a1=`
397
+ `,dee="️",fee="‍",l1="";let mp=null,gp=null;function pee(t=[]){const e={};cr.groups=e;const n=new cr;mp==null&&(mp=EP(iee)),gp==null&&(gp=EP(see)),ke(n,"'",e1),ke(n,"{",Yc),ke(n,"}",Gc),ke(n,"[",jf),ke(n,"]",Wf),ke(n,"(",qf),ke(n,")",Uf),ke(n,"<",Kf),ke(n,">",Yf),ke(n,"(",Gf),ke(n,")",Jf),ke(n,"「",Zf),ke(n,"」",Xf),ke(n,"『",Qf),ke(n,"』",ep),ke(n,"<",tp),ke(n,">",np),ke(n,"&",rp),ke(n,"*",op),ke(n,"@",Wi),ke(n,"`",sp),ke(n,"^",ap),ke(n,":",qi),ke(n,",",t1),ke(n,"$",lp),ke(n,".",Io),ke(n,"=",cp),ke(n,"!",n1),ke(n,"-",Hr),ke(n,"%",Jc),ke(n,"|",up),ke(n,"+",dp),ke(n,"#",fp),ke(n,"?",Zc),ke(n,'"',r1),ke(n,"/",Do),ke(n,";",o1),ke(n,"~",Xc),ke(n,"_",pp),ke(n,"\\",ip),ke(n,"・",xP);const r=ln(n,ti,Z0,{[j0]:!0});ln(r,ti,r);const o=ln(r,ei,bP,{[qc]:!0}),i=ln(r,Qc,vP,{[Uc]:!0}),s=ln(n,ei,Qo,{[W0]:!0});ln(s,ti,o),ln(s,ei,s),ln(o,ti,o),ln(o,ei,o);const a=ln(n,Qc,Y0,{[q0]:!0});ln(a,ei),ln(a,ti,i),ln(a,Qc,a),ln(i,ti,i),ln(i,ei),ln(i,Qc,i);const l=ke(n,a1,Q0,{[K0]:!0}),u=ke(n,wP,X0,{[K0]:!0}),f=ln(n,s1,X0,{[K0]:!0});ke(n,l1,f),ke(u,a1,l),ke(u,l1,f),ln(u,s1,f),ke(f,wP),ke(f,a1),ln(f,s1,f),ke(f,l1,f);const h=ln(n,i1,SP,{[gP]:!0});ke(h,"#"),ln(h,i1,h),ke(h,dee,h);const m=ke(h,fee);ke(m,"#"),ln(m,i1,h);const g=[[ei,s],[ti,o]],b=[[ei,null],[Qc,a],[ti,i]];for(let y=0;y<mp.length;y++)Ui(n,mp[y],G0,Qo,g);for(let y=0;y<gp.length;y++)Ui(n,gp[y],J0,Y0,b);Vs(G0,{tld:!0,ascii:!0},e),Vs(J0,{utld:!0,alpha:!0},e),Ui(n,"file",Hf,Qo,g),Ui(n,"mailto",Hf,Qo,g),Ui(n,"http",Za,Qo,g),Ui(n,"https",Za,Qo,g),Ui(n,"ftp",Za,Qo,g),Ui(n,"ftps",Za,Qo,g),Vs(Hf,{scheme:!0,ascii:!0},e),Vs(Za,{slashscheme:!0,ascii:!0},e),t=t.sort((y,S)=>y[0]>S[0]?1:-1);for(let y=0;y<t.length;y++){const S=t[y][0],E=t[y][1]?{[aee]:!0}:{[lee]:!0};S.indexOf("-")>=0?E[U0]=!0:ei.test(S)?ti.test(S)?E[qc]=!0:E[W0]=!0:E[j0]=!0,yP(n,S,S,E)}return yP(n,"localhost",Kc,{ascii:!0}),n.jd=new cr(hp),{start:n,tokens:Ja({groups:e},CP)}}function TP(t,e){const n=hee(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s<r;){let a=t,l=null,u=0,f=null,h=-1,m=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(h=0,m=0,f=a):h>=0&&(h+=n[s].length,m++),u+=n[s].length,i+=n[s].length,s++;i-=h,s-=m,u-=h,o.push({t:f.t,v:e.slice(i-u,i),s:i-u,e:i})}return o}function hee(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function Ui(t,e,n,r,o){let i;const s=e.length;for(let a=0;a<s-1;a++){const l=e[a];t.j[l]?i=t.j[l]:(i=new cr(r),i.jr=o.slice(),t.j[l]=i),t=i}return i=new cr(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function EP(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let i=0;for(;o.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(t[r]),r++}return e}const eu={defaultProtocol:"http",events:null,format:MP,formatHref:MP,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function c1(t,e=null){let n=Ja({},eu);t&&(n=Ja(n,t instanceof c1?t.o:t));const r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}c1.prototype={o:eu,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:eu[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function MP(t){return t}function OP(t,e){this.t="token",this.v=t,this.tk=e}OP.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=eu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},a=t.get("className",n,e),l=t.get("target",n,e),u=t.get("rel",n,e),f=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return s.href=r,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),f&&Ja(s,f),{tagName:o,attributes:s,content:i,eventListeners:h}}};function yp(t,e){class n extends OP{constructor(o,i){super(o,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const kP=yp("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),AP=yp("text"),mee=yp("nl"),bp=yp("url",{isLink:!0,toHref(t=eu.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Kc&&t[1].t===qi}}),jr=t=>new cr(t);function gee({groups:t}){const e=t.domain.concat([rp,op,Wi,ip,sp,ap,lp,cp,Hr,Z0,Jc,up,dp,fp,Do,hp,Xc,pp]),n=[qi,t1,Io,n1,Jc,Zc,r1,o1,Kf,Yf,Yc,Gc,Wf,jf,qf,Uf,Gf,Jf,Zf,Xf,Qf,ep,tp,np],r=[rp,e1,op,ip,sp,ap,lp,cp,Hr,Yc,Gc,Jc,up,dp,fp,Zc,Do,hp,Xc,pp],o=jr(),i=ke(o,Xc);at(i,r,i),at(i,t.domain,i);const s=jr(),a=jr(),l=jr();at(o,t.domain,s),at(o,t.scheme,a),at(o,t.slashscheme,l),at(s,r,i),at(s,t.domain,s);const u=ke(s,Wi);ke(i,Wi,u),ke(a,Wi,u),ke(l,Wi,u);const f=ke(i,Io);at(f,r,i),at(f,t.domain,i);const h=jr();at(u,t.domain,h),at(h,t.domain,h);const m=ke(h,Io);at(m,t.domain,h);const g=jr(kP);at(m,t.tld,g),at(m,t.utld,g),ke(u,Kc,g);const b=ke(h,Hr);ke(b,Hr,b),at(b,t.domain,h),at(g,t.domain,h),ke(g,Io,m),ke(g,Hr,b);const y=ke(g,qi);at(y,t.numeric,kP);const S=ke(s,Hr),C=ke(s,Io);ke(S,Hr,S),at(S,t.domain,s),at(C,r,i),at(C,t.domain,s);const E=jr(bp);at(C,t.tld,E),at(C,t.utld,E),at(E,t.domain,s),at(E,r,i),ke(E,Io,C),ke(E,Hr,S),ke(E,Wi,u);const T=ke(E,qi),w=jr(bp);at(T,t.numeric,w);const O=jr(bp),A=jr();at(O,e,O),at(O,n,A),at(A,e,O),at(A,n,A),ke(E,Do,O),ke(w,Do,O);const N=ke(a,qi),D=ke(l,qi),L=ke(D,Do),k=ke(L,Do);at(a,t.domain,s),ke(a,Io,C),ke(a,Hr,S),at(l,t.domain,s),ke(l,Io,C),ke(l,Hr,S),at(N,t.domain,O),ke(N,Do,O),ke(N,Zc,O),at(k,t.domain,O),at(k,e,O),ke(k,Do,O);const I=[[Yc,Gc],[jf,Wf],[qf,Uf],[Kf,Yf],[Gf,Jf],[Zf,Xf],[Qf,ep],[tp,np]];for(let $=0;$<I.length;$++){const[H,z]=I[$],R=ke(O,H);ke(A,H,R),ke(R,z,O);const B=jr(bp);at(R,e,B);const W=jr();at(R,n),at(B,e,B),at(B,n,W),at(W,e,B),at(W,n,W),ke(B,z,O),ke(W,z,O)}return ke(o,Kc,E),ke(o,Q0,mee),{start:o,tokens:CP}}function yee(t,e,n){let r=n.length,o=0,i=[],s=[];for(;o<r;){let a=t,l=null,u=null,f=0,h=null,m=-1;for(;o<r&&!(l=a.go(n[o].t));)s.push(n[o++]);for(;o<r&&(u=l||a.go(n[o].t));)l=null,a=u,a.accepts()?(m=0,h=a):m>=0&&m++,o++,f++;if(m<0)o-=f,o<r&&(s.push(n[o]),o++);else{s.length>0&&(i.push(u1(AP,e,s)),s=[]),o-=m,f-=m;const g=h.t,b=n.slice(o-f,o);i.push(u1(g,e,b))}}return s.length>0&&i.push(u1(AP,e,s)),i}function u1(t,e,n){const r=n[0].s,o=n[n.length-1].e,i=e.slice(r,o);return new t(i,n)}const bee=typeof console<"u"&&console&&console.warn||(()=>{}),vee="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ut={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function xee(){return cr.groups={},Ut.scanner=null,Ut.parser=null,Ut.tokenQueue=[],Ut.pluginQueue=[],Ut.customSchemes=[],Ut.initialized=!1,Ut}function IP(t,e=!1){if(Ut.initialized&&bee(`linkifyjs: already initialized - will not register custom scheme "${t}" ${vee}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
398
+ 1. Must only contain digits, lowercase ASCII letters or "-"
399
+ 2. Cannot start or end with "-"
400
+ 3. "-" cannot repeat`);Ut.customSchemes.push([t,e])}function See(){Ut.scanner=pee(Ut.customSchemes);for(let t=0;t<Ut.tokenQueue.length;t++)Ut.tokenQueue[t][1]({scanner:Ut.scanner});Ut.parser=gee(Ut.scanner.tokens);for(let t=0;t<Ut.pluginQueue.length;t++)Ut.pluginQueue[t][1]({scanner:Ut.scanner,parser:Ut.parser});return Ut.initialized=!0,Ut}function d1(t){return Ut.initialized||See(),yee(Ut.parser.start,t,TP(Ut.scanner.start,t))}d1.scan=TP;function DP(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new c1(n),o=d1(t),i=[];for(let s=0;s<o.length;s++){const a=o[s];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}function Cee(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function wee(t){return new Qt({key:new yn("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=e.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,a=B7(n.doc,[...e]);if(q7(a).forEach(({newRange:u})=>{const f=z7(r.doc,u,g=>g.isTextblock);let h,m;if(f.length>1?(h=f[0],m=r.doc.textBetween(h.pos,h.pos+h.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(h=f[0],m=r.doc.textBetween(h.pos,u.to,void 0," ")),h&&m){const g=m.split(" ").filter(C=>C!=="");if(g.length<=0)return!1;const b=g[g.length-1],y=h.pos+m.lastIndexOf(b);if(!b)return!1;const S=d1(b).map(C=>C.toObject(t.defaultProtocol));if(!Cee(S))return!1;S.filter(C=>C.isLink).map(C=>({...C,from:y+C.start+1,to:y+C.end+1})).filter(C=>r.schema.marks.code?!r.doc.rangeHasMark(C.from,C.to,r.schema.marks.code):!0).filter(C=>t.validate(C.value)).filter(C=>t.shouldAutoLink(C.value)).forEach(C=>{Qg(C.from,C.to,r.doc).some(E=>E.mark.type===t.type)||s.addMark(C.from,C.to,t.type.create({href:C.href}))})}}),!!s.steps.length)return s}})}function Tee(t){return new Qt({key:new yn("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=r.target;const a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(m=>m.nodeName==="A"))return!1;const l=Xg(e.state,t.type.name),u=r.target,f=(o=u==null?void 0:u.href)!==null&&o!==void 0?o:l.href,h=(i=u==null?void 0:u.target)!==null&&i!==void 0?i:l.target;return u&&f?(window.open(f,h),!0):!1}}})}function Eee(t){return new Qt({key:new yn("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});const l=DP(a,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:t.editor.commands.setMark(t.type,{href:l.href})}}})}const Mee=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function zs(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(Mee,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Oee=lr.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){IP(t);return}IP(t.scheme,t.optionalSlashes)})},onDestroy(){xee()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!zs(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!zs(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!zs(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",gt(this.options.HTMLAttributes,t),0]:["a",gt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!zs(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!zs(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ri({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=DP(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!zs(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(wee({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!zs(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(Tee({type:this.type})),this.options.linkOnPaste&&t.push(Eee({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),PP=en.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",gt(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});function kee(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:a}=t,l=r&&!o,u=mK(n),f=new RegExp(`\\s${u}$`),h=s?"^":"",m=o?"":u,g=l?new RegExp(`${h}${u}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${h}(?:^)?${u}[^\\s${m}]*`,"gm"),b=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!b)return null;const y=a.pos-b.length,S=Array.from(b.matchAll(g)).pop();if(!S||S.input===void 0||S.index===void 0)return null;const C=S.input.slice(Math.max(0,S.index-1),S.index),E=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(C);if(i!==null&&!E)return null;const T=y+S.index;let w=T+S[0].length;return l&&f.test(b.slice(w-1,w+1))&&(S[0]+=" ",w+=1),T<a.pos&&w>=a.pos?{range:{from:T,to:w},query:S[0].slice(n.length),text:S[0]}:null}const Aee=new yn("suggestion");function Iee({pluginKey:t=Aee,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",command:u=()=>null,items:f=()=>[],render:h=()=>({}),allow:m=()=>!0,findSuggestionMatch:g=kee}){let b;const y=h==null?void 0:h(),S=new Qt({key:t,view(){return{update:async(C,E)=>{var T,w,O,A,N,D,L;const k=(T=this.key)===null||T===void 0?void 0:T.getState(E),I=(w=this.key)===null||w===void 0?void 0:w.getState(C.state),$=k.active&&I.active&&k.range.from!==I.range.from,H=!k.active&&I.active,z=k.active&&!I.active,R=!H&&!z&&k.query!==I.query,B=H||$&&R,W=R||$,U=z||$&&R;if(!B&&!W&&!U)return;const G=U&&!B?k:I,Y=C.dom.querySelector(`[data-decoration-id="${G.decorationId}"]`);b={editor:e,range:G.range,query:G.query,text:G.text,items:[],command:Z=>u({editor:e,range:G.range,props:Z}),decorationNode:Y,clientRect:Y?()=>{var Z;const{decorationId:me}=(Z=this.key)===null||Z===void 0?void 0:Z.getState(e.state),fe=C.dom.querySelector(`[data-decoration-id="${me}"]`);return(fe==null?void 0:fe.getBoundingClientRect())||null}:null},B&&((O=y==null?void 0:y.onBeforeStart)===null||O===void 0||O.call(y,b)),W&&((A=y==null?void 0:y.onBeforeUpdate)===null||A===void 0||A.call(y,b)),(W||B)&&(b.items=await f({editor:e,query:G.query})),U&&((N=y==null?void 0:y.onExit)===null||N===void 0||N.call(y,b)),W&&((D=y==null?void 0:y.onUpdate)===null||D===void 0||D.call(y,b)),B&&((L=y==null?void 0:y.onStart)===null||L===void 0||L.call(y,b))},destroy:()=>{var C;b&&((C=y==null?void 0:y.onExit)===null||C===void 0||C.call(y,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(C,E,T,w){const{isEditable:O}=e,{composing:A}=e.view,{selection:N}=C,{empty:D,from:L}=N,k={...E};if(k.composing=A,O&&(D||e.view.composing)){(L<E.range.from||L>E.range.to)&&!A&&!E.composing&&(k.active=!1);const I=g({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:N.$from}),$=`id_${Math.floor(Math.random()*4294967295)}`;I&&m({editor:e,state:w,range:I.range,isActive:E.active})?(k.active=!0,k.decorationId=E.decorationId?E.decorationId:$,k.range=I.range,k.query=I.query,k.text=I.text):k.active=!1}else k.active=!1;return k.active||(k.decorationId=null,k.range={from:0,to:0},k.query=null,k.text=null),k}},props:{handleKeyDown(C,E){var T;const{active:w,range:O}=S.getState(C.state);return w&&((T=y==null?void 0:y.onKeyDown)===null||T===void 0?void 0:T.call(y,{view:C,event:E,range:O}))||!1},decorations(C){const{active:E,range:T,decorationId:w}=S.getState(C);return E?Jt.create(C.doc,[_n.inline(T.from,T.to,{nodeName:a,class:l,"data-decoration-id":w})]):null}}});return S}const Dee=new yn("mention"),Pee=en.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({options:t,node:e}){var n;return`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:t,node:e}){var n;return["span",gt(this.HTMLAttributes,t.HTMLAttributes),`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`]},suggestion:{char:"@",pluginKey:Dee,command:({editor:t,range:e,props:n})=>{var r,o,i;const s=t.view.state.selection.$to.nodeAfter;((r=s==null?void 0:s.text)===null||r===void 0?void 0:r.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(i=(o=t.view.dom.ownerDocument.defaultView)===null||o===void 0?void 0:o.getSelection())===null||i===void 0||i.collapseToEnd()},allow:({state:t,range:e})=>{const n=t.doc.resolve(e.from),r=t.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",gt({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})];const n={...this.options};n.HTMLAttributes=gt({"data-type":this.name},this.options.HTMLAttributes,e);const r=this.options.renderHTML({options:n,node:t});return typeof r=="string"?["span",gt({"data-type":this.name},this.options.HTMLAttributes,e),r]:r},renderText({node:t}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:t})):this.options.renderText({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1;const{selection:r}=e,{empty:o,anchor:i}=r;return o?(e.doc.nodesBetween(i-1,i,(s,a)=>{if(s.type.name===this.name)return n=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",a,a+s.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[Iee({editor:this.editor,...this.options.suggestion})]}}),_ee="listItem",_P="textStyle",NP=/^(\d+)\.\s$/,LP=en.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",gt(this.options.HTMLAttributes,n),0]:["ol",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(_ee,this.editor.getAttributes(_P)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=za({find:NP,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=za({find:NP,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(_P)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),$P=en.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),FP=on.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Qt({key:new yn("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];if(!n)return null;const i=this.editor.isEmpty;return t.descendants((s,a)=>{const l=r>=a&&r<=a+s.nodeSize,u=!s.isLeaf&&hf(s);if((l||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];i&&f.push(this.options.emptyEditorClass);const h=_n.node(a,a+s.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:a,hasAnchor:l}):this.options.placeholder});o.push(h)}return this.options.includeChildren}),Jt.create(t,o)}}})]}}),Nee=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Lee=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,RP=lr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ps({find:Nee,type:this.type})]},addPasteRules(){return[Ri({find:Lee,type:this.type})]}}),$ee=lr.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Fee=lr.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Ree=en.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",gt(this.options.HTMLAttributes,t),0]}}),Bee=en.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",gt(this.options.HTMLAttributes,t),0]}}),Vee=en.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",gt(this.options.HTMLAttributes,t),0]}}),zee=/^\s*(\[([( |x])?\])\s$/,Hee=en.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",gt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");return i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:f}=u.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const m=n();if(typeof m!="number")return!1;const g=h.doc.nodeAt(m);return h.setNodeMarkup(m,void 0,{...g==null?void 0:g.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,f)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,f])=>{o.setAttribute(u,f)}),o.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,i.append(a,s),o.append(i,l),Object.entries(e).forEach(([u,f])=>{o.setAttribute(u,f)}),{dom:o,contentDOM:l,update:u=>u.type!==this.type?!1:(o.dataset.checked=u.attrs.checked,a.checked=u.attrs.checked,!0)}}},addInputRules(){return[za({find:zee,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),jee=en.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",gt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),BP=en.create({name:"text",group:"inline"}),Wee=on.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),qee=lr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",gt(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),VP=J.forwardRef((t,e)=>{const[n,r]=J.useState(0),o=l=>{if(l>=t.items.length)return;const u=t.items[l],f={id:u.id,label:u.mentionLabel};t.command(f)},i=()=>{r((n+t.items.length-1)%t.items.length)},s=()=>{r((n+1)%t.items.length)},a=()=>{o(n)};return J.useEffect(()=>r(0),[t.items]),J.useImperativeHandle(e,()=>({onKeyDown:({event:l})=>l.key==="ArrowUp"?(i(),!0):l.key==="ArrowDown"?(s(),!0):l.key==="Enter"?(a(),!0):!1})),t.items.length>0?v.jsx(F.Paper,{elevation:5,children:v.jsx(F.List,{dense:!0,sx:{overflow:"hidden"},children:t.items.map((l,u)=>v.jsx(F.ListItem,{disablePadding:!0,children:v.jsx(F.ListItemButton,{selected:u===n,onClick:()=>o(u),children:l.mentionLabel})},l.id))})}):null});VP.displayName="SuggestionList";const zP={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0,toJSON(){return{}}},Uee={items:async({query:t})=>Promise.resolve(["Lea Thompson","Cyndi Lauper","Tom Cruise","Madonna","Jerry Hall","Joan Collins","Winona Ryder","Christina Applegate","Alyssa Milano","Molly Ringwald","Ally Sheedy","Debbie Harry","Olivia Newton-John","Elton John","Michael J. Fox","Axl Rose","Emilio Estevez","Ralph Macchio","Rob Lowe","Jennifer Grey","Mickey Rourke","John Cusack","Matthew Broderick","Justine Bateman","Lisa Bonet","Benicio Monserrate Rafael del Toro Sánchez"].map((e,n)=>({mentionLabel:e,id:n.toString()})).filter(e=>e.mentionLabel.toLowerCase().startsWith(t.toLowerCase())).slice(0,5)),render:()=>{let t,e;return{onStart:n=>{t=new K2(VP,{props:n,editor:n.editor}),e=Bc("body",{getReferenceClientRect:()=>{var r;return((r=n.clientRect)==null?void 0:r.call(n))??zP},appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"})[0]},onUpdate(n){t==null||t.updateProps(n),e==null||e.setProps({getReferenceClientRect:()=>{var r;return((r=n.clientRect)==null?void 0:r.call(n))??zP}})},onKeyDown(n){return n.event.key==="Escape"?(e==null||e.hide(),!0):t!=null&&t.ref?t.ref.onKeyDown(n):!1},onExit(){e==null||e.destroy(),t==null||t.destroy(),e=void 0,t=void 0}}}},Kee=Oee.extend({inclusive:!1}),Yee=$ee.extend({excludes:"superscript"}),Gee=Fee.extend({excludes:"subscript"});function Jee({placeholder:t}={}){return J.useMemo(()=>[bQ.configure({resizable:!0}),Vee,Bee,Ree,eP,nP,rP,sP,PP,LP,$P,Yee,Gee,BP,ZD,JD,tP,mP,qee,RP,Kee.configure({autolink:!0,linkOnPaste:!0,openOnClick:!1}),hG,iP,uX,Wee.configure({types:["heading","paragraph","image"]}),DQ,PQ,LQ,lX,qQ.configure({multicolor:!0}),hP,yX,oP,jee,Hee.configure({nested:!0}),Pee.configure({suggestion:Uee}),FP.configure({placeholder:t}),pP],[t])}function HP(t){return Array.from(t).filter(e=>(e.type||"").toLowerCase().startsWith("image/"))}const Zee=t=>{const e=Jee({placeholder:"Add your own content here..."});if(t.renderContentOnly)return v.jsx(VJ,{content:t.renderContentOnly,extensions:e});const{name:n,label:r,labelProps:o={fontSize:"0.9em",color:"#808080",fontWeight:"400"},onUploadFiles:i,readOnly:s=!1}=t,[a,l,u]=Ht.useField({name:n}),{setValue:f}=u,{value:h}=a;J.useEffect(()=>{var C,E,T;(T=(E=(C=m==null?void 0:m.current)==null?void 0:C.editor)==null?void 0:E.commands)==null||T.setContent(h)},[h]);const m=J.useRef(null),g=J.useCallback((C,E)=>{var w;const T=(w=m.current)==null?void 0:w.editor;if(T)if(i instanceof Promise)i(C).then(O=>{A0({images:O,editor:T,position:E})});else{const O=i(C);A0({images:O,editor:T,position:E})}},[]),b=J.useCallback((C,E,T,w)=>{var A;if(!(E instanceof DragEvent)||!E.dataTransfer)return!1;const O=HP(E.dataTransfer.files);if(O.length>0){const N=(A=C.posAtCoords({left:E.clientX,top:E.clientY}))==null?void 0:A.pos;return g(O,N),E.preventDefault(),!0}return!1},[g]),y=J.useCallback((C,E,T)=>{if(!E.clipboardData)return!1;const w=HP(E.clipboardData.files);return w.length>0?(g(w),!0):!1},[g]),S=v.jsx(F.Box,{sx:{"& .ProseMirror":{"& h1, & h2, & h3, & h4, & h5, & h6":{scrollMarginTop:s?0:50}}},children:v.jsx(Q2,{ref:m,extensions:e,content:h,editable:!s,editorProps:{handleDrop:b,handlePaste:y},renderControls:s?void 0:()=>v.jsx(vQ,{onUploadFiles:i}),onBlur:()=>{var C,E;return f(((E=(C=m.current)==null?void 0:C.editor)==null?void 0:E.getHTML())??"")},RichTextFieldProps:{variant:"outlined",MenuBarProps:{hide:s}},children:()=>v.jsxs(v.Fragment,{children:[v.jsx(g2,{}),v.jsx(eD,{})]})})});return v.jsxs(F.Box,{display:"flex",flexDirection:"column",children:[r&&v.jsx(F.Typography,{...o,children:r}),S]})},f1=t=>{const{title:e="Loading...",message:n}=t;return v.jsxs(F.Box,{className:"loading-page",sx:{gap:2},"data-testid":"loading-page",children:[v.jsxs(F.Box,{className:"text-content",children:[v.jsx(F.Typography,{variant:"h1","data-testid":"title",children:e}),n&&v.jsx(F.Typography,{"data-testid":"message",children:n})]}),v.jsx(F.CircularProgress,{size:75,"data-testid":"loading-spinner"})]})},jP=t=>{const{colSpan:e,isExpanded:n,renderExpand:r,obj:o,asMobileCard:i=!1}=t,[s,a]=J.useState(!1),[l,u]=J.useState(void 0);return J.useEffect(()=>{n&&!s&&(a(!0),u(r(o)))},[n]),i?v.jsx(F.Box,{children:v.jsx(F.Collapse,{in:n,children:l})}):v.jsx(F.TableRow,{children:v.jsx(F.TableCell,{style:{paddingBottom:0,paddingTop:0},colSpan:e,children:v.jsx(F.Collapse,{in:n,children:l})})})},WP=t=>{const{id:e,getRowKey:n=K=>"id"in K&&(typeof K.id=="string"||typeof K.id=="number")?K.id:(console.warn(`Table: "id: string | number" not found in ${JSON.stringify(K)}. Please implement the Table.getRowKey prop so Table knows how to uniquely identify this row.`),JSON.stringify(K)),columns:r,data:o=[],onRowClick:i,renderExpand:s,hideColumnsOnMobile:a=[],sortField:l,sortOrder:u,onSortChange:f,allowSortCols:h,fixedLayout:m=!1,className:g,emptyTableMsg:b="No items to display",errorTableMsg:y,retryCallback:S,isLoading:C=!1,disableMobileCards:E=!1,highlightSelectedRow:T=!1,headerRowStyle:w={},stickyHeader:O,...A}=t,{palette:N}=F.useTheme(),[D,L]=J.useState(void 0),[k,I]=J.useState(void 0);Array.isArray(m)&&m.length!==r.length&&console.error('Table component: Length of "fixedLayout" is not equal to the length of "columns".');const $=K=>{K!==l?f&&f(K,"asc"):f&&f(l,u==="asc"?"desc":"asc")},H=K=>l===K?u:null,z=F.useMediaQuery(F.useTheme().breakpoints.down("sm")),R=z&&a?r.filter(K=>!a.includes(K.fieldName)):r,B=(K,Q)=>Q.split(".").reduce((ie,he)=>{if(ie&&typeof ie=="object")return ie[he]},K),W=(K,Q)=>{const ie=B(Q,K.fieldName);return K.render?K.render(ie,Q,z):ie},U=f!==void 0,G=K=>U?h?h.includes(K):!0:!1,Y=v.jsxs(F.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:[v.jsx(XB,{})," ",b]}),Z=v.jsxs(F.Box,{"data-testid":"table-fetch-error-msg",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:[v.jsx(sC,{color:"error"})," ",y,S&&v.jsx(F.Button,{variant:"text",onClick:S,children:"Retry?"})]}),me=()=>{if(C)return v.jsx(F.TableRow,{children:v.jsx(F.TableCell,{colSpan:r.length,align:"center",children:v.jsx(F.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:v.jsx(f1,{})})})});if(y)return v.jsx(F.TableRow,{children:v.jsx(F.TableCell,{colSpan:r.length,align:"center",children:Z})});if(o.length===0)return v.jsx(F.TableRow,{children:v.jsx(F.TableCell,{colSpan:r.length,align:"center",children:Y})})},fe=()=>{if(C)return v.jsx(f1,{});if(y)return Z;if(o.length===0)return Y},pe=K=>{T&&I(K)},re=K=>{if(i&&(i(K),pe(K)),s){const Q=D===K?void 0:K;L(Q),pe(Q)}},ue=typeof T=="string"?T:N.grey[N.mode=="dark"?600:50],ae=K=>{const Q=k===n(K)?ue:"inherit";return{cursor:i||s?"pointer":"default",backgroundColor:Q,...i&&{"&:hover":{backgroundColor:Q===ue?na(Q,.1):ue}}}};return z&&!E?v.jsxs("div",{...e?{id:`mobile-table-${e}`}:{},className:g,"data-testid":"mui-table-mobile",children:[U&&v.jsxs(v.Fragment,{children:[v.jsxs(F.Box,{display:"flex",className:"MBv2_Table_Stack_Sort",children:[v.jsx(F.TextField,{select:!0,sx:{flexGrow:1},id:"demo-simple-select",size:"small",value:l??"",label:"Sort By...",onChange:K=>$(K.target.value),fullWidth:!0,children:R.map(K=>{if(G(K.fieldName))return v.jsx(F.MenuItem,{value:K.sortName??K.fieldName,children:K.label??Cn(K.fieldName)},`${K.key??"rowHeader"}-${K.fieldName}`)})}),v.jsx(F.IconButton,{onClick:()=>{l&&$(l)},children:v.jsx(l5,{className:`sort-icon-${u}`})})]}),v.jsx(F.Divider,{sx:{margin:"10px 0"}})]}),fe()??o.map(K=>v.jsxs(F.Card,{className:"MBv2_Table_Stack_Container",sx:{margin:"5px 0",padding:"5px",...ae(K)},onClick:()=>re(n(K)),"data-testid":`card-${n(K)}`,children:[v.jsx("table",{className:"MBv2_Table_Stack",children:v.jsx("tbody",{className:"MBv2_Table_Stack_Body",children:R.map(Q=>v.jsxs("tr",{className:"MBv2_Table_Stack_Row",children:[v.jsx("td",{className:`MBv2_Table_Stack_Cell_Label MBv2_Table_Stack_Col_${Q.fieldName}`,children:Q.label??Cn(Q.fieldName)}),v.jsx("td",{className:`MBv2_Table_Stack_Cell_Value MBv2_Table_Stack_Val_${Q.fieldName}`,style:{paddingLeft:"10px"},children:W(Q,K)})]},`${Q.key??"row"}-${n(K)}-${Q.fieldName}`))})}),s&&v.jsx(jP,{colSpan:r.length,isExpanded:n(K)===D,obj:K,renderExpand:Q=>s(Q),asMobileCard:!0})]},n(K)))]}):v.jsx(F.TableContainer,{component:F.Card,"data-testid":"mui-table",...e?{id:`table-${e}`}:{},className:g,style:O?{maxHeight:O,overflow:"auto"}:{},children:v.jsxs(F.Table,{stickyHeader:O!=="undefined",style:{tableLayout:m?"fixed":"auto"},className:"MBv2_Table",sx:w?{"& .MuiTableCell-head":{...w}}:{},...A,children:[v.jsx(F.TableHead,{className:"MBv2_Table_Head",children:v.jsx(F.TableRow,{className:"MBv2_Table_Head_Row",children:R.map((K,Q)=>{const ie=G(K.fieldName);return v.jsx(F.TableCell,{width:Array.isArray(m)?m[Q]:"auto",children:v.jsx(F.Box,{style:{display:"flex",alignItems:"center"},children:v.jsxs(F.Box,{sx:[ie&&{"&:hover":{cursor:"pointer",backgroundColor:N.mode==="dark"?"#222222":"#ededed",borderRadius:2}}],style:{display:"flex",alignItems:"center",padding:"5px",paddingLeft:"6px",marginLeft:"-6px"},onClick:ie?()=>$(K.sortName??K.fieldName):void 0,children:[v.jsx("strong",{className:"MBv2_Table_Col_Label",style:{wordBreak:"normal"},children:K.label??Cn(K.fieldName)}),ie&&H(K.fieldName)==="asc"&&v.jsx(_C,{style:{marginLeft:"5px"}}),ie&&H(K.fieldName)==="desc"&&v.jsx(QB,{style:{marginLeft:"5px"}}),ie&&H(K.fieldName)!=="asc"&&H(K.fieldName)!=="desc"&&v.jsx(i5,{style:{marginLeft:"5px"}})]})})},`${K.key??"rowHeader"}-${K.fieldName}`)})})}),v.jsx(F.TableBody,{className:"MBv2_Table_Body",children:me()??o.map(K=>v.jsxs(J.Fragment,{children:[v.jsx(F.TableRow,{"data-testid":`row-${n(K)}`,className:"MBv2_Table_Body_Row",onClick:()=>re(n(K)),sx:ae(K),children:R.map(Q=>v.jsx(F.TableCell,{className:`MBv2_Table_Body_Cell MBv2_Table_Body_Col_${Q.fieldName}`,children:W(Q,K)},`${Q.key??"row"}-${n(K)}-${Q.fieldName}`))}),s&&v.jsx(jP,{colSpan:r.length,isExpanded:n(K)===D,obj:K,renderExpand:Q=>s(Q)})]},n(K)))})]})})},qP=t=>{const{paginationState:e,onPageChange:n,onRowsPerPageChange:r,hidePaginationControls:o=!1,rowsPerPageOptions:i=[5,10,25],...s}=t,{pageNo:a,pageSize:l,totalCount:u,sortField:f,sortOrder:h}=e,m=S=>{n(S)},g=S=>{r(parseInt(S.target.value,10))},b=F.useMediaQuery(F.useTheme().breakpoints.down("sm")),y=!t.data||t.data&&t.data.length===0;return v.jsxs(F.Box,{children:[v.jsx(WP,{sortOrder:h,sortField:f,...s}),!o&&!y&&v.jsx(F.TablePagination,{"data-testid":"pagination-controls",component:"div",rowsPerPageOptions:b?[]:i,count:u,rowsPerPage:l,page:a,onPageChange:(S,C)=>m(C),onRowsPerPageChange:g,sx:{flexGrow:1,marginRight:{xs:0,md:15}}})]})},Xee=t=>{const{onCancel:e,onNewCitation:n,onNewAttachment:r,onEditCitation:o,onEditAttachment:i,onSelect:s,fetchExistingCitations:a,selectedIds:l,toggleCheckbox:u,onError:f=()=>{}}=t,[h,m]=J.useState([]),[g,b]=J.useState(!1),[y,S]=J.useState(!0),[C,E]=J.useState({pageNo:0,pageSize:5,totalCount:0}),T=()=>{b(!1),S(!0),a({pageNo:C.pageNo,pageSize:C.pageSize}).then(w=>{m(w.data),E({...C,totalCount:w.totalCount})}).catch(w=>{f(w),b(!0),m([])}).finally(()=>S(!1))};return J.useEffect(()=>{T()},[C.pageNo,C.pageSize]),v.jsxs(v.Fragment,{children:[v.jsx(qP,{"data-testid":"citation-table",size:"x-small",isLoading:y,columns:[{fieldName:"id",key:"select",label:"",render:(w,O)=>v.jsx(F.Checkbox,{"data-testid":`citation-table_checkbox-${w}`,onChange:()=>u(O),checked:l.includes(w)})},{fieldName:"title"},{fieldName:"fileName",key:"CitationOrAttachment",label:"Type",render:w=>w?"Attachment":"Citation"},{fieldName:"id",key:"Action",label:"Action",render:(w,O)=>v.jsx(F.IconButton,{color:"primary",onClick:()=>O.fileName?i(O):o(O),"data-testid":`citation-table_edit-btn-${w}`,children:v.jsx(NB,{})})}],data:h,paginationState:C,onPageChange:w=>E({...C,pageNo:w}),onRowsPerPageChange:w=>E({...C,pageSize:w,pageNo:0}),fixedLayout:["60px","auto","auto","120px"],errorTableMsg:g?"Failed to load citations.":void 0,retryCallback:T}),v.jsxs(F.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:"20px",children:[v.jsxs(F.Box,{display:"flex",flexDirection:"row",gap:".25rem",children:[v.jsx(F.Button,{variant:"outlined",size:"small",onClick:n,startIcon:v.jsx(tm,{}),children:"Add Citation"}),v.jsx(F.Button,{variant:"outlined",size:"small",onClick:r,startIcon:v.jsx(OB,{}),children:"Add Attachment"})]}),v.jsxs(F.Box,{display:"flex",flexDirection:"row",gap:".25rem",children:[v.jsx(F.Button,{variant:"outlined",size:"small",onClick:e,children:"Cancel"}),v.jsxs(F.Button,{variant:"contained",size:"small",onClick:()=>s(l),children:["Select",l.length>0&&` (${l.length})`]})]})]})]})},UP=()=>({height:window.innerHeight,width:window.innerWidth}),KP=()=>{const[t,e]=J.useState(UP());return J.useEffect(()=>{const n=()=>{e(UP())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t},p1=t=>{const{name:e="button",color:n="primary",fullWidthOnMobile:r=!0,type:o="button",variant:i="contained"}=t,{width:s}=KP(),a=["locationInBar","closeDialog","fullWidthOnMobile"],l=r&&s<600;return v.jsx(F.Button,{role:"button",name:e,color:n,variant:i,type:o,fullWidth:t.fullWidth?!0:l,...Yn({...t},a)})},YP=t=>{const{name:e="submit"}=t;return v.jsx(p1,{name:e,type:"submit",...t})},Qee=t=>{const{id:e,onSave:n,onCancel:r,getCitationById:o,setError:i}=t,s=J.useRef(null),[a,l]=J.useState(!0),[u,f]=J.useState({source:"",title:"",accessedAt:null,url:"",classification:""}),[h,m]=J.useState("");J.useEffect(()=>{if(e===void 0){l(!1);return}o(e).then(b=>{f(b),m(b.title),l(!1)}).catch(b=>{l(!1),i({title:"Failed to retrieve citation",err:b})})},[]);const g=()=>{var y,S,C;const b=(S=(y=s==null?void 0:s.current)==null?void 0:y.values)==null?void 0:S.url;b&&((C=s==null?void 0:s.current)==null||C.setFieldValue("url",e2(b)))};return v.jsx(Ht.Formik,{innerRef:s,enableReinitialize:!0,initialValues:u,onSubmit:async b=>{l(!0),n(b,e!==void 0&&h!==b.title).catch(y=>{l(!1),i({title:`Failed to ${e===void 0?"save":"update"} citation`,err:y})}).finally(()=>l(!1))},children:v.jsxs(Ht.Form,{autoComplete:"off",children:[v.jsx(la,{name:"source",disabled:a,required:!0,margin:"none"}),v.jsx(la,{name:"title",disabled:a,required:!0,margin:"none"}),v.jsx(Id,{name:"accessedAt",disabled:a,required:!0,margin:"none"}),v.jsx(la,{name:"url",disabled:a,required:!0,onBlur:g,margin:"none"}),v.jsx(DC,{row:!0,name:"classification",required:!0,radios:[{label:"Public Source",value:"Public Source"},{label:"Unclassified",value:"Unclassified"}],margin:"none"}),v.jsxs(F.DialogActions,{sx:{px:0},children:[v.jsx(F.Button,{onClick:r,variant:"outlined",size:"small",children:"Cancel"}),v.jsx(YP,{color:"primary",variant:"contained",size:"small",disabled:a,children:e?"Update Citation":"Add New Citation"})]})]})})};var h1,GP;function ete(){if(GP)return h1;GP=1;function t(C){this._maxSize=C,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(C){return this._values[C]},t.prototype.set=function(C,E){return this._size>=this._maxSize&&this.clear(),C in this._values||this._size++,this._values[C]=E};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new t(s),l=new t(s),u=new t(s);h1={Cache:t,split:h,normalizePath:f,setter:function(C){var E=f(C);return l.get(C)||l.set(C,function(w,O){for(var A=0,N=E.length,D=w;A<N-1;){var L=E[A];if(L==="__proto__"||L==="constructor"||L==="prototype")return w;D=D[E[A++]]}D[E[A]]=O})},getter:function(C,E){var T=f(C);return u.get(C)||u.set(C,function(O){for(var A=0,N=T.length;A<N;)if(O!=null||!E)O=O[T[A++]];else return;return O})},join:function(C){return C.reduce(function(E,T){return E+(g(T)||n.test(T)?"["+T+"]":(E?".":"")+T)},"")},forEach:function(C,E,T){m(Array.isArray(C)?C:h(C),E,T)}};function f(C){return a.get(C)||a.set(C,h(C).map(function(E){return E.replace(i,"$2")}))}function h(C){return C.match(e)||[""]}function m(C,E,T){var w=C.length,O,A,N,D;for(A=0;A<w;A++)O=C[A],O&&(S(O)&&(O='"'+O+'"'),D=g(O),N=!D&&/^\d+$/.test(O),E.call(T,O,D,N,A,C))}function g(C){return typeof C=="string"&&C&&["'",'"'].indexOf(C.charAt(0))!==-1}function b(C){return C.match(r)&&!C.match(n)}function y(C){return o.test(C)}function S(C){return!g(C)&&(b(C)||y(C))}return h1}var Hs=ete(),m1,JP;function tte(){if(JP)return m1;JP=1;const t=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,e=f=>f.match(t)||[],n=f=>f[0].toUpperCase()+f.slice(1),r=(f,h)=>e(f).join(h).toLowerCase(),o=f=>e(f).reduce((h,m)=>`${h}${h?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return m1={words:e,upperFirst:n,camelCase:o,pascalCase:f=>n(o(f)),snakeCase:f=>r(f,"_"),kebabCase:f=>r(f,"-"),sentenceCase:f=>n(r(f," ")),titleCase:f=>e(f).map(n).join(" ")},m1}var g1=tte(),vp={exports:{}},ZP;function nte(){if(ZP)return vp.exports;ZP=1,vp.exports=function(o){return t(e(o),o)},vp.exports.array=t;function t(o,i){var s=o.length,a=new Array(s),l={},u=s,f=n(i),h=r(o);for(i.forEach(function(g){if(!h.has(g[0])||!h.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||m(o[u],u,new Set);return a;function m(g,b,y){if(y.has(g)){var S;try{S=", node was:"+JSON.stringify(g)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!h.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!l[b]){l[b]=!0;var C=f.get(g)||new Set;if(C=Array.from(C),b=C.length){y.add(g);do{var E=C[--b];m(E,h.get(E),y)}while(b);y.delete(g)}a[--s]=g}}}function e(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var l=o[s];i.add(l[0]),i.add(l[1])}return Array.from(i)}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var l=o[s];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function r(o){for(var i=new Map,s=0,a=o.length;s<a;s++)i.set(o[s],s);return i}return vp.exports}var rte=nte();const ote=Gn(rte),ite=Object.prototype.toString,ste=Error.prototype.toString,ate=RegExp.prototype.toString,lte=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",cte=/^Symbol\((.*)\)(.*)$/;function ute(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function XP(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return ute(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return lte.call(t).replace(cte,"Symbol($1)");const r=ite.call(t).slice(8,-1);return r==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):r==="Error"||t instanceof Error?"["+ste.call(t)+"]":r==="RegExp"?ate.call(t):null}function Ki(t,e){let n=XP(t,e);return n!==null?n:JSON.stringify(t,function(r,o){let i=XP(this[r],e);return i!==null?i:o},2)}function QP(t){return t==null?[]:[].concat(t)}let e_,t_,n_,dte=/\$\{\s*(\w+)\s*\}/g;e_=Symbol.toStringTag;class r_{constructor(e,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[e_]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],QP(e).forEach(i=>{if(ur.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}t_=Symbol.hasInstance,n_=Symbol.toStringTag;class ur extends Error{static formatError(e,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof e=="string"?e.replace(dte,(o,i)=>Ki(n[i])):typeof e=="function"?e(n):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,n,r,o,i){const s=new r_(e,n,r,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[n_]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ur)}static[t_](e){return r_[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Po={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Ki(r,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${Ki(n,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${Ki(n,!0)}\``+o}},dr={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},fte={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},y1={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},pte={isValue:"${path} field must be ${value}"},xp={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Po,string:dr,number:fte,date:y1,object:xp,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:pte,tuple:{notType:t=>{const{path:e,value:n,spec:r}=t,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${e} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Ki(n,!0)}\``;if(n.length>o)return`${e} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Ki(n,!0)}\``}return ur.formatError(Po.notType,t)}}});const b1=t=>t&&t.__isYupSchema__;class Sp{static fromOptions(e,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,s=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Sp(e,(a,l)=>{var u;let f=s(...a)?o:i;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(e,n){this.fn=void 0,this.refs=e,this.refs=e,this.fn=n}resolve(e,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,e,n);if(o===void 0||o===e)return e;if(!b1(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const Cp={context:"$",value:"."};class js{constructor(e,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Cp.context,this.isValue=this.key[0]===Cp.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Cp.context:this.isValue?Cp.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Hs.getter(this.path,!0),this.map=n.map}getValue(e,n,r){let o=this.isContext?r:this.isValue?e:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(e,n){return this.getValue(e,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}js.prototype.__isYupRef=!0;const Ws=t=>t==null;function Xa(t){function e({value:n,path:r="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:f,params:h,message:m,skipAbsent:g}=t;let{parent:b,context:y,abortEarly:S=s.spec.abortEarly,disableStackTrace:C=s.spec.disableStackTrace}=o;function E(I){return js.isRef(I)?I.getValue(n,b,y):I}function T(I={}){const $=Object.assign({value:n,originalValue:i,label:s.spec.label,path:I.path||r,spec:s.spec,disableStackTrace:I.disableStackTrace||C},h,I.params);for(const z of Object.keys($))$[z]=E($[z]);const H=new ur(ur.formatError(I.message||m,$),n,$.path,I.type||u,$.disableStackTrace);return H.params=$,H}const w=S?a:l;let O={path:r,parent:b,type:u,from:o.from,createError:T,resolve:E,options:o,originalValue:i,schema:s};const A=I=>{ur.isError(I)?w(I):I?l(null):w(T())},N=I=>{ur.isError(I)?w(I):a(I)};if(g&&Ws(n))return A(!0);let L;try{var k;if(L=f.call(O,n,O),typeof((k=L)==null?void 0:k.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${O.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(L).then(A,N)}}catch(I){N(I);return}A(L)}return e.OPTIONS=t,e}function hte(t,e,n,r=n){let o,i,s;return e?(Hs.forEach(e,(a,l,u)=>{let f=l?a.slice(1,a.length-1):a;t=t.resolve({context:r,parent:o,value:n});let h=t.type==="tuple",m=u?parseInt(f,10):0;if(t.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(n&&m>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${e}. because there is no value at that index. `);o=n,n=n&&n[m],t=h?t.spec.types[m]:t.innerType}if(!u){if(!t.fields||!t.fields[f])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);o=n,n=n&&n[f],t=t.fields[f]}i=f,s=l?"["+a+"]":"."+a}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}class wp extends Set{describe(){const e=[];for(const n of this.values())e.push(js.isRef(n)?n.describe():n);return e}resolveAll(e){let n=[];for(const r of this.values())n.push(e(r));return n}clone(){return new wp(this.values())}merge(e,n){const r=this.clone();return e.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Qa(t,e=new Map){if(b1(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let n;if(t instanceof Date)n=new Date(t.getTime()),e.set(t,n);else if(t instanceof RegExp)n=new RegExp(t),e.set(t,n);else if(Array.isArray(t)){n=new Array(t.length),e.set(t,n);for(let r=0;r<t.length;r++)n[r]=Qa(t[r],e)}else if(t instanceof Map){n=new Map,e.set(t,n);for(const[r,o]of t.entries())n.set(r,Qa(o,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const r of t)n.add(Qa(r,e))}else if(t instanceof Object){n={},e.set(t,n);for(const[r,o]of Object.entries(t))n[r]=Qa(o,e)}else throw Error(`Unable to clone ${t}`);return n}class _o{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new wp,this._blacklist=new wp,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Po.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Qa(Object.assign({},this.spec,e)),n}label(e){let n=this.clone();return n.spec.label=e,n}meta(...e){if(e.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},e[0]),n}withMutation(e){let n=this._mutate;this._mutate=!0;let r=e(this);return this._mutate=n,r}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let n=this,r=e.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(e._whitelist,e._blacklist),r._blacklist=n._blacklist.merge(e._blacklist,e._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{e.tests.forEach(s=>{i.test(s.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,e),n),n=n.resolve(e)}return n}resolveOptions(e){var n,r,o,i;return Object.assign({},e,{from:e.from||[],strict:(n=e.strict)!=null?n:this.spec.strict,abortEarly:(r=e.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=e.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,n={}){let r=this.resolve(Object.assign({value:e},n)),o=n.assert==="ignore-optionality",i=r._cast(e,n);if(n.assert!==!1&&!r.isType(i)){if(o&&Ws(i))return i;let s=Ki(e),a=Ki(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
401
+
402
+ attempted value: ${s}
403
+ `+(a!==s?`result of cast: ${a}`:""))}return i}_cast(e,n){let r=e===void 0?e:this.transforms.reduce((o,i)=>i.call(this,o,e,this),e);return r===void 0&&(r=this.getDefault(n)),r}_validate(e,n={},r,o){let{path:i,originalValue:s=e,strict:a=this.spec.strict}=n,l=e;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:i,value:l,originalValue:s,options:n,tests:u},r,f=>{if(f.length)return o(f,l);this.runTests({path:i,value:l,originalValue:s,options:n,tests:this.tests},r,o)})}runTests(e,n,r){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=e,f=y=>{o||(o=!0,n(y,s))},h=y=>{o||(o=!0,r(y,s))},m=i.length,g=[];if(!m)return h([]);let b={value:s,originalValue:a,path:l,options:u,schema:this};for(let y=0;y<i.length;y++){const S=i[y];S(b,f,function(E){E&&(Array.isArray(E)?g.push(...E):g.push(E)),--m<=0&&h(g)})}}asNestedTest({key:e,index:n,parent:r,parentPath:o,originalParent:i,options:s}){const a=e??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const f=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+e});return(h,m,g)=>this.resolve(f)._validate(u,f,m,g)}validate(e,n){var r;let o=this.resolve(Object.assign({},n,{value:e})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(e,n,(l,u)=>{ur.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new ur(l,u,void 0,void 0,i)):s(u)}))}validateSync(e,n){var r;let o=this.resolve(Object.assign({},n,{value:e})),i,s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(e,Object.assign({},n,{sync:!0}),(a,l)=>{throw ur.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new ur(a,e,void 0,void 0,s);i=l}),i}isValid(e,n){return this.validate(e,n).then(()=>!0,r=>{if(ur.isError(r))return!1;throw r})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(r){if(ur.isError(r))return!1;throw r}}_getDefault(e){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,e):Qa(n)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,n){const r=this.clone({nullable:e});return r.internalTests.nullable=Xa({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(e,n){const r=this.clone({optional:e});return r.internalTests.optionality=Xa({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(e=Po.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Po.notNull){return this.nullability(!1,e)}required(e=Po.required){return this.clone().withMutation(n=>n.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let n=this.clone();return n.transforms.push(e),n}test(...e){let n;if(e.length===1?typeof e[0]=="function"?n={test:e[0]}:n=e[0]:e.length===2?n={name:e[0],test:e[1]}:n={name:e[0],message:e[1],test:e[2]},n.message===void 0&&(n.message=Po.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Xa(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(s=>!(s.OPTIONS.name===n.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(e,n){!Array.isArray(e)&&typeof e!="string"&&(n=e,e=".");let r=this.clone(),o=QP(e).map(i=>new js(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new Sp(o,n):Sp.fromOptions(o,n)),r}typeError(e){let n=this.clone();return n.internalTests.typeError=Xa({message:e,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(e,n=Po.oneOf){let r=this.clone();return e.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Xa({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),r}notOneOf(e,n=Po.notOneOf){let r=this.clone();return e.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Xa({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),r}strip(e=!0){let n=this.clone();return n.spec.strip=e,n}describe(e){const n=(e?this.resolve(e):this).clone(),{label:r,meta:o,optional:i,nullable:s}=n.spec;return{meta:o,label:r,optional:i,nullable:s,default:n.getDefault(e),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(h=>h.name===l.name)===u)}}}_o.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])_o.prototype[`${t}At`]=function(e,n,r={}){const{parent:o,parentPath:i,schema:s}=hte(this,e,n,r.context);return s[t](o&&o[i],Object.assign({},r,{parent:o,path:e}))};for(const t of["equals","is"])_o.prototype[t]=_o.prototype.oneOf;for(const t of["not","nope"])_o.prototype[t]=_o.prototype.notOneOf;const mte=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function gte(t){const e=v1(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let n=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(n=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(n=0-n)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+n,e.second,e.millisecond)}function v1(t){var e,n;const r=mte.exec(t);return r?{year:ni(r[1]),month:ni(r[2],1)-1,day:ni(r[3],1),hour:ni(r[4]),minute:ni(r[5]),second:ni(r[6]),millisecond:r[7]?ni(r[7].substring(0,3)):0,precision:(e=(n=r[7])==null?void 0:n.length)!=null?e:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:ni(r[10]),minuteOffset:ni(r[11])}:null}function ni(t,e=0){return Number(t)||e}let yte=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,bte=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,vte=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,xte="^\\d{4}-\\d{2}-\\d{2}",Ste="\\d{2}:\\d{2}:\\d{2}",Cte="(([+-]\\d{2}(:?\\d{2})?)|Z)",wte=new RegExp(`${xte}T${Ste}(\\.\\d+)?${Cte}$`),Tte=t=>Ws(t)||t===t.trim(),Ete={}.toString();function x1(){return new o_}class o_ extends _o{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,n,r)=>{if(!r.spec.coerce||r.isType(e)||Array.isArray(e))return e;const o=e!=null&&e.toString?e.toString():e;return o===Ete?e:o})})}required(e){return super.required(e).withMutation(n=>n.test({message:e||Po.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(n=>n.OPTIONS.name!=="required"),e))}length(e,n=dr.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(r){return r.length===this.resolve(e)}})}min(e,n=dr.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(r){return r.length>=this.resolve(e)}})}max(e,n=dr.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:e},skipAbsent:!0,test(r){return r.length<=this.resolve(e)}})}matches(e,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||dr.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&r||s.search(e)!==-1})}email(e=dr.email){return this.matches(yte,{name:"email",message:e,excludeEmptyString:!0})}url(e=dr.url){return this.matches(bte,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=dr.uuid){return this.matches(vte,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let n="",r,o;return e&&(typeof e=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=e:n=e),this.matches(wte,{name:"datetime",message:n||dr.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||dr.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const s=v1(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||dr.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=v1(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=dr.trim){return this.transform(n=>n!=null?n.trim():n).test({message:e,name:"trim",test:Tte})}lowercase(e=dr.lowercase){return this.transform(n=>Ws(n)?n:n.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ws(n)||n===n.toLowerCase()})}uppercase(e=dr.uppercase){return this.transform(n=>Ws(n)?n:n.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ws(n)||n===n.toUpperCase()})}}x1.prototype=o_.prototype;let Mte=new Date(""),Ote=t=>Object.prototype.toString.call(t)==="[object Date]";class Tp extends _o{constructor(){super({type:"date",check(e){return Ote(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,n,r)=>!r.spec.coerce||r.isType(e)||e===null?e:(e=gte(e),isNaN(e)?Tp.INVALID_DATE:new Date(e)))})}prepareParam(e,n){let r;if(js.isRef(e))r=e;else{let o=this.cast(e);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(e,n=y1.min){let r=this.prepareParam(e,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(e,n=y1.max){let r=this.prepareParam(e,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}Tp.INVALID_DATE=Mte,Tp.prototype;function kte(t,e=[]){let n=[],r=new Set,o=new Set(e.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=Hs.split(s)[0];r.add(l),o.has(`${a}-${l}`)||n.push([a,l])}for(const s of Object.keys(t)){let a=t[s];r.add(s),js.isRef(a)&&a.isSibling?i(a.path,s):b1(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return ote.array(Array.from(r),n).reverse()}function i_(t,e){let n=1/0;return t.some((r,o)=>{var i;if((i=e.path)!=null&&i.includes(r))return n=o,!0}),n}function s_(t){return(e,n)=>i_(t,e)-i_(t,n)}const Ate=(t,e,n)=>{if(typeof t!="string")return t;let r=t;try{r=JSON.parse(t)}catch{}return n.isType(r)?r:t};function Ep(t){if("fields"in t){const e={};for(const[n,r]of Object.entries(t.fields))e[n]=Ep(r);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=Ep(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(Ep)}):"optional"in t?t.optional():t}const Ite=(t,e)=>{const n=[...Hs.normalizePath(e)];if(n.length===1)return n[0]in t;let r=n.pop(),o=Hs.getter(Hs.join(n),!0)(t);return!!(o&&r in o)};let a_=t=>Object.prototype.toString.call(t)==="[object Object]";function l_(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(r=>n.indexOf(r)===-1)}const Dte=s_([]);function c_(t){return new u_(t)}class u_ extends _o{constructor(e){super({type:"object",check(n){return a_(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Dte,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,n={}){var r;let o=super._cast(e,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,s=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(h=>!this._nodes.includes(h))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const h of a){let m=i[h],g=h in o;if(m){let b,y=o[h];u.path=(n.path?`${n.path}.`:"")+h,m=m.resolve({value:y,context:n.context,parent:l});let S=m instanceof _o?m.spec:void 0,C=S==null?void 0:S.strict;if(S!=null&&S.strip){f=f||h in o;continue}b=!n.__validating||!C?m.cast(o[h],u):o[h],b!==void 0&&(l[h]=b)}else g&&!s&&(l[h]=o[h]);(g!==h in l||l[h]!==o[h])&&(f=!0)}return f?l:o}_validate(e,n={},r,o){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:s},...i],n.__validating=!0,n.originalValue=s,super._validate(e,n,r,(l,u)=>{if(!a||!a_(u)){o(l,u);return}s=s||u;let f=[];for(let h of this._nodes){let m=this.fields[h];!m||js.isRef(m)||f.push(m.asNestedTest({options:n,key:h,parent:u,parentPath:n.path,originalParent:s}))}this.runTests({tests:f,value:u,originalValue:s,options:n},r,h=>{o(h.sort(this._sortErrors).concat(l),u)})})}clone(e){const n=super.clone(e);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(e){let n=super.concat(e),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const s=r[o];r[o]=s===void 0?i:s}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let s=e;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),n}setFields(e,n){let r=this.clone();return r.fields=e,r._nodes=kte(e,n),r._sortErrors=s_(Object.keys(e)),n&&(r._excludedEdges=n),r}shape(e,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,e),o)})}partial(){const e={};for(const[n,r]of Object.entries(this.fields))e[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(e)}deepPartial(){return Ep(this)}pick(e){const n={};for(const r of e)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>e.includes(r)&&e.includes(o)))}omit(e){const n=[];for(const r of Object.keys(this.fields))e.includes(r)||n.push(r);return this.pick(n)}from(e,n,r){let o=Hs.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return Ite(i,e)&&(s=Object.assign({},i),r||delete s[e],s[n]=o(i)),s})}json(){return this.transform(Ate)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||xp.exact,test(n){if(n==null)return!0;const r=l_(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,n=xp.noUnknown){typeof e!="boolean"&&(n=e,e=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=l_(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,n=xp.noUnknown){return this.noUnknown(!e,n)}transformKeys(e){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[e(o)]=n[o];return r})}camelCase(){return this.transformKeys(g1.camelCase)}snakeCase(){return this.transformKeys(g1.snakeCase)}constantCase(){return this.transformKeys(e=>g1.snakeCase(e).toUpperCase())}describe(e){const n=(e?this.resolve(e):this).clone(),r=super.describe(e);r.fields={};for(const[i,s]of Object.entries(n.fields)){var o;let a=e;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),r.fields[i]=s.describe(a)}return r}}c_.prototype=u_.prototype;const Pte=t=>{const{id:e,onSave:n,onCancel:r,getCitationById:o,disableFileUpload:i=!1,setError:s}=t,a=J.useRef(null),[l,u]=J.useState(!0),[f,h]=J.useState(""),[m,g]=J.useState({title:"",file:void 0,fileName:""});return J.useEffect(()=>{if(e===void 0){u(!1);return}o(e).then(b=>{g({...b,file:void 0}),h(b.title),u(!1)}).catch(b=>{u(!1),s({title:"Failed to retrieve attachment",err:b})})},[]),v.jsx(Ht.Formik,{innerRef:a,enableReinitialize:!0,initialValues:m,validationSchema:c_().shape({title:x1().required("Title is required"),fileName:x1().required("A file is required")}),onSubmit:async b=>{u(!0),n(b,e!==void 0&&f!==b.title).catch(y=>{u(!1),s({title:`Failed to ${e===void 0?"save":"update"} attachment`,err:y})}).finally(()=>u(!1))},children:({values:b,setFieldValue:y})=>{var S;return J.useEffect(()=>{var C,E;(C=b.file)!=null&&C.name&&y("fileName",(E=b.file)==null?void 0:E.name)},[(S=b.file)==null?void 0:S.name]),v.jsxs(Ht.Form,{autoComplete:"off",children:[v.jsx(la,{name:"title",disabled:l,required:!0,margin:"none"}),v.jsxs(F.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",children:[v.jsx(uC,{name:"file",readOnly:i}),b.fileName&&v.jsx("span",{style:{margin:"6px 0 0 10px"},children:b.fileName}),v.jsx(Jn,{name:"fileName",id:"fileName-err"})]}),v.jsxs(F.DialogActions,{sx:{px:0},children:[v.jsx(F.Button,{onClick:r,variant:"outlined",size:"small",children:"Cancel"}),v.jsx(F.Button,{type:"submit",color:"primary",variant:"contained",size:"small",disabled:l,children:e?"Update Attachment":"Add New Attachment"})]})]})}})};function _te(t){return Ue("MuiAlert",t)}const d_=We("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),Nte=Be(v.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Lte=Be(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),$te=Be(v.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.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"}),"ErrorOutline"),Fte=Be(v.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Rte=Be(v.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"}),"Close"),Bte=t=>{const{variant:e,color:n,severity:r,classes:o}=t,i={root:["root",`color${Ae(n||r)}`,`${e}${Ae(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return qe(i,_te,o)},Vte=ye(ha,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Ae(n.color||n.severity)}`]]}})(Dt(({theme:t})=>{const e=t.palette.mode==="light"?na:Ml,n=t.palette.mode==="light"?Ml:na;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(Vn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${r}StandardBg`]:n(t.palette[r].light,.9),[`& .${d_.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Vn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${d_.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Vn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${r}FilledColor`],backgroundColor:t.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)}}}))]}})),zte=ye("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Hte=ye("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),jte=ye("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),f_={success:v.jsx(Nte,{fontSize:"inherit"}),warning:v.jsx(Lte,{fontSize:"inherit"}),error:v.jsx($te,{fontSize:"inherit"}),info:v.jsx(Fte,{fontSize:"inherit"})},p_=_.forwardRef(function(e,n){const r=xt({props:e,name:"MuiAlert"}),{action:o,children:i,className:s,closeText:a="Close",color:l,components:u={},componentsProps:f={},icon:h,iconMapping:m=f_,onClose:g,role:b="alert",severity:y="success",slotProps:S={},slots:C={},variant:E="standard",...T}=r,w={...r,color:l,severity:y,variant:E,colorSeverity:l||y},O=Bte(w),A={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...C},slotProps:{...f,...S}},[N,D]=Bt("root",{ref:n,shouldForwardComponentProp:!0,className:_e(O.root,s),elementType:Vte,externalForwardedProps:{...A,...T},ownerState:w,additionalProps:{role:b,elevation:0}}),[L,k]=Bt("icon",{className:O.icon,elementType:zte,externalForwardedProps:A,ownerState:w}),[I,$]=Bt("message",{className:O.message,elementType:Hte,externalForwardedProps:A,ownerState:w}),[H,z]=Bt("action",{className:O.action,elementType:jte,externalForwardedProps:A,ownerState:w}),[R,B]=Bt("closeButton",{elementType:ba,externalForwardedProps:A,ownerState:w}),[W,U]=Bt("closeIcon",{elementType:Rte,externalForwardedProps:A,ownerState:w});return v.jsxs(N,{...D,children:[h!==!1?v.jsx(L,{...k,children:h||m[y]||f_[y]}):null,v.jsx(I,{...$,children:i}),o!=null?v.jsx(H,{...z,children:o}):null,o==null&&g?v.jsx(H,{...z,children:v.jsx(R,{size:"small","aria-label":a,title:a,color:"inherit",onClick:g,...B,children:v.jsx(W,{fontSize:"small",...U})})}):null]})});process.env.NODE_ENV!=="production"&&(p_.propTypes={action:c.node,children:c.node,classes:c.object,className:c.string,closeText:c.string,color:c.oneOfType([c.oneOf(["error","info","success","warning"]),c.string]),components:c.shape({CloseButton:c.elementType,CloseIcon:c.elementType}),componentsProps:c.shape({closeButton:c.object,closeIcon:c.object}),icon:c.node,iconMapping:c.shape({error:c.node,info:c.node,success:c.node,warning:c.node}),onClose:c.func,role:c.string,severity:c.oneOfType([c.oneOf(["error","info","success","warning"]),c.string]),slotProps:c.shape({action:c.oneOfType([c.func,c.object]),closeButton:c.oneOfType([c.func,c.object]),closeIcon:c.oneOfType([c.func,c.object]),icon:c.oneOfType([c.func,c.object]),message:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({action:c.elementType,closeButton:c.elementType,closeIcon:c.elementType,icon:c.elementType,message:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["filled","outlined","standard"]),c.string])});const tu=t=>{var g;const{noIcon:e=!1,children:n,severity:r="success",variant:o="leftBorder",sx:i,title:s,...a}=t,{palette:l}=F.useTheme(),u=e?{icon:!1}:{},f=o==="leftBorder"?"standard":o,h=o==="leftBorder"?{...i,borderLeft:`4px solid ${(g=l[r])==null?void 0:g.main}`}:i,m=s?{icon:{sx:{mt:"6px"}}}:{};return v.jsxs(p_,{severity:r,variant:f,sx:h,slotProps:m,...u,...a,children:[s&&v.jsx(F.Typography,{variant:"h3",children:s}),n]})},h_=t=>v.jsx(tu,{severity:"error",...t});function m_({fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onSelectCitations:i,onCancel:s,initialSelectedIds:a=[],onContentUpdate:l,onTitleChanged:u,onError:f=()=>{}}){const[h,m]=J.useState("Insert Citation/Attachment(s)"),[g,b]=J.useState(a),[y,S]=J.useState(void 0),[C,E]=J.useState(void 0);J.useEffect(()=>l==null?void 0:l(),[h,g]),J.useEffect(()=>E(void 0),[h]),J.useEffect(()=>{C&&f(C.err)},[C]);const T=async(A,N)=>{if(h==="Edit Citation"){if(A.id===void 0)throw Error("Failed to update citation. Citation is missing id");await n(A).then(D=>{m("Insert Citation/Attachment(s)"),N&&(u==null||u(D))}).catch(D=>E({title:"Failed to update citation",err:D}))}else h==="Add Citation"&&await e(A).then(D=>{b([...g,D.id]),m("Insert Citation/Attachment(s)")}).catch(D=>E({title:"Failed to create citation",err:D}))},w=async(A,N)=>{if(h==="Edit Attachment"){if(A.id===void 0)throw Error("Failed to update citation. Citation is missing id");await n(A).then(D=>{m("Insert Citation/Attachment(s)"),N&&(u==null||u(D))}).catch(D=>E({title:"Failed to update attachment",err:D}))}else h==="Add Attachment"&&await o(A).then(D=>{b([...g,D.id]),m("Insert Citation/Attachment(s)")}).catch(D=>E({title:"Failed to upload attachment",err:D}))};let O=null;return h==="Insert Citation/Attachment(s)"?O=v.jsx(Xee,{fetchExistingCitations:t,onCancel:s,onNewCitation:()=>{S(void 0),m("Add Citation")},onNewAttachment:()=>{S(void 0),m("Add Attachment")},onEditCitation:A=>{S(A.id),m("Edit Citation")},onEditAttachment:A=>{S(A.id),m("Edit Attachment")},onSelect:i,selectedIds:g,toggleCheckbox:A=>{const N=g.includes(A.id);b(N?g.filter(D=>D!==A.id):[...g,A.id])},onError:f}):h==="Add Citation"||h==="Edit Citation"?O=v.jsx(Qee,{id:y,onSave:T,onCancel:()=>m("Insert Citation/Attachment(s)"),getCitationById:r,setError:E}):(h==="Add Attachment"||h==="Edit Attachment")&&(O=v.jsx(Pte,{id:y,onSave:w,onCancel:()=>m("Insert Citation/Attachment(s)"),getCitationById:r,disableFileUpload:h==="Edit Attachment",setError:E})),v.jsxs(F.Box,{width:"500px",children:[v.jsx(F.Typography,{variant:"h6",children:h}),C&&v.jsx(h_,{"data-testid":"citation-menu-error",onClose:()=>E(void 0),children:C.title}),v.jsx(F.Box,{paddingTop:"8px",children:O})]})}const Wte=qt({name:{CitationBubbleMenuTipTap:g_}})(t=>({content:{padding:t.spacing(1.5,2,.5),backgroundColor:"#f9f9f9"}}));function g_({fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onTitleChanged:i,...s}){const{classes:a}=Wte(),l=yt();if(!(l!=null&&l.isEditable))return null;if(!("citationBubbleMenuHandler"in l.storage))throw new Error("You must add the CitationBubbleMenuHandler extension to the useEditor `extensions` array in order to use this component!");const u=l.storage.citationBubbleMenuHandler,f=u.isOpen,h=u.selectedIds,m=u.selectedNodePos,g=()=>{!l||!m||l.chain().focus().deleteRange({from:m,to:m+1}).run()},b=T=>{l&&l.chain().focus().insertContent({type:"citation",attrs:{ids:T}}).run()},y=T=>{!l||!m||l.chain().focus().command(({tr:w})=>{const O=m,A=w.doc.nodeAt(O);return A?(w.setNodeMarkup(O,void 0,{...A.attrs,ids:T}),!0):!1}).run()},S=T=>{T.length===0?g():h.length===0?b(T):y(T)},C=T=>{S(T),l.commands.closeCitationBubbleMenu()},E=()=>{S(h),l.commands.closeCitationBubbleMenu()};return v.jsx(Tf,{editor:l,open:f,...u.bubbleMenuOptions,...s,children:v.jsx("div",{className:a.content,children:v.jsx(m_,{fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onSelectCitations:C,onCancel:E,initialSelectedIds:h,onContentUpdate:()=>{requestAnimationFrame(()=>{l!=null&&l.view&&l.view.dispatch(l.view.state.tr)})},onTitleChanged:i})})})}const qte=on.create({name:"starterKit",addExtensions(){const t=[];return this.options.bold!==!1&&t.push(ZD.configure(this.options.bold)),this.options.blockquote!==!1&&t.push(JD.configure(this.options.blockquote)),this.options.bulletList!==!1&&t.push(eP.configure(this.options.bulletList)),this.options.code!==!1&&t.push(tP.configure(this.options.code)),this.options.codeBlock!==!1&&t.push(nP.configure(this.options.codeBlock)),this.options.document!==!1&&t.push(rP.configure(this.options.document)),this.options.dropcursor!==!1&&t.push(oP.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&t.push(iP.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&t.push(sP.configure(this.options.hardBreak)),this.options.heading!==!1&&t.push(CD.configure(this.options.heading)),this.options.history!==!1&&t.push(pP.configure(this.options.history)),this.options.horizontalRule!==!1&&t.push(hP.configure(this.options.horizontalRule)),this.options.italic!==!1&&t.push(mP.configure(this.options.italic)),this.options.listItem!==!1&&t.push(PP.configure(this.options.listItem)),this.options.orderedList!==!1&&t.push(LP.configure(this.options.orderedList)),this.options.paragraph!==!1&&t.push($P.configure(this.options.paragraph)),this.options.strike!==!1&&t.push(RP.configure(this.options.strike)),this.options.text!==!1&&t.push(BP.configure(this.options.text)),t}}),Ute=()=>on.create({name:"citationBubbleMenuHandler",addStorage(){return{isOpen:!1,selectedIds:[],bubbleMenuOptions:void 0,selectedNodePos:void 0}},addCommands(){return{openCitationBubbleMenu:(t={},e)=>({editor:n,dispatch:r})=>{var a;const{doc:o}=n.state,i=e!==void 0?o.nodeAt(e):void 0,s=((a=i==null?void 0:i.attrs)==null?void 0:a.ids)??[];return n.getAttributes,r&&(this.storage.isOpen=!0,this.storage.selectedIds=s,this.storage.bubbleMenuOptions=t,this.storage.selectedNodePos=e),!0},closeCitationBubbleMenu:()=>({commands:t,dispatch:e})=>this.storage.isOpen?(t.focus(),e&&(this.storage.isOpen=!1,this.storage.selectedIds=[],this.storage.selectedNodePos=void 0),!0):!1}},onSelectionUpdate(){this.storage.isOpen&&!this.editor.isActive("citation")&&this.editor.commands.closeCitationBubbleMenu()},addKeyboardShortcuts(){return{"Mod-Shift-c":()=>(this.editor.commands.openCitationBubbleMenu(),!0)}}});function Kte(t){const e=yt(),n=J.useRef(null);return v.jsx(ht,{buttonRef:n,tooltipLabel:"Insert Citation",tooltipShortcutKeys:["mod","Shift","C"],disabled:!(e!=null&&e.isEditable),onClick:()=>e==null?void 0:e.commands.openCitationBubbleMenu({anchorEl:n.current,placement:"bottom"}),...t,children:v.jsxs(F.Box,{display:"flex",flexDirection:"row",gap:"4px",alignItems:"center",children:[v.jsx(kB,{fontSize:"small"}),v.jsx(F.Typography,{variant:"body2",children:"Insert Citation"})]})})}const y_=J.createContext(void 0),b_=()=>{const t=J.useContext(y_);if(!t)throw new Error("useSync must be used inside CitationFieldProvider");return t},Yte=({node:t,HTMLAttributes:e,selected:n})=>{const r=t.attrs.ids||[],{citations:o}=b_(),[i,s]=J.useState(String(r));return J.useEffect(()=>{const l=o.filter(u=>r.includes(u.id)).map(u=>u.title).join(", ");s(l)},[o,r]),v.jsx(f0,{as:"span",...e,children:v.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),a.stopPropagation()},className:n?"selected-citation-link":"citation-link",children:i})})},Gte=en.create({name:"citation",group:"inline",inline:!0,atom:!0,selectable:!0,addAttributes(){return{ids:{default:[],parseHTML:t=>{const e=t.getAttribute("ids");return e?e.split(",").map(n=>parseInt(n.trim(),10)).filter(n=>!isNaN(n)):[]},renderHTML:t=>({ids:Array.isArray(t.ids)?t.ids.join(","):""})}}},parseHTML(){return[{tag:"citation"}]},renderHTML({HTMLAttributes:t}){return["citation",gt(t)]},addNodeView(){return p0(Yte)},addProseMirrorPlugins(){return[new Qt({props:{handleClickOn:(t,e,n,r,o,i)=>n&&n.type.name==="citation"?(this.editor.commands.openCitationBubbleMenu({},r),!0):!1}})]}}),Jte=t=>{const e=J.useMemo(()=>[qte,FP.configure({placeholder:"Start typing here..."}),Ute(),Gte],[]),{name:n,label:r=Cn(n),hideLabel:o=!1,required:i=!1,readOnly:s=!1,margin:a="dense",fetchExistingCitations:l,onCreateCitation:u,onUpdateCitation:f,getCitationById:h,onStoreAttachment:m,onError:g=()=>{}}=t,[b,y,S]=Ht.useField({name:n}),{setValue:C}=S,{value:E}=b,{resync:T,addUpdateCitation:w}=b_();J.useEffect(()=>{var L,k;E!==((k=(L=O==null?void 0:O.current)==null?void 0:L.editor)==null?void 0:k.getHTML())&&setTimeout(()=>{var I,$,H;(H=($=(I=O==null?void 0:O.current)==null?void 0:I.editor)==null?void 0:$.commands)==null||H.setContent(E),T()},0)},[E]),J.useEffect(()=>{E&&setTimeout(()=>{var L,k,I;(I=(k=(L=O==null?void 0:O.current)==null?void 0:L.editor)==null?void 0:k.commands)==null||I.setContent(E),T()},0)},[]);const O=J.useRef(null),A={normal:{marginTop:"16px",marginBottom:"8px"},dense:{marginTop:"8px",marginBottom:"4px"},none:{margin:0}},N=()=>{var I,$;const L=(($=(I=O.current)==null?void 0:I.editor)==null?void 0:$.getHTML())??"<p></p>",k=!L.replace(/<\/?p>|<br>/g,"").trim();C(k?"<p></p>":L)},D=v.jsxs(F.Box,{id:`citation-field_${n}`,sx:{"& .ProseMirror":{"& h1, & h2, & h3, & h4, & h5, & h6":{scrollMarginTop:s?0:50}}},...A[a],children:[v.jsx(Q2,{ref:O,extensions:e,content:E,editable:!s,renderControls:s?void 0:()=>v.jsx(kf,{children:v.jsx(Kte,{})}),onBlur:N,RichTextFieldProps:{variant:"outlined",MenuBarProps:{hide:s}},children:()=>v.jsx(g_,{fetchExistingCitations:l,onCreateCitation:L=>u(L).then(k=>(w(k),k)),onUpdateCitation:f,getCitationById:h,onStoreAttachment:m,onTitleChanged:w,onError:g})}),v.jsx(Jn,{name:n,id:`${n}-err`})]});return v.jsxs(F.Box,{display:"flex",flexDirection:"column",width:"100%",children:[!o&&v.jsx(F.InputLabel,{htmlFor:`citation-field_${n}`,required:i,children:r}),D]})},Zte=t=>{const{label:e="Return to Top",icon:n=_C,scrollThresholdPx:r=100}=t,o=F.useScrollTrigger({threshold:r}),i=J.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]);return v.jsx(F.Zoom,{in:o,children:v.jsx(F.Box,{sx:{position:"fixed",bottom:32,right:32,zIndex:1},children:v.jsxs(F.Fab,{onClick:i,color:"primary",size:"small",variant:"extended","aria-label":"Scroll back to top",children:[v.jsx(n,{fontSize:"medium"}),e]})})})},Xte=()=>{const{values:t,errors:e,status:n}=Ht.useFormikContext(),{palette:r}=F.useTheme();return v.jsx(F.Paper,{style:{backgroundColor:r.mode==="dark"?"#303030":"#f0f0f0",margin:"10px 0"},children:v.jsxs(F.List,{children:[v.jsxs(F.ListItem,{children:[v.jsx(F.Typography,{display:"block",variant:"h6",children:"Values"}),v.jsx("br",{}),v.jsx(F.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(t,null,2)})]}),v.jsx(F.Divider,{variant:"inset",component:"li"}),v.jsxs(F.ListItem,{id:"testing",children:[v.jsx(F.Typography,{display:"block",variant:"h6",children:"Errors"}),v.jsx("br",{}),v.jsx(F.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(e,null,2)})]}),v.jsxs(F.ListItem,{children:[v.jsx(F.Typography,{display:"block",variant:"h6",children:"Status"}),v.jsx("br",{}),v.jsx(F.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(n,null,2)})]})]})})},Qte=t=>{const{steps:e,orientation:n,inlineLabel:r=n=="vertical",isResponsive:o=!1}=t,{width:i}=KP();let s=!r,a=n;o&&(n&&console.warn("Stepper: Ignoring orientation. isResponsive is set to true, so the orientation is determined automatically based on the window size."),a=i<600?"vertical":"horizontal",a=="vertical"?s=!1:s=!r),n=="vertical"&&!r&&(console.warn("Stepper: ignoring inlineLabel={false}. Must use inline labels when orientation is vertical"),s=!1);const l=["steps","inlineLabel","orientation","isResponsive"],u={alternativeLabel:s,orientation:a,...Yn({...t},l)};return v.jsx(F.Stepper,{...u,children:e.map(f=>v.jsx(F.Step,{children:v.jsx(F.StepLabel,{children:f})},f))})},ene=t=>{const{name:e,label:n=Cn(e),labelProps:r={fontSize:"1.1em",color:"#808080",fontWeight:"600"},initialState:o,renderFormGroup:i,addButtonContent:s="Add Another",removeButtonContent:a=t.removePosition==="right"?v.jsx(s5,{}):"Remove",variant:l="card",addButtonSx:u,removeButtonSx:f,allowRemoveAll:h=!1,readOnly:m=!1,emptyListMsg:g="None",showDivider:b=!1,removePosition:y="bottom"}=t,[S]=Ht.useField({name:e}),{value:C}=S,E=T=>({display:"flex",flexDirection:T==="bottom"?"column":"row",alignItems:T==="bottom"?"flex-start":"center"});return v.jsxs(F.FormControl,{fullWidth:!0,children:[v.jsx(F.Typography,{...r,children:n}),m&&S.value.length===0?v.jsx(F.Typography,{children:g}):v.jsx(Ht.FieldArray,{name:e,render:T=>v.jsxs("div",{children:[C.map((w,O)=>v.jsx(J.Fragment,{children:v.jsx(tne,{variant:l,content:v.jsxs(F.Box,{"data-testid":"form-group-container",sx:typeof y=="string"?E(y):{...y},children:[v.jsxs(F.Box,{width:"100%",children:[i(`${e}.${O}`,O),b&&O!==C.length-1&&v.jsx(F.Divider,{"data-testid":"divider"})]}),!m&&C.length>(h?0:1)&&v.jsx(F.Button,{"data-testid":"repeatable-form-group_remove-btn",sx:f,onClick:()=>T.remove(O),children:a})]})})},`${e}-${O}`)),!m&&v.jsx(F.Button,{"data-testid":"repeatable-form-group_add-btn",onClick:()=>T.push(o),sx:u,children:s})]})})]})},tne=({variant:t,content:e})=>{switch(t){case"card":return v.jsx(F.Card,{"data-testid":"repeatable-form-group_card",sx:{padding:"8px",marginBottom:"8px"},children:v.jsx(F.CardContent,{children:e})});case"elevatedCard":return v.jsx(F.Card,{"data-testid":"repeatable-form-group_elevated-card",elevation:4,sx:{border:"unset",padding:"8px",marginBottom:"8px"},children:v.jsx(F.CardContent,{children:e})});case"none":return e}},S1=t=>{const{open:e=!1,onClose:n,title:r,children:o,actions:i,closeBtnLabel:s="Cancel",closeButtonPosition:a="bottom",closeButtonProps:l={color:"primary",variant:"text"},disableDismiss:u=!1,...f}=t;if(!e)return null;const h=()=>{if(a!=="top")return v.jsx(F.Button,{className:"MBv2_Modal_Close",onClick:t.onClose,...l,children:s})},m=()=>i?v.jsx(F.DialogActions,{className:"MBv2_Modal_Actions",children:v.jsxs(F.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",gap:"0.25rem",children:[v.jsx(F.Box,{children:h()}),v.jsxs(F.Box,{display:"flex",gap:".25rem",children:[...i]})]})}):v.jsx(F.DialogActions,{className:"MBv2_Modal_Actions",children:v.jsx(F.Box,{children:h()})});return v.jsxs(F.Dialog,{className:"MBv2_Modal",open:e,onClose:()=>{u||n==null||n()},...f,children:[typeof r=="string"?v.jsx(F.DialogTitle,{className:"MBv2_Modal_Title",children:v.jsxs(F.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[r,a!=="bottom"&&v.jsx(F.IconButton,{"data-testid":"modal-header-close-btn",onClick:n,children:v.jsx(DB,{})})]})}):r,o&&(typeof o=="string"?v.jsx(F.DialogContent,{className:"MBv2_Modal_Content",children:v.jsx(F.DialogContentText,{className:"MBv2_Modal_Content_Text",children:o})}):o),m()]})},nne=t=>{const{confirmBtnLabel:e,onConfirm:n,confirmButtonProps:r={color:"primary",variant:"contained"},closeButtonProps:o={},...i}=t;return v.jsx(S1,{actions:[v.jsx(F.Button,{className:"MBv2_ConfirmationModal_ConfirmBtn",onClick:n,...r,children:e})],...i})},rne=t=>{const{closeBtnLabel:e="OK",closeButtonProps:n={color:"primary",variant:"contained"}}=t;return v.jsx(S1,{closeBtnLabel:e,closeButtonProps:n,...t})},one=t=>{const{primaryBtnLabel:e,onPrimaryAction:n,primaryActionProps:r={color:"primary",variant:"contained"},secondaryBtnLabel:o,onSecondaryAction:i,secondaryActionProps:s={color:"primary",variant:"outlined"},...a}=t;return v.jsx(S1,{actions:[v.jsx(F.Button,{className:"MBv2_DecisionModal_SecondaryAction",onClick:i,...s,children:o}),v.jsx(F.Button,{className:"MBv2_DecisionModal_PrimaryAction",onClick:n,...r,children:e})],...a})},ine=t=>{const{featureMenuOptions:e=[],copyright:n,logo:r,sx:o={},fontColor:i="primary"}=t,{palette:s}=F.useTheme(),a=Xr.useNavigate();return v.jsxs(F.Box,{className:"MBv2_Footer",sx:{backgroundColor:s.mode==="dark"?"#222222":"#ededed",padding:"25px 30px",...o},children:[v.jsx(F.Box,{className:"MBv2_Footer_Logo",sx:{display:"flex",gap:2,alignItems:"center",paddingBottom:1},children:typeof r=="string"?v.jsx("img",{draggable:"false",src:r,style:{width:"200px"},alt:"logo"}):r}),v.jsxs(F.Box,{display:"flex",justifyContent:"space-between",flexWrap:"wrap",className:"MBv2_Footer_Nav_Links_Container",gap:2,children:[v.jsx(F.Box,{sx:{flexGrow:1},className:"MBv2_Footer_Nav_Links",display:"flex",flexDirection:"row",justifyContent:"flex-start",gap:3,children:e==null?void 0:e.map(l=>v.jsx(F.Link,{"data-testid":l.label,sx:{cursor:"pointer",fontSize:15},color:i,...gl(l,a),children:l.label},l.label))}),n&&v.jsx(F.Typography,{style:{fontSize:15},"data-testid":"copyright",className:"MBv2_Footer_Copyright",color:i,children:n})]})]})},v_=t=>{const{menuOptionLists:e,anchor:n="left",children:r}=t,{pathname:o}=Xr.useLocation(),i=Xr.useNavigate(),[s,a]=J.useState(!1),l=(m,g)=>v.jsx(F.MenuList,{children:m.map(b=>v.jsxs(F.MenuItem,{...gl(b,i,()=>a(!1)),children:[b.icon&&v.jsx(F.ListItemIcon,{children:b.icon}),v.jsx(F.ListItemText,{primary:b.label})]},`mobile-drawer-group-${g}-item-${b.path}`))}),f=(()=>{if(e){const m=e.filter(g=>g&&g.length>0);return m.length===0?null:m.map((g,b)=>v.jsxs(J.Fragment,{children:[l(g,b),b<m.length-1&&v.jsx(F.Divider,{})]},`mobile-drawer-group-${b}`))}return r?v.jsx(F.Box,{role:"presentation",onClick:()=>a(!1),children:r}):null})(),h=f??!1;return J.useEffect(()=>{a(!1)},[o]),h&&v.jsxs(v.Fragment,{children:[v.jsx(F.IconButton,{onClick:()=>a(!0),color:"inherit",title:"Menu",children:v.jsx(t5,{})}),v.jsx(F.Drawer,{"data-testid":"mobile-drawer",anchor:n,open:s,onClose:()=>a(!1),children:v.jsx(F.Box,{sx:{width:300},display:"flex",flexDirection:"column",justifyContent:"space-between",children:v.jsx(F.Box,{display:"flex",justifyContent:"start",flexDirection:"column",children:f})})})]})},x_=t=>{const{env:e,isProd:n}=t;return n?null:v.jsx(F.Paper,{sx:{borderRadius:0,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs(F.Typography,{variant:"h6",color:"error",children:[e," Environment - Test Data Only"]})})},S_=t=>{const{label:e,menuOptions:n=[],icon:r}=t,o=Xr.useNavigate(),[i,s]=_.useState(null),a=!!i,l=f=>{s(f.currentTarget)},u=()=>{s(null)};return n.length===0?null:v.jsxs(v.Fragment,{children:[v.jsx(F.Button,{startIcon:r,variant:"outlined",color:"inherit",sx:{minWidth:0,padding:1},onClick:l,children:e}),v.jsx(F.Menu,{anchorEl:i,open:a,onClick:u,children:n.map(f=>v.jsxs(F.MenuItem,{...gl(f,o),children:[f.icon&&v.jsx(F.ListItemIcon,{children:f.icon}),v.jsx(F.ListItemText,{primary:f.label})]},f.label))})]})},C_=t=>{const{displayName:e,userMenuOptions:n}=t;return v.jsx(S_,{label:e,menuOptions:n,icon:v.jsx(r5,{})})},Mp=t=>{const{menuOptions:e,orientation:n="horizontal",activeTabIdx:r,sx:o=n=="vertical"?{"& .MuiTabs-indicator":{left:0}}:void 0,slotProps:i={indicator:{sx:n=="horizontal"?{height:4}:{width:4}}}}=t,{palette:s}=F.useTheme(),a=Xr.useNavigate();return v.jsx(F.Tabs,{orientation:n,value:r??!1,sx:o,slotProps:i,children:e.map((l,u)=>v.jsx(F.Tab,{icon:l.icon,label:l.label,value:u,...gl(l,a),sx:{alignItems:n=="vertical"?"flex-start":void 0,borderBottom:n=="vertical"?"1px solid":void 0,borderColor:"divider","&.Mui-selected":{backgroundColor:n=="vertical"?s.grey[s.mode=="dark"?800:50]:void 0,color:"inherit"}}},l.label))})},w_=t=>{const{featureMenuOptions:e=[],activeTabIdx:n,sx:r}=t;return e.length>0&&v.jsx(F.Paper,{sx:{pl:4,pr:4,borderRadius:0},"data-testid":"navBar",children:v.jsx(Mp,{menuOptions:e,activeTabIdx:n,sx:r})})},T_=t=>{const{onToggle:e}=t,{palette:n}=F.useTheme(),r=n.mode==="dark";return v.jsx(F.IconButton,{onClick:e,color:"inherit",title:"Dark Mode Toggle",children:r?v.jsx(NC,{}):v.jsx(PC,{})})},sne=t=>{const{envInfo:e,headerRef:n,logo:r,featureMenuOptions:o=[],userMenuOptions:i=[],onToggleDarkMode:s,quickLinks:a=[],displayName:l,banner:u,position:f="fixed",children:h,sx:m,navBarSx:g}=t,b=Xr.useNavigate(),y=F.useMediaQuery(F.useTheme().breakpoints.down("sm")),{palette:S}=F.useTheme(),{pathname:C}=Xr.useLocation(),E=S.mode==="dark",[T,w]=_.useState(void 0);_.useEffect(()=>{const N=o.findIndex(D=>D.path&&C.startsWith(D.path));w(N>=0?N:void 0)},[C,o]);const O=s&&v.jsx(T_,{onToggle:s}),A=s&&(y||!y&&l)?[{icon:E?v.jsx(NC,{}):v.jsx(PC,{}),label:`Switch to ${E?"Light":"Dark"} mode`,onClick:s},...i]:i;return v.jsxs(F.AppBar,{ref:n,position:f,sx:m,elevation:4,children:[e&&v.jsx(x_,{...e}),u,v.jsxs(F.Toolbar,{sx:{color:"white",display:"flex",justifyContent:"space-between",gap:2},children:[v.jsx(F.Button,{disableRipple:!0,component:Xr.Link,to:"/",children:r&&typeof r=="string"?v.jsx("img",{draggable:"false",src:r,style:{width:"200px",filter:"brightness(0) invert(1)"},alt:"logo"}):r}),v.jsxs(F.Box,{display:"flex",gap:2,alignItems:"center",children:[!l&&!y&&O,y&&v.jsx(v_,{menuOptionLists:[o,a,A],anchor:"right"}),!y&&v.jsxs(v.Fragment,{children:[v.jsx(F.Box,{display:"flex",gap:0,children:a==null?void 0:a.map((N,D)=>v.jsxs(F.Box,{display:"flex",alignItems:"center",children:[D>0&&v.jsx(F.Typography,{className:"quickLink-divider",color:S.primary.contrastText,children:"|"}),v.jsx(F.Button,{variant:"text",sx:{color:"white"},...gl(N,b),children:v.jsxs(F.Box,{display:"flex",gap:"3px",alignItems:"center",children:[N.icon,N.label]})})]},N.label))}),h,l&&v.jsx(C_,{displayName:l,userMenuOptions:A})]})]})]}),!y&&v.jsx(w_,{featureMenuOptions:o,activeTabIdx:T,sx:g})]})},ane=t=>{const{sx:e,menuOptions:n=[]}=t,{pathname:r}=Xr.useLocation(),o=F.useMediaQuery(F.useTheme().breakpoints.down("sm")),[i,s]=J.useState(void 0);return J.useEffect(()=>{const a=n.findIndex(l=>l.path&&r.startsWith(l.path))??-1;s(a>=0?a:void 0)},[r,n]),!o&&n.length>0&&v.jsx(F.Box,{sx:e,children:v.jsx(F.Card,{sx:{height:"100%",width:200},children:v.jsx(Mp,{orientation:"vertical",menuOptions:n,activeTabIdx:i})})})},lne=t=>{const{featureMenuOptions:e=[],activeTabIdx:n,sx:r}=t,{palette:o}=F.useTheme();return e.length>0&&v.jsx(Mp,{menuOptions:e,activeTabIdx:n,sx:{margin:"8px",backgroundColor:o.primary.dark,borderRadius:"8px","& .MuiTab-root":{color:o.secondary.light,flexDirection:"row",gap:"2px","& .MuiTab-icon":{marginBottom:"unset"},minHeight:"58px"},"& .MuiTab-root.Mui-selected":{color:o.primary.contrastText,fontSize:"120%"},"& .MuiTabs-indicator":{display:"none"},...r}})},cne=t=>v.jsx(tu,{severity:"success",...t}),une=t=>v.jsx(tu,{severity:"info",...t}),dne=t=>v.jsx(tu,{severity:"warning",...t}),E_=t=>{const{crumbInfo:e}=t,n=Xr.useNavigate();return v.jsx(F.Breadcrumbs,{"aria-label":"breadcrumb",separator:v.jsx(n5,{color:"primary"}),sx:{marginBottom:2},children:e.map(({label:r,path:o},i)=>o&&i<e.length-1?v.jsx(F.Link,{color:"primary",sx:{cursor:"pointer"},onClick:()=>n(o),children:r},r):v.jsx(F.Typography,{color:"primary",children:r},r))})},fne=t=>{const{title:e,message:n,type:r,onClose:o,autoHideDuration:i=8e3,variant:s="leftBorder",elevation:a=6}=t,l=pne(r);return v.jsx(F.Snackbar,{"data-testid":"message-snackbar",anchorOrigin:{vertical:"bottom",horizontal:"right"},open:!0,onClose:u=>{u==null&&o()},autoHideDuration:i,children:v.jsx(tu,{"data-testid":"message-snackbar-alert",severity:l,iconMapping:{info:M_(r),warning:M_(r)},onClose:o,elevation:a,variant:s,children:n?v.jsxs(v.Fragment,{children:[v.jsx(F.AlertTitle,{"data-testid":"alertTitle",sx:{fontWeight:"bold"},children:e}),n]}):e})})},pne=t=>t=="logout"?"info":t=="timeout"?"warning":t,M_=t=>{if(t=="timeout")return v.jsx(TB,{});if(t=="logout")return v.jsx(e5,{})},hne=t=>{const{title:e,createButtonLabel:n,showAddButton:r=!1,onAdd:o=()=>alert("Not implemented yet"),breadcrumbs:i=[],children:s,sx:a}=t,l=F.useMediaQuery(F.useTheme().breakpoints.down("sm"));return r&&o.toString()==='() => alert("Not implemented yet")'&&console.warn('PageHeader: "showAddButton" is true but "onAdd" is not defined.'),v.jsxs(F.Box,{sx:a,children:[i.length>0&&v.jsx(E_,{crumbInfo:i}),v.jsxs(F.Box,{className:"MBv2_PageHeader_Header",display:"flex",flexDirection:l?"column":"row",justifyContent:"space-between",alignItems:"center",gap:1,children:[v.jsxs(F.Box,{className:"MBv2_PageHeader_TitleAndCreateBtn",display:"flex",flexDirection:"row",justifyContent:l||!s?"space-between":"start",alignItems:"center",width:"100%",gap:1,children:[typeof e=="string"?v.jsx(F.Typography,{className:"MBv2_PageHeader_Title",variant:"h2",children:e}):e,r&&v.jsxs(p1,{className:"MBv2_PageHeader_CreateBtn",onClick:()=>o(),children:[v.jsx(EB,{style:{marginRight:"0.5rem"}}),n]})]}),s&&v.jsx(F.Box,{width:l?"100%":"50%",children:s})]})]})},mne=t=>{const{title:e,titleIcon:n,fullWidthIcon:r=!1,children:o,actionLabel:i,action:s,sx:a}=t,l=F.useMediaQuery(F.useTheme().breakpoints.down("sm"));return v.jsxs(F.Card,{sx:a||{padding:"30px 40px",display:"flex",flexDirection:"column",gap:"1rem"},children:[n&&v.jsx(F.Box,{className:"MBv2_SingleActionCard_Img",sx:[r?{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"20px",marginBottom:"10px"}:{display:"inline"}],children:n}),v.jsx(F.Typography,{variant:"h1",display:"inline",fontSize:"calc(20px + .9vw)",className:"MBv2_SingleActionCard_Title",children:e}),o,v.jsx(F.Button,{variant:"contained",color:"primary",onClick:s,fullWidth:l,className:"MBv2_SingleActionCard_ActionButton",children:i})]})},gne=({children:t,fetchExistingCitations:e})=>{const[n,r]=J.useState([]),o=J.useCallback(async()=>{const s=await e();r(a=>{const l=new Set(a.map(f=>f.id));return[...a.filter(f=>!l.has(f.id)),...s]})},[e]),i=J.useCallback(s=>{const a=n.findIndex(l=>l.id===s.id);r(a!==-1?l=>{const u=[...l];return u[a]=s,u}:[...n,s])},[n]);return v.jsx(y_.Provider,{value:{citations:n,resync:o,addUpdateCitation:i},children:t})};Ne.AlertModal=rne,Ne.Autocomplete=aC,Ne.Breadcrumbs=E_,Ne.Button=p1,Ne.Checkbox=tB,Ne.CheckboxGroup=nB,Ne.CitationField=Jte,Ne.CitationFieldProvider=gne,Ne.CitationMenu=m_,Ne.ConfirmationModal=nne,Ne.DarkModeToggle=T_,Ne.DateField=Id,Ne.DateRangeField=Mq,Ne.DecisionModal=one,Ne.Drawer=v_,Ne.DynamicAutocomplete=QR,Ne.EnvironmentBanner=x_,Ne.Error=Jn,Ne.ErrorAlert=h_,Ne.FileList=iB,Ne.FileUpload=uC,Ne.FloatingNavBar=lne,Ne.Footer=ine,Ne.FormDebugger=Xte,Ne.Header=sne,Ne.InfoAlert=une,Ne.LoadingIndicator=f1,Ne.Location=xB,Ne.MenuButton=S_,Ne.MultiAutocomplete=eB,Ne.NavBar=w_,Ne.PageHeader=hne,Ne.PaginatedTable=qP,Ne.ProfileMenu=C_,Ne.RadioGroup=DC,Ne.RangeSlider=SB,Ne.RepeatableFormGroup=ene,Ne.RichTextField=Zee,Ne.ScrollToTop=Zte,Ne.SearchField=p5,Ne.Select=CB,Ne.Sidebar=ane,Ne.SingleActionCard=mne,Ne.Snackbar=fne,Ne.Stepper=Qte,Ne.Submit=YP,Ne.SuccessAlert=cne,Ne.Switch=wB,Ne.Table=WP,Ne.Tabs=Mp,Ne.TextField=la,Ne.WarningAlert=dne,Object.defineProperty(Ne,Symbol.toStringTag,{value:"Module"})});