@zydon/common 1.1.63 → 1.1.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,269 @@
1
+ (function($,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("@mui/material"),require("@emotion/react"),require("react-dom"),require("@mui/x-date-pickers-pro"),require("@mui/lab"),require("@mui/x-data-grid-premium"),require("@emotion/styled"),require("react-hook-form")):typeof define=="function"&&define.amd?define(["exports","react","@mui/material","@emotion/react","react-dom","@mui/x-date-pickers-pro","@mui/lab","@mui/x-data-grid-premium","@emotion/styled","react-hook-form"],v):($=typeof globalThis<"u"?globalThis:$||self,v($.common={},$.React,$.material,$.react,$.reactDom,$.xDatePickersPro,$.lab,$.xDataGridPremium,$.emStyled,$.reactHookForm))})(this,function($,v,M,bv,xv,va,HO,ei,qO,Oe){"use strict";function UO(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 Ce=UO(v),wv={duration:2,ease:[.43,.13,.23,.96]},YO={animate:{fillOpacity:[0,0,1],pathLength:[1,.4,0],transition:wv}},GO=t=>{const e=(t==null?void 0:t.duration)||.32,n=(t==null?void 0:t.ease)||[.43,.13,.23,.96];return{duration:e,ease:n}},Ae=t=>{const e=(t==null?void 0:t.durationIn)||.64,n=(t==null?void 0:t.easeIn)||[.43,.13,.23,.96];return{duration:e,ease:n}},$e=t=>{const e=(t==null?void 0:t.durationOut)||.48,n=(t==null?void 0:t.easeOut)||[.43,.13,.23,.96];return{duration:e,ease:n}},ya=t=>{const e=(t==null?void 0:t.distance)||120,n=t==null?void 0:t.durationIn,r=t==null?void 0:t.durationOut,i=t==null?void 0:t.easeIn,o=t==null?void 0:t.easeOut;return{in:{initial:{opacity:0},animate:{opacity:1,transition:Ae},exit:{opacity:0,transition:$e}},inUp:{initial:{y:e,opacity:0},animate:{y:0,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{y:e,opacity:0,transition:$e({durationOut:r,easeOut:o})}},inDown:{initial:{y:-e,opacity:0},animate:{y:0,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{y:-e,opacity:0,transition:$e({durationOut:r,easeOut:o})}},inLeft:{initial:{x:-e,opacity:0},animate:{x:0,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{x:-e,opacity:0,transition:$e({durationOut:r,easeOut:o})}},inRight:{initial:{x:e,opacity:0},animate:{x:0,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{x:e,opacity:0,transition:$e({durationOut:r,easeOut:o})}},out:{initial:{opacity:1},animate:{opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{opacity:1,transition:$e({durationOut:r,easeOut:o})}},outUp:{initial:{y:0,opacity:1},animate:{y:-e,opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{y:0,opacity:1,transition:$e({durationOut:r,easeOut:o})}},outDown:{initial:{y:0,opacity:1},animate:{y:e,opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{y:0,opacity:1,transition:$e({durationOut:r,easeOut:o})}},outLeft:{initial:{x:0,opacity:1},animate:{x:-e,opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{x:0,opacity:1,transition:$e({durationOut:r,easeOut:o})}},outRight:{initial:{x:0,opacity:1},animate:{x:e,opacity:0,transition:Ae({durationIn:n,easeIn:i})},exit:{x:0,opacity:1,transition:$e({durationOut:r,easeOut:o})}}}},KO=t=>{const e=(t==null?void 0:t.distance)||720,n=t==null?void 0:t.durationIn,r=t==null?void 0:t.durationOut,i=t==null?void 0:t.easeIn,o=t==null?void 0:t.easeOut;return{in:{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,transition:$e({durationOut:r,easeOut:o})}},inUp:{initial:{scale:0,opacity:0,translateY:e},animate:{scale:1,opacity:1,translateY:0,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,translateY:e,transition:$e({durationOut:r,easeOut:o})}},inDown:{initial:{scale:0,opacity:0,translateY:-e},animate:{scale:1,opacity:1,translateY:0,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,translateY:-e,transition:$e({durationOut:r,easeOut:o})}},inLeft:{initial:{scale:0,opacity:0,translateX:-e},animate:{scale:1,opacity:1,translateX:0,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,translateX:-e,transition:$e({durationOut:r,easeOut:o})}},inRight:{initial:{scale:0,opacity:0,translateX:e},animate:{scale:1,opacity:1,translateX:0,transition:Ae({durationIn:n,easeIn:i})},exit:{scale:0,opacity:0,translateX:e,transition:$e({durationOut:r,easeOut:o})}},out:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,transition:Ae({durationIn:n,easeIn:i})}},outUp:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,translateY:-e,transition:Ae({durationIn:n,easeIn:i})}},outDown:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,translateY:e,transition:Ae({durationIn:n,easeIn:i})}},outLeft:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,translateX:-e,transition:Ae({durationIn:n,easeIn:i})}},outRight:{initial:{scale:1,opacity:1},animate:{scale:0,opacity:0,translateX:e,transition:Ae({durationIn:n,easeIn:i})}}}},XO=t=>{const e=t==null?void 0:t.durationIn,n=t==null?void 0:t.durationOut,r=t==null?void 0:t.easeIn,i=t==null?void 0:t.easeOut;return{inX:{initial:{rotateX:-180,opacity:0},animate:{rotateX:0,opacity:1,transition:Ae({durationIn:e,easeIn:r})},exit:{rotateX:-180,opacity:0,transition:$e({durationOut:n,easeOut:i})}},inY:{initial:{rotateY:-180,opacity:0},animate:{rotateY:0,opacity:1,transition:Ae({durationIn:e,easeIn:r})},exit:{rotateY:-180,opacity:0,transition:$e({durationOut:n,easeOut:i})}},outX:{initial:{rotateX:0,opacity:1},animate:{rotateX:70,opacity:0,transition:$e({durationOut:n,easeOut:i})}},outY:{initial:{rotateY:0,opacity:1},animate:{rotateY:70,opacity:0,transition:$e({durationOut:n,easeOut:i})}}}},ZO=t=>{const e=(t==null?void 0:t.distance)||160,n=t==null?void 0:t.durationIn,r=t==null?void 0:t.durationOut,i=t==null?void 0:t.easeIn,o=t==null?void 0:t.easeOut;return{inUp:{initial:{y:e},animate:{y:0,transition:Ae({durationIn:n,easeIn:i})},exit:{y:e,transition:$e({durationOut:r,easeOut:o})}},inDown:{initial:{y:-e},animate:{y:0,transition:Ae({durationIn:n,easeIn:i})},exit:{y:-e,transition:$e({durationOut:r,easeOut:o})}},inLeft:{initial:{x:-e},animate:{x:0,transition:Ae({durationIn:n,easeIn:i})},exit:{x:-e,transition:$e({durationOut:r,easeOut:o})}},inRight:{initial:{x:e},animate:{x:0,transition:Ae({durationIn:n,easeIn:i})},exit:{x:e,transition:$e({durationOut:r,easeOut:o})}},outUp:{initial:{y:0},animate:{y:-e,transition:Ae({durationIn:n,easeIn:i})},exit:{y:0,transition:$e({durationOut:r,easeOut:o})}},outDown:{initial:{y:0},animate:{y:e,transition:Ae({durationIn:n,easeIn:i})},exit:{y:0,transition:$e({durationOut:r,easeOut:o})}},outLeft:{initial:{x:0},animate:{x:-e,transition:Ae({durationIn:n,easeIn:i})},exit:{x:0,transition:$e({durationOut:r,easeOut:o})}},outRight:{initial:{x:0},animate:{x:e,transition:Ae({durationIn:n,easeIn:i})},exit:{x:0,transition:$e({durationOut:r,easeOut:o})}}}},QO=t=>{const e=t==null?void 0:t.durationIn,n=t==null?void 0:t.durationOut,r=t==null?void 0:t.easeIn,i=t==null?void 0:t.easeOut;return{inX:{initial:{scaleX:0,opacity:0},animate:{scaleX:1,opacity:1,transition:Ae({durationIn:e,easeIn:r})},exit:{scaleX:0,opacity:0,transition:$e({durationOut:n,easeOut:i})}},inY:{initial:{scaleY:0,opacity:0},animate:{scaleY:1,opacity:1,transition:Ae({durationIn:e,easeIn:r})},exit:{scaleY:0,opacity:0,transition:$e({durationOut:n,easeOut:i})}},outX:{initial:{scaleX:1,opacity:1},animate:{scaleX:0,opacity:0,transition:Ae({durationIn:e,easeIn:r})}},outY:{initial:{scaleY:1,opacity:1},animate:{scaleY:0,opacity:0,transition:Ae({durationIn:e,easeIn:r})}}}},JO=t=>{const e=t==null?void 0:t.durationIn,n=t==null?void 0:t.durationOut,r=t==null?void 0:t.easeIn,i=t==null?void 0:t.easeOut;return{in:{initial:{},animate:{scale:[.3,1.1,.9,1.03,.97,1],opacity:[0,1,1,1,1,1],transition:Ae({durationIn:e,easeIn:r})},exit:{scale:[.9,1.1,.3],opacity:[1,1,0]}},inUp:{initial:{},animate:{y:[720,-24,12,-4,0],scaleY:[4,.9,.95,.985,1],opacity:[0,1,1,1,1],transition:{...Ae({durationIn:e,easeIn:r})}},exit:{y:[12,-24,720],scaleY:[.985,.9,3],opacity:[1,1,0],transition:$e({durationOut:n,easeOut:i})}},inDown:{initial:{},animate:{y:[-720,24,-12,4,0],scaleY:[4,.9,.95,.985,1],opacity:[0,1,1,1,1],transition:Ae({durationIn:e,easeIn:r})},exit:{y:[-12,24,-720],scaleY:[.985,.9,3],opacity:[1,1,0],transition:$e({durationOut:n,easeOut:i})}},inLeft:{initial:{},animate:{x:[-720,24,-12,4,0],scaleX:[3,1,.98,.995,1],opacity:[0,1,1,1,1],transition:Ae({durationIn:e,easeIn:r})},exit:{x:[0,24,-720],scaleX:[1,.9,2],opacity:[1,1,0],transition:$e({durationOut:n,easeOut:i})}},inRight:{initial:{},animate:{x:[720,-24,12,-4,0],scaleX:[3,1,.98,.995,1],opacity:[0,1,1,1,1],transition:Ae({durationIn:e,easeIn:r})},exit:{x:[0,-24,720],scaleX:[1,.9,2],opacity:[1,1,0],transition:$e({durationOut:n,easeOut:i})}},out:{animate:{scale:[.9,1.1,.3],opacity:[1,1,0]}},outUp:{animate:{y:[-12,24,-720],scaleY:[.985,.9,3],opacity:[1,1,0]}},outDown:{animate:{y:[12,-24,720],scaleY:[.985,.9,3],opacity:[1,1,0]}},outLeft:{animate:{x:[0,24,-720],scaleX:[1,.9,2],opacity:[1,1,0]}},outRight:{animate:{x:[0,-24,720],scaleX:[1,.9,2],opacity:[1,1,0]}}}},e6=t=>{const e=t==null?void 0:t.durationIn,n=t==null?void 0:t.durationOut,r=t==null?void 0:t.easeIn,i=t==null?void 0:t.easeOut;return{in:{initial:{opacity:0,rotate:-360},animate:{opacity:1,rotate:0,transition:Ae({durationIn:e,easeIn:r})},exit:{opacity:0,rotate:-360,transition:$e({durationOut:n,easeOut:i})}},out:{initial:{opacity:1,rotate:0},animate:{opacity:0,rotate:-360,transition:$e({durationOut:n,easeOut:i})}}}},t6=t=>({hover:{scale:t||1.1}}),ku=t=>{const e=(t==null?void 0:t.staggerIn)||.05,n=(t==null?void 0:t.staggerIn)||.05,r=(t==null?void 0:t.staggerIn)||.05;return{animate:{transition:{staggerChildren:e,delayChildren:n}},exit:{transition:{staggerChildren:r,staggerDirection:-1}}}},n6=t=>{const e=(t==null?void 0:t.colors)||["#19dcea","#b22cff"],n=(t==null?void 0:t.duration)||5,r=(t==null?void 0:t.ease)||"linear";return{animate:{background:e,transition:{duration:n,ease:r}}}},r6=t=>{const e=(t==null?void 0:t.duration)||5,n=(t==null?void 0:t.ease)||"easeOut";return{top:{animate:{scale:[1,1.25],y:[0,-15],transformOrigin:["50% 16%","top"],transition:{duration:e,ease:n}}},right:{animate:{scale:[1,1.25],x:[0,20],y:[0,-15],transformOrigin:["84% 50%","right"],transition:{duration:e,ease:n}}},bottom:{animate:{scale:[1,1.25],y:[0,15],transformOrigin:["50% 84%","bottom"],transition:{duration:e,ease:n}}},left:{animate:{scale:[1,1.25],x:[0,-20],y:[0,15],transformOrigin:["16% 50%","left"],transition:{duration:e,ease:n}}}}},i6=t=>{const e=(t==null?void 0:t.colors)||["#ee7752","#e73c7e","#23a6d5","#23d5ab"],n=(t==null?void 0:t.duration)||5,r=(t==null?void 0:t.ease)||"linear",i=o=>`linear-gradient(${o}deg, ${e})`;return{top:{animate:{backgroundImage:[i(0),i(0)],backgroundPosition:["center 99%","center 1%"],backgroundSize:["100% 600%","100% 600%"],transition:{duration:n,ease:r}}},right:{animate:{backgroundPosition:["1% center","99% center"],backgroundImage:[i(270),i(270)],backgroundSize:["600% 100%","600% 100%"],transition:{duration:n,ease:r}}},bottom:{animate:{backgroundImage:[i(0),i(0)],backgroundPosition:["center 1%","center 99%"],backgroundSize:["100% 600%","100% 600%"],transition:{duration:n,ease:r}}},left:{animate:{backgroundPosition:["99% center","1% center"],backgroundImage:[i(270),i(270)],backgroundSize:["600% 100%","600% 100%"],transition:{duration:n,ease:r}}}}};var ba=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ni(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hd={exports:{}},xa={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Cv;function o6(){if(Cv)return xa;Cv=1;var t=v,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,l,u){var c,h={},f=null,d=null;u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(d=l.ref);for(c in l)r.call(l,c)&&!o.hasOwnProperty(c)&&(h[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)h[c]===void 0&&(h[c]=l[c]);return{$$typeof:e,type:a,key:f,ref:d,props:h,_owner:i.current}}return xa.Fragment=n,xa.jsx=s,xa.jsxs=s,xa}var wa={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Sv;function s6(){return Sv||(Sv=1,process.env.NODE_ENV!=="production"&&function(){var t=v,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),p=Symbol.iterator,g="@@iterator";function m(E){if(E===null||typeof E!="object")return null;var z=p&&E[p]||E[g];return typeof z=="function"?z:null}var b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(E){{for(var z=arguments.length,ee=new Array(z>1?z-1:0),Ee=1;Ee<z;Ee++)ee[Ee-1]=arguments[Ee];C("error",E,ee)}}function C(E,z,ee){{var Ee=b.ReactDebugCurrentFrame,Ye=Ee.getStackAddendum();Ye!==""&&(z+="%s",ee=ee.concat([Ye]));var at=ee.map(function(Ve){return String(Ve)});at.unshift("Warning: "+z),Function.prototype.apply.call(console[E],console,at)}}var S=!1,w=!1,k=!1,T=!1,O=!1,P;P=Symbol.for("react.module.reference");function D(E){return!!(typeof E=="string"||typeof E=="function"||E===r||E===o||O||E===i||E===u||E===c||T||E===d||S||w||k||typeof E=="object"&&E!==null&&(E.$$typeof===f||E.$$typeof===h||E.$$typeof===s||E.$$typeof===a||E.$$typeof===l||E.$$typeof===P||E.getModuleId!==void 0))}function R(E,z,ee){var Ee=E.displayName;if(Ee)return Ee;var Ye=z.displayName||z.name||"";return Ye!==""?ee+"("+Ye+")":ee}function H(E){return E.displayName||"Context"}function W(E){if(E==null)return null;if(typeof E.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case a:var z=E;return H(z)+".Consumer";case s:var ee=E;return H(ee._context)+".Provider";case l:return R(E,E.render,"ForwardRef");case h:var Ee=E.displayName||null;return Ee!==null?Ee:W(E.type)||"Memo";case f:{var Ye=E,at=Ye._payload,Ve=Ye._init;try{return W(Ve(at))}catch{return null}}}return null}var B=Object.assign,j=0,N,V,me,re,_,F,U;function se(){}se.__reactDisabledLog=!0;function Q(){{if(j===0){N=console.log,V=console.info,me=console.warn,re=console.error,_=console.group,F=console.groupCollapsed,U=console.groupEnd;var E={configurable:!0,enumerable:!0,value:se,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}j++}}function ve(){{if(j--,j===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},E,{value:N}),info:B({},E,{value:V}),warn:B({},E,{value:me}),error:B({},E,{value:re}),group:B({},E,{value:_}),groupCollapsed:B({},E,{value:F}),groupEnd:B({},E,{value:U})})}j<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var le=b.ReactCurrentDispatcher,ye;function ue(E,z,ee){{if(ye===void 0)try{throw Error()}catch(Ye){var Ee=Ye.stack.trim().match(/\n( *(at )?)/);ye=Ee&&Ee[1]||""}return`
18
+ `+ye+E}}var ne=!1,ce;{var _e=typeof WeakMap=="function"?WeakMap:Map;ce=new _e}function q(E,z){if(!E||ne)return"";{var ee=ce.get(E);if(ee!==void 0)return ee}var Ee;ne=!0;var Ye=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var at;at=le.current,le.current=null,Q();try{if(z){var Ve=function(){throw Error()};if(Object.defineProperty(Ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ve,[])}catch(Jr){Ee=Jr}Reflect.construct(E,[],Ve)}else{try{Ve.call()}catch(Jr){Ee=Jr}E.call(Ve.prototype)}}else{try{throw Error()}catch(Jr){Ee=Jr}E()}}catch(Jr){if(Jr&&Ee&&typeof Jr.stack=="string"){for(var Le=Jr.stack.split(`
19
+ `),fn=Ee.stack.split(`
20
+ `),Rt=Le.length-1,jt=fn.length-1;Rt>=1&&jt>=0&&Le[Rt]!==fn[jt];)jt--;for(;Rt>=1&&jt>=0;Rt--,jt--)if(Le[Rt]!==fn[jt]){if(Rt!==1||jt!==1)do if(Rt--,jt--,jt<0||Le[Rt]!==fn[jt]){var Gn=`
21
+ `+Le[Rt].replace(" at new "," at ");return E.displayName&&Gn.includes("<anonymous>")&&(Gn=Gn.replace("<anonymous>",E.displayName)),typeof E=="function"&&ce.set(E,Gn),Gn}while(Rt>=1&&jt>=0);break}}}finally{ne=!1,le.current=at,ve(),Error.prepareStackTrace=Ye}var ma=E?E.displayName||E.name:"",WO=ma?ue(ma):"";return typeof E=="function"&&ce.set(E,WO),WO}function ht(E,z,ee){return q(E,!1)}function ae(E){var z=E.prototype;return!!(z&&z.isReactComponent)}function X(E,z,ee){if(E==null)return"";if(typeof E=="function")return q(E,ae(E));if(typeof E=="string")return ue(E);switch(E){case u:return ue("Suspense");case c:return ue("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case l:return ht(E.render);case h:return X(E.type,z,ee);case f:{var Ee=E,Ye=Ee._payload,at=Ee._init;try{return X(at(Ye),z,ee)}catch{}}}return""}var fe=Object.prototype.hasOwnProperty,xe={},st=b.ReactDebugCurrentFrame;function Je(E){if(E){var z=E._owner,ee=X(E.type,E._source,z?z.type:null);st.setExtraStackFrame(ee)}else st.setExtraStackFrame(null)}function et(E,z,ee,Ee,Ye){{var at=Function.call.bind(fe);for(var Ve in E)if(at(E,Ve)){var Le=void 0;try{if(typeof E[Ve]!="function"){var fn=Error((Ee||"React class")+": "+ee+" type `"+Ve+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[Ve]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fn.name="Invariant Violation",fn}Le=E[Ve](z,Ve,Ee,ee,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Rt){Le=Rt}Le&&!(Le instanceof Error)&&(Je(Ye),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ee||"React class",ee,Ve,typeof Le),Je(null)),Le instanceof Error&&!(Le.message in xe)&&(xe[Le.message]=!0,Je(Ye),x("Failed %s type: %s",ee,Le.message),Je(null))}}}var Dt=Array.isArray;function _t(E){return Dt(E)}function Zr(E){{var z=typeof Symbol=="function"&&Symbol.toStringTag,ee=z&&E[Symbol.toStringTag]||E.constructor.name||"Object";return ee}}function J(E){try{return we(E),!1}catch{return!0}}function we(E){return""+E}function kt(E){if(J(E))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Zr(E)),we(E)}var Tt=b.ReactCurrentOwner,hn={key:!0,ref:!0,__self:!0,__source:!0},Bi,Qr,_o;_o={};function vu(E){if(fe.call(E,"ref")){var z=Object.getOwnPropertyDescriptor(E,"ref").get;if(z&&z.isReactWarning)return!1}return E.ref!==void 0}function yu(E){if(fe.call(E,"key")){var z=Object.getOwnPropertyDescriptor(E,"key").get;if(z&&z.isReactWarning)return!1}return E.key!==void 0}function pa(E,z){if(typeof E.ref=="string"&&Tt.current&&z&&Tt.current.stateNode!==z){var ee=W(Tt.current.type);_o[ee]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W(Tt.current.type),E.ref),_o[ee]=!0)}}function bu(E,z){{var ee=function(){Bi||(Bi=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};ee.isReactWarning=!0,Object.defineProperty(E,"key",{get:ee,configurable:!0})}}function xu(E,z){{var ee=function(){Qr||(Qr=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};ee.isReactWarning=!0,Object.defineProperty(E,"ref",{get:ee,configurable:!0})}}var wu=function(E,z,ee,Ee,Ye,at,Ve){var Le={$$typeof:e,type:E,key:z,ref:ee,props:Ve,_owner:at};return Le._store={},Object.defineProperty(Le._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Le,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ee}),Object.defineProperty(Le,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ye}),Object.freeze&&(Object.freeze(Le.props),Object.freeze(Le)),Le};function Cu(E,z,ee,Ee,Ye){{var at,Ve={},Le=null,fn=null;ee!==void 0&&(kt(ee),Le=""+ee),yu(z)&&(kt(z.key),Le=""+z.key),vu(z)&&(fn=z.ref,pa(z,Ye));for(at in z)fe.call(z,at)&&!hn.hasOwnProperty(at)&&(Ve[at]=z[at]);if(E&&E.defaultProps){var Rt=E.defaultProps;for(at in Rt)Ve[at]===void 0&&(Ve[at]=Rt[at])}if(Le||fn){var jt=typeof E=="function"?E.displayName||E.name||"Unknown":E;Le&&bu(Ve,jt),fn&&xu(Ve,jt)}return wu(E,Le,fn,Ye,Ee,Tt.current,Ve)}}var Su=b.ReactCurrentOwner,RO=b.ReactDebugCurrentFrame;function ga(E){if(E){var z=E._owner,ee=X(E.type,E._source,z?z.type:null);RO.setExtraStackFrame(ee)}else RO.setExtraStackFrame(null)}var vv;vv=!1;function yv(E){return typeof E=="object"&&E!==null&&E.$$typeof===e}function BO(){{if(Su.current){var E=W(Su.current.type);if(E)return`
22
+
23
+ Check the render method of \``+E+"`."}return""}}function Eme(E){{if(E!==void 0){var z=E.fileName.replace(/^.*[\\\/]/,""),ee=E.lineNumber;return`
24
+
25
+ Check your code at `+z+":"+ee+"."}return""}}var NO={};function Mme(E){{var z=BO();if(!z){var ee=typeof E=="string"?E:E.displayName||E.name;ee&&(z=`
26
+
27
+ Check the top-level render call using <`+ee+">.")}return z}}function jO(E,z){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var ee=Mme(z);if(NO[ee])return;NO[ee]=!0;var Ee="";E&&E._owner&&E._owner!==Su.current&&(Ee=" It was passed a child from "+W(E._owner.type)+"."),ga(E),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ee,Ee),ga(null)}}function VO(E,z){{if(typeof E!="object")return;if(_t(E))for(var ee=0;ee<E.length;ee++){var Ee=E[ee];yv(Ee)&&jO(Ee,z)}else if(yv(E))E._store&&(E._store.validated=!0);else if(E){var Ye=m(E);if(typeof Ye=="function"&&Ye!==E.entries)for(var at=Ye.call(E),Ve;!(Ve=at.next()).done;)yv(Ve.value)&&jO(Ve.value,z)}}}function Ome(E){{var z=E.type;if(z==null||typeof z=="string")return;var ee;if(typeof z=="function")ee=z.propTypes;else if(typeof z=="object"&&(z.$$typeof===l||z.$$typeof===h))ee=z.propTypes;else return;if(ee){var Ee=W(z);et(ee,E.props,"prop",Ee,E)}else if(z.PropTypes!==void 0&&!vv){vv=!0;var Ye=W(z);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ye||"Unknown")}typeof z.getDefaultProps=="function"&&!z.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ame(E){{for(var z=Object.keys(E.props),ee=0;ee<z.length;ee++){var Ee=z[ee];if(Ee!=="children"&&Ee!=="key"){ga(E),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ee),ga(null);break}}E.ref!==null&&(ga(E),x("Invalid attribute `ref` supplied to `React.Fragment`."),ga(null))}}function zO(E,z,ee,Ee,Ye,at){{var Ve=D(E);if(!Ve){var Le="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(Le+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var fn=Eme(Ye);fn?Le+=fn:Le+=BO();var Rt;E===null?Rt="null":_t(E)?Rt="array":E!==void 0&&E.$$typeof===e?(Rt="<"+(W(E.type)||"Unknown")+" />",Le=" Did you accidentally export a JSX literal instead of a component?"):Rt=typeof E,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Rt,Le)}var jt=Cu(E,z,ee,Ye,at);if(jt==null)return jt;if(Ve){var Gn=z.children;if(Gn!==void 0)if(Ee)if(_t(Gn)){for(var ma=0;ma<Gn.length;ma++)VO(Gn[ma],E);Object.freeze&&Object.freeze(Gn)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else VO(Gn,E)}return E===r?Ame(jt):Ome(jt),jt}}function Pme(E,z,ee){return zO(E,z,ee,!0)}function Dme(E,z,ee){return zO(E,z,ee,!1)}var _me=Dme,Ime=Pme;wa.Fragment=r,wa.jsx=_me,wa.jsxs=Ime}()),wa}process.env.NODE_ENV==="production"?hd.exports=o6():hd.exports=s6();var y=hd.exports;const kv=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Tu=v.createContext({}),Eu=v.createContext(null),Mu=typeof document<"u",fd=Mu?v.useLayoutEffect:v.useEffect,dd=v.createContext({strict:!1});function a6(t,e,n,r){const{visualElement:i}=v.useContext(Tu),o=v.useContext(dd),s=v.useContext(Eu),a=v.useContext(kv).reducedMotion,l=v.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(t,{visualState:e,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;v.useInsertionEffect(()=>{u&&u.update(n,s)});const c=v.useRef(!!window.HandoffAppearAnimations);return fd(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),v.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function Io(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function l6(t,e,n){return v.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Io(n)&&(n.current=r))},[e])}function Ca(t){return typeof t=="string"||Array.isArray(t)}function Ou(t){return typeof t=="object"&&typeof t.start=="function"}const pd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gd=["initial",...pd];function Au(t){return Ou(t.animate)||gd.some(e=>Ca(t[e]))}function Tv(t){return!!(Au(t)||t.variants)}function u6(t,e){if(Au(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Ca(n)?n:void 0,animate:Ca(r)?r:void 0}}return t.inherit!==!1?e:{}}function c6(t){const{initial:e,animate:n}=u6(t,v.useContext(Tu));return v.useMemo(()=>({initial:e,animate:n}),[Ev(e),Ev(n)])}function Ev(t){return Array.isArray(t)?t.join(" "):t}const Mv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Sa={};for(const t in Mv)Sa[t]={isEnabled:e=>Mv[t].some(n=>!!e[n])};function md(t){for(const e in t)Sa[e]={...Sa[e],...t[e]}}const vd=v.createContext({}),Ov=v.createContext({}),h6=Symbol.for("motionComponentSymbol");function f6({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&md(t);function o(a,l){let u;const c={...v.useContext(kv),...a,layoutId:d6(a)},{isStatic:h}=c,f=c6(a),d=r(a,h);if(!h&&Mu){f.visualElement=a6(i,d,c,e);const p=v.useContext(Ov),g=v.useContext(dd).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,g,t,p))}return Ce.createElement(Tu.Provider,{value:f},u&&f.visualElement?Ce.createElement(u,{visualElement:f.visualElement,...c}):null,n(i,a,l6(d,f.visualElement,l),d,h,f.visualElement))}const s=v.forwardRef(o);return s[h6]=i,s}function d6({layoutId:t}){const e=v.useContext(vd).id;return e&&t!==void 0?e+"-"+t:t}function p6(t){function e(r,i={}){return f6(t(r,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const g6=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yd(t){return typeof t!="string"||t.includes("-")?!1:!!(g6.indexOf(t)>-1||/[A-Z]/.test(t))}const Pu={};function m6(t){Object.assign(Pu,t)}const ka=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ji=new Set(ka);function Av(t,{layout:e,layoutId:n}){return ji.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Pu[t]||t==="opacity")}const dn=t=>!!(t&&t.getVelocity),v6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},y6=ka.length;function b6(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<y6;s++){const a=ka[s];if(t[a]!==void 0){const l=v6[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,r?"":o):n&&r&&(o="none"),o}const Pv=t=>e=>typeof e=="string"&&e.startsWith(t),Dv=Pv("--"),bd=Pv("var(--"),x6=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,w6=(t,e)=>e&&typeof t=="number"?e.transform(t):t,ti=(t,e,n)=>Math.min(Math.max(n,t),e),Vi={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ta={...Vi,transform:t=>ti(0,1,t)},Du={...Vi,default:1},Ea=t=>Math.round(t*1e5)/1e5,_u=/(-)?([\d]*\.?[\d])+/g,_v=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,C6=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ma(t){return typeof t=="string"}const Oa=t=>({test:e=>Ma(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ni=Oa("deg"),sr=Oa("%"),Se=Oa("px"),S6=Oa("vh"),k6=Oa("vw"),Iv={...sr,parse:t=>sr.parse(t)/100,transform:t=>sr.transform(t*100)},$v={...Vi,transform:Math.round},Fv={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,size:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,rotate:ni,rotateX:ni,rotateY:ni,rotateZ:ni,scale:Du,scaleX:Du,scaleY:Du,scaleZ:Du,skew:ni,skewX:ni,skewY:ni,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:Ta,originX:Iv,originY:Iv,originZ:Se,zIndex:$v,fillOpacity:Ta,strokeOpacity:Ta,numOctaves:$v};function xd(t,e,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const h in e){const f=e[h];if(Dv(h)){o[h]=f;continue}const d=Fv[h],p=w6(f,d);if(ji.has(h)){if(l=!0,s[h]=p,!c)continue;f!==(d.default||0)&&(c=!1)}else h.startsWith("origin")?(u=!0,a[h]=p):i[h]=p}if(e.transform||(l||r?i.transform=b6(t.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const wd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Lv(t,e,n){for(const r in e)!dn(e[r])&&!Av(r,n)&&(t[r]=e[r])}function T6({transformTemplate:t},e,n){return v.useMemo(()=>{const r=wd();return xd(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)},[e])}function E6(t,e,n){const r=t.style||{},i={};return Lv(i,r,t),Object.assign(i,T6(t,e,n)),t.transformValues?t.transformValues(i):i}function M6(t,e,n){const r={},i=E6(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=i,r}const O6=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Iu(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||O6.has(t)}let Rv=t=>!Iu(t);function A6(t){t&&(Rv=e=>e.startsWith("on")?!Iu(e):t(e))}try{A6(require("@emotion/is-prop-valid").default)}catch{}function P6(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Rv(i)||n===!0&&Iu(i)||!e&&!Iu(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function Bv(t,e,n){return typeof t=="string"?t:Se.transform(e+n*t)}function D6(t,e,n){const r=Bv(e,t.x,t.width),i=Bv(n,t.y,t.height);return`${r} ${i}`}const _6={offset:"stroke-dashoffset",array:"stroke-dasharray"},I6={offset:"strokeDashoffset",array:"strokeDasharray"};function $6(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?_6:I6;t[o.offset]=Se.transform(-r);const s=Se.transform(e),a=Se.transform(n);t[o.array]=`${s} ${a}`}function Cd(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,h,f){if(xd(t,u,c,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:g}=t;d.transform&&(g&&(p.transform=d.transform),delete d.transform),g&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=D6(g,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&$6(d,s,a,l,!1)}const Nv=()=>({...wd(),attrs:{}}),Sd=t=>typeof t=="string"&&t.toLowerCase()==="svg";function F6(t,e,n,r){const i=v.useMemo(()=>{const o=Nv();return Cd(o,e,{enableHardwareAcceleration:!1},Sd(r),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Lv(o,t.style,t),i.style={...o,...i.style}}return i}function L6(t=!1){return(n,r,i,{latestValues:o},s)=>{const l=(yd(n)?F6:M6)(r,o,s,n),c={...P6(r,typeof n=="string",t),...l,ref:i},{children:h}=r,f=v.useMemo(()=>dn(h)?h.get():h,[h]);return v.createElement(n,{...c,children:f})}}const kd=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function jv(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const o in n)t.style.setProperty(o,n[o])}const Vv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function zv(t,e,n,r){jv(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(Vv.has(i)?i:kd(i),e.attrs[i])}function Td(t,e){const{style:n}=t,r={};for(const i in n)(dn(n[i])||e.style&&dn(e.style[i])||Av(i,t))&&(r[i]=n[i]);return r}function Wv(t,e){const n=Td(t,e);for(const r in t)if(dn(t[r])||dn(e[r])){const i=ka.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=t[r]}return n}function Ed(t,e,n,r={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),e}function Hv(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const $u=t=>Array.isArray(t),R6=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),B6=t=>$u(t)?t[t.length-1]||0:t;function Fu(t){const e=dn(t)?t.get():t;return R6(e)?e.toValue():e}function N6({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,i,o){const s={latestValues:j6(r,i,o,t),renderState:e()};return n&&(s.mount=a=>n(r,a,s)),s}const qv=t=>(e,n)=>{const r=v.useContext(Tu),i=v.useContext(Eu),o=()=>N6(t,e,r,i);return n?o():Hv(o)};function j6(t,e,n,r){const i={},o=r(t,{});for(const f in o)i[f]=Fu(o[f]);let{initial:s,animate:a}=t;const l=Au(t),u=Tv(t);e&&u&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const h=c?a:s;return h&&typeof h!="boolean"&&!Ou(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const p=Ed(t,d);if(!p)return;const{transitionEnd:g,transition:m,...b}=p;for(const x in b){let C=b[x];if(Array.isArray(C)){const S=c?C.length-1:0;C=C[S]}C!==null&&(i[x]=C)}for(const x in g)i[x]=g[x]}),i}const Et=t=>t;class Uv{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function V6(t){let e=new Uv,n=new Uv,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const h=c&&i,f=h?e:n;return u&&s.add(l),f.add(l)&&h&&i&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let u=0;u<r;u++){const c=e.order[u];c(l),s.has(c)&&(a.schedule(c),t())}i=!1,o&&(o=!1,a.process(l))}};return a}const Lu=["prepare","read","update","preRender","render","postRender"],z6=40;function W6(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Lu.reduce((h,f)=>(h[f]=V6(()=>n=!0),h),{}),s=h=>o[h].process(i),a=()=>{const h=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(h-i.timestamp,z6),1),i.timestamp=h,i.isProcessing=!0,Lu.forEach(s),i.isProcessing=!1,n&&e&&(r=!1,t(a))},l=()=>{n=!0,r=!0,i.isProcessing||t(a)};return{schedule:Lu.reduce((h,f)=>{const d=o[f];return h[f]=(p,g=!1,m=!1)=>(n||l(),d.schedule(p,g,m)),h},{}),cancel:h=>Lu.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:lt,cancel:Pr,state:qt,steps:Md}=W6(typeof requestAnimationFrame<"u"?requestAnimationFrame:Et,!0),H6={useVisualState:qv({scrapeMotionValuesFromProps:Wv,createRenderState:Nv,onMount:(t,e,{renderState:n,latestValues:r})=>{lt.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),lt.render(()=>{Cd(n,r,{enableHardwareAcceleration:!1},Sd(e.tagName),t.transformTemplate),zv(e,n)})}})},q6={useVisualState:qv({scrapeMotionValuesFromProps:Td,createRenderState:wd})};function U6(t,{forwardMotionProps:e=!1},n,r){return{...yd(t)?H6:q6,preloadedFeatures:n,useRender:L6(e),createVisualElement:r,Component:t}}function Dr(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Yv=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ru(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Y6=t=>e=>Yv(e)&&t(e,Ru(e));function _r(t,e,n,r){return Dr(t,e,Y6(n),r)}const G6=(t,e)=>n=>e(t(n)),ri=(...t)=>t.reduce(G6);function Gv(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Kv=Gv("dragHorizontal"),Xv=Gv("dragVertical");function Zv(t){let e=!1;if(t==="y")e=Xv();else if(t==="x")e=Kv();else{const n=Kv(),r=Xv();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function Qv(){const t=Zv(!0);return t?(t(),!1):!0}class ii{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Jv(t,e){const n="pointer"+(e?"enter":"leave"),r="onHover"+(e?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||Qv())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[r]&&lt.update(()=>a[r](o,s))};return _r(t.current,n,i,{passive:!t.getProps()[r]})}class K6 extends ii{mount(){this.unmount=ri(Jv(this.node,!0),Jv(this.node,!1))}unmount(){}}class X6 extends ii{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ri(Dr(this.node.current,"focus",()=>this.onFocus()),Dr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ey=(t,e)=>e?t===e?!0:ey(t,e.parentElement):!1;function Od(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Ru(n))}class Z6 extends ii{constructor(){super(...arguments),this.removeStartListeners=Et,this.removeEndListeners=Et,this.removeAccessibleListeners=Et,this.startPointerPress=(e,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=_r(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();lt.update(()=>{ey(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=_r(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ri(o,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Od("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&lt.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=Dr(this.node.current,"keyup",s),Od("down",(a,l)=>{this.startPress(a,l)})},n=Dr(this.node.current,"keydown",e),r=()=>{this.isPressing&&Od("cancel",(o,s)=>this.cancelPress(o,s))},i=Dr(this.node.current,"blur",r);this.removeAccessibleListeners=ri(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&lt.update(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Qv()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&lt.update(()=>r(e,n))}mount(){const e=this.node.getProps(),n=_r(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=Dr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ri(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ad=new WeakMap,Pd=new WeakMap,Q6=t=>{const e=Ad.get(t.target);e&&e(t)},J6=t=>{t.forEach(Q6)};function eA({root:t,...e}){const n=t||document;Pd.has(n)||Pd.set(n,{});const r=Pd.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(J6,{root:t,...e})),r[i]}function tA(t,e,n){const r=eA(e);return Ad.set(t,n),r.observe(t),()=>{Ad.delete(t),r.unobserve(t)}}const nA={some:0,all:1};class rA extends ii{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:nA[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return tA(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(iA(e,n))&&this.startObserver()}unmount(){}}function iA({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const oA={inView:{Feature:rA},tap:{Feature:Z6},focus:{Feature:X6},hover:{Feature:K6}};function ty(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function sA(t){const e={};return t.values.forEach((n,r)=>e[r]=n.get()),e}function aA(t){const e={};return t.values.forEach((n,r)=>e[r]=n.getVelocity()),e}function Bu(t,e,n){const r=t.getProps();return Ed(r,e,n!==void 0?n:r.custom,sA(t),aA(t))}const lA="data-"+kd("framerAppearId");let Aa=Et,Kn=Et;process.env.NODE_ENV!=="production"&&(Aa=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Kn=(t,e)=>{if(!t)throw new Error(e)});const oi=t=>t*1e3,Ir=t=>t/1e3,uA={current:!1},ny=t=>Array.isArray(t)&&typeof t[0]=="number";function ry(t){return!!(!t||typeof t=="string"&&iy[t]||ny(t)||Array.isArray(t)&&t.every(ry))}const Pa=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,iy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pa([0,.65,.55,1]),circOut:Pa([.55,0,1,.45]),backIn:Pa([.31,.01,.66,-.59]),backOut:Pa([.33,1.53,.69,.99])};function oy(t){if(t)return ny(t)?Pa(t):Array.isArray(t)?t.map(oy):iy[t]}function cA(t,e,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=oy(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function hA(t,{repeat:e,repeatType:n="loop"}){const r=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[r]}const sy=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,fA=1e-7,dA=12;function pA(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=sy(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>fA&&++a<dA);return s}function Da(t,e,n,r){if(t===e&&n===r)return Et;const i=o=>pA(o,0,1,t,n);return o=>o===0||o===1?o:sy(i(o),e,r)}const gA=Da(.42,0,1,1),mA=Da(0,0,.58,1),ay=Da(.42,0,.58,1),vA=t=>Array.isArray(t)&&typeof t[0]!="number",ly=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,uy=t=>e=>1-t(1-e),cy=t=>1-Math.sin(Math.acos(t)),Dd=uy(cy),yA=ly(Dd),hy=Da(.33,1.53,.69,.99),_d=uy(hy),bA=ly(_d),fy={linear:Et,easeIn:gA,easeInOut:ay,easeOut:mA,circIn:cy,circInOut:yA,circOut:Dd,backIn:_d,backInOut:bA,backOut:hy,anticipate:t=>(t*=2)<1?.5*_d(t):.5*(2-Math.pow(2,-10*(t-1)))},dy=t=>{if(Array.isArray(t)){Kn(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,i]=t;return Da(e,n,r,i)}else if(typeof t=="string")return Kn(fy[t]!==void 0,`Invalid easing type '${t}'`),fy[t];return t},Id=(t,e)=>n=>!!(Ma(n)&&C6.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),py=(t,e,n)=>r=>{if(!Ma(r))return r;const[i,o,s,a]=r.match(_u);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},xA=t=>ti(0,255,t),$d={...Vi,transform:t=>Math.round(xA(t))},zi={test:Id("rgb","red"),parse:py("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+$d.transform(t)+", "+$d.transform(e)+", "+$d.transform(n)+", "+Ea(Ta.transform(r))+")"};function wA(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Fd={test:Id("#"),parse:wA,transform:zi.transform},$o={test:Id("hsl","hue"),parse:py("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+sr.transform(Ea(e))+", "+sr.transform(Ea(n))+", "+Ea(Ta.transform(r))+")"},an={test:t=>zi.test(t)||Fd.test(t)||$o.test(t),parse:t=>zi.test(t)?zi.parse(t):$o.test(t)?$o.parse(t):Fd.parse(t),transform:t=>Ma(t)?t:t.hasOwnProperty("red")?zi.transform(t):$o.transform(t)},xt=(t,e,n)=>-n*t+n*e+t;function Ld(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function CA({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Ld(l,a,t+1/3),o=Ld(l,a,t),s=Ld(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Rd=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},SA=[Fd,zi,$o],kA=t=>SA.find(e=>e.test(t));function gy(t){const e=kA(t);Kn(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===$o&&(n=CA(n)),n}const my=(t,e)=>{const n=gy(t),r=gy(e),i={...n};return o=>(i.red=Rd(n.red,r.red,o),i.green=Rd(n.green,r.green,o),i.blue=Rd(n.blue,r.blue,o),i.alpha=xt(n.alpha,r.alpha,o),zi.transform(i))};function TA(t){var e,n;return isNaN(t)&&Ma(t)&&(((e=t.match(_u))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(_v))===null||n===void 0?void 0:n.length)||0)>0}const vy={regex:x6,countKey:"Vars",token:"${v}",parse:Et},yy={regex:_v,countKey:"Colors",token:"${c}",parse:an.parse},by={regex:_u,countKey:"Numbers",token:"${n}",parse:Vi.parse};function Bd(t,{regex:e,countKey:n,token:r,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,r),t.values.push(...o.map(i)))}function Nu(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Bd(n,vy),Bd(n,yy),Bd(n,by),n}function xy(t){return Nu(t).values}function wy(t){const{values:e,numColors:n,numVars:r,tokenised:i}=Nu(t),o=e.length;return s=>{let a=i;for(let l=0;l<o;l++)l<r?a=a.replace(vy.token,s[l]):l<r+n?a=a.replace(yy.token,an.transform(s[l])):a=a.replace(by.token,Ea(s[l]));return a}}const EA=t=>typeof t=="number"?0:t;function MA(t){const e=xy(t);return wy(t)(e.map(EA))}const si={test:TA,parse:xy,createTransformer:wy,getAnimatableNone:MA},Cy=(t,e)=>n=>`${n>0?e:t}`;function Sy(t,e){return typeof t=="number"?n=>xt(t,e,n):an.test(t)?my(t,e):t.startsWith("var(")?Cy(t,e):Ty(t,e)}const ky=(t,e)=>{const n=[...t],r=n.length,i=t.map((o,s)=>Sy(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},OA=(t,e)=>{const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Sy(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},Ty=(t,e)=>{const n=si.createTransformer(e),r=Nu(t),i=Nu(e);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?ri(ky(r.values,i.values),n):(Aa(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Cy(t,e))},_a=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Ey=(t,e)=>n=>xt(t,e,n);function AA(t){return typeof t=="number"?Ey:typeof t=="string"?an.test(t)?my:Ty:Array.isArray(t)?ky:typeof t=="object"?OA:Ey}function PA(t,e,n){const r=[],i=n||AA(t[0]),o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||Et:e;a=ri(l,a)}r.push(a)}return r}function My(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Kn(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=PA(e,r,i),a=s.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const h=_a(t[c],t[c+1],u);return s[c](h)};return n?u=>l(ti(t[0],t[o-1],u)):l}function DA(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=_a(0,e,r);t.push(xt(n,1,i))}}function _A(t){const e=[0];return DA(e,t.length-1),e}function IA(t,e){return t.map(n=>n*e)}function $A(t,e){return t.map(()=>e||ay).splice(0,t.length-1)}function ju({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=vA(r)?r.map(dy):dy(r),o={done:!1,value:e[0]},s=IA(n&&n.length===e.length?n:_A(e),t),a=My(s,e,{ease:Array.isArray(i)?i:$A(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}function Oy(t,e){return e?t*(1e3/e):0}const FA=5;function Ay(t,e,n){const r=Math.max(e-FA,0);return Oy(n-t(r),e-r)}const Nd=.001,LA=.01,Py=10,RA=.05,BA=1;function NA({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o;Aa(t<=oi(Py),"Spring duration must be 10 seconds or less");let s=1-e;s=ti(RA,BA,s),t=ti(LA,Py,Ir(t)),s<1?(i=u=>{const c=u*s,h=c*t,f=c-n,d=jd(u,s),p=Math.exp(-h);return Nd-f/d*p},o=u=>{const h=u*s*t,f=h*n+n,d=Math.pow(s,2)*Math.pow(u,2)*t,p=Math.exp(-h),g=jd(Math.pow(u,2),s);return(-i(u)+Nd>0?-1:1)*((f-d)*p)/g}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Nd+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=VA(i,o,a);if(t=oi(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:t}}}const jA=12;function VA(t,e,n){let r=n;for(let i=1;i<jA;i++)r=r-t(r)/e(r);return r}function jd(t,e){return t*Math.sqrt(1-e*e)}const zA=["duration","bounce"],WA=["stiffness","damping","mass"];function Dy(t,e){return e.some(n=>t[n]!==void 0)}function HA(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Dy(t,WA)&&Dy(t,zA)){const n=NA(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function _y({keyframes:t,restDelta:e,restSpeed:n,...r}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,velocity:c,duration:h,isResolvedFromDuration:f}=HA(r),d=c?-Ir(c):0,p=l/(2*Math.sqrt(a*u)),g=o-i,m=Ir(Math.sqrt(a/u)),b=Math.abs(g)<5;n||(n=b?.01:2),e||(e=b?.005:.5);let x;if(p<1){const C=jd(m,p);x=S=>{const w=Math.exp(-p*m*S);return o-w*((d+p*m*g)/C*Math.sin(C*S)+g*Math.cos(C*S))}}else if(p===1)x=C=>o-Math.exp(-m*C)*(g+(d+m*g)*C);else{const C=m*Math.sqrt(p*p-1);x=S=>{const w=Math.exp(-p*m*S),k=Math.min(C*S,300);return o-w*((d+p*m*g)*Math.sinh(k)+C*g*Math.cosh(k))/C}}return{calculatedDuration:f&&h||null,next:C=>{const S=x(C);if(f)s.done=C>=h;else{let w=d;C!==0&&(p<1?w=Ay(x,C,S):w=0);const k=Math.abs(w)<=n,T=Math.abs(o-S)<=e;s.done=k&&T}return s.value=s.done?o:S,s}}}function Iy({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=O=>a!==void 0&&O<a||l!==void 0&&O>l,p=O=>a===void 0?l:l===void 0||Math.abs(a-O)<Math.abs(l-O)?a:l;let g=n*e;const m=h+g,b=s===void 0?m:s(m);b!==m&&(g=b-h);const x=O=>-g*Math.exp(-O/r),C=O=>b+x(O),S=O=>{const P=x(O),D=C(O);f.done=Math.abs(P)<=u,f.value=f.done?b:D};let w,k;const T=O=>{d(f.value)&&(w=O,k=_y({keyframes:[f.value,p(f.value)],velocity:Ay(C,O,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:O=>{let P=!1;return!k&&w===void 0&&(P=!0,S(O),T(O)),w!==void 0&&O>w?k.next(O-w):(!P&&S(O),f)}}}const qA=t=>{const e=({timestamp:n})=>t(n);return{start:()=>lt.update(e,!0),stop:()=>Pr(e),now:()=>qt.isProcessing?qt.timestamp:performance.now()}},$y=2e4;function Fy(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<$y;)e+=n,r=t.next(e);return e>=$y?1/0:e}const UA={decay:Iy,inertia:Iy,tween:ju,keyframes:ju,spring:_y};function Vu({autoplay:t=!0,delay:e=0,driver:n=qA,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:h,...f}){let d=1,p=!1,g,m;const b=()=>{m=new Promise(F=>{g=F})};b();let x;const C=UA[i]||ju;let S;C!==ju&&typeof r[0]!="number"&&(S=My([0,100],r,{clamp:!1}),r=[0,100]);const w=C({...f,keyframes:r});let k;a==="mirror"&&(k=C({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let T="idle",O=null,P=null,D=null;w.calculatedDuration===null&&o&&(w.calculatedDuration=Fy(w));const{calculatedDuration:R}=w;let H=1/0,W=1/0;R!==null&&(H=R+s,W=H*(o+1)-s);let B=0;const j=F=>{if(P===null)return;d>0&&(P=Math.min(P,F)),d<0&&(P=Math.min(F-W/d,P)),O!==null?B=O:B=Math.round(F-P)*d;const U=B-e*(d>=0?1:-1),se=d>=0?U<0:U>W;B=Math.max(U,0),T==="finished"&&O===null&&(B=W);let Q=B,ve=w;if(o){const ne=B/H;let ce=Math.floor(ne),_e=ne%1;!_e&&ne>=1&&(_e=1),_e===1&&ce--,ce=Math.min(ce,o+1);const q=!!(ce%2);q&&(a==="reverse"?(_e=1-_e,s&&(_e-=s/H)):a==="mirror"&&(ve=k));let ht=ti(0,1,_e);B>W&&(ht=a==="reverse"&&q?1:0),Q=ht*H}const le=se?{done:!1,value:r[0]}:ve.next(Q);S&&(le.value=S(le.value));let{done:ye}=le;!se&&R!==null&&(ye=d>=0?B>=W:B<=0);const ue=O===null&&(T==="finished"||T==="running"&&ye);return h&&h(le.value),ue&&me(),le},N=()=>{x&&x.stop(),x=void 0},V=()=>{T="idle",N(),g(),b(),P=D=null},me=()=>{T="finished",c&&c(),N(),g()},re=()=>{if(p)return;x||(x=n(j));const F=x.now();l&&l(),O!==null?P=F-O:(!P||T==="finished")&&(P=F),T==="finished"&&b(),D=P,O=null,T="running",x.start()};t&&re();const _={then(F,U){return m.then(F,U)},get time(){return Ir(B)},set time(F){F=oi(F),B=F,O!==null||!x||d===0?O=F:P=x.now()-F/d},get duration(){const F=w.calculatedDuration===null?Fy(w):w.calculatedDuration;return Ir(F)},get speed(){return d},set speed(F){F===d||!x||(d=F,_.time=Ir(B))},get state(){return T},play:re,pause:()=>{T="paused",O=B},stop:()=>{p=!0,T!=="idle"&&(T="idle",u&&u(),V())},cancel:()=>{D!==null&&j(D),V()},complete:()=>{T="finished"},sample:F=>(P=0,j(F))};return _}function YA(t){let e;return()=>(e===void 0&&(e=t()),e)}const GA=YA(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),KA=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),zu=10,XA=2e4,ZA=(t,e)=>e.type==="spring"||t==="backgroundColor"||!ry(e.ease);function QA(t,e,{onUpdate:n,onComplete:r,...i}){if(!(GA()&&KA.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(x=>{a=x})};u();let{keyframes:c,duration:h=300,ease:f,times:d}=i;if(ZA(e,i)){const x=Vu({...i,repeat:0,delay:0});let C={done:!1,value:c[0]};const S=[];let w=0;for(;!C.done&&w<XA;)C=x.sample(w),S.push(C.value),w+=zu;d=void 0,c=S,h=w-zu,f="linear"}const p=cA(t.owner.current,e,c,{...i,duration:h,ease:f,times:d});i.syncStart&&(p.startTime=qt.isProcessing?qt.timestamp:document.timeline?document.timeline.currentTime:performance.now());const g=()=>p.cancel(),m=()=>{lt.update(g),a(),u()};return p.onfinish=()=>{t.set(hA(c,i)),r&&r(),m()},{then(x,C){return l.then(x,C)},attachTimeline(x){return p.timeline=x,p.onfinish=null,Et},get time(){return Ir(p.currentTime||0)},set time(x){p.currentTime=oi(x)},get speed(){return p.playbackRate},set speed(x){p.playbackRate=x},get duration(){return Ir(h)},play:()=>{s||(p.play(),Pr(g))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:x}=p;if(x){const C=Vu({...i,autoplay:!1});t.setWithVelocity(C.sample(x-zu).value,C.sample(x).value,zu)}m()},complete:()=>p.finish(),cancel:m}}function JA({keyframes:t,delay:e,onUpdate:n,onComplete:r}){const i=()=>(n&&n(t[t.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Et,pause:Et,stop:Et,then:o=>(o(),Promise.resolve()),cancel:Et,complete:Et});return e?Vu({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const e8={type:"spring",stiffness:500,damping:25,restSpeed:10},t8=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),n8={type:"keyframes",duration:.8},r8={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},i8=(t,{keyframes:e})=>e.length>2?n8:ji.has(t)?t.startsWith("scale")?t8(e[1]):e8:r8,Vd=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(si.test(e)||e==="0")&&!e.startsWith("url(")),o8=new Set(["brightness","contrast","saturate","opacity"]);function s8(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(_u)||[];if(!r)return t;const i=n.replace(r,"");let o=o8.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const a8=/([a-z-]*)\(.*?\)/g,zd={...si,getAnimatableNone:t=>{const e=t.match(a8);return e?e.map(s8).join(" "):t}},l8={...Fv,color:an,backgroundColor:an,outlineColor:an,fill:an,stroke:an,borderColor:an,borderTopColor:an,borderRightColor:an,borderBottomColor:an,borderLeftColor:an,filter:zd,WebkitFilter:zd},Wd=t=>l8[t];function Ly(t,e){let n=Wd(t);return n!==zd&&(n=si),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ry=t=>/^0[^.\s]+$/.test(t);function u8(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||Ry(t)}function c8(t,e,n,r){const i=Vd(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:t.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),u8(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const c=l[u];o[c]=Ly(e,a)}return o}function h8({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function By(t,e){return t[e]||t.default||t}const Hd=(t,e,n,r={})=>i=>{const o=By(r,t)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-oi(s);const l=c8(e,t,n,o),u=l[0],c=l[l.length-1],h=Vd(t,u),f=Vd(t,c);Aa(h===f,`You are trying to animate ${t} from "${u}" to "${c}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${c} via the \`style\` property.`);let d={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{e.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(h8(o)||(d={...d,...i8(t,d)}),d.duration&&(d.duration=oi(d.duration)),d.repeatDelay&&(d.repeatDelay=oi(d.repeatDelay)),!h||!f||uA.current||o.type===!1)return JA(d);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=QA(e,t,d);if(p)return p}return Vu(d)};function Wu(t){return!!(dn(t)&&t.add)}const Ny=t=>/^\-?\d*\.?\d+$/.test(t);function qd(t,e){t.indexOf(e)===-1&&t.push(e)}function Ud(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Yd{constructor(){this.subscriptions=[]}add(e){return qd(this.subscriptions,e),()=>Ud(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const jy=new Set;function Gd(t,e,n){t||jy.has(e)||(console.warn(e),n&&console.warn(n),jy.add(e))}const f8=t=>!isNaN(parseFloat(t));class d8{constructor(e,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=qt;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,lt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>lt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=f8(this.current),this.owner=n.owner}onChange(e){return process.env.NODE_ENV!=="production"&&Gd(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Yd);const r=this.events[e].add(n);return e==="change"?()=>{r(),lt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=e,this.timeDelta=r}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Oy(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fo(t,e){return new d8(t,e)}const Vy=t=>e=>e.test(t),zy=[Vi,Se,sr,ni,k6,S6,{test:t=>t==="auto",parse:t=>t}],Ia=t=>zy.find(Vy(t)),p8=[...zy,an,si],g8=t=>p8.find(Vy(t));function m8(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Fo(n))}function v8(t,e){const n=Bu(t,e);let{transitionEnd:r={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=B6(o[s]);m8(t,s,a)}}function y8(t,e,n){var r,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=e[l];let c=null;Array.isArray(u)&&(c=u[0]),c===null&&(c=(i=(r=n[l])!==null&&r!==void 0?r:t.readValue(l))!==null&&i!==void 0?i:e[l]),c!=null&&(typeof c=="string"&&(Ny(c)||Ry(c))?c=parseFloat(c):!g8(c)&&si.test(u)&&(c=Ly(l,u)),t.addValue(l,Fo(c,{owner:t})),n[l]===void 0&&(n[l]=c),c!==null&&t.setBaseTarget(l,c))}}function b8(t,e){return e?(e[t]||e.default||e).from:void 0}function x8(t,e,n){const r={};for(const i in t){const o=b8(i,e);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function w8({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Wy(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");r&&(o=r);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in a){const f=t.getValue(h),d=a[h];if(!f||d===void 0||c&&w8(c,h))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const m=t.getProps()[lA];m&&(p.elapsed=window.HandoffAppearAnimations(m,h,f,lt),p.syncStart=!0)}f.start(Hd(h,f,d,t.shouldReduceMotion&&ji.has(h)?{type:!1}:p));const g=f.animation;Wu(l)&&(l.add(h),g.then(()=>l.remove(h))),u.push(g)}return s&&Promise.all(u).then(()=>{s&&v8(t,s)}),u}function Kd(t,e,n={}){const r=Bu(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Wy(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return C8(t,e,u+l,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function C8(t,e,n=0,r=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(t.variantChildren).sort(S8).forEach((u,c)=>{u.notify("AnimationStart",e),s.push(Kd(u,e,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(s)}function S8(t,e){return t.sortNodePosition(e)}function k8(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>Kd(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=Kd(t,e,n);else{const i=typeof e=="function"?Bu(t,e,n.custom):e;r=Promise.all(Wy(t,i,n))}return r.then(()=>t.notify("AnimationComplete",e))}const T8=[...pd].reverse(),E8=pd.length;function M8(t){return e=>Promise.all(e.map(({animation:n,options:r})=>k8(t,n,r)))}function O8(t){let e=M8(t);const n=P8();let r=!0;const i=(l,u)=>{const c=Bu(t,u);if(c){const{transition:h,transitionEnd:f,...d}=c;l={...l,...d,...f}}return l};function o(l){e=l(t)}function s(l,u){const c=t.getProps(),h=t.getVariantContext(!0)||{},f=[],d=new Set;let p={},g=1/0;for(let b=0;b<E8;b++){const x=T8[b],C=n[x],S=c[x]!==void 0?c[x]:h[x],w=Ca(S),k=x===u?C.isActive:null;k===!1&&(g=b);let T=S===h[x]&&S!==c[x]&&w;if(T&&r&&t.manuallyAnimateOnMount&&(T=!1),C.protectedKeys={...p},!C.isActive&&k===null||!S&&!C.prevProp||Ou(S)||typeof S=="boolean")continue;const O=A8(C.prevProp,S);let P=O||x===u&&C.isActive&&!T&&w||b>g&&w;const D=Array.isArray(S)?S:[S];let R=D.reduce(i,{});k===!1&&(R={});const{prevResolvedValues:H={}}=C,W={...H,...R},B=j=>{P=!0,d.delete(j),C.needsAnimating[j]=!0};for(const j in W){const N=R[j],V=H[j];p.hasOwnProperty(j)||(N!==V?$u(N)&&$u(V)?!ty(N,V)||O?B(j):C.protectedKeys[j]=!0:N!==void 0?B(j):d.add(j):N!==void 0&&d.has(j)?B(j):C.protectedKeys[j]=!0)}C.prevProp=S,C.prevResolvedValues=R,C.isActive&&(p={...p,...R}),r&&t.blockInitialAnimation&&(P=!1),P&&!T&&f.push(...D.map(j=>({animation:j,options:{type:x,...l}})))}if(d.size){const b={};d.forEach(x=>{const C=t.getBaseTarget(x);C!==void 0&&(b[x]=C)}),f.push({animation:b})}let m=!!f.length;return r&&c.initial===!1&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(f):Promise.resolve()}function a(l,u,c){var h;if(n[l].isActive===u)return Promise.resolve();(h=t.variantChildren)===null||h===void 0||h.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const f=s(c,l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function A8(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ty(e,t):!1}function Wi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function P8(){return{animate:Wi(!0),whileInView:Wi(),whileHover:Wi(),whileTap:Wi(),whileDrag:Wi(),whileFocus:Wi(),exit:Wi()}}class D8 extends ii{constructor(e){super(e),e.animationState||(e.animationState=O8(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Ou(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let _8=0;class I8 extends ii{constructor(){super(...arguments),this.id=_8++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:r??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const $8={animation:{Feature:D8},exit:{Feature:I8}},Hy=(t,e)=>Math.abs(t-e);function F8(t,e){const n=Hy(t.x,e.x),r=Hy(t.y,e.y);return Math.sqrt(n**2+r**2)}class qy{constructor(e,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Zd(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,h=F8(u.offset,{x:0,y:0})>=3;if(!c&&!h)return;const{point:f}=u,{timestamp:d}=qt;this.history.push({...f,timestamp:d});const{onStart:p,onMove:g}=this.handlers;c||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Xd(c,this.transformPagePoint),lt.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:h,onSessionEnd:f}=this.handlers,d=Zd(u.type==="pointercancel"?this.lastMoveEventInfo:Xd(c,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,d),f&&f(u,d)},!Yv(e))return;this.handlers=n,this.transformPagePoint=r;const i=Ru(e),o=Xd(i,this.transformPagePoint),{point:s}=o,{timestamp:a}=qt;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=n;l&&l(e,Zd(o,this.history)),this.removeListeners=ri(_r(window,"pointermove",this.handlePointerMove),_r(window,"pointerup",this.handlePointerUp),_r(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Pr(this.updatePoint)}}function Xd(t,e){return e?{point:e(t.point)}:t}function Uy(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Zd({point:t},e){return{point:t,delta:Uy(t,Yy(e)),offset:Uy(t,L8(e)),velocity:R8(e,.1)}}function L8(t){return t[0]}function Yy(t){return t[t.length-1]}function R8(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Yy(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>oi(e)));)n--;if(!r)return{x:0,y:0};const o=Ir(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Cn(t){return t.max-t.min}function Qd(t,e=0,n=.01){return Math.abs(t-e)<=n}function Gy(t,e,n,r=.5){t.origin=r,t.originPoint=xt(e.min,e.max,t.origin),t.scale=Cn(n)/Cn(e),(Qd(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=xt(n.min,n.max,t.origin)-t.originPoint,(Qd(t.translate)||isNaN(t.translate))&&(t.translate=0)}function $a(t,e,n,r){Gy(t.x,e.x,n.x,r?r.originX:void 0),Gy(t.y,e.y,n.y,r?r.originY:void 0)}function Ky(t,e,n){t.min=n.min+e.min,t.max=t.min+Cn(e)}function B8(t,e,n){Ky(t.x,e.x,n.x),Ky(t.y,e.y,n.y)}function Xy(t,e,n){t.min=e.min-n.min,t.max=t.min+Cn(e)}function Fa(t,e,n){Xy(t.x,e.x,n.x),Xy(t.y,e.y,n.y)}function N8(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?xt(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?xt(n,t,r.max):Math.min(t,n)),t}function Zy(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function j8(t,{top:e,left:n,bottom:r,right:i}){return{x:Zy(t.x,n,i),y:Zy(t.y,e,r)}}function Qy(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function V8(t,e){return{x:Qy(t.x,e.x),y:Qy(t.y,e.y)}}function z8(t,e){let n=.5;const r=Cn(t),i=Cn(e);return i>r?n=_a(e.min,e.max-r,t.min):r>i&&(n=_a(t.min,t.max-i,e.min)),ti(0,1,n)}function W8(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Jd=.35;function H8(t=Jd){return t===!1?t=0:t===!0&&(t=Jd),{x:Jy(t,"left","right"),y:Jy(t,"top","bottom")}}function Jy(t,e,n){return{min:eb(t,e),max:eb(t,n)}}function eb(t,e){return typeof t=="number"?t:t[e]||0}const tb=()=>({translate:0,scale:1,origin:0,originPoint:0}),Lo=()=>({x:tb(),y:tb()}),nb=()=>({min:0,max:0}),Bt=()=>({x:nb(),y:nb()});function ar(t){return[t("x"),t("y")]}function rb({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function q8({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function U8(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ep(t){return t===void 0||t===1}function tp({scale:t,scaleX:e,scaleY:n}){return!ep(t)||!ep(e)||!ep(n)}function Hi(t){return tp(t)||ib(t)||t.z||t.rotate||t.rotateX||t.rotateY}function ib(t){return ob(t.x)||ob(t.y)}function ob(t){return t&&t!=="0%"}function Hu(t,e,n){const r=t-n,i=e*r;return n+i}function sb(t,e,n,r,i){return i!==void 0&&(t=Hu(t,i,r)),Hu(t,n,r)+e}function np(t,e=0,n=1,r,i){t.min=sb(t.min,e,n,r,i),t.max=sb(t.max,e,n,r,i)}function ab(t,{x:e,y:n}){np(t.x,e.translate,e.scale,e.originPoint),np(t.y,n.translate,n.scale,n.originPoint)}function Y8(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ro(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,ab(t,s)),r&&Hi(o.latestValues)&&Ro(t,o.latestValues))}e.x=lb(e.x),e.y=lb(e.y)}function lb(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function ai(t,e){t.min=t.min+e,t.max=t.max+e}function ub(t,e,[n,r,i]){const o=e[i]!==void 0?e[i]:.5,s=xt(t.min,t.max,o);np(t,e[n],e[r],s,e.scale)}const G8=["x","scaleX","originX"],K8=["y","scaleY","originY"];function Ro(t,e){ub(t.x,e,G8),ub(t.y,e,K8)}function cb(t,e){return rb(U8(t.getBoundingClientRect(),e))}function X8(t,e,n){const r=cb(t,n),{scroll:i}=e;return i&&(ai(r.x,i.offset.x),ai(r.y,i.offset.y)),r}const Z8=new WeakMap;class Q8{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Bt(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(Ru(l,"page").point)},o=(l,u)=>{const{drag:c,dragPropagation:h,onDragStart:f}=this.getProps();if(c&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Zv(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ar(p=>{let g=this.getAxisMotionValue(p).get()||0;if(sr.test(g)){const{projection:m}=this.visualElement;if(m&&m.layout){const b=m.layout.layoutBox[p];b&&(g=Cn(b)*(parseFloat(g)/100))}}this.originPoint[p]=g}),f&&lt.update(()=>f(l,u),!1,!0);const{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},s=(l,u)=>{const{dragPropagation:c,dragDirectionLock:h,onDirectionLock:f,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=u;if(h&&this.currentDirection===null){this.currentDirection=J8(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),d&&d(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new qy(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&lt.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!qu(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=N8(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;e&&Io(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=j8(r.layoutBox,e):this.constraints=!1,this.elastic=H8(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ar(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=W8(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Io(e))return!1;const r=e.current;Kn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=X8(r,i.root,this.visualElement.getTransformPagePoint());let s=V8(i.layout.layoutBox,o);if(n){const a=n(q8(s));this.hasMutatedConstraints=!!a,a&&(s=rb(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ar(c=>{if(!qu(c,n,this.currentDirection))return;let h=l&&l[c]||{};s&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(Hd(e,r,0,n))}stopAnimation(){ar(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){ar(n=>{const{drag:r}=this.getProps();if(!qu(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-xt(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Io(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ar(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();i[s]=z8({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ar(s=>{if(!qu(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(xt(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;Z8.set(this.visualElement,this);const e=this.visualElement.current,n=_r(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Io(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=Dr(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ar(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Jd,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function qu(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function J8(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class e7 extends ii{constructor(e){super(e),this.removeGroupControls=Et,this.removeListeners=Et,this.controls=new Q8(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Et}unmount(){this.removeGroupControls(),this.removeListeners()}}const hb=t=>(e,n)=>{t&&lt.update(()=>t(e,n))};class t7 extends ii{constructor(){super(...arguments),this.removePointerDownListener=Et}onPointerDown(e){this.session=new qy(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:hb(e),onStart:hb(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&lt.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=_r(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function n7(){const t=v.useContext(Eu);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=v.useId();return v.useEffect(()=>r(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Uu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fb(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const La={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Se.test(t))t=parseFloat(t);else return t;const n=fb(t,e.target.x),r=fb(t,e.target.y);return`${n}% ${r}%`}},r7={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=si.parse(t);if(i.length>5)return r;const o=si.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const u=xt(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class i7 extends v.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;m6(o7),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Uu.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||lt.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function db(t){const[e,n]=n7(),r=v.useContext(vd);return v.createElement(i7,{...t,layoutGroup:r,switchLayoutGroup:v.useContext(Ov),isPresent:e,safeToRemove:n})}const o7={borderRadius:{...La,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:La,borderTopRightRadius:La,borderBottomLeftRadius:La,borderBottomRightRadius:La,boxShadow:r7},pb=["TopLeft","TopRight","BottomLeft","BottomRight"],s7=pb.length,gb=t=>typeof t=="string"?parseFloat(t):t,mb=t=>typeof t=="number"||Se.test(t);function a7(t,e,n,r,i,o){i?(t.opacity=xt(0,n.opacity!==void 0?n.opacity:1,l7(r)),t.opacityExit=xt(e.opacity!==void 0?e.opacity:1,0,u7(r))):o&&(t.opacity=xt(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<s7;s++){const a=`border${pb[s]}Radius`;let l=vb(e,a),u=vb(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||mb(l)===mb(u)?(t[a]=Math.max(xt(gb(l),gb(u),r),0),(sr.test(u)||sr.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=xt(e.rotate||0,n.rotate||0,r))}function vb(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const l7=yb(0,.5,Dd),u7=yb(.5,.95,Et);function yb(t,e,n){return r=>r<t?0:r>e?1:n(_a(t,e,r))}function bb(t,e){t.min=e.min,t.max=e.max}function Bn(t,e){bb(t.x,e.x),bb(t.y,e.y)}function xb(t,e,n,r,i){return t-=e,t=Hu(t,1/n,r),i!==void 0&&(t=Hu(t,1/i,r)),t}function c7(t,e=0,n=1,r=.5,i,o=t,s=t){if(sr.test(e)&&(e=parseFloat(e),e=xt(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=xt(o.min,o.max,r);t===o&&(a-=e),t.min=xb(t.min,e,n,a,i),t.max=xb(t.max,e,n,a,i)}function wb(t,e,[n,r,i],o,s){c7(t,e[n],e[r],e[i],e.scale,o,s)}const h7=["x","scaleX","originX"],f7=["y","scaleY","originY"];function Cb(t,e,n,r){wb(t.x,e,h7,n?n.x:void 0,r?r.x:void 0),wb(t.y,e,f7,n?n.y:void 0,r?r.y:void 0)}function Sb(t){return t.translate===0&&t.scale===1}function kb(t){return Sb(t.x)&&Sb(t.y)}function d7(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Tb(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Eb(t){return Cn(t.x)/Cn(t.y)}class p7{constructor(){this.members=[]}add(e){qd(this.members,e),e.scheduleRender()}remove(e){if(Ud(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Mb(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const s=t.x.scale*e.x,a=t.y.scale*e.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const g7=(t,e)=>t.depth-e.depth;class m7{constructor(){this.children=[],this.isDirty=!1}add(e){qd(this.children,e),this.isDirty=!0}remove(e){Ud(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(g7),this.isDirty=!1,this.children.forEach(e)}}function v7(t,e){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(Pr(r),t(o-e))};return lt.read(r,!0),()=>Pr(r)}function y7(t){window.MotionDebug&&window.MotionDebug.record(t)}function b7(t){return t instanceof SVGElement&&t.tagName!=="svg"}function x7(t,e,n){const r=dn(t)?t:Fo(t);return r.start(Hd("",r,e,n)),r.animation}const Ob=["","X","Y","Z"],Ab=1e3;let w7=0;const qi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Pb({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=w7++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{qi.totalNodes=qi.resolvedTargetDeltas=qi.recalculatedProjection=0,this.nodes.forEach(k7),this.nodes.forEach(A7),this.nodes.forEach(P7),this.nodes.forEach(T7),y7(qi)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new m7)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Yd),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=b7(s),this.instance=s;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=v7(f,250),Uu.hasAnimatedSinceResize&&(Uu.hasAnimatedSinceResize=!1,this.nodes.forEach(_b))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||F7,{onLayoutAnimationStart:m,onLayoutAnimationComplete:b}=c.getProps(),x=!this.targetLayout||!Tb(this.targetLayout,p)||d,C=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||C||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,C);const S={...By(g,"layout"),onPlay:m,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||_b(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Pr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(D7),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Db);return}this.isUpdating||this.nodes.forEach(M7),this.isUpdating=!1,this.nodes.forEach(O7),this.nodes.forEach(C7),this.nodes.forEach(S7),this.clearAllSnapshots();const a=performance.now();qt.delta=ti(0,1e3/60,a-qt.timestamp),qt.timestamp=a,qt.isProcessing=!0,Md.update.process(qt),Md.preRender.process(qt),Md.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(E7),this.sharedNodes.forEach(_7)}scheduleUpdateProjection(){lt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Bt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!kb(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&(a||Hi(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),L7(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Bt();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(ai(a.x,l.offset.x),ai(a.y,l.offset.y)),a}removeElementScroll(s){const a=Bt();Bn(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;if(u!==this.root&&c&&h.layoutScroll){if(c.isRoot){Bn(a,s);const{scroll:f}=this.root;f&&(ai(a.x,-f.offset.x),ai(a.y,-f.offset.y))}ai(a.x,c.offset.x),ai(a.y,c.offset.y)}}return a}applyTransform(s,a=!1){const l=Bt();Bn(l,s);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ro(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Hi(c.latestValues)&&Ro(l,c.latestValues)}return Hi(this.latestValues)&&Ro(l,this.latestValues),l}removeTransform(s){const a=Bt();Bn(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Hi(u.latestValues))continue;tp(u.latestValues)&&u.updateSnapshot();const c=Bt(),h=u.measurePageBox();Bn(c,h),Cb(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Hi(this.latestValues)&&Cb(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=qt.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bt(),this.relativeTargetOrigin=Bt(),Fa(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),Bn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Bt(),this.targetWithTransforms=Bt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),B8(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Bn(this.target,this.layout.layoutBox),ab(this.target,this.targetDelta)):Bn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bt(),this.relativeTargetOrigin=Bt(),Fa(this.relativeTargetOrigin,this.target,d.target),Bn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}qi.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||tp(this.parent.latestValues)||ib(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;Bn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Y8(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=Lo(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Lo(),this.projectionDeltaWithTransform=Lo());const g=this.projectionTransform;$a(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=Mb(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),qi.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=Lo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Bt(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=d!==p,m=this.getStack(),b=!m||m.members.length<=1,x=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some($7));this.animationProgress=0;let C;this.mixTargetDelta=S=>{const w=S/1e3;Ib(h.x,s.x,w),Ib(h.y,s.y,w),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fa(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),I7(this.relativeTarget,this.relativeTargetOrigin,f,w),C&&d7(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Bt()),Bn(C,this.relativeTarget)),g&&(this.animationValues=c,a7(c,u,this.latestValues,w,x,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Pr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Uu.hasAnimatedSinceResize=!0,this.currentAnimation=x7(0,Ab,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ab),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Bb(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Bt();const h=Cn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+h;const f=Cn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Bn(a,l),Ro(a,c),$a(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new p7),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let c=0;c<Ob.length;c++){const h="rotate"+Ob[c];l[h]&&(u[h]=l[h],s.setStaticValue(h,0))}s.render();for(const c in u)s.setStaticValue(c,u[c]);s.scheduleRender()}getProjectionStyles(s={}){var a,l;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Fu(s.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Fu(s.pointerEvents)||""),this.hasProjected&&!Hi(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=Mb(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:p}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Pu){if(f[g]===void 0)continue;const{correct:m,applyTo:b}=Pu[g],x=u.transform==="none"?f[g]:m(f[g],h);if(b){const C=b.length;for(let S=0;S<C;S++)u[b[S]]=x}else u[g]=x}return this.options.layoutId&&(u.pointerEvents=h===this?Fu(s.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Db),this.root.sharedNodes.clear()}}}function C7(t){t.updateLayout()}function S7(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=n.source!==t.layout.source;o==="size"?ar(h=>{const f=s?n.measuredBox[h]:n.layoutBox[h],d=Cn(f);f.min=r[h].min,f.max=f.min+d}):Bb(o,n.layoutBox,r)&&ar(h=>{const f=s?n.measuredBox[h]:n.layoutBox[h],d=Cn(r[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=Lo();$a(a,r,n.layoutBox);const l=Lo();s?$a(l,t.applyTransform(i,!0),n.measuredBox):$a(l,r,n.layoutBox);const u=!kb(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=Bt();Fa(p,n.layoutBox,f.layoutBox);const g=Bt();Fa(g,r,d.layoutBox),Tb(p,g)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function k7(t){qi.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function T7(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function E7(t){t.clearSnapshot()}function Db(t){t.clearMeasurements()}function M7(t){t.isLayoutDirty=!1}function O7(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function _b(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function A7(t){t.resolveTargetDelta()}function P7(t){t.calcProjection()}function D7(t){t.resetRotation()}function _7(t){t.removeLeadSnapshot()}function Ib(t,e,n){t.translate=xt(e.translate,0,n),t.scale=xt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function $b(t,e,n,r){t.min=xt(e.min,n.min,r),t.max=xt(e.max,n.max,r)}function I7(t,e,n,r){$b(t.x,e.x,n.x,r),$b(t.y,e.y,n.y,r)}function $7(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const F7={duration:.45,ease:[.4,0,.1,1]},Fb=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),Lb=Fb("applewebkit/")&&!Fb("chrome/")?Math.round:Et;function Rb(t){t.min=Lb(t.min),t.max=Lb(t.max)}function L7(t){Rb(t.x),Rb(t.y)}function Bb(t,e,n){return t==="position"||t==="preserve-aspect"&&!Qd(Eb(e),Eb(n),.2)}const R7=Pb({attachResizeListener:(t,e)=>Dr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rp={current:void 0},Nb=Pb({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rp.current){const t=new R7({});t.mount(window),t.setOptions({layoutScroll:!0}),rp.current=t}return rp.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),B7={pan:{Feature:t7},drag:{Feature:e7,ProjectionNode:Nb,MeasureLayout:db}},N7=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function j7(t){const e=N7.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}const V7=4;function ip(t,e,n=1){Kn(n<=V7,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,i]=j7(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return Ny(s)?parseFloat(s):s}else return bd(i)?ip(i,e,n+1):i}function z7(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!bd(o))return;const s=ip(o,r);s&&i.set(s)});for(const i in e){const o=e[i];if(!bd(o))continue;const s=ip(o,r);s&&(e[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const W7=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),jb=t=>W7.has(t),H7=t=>Object.keys(t).some(jb),Yu=t=>t===Vi||t===Se,Vb=(t,e)=>parseFloat(t.split(", ")[e]),zb=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Vb(i[1],e);{const o=r.match(/^matrix\((.+)\)$/);return o?Vb(o[1],t):0}},q7=new Set(["x","y","z"]),U7=ka.filter(t=>!q7.has(t));function Y7(t){const e=[];return U7.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const Bo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:zb(4,13),y:zb(5,14)};Bo.translateX=Bo.x,Bo.translateY=Bo.y;const G7=(t,e,n)=>{const r=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{a[u]=Bo[u](r,o)}),e.render();const l=e.measureViewportBox();return n.forEach(u=>{const c=e.getValue(u);c&&c.jump(a[u]),t[u]=Bo[u](l,o)}),t},K7=(t,e,n={},r={})=>{e={...e},r={...r};const i=Object.keys(e).filter(jb);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=t.getValue(l);if(!t.hasValue(l))return;let c=n[l],h=Ia(c);const f=e[l];let d;if($u(f)){const p=f.length,g=f[0]===null?1:0;c=f[g],h=Ia(c);for(let m=g;m<p&&f[m]!==null;m++)d?Kn(Ia(f[m])===d,"All keyframes must be of the same type"):(d=Ia(f[m]),Kn(d===h||Yu(h)&&Yu(d),"Keyframes must be of the same dimension as the current value"))}else d=Ia(f);if(h!==d)if(Yu(h)&&Yu(d)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?e[l]=parseFloat(f):Array.isArray(f)&&d===Se&&(e[l]=f.map(parseFloat))}else h!=null&&h.transform&&(d!=null&&d.transform)&&(c===0||f===0)?c===0?u.set(d.transform(c)):e[l]=h.transform(f):(s||(o=Y7(t),s=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:e[l],u.jump(f))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=G7(e,t,a);return o.length&&o.forEach(([c,h])=>{t.getValue(c).set(h)}),t.render(),Mu&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:e,transitionEnd:r}};function X7(t,e,n,r){return H7(e)?K7(t,e,n,r):{target:e,transitionEnd:r}}const Z7=(t,e,n,r)=>{const i=z7(t,e,r);return e=i.target,r=i.transitionEnd,X7(t,e,n,r)},op={current:null},Wb={current:!1};function Q7(){if(Wb.current=!0,!!Mu)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>op.current=t.matches;t.addListener(e),e()}else op.current=!1}function J7(t,e,n){const{willChange:r}=e;for(const i in e){const o=e[i],s=n[i];if(dn(o))t.addValue(i,o),Wu(r)&&r.add(i),process.env.NODE_ENV==="development"&&Gd(o.version==="10.16.4",`Attempting to mix Framer Motion versions ${o.version} with 10.16.4 may not work as expected.`);else if(dn(s))t.addValue(i,Fo(o,{owner:t})),Wu(r)&&r.remove(i);else if(s!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Fo(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Hb=new WeakMap,qb=Object.keys(Sa),e9=qb.length,Ub=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],t9=gd.length;class n9{constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>lt.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=Au(n),this.isVariantNode=Tv(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const h in c){const f=c[h];a[h]!==void 0&&dn(f)&&(f.set(a[h],!1),Wu(u)&&u.add(h))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,Hb.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Wb.current||Q7(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:op.current,process.env.NODE_ENV!=="production"&&Gd(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Hb.delete(this.current),this.projection&&this.projection.unmount(),Pr(this.notifyUpdate),Pr(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const r=ji.has(e),i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&lt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Aa(!1,l):Kn(!1,l)}for(let l=0;l<e9;l++){const u=qb[l],{isEnabled:c,Feature:h,ProjectionNode:f,MeasureLayout:d}=Sa[u];f&&(s=f),c(n)&&(!this.features[u]&&h&&(this.features[u]=new h(this)),d&&(a=d))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:c,dragConstraints:h,layoutScroll:f,layoutRoot:d}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||h&&Io(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Bt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ub.length;r++){const i=Ub[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=e["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=J7(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<t9;r++){const i=gd[r],o=this.props[i];(Ca(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Fo(n,{owner:this}),this.addValue(e,r)),r}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Ed(this.props,r))===null||n===void 0?void 0:n[e]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!dn(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Yd),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Yb extends n9{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...r},{transformValues:i},o){let s=x8(r,e||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){y8(this,r,s);const a=Z7(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:e,transitionEnd:n,...r}}}function r9(t){return window.getComputedStyle(t)}class i9 extends Yb{readValueFromInstance(e,n){if(ji.has(n)){const r=Wd(n);return r&&r.default||0}else{const r=r9(e),i=(Dv(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return cb(e,n)}build(e,n,r,i){xd(e,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return Td(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;dn(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,i){jv(e,n,r,i)}}class o9 extends Yb{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ji.has(n)){const r=Wd(n);return r&&r.default||0}return n=Vv.has(n)?n:kd(n),e.getAttribute(n)}measureInstanceViewportBox(){return Bt()}scrapeMotionValuesFromProps(e,n){return Wv(e,n)}build(e,n,r,i){Cd(e,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,r,i){zv(e,n,r,i)}mount(e){this.isSVGTag=Sd(e.tagName),super.mount(e)}}const s9=(t,e)=>yd(t)?new o9(e,{enableHardwareAcceleration:!1}):new i9(e,{enableHardwareAcceleration:!0}),a9={layout:{ProjectionNode:Nb,MeasureLayout:db}},Xn=p6(U6);function Gb(){const t=v.useRef(!1);return fd(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function l9(){const t=Gb(),[e,n]=v.useState(0),r=v.useCallback(()=>{t.current&&n(e+1)},[e]);return[v.useCallback(()=>lt.postRender(r),[r]),e]}class u9 extends Ce.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function c9({children:t,isPresent:e}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0});return v.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(e||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
28
+ [data-motion-pop-id="${n}"] {
29
+ position: absolute !important;
30
+ width: ${o}px !important;
31
+ height: ${s}px !important;
32
+ top: ${a}px !important;
33
+ left: ${l}px !important;
34
+ }
35
+ `),()=>{document.head.removeChild(u)}},[e]),Ce.createElement(u9,{isPresent:e,childRef:r,sizeRef:i},Ce.cloneElement(t,{ref:r}))}const sp=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Hv(h9),l=v.useId(),u=v.useMemo(()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:c=>{a.set(c,!0);for(const h of a.values())if(!h)return;r&&r()},register:c=>(a.set(c,!1),()=>a.delete(c))}),o?void 0:[n]);return v.useMemo(()=>{a.forEach((c,h)=>a.set(h,!1))},[n]),Ce.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=Ce.createElement(c9,{isPresent:n},t)),Ce.createElement(Eu.Provider,{value:u},t)};function h9(){return new Map}function f9(t){return v.useEffect(()=>()=>t(),[])}const No=t=>t.key||"";function d9(t,e){t.forEach(n=>{const r=No(n);e.set(r,n)})}function p9(t){const e=[];return v.Children.forEach(t,n=>{v.isValidElement(n)&&e.push(n)}),e}const Kb=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Kn(!i,"Replace exitBeforeEnter with mode='wait'");const a=v.useContext(vd).forceRender||l9()[0],l=Gb(),u=p9(t);let c=u;const h=v.useRef(new Map).current,f=v.useRef(c),d=v.useRef(new Map).current,p=v.useRef(!0);if(fd(()=>{p.current=!1,d9(u,d),f.current=c}),f9(()=>{p.current=!0,d.clear(),h.clear()}),p.current)return Ce.createElement(Ce.Fragment,null,c.map(x=>Ce.createElement(sp,{key:No(x),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},x)));c=[...c];const g=f.current.map(No),m=u.map(No),b=g.length;for(let x=0;x<b;x++){const C=g[x];m.indexOf(C)===-1&&!h.has(C)&&h.set(C,void 0)}return s==="wait"&&h.size&&(c=[]),h.forEach((x,C)=>{if(m.indexOf(C)!==-1)return;const S=d.get(C);if(!S)return;const w=g.indexOf(C);let k=x;if(!k){const T=()=>{d.delete(C),h.delete(C);const O=f.current.findIndex(P=>P.key===C);if(f.current.splice(O,1),!h.size){if(f.current=u,l.current===!1)return;a(),r&&r()}};k=Ce.createElement(sp,{key:No(S),isPresent:!1,onExitComplete:T,custom:e,presenceAffectsLayout:o,mode:s},S),h.set(C,k)}c.splice(w,0,k)}),c=c.map(x=>{const C=x.key;return h.has(C)?x:Ce.createElement(sp,{key:No(x),isPresent:!0,presenceAffectsLayout:o,mode:s},x)}),process.env.NODE_ENV!=="production"&&s==="wait"&&c.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),Ce.createElement(Ce.Fragment,null,h.size?c:c.map(x=>v.cloneElement(x)))};function g9({children:t,features:e,strict:n=!1}){const[,r]=v.useState(!ap(e)),i=v.useRef(void 0);if(!ap(e)){const{renderer:o,...s}=e;i.current=o,md(s)}return v.useEffect(()=>{ap(e)&&e().then(({renderer:o,...s})=>{md(s),i.current=o,r(!0)})},[]),Ce.createElement(dd.Provider,{value:{renderer:i.current,strict:n}},t)}function ap(t){return typeof t=="function"}const m9={...{renderer:s9,...$8,...oA},...B7,...a9},v9=({open:t=!1,variants:e,onClose:n,children:r,sx:i,...o})=>y.jsx(Kb,{children:t&&y.jsx(M.Dialog,{fullWidth:!0,maxWidth:"xs",open:t,onClose:n,PaperComponent:s=>y.jsxs(M.Box,{component:Xn.div,...e||ya({distance:120,durationIn:.32,durationOut:.24,easeIn:"easeInOut"}).inUp,sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:[y.jsx(M.Box,{onClick:n,sx:{width:"100%",height:"100%",position:"fixed"}}),y.jsx(M.Paper,{sx:i,...s,children:s.children})]}),...o,children:r})}),y9=({text:t,variants:e,sx:n,...r})=>y.jsx(M.Box,{component:Xn.div,sx:{m:0,typography:"h1",overflow:"hidden",display:"inline-flex",...n},...r,children:t.split("").map((i,o)=>y.jsx(Xn.span,{variants:e||ya().inUp,children:i},o))}),Xb=v.forwardRef(({size:t="large",children:e,sx:n,sxWrap:r,...i},o)=>y.jsx(C9,{size:t,sxWrap:r,children:y.jsx(M.Fab,{ref:o,size:t,sx:n,...i,children:e})}));Xb.displayName="FabButtonAnimate";const b9={hover:{scale:1.07},tap:{scale:.97}},x9={hover:{scale:1.06},tap:{scale:.98}},w9={hover:{scale:1.05},tap:{scale:.99}},C9=({size:t,children:e,sxWrap:n})=>{const r=t==="small",i=t==="large";return y.jsx(M.Box,{component:Xn.div,whileTap:"tap",whileHover:"hover",variants:r&&b9||i&&w9||x9,sx:{display:"inline-flex",...n},children:e})},S9={hover:{scale:1.1},tap:{scale:.95}},k9={hover:{scale:1.09},tap:{scale:.97}},T9={hover:{scale:1.08},tap:{scale:.99}},E9=({size:t,children:e})=>{const n=t==="small",r=t==="large";return y.jsx(M.Box,{component:Xn.div,whileTap:"tap",whileHover:"hover",variants:n&&S9||r&&T9||k9,sx:{display:"inline-flex"},children:e})},Zb=v.forwardRef(({children:t,size:e="medium",...n},r)=>y.jsx(E9,{size:e,children:y.jsx(M.IconButton,{size:e,ref:r,...n,children:t})}));Zb.displayName="IconButtonAnimate";function Pe(){return Pe=Object.assign?Object.assign.bind():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},Pe.apply(this,arguments)}function jo(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function Qb(t){if(!jo(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=Qb(t[n])}),e}function $r(t,e,n={clone:!0}){const r=n.clone?Pe({},t):t;return jo(t)&&jo(e)&&Object.keys(e).forEach(i=>{i!=="__proto__"&&(jo(e[i])&&i in t&&jo(t[i])?r[i]=$r(t[i],e[i],n):n.clone?r[i]=jo(e[i])?Qb(e[i]):e[i]:r[i]=e[i])}),r}var lp={exports:{}},Gu={exports:{}},Ge={};/** @license React v16.13.1
36
+ * react-is.production.min.js
37
+ *
38
+ * Copyright (c) Facebook, Inc. and its affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var Jb;function M9(){if(Jb)return Ge;Jb=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,i=t?Symbol.for("react.strict_mode"):60108,o=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,c=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function C(w){if(typeof w=="object"&&w!==null){var k=w.$$typeof;switch(k){case e:switch(w=w.type,w){case l:case u:case r:case o:case i:case h:return w;default:switch(w=w&&w.$$typeof,w){case a:case c:case p:case d:case s:return w;default:return k}}case n:return k}}}function S(w){return C(w)===u}return Ge.AsyncMode=l,Ge.ConcurrentMode=u,Ge.ContextConsumer=a,Ge.ContextProvider=s,Ge.Element=e,Ge.ForwardRef=c,Ge.Fragment=r,Ge.Lazy=p,Ge.Memo=d,Ge.Portal=n,Ge.Profiler=o,Ge.StrictMode=i,Ge.Suspense=h,Ge.isAsyncMode=function(w){return S(w)||C(w)===l},Ge.isConcurrentMode=S,Ge.isContextConsumer=function(w){return C(w)===a},Ge.isContextProvider=function(w){return C(w)===s},Ge.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Ge.isForwardRef=function(w){return C(w)===c},Ge.isFragment=function(w){return C(w)===r},Ge.isLazy=function(w){return C(w)===p},Ge.isMemo=function(w){return C(w)===d},Ge.isPortal=function(w){return C(w)===n},Ge.isProfiler=function(w){return C(w)===o},Ge.isStrictMode=function(w){return C(w)===i},Ge.isSuspense=function(w){return C(w)===h},Ge.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===u||w===o||w===i||w===h||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===d||w.$$typeof===s||w.$$typeof===a||w.$$typeof===c||w.$$typeof===m||w.$$typeof===b||w.$$typeof===x||w.$$typeof===g)},Ge.typeOf=C,Ge}var Ke={};/** @license React v16.13.1
43
+ * react-is.development.js
44
+ *
45
+ * Copyright (c) Facebook, Inc. and its affiliates.
46
+ *
47
+ * This source code is licensed under the MIT license found in the
48
+ * LICENSE file in the root directory of this source tree.
49
+ */var ex;function O9(){return ex||(ex=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,i=t?Symbol.for("react.strict_mode"):60108,o=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,c=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function C(q){return typeof q=="string"||typeof q=="function"||q===r||q===u||q===o||q===i||q===h||q===f||typeof q=="object"&&q!==null&&(q.$$typeof===p||q.$$typeof===d||q.$$typeof===s||q.$$typeof===a||q.$$typeof===c||q.$$typeof===m||q.$$typeof===b||q.$$typeof===x||q.$$typeof===g)}function S(q){if(typeof q=="object"&&q!==null){var ht=q.$$typeof;switch(ht){case e:var ae=q.type;switch(ae){case l:case u:case r:case o:case i:case h:return ae;default:var X=ae&&ae.$$typeof;switch(X){case a:case c:case p:case d:case s:return X;default:return ht}}case n:return ht}}}var w=l,k=u,T=a,O=s,P=e,D=c,R=r,H=p,W=d,B=n,j=o,N=i,V=h,me=!1;function re(q){return me||(me=!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.")),_(q)||S(q)===l}function _(q){return S(q)===u}function F(q){return S(q)===a}function U(q){return S(q)===s}function se(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function Q(q){return S(q)===c}function ve(q){return S(q)===r}function le(q){return S(q)===p}function ye(q){return S(q)===d}function ue(q){return S(q)===n}function ne(q){return S(q)===o}function ce(q){return S(q)===i}function _e(q){return S(q)===h}Ke.AsyncMode=w,Ke.ConcurrentMode=k,Ke.ContextConsumer=T,Ke.ContextProvider=O,Ke.Element=P,Ke.ForwardRef=D,Ke.Fragment=R,Ke.Lazy=H,Ke.Memo=W,Ke.Portal=B,Ke.Profiler=j,Ke.StrictMode=N,Ke.Suspense=V,Ke.isAsyncMode=re,Ke.isConcurrentMode=_,Ke.isContextConsumer=F,Ke.isContextProvider=U,Ke.isElement=se,Ke.isForwardRef=Q,Ke.isFragment=ve,Ke.isLazy=le,Ke.isMemo=ye,Ke.isPortal=ue,Ke.isProfiler=ne,Ke.isStrictMode=ce,Ke.isSuspense=_e,Ke.isValidElementType=C,Ke.typeOf=S}()),Ke}var tx;function nx(){return tx||(tx=1,process.env.NODE_ENV==="production"?Gu.exports=M9():Gu.exports=O9()),Gu.exports}/*
50
+ object-assign
51
+ (c) Sindre Sorhus
52
+ @license MIT
53
+ */var up,rx;function A9(){if(rx)return up;rx=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(c){return s[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return up=i()?Object.assign:function(o,s){for(var a,l=r(o),u,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var h in a)e.call(a,h)&&(l[h]=a[h]);if(t){u=t(a);for(var f=0;f<u.length;f++)n.call(a,u[f])&&(l[u[f]]=a[u[f]])}}return l},up}var cp,ix;function hp(){if(ix)return cp;ix=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cp=t,cp}var fp,ox;function sx(){return ox||(ox=1,fp=Function.call.bind(Object.prototype.hasOwnProperty)),fp}var dp,ax;function P9(){if(ax)return dp;ax=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=hp(),n={},r=sx();t=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(o,s,a,l,u){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var h;try{if(typeof o[c]!="function"){var f=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}h=o[c](s,c,l,a,null,e)}catch(p){h=p}if(h&&!(h instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+c+"` 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 d=u?u():"";t("Failed "+a+" type: "+h.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},dp=i,dp}var pp,lx;function D9(){if(lx)return pp;lx=1;var t=nx(),e=A9(),n=hp(),r=sx(),i=P9(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return pp=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function h(_){var F=_&&(u&&_[u]||_[c]);if(typeof F=="function")return F}var f="<<anonymous>>",d={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:x(),arrayOf:C,element:S(),elementType:w(),instanceOf:k,node:D(),objectOf:O,oneOf:T,oneOfType:P,shape:H,exact:W};function p(_,F){return _===F?_!==0||1/_===1/F:_!==_&&F!==F}function g(_,F){this.message=_,this.data=F&&typeof F=="object"?F:{},this.stack=""}g.prototype=Error.prototype;function m(_){if(process.env.NODE_ENV!=="production")var F={},U=0;function se(ve,le,ye,ue,ne,ce,_e){if(ue=ue||f,ce=ce||ye,_e!==n){if(l){var q=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 q.name="Invariant Violation",q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ht=ue+":"+ye;!F[ht]&&U<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ce+"` prop on `"+ue+"`. 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."),F[ht]=!0,U++)}}return le[ye]==null?ve?le[ye]===null?new g("The "+ne+" `"+ce+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new g("The "+ne+" `"+ce+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:_(le,ye,ue,ne,ce)}var Q=se.bind(null,!1);return Q.isRequired=se.bind(null,!0),Q}function b(_){function F(U,se,Q,ve,le,ye){var ue=U[se],ne=N(ue);if(ne!==_){var ce=V(ue);return new g("Invalid "+ve+" `"+le+"` of type "+("`"+ce+"` supplied to `"+Q+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return m(F)}function x(){return m(s)}function C(_){function F(U,se,Q,ve,le){if(typeof _!="function")return new g("Property `"+le+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var ye=U[se];if(!Array.isArray(ye)){var ue=N(ye);return new g("Invalid "+ve+" `"+le+"` of type "+("`"+ue+"` supplied to `"+Q+"`, expected an array."))}for(var ne=0;ne<ye.length;ne++){var ce=_(ye,ne,Q,ve,le+"["+ne+"]",n);if(ce instanceof Error)return ce}return null}return m(F)}function S(){function _(F,U,se,Q,ve){var le=F[U];if(!a(le)){var ye=N(le);return new g("Invalid "+Q+" `"+ve+"` of type "+("`"+ye+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return m(_)}function w(){function _(F,U,se,Q,ve){var le=F[U];if(!t.isValidElementType(le)){var ye=N(le);return new g("Invalid "+Q+" `"+ve+"` of type "+("`"+ye+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return m(_)}function k(_){function F(U,se,Q,ve,le){if(!(U[se]instanceof _)){var ye=_.name||f,ue=re(U[se]);return new g("Invalid "+ve+" `"+le+"` of type "+("`"+ue+"` supplied to `"+Q+"`, expected ")+("instance of `"+ye+"`."))}return null}return m(F)}function T(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function F(U,se,Q,ve,le){for(var ye=U[se],ue=0;ue<_.length;ue++)if(p(ye,_[ue]))return null;var ne=JSON.stringify(_,function(_e,q){var ht=V(q);return ht==="symbol"?String(q):q});return new g("Invalid "+ve+" `"+le+"` of value `"+String(ye)+"` "+("supplied to `"+Q+"`, expected one of "+ne+"."))}return m(F)}function O(_){function F(U,se,Q,ve,le){if(typeof _!="function")return new g("Property `"+le+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var ye=U[se],ue=N(ye);if(ue!=="object")return new g("Invalid "+ve+" `"+le+"` of type "+("`"+ue+"` supplied to `"+Q+"`, expected an object."));for(var ne in ye)if(r(ye,ne)){var ce=_(ye,ne,Q,ve,le+"."+ne,n);if(ce instanceof Error)return ce}return null}return m(F)}function P(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var F=0;F<_.length;F++){var U=_[F];if(typeof U!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+me(U)+" at index "+F+"."),s}function se(Q,ve,le,ye,ue){for(var ne=[],ce=0;ce<_.length;ce++){var _e=_[ce],q=_e(Q,ve,le,ye,ue,n);if(q==null)return null;q.data&&r(q.data,"expectedType")&&ne.push(q.data.expectedType)}var ht=ne.length>0?", expected one of type ["+ne.join(", ")+"]":"";return new g("Invalid "+ye+" `"+ue+"` supplied to "+("`"+le+"`"+ht+"."))}return m(se)}function D(){function _(F,U,se,Q,ve){return B(F[U])?null:new g("Invalid "+Q+" `"+ve+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return m(_)}function R(_,F,U,se,Q){return new g((_||"React class")+": "+F+" type `"+U+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function H(_){function F(U,se,Q,ve,le){var ye=U[se],ue=N(ye);if(ue!=="object")return new g("Invalid "+ve+" `"+le+"` of type `"+ue+"` "+("supplied to `"+Q+"`, expected `object`."));for(var ne in _){var ce=_[ne];if(typeof ce!="function")return R(Q,ve,le,ne,V(ce));var _e=ce(ye,ne,Q,ve,le+"."+ne,n);if(_e)return _e}return null}return m(F)}function W(_){function F(U,se,Q,ve,le){var ye=U[se],ue=N(ye);if(ue!=="object")return new g("Invalid "+ve+" `"+le+"` of type `"+ue+"` "+("supplied to `"+Q+"`, expected `object`."));var ne=e({},U[se],_);for(var ce in ne){var _e=_[ce];if(r(_,ce)&&typeof _e!="function")return R(Q,ve,le,ce,V(_e));if(!_e)return new g("Invalid "+ve+" `"+le+"` key `"+ce+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(U[se],null," ")+`
54
+ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var q=_e(ye,ce,Q,ve,le+"."+ce,n);if(q)return q}return null}return m(F)}function B(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(B);if(_===null||a(_))return!0;var F=h(_);if(F){var U=F.call(_),se;if(F!==_.entries){for(;!(se=U.next()).done;)if(!B(se.value))return!1}else for(;!(se=U.next()).done;){var Q=se.value;if(Q&&!B(Q[1]))return!1}}else return!1;return!0;default:return!1}}function j(_,F){return _==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function N(_){var F=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":j(F,_)?"symbol":F}function V(_){if(typeof _>"u"||_===null)return""+_;var F=N(_);if(F==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return F}function me(_){var F=V(_);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function re(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},pp}var gp,ux;function _9(){if(ux)return gp;ux=1;var t=hp();function e(){}function n(){}return n.resetWarningCache=e,gp=function(){function r(s,a,l,u,c,h){if(h!==t){var f=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 f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},gp}if(process.env.NODE_ENV!=="production"){var I9=nx(),$9=!0;lp.exports=D9()(I9.isElement,$9)}else lp.exports=_9()();var F9=lp.exports;const A=Ni(F9),L9="exact-prop: ​";function cx(t){return process.env.NODE_ENV==="production"?t:Pe({},t,{[L9]: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 Vo(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<arguments.length;n+=1)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var mp={exports:{}},Xe={};/**
55
+ * @license React
56
+ * react-is.production.min.js
57
+ *
58
+ * Copyright (c) Facebook, Inc. and its affiliates.
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE file in the root directory of this source tree.
62
+ */var hx;function R9(){if(hx)return Xe;hx=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),p;p=Symbol.for("react.module.reference");function g(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case n:case i:case r:case u:case c:return m;default:switch(m=m&&m.$$typeof,m){case a:case s:case l:case f:case h:case o:return m;default:return b}}case e:return b}}}return Xe.ContextConsumer=s,Xe.ContextProvider=o,Xe.Element=t,Xe.ForwardRef=l,Xe.Fragment=n,Xe.Lazy=f,Xe.Memo=h,Xe.Portal=e,Xe.Profiler=i,Xe.StrictMode=r,Xe.Suspense=u,Xe.SuspenseList=c,Xe.isAsyncMode=function(){return!1},Xe.isConcurrentMode=function(){return!1},Xe.isContextConsumer=function(m){return g(m)===s},Xe.isContextProvider=function(m){return g(m)===o},Xe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Xe.isForwardRef=function(m){return g(m)===l},Xe.isFragment=function(m){return g(m)===n},Xe.isLazy=function(m){return g(m)===f},Xe.isMemo=function(m){return g(m)===h},Xe.isPortal=function(m){return g(m)===e},Xe.isProfiler=function(m){return g(m)===i},Xe.isStrictMode=function(m){return g(m)===r},Xe.isSuspense=function(m){return g(m)===u},Xe.isSuspenseList=function(m){return g(m)===c},Xe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===i||m===r||m===u||m===c||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===h||m.$$typeof===o||m.$$typeof===s||m.$$typeof===l||m.$$typeof===p||m.getModuleId!==void 0)},Xe.typeOf=g,Xe}var Ze={};/**
63
+ * @license React
64
+ * react-is.development.js
65
+ *
66
+ * Copyright (c) Facebook, Inc. and its affiliates.
67
+ *
68
+ * This source code is licensed under the MIT license found in the
69
+ * LICENSE file in the root directory of this source tree.
70
+ */var fx;function B9(){return fx||(fx=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),p=!1,g=!1,m=!1,b=!1,x=!1,C;C=Symbol.for("react.module.reference");function S(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===n||ae===i||x||ae===r||ae===u||ae===c||b||ae===d||p||g||m||typeof ae=="object"&&ae!==null&&(ae.$$typeof===f||ae.$$typeof===h||ae.$$typeof===o||ae.$$typeof===s||ae.$$typeof===l||ae.$$typeof===C||ae.getModuleId!==void 0))}function w(ae){if(typeof ae=="object"&&ae!==null){var X=ae.$$typeof;switch(X){case t:var fe=ae.type;switch(fe){case n:case i:case r:case u:case c:return fe;default:var xe=fe&&fe.$$typeof;switch(xe){case a:case s:case l:case f:case h:case o:return xe;default:return X}}case e:return X}}}var k=s,T=o,O=t,P=l,D=n,R=f,H=h,W=e,B=i,j=r,N=u,V=c,me=!1,re=!1;function _(ae){return me||(me=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(ae){return re||(re=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(ae){return w(ae)===s}function se(ae){return w(ae)===o}function Q(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===t}function ve(ae){return w(ae)===l}function le(ae){return w(ae)===n}function ye(ae){return w(ae)===f}function ue(ae){return w(ae)===h}function ne(ae){return w(ae)===e}function ce(ae){return w(ae)===i}function _e(ae){return w(ae)===r}function q(ae){return w(ae)===u}function ht(ae){return w(ae)===c}Ze.ContextConsumer=k,Ze.ContextProvider=T,Ze.Element=O,Ze.ForwardRef=P,Ze.Fragment=D,Ze.Lazy=R,Ze.Memo=H,Ze.Portal=W,Ze.Profiler=B,Ze.StrictMode=j,Ze.Suspense=N,Ze.SuspenseList=V,Ze.isAsyncMode=_,Ze.isConcurrentMode=F,Ze.isContextConsumer=U,Ze.isContextProvider=se,Ze.isElement=Q,Ze.isForwardRef=ve,Ze.isFragment=le,Ze.isLazy=ye,Ze.isMemo=ue,Ze.isPortal=ne,Ze.isProfiler=ce,Ze.isStrictMode=_e,Ze.isSuspense=q,Ze.isSuspenseList=ht,Ze.isValidElementType=S,Ze.typeOf=w}()),Ze}process.env.NODE_ENV==="production"?mp.exports=R9():mp.exports=B9();var dx=mp.exports;const N9=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function j9(t){const e=`${t}`.match(N9);return e&&e[1]||""}function px(t,e=""){return t.displayName||t.name||j9(t)||e}function gx(t,e,n){const r=px(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function V9(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return px(t,"Component");if(typeof t=="object")switch(t.$$typeof){case dx.ForwardRef:return gx(t,t.render,"ForwardRef");case dx.Memo:return gx(t,t.type,"memo");default:return}}}function zo(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Vo(7));return t.charAt(0).toUpperCase()+t.slice(1)}const z9=typeof window<"u"?Ce.useLayoutEffect:Ce.useEffect;function mx(t,e){const n=Pe({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=Pe({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},o=e[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=Pe({},o),Object.keys(i).forEach(s=>{n[r][s]=mx(i[s],o[s])}))}else n[r]===void 0&&(n[r]=t[r])}),n}const vx=t=>t,W9=(()=>{let t=vx;return{configure(e){t=e},generate(e){return t(e)},reset(){t=vx}}})(),H9={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 q9(t,e,n="Mui"){const r=H9[e];return r?`${n}-${r}`:`${W9.generate(t)}-${e}`}const Ku="$$material";function Fr(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}/**
71
+ * @mui/styled-engine v5.14.11
72
+ *
73
+ * @license MIT
74
+ * This source code is licensed under the MIT license found in the
75
+ * LICENSE file in the root directory of this source tree.
76
+ */function U9(t,e){const n=qO(t,e);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof t=="string"?`"${t}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
77
+ `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}const Y9=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},G9=["values","unit","step"],K9=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)=>Pe({},n,{[r.key]:r.val}),{})};function X9(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=Fr(t,G9),o=K9(e),s=Object.keys(o);function a(f){return`@media (min-width:${typeof e[f]=="number"?e[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof e[f]=="number"?e[f]:f)-r/100}${n})`}function u(f,d){const p=s.indexOf(d);return`@media (min-width:${typeof e[f]=="number"?e[f]:f}${n}) and (max-width:${(p!==-1&&typeof e[s[p]]=="number"?e[s[p]]:d)-r/100}${n})`}function c(f){return s.indexOf(f)+1<s.length?u(f,s[s.indexOf(f)+1]):a(f)}function h(f){const d=s.indexOf(f);return d===0?a(s[1]):d===s.length-1?l(s[d]):u(f,s[s.indexOf(f)+1]).replace("@media","@media not all and")}return Pe({keys:s,values:o,up:a,down:l,between:u,only:c,not:h,unit:n},i)}const Z9={borderRadius:4},li=process.env.NODE_ENV!=="production"?A.oneOfType([A.number,A.string,A.object,A.array]):{};function Ra(t,e){return e?$r(t,e,{clone:!1}):t}const vp={xs:0,sm:600,md:900,lg:1200,xl:1536},yx={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${vp[t]}px)`};function Lr(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const o=r.breakpoints||yx;return e.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const o=r.breakpoints||yx;return Object.keys(e).reduce((s,a)=>{if(Object.keys(o.values||vp).indexOf(a)!==-1){const l=o.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function Q9(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const o=t.up(i);return r[o]={},r},{}))||{}}function J9(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function Xu(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function Zu(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=Xu(t,n)||r,e&&(i=e(i,r,t)),i}function Qe(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,o=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,u=Xu(l,r)||{};return Lr(s,a,h=>{let f=Zu(u,i,h);return h===f&&typeof h=="string"&&(f=Zu(u,i,`${e}${h==="default"?"":zo(h)}`,h)),n===!1?f:{[n]:f}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[e]:li}:{},o.filterProps=[e],o}function eP(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const tP={m:"margin",p:"padding"},nP={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},bx={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},rP=eP(t=>{if(t.length>2)if(bx[t])t=bx[t];else return[t];const[e,n]=t.split(""),r=tP[e],i=nP[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Qu=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ju=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],iP=[...Qu,...Ju];function Ba(t,e,n,r){var i;const o=(i=Xu(t,e,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),o*s):Array.isArray(o)?s=>typeof s=="string"?s:(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(`
78
+ `)):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(`
79
+ `))),o[s]):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(`
80
+ `)),()=>{})}function xx(t){return Ba(t,"spacing",8,"spacing")}function Na(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function oP(t,e){return n=>t.reduce((r,i)=>(r[i]=Na(e,n),r),{})}function sP(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=rP(n),o=oP(i,r),s=t[n];return Lr(t,s,o)}function wx(t,e){const n=xx(t.theme);return Object.keys(t).map(r=>sP(t,e,r,n)).reduce(Ra,{})}function Mt(t){return wx(t,Qu)}Mt.propTypes=process.env.NODE_ENV!=="production"?Qu.reduce((t,e)=>(t[e]=li,t),{}):{},Mt.filterProps=Qu;function Ot(t){return wx(t,Ju)}Ot.propTypes=process.env.NODE_ENV!=="production"?Ju.reduce((t,e)=>(t[e]=li,t),{}):{},Ot.filterProps=Ju,process.env.NODE_ENV!=="production"&&iP.reduce((t,e)=>(t[e]=li,t),{});function aP(t=8){if(t.mui)return t;const e=xx({spacing:t}),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(o=>{const s=e(o);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function ec(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>e[o]?Ra(i,e[o](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?t.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function lr(t){return typeof t!="number"?t:`${t}px solid`}const lP=Qe({prop:"border",themeKey:"borders",transform:lr}),uP=Qe({prop:"borderTop",themeKey:"borders",transform:lr}),cP=Qe({prop:"borderRight",themeKey:"borders",transform:lr}),hP=Qe({prop:"borderBottom",themeKey:"borders",transform:lr}),fP=Qe({prop:"borderLeft",themeKey:"borders",transform:lr}),dP=Qe({prop:"borderColor",themeKey:"palette"}),pP=Qe({prop:"borderTopColor",themeKey:"palette"}),gP=Qe({prop:"borderRightColor",themeKey:"palette"}),mP=Qe({prop:"borderBottomColor",themeKey:"palette"}),vP=Qe({prop:"borderLeftColor",themeKey:"palette"}),tc=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Ba(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Na(e,r)});return Lr(t,t.borderRadius,n)}return null};tc.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:li}:{},tc.filterProps=["borderRadius"],ec(lP,uP,cP,hP,fP,dP,pP,gP,mP,vP,tc);const nc=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Ba(t.theme,"spacing",8,"gap"),n=r=>({gap:Na(e,r)});return Lr(t,t.gap,n)}return null};nc.propTypes=process.env.NODE_ENV!=="production"?{gap:li}:{},nc.filterProps=["gap"];const rc=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Ba(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Na(e,r)});return Lr(t,t.columnGap,n)}return null};rc.propTypes=process.env.NODE_ENV!=="production"?{columnGap:li}:{},rc.filterProps=["columnGap"];const ic=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Ba(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Na(e,r)});return Lr(t,t.rowGap,n)}return null};ic.propTypes=process.env.NODE_ENV!=="production"?{rowGap:li}:{},ic.filterProps=["rowGap"];const yP=Qe({prop:"gridColumn"}),bP=Qe({prop:"gridRow"}),xP=Qe({prop:"gridAutoFlow"}),wP=Qe({prop:"gridAutoColumns"}),CP=Qe({prop:"gridAutoRows"}),SP=Qe({prop:"gridTemplateColumns"}),kP=Qe({prop:"gridTemplateRows"}),TP=Qe({prop:"gridTemplateAreas"}),EP=Qe({prop:"gridArea"});ec(nc,rc,ic,yP,bP,xP,wP,CP,SP,kP,TP,EP);function Wo(t,e){return e==="grey"?e:t}const MP=Qe({prop:"color",themeKey:"palette",transform:Wo}),OP=Qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Wo}),AP=Qe({prop:"backgroundColor",themeKey:"palette",transform:Wo});ec(MP,OP,AP);function Sn(t){return t<=1&&t!==0?`${t*100}%`:t}const PP=Qe({prop:"width",transform:Sn}),yp=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const o=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||vp[n];return o?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Sn(n)}};return Lr(t,t.maxWidth,e)}return null};yp.filterProps=["maxWidth"];const DP=Qe({prop:"minWidth",transform:Sn}),_P=Qe({prop:"height",transform:Sn}),IP=Qe({prop:"maxHeight",transform:Sn}),$P=Qe({prop:"minHeight",transform:Sn});Qe({prop:"size",cssProperty:"width",transform:Sn}),Qe({prop:"size",cssProperty:"height",transform:Sn});const FP=Qe({prop:"boxSizing"});ec(PP,yp,DP,_P,IP,$P,FP);const bp={border:{themeKey:"borders",transform:lr},borderTop:{themeKey:"borders",transform:lr},borderRight:{themeKey:"borders",transform:lr},borderBottom:{themeKey:"borders",transform:lr},borderLeft:{themeKey:"borders",transform:lr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:tc},color:{themeKey:"palette",transform:Wo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Wo},backgroundColor:{themeKey:"palette",transform:Wo},p:{style:Ot},pt:{style:Ot},pr:{style:Ot},pb:{style:Ot},pl:{style:Ot},px:{style:Ot},py:{style:Ot},padding:{style:Ot},paddingTop:{style:Ot},paddingRight:{style:Ot},paddingBottom:{style:Ot},paddingLeft:{style:Ot},paddingX:{style:Ot},paddingY:{style:Ot},paddingInline:{style:Ot},paddingInlineStart:{style:Ot},paddingInlineEnd:{style:Ot},paddingBlock:{style:Ot},paddingBlockStart:{style:Ot},paddingBlockEnd:{style:Ot},m:{style:Mt},mt:{style:Mt},mr:{style:Mt},mb:{style:Mt},ml:{style:Mt},mx:{style:Mt},my:{style:Mt},margin:{style:Mt},marginTop:{style:Mt},marginRight:{style:Mt},marginBottom:{style:Mt},marginLeft:{style:Mt},marginX:{style:Mt},marginY:{style:Mt},marginInline:{style:Mt},marginInlineStart:{style:Mt},marginInlineEnd:{style:Mt},marginBlock:{style:Mt},marginBlockStart:{style:Mt},marginBlockEnd:{style:Mt},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:nc},rowGap:{style:ic},columnGap:{style:rc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Sn},maxWidth:{style:yp},minWidth:{transform:Sn},height:{transform:Sn},maxHeight:{transform:Sn},minHeight:{transform:Sn},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function LP(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function RP(t,e){return typeof t=="function"?t(e):t}function BP(){function t(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:c,style:h}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=Xu(i,u)||{};return h?h(s):Lr(s,r,p=>{let g=Zu(f,c,p);return p===g&&typeof p=="string"&&(g=Zu(f,c,`${n}${p==="default"?"":zo(p)}`,p)),l===!1?g:{[l]:g}})}function e(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:bp;function a(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const c=Q9(o.breakpoints),h=Object.keys(c);let f=c;return Object.keys(u).forEach(d=>{const p=RP(u[d],o);if(p!=null)if(typeof p=="object")if(s[d])f=Ra(f,t(d,p,o,s));else{const g=Lr({theme:o},p,m=>({[d]:m}));LP(g,p)?f[d]=e({sx:p,theme:o}):f=Ra(f,g)}else f=Ra(f,t(d,p,o,s))}),J9(h,f)}return Array.isArray(i)?i.map(a):a(i)}return e}const Cx=BP();Cx.filterProps=["sx"];const xp=Cx,NP=["breakpoints","palette","spacing","shape"];function wp(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=t,s=Fr(t,NP),a=X9(n),l=aP(i);let u=$r({breakpoints:a,direction:"ltr",components:{},palette:Pe({mode:"light"},r),spacing:l,shape:Pe({},Z9,o)},s);return u=e.reduce((c,h)=>$r(c,h),u),u.unstable_sxConfig=Pe({},bp,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(h){return xp({sx:h,theme:this})},u}function jP(t){return Object.keys(t).length===0}function Cp(t=null){const e=Ce.useContext(bv.ThemeContext);return!e||jP(e)?t:e}const VP=wp();function zP(t=VP){return Cp(t)}const WP=["variant"];function Sx(t){return t.length===0}function kx(t){const{variant:e}=t,n=Fr(t,WP);let r=e||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=Sx(r)?t[i]:zo(t[i]):r+=`${Sx(r)?i:zo(i)}${zo(t[i].toString())}`}),r}const HP=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function qP(t){return Object.keys(t).length===0}function UP(t){return typeof t=="string"&&t.charCodeAt(0)>96}const YP=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,GP=(t,e)=>{let n=[];e&&e.components&&e.components[t]&&e.components[t].variants&&(n=e.components[t].variants);const r={};return n.forEach(i=>{const o=kx(i.props);r[o]=i.style}),r},KP=(t,e,n,r)=>{var i;const{ownerState:o={}}=t,s=[],a=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return a&&a.forEach(l=>{let u=!0;Object.keys(l.props).forEach(c=>{o[c]!==l.props[c]&&t[c]!==l.props[c]&&(u=!1)}),u&&s.push(e[kx(l.props)])}),s};function oc(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const XP=wp(),Tx=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function ja({defaultTheme:t,theme:e,themeId:n}){return qP(e)?t:e[n]||e}function ZP(t){return t?(e,n)=>n[t]:null}function QP(t={}){const{themeId:e,defaultTheme:n=XP,rootShouldForwardProp:r=oc,slotShouldForwardProp:i=oc}=t,o=s=>xp(Pe({},s,{theme:ja(Pe({},s,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(s,a={})=>{Y9(s,S=>S.filter(w=>!(w!=null&&w.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:h,overridesResolver:f=ZP(Tx(u))}=a,d=Fr(a,HP),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=h||!1;let m;process.env.NODE_ENV!=="production"&&l&&(m=`${l}-${Tx(u||"Root")}`);let b=oc;u==="Root"||u==="root"?b=r:u?b=i:UP(s)&&(b=void 0);const x=U9(s,Pe({shouldForwardProp:b,label:m},d)),C=(S,...w)=>{const k=w?w.map(D=>typeof D=="function"&&D.__emotion_real!==D?R=>D(Pe({},R,{theme:ja(Pe({},R,{defaultTheme:n,themeId:e}))})):D):[];let T=S;l&&f&&k.push(D=>{const R=ja(Pe({},D,{defaultTheme:n,themeId:e})),H=YP(l,R);if(H){const W={};return Object.entries(H).forEach(([B,j])=>{W[B]=typeof j=="function"?j(Pe({},D,{theme:R})):j}),f(D,W)}return null}),l&&!p&&k.push(D=>{const R=ja(Pe({},D,{defaultTheme:n,themeId:e}));return KP(D,GP(l,R),R,l)}),g||k.push(o);const O=k.length-w.length;if(Array.isArray(S)&&O>0){const D=new Array(O).fill("");T=[...S,...D],T.raw=[...S.raw,...D]}else typeof S=="function"&&S.__emotion_real!==S&&(T=D=>S(Pe({},D,{theme:ja(Pe({},D,{defaultTheme:n,themeId:e}))})));const P=x(T,...k);if(process.env.NODE_ENV!=="production"){let D;l&&(D=`${l}${zo(u||"")}`),D===void 0&&(D=`Styled(${V9(s)})`),P.displayName=D}return s.muiName&&(P.muiName=s.muiName),P};return x.withConfig&&(C.withConfig=x.withConfig),C}}function JP(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:mx(e.components[n].defaultProps,r)}function Sp(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}].`),Math.min(Math.max(e,t),n)}function eD(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)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Ui(t){if(t.type)return t;if(t.charAt(0)==="#")return Ui(eD(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
81
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Vo(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
82
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Vo(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function sc(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function tD(t){t=Ui(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),s=(u,c=(u+n/30)%12)=>i-o*Math.max(Math.min(c-3,9-c,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])),sc({type:a,values:l})}function Ex(t){t=Ui(t);let e=t.type==="hsl"||t.type==="hsla"?Ui(tD(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 Mx(t,e){const n=Ex(t),r=Ex(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Y(t,e){return t=Ui(t),e=Sp(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,sc(t)}function kp(t,e){if(t=Ui(t),e=Sp(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return sc(t)}function Tp(t,e){if(t=Ui(t),e=Sp(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return sc(t)}const Ox=Ce.createContext(null);process.env.NODE_ENV!=="production"&&(Ox.displayName="ThemeContext");const Ax=Ox;function Px(){const t=Ce.useContext(Ax);return process.env.NODE_ENV!=="production"&&Ce.useDebugValue(t),t}const nD=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function rD(t,e){if(typeof e=="function"){const n=e(t);return process.env.NODE_ENV!=="production"&&(n||console.error(["MUI: You should return an object from your theme function, i.e.","<ThemeProvider theme={() => ({})} />"].join(`
83
+ `))),n}return Pe({},t,e)}function ac(t){const{children:e,theme:n}=t,r=Px();process.env.NODE_ENV!=="production"&&r===null&&typeof n=="function"&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
84
+ `));const i=Ce.useMemo(()=>{const o=r===null?n:rD(r,n);return o!=null&&(o[nD]=r!==null),o},[n,r]);return y.jsx(Ax.Provider,{value:i,children:e})}process.env.NODE_ENV!=="production"&&(ac.propTypes={children:A.node,theme:A.oneOfType([A.object,A.func]).isRequired}),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&(ac.propTypes=cx(ac.propTypes));const Dx={};function _x(t,e,n,r=!1){return Ce.useMemo(()=>{const i=t&&e[t]||e;if(typeof n=="function"){const o=n(i),s=t?Pe({},e,{[t]:o}):o;return r?()=>s:s}return t?Pe({},e,{[t]:n}):Pe({},e,n)},[t,e,n,r])}function lc(t){const{children:e,theme:n,themeId:r}=t,i=Cp(Dx),o=Px()||Dx;process.env.NODE_ENV!=="production"&&(i===null&&typeof n=="function"||r&&i&&!i[r]&&typeof n=="function")&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
85
+ `));const s=_x(r,i,n),a=_x(r,o,n,!0);return y.jsx(ac,{theme:a,children:y.jsx(bv.ThemeContext.Provider,{value:s,children:e})})}process.env.NODE_ENV!=="production"&&(lc.propTypes={children:A.node,theme:A.oneOfType([A.func,A.object]).isRequired,themeId:A.string}),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&(lc.propTypes=cx(lc.propTypes));function iD(t,e){return Pe({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const Va={black:"#000",white:"#fff"},oD={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"},Ho={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"},qo={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"},za={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"},Uo={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"},Yo={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"},Go={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"},sD=["mode","contrastThreshold","tonalOffset"],Ix={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:Va.white,default:Va.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}},Ep={text:{primary:Va.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:Va.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}};function $x(t,e,n,r){const i=r.light||r,o=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Tp(t.main,i):e==="dark"&&(t.dark=kp(t.main,o)))}function aD(t="light"){return t==="dark"?{main:Uo[200],light:Uo[50],dark:Uo[400]}:{main:Uo[700],light:Uo[400],dark:Uo[800]}}function lD(t="light"){return t==="dark"?{main:Ho[200],light:Ho[50],dark:Ho[400]}:{main:Ho[500],light:Ho[300],dark:Ho[700]}}function uD(t="light"){return t==="dark"?{main:qo[500],light:qo[300],dark:qo[700]}:{main:qo[700],light:qo[400],dark:qo[800]}}function cD(t="light"){return t==="dark"?{main:Yo[400],light:Yo[300],dark:Yo[700]}:{main:Yo[700],light:Yo[500],dark:Yo[900]}}function hD(t="light"){return t==="dark"?{main:Go[400],light:Go[300],dark:Go[700]}:{main:Go[800],light:Go[500],dark:Go[900]}}function fD(t="light"){return t==="dark"?{main:za[400],light:za[300],dark:za[700]}:{main:"#ed6c02",light:za[500],dark:za[900]}}function dD(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=Fr(t,sD),o=t.primary||aD(e),s=t.secondary||lD(e),a=t.error||uD(e),l=t.info||cD(e),u=t.success||hD(e),c=t.warning||fD(e);function h(g){const m=Mx(g,Ep.text.primary)>=n?Ep.text.primary:Ix.text.primary;if(process.env.NODE_ENV!=="production"){const b=Mx(g,m);b<3&&console.error([`MUI: The contrast ratio of ${b}:1 for ${m} on ${g}`,"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(`
86
+ `))}return m}const f=({color:g,name:m,mainShade:b=500,lightShade:x=300,darkShade:C=700})=>{if(g=Pe({},g),!g.main&&g[b]&&(g.main=g[b]),!g.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${m?` (${m})`:""} provided to augmentColor(color) is invalid.
87
+ The color object needs to have a \`main\` property or a \`${b}\` property.`:Vo(11,m?` (${m})`:"",b));if(typeof g.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${m?` (${m})`:""} provided to augmentColor(color) is invalid.
88
+ \`color.main\` should be a string, but \`${JSON.stringify(g.main)}\` was provided instead.
89
+
90
+ Did you intend to use one of the following approaches?
91
+
92
+ import { green } from "@mui/material/colors";
93
+
94
+ const theme1 = createTheme({ palette: {
95
+ primary: green,
96
+ } });
97
+
98
+ const theme2 = createTheme({ palette: {
99
+ primary: { main: green[500] },
100
+ } });`:Vo(12,m?` (${m})`:"",JSON.stringify(g.main)));return $x(g,"light",x,r),$x(g,"dark",C,r),g.contrastText||(g.contrastText=h(g.main)),g},d={dark:Ep,light:Ix};return process.env.NODE_ENV!=="production"&&(d[e]||console.error(`MUI: The palette mode \`${e}\` is not supported.`)),$r(Pe({common:Pe({},Va),mode:e,primary:f({color:o,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:u,name:"success"}),grey:oD,contrastThreshold:n,getContrastText:h,augmentColor:f,tonalOffset:r},d[e]),i)}const pD=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function gD(t){return Math.round(t*1e5)/1e5}const Fx={textTransform:"uppercase"},Lx='"Roboto", "Helvetica", "Arial", sans-serif';function mD(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=Lx,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:c,pxToRem:h}=n,f=Fr(n,pD);process.env.NODE_ENV!=="production"&&(typeof i!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof u!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const d=i/14,p=h||(b=>`${b/u*d}rem`),g=(b,x,C,S,w)=>Pe({fontFamily:r,fontWeight:b,fontSize:p(x),lineHeight:C},r===Lx?{letterSpacing:`${gD(S/x)}em`}:{},w,c),m={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,Fx),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,Fx),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return $r(Pe({htmlFontSize:u,pxToRem:p,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},m),f,{clone:!1})}const vD=.2,yD=.14,bD=.12;function mt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${vD})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${yD})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${bD})`].join(",")}const xD=["none",mt(0,2,1,-1,0,1,1,0,0,1,3,0),mt(0,3,1,-2,0,2,2,0,0,1,5,0),mt(0,3,3,-2,0,3,4,0,0,1,8,0),mt(0,2,4,-1,0,4,5,0,0,1,10,0),mt(0,3,5,-1,0,5,8,0,0,1,14,0),mt(0,3,5,-1,0,6,10,0,0,1,18,0),mt(0,4,5,-2,0,7,10,1,0,2,16,1),mt(0,5,5,-3,0,8,10,1,0,3,14,2),mt(0,5,6,-3,0,9,12,1,0,3,16,2),mt(0,6,6,-3,0,10,14,1,0,4,18,3),mt(0,6,7,-4,0,11,15,1,0,4,20,3),mt(0,7,8,-4,0,12,17,2,0,5,22,4),mt(0,7,8,-4,0,13,19,2,0,5,24,4),mt(0,7,9,-4,0,14,21,2,0,5,26,4),mt(0,8,9,-5,0,15,22,2,0,6,28,5),mt(0,8,10,-5,0,16,24,2,0,6,30,5),mt(0,8,11,-5,0,17,26,2,0,6,32,5),mt(0,9,11,-5,0,18,28,2,0,7,34,6),mt(0,9,12,-6,0,19,29,2,0,7,36,6),mt(0,10,13,-6,0,20,31,3,0,8,38,7),mt(0,10,13,-6,0,21,33,3,0,8,40,7),mt(0,10,14,-6,0,22,35,3,0,8,42,7),mt(0,11,14,-7,0,23,36,3,0,9,44,8),mt(0,11,15,-7,0,24,38,3,0,9,46,8)],wD=["duration","easing","delay"],CD={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)"},SD={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Rx(t){return`${Math.round(t)}ms`}function kD(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function TD(t){const e=Pe({},CD,t.easing),n=Pe({},SD,t.duration);return Pe({getAutoHeightDuration:kD,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0}=o,u=Fr(o,wD);if(process.env.NODE_ENV!=="production"){const c=f=>typeof f=="string",h=f=>!isNaN(parseFloat(f));!c(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(s)&&!c(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),c(a)||console.error('MUI: Argument "easing" must be a string.'),!h(l)&&!c(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="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(`
101
+ `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(c=>`${c} ${typeof s=="string"?s:Rx(s)} ${a} ${typeof l=="string"?l:Rx(l)}`).join(",")}},t,{easing:e,duration:n})}const ED={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},MD=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Bx(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=t,s=Fr(t,MD);if(t.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Vo(18));const a=dD(r),l=wp(t);let u=$r(l,{mixins:iD(l.breakpoints,n),palette:a,shadows:xD.slice(),typography:mD(a,o),transitions:TD(i),zIndex:Pe({},ED)});if(u=$r(u,s),u=e.reduce((c,h)=>$r(c,h),u),process.env.NODE_ENV!=="production"){const c=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(f,d)=>{let p;for(p in f){const g=f[p];if(c.indexOf(p)!==-1&&Object.keys(g).length>0){if(process.env.NODE_ENV!=="production"){const m=q9("",p);console.error([`MUI: The \`${d}\` component increases the CSS specificity of the \`${p}\` internal state.`,"You can not override it like this: ",JSON.stringify(f,null,2),"",`Instead, you need to use the '&.${m}' syntax:`,JSON.stringify({root:{[`&.${m}`]:g}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
102
+ `))}f[p]={}}}};Object.keys(u.components).forEach(f=>{const d=u.components[f].styleOverrides;d&&f.indexOf("Mui")===0&&h(d,f)})}return u.unstable_sxConfig=Pe({},bp,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(h){return xp({sx:h,theme:this})},u}const Nx=Bx();function Yi(){const t=zP(Nx);return process.env.NODE_ENV!=="production"&&Ce.useDebugValue(t),t[Ku]||t}const ur=QP({themeId:Ku,defaultTheme:Nx,rootShouldForwardProp:t=>oc(t)&&t!=="classes"}),OD=["theme"];function jx(t){let{theme:e}=t,n=Fr(t,OD);const r=e[Ku];return y.jsx(lc,Pe({},n,{themeId:r?Ku:void 0,theme:r||e}))}process.env.NODE_ENV!=="production"&&(jx.propTypes={children:A.node,theme:A.oneOfType([A.object,A.func]).isRequired});function AD(t,e,n,r,i){const[o,s]=Ce.useState(()=>i&&n?n(t).matches:r?r(t).matches:e);return z9(()=>{let a=!0;if(!n)return;const l=n(t),u=()=>{a&&s(l.matches)};return u(),l.addListener(u),()=>{a=!1,l.removeListener(u)}},[t,n]),o}const Vx=Ce["useSyncExternalStore"];function PD(t,e,n,r,i){const o=Ce.useCallback(()=>e,[e]),s=Ce.useMemo(()=>{if(i&&n)return()=>n(t).matches;if(r!==null){const{matches:c}=r(t);return()=>c}return o},[o,t,r,i,n]),[a,l]=Ce.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const c=n(t);return[()=>c.matches,h=>(c.addListener(h),()=>{c.removeListener(h)})]},[o,n,t]);return Vx(l,a,s)}function uc(t,e={}){const n=Cp(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1,matchMedia:o=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:a=!1}=JP({name:"MuiUseMediaQuery",props:e,theme:n});process.env.NODE_ENV!=="production"&&typeof t=="function"&&n===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(`
103
+ `));let l=typeof t=="function"?t(n):t;l=l.replace(/^@media( ?)/m,"");const c=(Vx!==void 0?PD:AD)(l,i,o,s,a);return process.env.NODE_ENV!=="production"&&Ce.useDebugValue({query:l,match:c}),c}const zx=(t,e,n)=>{const r=Yi(),i=uc(r.breakpoints.up(e)),o=uc(r.breakpoints.down(e)),s=uc(r.breakpoints.between(e,n)),a=uc(r.breakpoints.only(e));return t==="up"?i:t==="down"?o:t==="between"?s:a},DD=({children:t,disableAnimatedMobile:e=!0,...n})=>zx("down","sm")&&e?y.jsx(M.Box,{...n,children:t}):y.jsx(M.Box,{component:Xn.div,initial:"initial",whileInView:"animate",viewport:{once:!0,amount:.3},variants:ku(),...n,children:t}),_D=({animate:t,action:e=!1,children:n,...r})=>e?y.jsx(M.Box,{component:Xn.div,initial:!1,animate:t?"animate":"exit",variants:ku(),...r,children:n}):y.jsx(M.Box,{component:Xn.div,initial:"initial",animate:"animate",exit:"exit",variants:ku(),...r,children:n}),ID=()=>Promise.resolve().then(()=>Tme).then(t=>t.default),Wx=({children:t})=>y.jsx(g9,{strict:!0,features:ID,children:y.jsxs(Xn.div,{style:{height:"100%"},children:[" ",t," "]})});function Hx(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=Hx(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Gi(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=Hx(t))&&(r&&(r+=" "),r+=e);return r}let $D={data:""},FD=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||$D,LD=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,RD=/\/\*[^]*?\*\/| +/g,qx=/\n+/g,Ki=(t,e)=>{let n="",r="",i="";for(let o in t){let s=t[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?Ki(s,o):o+"{"+Ki(s,o[1]=="k"?"":e)+"}":typeof s=="object"?r+=Ki(s,e?e.replace(/([^,])+/g,a=>o.replace(/(^:.*)|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Ki.p?Ki.p(o,s):o+":"+s+";")}return n+(e&&i?e+"{"+i+"}":i)+r},Rr={},Ux=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+Ux(t[n]);return e}return t},BD=(t,e,n,r,i)=>{let o=Ux(t),s=Rr[o]||(Rr[o]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(o));if(!Rr[s]){let l=o!==t?t:(u=>{let c,h,f=[{}];for(;c=LD.exec(u.replace(RD,""));)c[4]?f.shift():c[3]?(h=c[3].replace(qx," ").trim(),f.unshift(f[0][h]=f[0][h]||{})):f[0][c[1]]=c[2].replace(qx," ").trim();return f[0]})(t);Rr[s]=Ki(i?{["@keyframes "+s]:l}:l,n?"":"."+s)}let a=n&&Rr.g?Rr.g:null;return n&&(Rr.g=Rr[s]),((l,u,c,h)=>{h?u.data=u.data.replace(h,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(Rr[s],e,r,a),s},ND=(t,e,n)=>t.reduce((r,i,o)=>{let s=e[o];if(s&&s.call){let a=s(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=l?"."+l:a&&typeof a=="object"?a.props?"":Ki(a,""):a===!1?"":a}return r+i+(s??"")},"");function Mp(t){let e=this||{},n=t.call?t(e.p):t;return BD(n.unshift?n.raw?ND(n,[].slice.call(arguments,1),e.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):n,FD(e.target),e.g,e.o,e.k)}Mp.bind({g:1}),Mp.bind({k:1});function Yx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gx(t,e,n){return e&&Yx(t.prototype,e),n&&Yx(t,n),t}function nt(){return nt=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},nt.apply(this,arguments)}function Kx(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Wa(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Xx(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Zx=function(){return""},Qx=v.createContext({enqueueSnackbar:Zx,closeSnackbar:Zx}),Xi={downXs:"@media (max-width:599.95px)",upSm:"@media (min-width:600px)"},Jx=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Op=function(e){return""+Jx(e.vertical)+Jx(e.horizontal)},cc=function(e){return!!e||e===0},hc="unmounted",Ko="exited",Xo="entering",Ha="entered",e2="exiting",fc=function(t){Kx(e,t);function e(r){var i;i=t.call(this,r)||this;var o=r.appear,s;return i.appearStatus=null,r.in?o?(s=Ko,i.appearStatus=Xo):s=Ha:r.unmountOnExit||r.mountOnEnter?s=hc:s=Ko,i.state={status:s},i.nextCallback=null,i}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===hc?{status:Ko}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Xo&&s!==Ha&&(o=Xo):(s===Xo||s===Ha)&&(o=e2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o=i,s=i;return i!=null&&typeof i!="number"&&typeof i!="string"&&(s=i.exit,o=i.enter),{exit:s,enter:o}},n.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===Xo?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===Ko&&this.setState({status:hc})},n.performEnter=function(i){var o=this,s=this.props.enter,a=i,l=this.getTimeouts();if(!i&&!s){this.safeSetState({status:Ha},function(){o.props.onEntered&&o.props.onEntered(o.node,a)});return}this.props.onEnter&&this.props.onEnter(this.node,a),this.safeSetState({status:Xo},function(){o.props.onEntering&&o.props.onEntering(o.node,a),o.onTransitionEnd(l.enter,function(){o.safeSetState({status:Ha},function(){o.props.onEntered&&o.props.onEntered(o.node,a)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts();if(!o){this.safeSetState({status:Ko},function(){i.props.onExited&&i.props.onExited(i.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:e2},function(){i.props.onExiting&&i.props.onExiting(i.node),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ko},function(){i.props.onExited&&i.props.onExited(i.node)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(){s&&(s=!1,o.nextCallback=null,i())},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=i==null&&!this.props.addEndListener;if(!this.node||s){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===hc)return null;var o=this.props,s=o.children,a=Wa(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return s(i,a)},Gx(e,[{key:"node",get:function(){var i,o=(i=this.props.nodeRef)===null||i===void 0?void 0:i.current;if(!o)throw new Error("notistack - Custom snackbar is not refForwarding");return o}}]),e}(v.Component);function Zo(){}fc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zo,onEntering:Zo,onEntered:Zo,onExit:Zo,onExiting:Zo,onExited:Zo};function t2(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Ap(t,e){return v.useMemo(function(){return t==null&&e==null?null:function(n){t2(t,n),t2(e,n)}},[t,e])}function dc(t){var e=t.timeout,n=t.style,r=n===void 0?{}:n,i=t.mode;return{duration:typeof e=="object"?e[i]||0:e,easing:r.transitionTimingFunction,delay:r.transitionDelay}}var Pp={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)"},n2=function(e){e.scrollTop=e.scrollTop},r2=function(e){return Math.round(e)+"ms"};function Qo(t,e){t===void 0&&(t=["all"]);var n=e||{},r=n.duration,i=r===void 0?300:r,o=n.easing,s=o===void 0?Pp.easeInOut:o,a=n.delay,l=a===void 0?0:a,u=Array.isArray(t)?t:[t];return u.map(function(c){var h=typeof i=="string"?i:r2(i),f=typeof l=="string"?l:r2(l);return c+" "+h+" "+s+" "+f}).join(",")}function jD(t){return t&&t.ownerDocument||document}function i2(t){var e=jD(t);return e.defaultView||window}function VD(t,e){e===void 0&&(e=166);var n;function r(){for(var i=this,o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var l=function(){t.apply(i,s)};clearTimeout(n),n=setTimeout(l,e)}return r.clear=function(){clearTimeout(n)},r}function zD(t,e){var n=e.getBoundingClientRect(),r=i2(e),i;if(e.fakeTransform)i=e.fakeTransform;else{var o=r.getComputedStyle(e);i=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var s=0,a=0;if(i&&i!=="none"&&typeof i=="string"){var l=i.split("(")[1].split(")")[0].split(",");s=parseInt(l[4],10),a=parseInt(l[5],10)}switch(t){case"left":return"translateX("+(r.innerWidth+s-n.left)+"px)";case"right":return"translateX(-"+(n.left+n.width-s)+"px)";case"up":return"translateY("+(r.innerHeight+a-n.top)+"px)";default:return"translateY(-"+(n.top+n.height-a)+"px)"}}function pc(t,e){if(e){var n=zD(t,e);n&&(e.style.webkitTransform=n,e.style.transform=n)}}var o2=v.forwardRef(function(t,e){var n=t.children,r=t.direction,i=r===void 0?"down":r,o=t.in,s=t.style,a=t.timeout,l=a===void 0?0:a,u=t.onEnter,c=t.onEntered,h=t.onExit,f=t.onExited,d=Wa(t,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),p=v.useRef(null),g=Ap(n.ref,p),m=Ap(g,e),b=function(T,O){pc(i,T),n2(T),u&&u(T,O)},x=function(T){var O=(s==null?void 0:s.transitionTimingFunction)||Pp.easeOut,P=dc({timeout:l,mode:"enter",style:nt({},s,{transitionTimingFunction:O})});T.style.webkitTransition=Qo("-webkit-transform",P),T.style.transition=Qo("transform",P),T.style.webkitTransform="none",T.style.transform="none"},C=function(T){var O=(s==null?void 0:s.transitionTimingFunction)||Pp.sharp,P=dc({timeout:l,mode:"exit",style:nt({},s,{transitionTimingFunction:O})});T.style.webkitTransition=Qo("-webkit-transform",P),T.style.transition=Qo("transform",P),pc(i,T),h&&h(T)},S=function(T){T.style.webkitTransition="",T.style.transition="",f&&f(T)},w=v.useCallback(function(){p.current&&pc(i,p.current)},[i]);return v.useEffect(function(){if(!(o||i==="down"||i==="right")){var k=VD(function(){p.current&&pc(i,p.current)}),T=i2(p.current);return T.addEventListener("resize",k),function(){k.clear(),T.removeEventListener("resize",k)}}},[i,o]),v.useEffect(function(){o||w()},[o,w]),v.createElement(fc,Object.assign({appear:!0,nodeRef:p,onEnter:b,onEntered:c,onEntering:x,onExit:C,onExited:S,in:o,timeout:l},d),function(k,T){return v.cloneElement(n,nt({ref:m,style:nt({visibility:k==="exited"&&!o?"hidden":void 0},s,{},n.props.style)},T))})});o2.displayName="Slide";var gc=function(e){return v.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},WD=function(){return v.createElement(gc,null,v.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
104
+ 10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},HD=function(){return v.createElement(gc,null,v.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},qD=function(){return v.createElement(gc,null,v.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
105
+ 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
106
+ 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},UD=function(){return v.createElement(gc,null,v.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
107
+ 0 22,12A10,10 0 0,0 12,2Z`}))},YD={default:void 0,success:v.createElement(WD,null),warning:v.createElement(HD,null),error:v.createElement(qD,null),info:v.createElement(UD,null)},Zi={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:YD,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:o2,transitionDuration:{enter:225,exit:195}},GD=function(e,n){var r=function(o){return typeof o=="number"||o===null};return r(e)?e:r(n)?n:Zi.autoHideDuration},KD=function(e,n){var r=function(o,s){return s.some(function(a){return typeof o===a})};return r(e,["string","number"])?e:r(e,["object"])?nt({},Zi.transitionDuration,{},r(n,["object"])&&n,{},e):r(n,["string","number"])?n:r(n,["object"])?nt({},Zi.transitionDuration,{},n):Zi.transitionDuration},XD=function(e,n){return function(r,i){return i===void 0&&(i=!1),i?nt({},Zi[r],{},n[r],{},e[r]):r==="autoHideDuration"?GD(e.autoHideDuration,n.autoHideDuration):r==="transitionDuration"?KD(e.transitionDuration,n.transitionDuration):e[r]||n[r]||Zi[r]}};function qa(t){return Object.entries(t).reduce(function(e,n){var r,i=n[0],o=n[1];return nt({},e,(r={},r[i]=Mp(o),r))},{})}var Jo={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(e){return"notistack-MuiContent-"+e}},s2=qa({root:{height:0},entered:{height:"auto"}}),Dp="0px",_p=175,a2=v.forwardRef(function(t,e){var n=t.children,r=t.in,i=t.onExited,o=v.useRef(null),s=v.useRef(null),a=Ap(e,s),l=function(){return o.current?o.current.clientHeight:0},u=function(g){g.style.height=Dp},c=function(g){var m=l(),b=dc({timeout:_p,mode:"enter"}),x=b.duration,C=b.easing;g.style.transitionDuration=typeof x=="string"?x:x+"ms",g.style.height=m+"px",g.style.transitionTimingFunction=C||""},h=function(g){g.style.height="auto"},f=function(g){g.style.height=l()+"px"},d=function(g){n2(g);var m=dc({timeout:_p,mode:"exit"}),b=m.duration,x=m.easing;g.style.transitionDuration=typeof b=="string"?b:b+"ms",g.style.height=Dp,g.style.transitionTimingFunction=x||""};return v.createElement(fc,{in:r,unmountOnExit:!0,onEnter:u,onEntered:h,onEntering:c,onExit:f,onExited:i,onExiting:d,nodeRef:s,timeout:_p},function(p,g){return v.createElement("div",Object.assign({ref:a,className:Gi(s2.root,p==="entered"&&s2.entered),style:nt({pointerEvents:"all",overflow:"hidden",minHeight:Dp,transition:Qo("height")},p==="entered"&&{overflow:"visible"},{},p==="exited"&&!r&&{visibility:"hidden"})},g),v.createElement("div",{ref:o,className:Jo.CollapseWrapper,style:{display:"flex",width:"100%"}},n))})});a2.displayName="Collapse";var l2={right:"left",left:"right",bottom:"up",top:"down"},ZD=function(e){return e.horizontal!=="center"?l2[e.horizontal]:l2[e.vertical]},QD=function(e){return"anchorOrigin"+Op(e)},JD=function(e){e===void 0&&(e={});var n={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(r){return!n[r]}).reduce(function(r,i){var o;return nt({},r,(o={},o[i]=e[i],o))},{})},e_=function(){};function Ua(t,e){return t.reduce(function(n,r){return r==null?n:function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var l=[].concat(s);e&&l.indexOf(e)===-1&&l.push(e),n.apply(this,l),r.apply(this,l)}},e_)}var t_=typeof window<"u"?v.useLayoutEffect:v.useEffect;function u2(t){var e=v.useRef(t);return t_(function(){e.current=t}),v.useCallback(function(){return e.current.apply(void 0,arguments)},[])}var c2=v.forwardRef(function(t,e){var n=t.children,r=t.className,i=t.autoHideDuration,o=t.disableWindowBlurListener,s=o===void 0?!1:o,a=t.onClose,l=t.id,u=t.open,c=t.SnackbarProps,h=c===void 0?{}:c,f=v.useRef(),d=u2(function(){a&&a.apply(void 0,arguments)}),p=u2(function(C){!a||C==null||(f.current&&clearTimeout(f.current),f.current=setTimeout(function(){d(null,"timeout",l)},C))});v.useEffect(function(){return u&&p(i),function(){f.current&&clearTimeout(f.current)}},[u,i,p]);var g=function(){f.current&&clearTimeout(f.current)},m=v.useCallback(function(){i!=null&&p(i*.5)},[i,p]),b=function(S){h.onMouseEnter&&h.onMouseEnter(S),g()},x=function(S){h.onMouseLeave&&h.onMouseLeave(S),m()};return v.useEffect(function(){if(!s&&u)return window.addEventListener("focus",m),window.addEventListener("blur",g),function(){window.removeEventListener("focus",m),window.removeEventListener("blur",g)}},[s,m,u]),v.createElement("div",Object.assign({ref:e},h,{className:Gi(Jo.Snackbar,r),onMouseEnter:b,onMouseLeave:x}),n)});c2.displayName="Snackbar";var Ip,n_=qa({root:(Ip={display:"flex",flexWrap:"wrap",flexGrow:1},Ip[Xi.upSm]={flexGrow:"initial",minWidth:"288px"},Ip)}),$p=v.forwardRef(function(t,e){var n=t.className,r=Wa(t,["className"]);return v.createElement("div",Object.assign({ref:e,className:Gi(n_.root,n)},r))});$p.displayName="SnackbarContent";var Ya=qa({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),h2="notistack-snackbar",f2=v.forwardRef(function(t,e){var n=t.id,r=t.message,i=t.action,o=t.iconVariant,s=t.variant,a=t.hideIconVariant,l=t.style,u=t.className,c=o[s],h=i;return typeof h=="function"&&(h=h(n)),v.createElement($p,{ref:e,role:"alert","aria-describedby":h2,style:l,className:Gi(Jo.MuiContent,Jo.MuiContentVariant(s),Ya.root,Ya[s],u,!a&&c&&Ya.lessPadding)},v.createElement("div",{id:h2,className:Ya.message},a?null:c,r),h&&v.createElement("div",{className:Ya.action},h))});f2.displayName="MaterialDesignContent";var d2=v.memo(f2),r_=qa({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),i_=function(e){var n=v.useRef(),r=v.useState(!0),i=r[0],o=r[1],s=Ua([e.snack.onClose,e.onClose]),a=function(){e.snack.requestClose&&s(null,"instructed",e.snack.id)},l=v.useCallback(function(){n.current=setTimeout(function(){o(function(P){return!P})},125)},[]);v.useEffect(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var u=e.snack,c=e.classes,h=e.Component,f=h===void 0?d2:h,d=v.useMemo(function(){return JD(c)},[c]),p=u.open,g=u.SnackbarProps,m=u.TransitionComponent,b=u.TransitionProps,x=u.transitionDuration,C=u.disableWindowBlurListener,S=u.content,w=Wa(u,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=nt({direction:ZD(w.anchorOrigin),timeout:x},b),T=S;typeof T=="function"&&(T=T(w.id,w.message));var O=["onEnter","onEntered","onExit","onExited"].reduce(function(P,D){var R;return nt({},P,(R={},R[D]=Ua([e.snack[D],e[D]],w.id),R))},{});return v.createElement(a2,{in:i,onExited:O.onExited},v.createElement(c2,{open:p,id:w.id,disableWindowBlurListener:C,autoHideDuration:w.autoHideDuration,className:Gi(r_.wrappedRoot,d.root,d[QD(w.anchorOrigin)]),SnackbarProps:g,onClose:s},v.createElement(m,Object.assign({},k,{appear:!0,in:p,onExit:O.onExit,onExited:l,onEnter:O.onEnter,onEntered:Ua([O.onEntered,a],w.id)}),T||v.createElement(f,Object.assign({},w)))))},Ga,Fp,mc,vc,Lp,Br={view:{default:20,dense:4},snackbar:{default:6,dense:2}},p2="."+Jo.CollapseWrapper,Rp=16,yc=qa({root:(Ga={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:Qo(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},Ga[p2]={padding:Br.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},Ga.maxWidth="calc(100% - "+Br.view.default*2+"px)",Ga[Xi.downXs]={width:"100%",maxWidth:"calc(100% - "+Rp*2+"px)"},Ga),rootDense:(Fp={},Fp[p2]={padding:Br.snackbar.dense+"px 0px"},Fp),top:{top:Br.view.default-Br.snackbar.default+"px",flexDirection:"column"},bottom:{bottom:Br.view.default-Br.snackbar.default+"px",flexDirection:"column-reverse"},left:(mc={left:Br.view.default+"px"},mc[Xi.upSm]={alignItems:"flex-start"},mc[Xi.downXs]={left:Rp+"px"},mc),right:(vc={right:Br.view.default+"px"},vc[Xi.upSm]={alignItems:"flex-end"},vc[Xi.downXs]={right:Rp+"px"},vc),center:(Lp={left:"50%",transform:"translateX(-50%)"},Lp[Xi.upSm]={alignItems:"center"},Lp)}),o_=function(e){var n=e.classes,r=n===void 0?{}:n,i=e.anchorOrigin,o=e.dense,s=e.children,a=Gi(Jo.SnackbarContainer,yc[i.vertical],yc[i.horizontal],yc.root,r.containerRoot,r["containerAnchorOrigin"+Op(i)],o&&yc.rootDense);return v.createElement("div",{className:a},s)},s_=v.memo(o_),a_=process.env.NODE_ENV!=="production",l_={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},u_=function(t){if(a_){var e=l_[t];typeof console<"u"&&console.error("WARNING - notistack: "+e);try{throw new Error(e)}catch{}}},g2=function(e){var n=typeof e=="string"||v.isValidElement(e);return!n};$.enqueueSnackbar=void 0,$.closeSnackbar=void 0;var m2=function(t){Kx(e,t);function e(r){var i;return i=t.call(this,r)||this,i.enqueueSnackbar=function(o,s){if(s===void 0&&(s={}),o==null)throw new Error("enqueueSnackbar called with invalid argument");var a=g2(o)?o:s,l=g2(o)?o.message:o,u=a.key,c=a.preventDuplicate,h=Wa(a,["key","preventDuplicate"]),f=cc(u),d=f?u:new Date().getTime()+Math.random(),p=XD(h,i.props),g=nt({id:d},h,{message:l,open:!0,entered:!1,requestClose:!1,persist:p("persist"),action:p("action"),content:p("content"),variant:p("variant"),anchorOrigin:p("anchorOrigin"),disableWindowBlurListener:p("disableWindowBlurListener"),autoHideDuration:p("autoHideDuration"),hideIconVariant:p("hideIconVariant"),TransitionComponent:p("TransitionComponent"),transitionDuration:p("transitionDuration"),TransitionProps:p("TransitionProps",!0),iconVariant:p("iconVariant",!0),style:p("style",!0),SnackbarProps:p("SnackbarProps",!0),className:Gi(i.props.className,h.className)});return g.persist&&(g.autoHideDuration=void 0),i.setState(function(m){if(c===void 0&&i.props.preventDuplicate||c){var b=function(w){return f?w.id===d:w.message===l},x=m.queue.findIndex(b)>-1,C=m.snacks.findIndex(b)>-1;if(x||C)return m}return i.handleDisplaySnack(nt({},m,{queue:[].concat(m.queue,[g])}))}),d},i.handleDisplaySnack=function(o){var s=o.snacks;return s.length>=i.maxSnack?i.handleDismissOldest(o):i.processQueue(o)},i.processQueue=function(o){var s=o.queue,a=o.snacks;return s.length>0?nt({},o,{snacks:[].concat(a,[s[0]]),queue:s.slice(1,s.length)}):o},i.handleDismissOldest=function(o){if(o.snacks.some(function(c){return!c.open||c.requestClose}))return o;var s=!1,a=!1,l=o.snacks.reduce(function(c,h){return c+(h.open&&h.persist?1:0)},0);l===i.maxSnack&&(process.env.NODE_ENV!=="production"&&u_("NO_PERSIST_ALL"),a=!0);var u=o.snacks.map(function(c){return!s&&(!c.persist||a)?(s=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),i.props.onClose&&i.props.onClose(null,"maxsnack",c.id),nt({},c,{open:!1})):nt({},c,{requestClose:!0})):nt({},c)});return nt({},o,{snacks:u})},i.handleEnteredSnack=function(o,s,a){if(!cc(a))throw new Error("handleEnteredSnack Cannot be called with undefined key");i.setState(function(l){var u=l.snacks;return{snacks:u.map(function(c){return c.id===a?nt({},c,{entered:!0}):nt({},c)})}})},i.handleCloseSnack=function(o,s,a){i.props.onClose&&i.props.onClose(o,s,a);var l=a===void 0;i.setState(function(u){var c=u.snacks,h=u.queue;return{snacks:c.map(function(f){return!l&&f.id!==a?nt({},f):f.entered?nt({},f,{open:!1}):nt({},f,{requestClose:!0})}),queue:h.filter(function(f){return f.id!==a})}})},i.closeSnackbar=function(o){var s=i.state.snacks.find(function(a){return a.id===o});cc(o)&&s&&s.onClose&&s.onClose(null,"instructed",o),i.handleCloseSnack(null,"instructed",o)},i.handleExitedSnack=function(o,s){if(!cc(s))throw new Error("handleExitedSnack Cannot be called with undefined key");i.setState(function(a){var l=i.processQueue(nt({},a,{snacks:a.snacks.filter(function(u){return u.id!==s})}));return l.queue.length===0?l:i.handleDismissOldest(l)})},$.enqueueSnackbar=i.enqueueSnackbar,$.closeSnackbar=i.closeSnackbar,i.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:i.enqueueSnackbar.bind(Xx(i)),closeSnackbar:i.closeSnackbar.bind(Xx(i))}},i}var n=e.prototype;return n.render=function(){var i=this,o=this.state.contextValue,s=this.props,a=s.domRoot,l=s.children,u=s.dense,c=u===void 0?!1:u,h=s.Components,f=h===void 0?{}:h,d=s.classes,p=this.state.snacks.reduce(function(m,b){var x,C=Op(b.anchorOrigin),S=m[C]||[];return nt({},m,(x={},x[C]=[].concat(S,[b]),x))},{}),g=Object.keys(p).map(function(m){var b=p[m],x=b[0];return v.createElement(s_,{key:m,dense:c,anchorOrigin:x.anchorOrigin,classes:d},b.map(function(C){return v.createElement(i_,{key:C.id,snack:C,classes:d,Component:f[C.variant],onClose:i.handleCloseSnack,onEnter:i.props.onEnter,onExit:i.props.onExit,onExited:Ua([i.handleExitedSnack,i.props.onExited],C.id),onEntered:Ua([i.handleEnteredSnack,i.props.onEntered],C.id)})}))});return v.createElement(Qx.Provider,{value:o},l,a?xv.createPortal(g,a):g)},Gx(e,[{key:"maxSnack",get:function(){return this.props.maxSnack||Zi.maxSnack}}]),e}(v.Component),c_=function(){return v.useContext(Qx)};const Ka=/^[a-z0-9]+(-[a-z0-9]+)*$/,bc=(t,e,n,r="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const a=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:r,prefix:l,name:a};return e&&!xc(u)?null:u}const o=i[0],s=o.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return e&&!xc(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:o};return e&&!xc(a,n)?null:a}return null},xc=(t,e)=>t?!!((t.provider===""||t.provider.match(Ka))&&(e&&t.prefix===""||t.prefix.match(Ka))&&t.name.match(Ka)):!1,v2=Object.freeze({left:0,top:0,width:16,height:16}),wc=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Bp=Object.freeze({...v2,...wc}),Np=Object.freeze({...Bp,body:"",hidden:!1});function h_(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function y2(t,e){const n=h_(t,e);for(const r in Np)r in wc?r in t&&!(r in n)&&(n[r]=wc[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function f_(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const a=r[s]&&r[s].parent,l=a&&o(a);l&&(i[s]=[a].concat(l))}return i[s]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(o),i}function d_(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let o={};function s(a){o=y2(r[a]||i[a],o)}return s(e),n.forEach(s),y2(t,o)}function b2(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(i=>{e(i,null),n.push(i)});const r=f_(t);for(const i in r){const o=r[i];o&&(e(i,d_(t,i,o)),n.push(i))}return n}const p_={provider:"",aliases:{},not_found:{},...v2};function jp(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function x2(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!jp(t,p_))return null;const n=e.icons;for(const i in n){const o=n[i];if(!i.match(Ka)||typeof o.body!="string"||!jp(o,Np))return null}const r=e.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i.match(Ka)||typeof s!="string"||!n[s]&&!r[s]||!jp(o,Np))return null}return e}const w2=Object.create(null);function g_(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function Qi(t,e){const n=w2[t]||(w2[t]=Object.create(null));return n[e]||(n[e]=g_(t,e))}function Vp(t,e){return x2(e)?b2(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function m_(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let Xa=!1;function C2(t){return typeof t=="boolean"&&(Xa=t),Xa}function v_(t){const e=typeof t=="string"?bc(t,!0,Xa):t;if(e){const n=Qi(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function y_(t,e){const n=bc(t,!0,Xa);if(!n)return!1;const r=Qi(n.provider,n.prefix);return m_(r,n.name,e)}function b_(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),Xa&&!e&&!t.prefix){let i=!1;return x2(t)&&(t.prefix="",b2(t,(o,s)=>{s&&y_(o,s)&&(i=!0)})),i}const n=t.prefix;if(!xc({provider:e,prefix:n,name:"a"}))return!1;const r=Qi(e,n);return!!Vp(r,t)}const S2=Object.freeze({width:null,height:null}),k2=Object.freeze({...S2,...wc}),x_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,w_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function T2(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(x_);if(r===null||!r.length)return t;const i=[];let o=r.shift(),s=w_.test(o);for(;;){if(s){const a=parseFloat(o);isNaN(a)?i.push(o):i.push(Math.ceil(a*e*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}const C_=t=>t==="unset"||t==="undefined"||t==="none";function S_(t,e){const n={...Bp,...t},r={...k2,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(p=>{const g=[],m=p.hFlip,b=p.vFlip;let x=p.rotate;m?b?x+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):b&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let C;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:C=i.height/2+i.top,g.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,g.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}x%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const s=r.width,a=r.height,l=i.width,u=i.height;let c,h;s===null?(h=a===null?"1em":a==="auto"?u:a,c=T2(h,l/u)):(c=s==="auto"?l:s,h=a===null?T2(c,u/l):a==="auto"?u:a);const f={},d=(p,g)=>{C_(g)||(f[p]=g.toString())};return d("width",c),d("height",h),f.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:f,body:o}}const k_=/\sid="(\S+)"/g,T_="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let E_=0;function M_(t,e=T_){const n=[];let r;for(;r=k_.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const s=typeof e=="function"?e(o):e+(E_++).toString(),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const zp=Object.create(null);function O_(t,e){zp[t]=e}function Wp(t){return zp[t]||zp[""]}function Hp(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const qp=Object.create(null),Za=["https://api.simplesvg.com","https://api.unisvg.com"],Cc=[];for(;Za.length>0;)Za.length===1||Math.random()>.5?Cc.push(Za.shift()):Cc.push(Za.pop());qp[""]=Hp({resources:["https://api.iconify.design"].concat(Cc)});function A_(t,e){const n=Hp(e);return n===null?!1:(qp[t]=n,!0)}function Up(t){return qp[t]}let E2=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function P_(t,e){const n=Up(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=e+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function D_(t){return t===404}const __=(t,e,n)=>{const r=[],i=P_(t,e),o="icons";let s={type:o,provider:t,prefix:e,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=i&&u>0&&(r.push(s),s={type:o,provider:t,prefix:e,icons:[]},a=l.length),s.icons.push(l)}),r.push(s),r};function I_(t){if(typeof t=="string"){const e=Up(t);if(e)return e.path}return"/"}const $_={prepare:__,send:(t,e,n)=>{if(!E2){n("abort",424);return}let r=I_(e.provider);switch(e.type){case"icons":{const o=e.prefix,a=e.icons.join(","),l=new URLSearchParams({icons:a});r+=o+".json?"+l.toString();break}case"custom":{const o=e.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;E2(t+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(D_(s)?"abort":"next",s)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})}};function F_(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return t.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,a=i.name,l=n[o]||(n[o]=Object.create(null)),u=l[s]||(l[s]=Qi(o,s));let c;a in u.icons?c=e.loaded:s===""||u.missing.has(a)?c=e.missing:c=e.pending;const h={provider:o,prefix:s,name:a};c.push(h)}),e}function M2(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==e))})}function L_(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,i=t.prefix;e.forEach(o=>{const s=o.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==i)return!0;const u=l.name;if(t.icons[u])s.loaded.push({provider:r,prefix:i,name:u});else if(t.missing.has(u))s.missing.push({provider:r,prefix:i,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||M2([t],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let R_=0;function B_(t,e,n){const r=R_++,i=M2.bind(null,n,r);if(!e.pending.length)return i;const o={id:r,icons:e,callback:t,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function N_(t,e=!0,n=!1){const r=[];return t.forEach(i=>{const o=typeof i=="string"?bc(i,e,n):i;o&&r.push(o)}),r}var j_={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function V_(t,e,n,r){const i=t.resources.length,o=t.random?Math.floor(Math.random()*i):t.index;let s;if(t.random){let k=t.resources.slice(0);for(s=[];k.length>1;){const T=Math.floor(Math.random()*k.length);s.push(k[T]),k=k.slice(0,T).concat(k.slice(T+1))}s=s.concat(k)}else s=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let l="pending",u=0,c,h=null,f=[],d=[];typeof r=="function"&&d.push(r);function p(){h&&(clearTimeout(h),h=null)}function g(){l==="pending"&&(l="aborted"),p(),f.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),f=[]}function m(k,T){T&&(d=[]),typeof k=="function"&&d.push(k)}function b(){return{startTime:a,payload:e,status:l,queriesSent:u,queriesPending:f.length,subscribe:m,abort:g}}function x(){l="failed",d.forEach(k=>{k(void 0,c)})}function C(){f.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),f=[]}function S(k,T,O){const P=T!=="success";switch(f=f.filter(D=>D!==k),l){case"pending":break;case"failed":if(P||!t.dataAfterTimeout)return;break;default:return}if(T==="abort"){c=O,x();return}if(P){c=O,f.length||(s.length?w():x());return}if(p(),C(),!t.random){const D=t.resources.indexOf(k.resource);D!==-1&&D!==t.index&&(t.index=D)}l="completed",d.forEach(D=>{D(O)})}function w(){if(l!=="pending")return;p();const k=s.shift();if(k===void 0){if(f.length){h=setTimeout(()=>{p(),l==="pending"&&(C(),x())},t.timeout);return}x();return}const T={status:"pending",resource:k,callback:(O,P)=>{S(T,O,P)}};f.push(T),u++,h=setTimeout(w,t.rotate),n(k,e,T.callback)}return setTimeout(w),b}function O2(t){const e={...j_,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function i(a,l,u){const c=V_(e,a,l,(h,f)=>{r(),u&&u(h,f)});return n.push(c),c}function o(a){return n.find(l=>a(l))||null}return{query:i,find:o,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function A2(){}const Yp=Object.create(null);function z_(t){if(!Yp[t]){const e=Up(t);if(!e)return;const n=O2(e),r={config:e,redundancy:n};Yp[t]=r}return Yp[t]}function W_(t,e,n){let r,i;if(typeof t=="string"){const o=Wp(t);if(!o)return n(void 0,424),A2;i=o.send;const s=z_(t);s&&(r=s.redundancy)}else{const o=Hp(t);if(o){r=O2(o);const s=t.resources?t.resources[0]:"",a=Wp(s);a&&(i=a.send)}}return!r||!i?(n(void 0,424),A2):r.query(e,i,n)().abort}const P2="iconify2",Qa="iconify",D2=Qa+"-count",_2=Qa+"-version",I2=36e5,H_=168;function Gp(t,e){try{return t.getItem(e)}catch{}}function Kp(t,e,n){try{return t.setItem(e,n),!0}catch{}}function $2(t,e){try{t.removeItem(e)}catch{}}function Xp(t,e){return Kp(t,D2,e.toString())}function Zp(t){return parseInt(Gp(t,D2))||0}const Sc={local:!0,session:!0},F2={local:new Set,session:new Set};let Qp=!1;function q_(t){Qp=t}let kc=typeof window>"u"?{}:window;function L2(t){const e=t+"Storage";try{if(kc&&kc[e]&&typeof kc[e].length=="number")return kc[e]}catch{}Sc[t]=!1}function R2(t,e){const n=L2(t);if(!n)return;const r=Gp(n,_2);if(r!==P2){if(r){const a=Zp(n);for(let l=0;l<a;l++)$2(n,Qa+l.toString())}Kp(n,_2,P2),Xp(n,0);return}const i=Math.floor(Date.now()/I2)-H_,o=a=>{const l=Qa+a.toString(),u=Gp(n,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&e(c,a))return!0}catch{}$2(n,l)}};let s=Zp(n);for(let a=s-1;a>=0;a--)o(a)||(a===s-1?(s--,Xp(n,s)):F2[t].add(a))}function B2(){if(!Qp){q_(!0);for(const t in Sc)R2(t,e=>{const n=e.data,r=e.provider,i=n.prefix,o=Qi(r,i);if(!Vp(o,n).length)return!1;const s=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,s):s,!0})}}function U_(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in Sc)R2(r,i=>{const o=i.data;return i.provider!==t.provider||o.prefix!==t.prefix||o.lastModified===e});return!0}function Y_(t,e){Qp||B2();function n(r){let i;if(!Sc[r]||!(i=L2(r)))return;const o=F2[r];let s;if(o.size)o.delete(s=Array.from(o).shift());else if(s=Zp(i),!Xp(i,s+1))return;const a={cached:Math.floor(Date.now()/I2),provider:t.provider,data:e};return Kp(i,Qa+s.toString(),JSON.stringify(a))}e.lastModified&&!U_(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function N2(){}function G_(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,L_(t)}))}function K_(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,i=t.iconsToLoad;delete t.iconsToLoad;let o;if(!i||!(o=Wp(n)))return;o.prepare(n,r,i).forEach(a=>{W_(n,a,l=>{if(typeof l!="object")a.icons.forEach(u=>{t.missing.add(u)});else try{const u=Vp(t,l);if(!u.length)return;const c=t.pendingIcons;c&&u.forEach(h=>{c.delete(h)}),Y_(t,l)}catch(u){console.error(u)}G_(t)})})}))}const X_=(t,e)=>{const n=N_(t,!0,C2()),r=F_(n);if(!r.pending.length){let l=!0;return e&&setTimeout(()=>{l&&e(r.loaded,r.missing,r.pending,N2)}),()=>{l=!1}}const i=Object.create(null),o=[];let s,a;return r.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===a&&u===s)return;s=u,a=c,o.push(Qi(u,c));const h=i[u]||(i[u]=Object.create(null));h[c]||(h[c]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:c,name:h}=l,f=Qi(u,c),d=f.pendingIcons||(f.pendingIcons=new Set);d.has(h)||(d.add(h),i[u][c].push(h))}),o.forEach(l=>{const{provider:u,prefix:c}=l;i[u][c].length&&K_(l,i[u][c])}),e?B_(e,r,o):N2};function Z_(t,e){const n={...t};for(const r in e){const i=e[r],o=typeof i;r in S2?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const Q_=/[\s,]+/;function J_(t,e){e.split(Q_).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function eI(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(t);return isNaN(i)?0:r(i)}else if(n!==t){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return e}function tI(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function nI(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function rI(t){return"data:image/svg+xml,"+nI(t)}function iI(t){return'url("'+rI(t)+'")'}let Ja;function oI(){try{Ja=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Ja=null}}function sI(t){return Ja===void 0&&oI(),Ja?Ja.createHTML(t):t}const j2={...k2,inline:!1},aI={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},lI={display:"inline-block"},Jp={backgroundColor:"currentColor"},V2={backgroundColor:"transparent"},z2={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},W2={WebkitMask:Jp,mask:Jp,background:V2};for(const t in W2){const e=W2[t];for(const n in z2)e[t+n]=z2[n]}const uI={...j2,inline:!0};function H2(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const cI=(t,e,n,r)=>{const i=n?uI:j2,o=Z_(i,e),s=e.mode||"svg",a={},l=e.style||{},u={...s==="svg"?aI:{},ref:r};for(let b in e){const x=e[b];if(x!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":o[b]=x===!0||x==="true"||x===1;break;case"flip":typeof x=="string"&&J_(o,x);break;case"color":a.color=x;break;case"rotate":typeof x=="string"?o[b]=eI(x):typeof x=="number"&&(o[b]=x);break;case"ariaHidden":case"aria-hidden":x!==!0&&x!=="true"&&delete u["aria-hidden"];break;default:i[b]===void 0&&(u[b]=x)}}const c=S_(t,o),h=c.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),s==="svg"){u.style={...a,...l},Object.assign(u,h);let b=0,x=e.id;return typeof x=="string"&&(x=x.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:sI(M_(c.body,x?()=>x+"ID"+b++:"iconifyReact"))},v.createElement("svg",u)}const{body:f,width:d,height:p}=t,g=s==="mask"||(s==="bg"?!1:f.indexOf("currentColor")!==-1),m=tI(f,{...h,width:d+"",height:p+""});return u.style={...a,"--svg":iI(m),width:H2(h.width),height:H2(h.height),...lI,...g?Jp:V2,...l},v.createElement("span",u)};if(C2(!0),O_("",$_),typeof document<"u"&&typeof window<"u"){B2();const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!b_(r))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const r="IconifyProviders["+n+"] is invalid.";try{const i=e[n];if(typeof i!="object"||!i||i.resources===void 0)continue;A_(n,i)||console.error(r)}catch{console.error(r)}}}}class q2 extends v.Component{constructor(e){super(e),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(e){this.state.icon!==e&&this.setState({icon:e})}_checkIcon(e){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(e||n.icon===null)&&this._setData({data:r});return}let i;if(typeof r!="string"||(i=bc(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const o=v_(i);if(!o){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),o!==null&&(this._loading={name:r,abort:X_([i],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const s=["iconify"];i.prefix!==""&&s.push("iconify--"+i.prefix),i.provider!==""&&s.push("iconify--"+i.provider),this._setData({data:o,classes:s}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(e){e.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const e=this.props,n=this.state.icon;if(n===null)return e.children?e.children:v.createElement("span",{});let r=e;return n.classes&&(r={...e,className:(typeof e.className=="string"?e.className+" ":"")+n.classes.join(" ")}),cI({...Bp,...n.data},r,e._inline,e._ref)}}const hI=v.forwardRef(function(e,n){const r={...e,_ref:n,_inline:!1};return v.createElement(q2,r)});v.forwardRef(function(e,n){const r={...e,_ref:n,_inline:!0};return v.createElement(q2,r)});const vt=v.forwardRef(({icon:t,width:e=20,sx:n,...r},i)=>y.jsx(M.Box,{ref:i,component:hI,icon:t,sx:{width:e,height:e,...n},...r}));vt.displayName="Iconify";const fI=()=>{const t=Yi(),e=t.palette.mode==="light";return y.jsx(M.GlobalStyles,{styles:{"#root":{".notistack-MuiContent":{width:"100%",padding:t.spacing(0,2),paddingRight:t.spacing(2),margin:t.spacing(.25,0),boxShadow:t.customShadows.z8,borderRadius:t.shape.borderRadius,color:e?t.palette.common.white:t.palette.grey[800],backgroundColor:e?t.palette.grey[900]:t.palette.common.white,"&.notistack-MuiContent-success, &.notistack-MuiContent-error, &.notistack-MuiContent-warning, &.notistack-MuiContent-info":{color:t.palette.text.primary,backgroundColor:t.palette.background.paper},[t.breakpoints.up("md")]:{minWidth:240}},"#notistack-snackbar":{fontWeight:t.typography.fontWeightMedium},".SnackbarItem-action":{marginRight:0,color:t.palette.action.active,"& svg":{width:20,height:20}}}}})},Tc=({icon:t,color:e})=>y.jsx(M.Box,{component:"span",sx:{mr:1.5,width:40,height:40,display:"flex",borderRadius:1.5,alignItems:"center",justifyContent:"center",color:`${e}.main`,bgcolor:n=>Y(n.palette[e].main,.16)},children:y.jsx(vt,{icon:t,width:24})}),dI=({children:t})=>{const e=v.useRef(null),n=r=>()=>{e.current.closeSnackbar(r)};return y.jsxs(y.Fragment,{children:[y.jsx(fI,{}),y.jsx(m2,{ref:e,dense:!0,maxSnack:5,preventDuplicate:!0,autoHideDuration:3e3,variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},iconVariant:{info:y.jsx(Tc,{icon:"eva:info-fill",color:"info"}),success:y.jsx(Tc,{icon:"eva:checkmark-circle-2-fill",color:"success"}),warning:y.jsx(Tc,{icon:"eva:alert-triangle-fill",color:"warning"}),error:y.jsx(Tc,{icon:"eva:alert-circle-fill",color:"error"})},action:r=>y.jsx(M.IconButton,{size:"small",onClick:n(r),sx:{p:.5},children:y.jsx(vt,{icon:"eva:close-fill"})}),children:t})]})};function ie(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ec(t,e){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ec(t,e)}function pI(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ec(t,e)}var U2=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function gI(t,e){return!!(t===e||U2(t)&&U2(e))}function mI(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!gI(t[n],e[n]))return!1;return!0}function e0(t,e){e===void 0&&(e=mI);var n,r=[],i,o=!1;function s(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o&&n===this&&e(a,r)||(i=t.apply(this,a),o=!0,n=this,r=a),i}return s}var vI=typeof performance=="object"&&typeof performance.now=="function",Y2=vI?function(){return performance.now()}:function(){return Date.now()};function G2(t){cancelAnimationFrame(t.id)}function yI(t,e){var n=Y2();function r(){Y2()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var t0=-1;function K2(t){if(t===void 0&&(t=!1),t0===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),t0=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t0}var es=null;function X2(t){if(t===void 0&&(t=!1),es===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?es="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?es="negative":es="positive-ascending"),document.body.removeChild(e),es}return es}process.env.NODE_ENV;var bI=150,xI=function(e,n){return e},Mc=null,Oc=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Mc=new WeakSet,Oc=new WeakSet);function wI(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,o=t.getOffsetForIndexAndAlignment,s=t.getStartIndexForOffset,a=t.getStopIndexForStartIndex,l=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,c=t.validateProps;return e=function(h){pI(f,h);function f(p){var g;return g=h.call(this,p)||this,g._instanceProps=l(g.props,ie(g)),g._outerRef=void 0,g._resetIsScrollingTimeoutId=null,g.state={instance:ie(g),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof g.props.initialScrollOffset=="number"?g.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},g._callOnItemsRendered=void 0,g._callOnItemsRendered=e0(function(m,b,x,C){return g.props.onItemsRendered({overscanStartIndex:m,overscanStopIndex:b,visibleStartIndex:x,visibleStopIndex:C})}),g._callOnScroll=void 0,g._callOnScroll=e0(function(m,b,x){return g.props.onScroll({scrollDirection:m,scrollOffset:b,scrollUpdateWasRequested:x})}),g._getItemStyle=void 0,g._getItemStyle=function(m){var b=g.props,x=b.direction,C=b.itemSize,S=b.layout,w=g._getItemStyleCache(u&&C,u&&S,u&&x),k;if(w.hasOwnProperty(m))k=w[m];else{var T=n(g.props,m,g._instanceProps),O=i(g.props,m,g._instanceProps),P=x==="horizontal"||S==="horizontal",D=x==="rtl",R=P?T:0;w[m]=k={position:"absolute",left:D?void 0:R,right:D?R:void 0,top:P?0:T,height:P?"100%":O,width:P?O:"100%"}}return k},g._getItemStyleCache=void 0,g._getItemStyleCache=e0(function(m,b,x){return{}}),g._onScrollHorizontal=function(m){var b=m.currentTarget,x=b.clientWidth,C=b.scrollLeft,S=b.scrollWidth;g.setState(function(w){if(w.scrollOffset===C)return null;var k=g.props.direction,T=C;if(k==="rtl")switch(X2()){case"negative":T=-C;break;case"positive-descending":T=S-x-C;break}return T=Math.max(0,Math.min(T,S-x)),{isScrolling:!0,scrollDirection:w.scrollOffset<C?"forward":"backward",scrollOffset:T,scrollUpdateWasRequested:!1}},g._resetIsScrollingDebounced)},g._onScrollVertical=function(m){var b=m.currentTarget,x=b.clientHeight,C=b.scrollHeight,S=b.scrollTop;g.setState(function(w){if(w.scrollOffset===S)return null;var k=Math.max(0,Math.min(S,C-x));return{isScrolling:!0,scrollDirection:w.scrollOffset<k?"forward":"backward",scrollOffset:k,scrollUpdateWasRequested:!1}},g._resetIsScrollingDebounced)},g._outerRefSetter=function(m){var b=g.props.outerRef;g._outerRef=m,typeof b=="function"?b(m):b!=null&&typeof b=="object"&&b.hasOwnProperty("current")&&(b.current=m)},g._resetIsScrollingDebounced=function(){g._resetIsScrollingTimeoutId!==null&&G2(g._resetIsScrollingTimeoutId),g._resetIsScrollingTimeoutId=yI(g._resetIsScrolling,bI)},g._resetIsScrolling=function(){g._resetIsScrollingTimeoutId=null,g.setState({isScrolling:!1},function(){g._getItemStyleCache(-1,null)})},g}f.getDerivedStateFromProps=function(g,m){return CI(g,m),c(g),null};var d=f.prototype;return d.scrollTo=function(g){g=Math.max(0,g),this.setState(function(m){return m.scrollOffset===g?null:{scrollDirection:m.scrollOffset<g?"forward":"backward",scrollOffset:g,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(g,m){m===void 0&&(m="auto");var b=this.props,x=b.itemCount,C=b.layout,S=this.state.scrollOffset;g=Math.max(0,Math.min(g,x-1));var w=0;if(this._outerRef){var k=this._outerRef;C==="vertical"?w=k.scrollWidth>k.clientWidth?K2():0:w=k.scrollHeight>k.clientHeight?K2():0}this.scrollTo(o(this.props,g,m,S,this._instanceProps,w))},d.componentDidMount=function(){var g=this.props,m=g.direction,b=g.initialScrollOffset,x=g.layout;if(typeof b=="number"&&this._outerRef!=null){var C=this._outerRef;m==="horizontal"||x==="horizontal"?C.scrollLeft=b:C.scrollTop=b}this._callPropsCallbacks()},d.componentDidUpdate=function(){var g=this.props,m=g.direction,b=g.layout,x=this.state,C=x.scrollOffset,S=x.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var w=this._outerRef;if(m==="horizontal"||b==="horizontal")if(m==="rtl")switch(X2()){case"negative":w.scrollLeft=-C;break;case"positive-ascending":w.scrollLeft=C;break;default:var k=w.clientWidth,T=w.scrollWidth;w.scrollLeft=T-k-C;break}else w.scrollLeft=C;else w.scrollTop=C}this._callPropsCallbacks()},d.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&G2(this._resetIsScrollingTimeoutId)},d.render=function(){var g=this.props,m=g.children,b=g.className,x=g.direction,C=g.height,S=g.innerRef,w=g.innerElementType,k=g.innerTagName,T=g.itemCount,O=g.itemData,P=g.itemKey,D=P===void 0?xI:P,R=g.layout,H=g.outerElementType,W=g.outerTagName,B=g.style,j=g.useIsScrolling,N=g.width,V=this.state.isScrolling,me=x==="horizontal"||R==="horizontal",re=me?this._onScrollHorizontal:this._onScrollVertical,_=this._getRangeToRender(),F=_[0],U=_[1],se=[];if(T>0)for(var Q=F;Q<=U;Q++)se.push(v.createElement(m,{data:O,key:D(Q,O),index:Q,isScrolling:j?V:void 0,style:this._getItemStyle(Q)}));var ve=r(this.props,this._instanceProps);return v.createElement(H||W||"div",{className:b,onScroll:re,ref:this._outerRefSetter,style:Pe({position:"relative",height:C,width:N,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:x},B)},v.createElement(w||k||"div",{children:se,ref:S,style:{height:me?"100%":ve,pointerEvents:V?"none":void 0,width:me?ve:"100%"}}))},d._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var g=this.props.itemCount;if(g>0){var m=this._getRangeToRender(),b=m[0],x=m[1],C=m[2],S=m[3];this._callOnItemsRendered(b,x,C,S)}}if(typeof this.props.onScroll=="function"){var w=this.state,k=w.scrollDirection,T=w.scrollOffset,O=w.scrollUpdateWasRequested;this._callOnScroll(k,T,O)}},d._getRangeToRender=function(){var g=this.props,m=g.itemCount,b=g.overscanCount,x=this.state,C=x.isScrolling,S=x.scrollDirection,w=x.scrollOffset;if(m===0)return[0,0,0,0];var k=s(this.props,w,this._instanceProps),T=a(this.props,k,w,this._instanceProps),O=!C||S==="backward"?Math.max(1,b):1,P=!C||S==="forward"?Math.max(1,b):1;return[Math.max(0,k-O),Math.max(0,Math.min(m-1,T+P)),k,T]},f}(v.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var CI=function(e,n){var r=e.children,i=e.direction,o=e.height,s=e.layout,a=e.innerTagName,l=e.outerTagName,u=e.width,c=n.instance;if(process.env.NODE_ENV!=="production"){(a!=null||l!=null)&&Oc&&!Oc.has(c)&&(Oc.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var h=i==="horizontal"||s==="horizontal";switch(i){case"horizontal":case"vertical":Mc&&!Mc.has(c)&&(Mc.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+i+'" was specified.'))}switch(s){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+s+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(h&&typeof u!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(u===null?"null":typeof u)+'" was specified.'));if(!h&&typeof o!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(o===null?"null":typeof o)+'" was specified.'))}},SI=50,ts=function(e,n,r){var i=e,o=i.itemSize,s=r.itemMetadataMap,a=r.lastMeasuredIndex;if(n>a){var l=0;if(a>=0){var u=s[a];l=u.offset+u.size}for(var c=a+1;c<=n;c++){var h=o(c);s[c]={offset:l,size:h},l+=h}r.lastMeasuredIndex=n}return s[n]},kI=function(e,n,r){var i=n.itemMetadataMap,o=n.lastMeasuredIndex,s=o>0?i[o].offset:0;return s>=r?Z2(e,n,o,0,r):TI(e,n,Math.max(0,o),r)},Z2=function(e,n,r,i,o){for(;i<=r;){var s=i+Math.floor((r-i)/2),a=ts(e,s,n).offset;if(a===o)return s;a<o?i=s+1:a>o&&(r=s-1)}return i>0?i-1:0},TI=function(e,n,r,i){for(var o=e.itemCount,s=1;r<o&&ts(e,r,n).offset<i;)r+=s,s*=2;return Z2(e,n,Math.min(r,o-1),Math.floor(r/2),i)},Q2=function(e,n){var r=e.itemCount,i=n.itemMetadataMap,o=n.estimatedItemSize,s=n.lastMeasuredIndex,a=0;if(s>=r&&(s=r-1),s>=0){var l=i[s];a=l.offset+l.size}var u=r-s-1,c=u*o;return a+c},EI=wI({getItemOffset:function(e,n,r){return ts(e,n,r).offset},getItemSize:function(e,n,r){return r.itemMetadataMap[n].size},getEstimatedTotalSize:Q2,getOffsetForIndexAndAlignment:function(e,n,r,i,o,s){var a=e.direction,l=e.height,u=e.layout,c=e.width,h=a==="horizontal"||u==="horizontal",f=h?c:l,d=ts(e,n,o),p=Q2(e,o),g=Math.max(0,Math.min(p-f,d.offset)),m=Math.max(0,d.offset-f+d.size+s);switch(r==="smart"&&(i>=m-f&&i<=g+f?r="auto":r="center"),r){case"start":return g;case"end":return m;case"center":return Math.round(m+(g-m)/2);case"auto":default:return i>=m&&i<=g?i:i<m?m:g}},getStartIndexForOffset:function(e,n,r){return kI(e,r,n)},getStopIndexForStartIndex:function(e,n,r,i){for(var o=e.direction,s=e.height,a=e.itemCount,l=e.layout,u=e.width,c=o==="horizontal"||l==="horizontal",h=c?u:s,f=ts(e,n,i),d=r+h,p=f.offset+f.size,g=n;g<a-1&&p<d;)g++,p+=ts(e,g,i).size;return g},initInstanceProps:function(e,n){var r=e,i=r.estimatedItemSize,o={itemMetadataMap:{},estimatedItemSize:i||SI,lastMeasuredIndex:-1};return n.resetAfterIndex=function(s,a){a===void 0&&(a=!0),o.lastMeasuredIndex=Math.min(o.lastMeasuredIndex,s-1),n._getItemStyleCache(-1),a&&n.forceUpdate()},o},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){var n=e.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="function")throw Error('An invalid "itemSize" prop has been specified. Value should be a function. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});const J2=8,MI=t=>{const{data:e,index:n,style:r}=t,i=e[n],{showValueInLabel:o,...s}=i[0],a={...r,top:r.top+J2,paddingTop:8};return Object.prototype.hasOwnProperty.call(i,"group")?y.jsx(M.ListSubheader,{component:"div",style:a,children:i.group},i.key):y.jsx(M.Typography,{component:"li",...s,noWrap:!0,style:a,children:y.jsxs(M.Stack,{component:"div",direction:"row",flex:1,justifyContent:"space-between",children:[i[1].label,o&&y.jsxs(M.Typography,{variant:"inherit",color:"grey.400",children:["(",i[1].value,")"]})]})})},ew=v.createContext({}),tw=v.forwardRef((t,e)=>{const n=v.useContext(ew);return y.jsx("div",{ref:e,...t,...n})});tw.displayName="OuterElementType";const OI=t=>{const e=v.useRef(null);return v.useEffect(()=>{e.current!=null&&e.current.resetAfterIndex(0,!0)},[t]),e},AI=v.forwardRef(function(e,n){const{children:r,...i}=e,o=[];r.forEach(d=>{o.push(d),o.push(...d.children||[])});const s=M.useTheme(),a=M.useMediaQuery(s.breakpoints.up("sm")),l=o.length,u=a?36:48,c=d=>Object.prototype.hasOwnProperty.call(d,"group")?48:u,h=()=>l>8?8*u:o.map(c).reduce((d,p)=>d+p,0),f=OI(l);return y.jsx("div",{ref:n,children:y.jsx(ew.Provider,{value:i,children:y.jsx(EI,{itemData:o,height:h()+2*J2,width:"100%",ref:f,outerElementType:tw,innerElementType:"ul",itemSize:d=>c(o[d]),overscanCount:5,itemCount:l,children:MI})})})}),PI=M.styled(M.Popper)({[`& .${M.autocompleteClasses.listbox}`]:{boxSizing:"border-box","& ul":{padding:0,margin:0}}}),n0=v.forwardRef(({label:t,value:e,options:n=[],loading:r,noOptionsText:i="Nenhuma opção disponível",loadingText:o="Carregando opções...",error:s,helperText:a,placeholder:l,onChange:u,groupBy:c,showValueInLabel:h,disabled:f,multiple:d,required:p,renderOption:g,tabIndex:m,...b},x)=>{const C=w=>w&&typeof w=="object"?w.value.toString():w.toString(),S=v.useMemo(()=>d?(Array.isArray(e)?e:[]).reduce((T,O)=>{const P=n.find(D=>D.value.toString()===O.toString());return P?[...T,P]:[...T]},[]):n.find(k=>k.value.toString()===(e==null?void 0:e.toString()))||null,[n,e,d]);return y.jsx(M.Autocomplete,{ref:x,value:S,onInputChange:()=>{!r&&!S&&u(d?[]:null)},options:n,loading:r,noOptionsText:i,loadingText:o,disabled:r||f,disableListWrap:!0,PopperComponent:PI,ListboxComponent:g?void 0:AI,filterOptions:(w,k)=>w.filter(T=>`${T.value} ${T.label}`.toLocaleUpperCase().includes(k.inputValue.toLocaleUpperCase())),onChange:(w,k)=>{if(!k){u(d?[]:null);return}if(Array.isArray(k)){u(k.map(C));return}u(typeof k=="string"?k.toString():k.value.toString())},renderOption:(w,k,T,O)=>g?g(w,k,T,O):[{...w,showValueInLabel:h},k],renderGroup:w=>w,groupBy:c,multiple:d,renderInput:w=>y.jsx(M.TextField,{...w,placeholder:l,fullWidth:!0,error:!!s,helperText:a,label:t,required:p,InputProps:{...w.InputProps,endAdornment:y.jsxs(y.Fragment,{children:[r?y.jsx(M.CircularProgress,{color:"primary",size:20}):null,w.InputProps.endAdornment]})},inputProps:{...w.inputProps,tabIndex:m}}),...b})});n0.displayName="Autocomplete";var Nn={},el={},DI=typeof ba=="object"&&ba&&ba.Object===Object&&ba,nw=DI,_I=nw,II=typeof self=="object"&&self&&self.Object===Object&&self,$I=_I||II||Function("return this")(),cr=$I,FI=cr,LI=FI.Symbol,tl=LI,rw=tl,iw=Object.prototype,RI=iw.hasOwnProperty,BI=iw.toString,nl=rw?rw.toStringTag:void 0;function NI(t){var e=RI.call(t,nl),n=t[nl];try{t[nl]=void 0;var r=!0}catch{}var i=BI.call(t);return r&&(e?t[nl]=n:delete t[nl]),i}var jI=NI,VI=Object.prototype,zI=VI.toString;function WI(t){return zI.call(t)}var HI=WI,ow=tl,qI=jI,UI=HI,YI="[object Null]",GI="[object Undefined]",sw=ow?ow.toStringTag:void 0;function KI(t){return t==null?t===void 0?GI:YI:sw&&sw in Object(t)?qI(t):UI(t)}var Ji=KI,XI=Array.isArray,Zn=XI;function ZI(t){return t!=null&&typeof t=="object"}var Nr=ZI,QI=Ji,JI=Zn,e$=Nr,t$="[object String]";function n$(t){return typeof t=="string"||!JI(t)&&e$(t)&&QI(t)==t$}var r$=n$;function i$(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var o$=i$,s$=o$,a$=s$(),l$=a$;function u$(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var c$=u$,h$=Ji,f$=Nr,d$="[object Arguments]";function p$(t){return f$(t)&&h$(t)==d$}var g$=p$,aw=g$,m$=Nr,lw=Object.prototype,v$=lw.hasOwnProperty,y$=lw.propertyIsEnumerable,b$=aw(function(){return arguments}())?aw:function(t){return m$(t)&&v$.call(t,"callee")&&!y$.call(t,"callee")},uw=b$,Ac={exports:{}};function x$(){return!1}var w$=x$;Ac.exports,function(t,e){var n=cr,r=w$,i=e&&!e.nodeType&&e,o=i&&!0&&t&&!t.nodeType&&t,s=o&&o.exports===i,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,u=l||r;t.exports=u}(Ac,Ac.exports);var r0=Ac.exports,C$=9007199254740991,S$=/^(?:0|[1-9]\d*)$/;function k$(t,e){var n=typeof t;return e=e??C$,!!e&&(n=="number"||n!="symbol"&&S$.test(t))&&t>-1&&t%1==0&&t<e}var cw=k$,T$=9007199254740991;function E$(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=T$}var i0=E$,M$=Ji,O$=i0,A$=Nr,P$="[object Arguments]",D$="[object Array]",_$="[object Boolean]",I$="[object Date]",$$="[object Error]",F$="[object Function]",L$="[object Map]",R$="[object Number]",B$="[object Object]",N$="[object RegExp]",j$="[object Set]",V$="[object String]",z$="[object WeakMap]",W$="[object ArrayBuffer]",H$="[object DataView]",q$="[object Float32Array]",U$="[object Float64Array]",Y$="[object Int8Array]",G$="[object Int16Array]",K$="[object Int32Array]",X$="[object Uint8Array]",Z$="[object Uint8ClampedArray]",Q$="[object Uint16Array]",J$="[object Uint32Array]",ft={};ft[q$]=ft[U$]=ft[Y$]=ft[G$]=ft[K$]=ft[X$]=ft[Z$]=ft[Q$]=ft[J$]=!0,ft[P$]=ft[D$]=ft[W$]=ft[_$]=ft[H$]=ft[I$]=ft[$$]=ft[F$]=ft[L$]=ft[R$]=ft[B$]=ft[N$]=ft[j$]=ft[V$]=ft[z$]=!1;function eF(t){return A$(t)&&O$(t.length)&&!!ft[M$(t)]}var tF=eF;function nF(t){return function(e){return t(e)}}var o0=nF,Pc={exports:{}};Pc.exports,function(t,e){var n=nw,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=a}(Pc,Pc.exports);var s0=Pc.exports,rF=tF,iF=o0,hw=s0,fw=hw&&hw.isTypedArray,oF=fw?iF(fw):rF,dw=oF,sF=c$,aF=uw,lF=Zn,uF=r0,cF=cw,hF=dw,fF=Object.prototype,dF=fF.hasOwnProperty;function pF(t,e){var n=lF(t),r=!n&&aF(t),i=!n&&!r&&uF(t),o=!n&&!r&&!i&&hF(t),s=n||r||i||o,a=s?sF(t.length,String):[],l=a.length;for(var u in t)(e||dF.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||cF(u,l)))&&a.push(u);return a}var pw=pF,gF=Object.prototype;function mF(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||gF;return t===n}var a0=mF;function vF(t,e){return function(n){return t(e(n))}}var gw=vF,yF=gw,bF=yF(Object.keys,Object),xF=bF,wF=a0,CF=xF,SF=Object.prototype,kF=SF.hasOwnProperty;function TF(t){if(!wF(t))return CF(t);var e=[];for(var n in Object(t))kF.call(t,n)&&n!="constructor"&&e.push(n);return e}var EF=TF;function MF(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ns=MF,OF=Ji,AF=ns,PF="[object AsyncFunction]",DF="[object Function]",_F="[object GeneratorFunction]",IF="[object Proxy]";function $F(t){if(!AF(t))return!1;var e=OF(t);return e==DF||e==_F||e==PF||e==IF}var mw=$F,FF=mw,LF=i0;function RF(t){return t!=null&&LF(t.length)&&!FF(t)}var Dc=RF,BF=pw,NF=EF,jF=Dc;function VF(t){return jF(t)?BF(t):NF(t)}var rl=VF,zF=l$,WF=rl;function HF(t,e){return t&&zF(t,e,WF)}var vw=HF;function qF(t){return t}var yw=qF,UF=yw;function YF(t){return typeof t=="function"?t:UF}var GF=YF,KF=vw,XF=GF;function ZF(t,e){return t&&KF(t,XF(e))}var l0=ZF,QF=gw,JF=QF(Object.getPrototypeOf,Object),u0=JF,eL=Ji,tL=u0,nL=Nr,rL="[object Object]",iL=Function.prototype,oL=Object.prototype,bw=iL.toString,sL=oL.hasOwnProperty,aL=bw.call(Object);function lL(t){if(!nL(t)||eL(t)!=rL)return!1;var e=tL(t);if(e===null)return!0;var n=sL.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&bw.call(n)==aL}var uL=lL;function cL(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var xw=cL;function hL(){this.__data__=[],this.size=0}var fL=hL;function dL(t,e){return t===e||t!==t&&e!==e}var c0=dL,pL=c0;function gL(t,e){for(var n=t.length;n--;)if(pL(t[n][0],e))return n;return-1}var _c=gL,mL=_c,vL=Array.prototype,yL=vL.splice;function bL(t){var e=this.__data__,n=mL(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():yL.call(e,n,1),--this.size,!0}var xL=bL,wL=_c;function CL(t){var e=this.__data__,n=wL(e,t);return n<0?void 0:e[n][1]}var SL=CL,kL=_c;function TL(t){return kL(this.__data__,t)>-1}var EL=TL,ML=_c;function OL(t,e){var n=this.__data__,r=ML(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var AL=OL,PL=fL,DL=xL,_L=SL,IL=EL,$L=AL;function rs(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}rs.prototype.clear=PL,rs.prototype.delete=DL,rs.prototype.get=_L,rs.prototype.has=IL,rs.prototype.set=$L;var Ic=rs,FL=Ic;function LL(){this.__data__=new FL,this.size=0}var RL=LL;function BL(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var NL=BL;function jL(t){return this.__data__.get(t)}var VL=jL;function zL(t){return this.__data__.has(t)}var WL=zL,HL=cr,qL=HL["__core-js_shared__"],UL=qL,h0=UL,ww=function(){var t=/[^.]+$/.exec(h0&&h0.keys&&h0.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function YL(t){return!!ww&&ww in t}var GL=YL,KL=Function.prototype,XL=KL.toString;function ZL(t){if(t!=null){try{return XL.call(t)}catch{}try{return t+""}catch{}}return""}var Cw=ZL,QL=mw,JL=GL,eR=ns,tR=Cw,nR=/[\\^$.*+?()[\]{}|]/g,rR=/^\[object .+?Constructor\]$/,iR=Function.prototype,oR=Object.prototype,sR=iR.toString,aR=oR.hasOwnProperty,lR=RegExp("^"+sR.call(aR).replace(nR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uR(t){if(!eR(t)||JL(t))return!1;var e=QL(t)?lR:rR;return e.test(tR(t))}var cR=uR;function hR(t,e){return t==null?void 0:t[e]}var fR=hR,dR=cR,pR=fR;function gR(t,e){var n=pR(t,e);return dR(n)?n:void 0}var eo=gR,mR=eo,vR=cr,yR=mR(vR,"Map"),f0=yR,bR=eo,xR=bR(Object,"create"),$c=xR,Sw=$c;function wR(){this.__data__=Sw?Sw(null):{},this.size=0}var CR=wR;function SR(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var kR=SR,TR=$c,ER="__lodash_hash_undefined__",MR=Object.prototype,OR=MR.hasOwnProperty;function AR(t){var e=this.__data__;if(TR){var n=e[t];return n===ER?void 0:n}return OR.call(e,t)?e[t]:void 0}var PR=AR,DR=$c,_R=Object.prototype,IR=_R.hasOwnProperty;function $R(t){var e=this.__data__;return DR?e[t]!==void 0:IR.call(e,t)}var FR=$R,LR=$c,RR="__lodash_hash_undefined__";function BR(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=LR&&e===void 0?RR:e,this}var NR=BR,jR=CR,VR=kR,zR=PR,WR=FR,HR=NR;function is(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}is.prototype.clear=jR,is.prototype.delete=VR,is.prototype.get=zR,is.prototype.has=WR,is.prototype.set=HR;var qR=is,kw=qR,UR=Ic,YR=f0;function GR(){this.size=0,this.__data__={hash:new kw,map:new(YR||UR),string:new kw}}var KR=GR;function XR(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ZR=XR,QR=ZR;function JR(t,e){var n=t.__data__;return QR(e)?n[typeof e=="string"?"string":"hash"]:n.map}var Fc=JR,eB=Fc;function tB(t){var e=eB(this,t).delete(t);return this.size-=e?1:0,e}var nB=tB,rB=Fc;function iB(t){return rB(this,t).get(t)}var oB=iB,sB=Fc;function aB(t){return sB(this,t).has(t)}var lB=aB,uB=Fc;function cB(t,e){var n=uB(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var hB=cB,fB=KR,dB=nB,pB=oB,gB=lB,mB=hB;function os(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}os.prototype.clear=fB,os.prototype.delete=dB,os.prototype.get=pB,os.prototype.has=gB,os.prototype.set=mB;var d0=os,vB=Ic,yB=f0,bB=d0,xB=200;function wB(t,e){var n=this.__data__;if(n instanceof vB){var r=n.__data__;if(!yB||r.length<xB-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new bB(r)}return n.set(t,e),this.size=n.size,this}var CB=wB,SB=Ic,kB=RL,TB=NL,EB=VL,MB=WL,OB=CB;function ss(t){var e=this.__data__=new SB(t);this.size=e.size}ss.prototype.clear=kB,ss.prototype.delete=TB,ss.prototype.get=EB,ss.prototype.has=MB,ss.prototype.set=OB;var p0=ss,AB="__lodash_hash_undefined__";function PB(t){return this.__data__.set(t,AB),this}var DB=PB;function _B(t){return this.__data__.has(t)}var IB=_B,$B=d0,FB=DB,LB=IB;function Lc(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new $B;++e<n;)this.add(t[e])}Lc.prototype.add=Lc.prototype.push=FB,Lc.prototype.has=LB;var RB=Lc;function BB(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var NB=BB;function jB(t,e){return t.has(e)}var VB=jB,zB=RB,WB=NB,HB=VB,qB=1,UB=2;function YB(t,e,n,r,i,o){var s=n&qB,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,f=!0,d=n&UB?new zB:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var p=t[h],g=e[h];if(r)var m=s?r(g,p,h,e,t,o):r(p,g,h,t,e,o);if(m!==void 0){if(m)continue;f=!1;break}if(d){if(!WB(e,function(b,x){if(!HB(d,x)&&(p===b||i(p,b,n,r,o)))return d.push(x)})){f=!1;break}}else if(!(p===g||i(p,g,n,r,o))){f=!1;break}}return o.delete(t),o.delete(e),f}var Tw=YB,GB=cr,KB=GB.Uint8Array,Ew=KB;function XB(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var ZB=XB;function QB(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var JB=QB,Mw=tl,Ow=Ew,eN=c0,tN=Tw,nN=ZB,rN=JB,iN=1,oN=2,sN="[object Boolean]",aN="[object Date]",lN="[object Error]",uN="[object Map]",cN="[object Number]",hN="[object RegExp]",fN="[object Set]",dN="[object String]",pN="[object Symbol]",gN="[object ArrayBuffer]",mN="[object DataView]",Aw=Mw?Mw.prototype:void 0,g0=Aw?Aw.valueOf:void 0;function vN(t,e,n,r,i,o,s){switch(n){case mN:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case gN:return!(t.byteLength!=e.byteLength||!o(new Ow(t),new Ow(e)));case sN:case aN:case cN:return eN(+t,+e);case lN:return t.name==e.name&&t.message==e.message;case hN:case dN:return t==e+"";case uN:var a=nN;case fN:var l=r&iN;if(a||(a=rN),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;r|=oN,s.set(t,e);var c=tN(a(t),a(e),r,i,o,s);return s.delete(t),c;case pN:if(g0)return g0.call(t)==g0.call(e)}return!1}var yN=vN;function bN(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Pw=bN,xN=Pw,wN=Zn;function CN(t,e,n){var r=e(t);return wN(t)?r:xN(r,n(t))}var Dw=CN;function SN(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}var kN=SN;function TN(){return[]}var _w=TN,EN=kN,MN=_w,ON=Object.prototype,AN=ON.propertyIsEnumerable,Iw=Object.getOwnPropertySymbols,PN=Iw?function(t){return t==null?[]:(t=Object(t),EN(Iw(t),function(e){return AN.call(t,e)}))}:MN,m0=PN,DN=Dw,_N=m0,IN=rl;function $N(t){return DN(t,IN,_N)}var $w=$N,Fw=$w,FN=1,LN=Object.prototype,RN=LN.hasOwnProperty;function BN(t,e,n,r,i,o){var s=n&FN,a=Fw(t),l=a.length,u=Fw(e),c=u.length;if(l!=c&&!s)return!1;for(var h=l;h--;){var f=a[h];if(!(s?f in e:RN.call(e,f)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var g=!0;o.set(t,e),o.set(e,t);for(var m=s;++h<l;){f=a[h];var b=t[f],x=e[f];if(r)var C=s?r(x,b,f,e,t,o):r(b,x,f,t,e,o);if(!(C===void 0?b===x||i(b,x,n,r,o):C)){g=!1;break}m||(m=f=="constructor")}if(g&&!m){var S=t.constructor,w=e.constructor;S!=w&&"constructor"in t&&"constructor"in e&&!(typeof S=="function"&&S instanceof S&&typeof w=="function"&&w instanceof w)&&(g=!1)}return o.delete(t),o.delete(e),g}var NN=BN,jN=eo,VN=cr,zN=jN(VN,"DataView"),WN=zN,HN=eo,qN=cr,UN=HN(qN,"Promise"),YN=UN,GN=eo,KN=cr,XN=GN(KN,"Set"),ZN=XN,QN=eo,JN=cr,ej=QN(JN,"WeakMap"),tj=ej,v0=WN,y0=f0,b0=YN,x0=ZN,w0=tj,Lw=Ji,as=Cw,Rw="[object Map]",nj="[object Object]",Bw="[object Promise]",Nw="[object Set]",jw="[object WeakMap]",Vw="[object DataView]",rj=as(v0),ij=as(y0),oj=as(b0),sj=as(x0),aj=as(w0),to=Lw;(v0&&to(new v0(new ArrayBuffer(1)))!=Vw||y0&&to(new y0)!=Rw||b0&&to(b0.resolve())!=Bw||x0&&to(new x0)!=Nw||w0&&to(new w0)!=jw)&&(to=function(t){var e=Lw(t),n=e==nj?t.constructor:void 0,r=n?as(n):"";if(r)switch(r){case rj:return Vw;case ij:return Rw;case oj:return Bw;case sj:return Nw;case aj:return jw}return e});var Rc=to,C0=p0,lj=Tw,uj=yN,cj=NN,zw=Rc,Ww=Zn,Hw=r0,hj=dw,fj=1,qw="[object Arguments]",Uw="[object Array]",Bc="[object Object]",dj=Object.prototype,Yw=dj.hasOwnProperty;function pj(t,e,n,r,i,o){var s=Ww(t),a=Ww(e),l=s?Uw:zw(t),u=a?Uw:zw(e);l=l==qw?Bc:l,u=u==qw?Bc:u;var c=l==Bc,h=u==Bc,f=l==u;if(f&&Hw(t)){if(!Hw(e))return!1;s=!0,c=!1}if(f&&!c)return o||(o=new C0),s||hj(t)?lj(t,e,n,r,i,o):uj(t,e,l,n,r,i,o);if(!(n&fj)){var d=c&&Yw.call(t,"__wrapped__"),p=h&&Yw.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,m=p?e.value():e;return o||(o=new C0),i(g,m,n,r,o)}}return f?(o||(o=new C0),cj(t,e,n,r,i,o)):!1}var gj=pj,mj=gj,Gw=Nr;function Kw(t,e,n,r,i){return t===e?!0:t==null||e==null||!Gw(t)&&!Gw(e)?t!==t&&e!==e:mj(t,e,n,r,Kw,i)}var S0=Kw,vj=p0,yj=S0,bj=1,xj=2;function wj(t,e,n,r){var i=n.length,o=i,s=!r;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];var l=a[0],u=t[l],c=a[1];if(s&&a[2]){if(u===void 0&&!(l in t))return!1}else{var h=new vj;if(r)var f=r(u,c,l,t,e,h);if(!(f===void 0?yj(c,u,bj|xj,r,h):f))return!1}}return!0}var Cj=wj,Sj=ns;function kj(t){return t===t&&!Sj(t)}var Xw=kj,Tj=Xw,Ej=rl;function Mj(t){for(var e=Ej(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Tj(i)]}return e}var Oj=Mj;function Aj(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var Zw=Aj,Pj=Cj,Dj=Oj,_j=Zw;function Ij(t){var e=Dj(t);return e.length==1&&e[0][2]?_j(e[0][0],e[0][1]):function(n){return n===t||Pj(n,t,e)}}var $j=Ij,Fj=Ji,Lj=Nr,Rj="[object Symbol]";function Bj(t){return typeof t=="symbol"||Lj(t)&&Fj(t)==Rj}var k0=Bj,Nj=Zn,jj=k0,Vj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zj=/^\w*$/;function Wj(t,e){if(Nj(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||jj(t)?!0:zj.test(t)||!Vj.test(t)||e!=null&&t in Object(e)}var T0=Wj,Qw=d0,Hj="Expected a function";function E0(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Hj);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(E0.Cache||Qw),n}E0.Cache=Qw;var qj=E0,Uj=qj,Yj=500;function Gj(t){var e=Uj(t,function(r){return n.size===Yj&&n.clear(),r}),n=e.cache;return e}var Kj=Gj,Xj=Kj,Zj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qj=/\\(\\)?/g,Jj=Xj(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Zj,function(n,r,i,o){e.push(i?o.replace(Qj,"$1"):r||n)}),e}),eV=Jj,Jw=tl,tV=xw,nV=Zn,rV=k0,iV=1/0,eC=Jw?Jw.prototype:void 0,tC=eC?eC.toString:void 0;function nC(t){if(typeof t=="string")return t;if(nV(t))return tV(t,nC)+"";if(rV(t))return tC?tC.call(t):"";var e=t+"";return e=="0"&&1/t==-iV?"-0":e}var oV=nC,sV=oV;function aV(t){return t==null?"":sV(t)}var lV=aV,uV=Zn,cV=T0,hV=eV,fV=lV;function dV(t,e){return uV(t)?t:cV(t,e)?[t]:hV(fV(t))}var rC=dV,pV=k0,gV=1/0;function mV(t){if(typeof t=="string"||pV(t))return t;var e=t+"";return e=="0"&&1/t==-gV?"-0":e}var Nc=mV,vV=rC,yV=Nc;function bV(t,e){e=vV(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[yV(e[n++])];return n&&n==r?t:void 0}var iC=bV,xV=iC;function wV(t,e,n){var r=t==null?void 0:xV(t,e);return r===void 0?n:r}var CV=wV;function SV(t,e){return t!=null&&e in Object(t)}var kV=SV,TV=rC,EV=uw,MV=Zn,OV=cw,AV=i0,PV=Nc;function DV(t,e,n){e=TV(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var s=PV(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:(i=t==null?0:t.length,!!i&&AV(i)&&OV(s,i)&&(MV(t)||EV(t)))}var _V=DV,IV=kV,$V=_V;function FV(t,e){return t!=null&&$V(t,e,IV)}var LV=FV,RV=S0,BV=CV,NV=LV,jV=T0,VV=Xw,zV=Zw,WV=Nc,HV=1,qV=2;function UV(t,e){return jV(t)&&VV(e)?zV(WV(t),e):function(n){var r=BV(n,t);return r===void 0&&r===e?NV(n,t):RV(e,r,HV|qV)}}var YV=UV;function GV(t){return function(e){return e==null?void 0:e[t]}}var KV=GV,XV=iC;function ZV(t){return function(e){return XV(e,t)}}var QV=ZV,JV=KV,ez=QV,tz=T0,nz=Nc;function rz(t){return tz(t)?JV(nz(t)):ez(t)}var iz=rz,oz=$j,sz=YV,az=yw,lz=Zn,uz=iz;function cz(t){return typeof t=="function"?t:t==null?az:typeof t=="object"?lz(t)?sz(t[0],t[1]):oz(t):uz(t)}var hz=cz,fz=Dc;function dz(t,e){return function(n,r){if(n==null)return n;if(!fz(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Object(n);(e?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}var pz=dz,gz=vw,mz=pz,vz=mz(gz),yz=vz,bz=yz,xz=Dc;function wz(t,e){var n=-1,r=xz(t)?Array(t.length):[];return bz(t,function(i,o,s){r[++n]=e(i,o,s)}),r}var Cz=wz,Sz=xw,kz=hz,Tz=Cz,Ez=Zn;function Mz(t,e){var n=Ez(t)?Sz:Tz;return n(t,kz(e))}var Oz=Mz;Object.defineProperty(el,"__esModule",{value:!0}),el.flattenNames=void 0;var Az=r$,Pz=jc(Az),Dz=l0,_z=jc(Dz),Iz=uL,$z=jc(Iz),Fz=Oz,Lz=jc(Fz);function jc(t){return t&&t.__esModule?t:{default:t}}var Rz=el.flattenNames=function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,Lz.default)(e,function(r){Array.isArray(r)?t(r).map(function(i){return n.push(i)}):(0,$z.default)(r)?(0,_z.default)(r,function(i,o){i===!0&&n.push(o),n.push(o+"-"+i)}):(0,Pz.default)(r)&&n.push(r)}),n};el.default=Rz;var il={};function Bz(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Nz=Bz,jz=eo,Vz=function(){try{var t=jz(Object,"defineProperty");return t({},"",{}),t}catch{}}(),zz=Vz,oC=zz;function Wz(t,e,n){e=="__proto__"&&oC?oC(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var sC=Wz,Hz=sC,qz=c0,Uz=Object.prototype,Yz=Uz.hasOwnProperty;function Gz(t,e,n){var r=t[e];(!(Yz.call(t,e)&&qz(r,n))||n===void 0&&!(e in t))&&Hz(t,e,n)}var aC=Gz,Kz=aC,Xz=sC;function Zz(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=r?r(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),i?Xz(n,a,l):Kz(n,a,l)}return n}var Vc=Zz,Qz=Vc,Jz=rl;function eW(t,e){return t&&Qz(e,Jz(e),t)}var tW=eW;function nW(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var rW=nW,iW=ns,oW=a0,sW=rW,aW=Object.prototype,lW=aW.hasOwnProperty;function uW(t){if(!iW(t))return sW(t);var e=oW(t),n=[];for(var r in t)r=="constructor"&&(e||!lW.call(t,r))||n.push(r);return n}var cW=uW,hW=pw,fW=cW,dW=Dc;function pW(t){return dW(t)?hW(t,!0):fW(t)}var M0=pW,gW=Vc,mW=M0;function vW(t,e){return t&&gW(e,mW(e),t)}var yW=vW,zc={exports:{}};zc.exports,function(t,e){var n=cr,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(u,c){if(c)return u.slice();var h=u.length,f=a?a(h):new u.constructor(h);return u.copy(f),f}t.exports=l}(zc,zc.exports);var bW=zc.exports;function xW(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var wW=xW,CW=Vc,SW=m0;function kW(t,e){return CW(t,SW(t),e)}var TW=kW,EW=Pw,MW=u0,OW=m0,AW=_w,PW=Object.getOwnPropertySymbols,DW=PW?function(t){for(var e=[];t;)EW(e,OW(t)),t=MW(t);return e}:AW,lC=DW,_W=Vc,IW=lC;function $W(t,e){return _W(t,IW(t),e)}var FW=$W,LW=Dw,RW=lC,BW=M0;function NW(t){return LW(t,BW,RW)}var jW=NW,VW=Object.prototype,zW=VW.hasOwnProperty;function WW(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&zW.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var HW=WW,uC=Ew;function qW(t){var e=new t.constructor(t.byteLength);return new uC(e).set(new uC(t)),e}var O0=qW,UW=O0;function YW(t,e){var n=e?UW(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var GW=YW,KW=/\w*$/;function XW(t){var e=new t.constructor(t.source,KW.exec(t));return e.lastIndex=t.lastIndex,e}var ZW=XW,cC=tl,hC=cC?cC.prototype:void 0,fC=hC?hC.valueOf:void 0;function QW(t){return fC?Object(fC.call(t)):{}}var JW=QW,eH=O0;function tH(t,e){var n=e?eH(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var nH=tH,rH=O0,iH=GW,oH=ZW,sH=JW,aH=nH,lH="[object Boolean]",uH="[object Date]",cH="[object Map]",hH="[object Number]",fH="[object RegExp]",dH="[object Set]",pH="[object String]",gH="[object Symbol]",mH="[object ArrayBuffer]",vH="[object DataView]",yH="[object Float32Array]",bH="[object Float64Array]",xH="[object Int8Array]",wH="[object Int16Array]",CH="[object Int32Array]",SH="[object Uint8Array]",kH="[object Uint8ClampedArray]",TH="[object Uint16Array]",EH="[object Uint32Array]";function MH(t,e,n){var r=t.constructor;switch(e){case mH:return rH(t);case lH:case uH:return new r(+t);case vH:return iH(t,n);case yH:case bH:case xH:case wH:case CH:case SH:case kH:case TH:case EH:return aH(t,n);case cH:return new r;case hH:case pH:return new r(t);case fH:return oH(t);case dH:return new r;case gH:return sH(t)}}var OH=MH,AH=ns,dC=Object.create,PH=function(){function t(){}return function(e){if(!AH(e))return{};if(dC)return dC(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),DH=PH,_H=DH,IH=u0,$H=a0;function FH(t){return typeof t.constructor=="function"&&!$H(t)?_H(IH(t)):{}}var LH=FH,RH=Rc,BH=Nr,NH="[object Map]";function jH(t){return BH(t)&&RH(t)==NH}var VH=jH,zH=VH,WH=o0,pC=s0,gC=pC&&pC.isMap,HH=gC?WH(gC):zH,qH=HH,UH=Rc,YH=Nr,GH="[object Set]";function KH(t){return YH(t)&&UH(t)==GH}var XH=KH,ZH=XH,QH=o0,mC=s0,vC=mC&&mC.isSet,JH=vC?QH(vC):ZH,eq=JH,tq=p0,nq=Nz,rq=aC,iq=tW,oq=yW,sq=bW,aq=wW,lq=TW,uq=FW,cq=$w,hq=jW,fq=Rc,dq=HW,pq=OH,gq=LH,mq=Zn,vq=r0,yq=qH,bq=ns,xq=eq,wq=rl,Cq=M0,Sq=1,kq=2,Tq=4,yC="[object Arguments]",Eq="[object Array]",Mq="[object Boolean]",Oq="[object Date]",Aq="[object Error]",bC="[object Function]",Pq="[object GeneratorFunction]",Dq="[object Map]",_q="[object Number]",xC="[object Object]",Iq="[object RegExp]",$q="[object Set]",Fq="[object String]",Lq="[object Symbol]",Rq="[object WeakMap]",Bq="[object ArrayBuffer]",Nq="[object DataView]",jq="[object Float32Array]",Vq="[object Float64Array]",zq="[object Int8Array]",Wq="[object Int16Array]",Hq="[object Int32Array]",qq="[object Uint8Array]",Uq="[object Uint8ClampedArray]",Yq="[object Uint16Array]",Gq="[object Uint32Array]",ut={};ut[yC]=ut[Eq]=ut[Bq]=ut[Nq]=ut[Mq]=ut[Oq]=ut[jq]=ut[Vq]=ut[zq]=ut[Wq]=ut[Hq]=ut[Dq]=ut[_q]=ut[xC]=ut[Iq]=ut[$q]=ut[Fq]=ut[Lq]=ut[qq]=ut[Uq]=ut[Yq]=ut[Gq]=!0,ut[Aq]=ut[bC]=ut[Rq]=!1;function Wc(t,e,n,r,i,o){var s,a=e&Sq,l=e&kq,u=e&Tq;if(n&&(s=i?n(t,r,i,o):n(t)),s!==void 0)return s;if(!bq(t))return t;var c=mq(t);if(c){if(s=dq(t),!a)return aq(t,s)}else{var h=fq(t),f=h==bC||h==Pq;if(vq(t))return sq(t,a);if(h==xC||h==yC||f&&!i){if(s=l||f?{}:gq(t),!a)return l?uq(t,oq(s,t)):lq(t,iq(s,t))}else{if(!ut[h])return i?t:{};s=pq(t,h,a)}}o||(o=new tq);var d=o.get(t);if(d)return d;o.set(t,s),xq(t)?t.forEach(function(m){s.add(Wc(m,e,n,m,t,o))}):yq(t)&&t.forEach(function(m,b){s.set(b,Wc(m,e,n,b,t,o))});var p=u?l?hq:cq:l?Cq:wq,g=c?void 0:p(t);return nq(g||t,function(m,b){g&&(b=m,m=t[b]),rq(s,b,Wc(m,e,n,b,t,o))}),s}var Kq=Wc,Xq=Kq,Zq=1,Qq=4;function Jq(t){return Xq(t,Zq|Qq)}var eU=Jq;Object.defineProperty(il,"__esModule",{value:!0}),il.mergeClasses=void 0;var tU=l0,nU=wC(tU),rU=eU,iU=wC(rU),oU=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};function wC(t){return t&&t.__esModule?t:{default:t}}var sU=il.mergeClasses=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.default&&(0,iU.default)(e.default)||{};return n.map(function(i){var o=e[i];return o&&(0,nU.default)(o,function(s,a){r[a]||(r[a]={}),r[a]=oU({},r[a],o[a])}),i}),r};il.default=sU;var ol={};Object.defineProperty(ol,"__esModule",{value:!0}),ol.autoprefix=void 0;var aU=l0,CC=uU(aU),lU=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};function uU(t){return t&&t.__esModule?t:{default:t}}var cU={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var n=e&&e.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(e,n){var r=n[e];return r||{extend:e}}},hU=ol.autoprefix=function(e){var n={};return(0,CC.default)(e,function(r,i){var o={};(0,CC.default)(r,function(s,a){var l=cU[a];l?o=lU({},o,l(s)):o[a]=s}),n[i]=o}),n};ol.default=hU;var sl={};Object.defineProperty(sl,"__esModule",{value:!0}),sl.hover=void 0;var fU=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},dU=v,A0=pU(dU);function pU(t){return t&&t.__esModule?t:{default:t}}function gU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function mU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var vU=sl.hover=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){mU(i,r);function i(){var o,s,a,l;gU(this,i);for(var u=arguments.length,c=Array(u),h=0;h<u;h++)c[h]=arguments[h];return l=(s=(a=SC(this,(o=i.__proto__||Object.getPrototypeOf(i)).call.apply(o,[this].concat(c))),a),a.state={hover:!1},a.handleMouseOver=function(){return a.setState({hover:!0})},a.handleMouseOut=function(){return a.setState({hover:!1})},a.render=function(){return A0.default.createElement(n,{onMouseOver:a.handleMouseOver,onMouseOut:a.handleMouseOut},A0.default.createElement(e,fU({},a.props,a.state)))},s),SC(a,l)}return i}(A0.default.Component)};sl.default=vU;var al={};Object.defineProperty(al,"__esModule",{value:!0}),al.active=void 0;var yU=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},bU=v,P0=xU(bU);function xU(t){return t&&t.__esModule?t:{default:t}}function wU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function CU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var SU=al.active=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){CU(i,r);function i(){var o,s,a,l;wU(this,i);for(var u=arguments.length,c=Array(u),h=0;h<u;h++)c[h]=arguments[h];return l=(s=(a=kC(this,(o=i.__proto__||Object.getPrototypeOf(i)).call.apply(o,[this].concat(c))),a),a.state={active:!1},a.handleMouseDown=function(){return a.setState({active:!0})},a.handleMouseUp=function(){return a.setState({active:!1})},a.render=function(){return P0.default.createElement(n,{onMouseDown:a.handleMouseDown,onMouseUp:a.handleMouseUp},P0.default.createElement(e,yU({},a.props,a.state)))},s),kC(a,l)}return i}(P0.default.Component)};al.default=SU;var D0={};Object.defineProperty(D0,"__esModule",{value:!0});var kU=function(e,n){var r={},i=function(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[s]=a};return e===0&&i("first-child"),e===n-1&&i("last-child"),(e===0||e%2===0)&&i("even"),Math.abs(e%2)===1&&i("odd"),i("nth-child",e),r};D0.default=kU,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.ReactCSS=Nn.loop=Nn.handleActive=_0=Nn.handleHover=Nn.hover=void 0;var TU=el,EU=ls(TU),MU=il,OU=ls(MU),AU=ol,PU=ls(AU),DU=sl,TC=ls(DU),_U=al,IU=ls(_U),$U=D0,FU=ls($U);function ls(t){return t&&t.__esModule?t:{default:t}}Nn.hover=TC.default;var _0=Nn.handleHover=TC.default;Nn.handleActive=IU.default,Nn.loop=FU.default;var LU=Nn.ReactCSS=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=(0,EU.default)(r),s=(0,OU.default)(e,o);return(0,PU.default)(s)},Te=Nn.default=LU,RU=function(e,n,r,i,o){var s=o.clientWidth,a=o.clientHeight,l=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,u=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,c=l-(o.getBoundingClientRect().left+window.pageXOffset),h=u-(o.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var f=void 0;if(h<0?f=0:h>a?f=1:f=Math.round(h*100/a)/100,n.a!==f)return{h:n.h,s:n.s,l:n.l,a:f,source:"rgb"}}else{var d=void 0;if(c<0?d=0:c>s?d=1:d=Math.round(c*100/s)/100,i!==d)return{h:n.h,s:n.s,l:n.l,a:d,source:"rgb"}}return null},I0={},BU=function(e,n,r,i){if(typeof document>"u"&&!i)return null;var o=i?new i:document.createElement("canvas");o.width=r*2,o.height=r*2;var s=o.getContext("2d");return s?(s.fillStyle=e,s.fillRect(0,0,o.width,o.height),s.fillStyle=n,s.fillRect(0,0,r,r),s.translate(r,r),s.fillRect(0,0,r,r),o.toDataURL()):null},NU=function(e,n,r,i){var o=e+"-"+n+"-"+r+(i?"-server":"");if(I0[o])return I0[o];var s=BU(e,n,r,i);return I0[o]=s,s},EC=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},us=function(e){var n=e.white,r=e.grey,i=e.size,o=e.renderers,s=e.borderRadius,a=e.boxShadow,l=e.children,u=Te({default:{grid:{borderRadius:s,boxShadow:a,absolute:"0px 0px 0px 0px",background:"url("+NU(n,r,i,o.canvas)+") center left"}}});return v.isValidElement(l)?v.cloneElement(l,EC({},l.props,{style:EC({},l.props.style,u.grid)})):v.createElement("div",{style:u.grid})};us.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var jU=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},VU=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function zU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function WU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var $0=function(t){WU(e,t);function e(){var n,r,i,o;zU(this,e);for(var s=arguments.length,a=Array(s),l=0;l<s;l++)a[l]=arguments[l];return o=(r=(i=MC(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(a))),i),i.handleChange=function(u){var c=RU(u,i.props.hsl,i.props.direction,i.props.a,i.container);c&&typeof i.props.onChange=="function"&&i.props.onChange(c,u)},i.handleMouseDown=function(u){i.handleChange(u),window.addEventListener("mousemove",i.handleChange),window.addEventListener("mouseup",i.handleMouseUp)},i.handleMouseUp=function(){i.unbindEventListeners()},i.unbindEventListeners=function(){window.removeEventListener("mousemove",i.handleChange),window.removeEventListener("mouseup",i.handleMouseUp)},r),MC(i,o)}return VU(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,i=this.props.rgb,o=Te({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+i.r+","+i.g+","+i.b+`, 0) 0%,
108
+ rgba(`+i.r+","+i.g+","+i.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:i.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+i.r+","+i.g+","+i.b+`, 0) 0%,
109
+ rgba(`+i.r+","+i.g+","+i.b+", 1) 100%)"},pointer:{left:0,top:i.a*100+"%"}},overwrite:jU({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return v.createElement("div",{style:o.alpha},v.createElement("div",{style:o.checkboard},v.createElement(us,{renderers:this.props.renderers})),v.createElement("div",{style:o.gradient}),v.createElement("div",{style:o.container,ref:function(a){return r.container=a},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},v.createElement("div",{style:o.pointer},this.props.pointer?v.createElement(this.props.pointer,this.props):v.createElement("div",{style:o.slider}))))}}]),e}(v.PureComponent||v.Component),HU=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function qU(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function UU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YU(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function GU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var KU=1,OC=38,XU=40,ZU=[OC,XU],QU=function(e){return ZU.indexOf(e)>-1},JU=function(e){return Number(String(e).replace(/%/g,""))},eY=1,Re=function(t){GU(e,t);function e(n){UU(this,e);var r=YU(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(i){r.setUpdatedValue(i.target.value,i)},r.handleKeyDown=function(i){var o=JU(i.target.value);if(!isNaN(o)&&QU(i.keyCode)){var s=r.getArrowOffset(),a=i.keyCode===OC?o+s:o-s;r.setUpdatedValue(a,i)}},r.handleDrag=function(i){if(r.props.dragLabel){var o=Math.round(r.props.value+i.movementX);o>=0&&o<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(o),i)}},r.handleMouseDown=function(i){r.props.dragLabel&&(i.preventDefault(),r.handleDrag(i),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+eY++,r}return HU(e,[{key:"componentDidUpdate",value:function(r,i){this.props.value!==this.state.value&&(r.value!==this.props.value||i.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return qU({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||KU}},{key:"setUpdatedValue",value:function(r,i){var o=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(o,i),this.setState({value:r})}},{key:"render",value:function(){var r=this,i=Te({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return v.createElement("div",{style:i.wrap},v.createElement("input",{id:this.inputId,style:i.input,ref:function(s){return r.input=s},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?v.createElement("label",{htmlFor:this.inputId,style:i.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(v.PureComponent||v.Component),tY=function(e,n,r,i){var o=i.clientWidth,s=i.clientHeight,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=a-(i.getBoundingClientRect().left+window.pageXOffset),c=l-(i.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var h=void 0;if(c<0)h=359;else if(c>s)h=0;else{var f=-(c*100/s)+100;h=360*f/100}if(r.h!==h)return{h,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var d=void 0;if(u<0)d=0;else if(u>o)d=359;else{var p=u*100/o;d=360*p/100}if(r.h!==d)return{h:d,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},nY=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function rY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function iY(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var cs=function(t){iY(e,t);function e(){var n,r,i,o;rY(this,e);for(var s=arguments.length,a=Array(s),l=0;l<s;l++)a[l]=arguments[l];return o=(r=(i=AC(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(a))),i),i.handleChange=function(u){var c=tY(u,i.props.direction,i.props.hsl,i.container);c&&typeof i.props.onChange=="function"&&i.props.onChange(c,u)},i.handleMouseDown=function(u){i.handleChange(u),window.addEventListener("mousemove",i.handleChange),window.addEventListener("mouseup",i.handleMouseUp)},i.handleMouseUp=function(){i.unbindEventListeners()},r),AC(i,o)}return nY(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,i=this.props.direction,o=i===void 0?"horizontal":i,s=Te({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:o==="vertical"});return v.createElement("div",{style:s.hue},v.createElement("div",{className:"hue-"+o,style:s.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},v.createElement("style",null,`
110
+ .hue-horizontal {
111
+ background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
112
+ 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
113
+ background: -webkit-linear-gradient(to right, #f00 0%, #ff0
114
+ 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
115
+ }
116
+
117
+ .hue-vertical {
118
+ background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
119
+ #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
120
+ background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
121
+ #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
122
+ }
123
+ `),v.createElement("div",{style:s.pointer},this.props.pointer?v.createElement(this.props.pointer,this.props):v.createElement("div",{style:s.slider}))))}}]),e}(v.PureComponent||v.Component);function oY(){this.__data__=[],this.size=0}function ll(t,e){return t===e||t!==t&&e!==e}function Hc(t,e){for(var n=t.length;n--;)if(ll(t[n][0],e))return n;return-1}var sY=Array.prototype,aY=sY.splice;function lY(t){var e=this.__data__,n=Hc(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():aY.call(e,n,1),--this.size,!0}function uY(t){var e=this.__data__,n=Hc(e,t);return n<0?void 0:e[n][1]}function cY(t){return Hc(this.__data__,t)>-1}function hY(t,e){var n=this.__data__,r=Hc(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function jr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}jr.prototype.clear=oY,jr.prototype.delete=lY,jr.prototype.get=uY,jr.prototype.has=cY,jr.prototype.set=hY;function fY(){this.__data__=new jr,this.size=0}function dY(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function pY(t){return this.__data__.get(t)}function gY(t){return this.__data__.has(t)}var mY=typeof global=="object"&&global&&global.Object===Object&&global;const PC=mY;var vY=typeof self=="object"&&self&&self.Object===Object&&self,yY=PC||vY||Function("return this")();const Qn=yY;var bY=Qn.Symbol;const ui=bY;var DC=Object.prototype,xY=DC.hasOwnProperty,wY=DC.toString,ul=ui?ui.toStringTag:void 0;function CY(t){var e=xY.call(t,ul),n=t[ul];try{t[ul]=void 0;var r=!0}catch{}var i=wY.call(t);return r&&(e?t[ul]=n:delete t[ul]),i}var SY=Object.prototype,kY=SY.toString;function TY(t){return kY.call(t)}var EY="[object Null]",MY="[object Undefined]",_C=ui?ui.toStringTag:void 0;function no(t){return t==null?t===void 0?MY:EY:_C&&_C in Object(t)?CY(t):TY(t)}function jn(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var OY="[object AsyncFunction]",AY="[object Function]",PY="[object GeneratorFunction]",DY="[object Proxy]";function F0(t){if(!jn(t))return!1;var e=no(t);return e==AY||e==PY||e==OY||e==DY}var _Y=Qn["__core-js_shared__"];const L0=_Y;var IC=function(){var t=/[^.]+$/.exec(L0&&L0.keys&&L0.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function IY(t){return!!IC&&IC in t}var $Y=Function.prototype,FY=$Y.toString;function ro(t){if(t!=null){try{return FY.call(t)}catch{}try{return t+""}catch{}}return""}var LY=/[\\^$.*+?()[\]{}|]/g,RY=/^\[object .+?Constructor\]$/,BY=Function.prototype,NY=Object.prototype,jY=BY.toString,VY=NY.hasOwnProperty,zY=RegExp("^"+jY.call(VY).replace(LY,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function WY(t){if(!jn(t)||IY(t))return!1;var e=F0(t)?zY:RY;return e.test(ro(t))}function HY(t,e){return t==null?void 0:t[e]}function io(t,e){var n=HY(t,e);return WY(n)?n:void 0}var qY=io(Qn,"Map");const cl=qY;var UY=io(Object,"create");const hl=UY;function YY(){this.__data__=hl?hl(null):{},this.size=0}function GY(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var KY="__lodash_hash_undefined__",XY=Object.prototype,ZY=XY.hasOwnProperty;function QY(t){var e=this.__data__;if(hl){var n=e[t];return n===KY?void 0:n}return ZY.call(e,t)?e[t]:void 0}var JY=Object.prototype,eG=JY.hasOwnProperty;function tG(t){var e=this.__data__;return hl?e[t]!==void 0:eG.call(e,t)}var nG="__lodash_hash_undefined__";function rG(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=hl&&e===void 0?nG:e,this}function oo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}oo.prototype.clear=YY,oo.prototype.delete=GY,oo.prototype.get=QY,oo.prototype.has=tG,oo.prototype.set=rG;function iG(){this.size=0,this.__data__={hash:new oo,map:new(cl||jr),string:new oo}}function oG(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qc(t,e){var n=t.__data__;return oG(e)?n[typeof e=="string"?"string":"hash"]:n.map}function sG(t){var e=qc(this,t).delete(t);return this.size-=e?1:0,e}function aG(t){return qc(this,t).get(t)}function lG(t){return qc(this,t).has(t)}function uG(t,e){var n=qc(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Vr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Vr.prototype.clear=iG,Vr.prototype.delete=sG,Vr.prototype.get=aG,Vr.prototype.has=lG,Vr.prototype.set=uG;var cG=200;function hG(t,e){var n=this.__data__;if(n instanceof jr){var r=n.__data__;if(!cl||r.length<cG-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vr(r)}return n.set(t,e),this.size=n.size,this}function hr(t){var e=this.__data__=new jr(t);this.size=e.size}hr.prototype.clear=fY,hr.prototype.delete=dY,hr.prototype.get=pY,hr.prototype.has=gY,hr.prototype.set=hG;var fG=function(){try{var t=io(Object,"defineProperty");return t({},"",{}),t}catch{}}();const Uc=fG;function R0(t,e,n){e=="__proto__"&&Uc?Uc(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function B0(t,e,n){(n!==void 0&&!ll(t[e],n)||n===void 0&&!(e in t))&&R0(t,e,n)}function dG(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var pG=dG();const $C=pG;var FC=typeof $=="object"&&$&&!$.nodeType&&$,LC=FC&&typeof module=="object"&&module&&!module.nodeType&&module,gG=LC&&LC.exports===FC,RC=gG?Qn.Buffer:void 0,BC=RC?RC.allocUnsafe:void 0;function mG(t,e){if(e)return t.slice();var n=t.length,r=BC?BC(n):new t.constructor(n);return t.copy(r),r}var vG=Qn.Uint8Array;const Yc=vG;function yG(t){var e=new t.constructor(t.byteLength);return new Yc(e).set(new Yc(t)),e}function bG(t,e){var n=e?yG(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function xG(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var NC=Object.create,wG=function(){function t(){}return function(e){if(!jn(e))return{};if(NC)return NC(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const CG=wG;function jC(t,e){return function(n){return t(e(n))}}var SG=jC(Object.getPrototypeOf,Object);const VC=SG;var kG=Object.prototype;function N0(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||kG;return t===n}function TG(t){return typeof t.constructor=="function"&&!N0(t)?CG(VC(t)):{}}function ci(t){return t!=null&&typeof t=="object"}var EG="[object Arguments]";function zC(t){return ci(t)&&no(t)==EG}var WC=Object.prototype,MG=WC.hasOwnProperty,OG=WC.propertyIsEnumerable,AG=zC(function(){return arguments}())?zC:function(t){return ci(t)&&MG.call(t,"callee")&&!OG.call(t,"callee")};const Gc=AG;var PG=Array.isArray;const kn=PG;var DG=9007199254740991;function j0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=DG}function hs(t){return t!=null&&j0(t.length)&&!F0(t)}function _G(t){return ci(t)&&hs(t)}function IG(){return!1}var HC=typeof $=="object"&&$&&!$.nodeType&&$,qC=HC&&typeof module=="object"&&module&&!module.nodeType&&module,$G=qC&&qC.exports===HC,UC=$G?Qn.Buffer:void 0,FG=UC?UC.isBuffer:void 0,LG=FG||IG;const Kc=LG;var RG="[object Object]",BG=Function.prototype,NG=Object.prototype,YC=BG.toString,jG=NG.hasOwnProperty,VG=YC.call(Object);function zG(t){if(!ci(t)||no(t)!=RG)return!1;var e=VC(t);if(e===null)return!0;var n=jG.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&YC.call(n)==VG}var WG="[object Arguments]",HG="[object Array]",qG="[object Boolean]",UG="[object Date]",YG="[object Error]",GG="[object Function]",KG="[object Map]",XG="[object Number]",ZG="[object Object]",QG="[object RegExp]",JG="[object Set]",eK="[object String]",tK="[object WeakMap]",nK="[object ArrayBuffer]",rK="[object DataView]",iK="[object Float32Array]",oK="[object Float64Array]",sK="[object Int8Array]",aK="[object Int16Array]",lK="[object Int32Array]",uK="[object Uint8Array]",cK="[object Uint8ClampedArray]",hK="[object Uint16Array]",fK="[object Uint32Array]",dt={};dt[iK]=dt[oK]=dt[sK]=dt[aK]=dt[lK]=dt[uK]=dt[cK]=dt[hK]=dt[fK]=!0,dt[WG]=dt[HG]=dt[nK]=dt[qG]=dt[rK]=dt[UG]=dt[YG]=dt[GG]=dt[KG]=dt[XG]=dt[ZG]=dt[QG]=dt[JG]=dt[eK]=dt[tK]=!1;function dK(t){return ci(t)&&j0(t.length)&&!!dt[no(t)]}function pK(t){return function(e){return t(e)}}var GC=typeof $=="object"&&$&&!$.nodeType&&$,fl=GC&&typeof module=="object"&&module&&!module.nodeType&&module,gK=fl&&fl.exports===GC,V0=gK&&PC.process,mK=function(){try{var t=fl&&fl.require&&fl.require("util").types;return t||V0&&V0.binding&&V0.binding("util")}catch{}}();const KC=mK;var XC=KC&&KC.isTypedArray,vK=XC?pK(XC):dK;const z0=vK;function W0(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var yK=Object.prototype,bK=yK.hasOwnProperty;function xK(t,e,n){var r=t[e];(!(bK.call(t,e)&&ll(r,n))||n===void 0&&!(e in t))&&R0(t,e,n)}function wK(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=r?r(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),i?R0(n,a,l):xK(n,a,l)}return n}function CK(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var SK=9007199254740991,kK=/^(?:0|[1-9]\d*)$/;function H0(t,e){var n=typeof t;return e=e??SK,!!e&&(n=="number"||n!="symbol"&&kK.test(t))&&t>-1&&t%1==0&&t<e}var TK=Object.prototype,EK=TK.hasOwnProperty;function ZC(t,e){var n=kn(t),r=!n&&Gc(t),i=!n&&!r&&Kc(t),o=!n&&!r&&!i&&z0(t),s=n||r||i||o,a=s?CK(t.length,String):[],l=a.length;for(var u in t)(e||EK.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||H0(u,l)))&&a.push(u);return a}function MK(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var OK=Object.prototype,AK=OK.hasOwnProperty;function PK(t){if(!jn(t))return MK(t);var e=N0(t),n=[];for(var r in t)r=="constructor"&&(e||!AK.call(t,r))||n.push(r);return n}function QC(t){return hs(t)?ZC(t,!0):PK(t)}function DK(t){return wK(t,QC(t))}function _K(t,e,n,r,i,o,s){var a=W0(t,n),l=W0(e,n),u=s.get(l);if(u){B0(t,n,u);return}var c=o?o(a,l,n+"",t,e,s):void 0,h=c===void 0;if(h){var f=kn(l),d=!f&&Kc(l),p=!f&&!d&&z0(l);c=l,f||d||p?kn(a)?c=a:_G(a)?c=xG(a):d?(h=!1,c=mG(l,!0)):p?(h=!1,c=bG(l,!0)):c=[]:zG(l)||Gc(l)?(c=a,Gc(a)?c=DK(a):(!jn(a)||F0(a))&&(c=TG(l))):h=!1}h&&(s.set(l,c),i(c,l,r,o,s),s.delete(l)),B0(t,n,c)}function JC(t,e,n,r,i){t!==e&&$C(e,function(o,s){if(i||(i=new hr),jn(o))_K(t,e,s,n,JC,r,i);else{var a=r?r(W0(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),B0(t,s,a)}},QC)}function Xc(t){return t}function IK(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var eS=Math.max;function $K(t,e,n){return e=eS(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=eS(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),IK(t,this,a)}}function FK(t){return function(){return t}}var LK=Uc?function(t,e){return Uc(t,"toString",{configurable:!0,enumerable:!1,value:FK(e),writable:!0})}:Xc;const RK=LK;var BK=800,NK=16,jK=Date.now;function VK(t){var e=0,n=0;return function(){var r=jK(),i=NK-(r-n);if(n=r,i>0){if(++e>=BK)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var zK=VK(RK);const WK=zK;function HK(t,e){return WK($K(t,e,Xc),t+"")}function qK(t,e,n){if(!jn(n))return!1;var r=typeof e;return(r=="number"?hs(n)&&H0(e,n.length):r=="string"&&e in n)?ll(n[e],t):!1}function UK(t){return HK(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&qK(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e})}var YK=UK(function(t,e,n){JC(t,e,n)});const pn=YK;var dl=function(e){var n=e.zDepth,r=e.radius,i=e.background,o=e.children,s=e.styles,a=s===void 0?{}:s,l=Te(pn({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+n*4+"px rgba(0,0,0,.24)",borderRadius:r,background:i}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},a),{"zDepth-1":n===1});return v.createElement("div",{style:l.wrap},v.createElement("div",{style:l.bg}),v.createElement("div",{style:l.content},o))};dl.propTypes={background:A.string,zDepth:A.oneOf([0,1,2,3,4,5]),radius:A.number,styles:A.object},dl.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var GK=function(){return Qn.Date.now()};const q0=GK;var KK=/\s/;function XK(t){for(var e=t.length;e--&&KK.test(t.charAt(e)););return e}var ZK=/^\s+/;function QK(t){return t&&t.slice(0,XK(t)+1).replace(ZK,"")}var JK="[object Symbol]";function Zc(t){return typeof t=="symbol"||ci(t)&&no(t)==JK}var tS=0/0,eX=/^[-+]0x[0-9a-f]+$/i,tX=/^0b[01]+$/i,nX=/^0o[0-7]+$/i,rX=parseInt;function nS(t){if(typeof t=="number")return t;if(Zc(t))return tS;if(jn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=jn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=QK(t);var n=tX.test(t);return n||nX.test(t)?rX(t.slice(2),n?2:8):eX.test(t)?tS:+t}var iX="Expected a function",oX=Math.max,sX=Math.min;function pl(t,e,n){var r,i,o,s,a,l,u=0,c=!1,h=!1,f=!0;if(typeof t!="function")throw new TypeError(iX);e=nS(e)||0,jn(n)&&(c=!!n.leading,h="maxWait"in n,o=h?oX(nS(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f);function d(k){var T=r,O=i;return r=i=void 0,u=k,s=t.apply(O,T),s}function p(k){return u=k,a=setTimeout(b,e),c?d(k):s}function g(k){var T=k-l,O=k-u,P=e-T;return h?sX(P,o-O):P}function m(k){var T=k-l,O=k-u;return l===void 0||T>=e||T<0||h&&O>=o}function b(){var k=q0();if(m(k))return x(k);a=setTimeout(b,g(k))}function x(k){return a=void 0,f&&r?d(k):(r=i=void 0,s)}function C(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function S(){return a===void 0?s:x(q0())}function w(){var k=q0(),T=m(k);if(r=arguments,i=this,l=k,T){if(a===void 0)return p(l);if(h)return clearTimeout(a),a=setTimeout(b,e),d(l)}return a===void 0&&(a=setTimeout(b,e)),s}return w.cancel=C,w.flush=S,w}var aX="Expected a function";function rS(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(aX);return jn(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),pl(t,e,{leading:r,maxWait:e,trailing:i})}var lX=function(e,n,r){var i=r.getBoundingClientRect(),o=i.width,s=i.height,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=a-(r.getBoundingClientRect().left+window.pageXOffset),c=l-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>o&&(u=o),c<0?c=0:c>s&&(c=s);var h=u/o,f=1-c/s;return{h:n.h,s:h,v:f,a:n.a,source:"hsv"}},uX=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function cX(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hX(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fX(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Qc=function(t){fX(e,t);function e(n){cX(this,e);var r=hX(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n));return r.handleChange=function(i){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,lX(i,r.props.hsl,r.container),i)},r.handleMouseDown=function(i){r.handleChange(i);var o=r.getContainerRenderWindow();o.addEventListener("mousemove",r.handleChange),o.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=rS(function(i,o,s){i(o,s)},50),r}return uX(e,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,i=window;!i.document.contains(r)&&i.parent!==i;)i=i.parent;return i}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,i=this.props.style||{},o=i.color,s=i.white,a=i.black,l=i.pointer,u=i.circle,c=Te({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
124
+ 0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:o,white:s,black:a,pointer:l,circle:u}},{custom:!!this.props.style});return v.createElement("div",{style:c.color,ref:function(f){return r.container=f},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},v.createElement("style",null,`
125
+ .saturation-white {
126
+ background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
127
+ background: linear-gradient(to right, #fff, rgba(255,255,255,0));
128
+ }
129
+ .saturation-black {
130
+ background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
131
+ background: linear-gradient(to top, #000, rgba(0,0,0,0));
132
+ }
133
+ `),v.createElement("div",{style:c.white,className:"saturation-white"},v.createElement("div",{style:c.black,className:"saturation-black"}),v.createElement("div",{style:c.pointer},this.props.pointer?v.createElement(this.props.pointer,this.props):v.createElement("div",{style:c.circle}))))}}]),e}(v.PureComponent||v.Component);function dX(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var pX=jC(Object.keys,Object);const gX=pX;var mX=Object.prototype,vX=mX.hasOwnProperty;function yX(t){if(!N0(t))return gX(t);var e=[];for(var n in Object(t))vX.call(t,n)&&n!="constructor"&&e.push(n);return e}function U0(t){return hs(t)?ZC(t):yX(t)}function bX(t,e){return t&&$C(t,e,U0)}function xX(t,e){return function(n,r){if(n==null)return n;if(!hs(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Object(n);(e?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}var wX=xX(bX);const iS=wX;function CX(t){return typeof t=="function"?t:Xc}function SX(t,e){var n=kn(t)?dX:iS;return n(t,CX(e))}function Jc(t){"@babel/helpers - typeof";return Jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jc(t)}var kX=/^\s+/,TX=/\s+$/;function ge(t,e){if(t=t||"",e=e||{},t instanceof ge)return t;if(!(this instanceof ge))return new ge(t,e);var n=EX(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}ge.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,r,i,o,s,a;return n=e.r/255,r=e.g/255,i=e.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*a},setAlpha:function(e){return this._a=cS(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=sS(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=sS(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=oS(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=oS(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return aS(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return PX(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(yt(this._r,255)*100)+"%",g:Math.round(yt(this._g,255)*100)+"%",b:Math.round(yt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(yt(this._r,255)*100)+"%, "+Math.round(yt(this._g,255)*100)+"%, "+Math.round(yt(this._b,255)*100)+"%)":"rgba("+Math.round(yt(this._r,255)*100)+"%, "+Math.round(yt(this._g,255)*100)+"%, "+Math.round(yt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:zX[aS(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+lS(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=ge(e);r="#"+lS(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(e){var n=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ge(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification($X,arguments)},brighten:function(){return this._applyModification(FX,arguments)},darken:function(){return this._applyModification(LX,arguments)},desaturate:function(){return this._applyModification(DX,arguments)},saturate:function(){return this._applyModification(_X,arguments)},greyscale:function(){return this._applyModification(IX,arguments)},spin:function(){return this._applyModification(RX,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(jX,arguments)},complement:function(){return this._applyCombination(BX,arguments)},monochromatic:function(){return this._applyCombination(VX,arguments)},splitcomplement:function(){return this._applyCombination(NX,arguments)},triad:function(){return this._applyCombination(uS,[3])},tetrad:function(){return this._applyCombination(uS,[4])}},ge.fromRatio=function(t,e){if(Jc(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=gl(t[r]));t=n}return ge(t,e)};function EX(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=UX(t)),Jc(t)=="object"&&(zr(t.r)&&zr(t.g)&&zr(t.b)?(e=MX(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):zr(t.h)&&zr(t.s)&&zr(t.v)?(r=gl(t.s),i=gl(t.v),e=AX(t.h,r,i),s=!0,a="hsv"):zr(t.h)&&zr(t.s)&&zr(t.l)&&(r=gl(t.s),o=gl(t.l),e=OX(t.h,r,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=cS(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function MX(t,e,n){return{r:yt(t,255)*255,g:yt(e,255)*255,b:yt(n,255)*255}}function oS(t,e,n){t=yt(t,255),e=yt(e,255),n=yt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=(r+i)/2;if(r==i)o=s=0;else{var l=r-i;switch(s=a>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,l:a}}function OX(t,e,n){var r,i,o;t=yt(t,360),e=yt(e,100),n=yt(n,100);function s(u,c,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?u+(c-u)*6*h:h<1/2?c:h<2/3?u+(c-u)*(2/3-h)*6:u}if(e===0)r=i=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=s(l,a,t+1/3),i=s(l,a,t),o=s(l,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function sS(t,e,n){t=yt(t,255),e=yt(e,255),n=yt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=r,l=r-i;if(s=r===0?0:l/r,r==i)o=0;else{switch(r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,v:a}}function AX(t,e,n){t=yt(t,360)*6,e=yt(e,100),n=yt(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6,u=[n,s,o,o,a,n][l],c=[a,n,n,s,o,o][l],h=[o,o,a,n,n,s][l];return{r:u*255,g:c*255,b:h*255}}function aS(t,e,n,r){var i=[Jn(Math.round(t).toString(16)),Jn(Math.round(e).toString(16)),Jn(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function PX(t,e,n,r,i){var o=[Jn(Math.round(t).toString(16)),Jn(Math.round(e).toString(16)),Jn(Math.round(n).toString(16)),Jn(hS(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function lS(t,e,n,r){var i=[Jn(hS(r)),Jn(Math.round(t).toString(16)),Jn(Math.round(e).toString(16)),Jn(Math.round(n).toString(16))];return i.join("")}ge.equals=function(t,e){return!t||!e?!1:ge(t).toRgbString()==ge(e).toRgbString()},ge.random=function(){return ge.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function DX(t,e){e=e===0?0:e||10;var n=ge(t).toHsl();return n.s-=e/100,n.s=eh(n.s),ge(n)}function _X(t,e){e=e===0?0:e||10;var n=ge(t).toHsl();return n.s+=e/100,n.s=eh(n.s),ge(n)}function IX(t){return ge(t).desaturate(100)}function $X(t,e){e=e===0?0:e||10;var n=ge(t).toHsl();return n.l+=e/100,n.l=eh(n.l),ge(n)}function FX(t,e){e=e===0?0:e||10;var n=ge(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),ge(n)}function LX(t,e){e=e===0?0:e||10;var n=ge(t).toHsl();return n.l-=e/100,n.l=eh(n.l),ge(n)}function RX(t,e){var n=ge(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,ge(n)}function BX(t){var e=ge(t).toHsl();return e.h=(e.h+180)%360,ge(e)}function uS(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=ge(t).toHsl(),r=[ge(t)],i=360/e,o=1;o<e;o++)r.push(ge({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function NX(t){var e=ge(t).toHsl(),n=e.h;return[ge(t),ge({h:(n+72)%360,s:e.s,l:e.l}),ge({h:(n+216)%360,s:e.s,l:e.l})]}function jX(t,e,n){e=e||6,n=n||30;var r=ge(t).toHsl(),i=360/n,o=[ge(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(ge(r));return o}function VX(t,e){e=e||6;for(var n=ge(t).toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/e;e--;)s.push(ge({h:r,s:i,v:o})),o=(o+a)%1;return s}ge.mix=function(t,e,n){n=n===0?0:n||50;var r=ge(t).toRgb(),i=ge(e).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return ge(s)},ge.readability=function(t,e){var n=ge(t),r=ge(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},ge.isReadable=function(t,e,n){var r=ge.readability(t,e),i,o;switch(o=!1,i=YX(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},ge.mostReadable=function(t,e,n){var r=null,i=0,o,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;u<e.length;u++)o=ge.readability(t,e[u]),o>i&&(i=o,r=ge(e[u]));return ge.isReadable(t,r,{level:a,size:l})||!s?r:(n.includeFallbackColors=!1,ge.mostReadable(t,["#fff","#000"],n))};var Y0=ge.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},zX=ge.hexNames=WX(Y0);function WX(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function cS(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function yt(t,e){HX(t)&&(t="100%");var n=qX(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function eh(t){return Math.min(1,Math.max(0,t))}function Tn(t){return parseInt(t,16)}function HX(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function qX(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Jn(t){return t.length==1?"0"+t:""+t}function gl(t){return t<=1&&(t=t*100+"%"),t}function hS(t){return Math.round(parseFloat(t)*255).toString(16)}function fS(t){return Tn(t)/255}var er=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function zr(t){return!!er.CSS_UNIT.exec(t)}function UX(t){t=t.replace(kX,"").replace(TX,"").toLowerCase();var e=!1;if(Y0[t])t=Y0[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=er.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=er.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=er.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=er.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=er.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=er.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=er.hex8.exec(t))?{r:Tn(n[1]),g:Tn(n[2]),b:Tn(n[3]),a:fS(n[4]),format:e?"name":"hex8"}:(n=er.hex6.exec(t))?{r:Tn(n[1]),g:Tn(n[2]),b:Tn(n[3]),format:e?"name":"hex"}:(n=er.hex4.exec(t))?{r:Tn(n[1]+""+n[1]),g:Tn(n[2]+""+n[2]),b:Tn(n[3]+""+n[3]),a:fS(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=er.hex3.exec(t))?{r:Tn(n[1]+""+n[1]),g:Tn(n[2]+""+n[2]),b:Tn(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function YX(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var dS=function(e){var n=["r","g","b","a","h","s","l","v"],r=0,i=0;return SX(n,function(o){if(e[o]&&(r+=1,isNaN(e[o])||(i+=1),o==="s"||o==="l")){var s=/^\d+%$/;s.test(e[o])&&(i+=1)}}),r===i?e:!1},ml=function(e,n){var r=e.hex?ge(e.hex):ge(e),i=r.toHsl(),o=r.toHsv(),s=r.toRgb(),a=r.toHex();i.s===0&&(i.h=n||0,o.h=n||0);var l=a==="000000"&&s.a===0;return{hsl:i,hex:l?"transparent":"#"+a,rgb:s,hsv:o,oldHue:e.h||n||i.h,source:e.source}},hi=function(e){if(e==="transparent")return!0;var n=String(e).charAt(0)==="#"?1:0;return e.length!==4+n&&e.length<7+n&&ge(e).isValid()},G0=function(e){if(!e)return"#fff";var n=ml(e);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},K0=function(e,n){var r=e.replace("°","");return ge(n+" ("+r+")")._ok},vl=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},GX=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function KX(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XX(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ZX(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var gn=function(e){var n=function(r){ZX(i,r);function i(o){KX(this,i);var s=XX(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return s.handleChange=function(a,l){var u=dS(a);if(u){var c=ml(a,a.h||s.state.oldHue);s.setState(c),s.props.onChangeComplete&&s.debounce(s.props.onChangeComplete,c,l),s.props.onChange&&s.props.onChange(c,l)}},s.handleSwatchHover=function(a,l){var u=dS(a);if(u){var c=ml(a,a.h||s.state.oldHue);s.props.onSwatchHover&&s.props.onSwatchHover(c,l)}},s.state=vl({},ml(o.color,0)),s.debounce=pl(function(a,l,u){a(l,u)},100),s}return GX(i,[{key:"render",value:function(){var s={};return this.props.onSwatchHover&&(s.onSwatchHover=this.handleSwatchHover),v.createElement(e,vl({},this.props,this.state,{onChange:this.handleChange},s))}}],[{key:"getDerivedStateFromProps",value:function(s,a){return vl({},ml(s.color,a.oldHue))}}]),i}(v.PureComponent||v.Component);return n.propTypes=vl({},e.propTypes),n.defaultProps=vl({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},QX=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},JX=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function eZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pS(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function tZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var nZ=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){tZ(i,r);function i(){var o,s,a,l;eZ(this,i);for(var u=arguments.length,c=Array(u),h=0;h<u;h++)c[h]=arguments[h];return l=(s=(a=pS(this,(o=i.__proto__||Object.getPrototypeOf(i)).call.apply(o,[this].concat(c))),a),a.state={focus:!1},a.handleFocus=function(){return a.setState({focus:!0})},a.handleBlur=function(){return a.setState({focus:!1})},s),pS(a,l)}return JX(i,[{key:"render",value:function(){return v.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},v.createElement(e,QX({},this.props,this.state)))}}]),i}(v.Component)},gS=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},rZ=13,iZ=function(e){var n=e.color,r=e.style,i=e.onClick,o=i===void 0?function(){}:i,s=e.onHover,a=e.title,l=a===void 0?n:a,u=e.children,c=e.focus,h=e.focusStyle,f=h===void 0?{}:h,d=n==="transparent",p=Te({default:{swatch:gS({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,c?f:{})}}),g=function(S){return o(n,S)},m=function(S){return S.keyCode===rZ&&o(n,S)},b=function(S){return s(n,S)},x={};return s&&(x.onMouseOver=b),v.createElement("div",gS({style:p.swatch,onClick:g,title:l,tabIndex:0,onKeyDown:m},x),u,d&&v.createElement(us,{borderRadius:p.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const so=nZ(iZ);var oZ=function(e){var n=e.direction,r=Te({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return v.createElement("div",{style:r.picker})},sZ=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},mS=function(e){var n=e.rgb,r=e.hsl,i=e.width,o=e.height,s=e.onChange,a=e.direction,l=e.style,u=e.renderers,c=e.pointer,h=e.className,f=h===void 0?"":h,d=Te({default:{picker:{position:"relative",width:i,height:o},alpha:{radius:"2px",style:l}}});return v.createElement("div",{style:d.picker,className:"alpha-picker "+f},v.createElement($0,sZ({},d.alpha,{rgb:n,hsl:r,pointer:c,renderers:u,onChange:s,direction:a})))};mS.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:oZ},gn(mS);function vS(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var aZ="__lodash_hash_undefined__";function lZ(t){return this.__data__.set(t,aZ),this}function uZ(t){return this.__data__.has(t)}function th(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Vr;++e<n;)this.add(t[e])}th.prototype.add=th.prototype.push=lZ,th.prototype.has=uZ;function cZ(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function hZ(t,e){return t.has(e)}var fZ=1,dZ=2;function yS(t,e,n,r,i,o){var s=n&fZ,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,f=!0,d=n&dZ?new th:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var p=t[h],g=e[h];if(r)var m=s?r(g,p,h,e,t,o):r(p,g,h,t,e,o);if(m!==void 0){if(m)continue;f=!1;break}if(d){if(!cZ(e,function(b,x){if(!hZ(d,x)&&(p===b||i(p,b,n,r,o)))return d.push(x)})){f=!1;break}}else if(!(p===g||i(p,g,n,r,o))){f=!1;break}}return o.delete(t),o.delete(e),f}function pZ(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function gZ(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var mZ=1,vZ=2,yZ="[object Boolean]",bZ="[object Date]",xZ="[object Error]",wZ="[object Map]",CZ="[object Number]",SZ="[object RegExp]",kZ="[object Set]",TZ="[object String]",EZ="[object Symbol]",MZ="[object ArrayBuffer]",OZ="[object DataView]",bS=ui?ui.prototype:void 0,X0=bS?bS.valueOf:void 0;function AZ(t,e,n,r,i,o,s){switch(n){case OZ:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case MZ:return!(t.byteLength!=e.byteLength||!o(new Yc(t),new Yc(e)));case yZ:case bZ:case CZ:return ll(+t,+e);case xZ:return t.name==e.name&&t.message==e.message;case SZ:case TZ:return t==e+"";case wZ:var a=pZ;case kZ:var l=r&mZ;if(a||(a=gZ),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;r|=vZ,s.set(t,e);var c=yS(a(t),a(e),r,i,o,s);return s.delete(t),c;case EZ:if(X0)return X0.call(t)==X0.call(e)}return!1}function PZ(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function DZ(t,e,n){var r=e(t);return kn(t)?r:PZ(r,n(t))}function _Z(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function IZ(){return[]}var $Z=Object.prototype,FZ=$Z.propertyIsEnumerable,xS=Object.getOwnPropertySymbols,LZ=xS?function(t){return t==null?[]:(t=Object(t),_Z(xS(t),function(e){return FZ.call(t,e)}))}:IZ;const RZ=LZ;function wS(t){return DZ(t,U0,RZ)}var BZ=1,NZ=Object.prototype,jZ=NZ.hasOwnProperty;function VZ(t,e,n,r,i,o){var s=n&BZ,a=wS(t),l=a.length,u=wS(e),c=u.length;if(l!=c&&!s)return!1;for(var h=l;h--;){var f=a[h];if(!(s?f in e:jZ.call(e,f)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var g=!0;o.set(t,e),o.set(e,t);for(var m=s;++h<l;){f=a[h];var b=t[f],x=e[f];if(r)var C=s?r(x,b,f,e,t,o):r(b,x,f,t,e,o);if(!(C===void 0?b===x||i(b,x,n,r,o):C)){g=!1;break}m||(m=f=="constructor")}if(g&&!m){var S=t.constructor,w=e.constructor;S!=w&&"constructor"in t&&"constructor"in e&&!(typeof S=="function"&&S instanceof S&&typeof w=="function"&&w instanceof w)&&(g=!1)}return o.delete(t),o.delete(e),g}var zZ=io(Qn,"DataView");const Z0=zZ;var WZ=io(Qn,"Promise");const Q0=WZ;var HZ=io(Qn,"Set");const J0=HZ;var qZ=io(Qn,"WeakMap");const eg=qZ;var CS="[object Map]",UZ="[object Object]",SS="[object Promise]",kS="[object Set]",TS="[object WeakMap]",ES="[object DataView]",YZ=ro(Z0),GZ=ro(cl),KZ=ro(Q0),XZ=ro(J0),ZZ=ro(eg),ao=no;(Z0&&ao(new Z0(new ArrayBuffer(1)))!=ES||cl&&ao(new cl)!=CS||Q0&&ao(Q0.resolve())!=SS||J0&&ao(new J0)!=kS||eg&&ao(new eg)!=TS)&&(ao=function(t){var e=no(t),n=e==UZ?t.constructor:void 0,r=n?ro(n):"";if(r)switch(r){case YZ:return ES;case GZ:return CS;case KZ:return SS;case XZ:return kS;case ZZ:return TS}return e});const MS=ao;var QZ=1,OS="[object Arguments]",AS="[object Array]",nh="[object Object]",JZ=Object.prototype,PS=JZ.hasOwnProperty;function eQ(t,e,n,r,i,o){var s=kn(t),a=kn(e),l=s?AS:MS(t),u=a?AS:MS(e);l=l==OS?nh:l,u=u==OS?nh:u;var c=l==nh,h=u==nh,f=l==u;if(f&&Kc(t)){if(!Kc(e))return!1;s=!0,c=!1}if(f&&!c)return o||(o=new hr),s||z0(t)?yS(t,e,n,r,i,o):AZ(t,e,l,n,r,i,o);if(!(n&QZ)){var d=c&&PS.call(t,"__wrapped__"),p=h&&PS.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,m=p?e.value():e;return o||(o=new hr),i(g,m,n,r,o)}}return f?(o||(o=new hr),VZ(t,e,n,r,i,o)):!1}function tg(t,e,n,r,i){return t===e?!0:t==null||e==null||!ci(t)&&!ci(e)?t!==t&&e!==e:eQ(t,e,n,r,tg,i)}var tQ=1,nQ=2;function rQ(t,e,n,r){var i=n.length,o=i,s=!r;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];var l=a[0],u=t[l],c=a[1];if(s&&a[2]){if(u===void 0&&!(l in t))return!1}else{var h=new hr;if(r)var f=r(u,c,l,t,e,h);if(!(f===void 0?tg(c,u,tQ|nQ,r,h):f))return!1}}return!0}function DS(t){return t===t&&!jn(t)}function iQ(t){for(var e=U0(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,DS(i)]}return e}function _S(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function oQ(t){var e=iQ(t);return e.length==1&&e[0][2]?_S(e[0][0],e[0][1]):function(n){return n===t||rQ(n,t,e)}}var sQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aQ=/^\w*$/;function ng(t,e){if(kn(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Zc(t)?!0:aQ.test(t)||!sQ.test(t)||e!=null&&t in Object(e)}var lQ="Expected a function";function rg(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(lQ);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(rg.Cache||Vr),n}rg.Cache=Vr;var uQ=500;function cQ(t){var e=rg(t,function(r){return n.size===uQ&&n.clear(),r}),n=e.cache;return e}var hQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fQ=/\\(\\)?/g,dQ=cQ(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(hQ,function(n,r,i,o){e.push(i?o.replace(fQ,"$1"):r||n)}),e});const pQ=dQ;var gQ=1/0,IS=ui?ui.prototype:void 0,$S=IS?IS.toString:void 0;function FS(t){if(typeof t=="string")return t;if(kn(t))return vS(t,FS)+"";if(Zc(t))return $S?$S.call(t):"";var e=t+"";return e=="0"&&1/t==-gQ?"-0":e}function mQ(t){return t==null?"":FS(t)}function LS(t,e){return kn(t)?t:ng(t,e)?[t]:pQ(mQ(t))}var vQ=1/0;function rh(t){if(typeof t=="string"||Zc(t))return t;var e=t+"";return e=="0"&&1/t==-vQ?"-0":e}function RS(t,e){e=LS(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[rh(e[n++])];return n&&n==r?t:void 0}function yQ(t,e,n){var r=t==null?void 0:RS(t,e);return r===void 0?n:r}function bQ(t,e){return t!=null&&e in Object(t)}function xQ(t,e,n){e=LS(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var s=rh(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:(i=t==null?0:t.length,!!i&&j0(i)&&H0(s,i)&&(kn(t)||Gc(t)))}function wQ(t,e){return t!=null&&xQ(t,e,bQ)}var CQ=1,SQ=2;function kQ(t,e){return ng(t)&&DS(e)?_S(rh(t),e):function(n){var r=yQ(n,t);return r===void 0&&r===e?wQ(n,t):tg(e,r,CQ|SQ)}}function TQ(t){return function(e){return e==null?void 0:e[t]}}function EQ(t){return function(e){return RS(e,t)}}function MQ(t){return ng(t)?TQ(rh(t)):EQ(t)}function OQ(t){return typeof t=="function"?t:t==null?Xc:typeof t=="object"?kn(t)?kQ(t[0],t[1]):oQ(t):MQ(t)}function AQ(t,e){var n=-1,r=hs(t)?Array(t.length):[];return iS(t,function(i,o,s){r[++n]=e(i,o,s)}),r}function lo(t,e){var n=kn(t)?vS:AQ;return n(t,OQ(e))}var PQ=function(e){var n=e.colors,r=e.onClick,i=e.onSwatchHover,o=Te({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return v.createElement("div",{style:o.swatches},lo(n,function(s){return v.createElement(so,{key:s,color:s,style:o.swatch,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+s}})}),v.createElement("div",{style:o.clear}))},ig=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.hex,o=e.colors,s=e.width,a=e.triangle,l=e.styles,u=l===void 0?{}:l,c=e.className,h=c===void 0?"":c,f=i==="transparent",d=function(m,b){hi(m)&&n({hex:m,source:"hex"},b)},p=Te(pn({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:i,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:G0(i),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+i+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},u),{"hide-triangle":a==="hide"});return v.createElement("div",{style:p.card,className:"block-picker "+h},v.createElement("div",{style:p.triangle}),v.createElement("div",{style:p.head},f&&v.createElement(us,{borderRadius:"6px 6px 0 0"}),v.createElement("div",{style:p.label},i)),v.createElement("div",{style:p.body},v.createElement(PQ,{colors:o,onClick:d,onSwatchHover:r}),v.createElement(Re,{style:{input:p.input},value:i,onChange:d})))};ig.propTypes={width:A.oneOfType([A.string,A.number]),colors:A.arrayOf(A.string),triangle:A.oneOf(["top","hide"]),styles:A.object},ig.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}},gn(ig);var fs={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"},ds={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},ps={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"},gs={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},ms={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},vs={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"},ys={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"},bs={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},xs={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},yl={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"},ws={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},Cs={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Ss={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},ks={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Ts={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"},Es={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ms={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Os={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},BS=function(e){var n=e.color,r=e.onClick,i=e.onSwatchHover,o=e.hover,s=e.active,a=e.circleSize,l=e.circleSpacing,u=Te({default:{swatch:{width:a,height:a,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(a/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:o,active:s});return v.createElement("div",{style:u.swatch},v.createElement(so,{style:u.Swatch,color:n,onClick:r,onHover:i,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+n}}))};BS.defaultProps={circleSize:28,circleSpacing:14};const DQ=_0(BS);var og=function(e){var n=e.width,r=e.onChange,i=e.onSwatchHover,o=e.colors,s=e.hex,a=e.circleSize,l=e.styles,u=l===void 0?{}:l,c=e.circleSpacing,h=e.className,f=h===void 0?"":h,d=Te(pn({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-c,marginBottom:-c}}},u)),p=function(m,b){return r({hex:m,source:"hex"},b)};return v.createElement("div",{style:d.card,className:"circle-picker "+f},lo(o,function(g){return v.createElement(DQ,{key:g,color:g,onClick:p,onSwatchHover:i,active:s===g.toLowerCase(),circleSize:a,circleSpacing:c})}))};og.propTypes={width:A.oneOfType([A.string,A.number]),circleSize:A.number,circleSpacing:A.number,styles:A.object},og.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[fs[500],ds[500],ps[500],gs[500],ms[500],vs[500],ys[500],bs[500],xs[500],yl[500],ws[500],Cs[500],Ss[500],ks[500],Ts[500],Es[500],Ms[500],Os[500]],styles:{}},gn(og);function NS(t){return t===void 0}var jS={};Object.defineProperty(jS,"__esModule",{value:!0});var VS=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},_Q=v,zS=IQ(_Q);function IQ(t){return t&&t.__esModule?t:{default:t}}function $Q(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var ih=24,FQ=jS.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,r=t.width,i=r===void 0?ih:r,o=t.height,s=o===void 0?ih:o,a=t.style,l=a===void 0?{}:a,u=$Q(t,["fill","width","height","style"]);return zS.default.createElement("svg",VS({viewBox:"0 0 "+ih+" "+ih,style:VS({fill:n,width:i,height:s},l)},u),zS.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},LQ=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function RQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BQ(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function NQ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var WS=function(t){NQ(e,t);function e(n){RQ(this,e);var r=BQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(i,o){i.hex?hi(i.hex)&&r.props.onChange({hex:i.hex,source:"hex"},o):i.r||i.g||i.b?r.props.onChange({r:i.r||r.props.rgb.r,g:i.g||r.props.rgb.g,b:i.b||r.props.rgb.b,source:"rgb"},o):i.a?(i.a<0?i.a=0:i.a>1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},o)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number(NS(i.s)?r.props.hsl.s:i.s),l:Number(NS(i.l)?r.props.hsl.l:i.l),source:"hsl"},o))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return LQ(e,[{key:"render",value:function(){var r=this,i=Te({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=v.createElement("div",{style:i.fields,className:"flexbox-fix"},v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=v.createElement("div",{style:i.fields,className:"flexbox-fix"},v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),v.createElement("div",{style:i.alpha},v.createElement(Re,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=v.createElement("div",{style:i.fields,className:"flexbox-fix"},v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),v.createElement("div",{style:i.field},v.createElement(Re,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),v.createElement("div",{style:i.alpha},v.createElement(Re,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),v.createElement("div",{style:i.wrap,className:"flexbox-fix"},o,v.createElement("div",{style:i.toggle},v.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(a){return r.icon=a}},v.createElement(FQ,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),e}(v.Component);WS.defaultProps={view:"hex"};var HS=function(){var e=Te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return v.createElement("div",{style:e.picker})},jQ=function(){var e=Te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return v.createElement("div",{style:e.picker})},sg=function(e){var n=e.width,r=e.onChange,i=e.disableAlpha,o=e.rgb,s=e.hsl,a=e.hsv,l=e.hex,u=e.renderers,c=e.styles,h=c===void 0?{}:c,f=e.className,d=f===void 0?"":f,p=e.defaultView,g=Te(pn({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},h),{disableAlpha:i});return v.createElement("div",{style:g.picker,className:"chrome-picker "+d},v.createElement("div",{style:g.saturation},v.createElement(Qc,{style:g.Saturation,hsl:s,hsv:a,pointer:jQ,onChange:r})),v.createElement("div",{style:g.body},v.createElement("div",{style:g.controls,className:"flexbox-fix"},v.createElement("div",{style:g.color},v.createElement("div",{style:g.swatch},v.createElement("div",{style:g.active}),v.createElement(us,{renderers:u}))),v.createElement("div",{style:g.toggles},v.createElement("div",{style:g.hue},v.createElement(cs,{style:g.Hue,hsl:s,pointer:HS,onChange:r})),v.createElement("div",{style:g.alpha},v.createElement($0,{style:g.Alpha,rgb:o,hsl:s,pointer:HS,renderers:u,onChange:r})))),v.createElement(WS,{rgb:o,hsl:s,hex:l,view:p,onChange:r,disableAlpha:i})))};sg.propTypes={width:A.oneOfType([A.string,A.number]),disableAlpha:A.bool,styles:A.object,defaultView:A.oneOf(["hex","rgb","hsl"])},sg.defaultProps={width:225,disableAlpha:!1,styles:{}};const VQ=gn(sg);var zQ=function(e){var n=e.color,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,s=e.active,a=Te({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:G0(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return v.createElement(so,{style:a.color,color:n,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},v.createElement("div",{style:a.dot}))},WQ=function(e){var n=e.hex,r=e.rgb,i=e.onChange,o=Te({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(l,u){l.r||l.g||l.b?i({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},u):i({hex:l.hex,source:"hex"},u)};return v.createElement("div",{style:o.fields,className:"flexbox-fix"},v.createElement("div",{style:o.active}),v.createElement(Re,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:n,onChange:s}),v.createElement(Re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:s}),v.createElement(Re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:s}),v.createElement(Re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:s}))},ag=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.colors,o=e.hex,s=e.rgb,a=e.styles,l=a===void 0?{}:a,u=e.className,c=u===void 0?"":u,h=Te(pn({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),f=function(p,g){p.hex?hi(p.hex)&&n({hex:p.hex,source:"hex"},g):n(p,g)};return v.createElement(dl,{style:h.Compact,styles:l},v.createElement("div",{style:h.compact,className:"compact-picker "+c},v.createElement("div",null,lo(i,function(d){return v.createElement(zQ,{key:d,color:d,active:d.toLowerCase()===o,onClick:f,onSwatchHover:r})}),v.createElement("div",{style:h.clear})),v.createElement(WQ,{hex:o,rgb:s,onChange:f})))};ag.propTypes={colors:A.arrayOf(A.string),styles:A.object},ag.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},gn(ag);var HQ=function(e){var n=e.hover,r=e.color,i=e.onClick,o=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=Te({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:n});return v.createElement("div",{style:a.swatch},v.createElement(so,{color:r,onClick:i,onHover:o,focusStyle:s}))};const qQ=_0(HQ);var lg=function(e){var n=e.width,r=e.colors,i=e.onChange,o=e.onSwatchHover,s=e.triangle,a=e.styles,l=a===void 0?{}:a,u=e.className,c=u===void 0?"":u,h=Te(pn({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right","bottom-left-triangle":s==="bottom-left","bottom-right-triangle":s==="bottom-right"}),f=function(p,g){return i({hex:p,source:"hex"},g)};return v.createElement("div",{style:h.card,className:"github-picker "+c},v.createElement("div",{style:h.triangleShadow}),v.createElement("div",{style:h.triangle}),lo(r,function(d){return v.createElement(qQ,{color:d,key:d,onClick:f,onSwatchHover:o})}))};lg.propTypes={width:A.oneOfType([A.string,A.number]),colors:A.arrayOf(A.string),triangle:A.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:A.object},lg.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},gn(lg);var UQ=function(e){var n=e.direction,r=Te({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return v.createElement("div",{style:r.picker})},YQ=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},ug=function(e){var n=e.width,r=e.height,i=e.onChange,o=e.hsl,s=e.direction,a=e.pointer,l=e.styles,u=l===void 0?{}:l,c=e.className,h=c===void 0?"":c,f=Te(pn({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},u)),d=function(g){return i({a:1,h:g.h,l:.5,s:1})};return v.createElement("div",{style:f.picker,className:"hue-picker "+h},v.createElement(cs,YQ({},f.hue,{hsl:o,pointer:a,onChange:d,direction:s})))};ug.propTypes={styles:A.object},ug.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:UQ,styles:{}},gn(ug);var GQ=function(e){var n=e.onChange,r=e.hex,i=e.rgb,o=e.styles,s=o===void 0?{}:o,a=e.className,l=a===void 0?"":a,u=Te(pn({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},s)),c=function(f,d){f.hex?hi(f.hex)&&n({hex:f.hex,source:"hex"},d):(f.r||f.g||f.b)&&n({r:f.r||i.r,g:f.g||i.g,b:f.b||i.b,source:"rgb"},d)};return v.createElement(dl,{styles:s},v.createElement("div",{style:u.material,className:"material-picker "+l},v.createElement(Re,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:r,onChange:c}),v.createElement("div",{style:u.split,className:"flexbox-fix"},v.createElement("div",{style:u.third},v.createElement(Re,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:i.r,onChange:c})),v.createElement("div",{style:u.third},v.createElement(Re,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:i.g,onChange:c})),v.createElement("div",{style:u.third},v.createElement(Re,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:i.b,onChange:c})))))};gn(GQ);var KQ=function(e){var n=e.onChange,r=e.rgb,i=e.hsv,o=e.hex,s=Te({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),a=function(u,c){u["#"]?hi(u["#"])&&n({hex:u["#"],source:"hex"},c):u.r||u.g||u.b?n({r:u.r||r.r,g:u.g||r.g,b:u.b||r.b,source:"rgb"},c):(u.h||u.s||u.v)&&n({h:u.h||i.h,s:u.s||i.s,v:u.v||i.v,source:"hsv"},c)};return v.createElement("div",{style:s.fields},v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(i.h),onChange:a}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(i.s*100),onChange:a}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(i.v*100),onChange:a}),v.createElement("div",{style:s.divider}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:r.r,onChange:a}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:r.g,onChange:a}),v.createElement(Re,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:r.b,onChange:a}),v.createElement("div",{style:s.divider}),v.createElement(Re,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:o.replace("#",""),onChange:a}),v.createElement("div",{style:s.fieldSymbols},v.createElement("div",{style:s.symbol},"°"),v.createElement("div",{style:s.symbol},"%"),v.createElement("div",{style:s.symbol},"%")))},XQ=function(e){var n=e.hsl,r=Te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return v.createElement("div",{style:r.picker})},ZQ=function(){var e=Te({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return v.createElement("div",{style:e.pointer},v.createElement("div",{style:e.left},v.createElement("div",{style:e.leftInside})),v.createElement("div",{style:e.right},v.createElement("div",{style:e.rightInside})))},qS=function(e){var n=e.onClick,r=e.label,i=e.children,o=e.active,s=Te({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return v.createElement("div",{style:s.button,onClick:n},r||i)},QQ=function(e){var n=e.rgb,r=e.currentColor,i=Te({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return v.createElement("div",null,v.createElement("div",{style:i.label},"new"),v.createElement("div",{style:i.swatches},v.createElement("div",{style:i.new}),v.createElement("div",{style:i.current})),v.createElement("div",{style:i.label},"current"))},JQ=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function eJ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tJ(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function nJ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var cg=function(t){nJ(e,t);function e(n){eJ(this,e);var r=tJ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.state={currentColor:n.hex},r}return JQ(e,[{key:"render",value:function(){var r=this.props,i=r.styles,o=i===void 0?{}:i,s=r.className,a=s===void 0?"":s,l=Te(pn({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},o));return v.createElement("div",{style:l.picker,className:"photoshop-picker "+a},v.createElement("div",{style:l.head},this.props.header),v.createElement("div",{style:l.body,className:"flexbox-fix"},v.createElement("div",{style:l.saturation},v.createElement(Qc,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:XQ,onChange:this.props.onChange})),v.createElement("div",{style:l.hue},v.createElement(cs,{direction:"vertical",hsl:this.props.hsl,pointer:ZQ,onChange:this.props.onChange})),v.createElement("div",{style:l.controls},v.createElement("div",{style:l.top,className:"flexbox-fix"},v.createElement("div",{style:l.previews},v.createElement(QQ,{rgb:this.props.rgb,currentColor:this.state.currentColor})),v.createElement("div",{style:l.actions},v.createElement(qS,{label:"OK",onClick:this.props.onAccept,active:!0}),v.createElement(qS,{label:"Cancel",onClick:this.props.onCancel}),v.createElement(KQ,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e}(v.Component);cg.propTypes={header:A.string,styles:A.object},cg.defaultProps={header:"Color Picker",styles:{}},gn(cg);var rJ=function(e){var n=e.onChange,r=e.rgb,i=e.hsl,o=e.hex,s=e.disableAlpha,a=Te({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:s}),l=function(c,h){c.hex?hi(c.hex)&&n({hex:c.hex,source:"hex"},h):c.r||c.g||c.b?n({r:c.r||r.r,g:c.g||r.g,b:c.b||r.b,a:r.a,source:"rgb"},h):c.a&&(c.a<0?c.a=0:c.a>100&&(c.a=100),c.a/=100,n({h:i.h,s:i.s,l:i.l,a:c.a,source:"rgb"},h))};return v.createElement("div",{style:a.fields,className:"flexbox-fix"},v.createElement("div",{style:a.double},v.createElement(Re,{style:{input:a.input,label:a.label},label:"hex",value:o.replace("#",""),onChange:l})),v.createElement("div",{style:a.single},v.createElement(Re,{style:{input:a.input,label:a.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),v.createElement("div",{style:a.single},v.createElement(Re,{style:{input:a.input,label:a.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),v.createElement("div",{style:a.single},v.createElement(Re,{style:{input:a.input,label:a.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),v.createElement("div",{style:a.alpha},v.createElement(Re,{style:{input:a.input,label:a.label},label:"a",value:Math.round(r.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},iJ=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},US=function(e){var n=e.colors,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,s=Te({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),a=function(u,c){i({hex:u,source:"hex"},c)};return v.createElement("div",{style:s.colors,className:"flexbox-fix"},n.map(function(l){var u=typeof l=="string"?{color:l}:l,c=""+u.color+(u.title||"");return v.createElement("div",{key:c,style:s.swatchWrap},v.createElement(so,iJ({},u,{style:s.swatch,onClick:a,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+u.color}})))}))};US.propTypes={colors:A.arrayOf(A.oneOfType([A.string,A.shape({color:A.string,title:A.string})])).isRequired};var oJ=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},hg=function(e){var n=e.width,r=e.rgb,i=e.hex,o=e.hsv,s=e.hsl,a=e.onChange,l=e.onSwatchHover,u=e.disableAlpha,c=e.presetColors,h=e.renderers,f=e.styles,d=f===void 0?{}:f,p=e.className,g=p===void 0?"":p,m=Te(pn({default:oJ({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},d),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},d),{disableAlpha:u});return v.createElement("div",{style:m.picker,className:"sketch-picker "+g},v.createElement("div",{style:m.saturation},v.createElement(Qc,{style:m.Saturation,hsl:s,hsv:o,onChange:a})),v.createElement("div",{style:m.controls,className:"flexbox-fix"},v.createElement("div",{style:m.sliders},v.createElement("div",{style:m.hue},v.createElement(cs,{style:m.Hue,hsl:s,onChange:a})),v.createElement("div",{style:m.alpha},v.createElement($0,{style:m.Alpha,rgb:r,hsl:s,renderers:h,onChange:a}))),v.createElement("div",{style:m.color},v.createElement(us,null),v.createElement("div",{style:m.activeColor}))),v.createElement(rJ,{rgb:r,hsl:s,hex:i,onChange:a,disableAlpha:u}),v.createElement(US,{colors:c,onClick:a,onSwatchHover:l}))};hg.propTypes={disableAlpha:A.bool,width:A.oneOfType([A.string,A.number]),styles:A.object},hg.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},gn(hg);var bl=function(e){var n=e.hsl,r=e.offset,i=e.onClick,o=i===void 0?function(){}:i,s=e.active,a=e.first,l=e.last,u=Te({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:a,last:l}),c=function(f){return o({h:n.h,s:.5,l:r,source:"hsl"},f)};return v.createElement("div",{style:u.swatch,onClick:c})},sJ=function(e){var n=e.onClick,r=e.hsl,i=Te({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),o=.1;return v.createElement("div",{style:i.swatches},v.createElement("div",{style:i.swatch},v.createElement(bl,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<o&&Math.abs(r.s-.5)<o,onClick:n,first:!0})),v.createElement("div",{style:i.swatch},v.createElement(bl,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<o&&Math.abs(r.s-.5)<o,onClick:n})),v.createElement("div",{style:i.swatch},v.createElement(bl,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<o&&Math.abs(r.s-.5)<o,onClick:n})),v.createElement("div",{style:i.swatch},v.createElement(bl,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<o&&Math.abs(r.s-.5)<o,onClick:n})),v.createElement("div",{style:i.swatch},v.createElement(bl,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<o&&Math.abs(r.s-.5)<o,onClick:n,last:!0})),v.createElement("div",{style:i.clear}))},aJ=function(){var e=Te({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return v.createElement("div",{style:e.picker})},fg=function(e){var n=e.hsl,r=e.onChange,i=e.pointer,o=e.styles,s=o===void 0?{}:o,a=e.className,l=a===void 0?"":a,u=Te(pn({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return v.createElement("div",{style:u.wrap||{},className:"slider-picker "+l},v.createElement("div",{style:u.hue},v.createElement(cs,{style:u.Hue,hsl:n,pointer:i,onChange:r})),v.createElement("div",{style:u.swatches},v.createElement(sJ,{hsl:n,onClick:r})))};fg.propTypes={styles:A.object},fg.defaultProps={pointer:aJ,styles:{}},gn(fg);var YS={};Object.defineProperty(YS,"__esModule",{value:!0});var GS=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},lJ=v,KS=uJ(lJ);function uJ(t){return t&&t.__esModule?t:{default:t}}function cJ(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var oh=24,hJ=YS.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,r=t.width,i=r===void 0?oh:r,o=t.height,s=o===void 0?oh:o,a=t.style,l=a===void 0?{}:a,u=cJ(t,["fill","width","height","style"]);return KS.default.createElement("svg",GS({viewBox:"0 0 "+oh+" "+oh,style:GS({fill:n,width:i,height:s},l)},u),KS.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},fJ=function(e){var n=e.color,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,s=e.first,a=e.last,l=e.active,u=Te({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:G0(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:s,last:a,active:l,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return v.createElement(so,{color:n,style:u.color,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},v.createElement("div",{style:u.check},v.createElement(hJ,null)))},dJ=function(e){var n=e.onClick,r=e.onSwatchHover,i=e.group,o=e.active,s=Te({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return v.createElement("div",{style:s.group},lo(i,function(a,l){return v.createElement(fJ,{key:a,color:a,active:a.toLowerCase()===o,first:l===0,last:l===i.length-1,onClick:n,onSwatchHover:r})}))},dg=function(e){var n=e.width,r=e.height,i=e.onChange,o=e.onSwatchHover,s=e.colors,a=e.hex,l=e.styles,u=l===void 0?{}:l,c=e.className,h=c===void 0?"":c,f=Te(pn({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),d=function(g,m){return i({hex:g,source:"hex"},m)};return v.createElement("div",{style:f.picker,className:"swatches-picker "+h},v.createElement(dl,null,v.createElement("div",{style:f.overflow},v.createElement("div",{style:f.body},lo(s,function(p){return v.createElement(dJ,{key:p.toString(),group:p,active:a,onClick:d,onSwatchHover:o})}),v.createElement("div",{style:f.clear})))))};dg.propTypes={width:A.oneOfType([A.string,A.number]),height:A.oneOfType([A.string,A.number]),colors:A.arrayOf(A.arrayOf(A.string)),styles:A.object},dg.defaultProps={width:320,height:240,colors:[[fs[900],fs[700],fs[500],fs[300],fs[100]],[ds[900],ds[700],ds[500],ds[300],ds[100]],[ps[900],ps[700],ps[500],ps[300],ps[100]],[gs[900],gs[700],gs[500],gs[300],gs[100]],[ms[900],ms[700],ms[500],ms[300],ms[100]],[vs[900],vs[700],vs[500],vs[300],vs[100]],[ys[900],ys[700],ys[500],ys[300],ys[100]],[bs[900],bs[700],bs[500],bs[300],bs[100]],[xs[900],xs[700],xs[500],xs[300],xs[100]],["#194D33",yl[700],yl[500],yl[300],yl[100]],[ws[900],ws[700],ws[500],ws[300],ws[100]],[Cs[900],Cs[700],Cs[500],Cs[300],Cs[100]],[Ss[900],Ss[700],Ss[500],Ss[300],Ss[100]],[ks[900],ks[700],ks[500],ks[300],ks[100]],[Ts[900],Ts[700],Ts[500],Ts[300],Ts[100]],[Es[900],Es[700],Es[500],Es[300],Es[100]],[Ms[900],Ms[700],Ms[500],Ms[300],Ms[100]],[Os[900],Os[700],Os[500],Os[300],Os[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},gn(dg);var pg=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.hex,o=e.colors,s=e.width,a=e.triangle,l=e.styles,u=l===void 0?{}:l,c=e.className,h=c===void 0?"":c,f=Te(pn({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right"}),d=function(g,m){hi(g)&&n({hex:g,source:"hex"},m)};return v.createElement("div",{style:f.card,className:"twitter-picker "+h},v.createElement("div",{style:f.triangleShadow}),v.createElement("div",{style:f.triangle}),v.createElement("div",{style:f.body},lo(o,function(p,g){return v.createElement(so,{key:g,color:p,hex:p,style:f.swatch,onClick:d,onHover:r,focusStyle:{boxShadow:"0 0 4px "+p}})}),v.createElement("div",{style:f.hash},"#"),v.createElement(Re,{label:null,style:{input:f.input},value:i.replace("#",""),onChange:d}),v.createElement("div",{style:f.clear})))};pg.propTypes={width:A.oneOfType([A.string,A.number]),triangle:A.oneOf(["hide","top-left","top-right"]),colors:A.arrayOf(A.string),styles:A.object},pg.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},gn(pg);var gg=function(e){var n=Te({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return v.createElement("div",{style:n.picker})};gg.propTypes={hsl:A.shape({h:A.number,s:A.number,l:A.number,a:A.number})},gg.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var mg=function(e){var n=Te({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return v.createElement("div",{style:n.picker})};mg.propTypes={hsl:A.shape({h:A.number,s:A.number,l:A.number,a:A.number})},mg.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var pJ=function(e){var n=e.onChange,r=e.rgb,i=e.hsl,o=e.hex,s=e.hsv,a=function(d,p){if(d.hex)hi(d.hex)&&n({hex:d.hex,source:"hex"},p);else if(d.rgb){var g=d.rgb.split(",");K0(d.rgb,"rgb")&&n({r:g[0],g:g[1],b:g[2],a:1,source:"rgb"},p)}else if(d.hsv){var m=d.hsv.split(",");K0(d.hsv,"hsv")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),m[1]==1?m[1]=.01:m[2]==1&&(m[2]=.01),n({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsv"},p))}else if(d.hsl){var b=d.hsl.split(",");K0(d.hsl,"hsl")&&(b[2]=b[2].replace("%",""),b[1]=b[1].replace("%",""),b[0]=b[0].replace("°",""),h[1]==1?h[1]=.01:h[2]==1&&(h[2]=.01),n({h:Number(b[0]),s:Number(b[1]),v:Number(b[2]),source:"hsl"},p))}},l=Te({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=r.r+", "+r.g+", "+r.b,c=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.l*100)+"%",h=Math.round(s.h)+"°, "+Math.round(s.s*100)+"%, "+Math.round(s.v*100)+"%";return v.createElement("div",{style:l.wrap,className:"flexbox-fix"},v.createElement("div",{style:l.fields},v.createElement("div",{style:l.double},v.createElement(Re,{style:{input:l.input,label:l.label},label:"hex",value:o,onChange:a})),v.createElement("div",{style:l.column},v.createElement("div",{style:l.single},v.createElement(Re,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:a})),v.createElement("div",{style:l.single},v.createElement(Re,{style:{input:l.input2,label:l.label2},label:"hsv",value:h,onChange:a})),v.createElement("div",{style:l.single},v.createElement(Re,{style:{input:l.input2,label:l.label2},label:"hsl",value:c,onChange:a})))))},vg=function(e){var n=e.width,r=e.onChange,i=e.rgb,o=e.hsl,s=e.hsv,a=e.hex,l=e.header,u=e.styles,c=u===void 0?{}:u,h=e.className,f=h===void 0?"":h,d=Te(pn({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+i.r+", "+i.g+", "+i.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return v.createElement("div",{style:d.picker,className:"google-picker "+f},v.createElement("div",{style:d.head},l),v.createElement("div",{style:d.swatch}),v.createElement("div",{style:d.saturation},v.createElement(Qc,{hsl:o,hsv:s,pointer:gg,onChange:r})),v.createElement("div",{style:d.body},v.createElement("div",{style:d.controls,className:"flexbox-fix"},v.createElement("div",{style:d.hue},v.createElement(cs,{style:d.Hue,hsl:o,radius:"4px",pointer:mg,onChange:r}))),v.createElement(pJ,{rgb:i,hsl:o,hex:a,hsv:s,onChange:r})))};vg.propTypes={width:A.oneOfType([A.string,A.number]),styles:A.object,header:A.string},vg.defaultProps={width:652,styles:{},header:"Color picker"},gn(vg);const XS=({value:t,onChangeColor:e,tabIndex:n,...r})=>{const i=t?"#"+t.replaceAll("#",""):"",[o,s]=v.useState(null),a=c=>{s(c.currentTarget)},l=()=>s(null),u=(c="")=>{(/^#[0-9a-fA-F]*$/.test(c)||c===""||c==="#")&&e("#"+c.replaceAll("#",""))};return y.jsxs(y.Fragment,{children:[y.jsx(M.TextField,{...r,value:i,onChange:c=>u(c.target.value),InputProps:{inputProps:{...r.inputProps,maxLength:7,tabIndex:n},startAdornment:y.jsx(M.InputAdornment,{position:"start",sx:{ml:2},children:y.jsx(M.IconButton,{edge:"start","aria-label":"Escolher cor",onClick:a,children:y.jsx(vt,{icon:"bi:square-fill",color:i,width:25,height:23})})})}}),y.jsx(M.Popover,{open:!!o,anchorEl:o,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"center",horizontal:"center"},slotProps:{paper:{style:{borderRadius:8}}},children:y.jsx(VQ,{color:i,onChange:c=>e(c.hex),styles:{default:{picker:{fontFamily:"inherit",boxShadow:"none"}}},disableAlpha:!0})})]})};function ze(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Wr(t){"@babel/helpers - typeof";return Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wr(t)}function G(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function K(t){G(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||Wr(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function yg(t,e){G(2,arguments);var n=K(t),r=ze(e);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function sh(t,e){G(2,arguments);var n=K(t).getTime(),r=ze(e);return new Date(n+r)}function gJ(t,e){G(2,arguments);var n=ze(e);return sh(t,n*1e3)}var mJ=6e4;function vJ(t,e){G(2,arguments);var n=ze(e);return sh(t,n*mJ)}var yJ=36e5;function bJ(t,e){G(2,arguments);var n=ze(e);return sh(t,n*yJ)}function xJ(t,e){G(2,arguments);var n=ze(e),r=n*7;return yg(t,r)}function ah(t,e){G(2,arguments);var n=K(t),r=ze(e);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function ZS(t,e){G(2,arguments);var n=ze(e);return ah(t,n*12)}function wJ(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getFullYear()-r.getFullYear()}function As(t,e){G(2,arguments);var n=K(t),r=K(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function CJ(t,e){G(2,arguments);var n=K(t),r=K(e),i=As(n,r),o=Math.abs(wJ(n,r));n.setFullYear(1584),r.setFullYear(1584);var s=As(n,r)===-i,a=i*(o-Number(s));return a===0?0:a}function SJ(t,e){G(2,arguments);var n=K(t),r=K(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function bg(t){G(1,arguments);var e=K(t);return e.setHours(23,59,59,999),e}function xg(t){G(1,arguments);var e=K(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function kJ(t){G(1,arguments);var e=K(t);return bg(e).getTime()===xg(e).getTime()}function wg(t,e){G(2,arguments);var n=K(t),r=K(e),i=As(n,r),o=Math.abs(SJ(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=As(n,r)===-i;kJ(K(t))&&o===1&&As(t,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}var QS={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},TJ="trunc";function xl(t){return t?QS[t]:QS[TJ]}function EJ(t,e,n){G(2,arguments);var r=wg(t,e)/3;return xl(n==null?void 0:n.roundingMethod)(r)}function Ps(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function Ds(t){G(1,arguments);var e=K(t);return e.setHours(0,0,0,0),e}var MJ=864e5;function OJ(t,e){G(2,arguments);var n=Ds(t),r=Ds(e),i=n.getTime()-Ps(n),o=r.getTime()-Ps(r);return Math.round((i-o)/MJ)}function JS(t,e){var n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function ek(t,e){G(2,arguments);var n=K(t),r=K(e),i=JS(n,r),o=Math.abs(OJ(n,r));n.setDate(n.getDate()-i*o);var s=+(JS(n,r)===-i),a=i*(o-s);return a===0?0:a}function AJ(t,e,n){G(2,arguments);var r=ek(t,e)/7;return xl(n==null?void 0:n.roundingMethod)(r)}var lh=6e4,uh=36e5,PJ=1e3;function ch(t,e){return G(2,arguments),K(t).getTime()-K(e).getTime()}function DJ(t,e,n){G(2,arguments);var r=ch(t,e)/uh;return xl(n==null?void 0:n.roundingMethod)(r)}function _J(t,e,n){G(2,arguments);var r=ch(t,e)/lh;return xl(n==null?void 0:n.roundingMethod)(r)}function tk(t,e,n){G(2,arguments);var r=ch(t,e)/1e3;return xl(n==null?void 0:n.roundingMethod)(r)}function IJ(t,e){var n;G(1,arguments);var r=t||{},i=K(r.start),o=K(r.end),s=o.getTime();if(!(i.getTime()<=s))throw new RangeError("Invalid interval");var a=[],l=i;l.setHours(0,0,0,0);var u=Number((n=e==null?void 0:e.step)!==null&&n!==void 0?n:1);if(u<1||isNaN(u))throw new RangeError("`options.step` must be a number greater than 1");for(;l.getTime()<=s;)a.push(K(l)),l.setDate(l.getDate()+u),l.setHours(0,0,0,0);return a}var $J={};function tr(){return $J}function Cg(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=tr(),h=ze((n=(r=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=K(t),d=f.getDay(),p=(d<h?-7:0)+6-(d-h);return f.setDate(f.getDate()+p),f.setHours(23,59,59,999),f}function Sg(t){G(1,arguments);var e=K(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function FJ(t){return G(1,arguments),t instanceof Date||Wr(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function kg(t){if(G(1,arguments),!FJ(t)&&typeof t!="number")return!1;var e=K(t);return!isNaN(Number(e))}function nk(t,e){G(2,arguments);var n=ze(e);return sh(t,-n)}var LJ=864e5;function RJ(t){G(1,arguments);var e=K(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/LJ)+1}function _s(t){G(1,arguments);var e=1,n=K(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function rk(t){G(1,arguments);var e=K(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=_s(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var s=_s(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=s.getTime()?n:n-1}function BJ(t){G(1,arguments);var e=rk(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=_s(n);return r}var NJ=6048e5;function ik(t){G(1,arguments);var e=K(t),n=_s(e).getTime()-BJ(e).getTime();return Math.round(n/NJ)+1}function uo(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=tr(),h=ze((n=(r=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=K(t),d=f.getUTCDay(),p=(d<h?7:0)+d-h;return f.setUTCDate(f.getUTCDate()-p),f.setUTCHours(0,0,0,0),f}function Tg(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=K(t),h=c.getUTCFullYear(),f=tr(),d=ze((n=(r=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(h+1,0,d),p.setUTCHours(0,0,0,0);var g=uo(p,e),m=new Date(0);m.setUTCFullYear(h,0,d),m.setUTCHours(0,0,0,0);var b=uo(m,e);return c.getTime()>=g.getTime()?h+1:c.getTime()>=b.getTime()?h:h-1}function jJ(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=tr(),h=ze((n=(r=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),f=Tg(t,e),d=new Date(0);d.setUTCFullYear(f,0,h),d.setUTCHours(0,0,0,0);var p=uo(d,e);return p}var VJ=6048e5;function ok(t,e){G(1,arguments);var n=K(t),r=uo(n,e).getTime()-jJ(n,e).getTime();return Math.round(r/VJ)+1}function Ie(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var zJ={y:function(e,n){var r=e.getUTCFullYear(),i=r>0?r:1-r;return Ie(n==="yy"?i%100:i,n.length)},M:function(e,n){var r=e.getUTCMonth();return n==="M"?String(r+1):Ie(r+1,2)},d:function(e,n){return Ie(e.getUTCDate(),n.length)},a:function(e,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,n){return Ie(e.getUTCHours()%12||12,n.length)},H:function(e,n){return Ie(e.getUTCHours(),n.length)},m:function(e,n){return Ie(e.getUTCMinutes(),n.length)},s:function(e,n){return Ie(e.getUTCSeconds(),n.length)},S:function(e,n){var r=n.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return Ie(o,n.length)}};const fi=zJ;var Is={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},WJ={G:function(e,n,r){var i=e.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(e,n,r){if(n==="yo"){var i=e.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return fi.y(e,n)},Y:function(e,n,r,i){var o=Tg(e,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return Ie(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):Ie(s,n.length)},R:function(e,n){var r=rk(e);return Ie(r,n.length)},u:function(e,n){var r=e.getUTCFullYear();return Ie(r,n.length)},Q:function(e,n,r){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return Ie(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,n,r){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return Ie(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,n,r){var i=e.getUTCMonth();switch(n){case"M":case"MM":return fi.M(e,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(e,n,r){var i=e.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return Ie(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(e,n,r,i){var o=ok(e,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):Ie(o,n.length)},I:function(e,n,r){var i=ik(e);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):Ie(i,n.length)},d:function(e,n,r){return n==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):fi.d(e,n)},D:function(e,n,r){var i=RJ(e);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):Ie(i,n.length)},E:function(e,n,r){var i=e.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(e,n,r,i){var o=e.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return Ie(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,n,r,i){var o=e.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return Ie(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,n,r){var i=e.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return Ie(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(e,n,r){var i=e.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,n,r){var i=e.getUTCHours(),o;switch(i===12?o=Is.noon:i===0?o=Is.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,n,r){var i=e.getUTCHours(),o;switch(i>=17?o=Is.evening:i>=12?o=Is.afternoon:i>=4?o=Is.morning:o=Is.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,n,r){if(n==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return fi.h(e,n)},H:function(e,n,r){return n==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):fi.H(e,n)},K:function(e,n,r){var i=e.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):Ie(i,n.length)},k:function(e,n,r){var i=e.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):Ie(i,n.length)},m:function(e,n,r){return n==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):fi.m(e,n)},s:function(e,n,r){return n==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):fi.s(e,n)},S:function(e,n){return fi.S(e,n)},X:function(e,n,r,i){var o=i._originalDate||e,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return ak(s);case"XXXX":case"XX":return co(s);case"XXXXX":case"XXX":default:return co(s,":")}},x:function(e,n,r,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(n){case"x":return ak(s);case"xxxx":case"xx":return co(s);case"xxxxx":case"xxx":default:return co(s,":")}},O:function(e,n,r,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+sk(s,":");case"OOOO":default:return"GMT"+co(s,":")}},z:function(e,n,r,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+sk(s,":");case"zzzz":default:return"GMT"+co(s,":")}},t:function(e,n,r,i){var o=i._originalDate||e,s=Math.floor(o.getTime()/1e3);return Ie(s,n.length)},T:function(e,n,r,i){var o=i._originalDate||e,s=o.getTime();return Ie(s,n.length)}};function sk(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=e||"";return n+String(i)+s+Ie(o,2)}function ak(t,e){if(t%60===0){var n=t>0?"-":"+";return n+Ie(Math.abs(t)/60,2)}return co(t,e)}function co(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t),o=Ie(Math.floor(i/60),2),s=Ie(i%60,2);return r+o+n+s}const HJ=WJ;var lk=function(e,n){switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},uk=function(e,n){switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},qJ=function(e,n){var r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return lk(e,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",lk(i,n)).replace("{{time}}",uk(o,n))},UJ={p:uk,P:qJ};const Eg=UJ;var YJ=["D","DD"],GJ=["YY","YYYY"];function ck(t){return YJ.indexOf(t)!==-1}function hk(t){return GJ.indexOf(t)!==-1}function hh(t,e,n){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var KJ={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},XJ=function(e,n,r){var i,o=KJ[e];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const ZJ=XJ;function $s(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var QJ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},JJ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eee={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tee={date:$s({formats:QJ,defaultWidth:"full"}),time:$s({formats:JJ,defaultWidth:"full"}),dateTime:$s({formats:eee,defaultWidth:"full"})};const nee=tee;var ree={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iee=function(e,n,r,i){return ree[e]};const oee=iee;function fr(t){return function(e,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var a=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;i=t.values[l]||t.values[a]}var u=t.argumentCallback?t.argumentCallback(e):e;return i[u]}}var see={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},aee={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lee={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uee={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},cee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},hee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fee=function(e,n){var r=Number(e),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},dee={ordinalNumber:fee,era:fr({values:see,defaultWidth:"wide"}),quarter:fr({values:aee,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:fr({values:lee,defaultWidth:"wide"}),day:fr({values:uee,defaultWidth:"wide"}),dayPeriod:fr({values:cee,defaultWidth:"wide",formattingValues:hee,defaultFormattingWidth:"wide"})};const pee=dee;function dr(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;var s=o[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?mee(a,function(h){return h.test(s)}):gee(a,function(h){return h.test(s)}),u;u=t.valueCallback?t.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;var c=e.slice(s.length);return{value:u,rest:c}}}function gee(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function mee(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}function fk(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var i=r[0],o=e.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=e.slice(i.length);return{value:s,rest:a}}}var vee=/^(\d+)(th|st|nd|rd)?/i,yee=/\d+/i,bee={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},xee={any:[/^b/i,/^(a|c)/i]},wee={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Cee={any:[/1/i,/2/i,/3/i,/4/i]},See={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},kee={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Tee={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Eee={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Mee={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Oee={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Aee={ordinalNumber:fk({matchPattern:vee,parsePattern:yee,valueCallback:function(e){return parseInt(e,10)}}),era:dr({matchPatterns:bee,defaultMatchWidth:"wide",parsePatterns:xee,defaultParseWidth:"any"}),quarter:dr({matchPatterns:wee,defaultMatchWidth:"wide",parsePatterns:Cee,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:dr({matchPatterns:See,defaultMatchWidth:"wide",parsePatterns:kee,defaultParseWidth:"any"}),day:dr({matchPatterns:Tee,defaultMatchWidth:"wide",parsePatterns:Eee,defaultParseWidth:"any"}),dayPeriod:dr({matchPatterns:Mee,defaultMatchWidth:"any",parsePatterns:Oee,defaultParseWidth:"any"})},Pee={code:"en-US",formatDistance:ZJ,formatLong:nee,formatRelative:oee,localize:pee,match:Aee,options:{weekStartsOn:0,firstWeekContainsDate:1}};const fh=Pee;var Dee=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_ee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Iee=/^'([^]*?)'?$/,$ee=/''/g,Fee=/[a-zA-Z]/;function Mg(t,e,n){var r,i,o,s,a,l,u,c,h,f,d,p,g,m,b,x,C,S;G(2,arguments);var w=String(e),k=tr(),T=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:fh,O=ze((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:k.firstWeekContainsDate)!==null&&s!==void 0?s:(h=k.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(O>=1&&O<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=ze((d=(p=(g=(m=n==null?void 0:n.weekStartsOn)!==null&&m!==void 0?m:n==null||(b=n.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&g!==void 0?g:k.weekStartsOn)!==null&&p!==void 0?p:(C=k.locale)===null||C===void 0||(S=C.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&d!==void 0?d:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var D=K(t);if(!kg(D))throw new RangeError("Invalid time value");var R=Ps(D),H=nk(D,R),W={firstWeekContainsDate:O,weekStartsOn:P,locale:T,_originalDate:D},B=w.match(_ee).map(function(j){var N=j[0];if(N==="p"||N==="P"){var V=Eg[N];return V(j,T.formatLong)}return j}).join("").match(Dee).map(function(j){if(j==="''")return"'";var N=j[0];if(N==="'")return Lee(j);var V=HJ[N];if(V)return!(n!=null&&n.useAdditionalWeekYearTokens)&&hk(j)&&hh(j,e,String(t)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&ck(j)&&hh(j,e,String(t)),V(H,j,T.localize,W);if(N.match(Fee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return j}).join("");return B}function Lee(t){var e=t.match(Iee);return e?e[1].replace($ee,"'"):t}function Ree(t){G(1,arguments);var e=K(t),n=e.getDate();return n}function dk(t){G(1,arguments);var e=K(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function Bee(t){G(1,arguments);var e=K(t),n=e.getHours();return n}function Nee(t){G(1,arguments);var e=K(t),n=e.getMinutes();return n}function jee(t){G(1,arguments);var e=K(t),n=e.getMonth();return n}function Vee(t){G(1,arguments);var e=K(t),n=e.getSeconds();return n}function zee(t){G(1,arguments);var e=K(t),n=e.getMilliseconds();return n}function ho(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=tr(),h=ze((n=(r=(i=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=K(t),d=f.getDay(),p=(d<h?7:0)+d-h;return f.setDate(f.getDate()-p),f.setHours(0,0,0,0),f}function Wee(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=K(t),h=c.getFullYear(),f=tr(),d=ze((n=(r=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(h+1,0,d),p.setHours(0,0,0,0);var g=ho(p,e),m=new Date(0);m.setFullYear(h,0,d),m.setHours(0,0,0,0);var b=ho(m,e);return c.getTime()>=g.getTime()?h+1:c.getTime()>=b.getTime()?h:h-1}function Hee(t,e){var n,r,i,o,s,a,l,u;G(1,arguments);var c=tr(),h=ze((n=(r=(i=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),f=Wee(t,e),d=new Date(0);d.setFullYear(f,0,h),d.setHours(0,0,0,0);var p=ho(d,e);return p}var qee=6048e5;function Uee(t,e){G(1,arguments);var n=K(t),r=ho(n,e).getTime()-Hee(n,e).getTime();return Math.round(r/qee)+1}function Yee(t){return G(1,arguments),K(t).getFullYear()}function Og(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getTime()>r.getTime()}function wl(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getTime()<r.getTime()}function Gee(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getTime()===r.getTime()}function Kee(t,e){G(2,arguments);var n=Ds(t),r=Ds(e);return n.getTime()===r.getTime()}function Xee(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getFullYear()===r.getFullYear()}function Zee(t,e){G(2,arguments);var n=K(t),r=K(e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function pk(t){G(1,arguments);var e=K(t);return e.setMinutes(0,0,0),e}function Qee(t,e){G(2,arguments);var n=pk(t),r=pk(e);return n.getTime()===r.getTime()}function gk(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Jee(t,e){if(t){if(typeof t=="string")return gk(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gk(t,e)}}function mk(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Jee(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
134
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function Ag(t,e){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function We(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ec(t,e)}function dh(t){return dh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dh(t)}function ete(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tte(t,e){if(e&&(Wr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(t)}function He(t){var e=ete();return function(){var r=dh(t),i;if(e){var o=dh(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return tte(this,i)}}function Be(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nte(t,e){if(Wr(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Wr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vk(t){var e=nte(t,"string");return Wr(e)==="symbol"?e:String(e)}function yk(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vk(r.key),r)}}function Ne(t,e,n){return e&&yk(t.prototype,e),n&&yk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function te(t,e,n){return e=vk(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var rte=10,bk=function(){function t(){Be(this,t),te(this,"priority",void 0),te(this,"subPriority",0)}return Ne(t,[{key:"validate",value:function(n,r){return!0}}]),t}(),ite=function(t){We(n,t);var e=He(n);function n(r,i,o,s,a){var l;return Be(this,n),l=e.call(this),l.value=r,l.validateValue=i,l.setValue=o,l.priority=s,a&&(l.subPriority=a),l}return Ne(n,[{key:"validate",value:function(i,o){return this.validateValue(i,this.value,o)}},{key:"set",value:function(i,o,s){return this.setValue(i,o,this.value,s)}}]),n}(bk),ote=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",rte),te(ie(r),"subPriority",-1),r}return Ne(n,[{key:"set",value:function(i,o){if(o.timestampIsSet)return i;var s=new Date(0);return s.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),s.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),s}}]),n}(bk),qe=function(){function t(){Be(this,t),te(this,"incompatibleTokens",void 0),te(this,"priority",void 0),te(this,"subPriority",void 0)}return Ne(t,[{key:"run",value:function(n,r,i,o){var s=this.parse(n,r,i,o);return s?{setter:new ite(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(n,r,i){return!0}}]),t}(),ste=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",140),te(ie(r),"incompatibleTokens",["R","u","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"G":case"GG":case"GGG":return s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"});case"GGGGG":return s.era(i,{width:"narrow"});case"GGGG":default:return s.era(i,{width:"wide"})||s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"})}}},{key:"set",value:function(i,o,s){return o.era=s,i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(qe),It={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},pr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function $t(t,e){return t&&{value:e(t.value),rest:t.rest}}function wt(t,e){var n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function gr(t,e){var n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};var r=n[1]==="+"?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(i*uh+o*lh+s*PJ),rest:e.slice(n[0].length)}}function xk(t){return wt(It.anyDigitsSigned,t)}function At(t,e){switch(t){case 1:return wt(It.singleDigit,e);case 2:return wt(It.twoDigits,e);case 3:return wt(It.threeDigits,e);case 4:return wt(It.fourDigits,e);default:return wt(new RegExp("^\\d{1,"+t+"}"),e)}}function ph(t,e){switch(t){case 1:return wt(It.singleDigitSigned,e);case 2:return wt(It.twoDigitsSigned,e);case 3:return wt(It.threeDigitsSigned,e);case 4:return wt(It.fourDigitsSigned,e);default:return wt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Pg(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function wk(t,e){var n=e>0,r=n?e:1-e,i;if(r<=50)i=t||100;else{var o=r+50,s=Math.floor(o/100)*100,a=t>=o%100;i=t+s-(a?100:0)}return n?i:1-i}function Ck(t){return t%400===0||t%4===0&&t%100!==0}var ate=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",130),te(ie(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return{year:u,isTwoDigitYear:o==="yy"}};switch(o){case"y":return $t(At(4,i),a);case"yo":return $t(s.ordinalNumber(i,{unit:"year"}),a);default:return $t(At(o.length,i),a)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=wk(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var u=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(u,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(qe),lte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",130),te(ie(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return{year:u,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return $t(At(4,i),a);case"Yo":return $t(s.ordinalNumber(i,{unit:"year"}),a);default:return $t(At(o.length,i),a)}}},{key:"validate",value:function(i,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(i,o,s,a){var l=Tg(i,a);if(s.isTwoDigitYear){var u=wk(s.year,l);return i.setUTCFullYear(u,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),uo(i,a)}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),uo(i,a)}}]),n}(qe),ute=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",130),te(ie(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o){return ph(o==="R"?4:o.length,i)}},{key:"set",value:function(i,o,s){var a=new Date(0);return a.setUTCFullYear(s,0,4),a.setUTCHours(0,0,0,0),_s(a)}}]),n}(qe),cte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",130),te(ie(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o){return ph(o==="u"?4:o.length,i)}},{key:"set",value:function(i,o,s){return i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(qe),hte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",120),te(ie(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"Q":case"QQ":return At(o.length,i);case"Qo":return s.ordinalNumber(i,{unit:"quarter"});case"QQQ":return s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(i,{width:"wide",context:"formatting"})||s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(qe),fte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",120),te(ie(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"q":case"qq":return At(o.length,i);case"qo":return s.ordinalNumber(i,{unit:"quarter"});case"qqq":return s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(i,{width:"wide",context:"standalone"})||s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(qe),dte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),te(ie(r),"priority",110),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return u-1};switch(o){case"M":return $t(wt(It.month,i),a);case"MM":return $t(At(2,i),a);case"Mo":return $t(s.ordinalNumber(i,{unit:"month"}),a);case"MMM":return s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(i,{width:"wide",context:"formatting"})||s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(qe),pte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",110),te(ie(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return u-1};switch(o){case"L":return $t(wt(It.month,i),a);case"LL":return $t(At(2,i),a);case"Lo":return $t(s.ordinalNumber(i,{unit:"month"}),a);case"LLL":return s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(i,{width:"wide",context:"standalone"})||s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(qe);function gte(t,e,n){G(2,arguments);var r=K(t),i=ze(e),o=ok(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var mte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",100),te(ie(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"w":return wt(It.week,i);case"wo":return s.ordinalNumber(i,{unit:"week"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,s,a){return uo(gte(i,s,a),a)}}]),n}(qe);function vte(t,e){G(2,arguments);var n=K(t),r=ze(e),i=ik(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var yte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",100),te(ie(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"I":return wt(It.week,i);case"Io":return s.ordinalNumber(i,{unit:"week"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=53}},{key:"set",value:function(i,o,s){return _s(vte(i,s))}}]),n}(qe),bte=[31,28,31,30,31,30,31,31,30,31,30,31],xte=[31,29,31,30,31,30,31,31,30,31,30,31],wte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"subPriority",1),te(ie(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"d":return wt(It.date,i);case"do":return s.ordinalNumber(i,{unit:"date"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){var s=i.getUTCFullYear(),a=Ck(s),l=i.getUTCMonth();return a?o>=1&&o<=xte[l]:o>=1&&o<=bte[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(qe),Cte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"subpriority",1),te(ie(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"D":case"DD":return wt(It.dayOfYear,i);case"Do":return s.ordinalNumber(i,{unit:"date"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){var s=i.getUTCFullYear(),a=Ck(s);return a?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(qe);function Dg(t,e,n){var r,i,o,s,a,l,u,c;G(2,arguments);var h=tr(),f=ze((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:h.weekStartsOn)!==null&&i!==void 0?i:(u=h.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=K(t),p=ze(e),g=d.getUTCDay(),m=p%7,b=(m+7)%7,x=(b<f?7:0)+p-g;return d.setUTCDate(d.getUTCDate()+x),d}var Ste=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"E":case"EE":case"EEE":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=Dg(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(qe),kte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s,a){var l=function(c){var h=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+h};switch(o){case"e":case"ee":return $t(At(o.length,i),l);case"eo":return $t(s.ordinalNumber(i,{unit:"day"}),l);case"eee":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeeee":return s.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=Dg(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(qe),Tte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s,a){var l=function(c){var h=Math.floor((c-1)/7)*7;return(c+a.weekStartsOn+6)%7+h};switch(o){case"c":case"cc":return $t(At(o.length,i),l);case"co":return $t(s.ordinalNumber(i,{unit:"day"}),l);case"ccc":return s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"ccccc":return s.day(i,{width:"narrow",context:"standalone"});case"cccccc":return s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(i,{width:"wide",context:"standalone"})||s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,o){return o>=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=Dg(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(qe);function Ete(t,e){G(2,arguments);var n=ze(e);n%7===0&&(n=n-7);var r=1,i=K(t),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a<r?7:0)+n-o;return i.setUTCDate(i.getUTCDate()+l),i}var Mte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",90),te(ie(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){var a=function(u){return u===0?7:u};switch(o){case"i":case"ii":return At(o.length,i);case"io":return s.ordinalNumber(i,{unit:"day"});case"iii":return $t(s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),a);case"iiiii":return $t(s.day(i,{width:"narrow",context:"formatting"}),a);case"iiiiii":return $t(s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),a);case"iiii":default:return $t(s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),a)}}},{key:"validate",value:function(i,o){return o>=1&&o<=7}},{key:"set",value:function(i,o,s){return i=Ete(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(qe),Ote=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",80),te(ie(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"a":case"aa":case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,s){return i.setUTCHours(Pg(s),0,0,0),i}}]),n}(qe),Ate=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",80),te(ie(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"b":case"bb":case"bbb":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,s){return i.setUTCHours(Pg(s),0,0,0),i}}]),n}(qe),Pte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",80),te(ie(r),"incompatibleTokens",["a","b","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"B":case"BB":case"BBB":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,o,s){return i.setUTCHours(Pg(s),0,0,0),i}}]),n}(qe),Dte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",70),te(ie(r),"incompatibleTokens",["H","K","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"h":return wt(It.hour12h,i);case"ho":return s.ordinalNumber(i,{unit:"hour"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(qe),_te=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",70),te(ie(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"H":return wt(It.hour23h,i);case"Ho":return s.ordinalNumber(i,{unit:"hour"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(qe),Ite=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",70),te(ie(r),"incompatibleTokens",["h","H","k","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"K":return wt(It.hour11h,i);case"Ko":return s.ordinalNumber(i,{unit:"hour"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(qe),$te=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",70),te(ie(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"k":return wt(It.hour24h,i);case"ko":return s.ordinalNumber(i,{unit:"hour"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){return o>=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(qe),Fte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",60),te(ie(r),"incompatibleTokens",["t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"m":return wt(It.minute,i);case"mo":return s.ordinalNumber(i,{unit:"minute"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(qe),Lte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",50),te(ie(r),"incompatibleTokens",["t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o,s){switch(o){case"s":return wt(It.second,i);case"so":return s.ordinalNumber(i,{unit:"second"});default:return At(o.length,i)}}},{key:"validate",value:function(i,o){return o>=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(qe),Rte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",30),te(ie(r),"incompatibleTokens",["t","T"]),r}return Ne(n,[{key:"parse",value:function(i,o){var s=function(l){return Math.floor(l*Math.pow(10,-o.length+3))};return $t(At(o.length,i),s)}},{key:"set",value:function(i,o,s){return i.setUTCMilliseconds(s),i}}]),n}(qe),Bte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",10),te(ie(r),"incompatibleTokens",["t","T","x"]),r}return Ne(n,[{key:"parse",value:function(i,o){switch(o){case"X":return gr(pr.basicOptionalMinutes,i);case"XX":return gr(pr.basic,i);case"XXXX":return gr(pr.basicOptionalSeconds,i);case"XXXXX":return gr(pr.extendedOptionalSeconds,i);case"XXX":default:return gr(pr.extended,i)}}},{key:"set",value:function(i,o,s){return o.timestampIsSet?i:new Date(i.getTime()-s)}}]),n}(qe),Nte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",10),te(ie(r),"incompatibleTokens",["t","T","X"]),r}return Ne(n,[{key:"parse",value:function(i,o){switch(o){case"x":return gr(pr.basicOptionalMinutes,i);case"xx":return gr(pr.basic,i);case"xxxx":return gr(pr.basicOptionalSeconds,i);case"xxxxx":return gr(pr.extendedOptionalSeconds,i);case"xxx":default:return gr(pr.extended,i)}}},{key:"set",value:function(i,o,s){return o.timestampIsSet?i:new Date(i.getTime()-s)}}]),n}(qe),jte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",40),te(ie(r),"incompatibleTokens","*"),r}return Ne(n,[{key:"parse",value:function(i){return xk(i)}},{key:"set",value:function(i,o,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),n}(qe),Vte=function(t){We(n,t);var e=He(n);function n(){var r;Be(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o)),te(ie(r),"priority",20),te(ie(r),"incompatibleTokens","*"),r}return Ne(n,[{key:"parse",value:function(i){return xk(i)}},{key:"set",value:function(i,o,s){return[new Date(s),{timestampIsSet:!0}]}}]),n}(qe),zte={G:new ste,y:new ate,Y:new lte,R:new ute,u:new cte,Q:new hte,q:new fte,M:new dte,L:new pte,w:new mte,I:new yte,d:new wte,D:new Cte,E:new Ste,e:new kte,c:new Tte,i:new Mte,a:new Ote,b:new Ate,B:new Pte,h:new Dte,H:new _te,K:new Ite,k:new $te,m:new Fte,s:new Lte,S:new Rte,X:new Bte,x:new Nte,t:new jte,T:new Vte},Wte=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Hte=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qte=/^'([^]*?)'?$/,Ute=/''/g,Yte=/\S/,Gte=/[a-zA-Z]/;function Sk(t,e,n,r){var i,o,s,a,l,u,c,h,f,d,p,g,m,b,x,C,S,w;G(3,arguments);var k=String(t),T=String(e),O=tr(),P=(i=(o=r==null?void 0:r.locale)!==null&&o!==void 0?o:O.locale)!==null&&i!==void 0?i:fh;if(!P.match)throw new RangeError("locale must contain match property");var D=ze((s=(a=(l=(u=r==null?void 0:r.firstWeekContainsDate)!==null&&u!==void 0?u:r==null||(c=r.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&l!==void 0?l:O.firstWeekContainsDate)!==null&&a!==void 0?a:(f=O.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var R=ze((p=(g=(m=(b=r==null?void 0:r.weekStartsOn)!==null&&b!==void 0?b:r==null||(x=r.locale)===null||x===void 0||(C=x.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&m!==void 0?m:O.weekStartsOn)!==null&&g!==void 0?g:(S=O.locale)===null||S===void 0||(w=S.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(R>=0&&R<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return k===""?K(n):new Date(NaN);var H={firstWeekContainsDate:D,weekStartsOn:R,locale:P},W=[new ote],B=T.match(Hte).map(function(ue){var ne=ue[0];if(ne in Eg){var ce=Eg[ne];return ce(ue,P.formatLong)}return ue}).join("").match(Wte),j=[],N=mk(B),V;try{var me=function(){var ne=V.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&hk(ne)&&hh(ne,T,t),!(r!=null&&r.useAdditionalDayOfYearTokens)&&ck(ne)&&hh(ne,T,t);var ce=ne[0],_e=zte[ce];if(_e){var q=_e.incompatibleTokens;if(Array.isArray(q)){var ht=j.find(function(X){return q.includes(X.token)||X.token===ce});if(ht)throw new RangeError("The format string mustn't contain `".concat(ht.fullToken,"` and `").concat(ne,"` at the same time"))}else if(_e.incompatibleTokens==="*"&&j.length>0)throw new RangeError("The format string mustn't contain `".concat(ne,"` and any other token at the same time"));j.push({token:ce,fullToken:ne});var ae=_e.run(k,ne,P.match,H);if(!ae)return{v:new Date(NaN)};W.push(ae.setter),k=ae.rest}else{if(ce.match(Gte))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ce+"`");if(ne==="''"?ne="'":ce==="'"&&(ne=Kte(ne)),k.indexOf(ne)===0)k=k.slice(ne.length);else return{v:new Date(NaN)}}};for(N.s();!(V=N.n()).done;){var re=me();if(Wr(re)==="object")return re.v}}catch(ue){N.e(ue)}finally{N.f()}if(k.length>0&&Yte.test(k))return new Date(NaN);var _=W.map(function(ue){return ue.priority}).sort(function(ue,ne){return ne-ue}).filter(function(ue,ne,ce){return ce.indexOf(ue)===ne}).map(function(ue){return W.filter(function(ne){return ne.priority===ue}).sort(function(ne,ce){return ce.subPriority-ne.subPriority})}).map(function(ue){return ue[0]}),F=K(n);if(isNaN(F.getTime()))return new Date(NaN);var U=nk(F,Ps(F)),se={},Q=mk(_),ve;try{for(Q.s();!(ve=Q.n()).done;){var le=ve.value;if(!le.validate(U,H))return new Date(NaN);var ye=le.set(U,se,H);Array.isArray(ye)?(U=ye[0],Ag(se,ye[1])):U=ye}}catch(ue){Q.e(ue)}finally{Q.f()}return U}function Kte(t){return t.match(qte)[1].replace(Ute,"'")}function Xte(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setDate(r),n}function Zte(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setHours(r),n}function Qte(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setMinutes(r),n}function Jte(t,e){G(2,arguments);var n=K(t),r=ze(e),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var a=dk(s);return n.setMonth(r,Math.min(o,a)),n}function ene(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setSeconds(r),n}function tne(t,e){G(2,arguments);var n=K(t),r=ze(e);return n.setMilliseconds(r),n}function nne(t,e){G(2,arguments);var n=K(t),r=ze(e);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function kk(t){G(1,arguments);var e=K(t);return e.setDate(1),e.setHours(0,0,0,0),e}function gh(t){G(1,arguments);var e=K(t),n=new Date(0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function rne(t,e){var n;G(1,arguments);var r=ze((n=e==null?void 0:e.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var i=ane(t),o;if(i.date){var s=lne(i.date,r);o=une(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),l=0,u;if(i.time&&(l=cne(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(u=hne(i.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(a+l),h=new Date(0);return h.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),h.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),h}return new Date(a+l+u)}var mh={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ine=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,one=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,sne=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ane(t){var e={},n=t.split(mh.dateTimeDelimiter),r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],mh.timeZoneDelimiter.test(e.date)&&(e.date=t.split(mh.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){var i=mh.timezone.exec(r);i?(e.time=r.replace(i[1],""),e.timezone=i[1]):e.time=r}return e}function lne(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:t.slice((r[1]||r[2]).length)}}function une(t,e){if(e===null)return new Date(NaN);var n=t.match(ine);if(!n)return new Date(NaN);var r=!!n[4],i=Cl(n[1]),o=Cl(n[2])-1,s=Cl(n[3]),a=Cl(n[4]),l=Cl(n[5])-1;if(r)return mne(e,a,l)?fne(e,a,l):new Date(NaN);var u=new Date(0);return!pne(e,o,s)||!gne(e,i)?new Date(NaN):(u.setUTCFullYear(e,o,Math.max(i,s)),u)}function Cl(t){return t?parseInt(t):1}function cne(t){var e=t.match(one);if(!e)return NaN;var n=_g(e[1]),r=_g(e[2]),i=_g(e[3]);return vne(n,r,i)?n*uh+r*lh+i*1e3:NaN}function _g(t){return t&&parseFloat(t.replace(",","."))||0}function hne(t){if(t==="Z")return 0;var e=t.match(sne);if(!e)return 0;var n=e[1]==="+"?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return yne(r,i)?n*(r*uh+i*lh):NaN}function fne(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var i=r.getUTCDay()||7,o=(e-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var dne=[31,null,31,30,31,30,31,31,30,31,30,31];function Tk(t){return t%400===0||t%4===0&&t%100!==0}function pne(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(dne[e]||(Tk(t)?29:28))}function gne(t,e){return e>=1&&e<=(Tk(t)?366:365)}function mne(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function vne(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function yne(t,e){return e>=0&&e<=59}function bne(t,e){var n,r;G(1,arguments);var i=K(t);if(isNaN(i.getTime()))throw new RangeError("Invalid time value");var o=String((n=e==null?void 0:e.format)!==null&&n!==void 0?n:"extended"),s=String((r=e==null?void 0:e.representation)!==null&&r!==void 0?r:"complete");if(o!=="extended"&&o!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(s!=="date"&&s!=="time"&&s!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var a="",l="",u=o==="extended"?"-":"",c=o==="extended"?":":"";if(s!=="time"){var h=Ie(i.getDate(),2),f=Ie(i.getMonth()+1,2),d=Ie(i.getFullYear(),4);a="".concat(d).concat(u).concat(f).concat(u).concat(h)}if(s!=="date"){var p=i.getTimezoneOffset();if(p!==0){var g=Math.abs(p),m=Ie(Math.floor(g/60),2),b=Ie(g%60,2),x=p<0?"+":"-";l="".concat(x).concat(m,":").concat(b)}else l="Z";var C=Ie(i.getHours(),2),S=Ie(i.getMinutes(),2),w=Ie(i.getSeconds(),2),k=a===""?"":"T",T=[C,S,w].join(c);a="".concat(a).concat(k).concat(T).concat(l)}return a}function xne(t,e){G(2,arguments);var n=K(t).getTime(),r=K(e.start).getTime(),i=K(e.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}var Ig={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(l,u){switch(l){case"P":return u.date({width:"short"});case"PP":return u.date({width:"medium"});case"PPP":return u.date({width:"long"});case"PPPP":default:return u.date({width:"full"})}},r=function(l,u){switch(l){case"p":return u.time({width:"short"});case"pp":return u.time({width:"medium"});case"ppp":return u.time({width:"long"});case"pppp":default:return u.time({width:"full"})}},i=function(l,u){var c=l.match(/(P+)(p+)?/)||[],h=c[1],f=c[2];if(!f)return n(l,u);var d;switch(h){case"P":d=u.dateTime({width:"short"});break;case"PP":d=u.dateTime({width:"medium"});break;case"PPP":d=u.dateTime({width:"long"});break;case"PPPP":default:d=u.dateTime({width:"full"});break}return d.replace("{{date}}",n(h,u)).replace("{{time}}",r(f,u))},o={p:r,P:i},s=o;e.default=s,t.exports=e.default})(Ig,Ig.exports);var wne=Ig.exports;const Cne=Ni(wne),Sne={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"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"},kne={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",weekday:"EEEE",weekdayShort:"EEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",fullDateWithWeekday:"PPPP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",monthAndYear:"LLLL yyyy",monthAndDate:"MMMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",fullDateTime:"PP p",fullDateTime12h:"PP hh:mm aa",fullDateTime24h:"PP HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class Tne{constructor({locale:e,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib="date-fns",this.locale=void 0,this.formats=void 0,this.formatTokenMap=Sne,this.escapedCharacters={start:"'",end:"'"},this.date=r=>typeof r>"u"?new Date:r===null?null:new Date(r),this.dateWithTimezone=r=>this.date(r),this.getTimezone=()=>"default",this.setTimezone=r=>r,this.toJsDate=r=>r,this.parseISO=r=>rne(r),this.toISO=r=>bne(r,{format:"extended"}),this.parse=(r,i)=>r===""?null:Sk(r,i,new Date,{locale:this.locale}),this.getCurrentLocaleCode=()=>{var r;return((r=this.locale)==null?void 0:r.code)||"en-US"},this.is12HourCycleInCurrentLocale=()=>this.locale?/a/.test(this.locale.formatLong.time()):!0,this.expandFormat=r=>{const i=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;return r.match(i).map(o=>{const s=o[0];if(s==="p"||s==="P"){const a=Cne[s],l=this.locale||fh;return a(o,l.formatLong,{})}return o}).join("")},this.getFormatHelperText=r=>this.expandFormat(r).replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase(),this.isNull=r=>r===null,this.isValid=r=>kg(this.date(r)),this.format=(r,i)=>this.formatByString(r,this.formats[i]),this.formatByString=(r,i)=>Mg(r,i,{locale:this.locale}),this.formatNumber=r=>r,this.getDiff=(r,i,o)=>{switch(o){case"years":return CJ(r,this.date(i));case"quarters":return EJ(r,this.date(i));case"months":return wg(r,this.date(i));case"weeks":return AJ(r,this.date(i));case"days":return ek(r,this.date(i));case"hours":return DJ(r,this.date(i));case"minutes":return _J(r,this.date(i));case"seconds":return tk(r,this.date(i));default:return ch(r,this.date(i))}},this.isEqual=(r,i)=>r===null&&i===null?!0:Gee(r,i),this.isSameYear=(r,i)=>Xee(r,i),this.isSameMonth=(r,i)=>Zee(r,i),this.isSameDay=(r,i)=>Kee(r,i),this.isSameHour=(r,i)=>Qee(r,i),this.isAfter=(r,i)=>Og(r,i),this.isAfterYear=(r,i)=>Og(r,Sg(i)),this.isAfterDay=(r,i)=>Og(r,bg(i)),this.isBefore=(r,i)=>wl(r,i),this.isBeforeYear=(r,i)=>wl(r,gh(i)),this.isBeforeDay=(r,i)=>wl(r,Ds(i)),this.isWithinRange=(r,[i,o])=>xne(r,{start:i,end:o}),this.startOfYear=r=>gh(r),this.startOfMonth=r=>kk(r),this.startOfWeek=r=>ho(r,{locale:this.locale}),this.startOfDay=r=>Ds(r),this.endOfYear=r=>Sg(r),this.endOfMonth=r=>xg(r),this.endOfWeek=r=>Cg(r,{locale:this.locale}),this.endOfDay=r=>bg(r),this.addYears=(r,i)=>ZS(r,i),this.addMonths=(r,i)=>ah(r,i),this.addWeeks=(r,i)=>xJ(r,i),this.addDays=(r,i)=>yg(r,i),this.addHours=(r,i)=>bJ(r,i),this.addMinutes=(r,i)=>vJ(r,i),this.addSeconds=(r,i)=>gJ(r,i),this.getYear=r=>Yee(r),this.getMonth=r=>jee(r),this.getDate=r=>Ree(r),this.getHours=r=>Bee(r),this.getMinutes=r=>Nee(r),this.getSeconds=r=>Vee(r),this.getMilliseconds=r=>zee(r),this.setYear=(r,i)=>nne(r,i),this.setMonth=(r,i)=>Jte(r,i),this.setDate=(r,i)=>Xte(r,i),this.setHours=(r,i)=>Zte(r,i),this.setMinutes=(r,i)=>Qte(r,i),this.setSeconds=(r,i)=>ene(r,i),this.setMilliseconds=(r,i)=>tne(r,i),this.getDaysInMonth=r=>dk(r),this.getNextMonth=r=>ah(r,1),this.getPreviousMonth=r=>ah(r,-1),this.getMonthArray=r=>{const o=[gh(r)];for(;o.length<12;){const s=o[o.length-1];o.push(this.getNextMonth(s))}return o},this.mergeDateAndTime=(r,i)=>this.setSeconds(this.setMinutes(this.setHours(r,this.getHours(i)),this.getMinutes(i)),this.getSeconds(i)),this.getWeekdays=()=>{const r=new Date;return IJ({start:ho(r,{locale:this.locale}),end:Cg(r,{locale:this.locale})}).map(i=>this.formatByString(i,"EEEEEE"))},this.getWeekArray=r=>{const i=ho(kk(r),{locale:this.locale}),o=Cg(xg(r),{locale:this.locale});let s=0,a=i;const l=[];for(;wl(a,o);){const u=Math.floor(s/7);l[u]=l[u]||[],l[u].push(a),a=yg(a,1),s+=1}return l},this.getWeekNumber=r=>Uee(r,{locale:this.locale}),this.getYearRange=(r,i)=>{const o=gh(r),s=Sg(i),a=[];let l=o;for(;wl(l,s);)a.push(l),l=ZS(l,1);return a},this.getMeridiemText=r=>r==="am"?"AM":"PM",this.locale=e,this.formats=Pe({},kne,n)}}var Ene={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},Mne=function(e,n,r){var i,o=Ene[e];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",String(n)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"em "+i:"há "+i:i};const One=Mne;var Ane={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Pne={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Dne={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_ne={date:$s({formats:Ane,defaultWidth:"full"}),time:$s({formats:Pne,defaultWidth:"full"}),dateTime:$s({formats:Dne,defaultWidth:"full"})};const Ine=_ne;var $ne={lastWeek:function(e){var n=e.getUTCDay(),r=n===0||n===6?"último":"última";return"'"+r+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},Fne=function(e,n,r,i){var o=$ne[e];return typeof o=="function"?o(n):o};const Lne=Fne;var Rne={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},Bne={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Nne={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},jne={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},Vne={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},zne={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},Wne=function(e,n){var r=Number(e);return(n==null?void 0:n.unit)==="week"?r+"ª":r+"º"},Hne={ordinalNumber:Wne,era:fr({values:Rne,defaultWidth:"wide"}),quarter:fr({values:Bne,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:fr({values:Nne,defaultWidth:"wide"}),day:fr({values:jne,defaultWidth:"wide"}),dayPeriod:fr({values:Vne,defaultWidth:"wide",formattingValues:zne,defaultFormattingWidth:"wide"})};const qne=Hne;var Une=/^(\d+)[ºªo]?/i,Yne=/\d+/i,Gne={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},Kne={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Xne={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Zne={any:[/1/i,/2/i,/3/i,/4/i]},Qne={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},Jne={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},ere={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},tre={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},nre={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},rre={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},ire={ordinalNumber:fk({matchPattern:Une,parsePattern:Yne,valueCallback:function(e){return parseInt(e,10)}}),era:dr({matchPatterns:Gne,defaultMatchWidth:"wide",parsePatterns:Kne,defaultParseWidth:"any"}),quarter:dr({matchPatterns:Xne,defaultMatchWidth:"wide",parsePatterns:Zne,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:dr({matchPatterns:Qne,defaultMatchWidth:"wide",parsePatterns:Jne,defaultParseWidth:"any"}),day:dr({matchPatterns:ere,defaultMatchWidth:"wide",parsePatterns:tre,defaultParseWidth:"any"}),dayPeriod:dr({matchPatterns:nre,defaultMatchWidth:"any",parsePatterns:rre,defaultParseWidth:"any"})},ore={code:"pt-BR",formatDistance:One,formatLong:Ine,formatRelative:Lne,localize:qne,match:ire,options:{weekStartsOn:0,firstWeekContainsDate:1}};const sre=ore;var Ek={exports:{}},Mk={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Ok={exports:{}},are=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},lre=are,ure=Array.prototype.concat,cre=Array.prototype.slice,Ak=Ok.exports=function(e){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];lre(o)?n=ure.call(n,cre.call(o)):n.push(o)}return n};Ak.wrap=function(t){return function(){return t(Ak(arguments))}};var hre=Ok.exports,Sl=Mk,kl=hre,Pk=Object.hasOwnProperty,Dk=Object.create(null);for(var $g in Sl)Pk.call(Sl,$g)&&(Dk[Sl[$g]]=$g);var En=Ek.exports={to:{},get:{}};En.get=function(t){var e=t.substring(0,3).toLowerCase(),n,r;switch(e){case"hsl":n=En.get.hsl(t),r="hsl";break;case"hwb":n=En.get.hwb(t),r="hwb";break;default:n=En.get.rgb(t),r="rgb";break}return n?{model:r,value:n}:null},En.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],a,l,u;if(a=t.match(n)){for(u=a[2],a=a[1],l=0;l<3;l++){var c=l*2;s[l]=parseInt(a.slice(c,c+2),16)}u&&(s[3]=parseInt(u,16)/255)}else if(a=t.match(e)){for(a=a[1],u=a[3],l=0;l<3;l++)s[l]=parseInt(a[l]+a[l],16);u&&(s[3]=parseInt(u+u,16)/255)}else if(a=t.match(r)){for(l=0;l<3;l++)s[l]=parseInt(a[l+1],0);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else if(a=t.match(i)){for(l=0;l<3;l++)s[l]=Math.round(parseFloat(a[l+1])*2.55);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else return(a=t.match(o))?a[1]==="transparent"?[0,0,0,0]:Pk.call(Sl,a[1])?(s=Sl[a[1]],s[3]=1,s):null:null;for(l=0;l<3;l++)s[l]=di(s[l],0,255);return s[3]=di(s[3],0,1),s},En.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(e);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=di(parseFloat(n[2]),0,100),s=di(parseFloat(n[3]),0,100),a=di(isNaN(r)?1:r,0,1);return[i,o,s,a]}return null},En.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(e);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=di(parseFloat(n[2]),0,100),s=di(parseFloat(n[3]),0,100),a=di(isNaN(r)?1:r,0,1);return[i,o,s,a]}return null},En.to.hex=function(){var t=kl(arguments);return"#"+vh(t[0])+vh(t[1])+vh(t[2])+(t[3]<1?vh(Math.round(t[3]*255)):"")},En.to.rgb=function(){var t=kl(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},En.to.rgb.percent=function(){var t=kl(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},En.to.hsl=function(){var t=kl(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},En.to.hwb=function(){var t=kl(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},En.to.keyword=function(t){return Dk[t.slice(0,3)]};function di(t,e,n){return Math.min(Math.max(e,t),n)}function vh(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var fre=Ek.exports;const Tl=Mk,_k={};for(const t of Object.keys(Tl))_k[Tl[t]]=t;const de={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Ik=de;for(const t of Object.keys(de)){if(!("channels"in de[t]))throw new Error("missing channels property: "+t);if(!("labels"in de[t]))throw new Error("missing channel labels property: "+t);if(de[t].labels.length!==de[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=de[t];delete de[t].channels,delete de[t].labels,Object.defineProperty(de[t],"channels",{value:e}),Object.defineProperty(de[t],"labels",{value:n})}de.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=o-i;let a,l;o===i?a=0:e===o?a=(n-r)/s:n===o?a=2+(r-e)/s:r===o&&(a=4+(e-n)/s),a=Math.min(a*60,360),a<0&&(a+=360);const u=(i+o)/2;return o===i?l=0:u<=.5?l=s/(o+i):l=s/(2-o-i),[a,l*100,u*100]},de.rgb.hsv=function(t){let e,n,r,i,o;const s=t[0]/255,a=t[1]/255,l=t[2]/255,u=Math.max(s,a,l),c=u-Math.min(s,a,l),h=function(f){return(u-f)/6/c+1/2};return c===0?(i=0,o=0):(o=c/u,e=h(s),n=h(a),r=h(l),s===u?i=r-n:a===u?i=1/3+e-r:l===u&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,u*100]},de.rgb.hwb=function(t){const e=t[0],n=t[1];let r=t[2];const i=de.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,o*100,r*100]},de.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r),o=(1-e-i)/(1-i)||0,s=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function dre(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}de.rgb.keyword=function(t){const e=_k[t];if(e)return e;let n=1/0,r;for(const i of Object.keys(Tl)){const o=Tl[i],s=dre(t,o);s<n&&(n=s,r=i)}return r},de.keyword.rgb=function(t){return Tl[t]},de.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=e*.4124+n*.3576+r*.1805,o=e*.2126+n*.7152+r*.0722,s=e*.0193+n*.1192+r*.9505;return[i*100,o*100,s*100]},de.rgb.lab=function(t){const e=de.rgb.xyz(t);let n=e[0],r=e[1],i=e[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,s=500*(n-r),a=200*(r-i);return[o,s,a]},de.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;let i,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?i=r*(1+n):i=r+n-r*n;const a=2*r-i,l=[0,0,0];for(let u=0;u<3;u++)o=e+1/3*-(u-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,l[u]=s*255;return l},de.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,r=t[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const s=(r+n)/2,a=r===0?2*i/(o+i):2*n/(r+n);return[e,a*100,s*100]},de.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let r=t[2]/100;const i=Math.floor(e)%6,o=e-Math.floor(e),s=255*r*(1-n),a=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,s];case 1:return[a,r,s];case 2:return[s,r,l];case 3:return[s,a,r];case 4:return[l,s,r];case 5:return[r,s,a]}},de.hsv.hsl=function(t){const e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]},de.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,r=t[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*e),a=1-r;o=6*e-s,s&1&&(o=1-o);const l=n+o*(a-n);let u,c,h;switch(s){default:case 6:case 0:u=a,c=l,h=n;break;case 1:u=l,c=a,h=n;break;case 2:u=n,c=a,h=l;break;case 3:u=n,c=l,h=a;break;case 4:u=l,c=n,h=a;break;case 5:u=a,c=n,h=l;break}return[u*255,c*255,h*255]},de.cmyk.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[o*255,s*255,a*255]},de.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100;let i,o,s;return i=e*3.2406+n*-1.5372+r*-.4986,o=e*-.9689+n*1.8758+r*.0415,s=e*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]},de.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(e-n),s=200*(n-r);return[i,o,s]},de.lab.xyz=function(t){const e=t[0],n=t[1],r=t[2];let i,o,s;o=(e+16)/116,i=n/500+o,s=o-r/200;const a=o**3,l=i**3,u=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,s=u>.008856?u:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]},de.lab.lch=function(t){const e=t[0],n=t[1],r=t[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const s=Math.sqrt(n*n+r*r);return[e,s,i]},de.lch.lab=function(t){const e=t[0],n=t[1],i=t[2]/360*2*Math.PI,o=n*Math.cos(i),s=n*Math.sin(i);return[e,o,s]},de.rgb.ansi16=function(t,e=null){const[n,r,i]=t;let o=e===null?de.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},de.hsv.ansi16=function(t){return de.rgb.ansi16(de.hsv.rgb(t),t[2])},de.rgb.ansi256=function(t){const e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},de.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=(~~(t>50)+1)*.5,r=(e&1)*n*255,i=(e>>1&1)*n*255,o=(e>>2&1)*n*255;return[r,i,o]},de.ansi256.rgb=function(t){if(t>=232){const o=(t-232)*10+8;return[o,o,o]}t-=16;let e;const n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[n,r,i]},de.rgb.hex=function(t){const n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n},de.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=n.split("").map(a=>a+a).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,s=r&255;return[i,o,s]},de.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),o=Math.min(Math.min(e,n),r),s=i-o;let a,l;return s<1?a=o/(1-s):a=0,s<=0?l=0:i===e?l=(n-r)/s%6:i===n?l=2+(r-e)/s:l=4+(e-n)/s,l/=6,l%=1,[l*360,s*100,a*100]},de.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],r*100,i*100]},de.hsv.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=e*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],r*100,i*100]},de.hcg.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=e%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]},de.hcg.hsv=function(t){const e=t[1]/100,n=t[2]/100,r=e+n*(1-e);let i=0;return r>0&&(i=e/r),[t[0],i*100,r*100]},de.hcg.hsl=function(t){const e=t[1]/100,r=t[2]/100*(1-e)+.5*e;let i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[t[0],i*100,r*100]},de.hcg.hwb=function(t){const e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]},de.hwb.hcg=function(t){const e=t[1]/100,r=1-t[2]/100,i=r-e;let o=0;return i<1&&(o=(r-i)/(1-i)),[t[0],i*100,o*100]},de.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},de.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},de.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},de.gray.hsl=function(t){return[0,0,t[0]]},de.gray.hsv=de.gray.hsl,de.gray.hwb=function(t){return[0,100,t[0]]},de.gray.cmyk=function(t){return[0,0,0,t[0]]},de.gray.lab=function(t){return[t[0],0,0]},de.gray.hex=function(t){const e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r},de.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const yh=Ik;function pre(){const t={},e=Object.keys(yh);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function gre(t){const e=pre(),n=[t];for(e[t].distance=0;n.length;){const r=n.pop(),i=Object.keys(yh[r]);for(let o=i.length,s=0;s<o;s++){const a=i[s],l=e[a];l.distance===-1&&(l.distance=e[r].distance+1,l.parent=r,n.unshift(a))}}return e}function mre(t,e){return function(n){return e(t(n))}}function vre(t,e){const n=[e[t].parent,t];let r=yh[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),r=mre(yh[e[i].parent][i],r),i=e[i].parent;return r.conversion=n,r}var yre=function(t){const e=gre(t),n={},r=Object.keys(e);for(let i=r.length,o=0;o<i;o++){const s=r[o];e[s].parent!==null&&(n[s]=vre(s,e))}return n};const Fg=Ik,bre=yre,Fs={},xre=Object.keys(Fg);function wre(t){const e=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function Cre(t){const e=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=t(n);if(typeof i=="object")for(let o=i.length,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}xre.forEach(t=>{Fs[t]={},Object.defineProperty(Fs[t],"channels",{value:Fg[t].channels}),Object.defineProperty(Fs[t],"labels",{value:Fg[t].labels});const e=bre(t);Object.keys(e).forEach(r=>{const i=e[r];Fs[t][r]=Cre(i),Fs[t][r].raw=wre(i)})});var Sre=Fs;const Ls=fre,Mn=Sre,$k=["keyword","gray","hex"],Lg={};for(const t of Object.keys(Mn))Lg[[...Mn[t].labels].sort().join("")]=t;const bh={};function Ut(t,e){if(!(this instanceof Ut))return new Ut(t,e);if(e&&e in $k&&(e=null),e&&!(e in Mn))throw new Error("Unknown model: "+e);let n,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof Ut)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){const i=Ls.get(t);if(i===null)throw new Error("Unable to parse color from string: "+t);this.model=i.model,r=Mn[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(t.length>0){this.model=e||"rgb",r=Mn[this.model].channels;const i=Array.prototype.slice.call(t,0,r);this.color=Rg(i,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(t);"alpha"in t&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);const o=i.sort().join("");if(!(o in Lg))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Lg[o];const{labels:s}=Mn[this.model],a=[];for(n=0;n<s.length;n++)a.push(t[s[n]]);this.color=Rg(a)}if(bh[this.model])for(r=Mn[this.model].channels,n=0;n<r;n++){const i=bh[this.model][n];i&&(this.color[n]=i(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Ut.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in Ls.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);const n=e.valpha===1?e.color:[...e.color,this.valpha];return Ls.to[e.model](n)},percentString(t){const e=this.rgb().round(typeof t=="number"?t:1),n=e.valpha===1?e.color:[...e.color,this.valpha];return Ls.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=Mn[this.model],{labels:n}=Mn[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new Ut([...this.color.map(Tre(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new Ut([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:Pt("rgb",0,Vt(255)),green:Pt("rgb",1,Vt(255)),blue:Pt("rgb",2,Vt(255)),hue:Pt(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:Pt("hsl",1,Vt(100)),lightness:Pt("hsl",2,Vt(100)),saturationv:Pt("hsv",1,Vt(100)),value:Pt("hsv",2,Vt(100)),chroma:Pt("hcg",1,Vt(100)),gray:Pt("hcg",2,Vt(100)),white:Pt("hwb",1,Vt(100)),wblack:Pt("hwb",2,Vt(100)),cyan:Pt("cmyk",0,Vt(100)),magenta:Pt("cmyk",1,Vt(100)),yellow:Pt("cmyk",2,Vt(100)),black:Pt("cmyk",3,Vt(100)),x:Pt("xyz",0,Vt(95.047)),y:Pt("xyz",1,Vt(100)),z:Pt("xyz",2,Vt(108.833)),l:Pt("lab",0,Vt(100)),a:Pt("lab",1),b:Pt("lab",2),keyword(t){return t!==void 0?new Ut(t):Mn[this.model].keyword(this.color)},hex(t){return t!==void 0?new Ut(t):Ls.to.hex(this.rgb().round().color)},hexa(t){if(t!==void 0)return new Ut(t);const e=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),Ls.to.hex(e)+n},rgbNumber(){const t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){const t=this.rgb().color,e=[];for(const[n,r]of t.entries()){const i=r/255;e[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return Ut.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const n=t.rgb(),r=this.rgb(),i=e===void 0?.5:e,o=2*i-1,s=n.alpha()-r.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return Ut.rgb(a*n.red()+l*r.red(),a*n.green()+l*r.green(),a*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const t of Object.keys(Mn)){if($k.includes(t))continue;const{channels:e}=Mn[t];Ut.prototype[t]=function(...n){return this.model===t?new Ut(this):n.length>0?new Ut(n,t):new Ut([...Ere(Mn[this.model][t].raw(this.color)),this.valpha],t)},Ut[t]=function(...n){let r=n[0];return typeof r=="number"&&(r=Rg(n,e)),new Ut(r,t)}}function kre(t,e){return Number(t.toFixed(e))}function Tre(t){return function(e){return kre(e,t)}}function Pt(t,e,n){t=Array.isArray(t)?t:[t];for(const r of t)(bh[r]||(bh[r]=[]))[e]=n;return t=t[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[t](),i.color[e]=r,i):(i=this[t]().color[e],n&&(i=n(i)),i)}}function Vt(t){return function(e){return Math.max(0,Math.min(t,e))}}function Ere(t){return Array.isArray(t)?t:[t]}function Rg(t,e){for(let n=0;n<e;n++)typeof t[n]!="number"&&(t[n]=0);return t}var Mre=Ut;const Ore=Ni(Mre),it={0:"#FFFFFF",100:"#F9FAFB",200:"#F4F6F8",300:"#DFE3E8",400:"#C4CDD5",500:"#919EAB",600:"#637381",700:"#454F5B",800:"#212B36",900:"#161C24"},Bg={lighter:"#3aa4f2",light:"#7bc2f6",main:"#0E82D8",dark:"#0b61a2",darker:"#07416c",contrastText:"#fff"},Are={lighter:"#D6E4FF",light:"#84A9FF",main:"#3366FF",dark:"#1939B7",darker:"#091A7A",contrastText:"#fff"},Pre={lighter:"#CAFDF5",light:"#61F3F3",main:"#00B8D9",dark:"#006C9C",darker:"#003768",contrastText:"#fff"},Dre={lighter:"#D8FBDE",light:"#86E8AB",main:"#36B37E",dark:"#1B806A",darker:"#0A5554",contrastText:"#fff"},_re={lighter:"#FFF5CC",light:"#FFD666",main:"#FFAB00",dark:"#B76E00",darker:"#7A4100",contrastText:it[800]},Rs={common:{black:"#000",white:"#fff"},primary:Bg,secondary:Are,info:Pre,success:Dre,warning:_re,error:{lighter:"#FFE9D5",light:"#FFAC82",main:"#FF5630",dark:"#B71D18",darker:"#7A0916",contrastText:"#fff"},grey:it,divider:Y(it[500],.24),action:{hover:Y(it[500],.08),selected:Y(it[500],.16),disabled:Y(it[500],.8),disabledBackground:Y(it[500],.24),focus:Y(it[500],.24),hoverOpacity:.08,disabledOpacity:.48}},pi=t=>{const e={...Rs,mode:"light",text:{primary:it[800],secondary:it[600],disabled:it[500]},background:{paper:"#fff",default:it[100],neutral:it[200]},action:{...Rs.action,active:it[600]}},n={...Rs,mode:"dark",text:{primary:"#fff",secondary:it[500],disabled:it[600]},background:{paper:it[800],default:it[900],neutral:Y(it[500],.16)},action:{...Rs.action,active:it[500]}};return t==="light"?e:n},Ire=t=>({lighter:Tp(t,.815),light:Tp(t,.225),main:t,dark:kp(t,.15),darker:kp(t,.35)}),$re=t=>Ore(t).luminosity()<=.55?"#fff":it[900],Fre=t=>{const e=Ire(t);return{...Rs,primary:{...e,contrastText:$re(e.main)},mode:"light",text:{primary:it[800],secondary:it[600],disabled:it[500]},background:{paper:"#fff",default:it[100],neutral:it[200]},action:{active:it[600],...Rs.action}}},Fk=pi("light"),Lre=Fk.grey[500],Rre=Fk.common.black;function Lk(t,e){const n=Y(t,.16);return{z1:`0 1px 2px 0 ${n}`,z4:`0 4px 8px 0 ${n}`,z8:`0 8px 16px 0 ${n}`,z12:`0 12px 24px -4px ${n}`,z16:`0 16px 32px -4px ${n}`,z20:`0 20px 40px -4px ${n}`,z24:`0 24px 48px 0 ${n}`,primary:`0 8px 16px 0 ${Y(e||pi("light").primary.main,.24)}`,info:`0 8px 16px 0 ${Y(pi("light").info.main,.24)}`,secondary:`0 8px 16px 0 ${Y(pi("light").secondary.main,.24)}`,success:`0 8px 16px 0 ${Y(pi("light").success.main,.24)}`,warning:`0 8px 16px 0 ${Y(pi("light").warning.main,.24)}`,error:`0 8px 16px 0 ${Y(pi("light").error.main,.24)}`,card:`0 0 2px 0 ${Y(t,.2)}, 0 12px 24px -4px ${Y(t,.12)}`,dialog:`-40px 40px 80px -8px ${Y(t,.24)}`,dropdown:`0 0 2px 0 ${Y(t,.24)}, -20px 20px 40px -4px ${Y(t,.24)}`}}const Bre=(t,e)=>Lk(t==="light"?Lre:Rre,e),Nre=()=>y.jsx(M.GlobalStyles,{styles:{"*":{boxSizing:"border-box"},html:{margin:0,padding:0,width:"100%",height:"100%",WebkitOverflowScrolling:"touch"},body:{margin:0,padding:0,width:"100%",height:"100%",backgroundColor:"#fff"},"#root":{width:"100%",height:"100%"},input:{"&[type=number]":{MozAppearance:"textfield","&::-webkit-outer-spin-button":{margin:0,WebkitAppearance:"none"},"&::-webkit-inner-spin-button":{margin:0,WebkitAppearance:"none"}},"&[type=search]":{"&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{WebkitAppearance:"none"}}},img:{display:"block",maxWidth:"100%"},ul:{margin:0,padding:0},".SnackbarContainer-root":{transform:"scale(1)",zIndex:"9999 !important",maxHeight:"0 !important","& .MuiCollapse-wrapper":{maxHeight:"0 !important"}}}}),jre=["primary","secondary","info","success","warning","error"];function Vre(t){const e=t.palette.mode==="light",n=r=>{const i=r.color==="default",o=r.color==="inherit",s=r.variant==="circular",a=r.variant==="extended",l=r.variant==="outlined",u=r.variant==="outlinedExtended",c=r.variant==="soft",h=r.variant==="softExtended",f={"&:hover, &:active":{boxShadow:"none"},...(s||a)&&{...(i||o)&&{color:t.palette.grey[800],boxShadow:t.customShadows.z8,"&:hover":{backgroundColor:t.palette.grey[400]}},...o&&{...!e&&{color:"inherit",backgroundColor:t.palette.grey[800],"&:hover":{backgroundColor:t.palette.grey[700]}}}},...(l||u)&&{boxShadow:"none",backgroundColor:"transparent",...(i||o)&&{border:`solid 1px ${Y(t.palette.grey[500],.32)}`,"&:hover":{backgroundColor:t.palette.action.hover}},...i&&{...!e&&{color:t.palette.text.secondary}}},...(c||h)&&{boxShadow:"none",...i&&{color:t.palette.grey[800],backgroundColor:t.palette.grey[300],"&:hover":{backgroundColor:t.palette.grey[400]}},...o&&{backgroundColor:Y(t.palette.grey[500],.08),"&:hover":{backgroundColor:Y(t.palette.grey[500],.24)}}}},d=jre.map(m=>({...r.color===m&&{...(s||a)&&{boxShadow:t.customShadows[m],"&:hover":{backgroundColor:t.palette[m].dark}},...(l||u)&&{color:t.palette[m].main,border:`solid 1px ${Y(t.palette[m].main,.48)}`,"&:hover":{backgroundColor:Y(t.palette[m].main,.08),border:`solid 1px ${t.palette[m].main}`}},...(c||h)&&{color:t.palette[m][e?"dark":"light"],backgroundColor:Y(t.palette[m].main,.16),"&:hover":{backgroundColor:Y(t.palette[m].main,.32)}}}})),p={"&.Mui-disabled":{...(l||u)&&{backgroundColor:"transparent",border:`solid 1px ${t.palette.action.disabledBackground}`}}},g={...(a||u||h)&&{width:"auto","& svg":{marginRight:t.spacing(1)},...r.size==="small"&&{height:34,minHeight:34,borderRadius:17,padding:t.spacing(0,1)},...r.size==="medium"&&{height:40,minHeight:40,borderRadius:20,padding:t.spacing(0,2)},...r.size==="large"&&{height:48,minHeight:48,borderRadius:24,padding:t.spacing(0,2)}}};return[...d,f,p,g]};return{MuiFab:{defaultProps:{color:"primary"},styleOverrides:{root:({ownerState:r})=>n(r)}}}}function zre(t){return{MuiCard:{styleOverrides:{root:{position:"relative",boxShadow:t.customShadows.card,borderRadius:Number(t.shape.borderRadius)*2,zIndex:0}}},MuiCardHeader:{defaultProps:{titleTypographyProps:{variant:"h6"},subheaderTypographyProps:{variant:"body2",marginTop:t.spacing(.5)}},styleOverrides:{root:{padding:t.spacing(3,3,0)}}},MuiCardContent:{styleOverrides:{root:{padding:t.spacing(3)}}}}}function Wre(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L12,10.59 L13.29,9.29 C13.6821222,8.89787783 14.3178778,8.89787783 14.71,9.29 C15.1021222,9.68212217 15.1021222,10.3178778 14.71,10.71 L13.41,12 L14.71,13.29 Z"})})}function Rk(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M17.56,21 C17.4000767,21.0006435 17.2423316,20.9629218 17.1,20.89 L12,18.22 L6.9,20.89 C6.56213339,21.067663 6.15259539,21.0374771 5.8444287,20.8121966 C5.53626201,20.5869161 5.38323252,20.2058459 5.45,19.83 L6.45,14.2 L2.33,10.2 C2.06805623,9.93860108 1.9718844,9.55391377 2.08,9.2 C2.19824414,8.83742187 2.51242293,8.57366684 2.89,8.52 L8.59,7.69 L11.1,2.56 C11.2670864,2.21500967 11.6166774,1.99588989 12,1.99588989 C12.3833226,1.99588989 12.7329136,2.21500967 12.9,2.56 L15.44,7.68 L21.14,8.51 C21.5175771,8.56366684 21.8317559,8.82742187 21.95,9.19 C22.0581156,9.54391377 21.9619438,9.92860108 21.7,10.19 L17.58,14.19 L18.58,19.82 C18.652893,20.2027971 18.4967826,20.5930731 18.18,20.82 C17.9989179,20.9468967 17.7808835,21.010197 17.56,21 L17.56,21 Z"})})}function Hre(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M13,16 C13,16.5522847 12.5522847,17 12,17 C11.4477153,17 11,16.5522847 11,16 L11,11 C11,10.4477153 11.4477153,10 12,10 C12.5522847,10 13,10.4477153 13,11 L13,16 Z M12,9 C11.4477153,9 11,8.55228475 11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 C13,8.55228475 12.5522847,9 12,9 Z"})})}function qre(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M22.56,16.3 L14.89,3.58 C14.2597186,2.59400001 13.1702353,1.99737652 12,1.99737652 C10.8297647,1.99737652 9.74028139,2.59400001 9.11,3.58 L1.44,16.3 C0.888546003,17.2192471 0.869485343,18.3628867 1.39,19.3 C1.99197363,20.3551378 3.11522982,21.0046397 4.33,21 L19.67,21 C20.8765042,21.0128744 21.9978314,20.3797441 22.61,19.34 C23.146086,18.3926382 23.1269508,17.2292197 22.56,16.3 L22.56,16.3 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,9 C11,8.44771525 11.4477153,8 12,8 C12.5522847,8 13,8.44771525 13,9 L13,13 Z"})})}function Ure(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M16.3,9.61 L11.73,15.61 C11.5412074,15.855247 11.2494966,15.9992561 10.94,16.0000145 C10.6322197,16.001658 10.3408221,15.861492 10.15,15.62 L7.71,12.51 C7.49028166,12.2277602 7.43782669,11.8497415 7.57239438,11.5183399 C7.70696206,11.1869384 8.00810836,10.9525017 8.36239438,10.9033399 C8.7166804,10.8541782 9.07028166,10.9977602 9.29,11.28 L10.92,13.36 L14.7,8.36 C14.917932,8.07418751 15.2717886,7.92635122 15.6282755,7.97217964 C15.9847624,8.01800806 16.2897207,8.25053875 16.4282755,8.58217966 C16.5668304,8.91382056 16.517932,9.29418753 16.3,9.58 L16.3,9.61 Z"})})}function Yre(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 L13,13 Z"})})}function Gre(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M17.9 2.318A5 5 0 0 1 22.895 7.1l.005.217v10a5 5 0 0 1-4.783 4.995l-.217.005h-10a5 5 0 0 1-4.995-4.783l-.005-.217v-10a5 5 0 0 1 4.783-4.996l.217-.004h10Zm-.5 1.5h-9a4 4 0 0 0-4 4v9a4 4 0 0 0 4 4h9a4 4 0 0 0 4-4v-9a4 4 0 0 0-4-4Z"})})}function Kre(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5Zm-1.625 7.255-4.13 4.13-1.75-1.75a.881.881 0 0 0-1.24 0c-.34.34-.34.89 0 1.24l2.38 2.37c.17.17.39.25.61.25.23 0 .45-.08.62-.25l4.75-4.75c.34-.34.34-.89 0-1.24a.881.881 0 0 0-1.24 0Z"})})}function Xre(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M17,2 C19.7614,2 22,4.23858 22,7 L22,7 L22,17 C22,19.7614 19.7614,22 17,22 L17,22 L7,22 C4.23858,22 2,19.7614 2,17 L2,17 L2,7 C2,4.23858 4.23858,2 7,2 L7,2 Z M15,11 L9,11 C8.44772,11 8,11.4477 8,12 C8,12.5523 8.44772,13 9,13 L15,13 C15.5523,13 16,12.5523 16,12 C16,11.4477 15.5523,11 15,11 Z"})})}function Zre(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M12 2A10 10 0 1 1 2 12C2 6.477 6.477 2 12 2Zm0 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Z"})})}function Qre(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M12 2A10 10 0 1 1 2 12C2 6.477 6.477 2 12 2Zm0 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17ZM12 7a5 5 0 1 1 0 10 5 5 0 0 1 0-10Z"})})}function Jre(t){return y.jsx(M.SvgIcon,{...t,sx:{right:12,fontSize:16,position:"absolute",pointerEvents:"none"},children:y.jsx("path",{d:"M12,16 C11.7663478,16.0004565 11.5399121,15.9190812 11.36,15.77 L5.36,10.77 C4.93474074,10.4165378 4.87653776,9.78525926 5.23,9.36 C5.58346224,8.93474074 6.21474074,8.87653776 6.64,9.23 L12,13.71 L17.36,9.39 C17.5665934,9.2222295 17.8315409,9.14373108 18.0961825,9.17188444 C18.3608241,9.2000378 18.6033268,9.33252029 18.77,9.54 C18.9551341,9.74785947 19.0452548,10.0234772 19.0186853,10.3005589 C18.9921158,10.5776405 18.8512608,10.8311099 18.63,11 L12.63,15.83 C12.444916,15.955516 12.2231011,16.0153708 12,16 Z"})})}function eie(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M12,8 C12.5522847,8 13,8.44771525 13,9 L13,9 L13,11 L15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L13,13 L13,15 C13,15.5522847 12.5522847,16 12,16 C11.4477153,16 11,15.5522847 11,15 L11,15 L11,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 L11,11 L11,9 C11,8.44771525 11.4477153,8 12,8 Z"})})}function tie(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 Z"})})}function nie(t){return y.jsx(M.SvgIcon,{...t,children:y.jsx("path",{d:"M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M14,8.99420168 C14.2666375,8.99420168 14.5222334,9.10068735 14.71,9.29 C14.8993127,9.4777666 15.0057983,9.73336246 15.0057983,10 C15.0057983,10.2666375 14.8993127,10.5222334 14.71,10.71 L14.71,10.71 L13.41,12 L14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L10.71,9.29 L12,10.59 L13.29,9.29 C13.4777666,9.10068735 13.7333625,8.99420168 14,8.99420168 Z"})})}const rie=["primary","secondary","info","success","warning","error"];function iie(t){const e=t.palette.mode==="light",n=r=>{const i=r.color==="default",o=r.variant==="filled",s=r.variant==="outlined",a=r.variant==="soft",l={...i&&{"& .MuiChip-avatar":{color:t.palette.text[e?"secondary":"primary"],backgroundColor:Y(t.palette.grey[500],.48)},...s&&{border:`solid 1px ${Y(t.palette.grey[500],.32)}`},...a&&{color:t.palette.text.primary,backgroundColor:Y(t.palette.grey[500],.16),"&:hover":{backgroundColor:Y(t.palette.grey[500],.32)}}}};return[...rie.map(c=>({...r.color===c&&{"& .MuiChip-avatar":{color:t.palette[c].lighter,backgroundColor:t.palette[c].dark},...o&&{"& .MuiChip-deleteIcon":{color:Y(t.palette[c].contrastText,.56),"&:hover":{color:t.palette[c].contrastText}}},...a&&{color:t.palette[c][e?"dark":"light"],backgroundColor:Y(t.palette[c].main,.16),"&:hover":{backgroundColor:Y(t.palette[c].main,.32)},"& .MuiChip-deleteIcon":{color:Y(t.palette[c][e?"dark":"light"],.48),"&:hover":{color:t.palette[c].dark}}}}})),l]};return{MuiChip:{defaultProps:{deleteIcon:y.jsx(Wre,{})},styleOverrides:{root:({ownerState:r})=>n(r)}}}}function oie(t){return{MuiTabs:{defaultProps:{textColor:"inherit",allowScrollButtonsMobile:!0,variant:"scrollable"},styleOverrides:{scrollButtons:{width:48,borderRadius:"50%"}}},MuiTab:{defaultProps:{disableRipple:!0,iconPosition:"start"},styleOverrides:{root:({ownerState:e})=>({padding:0,opacity:1,minWidth:48,fontWeight:t.typography.fontWeightMedium,textTransform:"none","&:not(:last-of-type)":{marginRight:t.spacing(3),[t.breakpoints.up("sm")]:{marginRight:t.spacing(5)}},"&:not(.Mui-selected)":{color:t.palette.text.secondary},...(e.iconPosition==="start"||e.iconPosition==="end")&&{minHeight:48}})}}}}function sie(t){return{MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:t.palette.action.selected,"&:hover":{backgroundColor:t.palette.action.hover}}}}}}}function aie(t){return{MuiLink:{defaultProps:{underline:"hover"}}}}function lie(t){return{MuiListItemIcon:{styleOverrides:{root:{color:"inherit",minWidth:"auto",marginRight:t.spacing(2)}}},MuiListItemAvatar:{styleOverrides:{root:{minWidth:"auto",marginRight:t.spacing(2)}}},MuiListItemText:{styleOverrides:{root:{marginTop:0,marginBottom:0},multiline:{marginTop:0,marginBottom:0}}}}}function uie(t){return{MuiTableContainer:{styleOverrides:{root:{position:"relative"}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:t.palette.action.selected,"&:hover":{backgroundColor:t.palette.action.hover}}}}},MuiTableCell:{styleOverrides:{root:{borderBottom:"none"},head:{color:t.palette.text.secondary,backgroundColor:t.palette.background.neutral},stickyHeader:{backgroundColor:t.palette.background.paper,backgroundImage:`linear-gradient(to bottom, ${t.palette.background.neutral} 0%, ${t.palette.background.neutral} 100%)`},paddingCheckbox:{paddingLeft:t.spacing(1)}}},MuiTablePagination:{defaultProps:{backIconButtonProps:{size:"small"},nextIconButtonProps:{size:"small"},SelectProps:{MenuProps:{MenuListProps:{sx:{"& .MuiMenuItem-root":{...t.typography.body2}}}}}},styleOverrides:{root:{borderTop:`solid 1px ${t.palette.divider}`},toolbar:{height:64},actions:{marginRight:t.spacing(1)},select:{"&:focus":{borderRadius:t.shape.borderRadius}}}}}}const cie=["info","success","warning","error"];function hie(t){const e=t.palette.mode==="light",n=r=>{const i=r.variant==="standard",o=r.variant==="filled",s=r.variant==="outlined";return[...cie.map(l=>({...r.severity===l&&{...i&&{color:t.palette[l][e?"darker":"lighter"],backgroundColor:t.palette[l][e?"lighter":"darker"],"& .MuiAlert-icon":{color:t.palette[l][e?"main":"light"]}},...o&&{color:t.palette[l].contrastText,backgroundColor:t.palette[l].main},...s&&{color:t.palette[l][e?"dark":"light"],border:`solid 1px ${t.palette[l].main}`,"& .MuiAlert-icon":{color:t.palette[l].main}}}}))]};return{MuiAlert:{defaultProps:{iconMapping:{info:y.jsx(Hre,{}),success:y.jsx(Ure,{}),warning:y.jsx(qre,{}),error:y.jsx(Yre,{})}},styleOverrides:{root:({ownerState:r})=>n(r),icon:{opacity:1}}},MuiAlertTitle:{styleOverrides:{root:{marginBottom:t.spacing(.5)}}}}}function fie(t){return{MuiBadge:{styleOverrides:{dot:{width:10,height:10,borderRadius:"50%"}}}}}function die(t){return{MuiPaper:{defaultProps:{elevation:0},styleOverrides:{root:{backgroundImage:"none"}}}}}function pie(t){return{MuiInputBase:{styleOverrides:{root:{"&.Mui-disabled":{"& svg":{color:t.palette.text.disabled}}},input:{"&::placeholder":{opacity:1,color:t.palette.text.disabled}}}},MuiInput:{styleOverrides:{underline:{"&:before":{borderBottomColor:Y(t.palette.grey[500],.56)},"&:after":{borderBottomColor:t.palette.text.primary}}}},MuiTextField:{styleOverrides:{root:{"& .MuiInputLabel-root.Mui-focused":{color:t.palette.text.primary}}}},MuiFilledInput:{styleOverrides:{root:{borderRadius:t.shape.borderRadius,backgroundColor:Y(t.palette.grey[500],.08),"&:hover":{backgroundColor:Y(t.palette.grey[500],.16)},"&.Mui-focused":{backgroundColor:Y(t.palette.grey[500],.16)},"&.Mui-disabled":{backgroundColor:t.palette.action.disabledBackground}},underline:{"&:before, :after":{display:"none"}}}},MuiOutlinedInput:{styleOverrides:{root:{"& .MuiOutlinedInput-notchedOutline":{borderColor:Y(t.palette.grey[500],.32)},"&.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderWidth:1,borderColor:t.palette.text.primary}},"&.Mui-disabled":{"& .MuiOutlinedInput-notchedOutline":{borderColor:t.palette.action.disabledBackground}}}}}}}function gie(t){return{MuiRadio:{defaultProps:{icon:y.jsx(Zre,{}),checkedIcon:y.jsx(Qre,{})},styleOverrides:{root:({ownerState:e})=>({padding:t.spacing(1),...e.size==="small"&&{"& svg":{width:20,height:20}},...e.size==="medium"&&{"& svg":{width:24,height:24}}})}}}}function mie(t){const e=t.palette.mode==="light";return{MuiDrawer:{styleOverrides:{root:({ownerState:n})=>({...n.variant==="temporary"&&{"& .MuiDrawer-paper":{boxShadow:`-40px 40px 80px -8px ${Y(e?t.palette.grey[500]:t.palette.common.black,.24)}`}}})}}}}function vie(t){return{MuiDialog:{styleOverrides:{paper:{boxShadow:t.customShadows.dialog,"&.MuiPaper-rounded":{borderRadius:Number(t.shape.borderRadius)*2},"&.MuiDialog-paperFullScreen":{borderRadius:0},"&.MuiDialog-paper .MuiDialogActions-root":{padding:t.spacing(3)},"@media (max-width: 600px)":{margin:t.spacing(2)},"@media (max-width: 663.95px)":{"&.MuiDialog-paperWidthSm.MuiDialog-paperScrollBody":{maxWidth:"100%"}}},paperFullWidth:{width:"100%"}}},MuiDialogTitle:{styleOverrides:{root:{padding:t.spacing(3)}}},MuiDialogContent:{styleOverrides:{root:{padding:t.spacing(0,3)},dividers:{borderTop:0,borderBottomStyle:"dashed",paddingBottom:t.spacing(3)}}},MuiDialogActions:{styleOverrides:{root:{"& > :not(:first-of-type)":{marginLeft:t.spacing(1.5)}}}}}}function yie(t){return{MuiAvatar:{styleOverrides:{colorDefault:{color:t.palette.text.secondary,backgroundColor:Y(t.palette.grey[500],.24)}}},MuiAvatarGroup:{defaultProps:{max:4},styleOverrides:{root:{justifyContent:"flex-end"},avatar:{fontSize:16,fontWeight:t.typography.fontWeightMedium,"&:first-of-type":{fontSize:12,color:t.palette.primary.main,backgroundColor:t.palette.primary.lighter}}}}}}function bie(t){return{MuiRating:{defaultProps:{emptyIcon:y.jsx(Rk,{}),icon:y.jsx(Rk,{})},styleOverrides:{root:{"&.Mui-disabled":{opacity:.48}},iconEmpty:{color:Y(t.palette.grey[500],.48)},sizeSmall:{"& svg":{width:20,height:20}},sizeLarge:{"& svg":{width:28,height:28}}}}}}function xie(t){const e=t.palette.mode==="light";return{MuiSlider:{defaultProps:{size:"small"},styleOverrides:{root:{"&.Mui-disabled":{color:t.palette.action.disabled}},rail:{opacity:.32},markLabel:{fontSize:13,color:t.palette.text.disabled},valueLabel:{borderRadius:8,backgroundColor:t.palette.grey[e?800:700]}}}}}const wie=["primary","secondary","info","success","warning","error"];function Cie(t){const e=t.palette.mode==="light",n=r=>{const i=r.color==="inherit",o=r.variant==="contained",s=r.variant==="outlined",a=r.variant==="text",l=r.variant==="soft",u=r.size==="small",c=r.size==="large",h={textTransform:"none",...i&&{...o&&{color:t.palette.grey[800],"&:hover":{boxShadow:t.customShadows.z8,backgroundColor:t.palette.grey[400]}},...s&&{borderColor:Y(t.palette.grey[500],.32),"&:hover":{borderColor:t.palette.text.primary,backgroundColor:t.palette.action.hover}},...a&&{"&:hover":{backgroundColor:t.palette.action.hover}},...l&&{color:t.palette.text.primary,backgroundColor:Y(t.palette.grey[500],.08),"&:hover":{backgroundColor:Y(t.palette.grey[500],.24)}}}},f=wie.map(g=>({...r.color===g&&{...o&&{"&:hover":{boxShadow:t.customShadows[g]}},...l&&{color:t.palette[g][e?"dark":"light"],backgroundColor:Y(t.palette[g].main,.16),"&:hover":{backgroundColor:Y(t.palette[g].main,.32)}}}})),d={"&.Mui-disabled":{...l&&{backgroundColor:t.palette.action.disabledBackground}}},p={...u&&{height:30,fontSize:13,...l&&{padding:"4px 10px"}},...c&&{height:48,fontSize:15,...l&&{padding:"8px 22px"}}};return[...f,h,d,p]};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:({ownerState:r})=>n(r)}}}}function Sie(t){const e=t.palette.mode==="light",n=r=>({padding:"9px 13px 9px 12px",width:58,height:38,...r.size==="small"&&{padding:"4px 8px 4px 7px",width:40,height:24},"& .MuiSwitch-thumb":{width:14,height:14,boxShadow:"none",color:`${t.palette.common.white} !important`,...r.size==="small"&&{width:10,height:10}},"& .MuiSwitch-track":{opacity:1,borderRadius:14,backgroundColor:Y(t.palette.grey[500],.48)},"& .MuiSwitch-switchBase":{left:3,padding:12,...r.size==="small"&&{padding:7},"&.Mui-checked":{transform:"translateX(13px)","&+.MuiSwitch-track":{opacity:1},...r.size==="small"&&{transform:"translateX(9px)"}},"&.Mui-disabled":{"& .MuiSwitch-thumb":{opacity:e?1:.48},"&+.MuiSwitch-track":{opacity:.48}}}});return{MuiSwitch:{styleOverrides:{root:({ownerState:r})=>n(r)}}}}function kie(t){return{MuiSelect:{defaultProps:{IconComponent:Jre}}}}function Tie(t){return{MuiSvgIcon:{styleOverrides:{fontSizeLarge:{width:32,height:32,fontSize:"inherit"}}}}}function Eie(t){const e=t.palette.mode==="light";return{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:t.palette.grey[e?800:700]},arrow:{color:t.palette.grey[e?800:700]}}}}}function Mie(t){return{MuiPopover:{styleOverrides:{paper:{boxShadow:t.customShadows.dropdown,borderRadius:Number(t.shape.borderRadius)*1.5}}}}}function Oie(t){return{MuiStepConnector:{styleOverrides:{line:{borderColor:t.palette.divider}}}}}function Aie(t){return{MuiDataGrid:{styleOverrides:{root:{border:0,padding:8,"& .MuiTablePagination-root":{borderTop:0},"& .MuiDataGrid-columnHeader:focus, .MuiDataGrid-cell:focus, .MuiDataGrid-columnHeader:focus-within, .MuiDataGrid-cell:focus-within":{outline:"none"}},main:{backgroundColor:"#F5F5F5",borderRadius:8,outline:"8px solid #F5F5F5"},columnHeader:{fontSize:13,fontWeight:600,color:t.palette.grey[600],padding:"0 16px",borderColor:"transparent"},row:{borderRadius:8,backgroundColor:"#FFFFFF",color:t.palette.grey[800]},rowReorderCell:{color:t.palette.grey[400]},cell:{borderBottom:0,padding:"0 16px"},columnSeparator:{color:t.palette.divider,"&:hover":{color:t.palette.primary.main}},toolbarContainer:{padding:t.spacing(2),backgroundColor:t.palette.background.paper,borderTop:`solid 1px ${t.palette.divider}`,"& .MuiButton-root":{marginRight:t.spacing(1.5),color:t.palette.text.secondary,"&:hover":{backgroundColor:t.palette.action.hover}}},paper:{boxShadow:t.customShadows.dropdown},menu:{"& .MuiPaper-root":{boxShadow:t.customShadows.dropdown,padding:8,borderRadius:12},"& .MuiMenuItem-root":{borderRadius:8,...t.typography.body2,"& .MuiListItemIcon-root":{minWidth:"auto",color:t.palette.primary.main},"& .MuiListItemText-primary":{fontSize:14}}},panelFooter:{padding:t.spacing(2),justifyContent:"flex-end",borderTop:`1px solid ${t.palette.divider}`,"& .MuiButton-root":{"&:first-of-type":{marginRight:t.spacing(1.5),color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.action.hover}},"&:last-of-type":{color:t.palette.common.white,backgroundColor:t.palette.primary.main,"&:hover":{backgroundColor:t.palette.primary.dark}}}},filterForm:{padding:t.spacing(1.5,0),"& .MuiFormControl-root":{margin:t.spacing(0,.5)},"& .MuiInput-root":{marginTop:t.spacing(3),"&::before, &::after":{display:"none"},"& .MuiNativeSelect-select, .MuiInput-input":{...t.typography.body2,padding:t.spacing(.75,1),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.neutral},"& .MuiSvgIcon-root":{right:4}}},overlayWrapper:{height:"100% !important"},overlayWrapperInner:{height:"100% !important"}}}}}function Pie(t){return{MuiSkeleton:{defaultProps:{animation:"wave"},styleOverrides:{root:{backgroundColor:t.palette.background.neutral}}}}}function Die(t){return{MuiBackdrop:{styleOverrides:{root:{backgroundColor:Y(t.palette.grey[800],.8)},invisible:{background:"transparent"}}}}}const _ie=["primary","secondary","info","success","warning","error"];function Iie(t){const e=n=>{const r=n.variant==="buffer",i={borderRadius:4,"& .MuiLinearProgress-bar":{borderRadius:4},...r&&{backgroundColor:"transparent"}};return[..._ie.map(s=>({...n.color===s&&{backgroundColor:M.alpha(t.palette[s].main,.24)}})),i]};return{MuiLinearProgress:{styleOverrides:{root:({ownerState:n})=>e(n)}}}}function $ie(t){return{MuiTimelineDot:{styleOverrides:{root:{boxShadow:"none"}}},MuiTimelineConnector:{styleOverrides:{root:{backgroundColor:t.palette.divider}}}}}function Fie(t){return{MuiTreeView:{defaultProps:{defaultCollapseIcon:y.jsx(eie,{sx:{width:20,height:20}}),defaultExpandIcon:y.jsx(tie,{sx:{width:20,height:20}}),defaultEndIcon:y.jsx(nie,{sx:{color:"text.secondary",width:20,height:20}})}},MuiTreeItem:{styleOverrides:{label:{...t.typography.body2},iconContainer:{width:"auto"}}}}}function Lie(t){return{MuiCheckbox:{defaultProps:{icon:y.jsx(Gre,{}),checkedIcon:y.jsx(Kre,{}),indeterminateIcon:y.jsx(Xre,{})},styleOverrides:{root:({ownerState:e})=>({padding:t.spacing(1),...e.size==="small"&&{"& svg":{width:20,height:20}},...e.size==="medium"&&{"& svg":{width:24,height:24}}})}}}}function Rie(t){return{MuiAccordion:{styleOverrides:{root:{backgroundColor:"transparent","&.Mui-expanded":{boxShadow:t.customShadows.z8,borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.paper},"&.Mui-disabled":{backgroundColor:"transparent"}}}},MuiAccordionSummary:{styleOverrides:{root:{paddingLeft:t.spacing(2),paddingRight:t.spacing(1),"&.Mui-disabled":{opacity:1,color:t.palette.action.disabled,"& .MuiTypography-root":{color:"inherit"}}},expandIconWrapper:{color:"inherit"}}}}}function Bie(t){return{MuiTypography:{styleOverrides:{paragraph:{marginBottom:t.spacing(2)},gutterBottom:{marginBottom:t.spacing(1)}}}}}const Nie=["primary","secondary","info","success","warning","error"];function jie(t){const e=t.palette.mode==="light",n=r=>{const i=r.variant==="outlined",o=r.variant==="soft",s={"& .MuiPaginationItem-root":{...i&&{borderColor:Y(t.palette.grey[500],.32)},"&.Mui-selected":{fontWeight:t.typography.fontWeightMedium}}};return[...Nie.map(l=>({...r.color===l&&{...o&&{"& .MuiPaginationItem-root":{"&.Mui-selected":{color:t.palette[l][e?"dark":"light"],backgroundColor:Y(t.palette[l].main,.16),"&:hover":{backgroundColor:Y(t.palette[l].main,.32)}}}}}})),s]};return{MuiPagination:{defaultProps:{color:"primary"},styleOverrides:{root:({ownerState:r})=>n(r)}}}}function Vie(t){return{MuiBreadcrumbs:{styleOverrides:{separator:{marginLeft:t.spacing(2),marginRight:t.spacing(2)},li:{display:"inline-flex",margin:t.spacing(.25,0),"& > *":{...t.typography.body2}}}}}}const zie=["primary","secondary","info","success","warning","error"];function Wie(t){const e=n=>{const r=n.color==="inherit",i=n.variant==="contained",o=n.variant==="outlined",s=n.variant==="text",a=n.variant==="soft",l=n.orientation==="horizontal",u=n.orientation==="vertical",c={"& .MuiButtonGroup-grouped":{"&:not(:last-of-type)":{...!o&&{borderStyle:"solid",...r&&{borderColor:Y(t.palette.grey[500],.32)},...l&&{borderWidth:"0px 1px 0px 0px"},...u&&{borderWidth:"0px 0px 1px 0px"}}}}},h=zie.map(d=>({"& .MuiButtonGroup-grouped":{"&:not(:last-of-type)":{...!o&&{...n.color===d&&{...i&&{borderColor:Y(t.palette[d].dark,.48)},...s&&{borderColor:Y(t.palette[d].main,.48)},...a&&{borderColor:Y(t.palette[d].dark,.24)}}}}}})),f={"& .MuiButtonGroup-grouped.Mui-disabled":{"&:not(:last-of-type)":{borderColor:t.palette.action.disabledBackground}}};return[...h,c,f]};return{MuiButtonGroup:{defaultProps:{disableElevation:!0},styleOverrides:{root:({ownerState:n})=>e(n)}}}}function Hie(t){return{MuiAutocomplete:{styleOverrides:{root:{"& span.MuiAutocomplete-tag":{...t.typography.body2,width:24,height:24,lineHeight:"24px",textAlign:"center",borderRadius:t.shape.borderRadius,backgroundColor:Y(t.palette.grey[500],.16)}},paper:{boxShadow:t.customShadows.dropdown},listbox:{padding:t.spacing(0,1)},option:{...t.typography.body2,padding:t.spacing(1),margin:t.spacing(.75,0),borderRadius:t.shape.borderRadius}}}}}const qie=["primary","secondary","info","success","warning","error"];function Uie(t){const e=n=>{const i={...n.color==="standard"&&{"&.Mui-selected":{borderColor:"inherit"}}},o=qie.map(a=>({...n.color===a&&{"&:hover":{borderColor:Y(t.palette[a].main,.48),backgroundColor:Y(t.palette[a].main,t.palette.action.hoverOpacity)},"&.Mui-selected":{borderColor:t.palette[a].main}}})),s={"&.Mui-disabled":{"&.Mui-selected":{color:t.palette.action.disabled,backgroundColor:t.palette.action.selected,borderColor:t.palette.action.disabledBackground}}};return[...o,i,s]};return{MuiToggleButton:{styleOverrides:{root:({ownerState:n})=>e(n)}},MuiToggleButtonGroup:{styleOverrides:{root:{borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.paper,border:`solid 1px ${Y(t.palette.grey[500],.16)}`},grouped:{margin:4,borderColor:"transparent !important",borderRadius:`${t.shape.borderRadius}px !important`}}}}}function Yie(t){return{MuiFormControlLabel:{styleOverrides:{label:{...t.typography.body2}}},MuiFormHelperText:{defaultProps:{component:"div"},styleOverrides:{root:{marginTop:t.spacing(1)}}},MuiFormLabel:{styleOverrides:{root:{color:t.palette.text.disabled}}}}}function Gie(t){return{MuiLoadingButton:{variants:[{props:{loading:!0,loadingPosition:"start",size:"small"},style:{"& .MuiLoadingButton-loadingIndicatorStart":{left:10}}},{props:{loading:!0,loadingPosition:"end",size:"small"},style:{"& .MuiLoadingButton-loadingIndicatorEnd":{right:10}}}],styleOverrides:{loadingIndicatorStart:{left:14},loadingIndicatorEnd:{right:14}}}}}function Kie(t){return Object.assign(Vre(t),oie(t),iie(t),zre(t),sie(t),aie(),pie(t),gie(t),fie(),lie(t),uie(t),die(),hie(t),Sie(t),kie(),Cie(t),bie(t),vie(t),yie(t),xie(t),mie(t),Oie(t),Eie(t),Mie(t),Tie(),Lie(t),Aie(t),Pie(t),$ie(t),Fie(t),Die(t),Iie(t),Rie(t),Bie(t),jie(t),Wie(t),Vie(t),Hie(t),Yie(t),Uie(t),Gie())}const Bk=pi("light"),Xie=Bk.grey[500],Zie=Bk.common.black;function Nk(t){const e=Y(t,.2),n=Y(t,.14),r=Y(t,.12);return["none",`0px 2px 1px -1px ${e},0px 1px 1px 0px ${n},0px 1px 3px 0px ${r}`,`0px 3px 1px -2px ${e},0px 2px 2px 0px ${n},0px 1px 5px 0px ${r}`,`0px 3px 3px -2px ${e},0px 3px 4px 0px ${n},0px 1px 8px 0px ${r}`,`0px 2px 4px -1px ${e},0px 4px 5px 0px ${n},0px 1px 10px 0px ${r}`,`0px 3px 5px -1px ${e},0px 5px 8px 0px ${n},0px 1px 14px 0px ${r}`,`0px 3px 5px -1px ${e},0px 6px 10px 0px ${n},0px 1px 18px 0px ${r}`,`0px 4px 5px -2px ${e},0px 7px 10px 1px ${n},0px 2px 16px 1px ${r}`,`0px 5px 5px -3px ${e},0px 8px 10px 1px ${n},0px 3px 14px 2px ${r}`,`0px 5px 6px -3px ${e},0px 9px 12px 1px ${n},0px 3px 16px 2px ${r}`,`0px 6px 6px -3px ${e},0px 10px 14px 1px ${n},0px 4px 18px 3px ${r}`,`0px 6px 7px -4px ${e},0px 11px 15px 1px ${n},0px 4px 20px 3px ${r}`,`0px 7px 8px -4px ${e},0px 12px 17px 2px ${n},0px 5px 22px 4px ${r}`,`0px 7px 8px -4px ${e},0px 13px 19px 2px ${n},0px 5px 24px 4px ${r}`,`0px 7px 9px -4px ${e},0px 14px 21px 2px ${n},0px 5px 26px 4px ${r}`,`0px 8px 9px -5px ${e},0px 15px 22px 2px ${n},0px 6px 28px 5px ${r}`,`0px 8px 10px -5px ${e},0px 16px 24px 2px ${n},0px 6px 30px 5px ${r}`,`0px 8px 11px -5px ${e},0px 17px 26px 2px ${n},0px 6px 32px 5px ${r}`,`0px 9px 11px -5px ${e},0px 18px 28px 2px ${n},0px 7px 34px 6px ${r}`,`0px 9px 12px -6px ${e},0px 19px 29px 2px ${n},0px 7px 36px 6px ${r}`,`0px 10px 13px -6px ${e},0px 20px 31px 3px ${n},0px 8px 38px 7px ${r}`,`0px 10px 13px -6px ${e},0px 21px 33px 3px ${n},0px 8px 40px 7px ${r}`,`0px 10px 14px -6px ${e},0px 22px 35px 3px ${n},0px 8px 42px 7px ${r}`,`0px 11px 14px -7px ${e},0px 23px 36px 3px ${n},0px 9px 44px 8px ${r}`,`0px 11px 15px -7px ${e},0px 24px 38px 3px ${n},0px 9px 46px 8px ${r}`]}const Qie=t=>Nk(t==="light"?Xie:Zie);function Jt(t){return`${t/16}rem`}function Bs({sm:t,md:e,lg:n}){return{"@media (min-width:600px)":{fontSize:Jt(t)},"@media (min-width:900px)":{fontSize:Jt(e)},"@media (min-width:1200px)":{fontSize:Jt(n)}}}const Jie={fontFamily:"Public Sans, sans-serif",fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:{fontWeight:800,lineHeight:80/64,fontSize:Jt(40),...Bs({sm:52,md:58,lg:64})},h2:{fontWeight:800,lineHeight:64/48,fontSize:Jt(32),...Bs({sm:40,md:44,lg:48})},h3:{fontWeight:700,lineHeight:1.5,fontSize:Jt(24),...Bs({sm:26,md:30,lg:32})},h4:{fontWeight:700,lineHeight:1.5,fontSize:Jt(20),...Bs({sm:20,md:24,lg:24})},h5:{fontWeight:700,lineHeight:1.5,fontSize:Jt(18),...Bs({sm:19,md:20,lg:20})},h6:{fontWeight:700,lineHeight:28/18,fontSize:Jt(17),...Bs({sm:18,md:18,lg:18})},subtitle1:{fontWeight:600,lineHeight:1.5,fontSize:Jt(16)},subtitle2:{fontWeight:600,lineHeight:22/14,fontSize:Jt(14)},body1:{lineHeight:1.5,fontSize:Jt(16)},body2:{lineHeight:22/14,fontSize:Jt(14)},caption:{lineHeight:1.5,fontSize:Jt(12)},overline:{fontWeight:700,lineHeight:1.5,fontSize:Jt(12),textTransform:"uppercase"},button:{fontWeight:700,lineHeight:24/14,fontSize:Jt(14),textTransform:"capitalize"}},jk=({children:t,color:e,direction:n="ltr",themeMode:r="light"})=>{const i=v.useMemo(()=>({palette:Fre(e),typography:Jie,shape:{borderRadius:8},direction:n,shadows:Qie(r),customShadows:Bre(r,e)}),[e,n,r]),o=Bx(i);return o.components=Kie(o),y.jsxs(jx,{theme:o,children:[y.jsx(M.CssBaseline,{}),y.jsx(Nre,{}),t]})},c1e="",h1e="",eoe=({themeColor:t,children:e})=>y.jsx(va.LocalizationProvider,{dateAdapter:Tne,adapterLocale:sre,children:y.jsx(Wx,{children:y.jsx(jk,{color:t,children:y.jsx(dI,{children:e})})})}),toe=({modalTitle:t="Tem certeza que deseja excluir?",message:e="Essa ação não poderá ser desfeita.",cancelButtonText:n="Cancelar",confirmButtonText:r="Sim, excluir registro",onClose:i,onConfirm:o,confirming:s,...a})=>y.jsxs(M.Dialog,{fullWidth:!0,maxWidth:"xs",...a,onClose:i,children:[y.jsx(M.DialogTitle,{children:t}),y.jsx(M.DialogContent,{children:e}),y.jsxs(M.DialogActions,{children:[y.jsx(M.Button,{variant:"outlined",color:"inherit",onClick:i,size:"large",children:n}),y.jsx(HO.LoadingButton,{variant:"contained",onClick:o,size:"large",loading:s,children:r})]})]}),Ns=t=>t&&t.charAt(0).toUpperCase(),noe=t=>["A","N","H","L","Q"].includes(Ns(t))?"primary":["F","G","T","I","J"].includes(Ns(t))?"info":["K","D","Y","B","O"].includes(Ns(t))?"success":["P","E","R","S","U"].includes(Ns(t))?"warning":["V","W","X","M","Z"].includes(Ns(t))?"error":"default",Vk=v.forwardRef(({color:t,name:e="",BadgeProps:n,children:r,sx:i,...o},s)=>{var f,d;const a=Yi(),l=Ns(e),u=noe(e),c=t||u,h=c==="default"?y.jsxs(M.Avatar,{ref:s,sx:i,...o,children:[e&&l,r]}):y.jsxs(M.Avatar,{ref:s,sx:{color:(f=a.palette[c])==null?void 0:f.contrastText,backgroundColor:(d=a.palette[c])==null?void 0:d.main,fontWeight:a.typography.fontWeightMedium,...i},...o,children:[e&&l,r]});return n?y.jsx(M.Badge,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},...n,children:h}):h});Vk.displayName="CustomAvatar";const gi={tiny:24,small:32,medium:40,large:56},zk=v.forwardRef(({size:t="small",compact:e,max:n,children:r,sx:i,...o},s)=>{const a=t==="tiny",l=t==="small",u=t==="medium",c=t==="large",h={width:40,height:40,position:"relative","& .MuiAvatarGroup-avatar":{m:0,width:28,height:28,position:"absolute","&:first-of-type":{left:0,bottom:0,zIndex:9},"&:last-of-type":{top:0,right:0}}};return y.jsx(M.AvatarGroup,{ref:s,max:e?3:n,spacing:(a||l)&&"medium"||"small",sx:{"& .MuiAvatar-root":{...c&&{width:gi.large,height:gi.large,"&:first-of-type":{fontSize:16}},...u&&{width:gi.medium,height:gi.medium},...l&&{width:gi.small,height:gi.small},...a&&{width:gi.tiny,height:gi.tiny}},...e&&{...h},...i},...o,children:r})});zk.displayName="CustomAvatarGroup";const xh=({sx:t})=>y.jsx(M.LinearProgress,{sx:{position:"absolute",top:0,left:0,width:1,zIndex:9999,...t}}),Wk=M.styled(M.Box)({display:"flex",flexDirection:"row",alignItems:"center",padding:"0 16px"}),roe=()=>{var c,h;const t=ei.useGridApiContext(),{rowHeight:e,paginationModel:n,initialState:r}=ei.useGridRootProps(),i=(n==null?void 0:n.pageSize)||((h=(c=r==null?void 0:r.pagination)==null?void 0:c.paginationModel)==null?void 0:h.pageSize)||10,o=ei.gridColumnsTotalWidthSelector(t),s=ei.gridColumnPositionsSelector(t),a=v.useMemo(()=>s.filter(f=>f<=o).length,[o,s]),l=t.current.getVisibleColumns().slice(0,a),u=v.useMemo(()=>{const f=[];for(let d=0;d<i;d+=1){for(const p of l)f.push(y.jsx(Wk,{sx:{justifyContent:p.align},children:y.jsx(M.Skeleton,{width:"100%"})},`column-${d}-${p.field}`));f.push(y.jsx(Wk,{},`fill-${d}`))}return f},[i,l]);return y.jsx(M.Stack,{display:"grid",sx:{display:"grid",gridTemplateColumns:`${l.map(({computedWidth:f})=>`${f}px`).join(" ")} 1fr`,gridAutoRows:e,backgroundColor:"grey.0",borderRadius:1,overflow:"hidden"},children:u})},ioe=()=>{const e=Yi().palette.primary.main;return y.jsxs(y.Fragment,{children:[y.jsx("defs",{children:y.jsxs("linearGradient",{id:"BG",x1:"19.496%",x2:"77.479%",y1:"71.822%",y2:"16.69%",children:[y.jsx("stop",{offset:"0%",stopColor:e}),y.jsx("stop",{offset:"100%",stopColor:e,stopOpacity:"0"})]})}),y.jsx("path",{fill:"url(#BG)",fillRule:"nonzero",d:"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z",opacity:"0.2"})]})},ooe=v.memo(ioe),soe=({...t})=>{const e=Yi(),n=e.palette.primary.main,r=e.palette.primary.dark,i=e.palette.primary.darker;return y.jsx(M.Box,{...t,children:y.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 480 360",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx(ooe,{}),y.jsx("defs",{children:y.jsxs("linearGradient",{id:"linearGradient-2",x1:"30.113%",x2:"30.113%",y1:"0%",y2:"100%",children:[y.jsx("stop",{offset:"0%",stopOpacity:"0"}),y.jsx("stop",{offset:"100%"})]})}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z",opacity:"0.05"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z",opacity:"0.05"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z",opacity:"0.05"}),y.jsx("path",{fill:i,fillRule:"nonzero",d:"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z",transform:"rotate(34.64 262.678 162.06)"}),y.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z",transform:"rotate(34.804 278.687 137.92)"}),y.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z",opacity:"0.5",transform:"rotate(34.64 268.35 153.887)"}),y.jsx("path",{fill:"#FFC107",fillRule:"nonzero",d:"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z",opacity:"0.3",transform:"rotate(34.64 257.265 169.926)"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z",transform:"rotate(16.29 248.893 159.951)"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z",transform:"rotate(16.29 257.127 131.835)"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z",opacity:"0.5",transform:"rotate(16.29 251.658 150.547)"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z",opacity:"0.3",transform:"rotate(16.29 246.19 169.256)"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z",transform:"rotate(4.6 241.52 160.258)"}),y.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z",transform:"rotate(4.6 243.874 131.06)"}),y.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z",opacity:"0.5",transform:"rotate(4.6 242.308 150.487)"}),y.jsx("path",{fill:"#1890FF",fillRule:"nonzero",d:"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z",opacity:"0.3",transform:"rotate(4.6 240.746 169.92)"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z",transform:"rotate(-2.61 236.157 162.002)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z",transform:"rotate(-2.61 234.825 132.734)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z",opacity:"0.5",transform:"rotate(-2.862 236.39 151.563)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z",opacity:"0.3",transform:"rotate(-2.61 236.599 171.683)"}),y.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z"}),y.jsx("path",{fill:"#000",fillRule:"nonzero",d:"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z",opacity:"0.1"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z"}),y.jsx("path",{fill:"#FF4842",fillRule:"nonzero",d:"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z",opacity:"0.1"}),y.jsx("path",{fill:"#FFF",fillRule:"nonzero",d:"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z",opacity:"0.3"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z"}),y.jsx("ellipse",{cx:"380.363",cy:"298.487",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"8.945",ry:"1.513"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z"}),y.jsx("ellipse",{cx:"390.052",cy:"264.383",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"5.044",ry:"1"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z"}),y.jsx("ellipse",{cx:"346.97",cy:"270.022",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"6.09",ry:"1.028"}),y.jsx("rect",{width:"51.026",height:"91.312",x:"303.926",y:"69.211",fill:"#FFF",fillRule:"nonzero",rx:"4.737",transform:"rotate(-71.99 329.44 114.867)"}),y.jsx("circle",{cx:"303.613",cy:"103.507",r:"9.376",fill:n,fillRule:"nonzero",opacity:"0.2"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z",opacity:"0.2",transform:"rotate(-71.99 345.867 106.913)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z",opacity:"0.2",transform:"rotate(-71.99 334.312 110.042)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z",opacity:"0.2",transform:"rotate(-71.99 338.393 118.259)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z",opacity:"0.2",transform:"rotate(-71.99 339.79 125.599)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z",opacity:"0.5",transform:"rotate(-71.99 350.544 140.3)"}),y.jsx("rect",{width:"50.3",height:"78.305",x:"291.549",y:"174.486",fill:"#FFF",fillRule:"nonzero",rx:"4",transform:"rotate(-57.265 316.7 213.638)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z",transform:"rotate(-57.57 285.154 205.563)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z",transform:"rotate(-57.57 298.635 200.737)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z",transform:"rotate(-57.57 304.171 204.251)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z",transform:"rotate(-57.57 309.706 207.771)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z",transform:"rotate(-57.265 315.485 212.94)"}),y.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z",transform:"rotate(-57.57 320.777 214.804)"}),y.jsx("path",{fill:"#F4F6F8",fillRule:"nonzero",d:"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z",transform:"rotate(-57.57 326.313 218.318)"}),y.jsx("path",{fill:"#DFE3E8",fillRule:"nonzero",d:"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z",transform:"rotate(-57.57 345.465 214.454)"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z"}),y.jsx("path",{fill:r,fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.243"}),y.jsx("path",{fill:"url(#linearGradient-2)",fillRule:"nonzero",d:"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z",opacity:"0.32"}),y.jsx("ellipse",{cx:"119.593",cy:"258.664",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),y.jsx("ellipse",{cx:"101.03",cy:"260.545",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"4.846",ry:"1"}),y.jsx("ellipse",{cx:"108.459",cy:"265.905",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),y.jsx("ellipse",{cx:"89.193",cy:"265.433",fill:n,fillRule:"nonzero",opacity:"0.1",rx:"3.444",ry:"1"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M91.113 247.808s8.353 12.115 9.968 12.647"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M90.344 249.701L92.293 249.701"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M92.68 254.132L95.738 254.263"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M94.542 250.586L94.21 252.179"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M97.792 255.432L97.732 256.879"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.051 247.808s-8.371 12.115-9.97 12.647"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M111.82 249.701L109.871 249.701"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M109.485 254.132L106.426 254.263"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M107.622 250.586L107.954 252.179"}),y.jsx("path",{stroke:i,strokeLinecap:"round",strokeWidth:"0.5",d:"M104.372 255.432L104.432 256.879"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z"}),y.jsx("circle",{cx:"84.467",cy:"87.003",r:"6.467",fill:n,fillRule:"nonzero",opacity:"0.1"}),y.jsx("circle",{cx:"395.425",cy:"138.681",r:"6.467",fill:n,fillRule:"nonzero",opacity:"0.1"}),y.jsx("circle",{cx:"279.178",cy:"66.467",r:"6.467",fill:n,fillRule:"nonzero",opacity:"0.1"}),y.jsx("circle",{cx:"97.4",cy:"122.68",r:"10.838",fill:n,fillRule:"nonzero",opacity:"0.1"}),y.jsx("path",{fill:r,fillRule:"nonzero",d:"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z"}),y.jsx("path",{fill:n,fillRule:"nonzero",d:"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761",opacity:"0.72"}),y.jsx("path",{fill:r,fillRule:"nonzero",d:"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z"})]})})},aoe=v.memo(soe),loe=()=>y.jsxs("svg",{width:"480",height:"360",viewBox:"0 0 480 360",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsxs("g",{id:"illustrations/illustration_empty_content",children:[y.jsxs("g",{id:"Illustration/Background",children:[y.jsx("path",{id:"BG",opacity:"0.16",fillRule:"evenodd",clipRule:"evenodd",d:"M0 198.781C0 240.238 14.9454 278.016 39.539 306.566C67.7534 339.331 108.667 359.931 154.273 360C174.204 360.029 193.262 356.113 210.768 348.964C219.819 345.265 229.95 345.69 238.716 350.071C248.999 355.204 260.514 358.082 272.673 358.082C277.696 358.082 282.615 357.587 287.373 356.648C300.954 353.978 313.313 347.658 323.462 338.708C329.841 333.081 338.01 330.252 346.36 330.262H346.502C374.091 330.262 399.717 321.53 420.994 306.566C440.015 293.206 455.548 274.87 465.898 253.341C474.92 234.581 480 213.388 480 190.958C480 114.027 420.226 51.6534 346.502 51.6534C338.986 51.6534 331.622 52.3158 324.439 53.5518C305.418 21.4201 271.355 0 232.498 0C216.093 0 200.54 3.81769 186.619 10.6612C173.379 17.1483 161.608 26.3663 151.978 37.6C119.281 38.144 89.048 49.2899 64.303 67.8914C25.3514 97.1552 0 144.882 0 198.781Z",fill:"url(#paint0_linear_0_9560)"}),y.jsxs("g",{id:"Vector",opacity:"0.2",children:[y.jsx("path",{d:"M271.929 75.6377C269.408 75.6377 266.889 74.6804 264.971 72.7652C261.134 68.9346 261.134 62.7023 264.971 58.8724C268.806 55.0432 275.05 55.0419 278.886 58.8724C282.723 62.703 282.723 68.9353 278.886 72.7652C276.968 74.6804 274.448 75.6377 271.929 75.6377ZM271.929 62.7714C271.147 62.7714 270.364 63.0681 269.769 63.663C268.578 64.8513 268.578 66.7856 269.769 67.9746C270.96 69.1629 272.896 69.1636 274.087 67.9746C275.278 66.7862 275.278 64.852 274.087 63.663C273.492 63.0688 272.71 62.7714 271.929 62.7714Z",fill:"#919EAB"}),y.jsx("path",{d:"M194.574 305C192.054 305 189.534 304.042 187.616 302.127C183.779 298.297 183.779 292.065 187.616 288.235C191.451 284.405 197.696 284.405 201.532 288.235C205.368 292.065 205.368 298.298 201.532 302.127C199.614 304.043 197.093 305 194.574 305ZM194.574 292.134C193.792 292.134 193.01 292.43 192.414 293.025C191.223 294.214 191.223 296.148 192.414 297.337C193.605 298.526 195.541 298.526 196.733 297.337C197.923 296.148 197.923 294.214 196.733 293.025C196.138 292.431 195.355 292.134 194.574 292.134Z",fill:"#919EAB"})]}),y.jsxs("g",{id:"Vector_2",opacity:"0.2",children:[y.jsx("path",{d:"M366.607 258.732C365.739 258.732 364.87 258.401 364.208 257.74L360.16 253.699L356.112 257.74C354.788 259.062 352.639 259.062 351.315 257.74C349.989 256.417 349.989 254.272 351.315 252.949L357.761 246.513C359.085 245.19 361.235 245.19 362.559 246.513L369.006 252.949C370.331 254.272 370.331 256.417 369.006 257.74C368.344 258.4 367.475 258.732 366.607 258.732Z",fill:"#919EAB"}),y.jsx("path",{d:"M127.287 245.825C126.419 245.825 125.549 245.495 124.888 244.833L120.84 240.793L116.792 244.833C115.468 246.156 113.318 246.156 111.994 244.833C110.669 243.51 110.669 241.365 111.994 240.043L118.441 233.607C119.765 232.284 121.915 232.284 123.239 233.607L129.685 240.043C131.011 241.366 131.011 243.511 129.685 244.833C129.023 245.494 128.154 245.825 127.287 245.825Z",fill:"#919EAB"})]})]}),y.jsx("path",{id:"Subtract",opacity:"0.16",fillRule:"evenodd",clipRule:"evenodd",d:"M172.018 173.478H195.091C198.279 173.478 200.859 170.902 200.859 167.719C200.859 164.536 198.279 161.96 195.091 161.96H172.018C168.829 161.96 166.25 164.536 166.25 167.719C166.25 170.902 168.829 173.478 172.018 173.478ZM310.455 161.96H252.773C249.584 161.96 247.004 164.536 247.004 167.719V236.824C247.004 240.007 249.584 242.582 252.773 242.582H310.455C313.643 242.582 316.223 240.007 316.223 236.824V167.719C316.223 164.536 313.643 161.96 310.455 161.96ZM166.25 190.754C166.25 187.571 168.829 184.995 172.018 184.995H229.7C232.888 184.995 235.468 187.571 235.468 190.754C235.468 193.937 232.888 196.513 229.7 196.513H172.018C168.829 196.513 166.25 193.937 166.25 190.754ZM172.018 208.03C168.829 208.03 166.25 210.606 166.25 213.789C166.25 216.972 168.829 219.548 172.018 219.548H229.7C232.888 219.548 235.468 216.972 235.468 213.789C235.468 210.606 232.888 208.03 229.7 208.03H172.018ZM166.25 236.824C166.25 233.641 168.829 231.065 172.018 231.065H229.7C232.888 231.065 235.468 233.641 235.468 236.824C235.468 240.007 232.888 242.582 229.7 242.582H172.018C168.829 242.582 166.25 240.007 166.25 236.824Z",fill:"#919EAB"}),y.jsx("path",{id:"Subtract_2",fillRule:"evenodd",clipRule:"evenodd",d:"M142.023 145.836V247.185C142.023 254.821 148.213 261.01 155.848 261.01H326.624C334.259 261.01 340.449 254.821 340.449 247.185V145.836H142.023ZM195.09 173.478H172.017C168.829 173.478 166.249 170.902 166.249 167.719C166.249 164.536 168.829 161.961 172.017 161.961H195.09C198.278 161.961 200.858 164.536 200.858 167.719C200.858 170.902 198.278 173.478 195.09 173.478ZM252.772 161.961H310.454C313.642 161.961 316.222 164.536 316.222 167.719V236.824C316.222 240.007 313.642 242.583 310.454 242.583H252.772C249.584 242.583 247.004 240.007 247.004 236.824V167.719C247.004 164.536 249.584 161.961 252.772 161.961ZM172.017 184.995C168.829 184.995 166.249 187.571 166.249 190.754C166.249 193.937 168.829 196.513 172.017 196.513H229.699C232.888 196.513 235.467 193.937 235.467 190.754C235.467 187.571 232.888 184.995 229.699 184.995H172.017ZM166.249 213.789C166.249 210.606 168.829 208.03 172.017 208.03H229.699C232.888 208.03 235.467 210.606 235.467 213.789C235.467 216.972 232.888 219.548 229.699 219.548H172.017C168.829 219.548 166.249 216.972 166.249 213.789ZM172.017 231.065C168.829 231.065 166.249 233.641 166.249 236.824C166.249 240.007 168.829 242.583 172.017 242.583H229.699C232.888 242.583 235.467 240.007 235.467 236.824C235.467 233.641 232.888 231.065 229.699 231.065H172.017Z",fill:"#919EAB",fillOpacity:"0.48"}),y.jsx("path",{id:"Intersect",opacity:"0.16",fillRule:"evenodd",clipRule:"evenodd",d:"M340.45 113.591C340.45 105.956 334.26 99.7661 326.625 99.7661H155.848C148.213 99.7661 142.023 105.956 142.023 113.591V145.836H340.45V113.591ZM172.018 117.042C168.788 117.042 166.25 119.576 166.25 122.801C166.25 126.025 168.788 128.56 172.018 128.56C175.249 128.56 177.786 126.025 177.786 122.801C177.786 119.576 175.249 117.042 172.018 117.042ZM195.091 117.042C191.86 117.042 189.323 119.576 189.323 122.801C189.323 126.025 191.86 128.56 195.091 128.56C198.321 128.56 200.859 126.025 200.859 122.801C200.859 119.576 198.321 117.042 195.091 117.042ZM218.164 117.042C214.933 117.042 212.395 119.576 212.395 122.801C212.395 126.025 214.933 128.56 218.164 128.56C221.394 128.56 223.932 126.025 223.932 122.801C223.932 119.576 221.394 117.042 218.164 117.042Z",fill:"#919EAB"}),y.jsx("path",{id:"Intersect_2",opacity:"0.8",fillRule:"evenodd",clipRule:"evenodd",d:"M172.018 117.042C168.787 117.042 166.25 119.576 166.25 122.801C166.25 126.026 168.787 128.56 172.018 128.56C175.248 128.56 177.786 126.026 177.786 122.801C177.786 119.576 175.248 117.042 172.018 117.042ZM195.091 117.042C191.86 117.042 189.322 119.576 189.322 122.801C189.322 126.026 191.86 128.56 195.091 128.56C198.321 128.56 200.859 126.026 200.859 122.801C200.859 119.576 198.321 117.042 195.091 117.042ZM218.163 117.042C214.933 117.042 212.395 119.576 212.395 122.801C212.395 126.026 214.933 128.56 218.163 128.56C221.394 128.56 223.932 126.026 223.932 122.801C223.932 119.576 221.394 117.042 218.163 117.042Z",fill:"#919EAB"})]}),y.jsx("defs",{children:y.jsxs("linearGradient",{id:"paint0_linear_0_9560",x1:"328.81",y1:"424.032",x2:"505.393",y2:"26.0479",gradientUnits:"userSpaceOnUse",children:[y.jsx("stop",{stopColor:"#919EAB"}),y.jsx("stop",{offset:"1",stopColor:"#919EAB",stopOpacity:"0.01"})]})})]}),Hk=({text:t,sx:e})=>y.jsxs(M.Stack,{alignItems:"center",justifyContent:"center",gap:3.75,sx:{textAlign:"center",height:1,backgroundColor:"grey.0",padding:2,borderRadius:2,"& svg":{width:"100%"},...e},children:[y.jsx(loe,{}),y.jsx(M.Typography,{variant:"body1",sx:{color:"text.secondary"},children:t})]}),qk=()=>{const{localeText:{noRowsLabel:t}}=ei.useGridRootProps();return y.jsx(Hk,{text:t,sx:{"& svg":{height:200}}})},uoe=({columns:t,rows:e,loading:n,fetching:r,localeText:i,paginationModel:o={page:0,pageSize:10},rowHeight:s=72,sx:a,...l})=>{const u=[{...ei.GRID_CHECKBOX_SELECTION_COL_DEF,width:71},...t],c=v.useCallback(h=>({bottom:h.isLastVisible?0:8}),[]);return y.jsxs(M.Stack,{position:"relative",borderRadius:2,overflow:"hidden",children:[r&&y.jsx(xh,{sx:{zIndex:1}}),y.jsx(ei.DataGridPremium,{columns:u,rows:e,loading:n,autoHeight:!0,rowHeight:s,getRowSpacing:c,slots:{loadingOverlay:roe,noRowsOverlay:qk,noResultsOverlay:qk},localeText:{actionsCellMore:"Ações",aggregationFunctionLabelAvg:"Média",aggregationFunctionLabelMax:"Máx",aggregationFunctionLabelMin:"Mín",aggregationFunctionLabelSize:"Quantidade",aggregationFunctionLabelSum:"Soma",aggregationMenuItemHeader:"Agregação",booleanCellFalseLabel:"Ativos",booleanCellTrueLabel:"Inativos",checkboxSelectionHeaderName:"Coluna se Seleção",columnHeaderFiltersLabel:"Filtro",columnMenuFilter:"Filtrar",columnMenuHideColumn:"Ocultar coluna",columnMenuLabel:"Colunas",columnMenuManageColumns:"Gerenciar colunas",columnsPanelHideAllButton:"Ocultar todas",columnsPanelShowAllButton:"Mostar todas",columnsPanelTextFieldLabel:"Buscar coluna",columnsPanelTextFieldPlaceholder:"Digite o nome da coluna",filterPanelAddFilter:"Adicionar filtro",filterPanelColumns:"Colunas",filterPanelDeleteIconLabel:"Remover",filterPanelInputLabel:"Filtro",filterPanelInputPlaceholder:"Valor do filtro",filterPanelLogicOperator:"Condição",filterPanelOperator:"Condição",filterPanelOperatorAnd:"e",filterPanelOperatorOr:"ou",filterPanelRemoveAll:"Remover todos",groupColumn:h=>`Agrupar por ${h}`,groupingColumnHeaderName:"Grupo",pinToLeft:"Fixar na esquerda",pinToRight:"Fixar na direita",toolbarColumns:"Colunas",toolbarDensity:"Densidade",toolbarDensityComfortable:"Confortável",toolbarDensityCompact:"Compacto",toolbarDensityStandard:"Padrão",toolbarExport:"Exportar",toolbarExportCSV:"Exportar como CSV",toolbarExportExcel:"Exportar como Excel",toolbarExportLabel:"Exportar",toolbarExportPrint:"Imprimir",toolbarFilters:"Filtros",unGroupColumn:h=>`Parar de agrupar por ${h}`,unpin:"Desafixar",footerRowSelected:h=>`${h} ${h===1?"linha selecionada":"linhas selecionadas"}`,MuiTablePagination:{labelRowsPerPage:"Itens por página",labelDisplayedRows:h=>`${h.from}-${h.to} de ${h.count}`},noRowsLabel:"Nenhum registro para ser apresentado",...i},sx:{...a,"& .MuiDataGrid-virtualScroller, & .MuiDataGrid-virtualScrollerContent":{minHeight:n?s*o.pageSize:s*e.length,...e.length===0&&{height:400}}},...l})]})},coe=({children:t,waitBeforeShow:e=500})=>{const[n,r]=v.useState(!1);return v.useEffect(()=>{const i=setTimeout(()=>r(!0),e);return()=>clearTimeout(i)},[e]),n?t:null};var hoe=!!(typeof window<"u"&&window.document&&window.document.createElement),foe=hoe;const Uk=Ni(foe);var js=function(){return js=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},js.apply(this,arguments)},Vs=null,Yk=null;Uk&&window.addEventListener("resize",function(){Yk!==window.devicePixelRatio&&(Yk=window.devicePixelRatio,Vs=null)});function Gk(){if(Vs===null){if(typeof document>"u")return Vs=0,Vs;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var n=e.getBoundingClientRect().right;t.removeChild(e),Vs=n}return Vs}function Kk(t){return!t||!t.ownerDocument||!t.ownerDocument.defaultView?window:t.ownerDocument.defaultView}function Xk(t){return!t||!t.ownerDocument?document:t.ownerDocument}var Zk=function(t){var e={},n=Array.prototype.reduce.call(t,function(r,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var s=o[1].replace(/\W+(.)/g,function(a,l){return l.toUpperCase()});switch(i.value){case"true":r[s]=!0;break;case"false":r[s]=!1;break;case void 0:r[s]=!0;break;default:r[s]=i.value}}return r},e);return n};function Qk(t,e){var n;t&&(n=t.classList).add.apply(n,e.split(" "))}function Jk(t,e){t&&e.split(" ").forEach(function(n){t.classList.remove(n)})}function e5(t){return".".concat(t.split(" ").join("."))}var doe=Object.freeze({__proto__:null,getElementWindow:Kk,getElementDocument:Xk,getOptions:Zk,addClasses:Qk,removeClasses:Jk,classNamesToQuery:e5}),mi=Kk,Ng=Xk,poe=Zk,vi=Qk,yi=Jk,mn=e5,wh=function(){function t(e,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var i=mi(r.el);r.scrollXTicking||(i.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(i.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,vi(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){yi(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(vi(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){yi(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(i){r.mouseX=i.clientX,r.mouseY=i.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(i){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var o,s;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(o=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(s=r.isWithinBounds(r.axis.y.track.rect)),(o||s)&&(i.stopPropagation(),i.type==="pointerdown"&&i.pointerType!=="touch"&&(o&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(i,"x"):r.onTrackClick(i,"x")),s&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(i,"y"):r.onTrackClick(i,"y"))))}},this.drag=function(i){var o,s,a,l,u,c,h,f,d,p,g;if(!(!r.draggedAxis||!r.contentWrapperEl)){var m,b=r.axis[r.draggedAxis].track,x=(s=(o=b.rect)===null||o===void 0?void 0:o[r.axis[r.draggedAxis].sizeAttr])!==null&&s!==void 0?s:0,C=r.axis[r.draggedAxis].scrollbar,S=(l=(a=r.contentWrapperEl)===null||a===void 0?void 0:a[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&l!==void 0?l:0,w=parseInt((c=(u=r.elStyles)===null||u===void 0?void 0:u[r.axis[r.draggedAxis].sizeAttr])!==null&&c!==void 0?c:"0px",10);i.preventDefault(),i.stopPropagation(),r.draggedAxis==="y"?m=i.pageY:m=i.pageX;var k=m-((f=(h=b.rect)===null||h===void 0?void 0:h[r.axis[r.draggedAxis].offsetAttr])!==null&&f!==void 0?f:0)-r.axis[r.draggedAxis].dragOffset;k=r.draggedAxis==="x"&&r.isRtl?((p=(d=b.rect)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&p!==void 0?p:0)-C.size-k:k;var T=k/(x-C.size),O=T*(S-w);r.draggedAxis==="x"&&r.isRtl&&(O=!((g=t.getRtlHelpers())===null||g===void 0)&&g.isScrollingToNegative?-O:O),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=O}},this.onEndDrag=function(i){var o=Ng(r.el),s=mi(r.el);i.preventDefault(),i.stopPropagation(),yi(r.el,r.classNames.dragging),o.removeEventListener("mousemove",r.drag,!0),o.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=s.setTimeout(function(){o.removeEventListener("click",r.preventClick,!0),o.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=e,this.options=js(js({},t.defaultOptions),n),this.classNames=js(js({},t.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=rS(this._onMouseMove,64),this.onWindowResize=pl(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=pl(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=pl(this._onMouseEntered,this.stopScrollDelay),this.init()}return t.getRtlHelpers=function(){if(t.rtlHelpers)return t.rtlHelpers;var e=document.createElement("div");e.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=e.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var i=t.getOffset(n),o=t.getOffset(r);n.scrollLeft=-999;var s=t.getOffset(r);return document.body.removeChild(n),t.rtlHelpers={isScrollOriginAtZero:i.left!==o.left,isScrollingToNegative:o.left!==s.left},t.rtlHelpers},t.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Gk()}catch{return Gk()}},t.getOffset=function(e){var n=e.getBoundingClientRect(),r=Ng(e),i=mi(e);return{top:n.top+(i.pageYOffset||r.documentElement.scrollTop),left:n.left+(i.pageXOffset||r.documentElement.scrollLeft)}},t.prototype.init=function(){Uk&&(this.initDOM(),this.rtlHelpers=t.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.prototype.initDOM=function(){var e,n;this.wrapperEl=this.el.querySelector(mn(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(mn(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(mn(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(mn(this.classNames.offset)),this.maskEl=this.el.querySelector(mn(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,mn(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(mn(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(mn(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(mn(this.classNames.track)).concat(mn(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(mn(this.classNames.track)).concat(mn(this.classNames.vertical))),this.axis.x.scrollbar.el=((e=this.axis.x.track.el)===null||e===void 0?void 0:e.querySelector(mn(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(mn(this.classNames.scrollbar)))||null,this.options.autoHide||(vi(this.axis.x.scrollbar.el,this.classNames.visible),vi(this.axis.y.scrollbar.el,this.classNames.visible))},t.prototype.initListeners=function(){var e=this,n,r=mi(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var i=!1,o=r.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){i&&r.requestAnimationFrame(function(){e.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){i=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){e.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},t.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var e=mi(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||n>0,o=this.contentWrapperEl.offsetWidth,s=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var l=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=i?"".concat(n||u,"px"):"auto",this.placeholderEl.style.height="".concat(l,"px");var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&u>n,this.axis.y.isOverflowing=l>c,this.axis.x.isOverflowing=s==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=a==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var h=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>o-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>c-h,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},t.prototype.getScrollbarSize=function(e){var n,r;if(e===void 0&&(e="y"),!this.axis[e].isOverflowing||!this.contentEl)return 0;var i=this.contentEl[this.axis[e].scrollSizeAttr],o=(r=(n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])!==null&&r!==void 0?r:0,s=o/i,a;return a=Math.max(~~(s*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.prototype.positionScrollbar=function(e){var n,r,i;e===void 0&&(e="y");var o=this.axis[e].scrollbar;if(!(!this.axis[e].isOverflowing||!this.contentWrapperEl||!o.el||!this.elStyles)){var s=this.contentWrapperEl[this.axis[e].scrollSizeAttr],a=((n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])||0,l=parseInt(this.elStyles[this.axis[e].sizeAttr],10),u=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];u=e==="x"&&this.isRtl&&(!((r=t.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-u:u,e==="x"&&this.isRtl&&(u=!((i=t.getRtlHelpers())===null||i===void 0)&&i.isScrollingToNegative?u:-u);var c=u/(s-l),h=~~((a-o.size)*c);h=e==="x"&&this.isRtl?-h+(a-o.size):h,o.el.style.transform=e==="x"?"translate3d(".concat(h,"px, 0, 0)"):"translate3d(0, ".concat(h,"px, 0)")}},t.prototype.toggleTrackVisibility=function(e){e===void 0&&(e="y");var n=this.axis[e].track.el,r=this.axis[e].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[e].isOverflowing||this.axis[e].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(e))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(e))),this.axis[e].isOverflowing?r.style.display="block":r.style.display="none")},t.prototype.showScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&!this.axis[e].scrollbar.isVisible&&(vi(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!0)},t.prototype.hideScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&this.axis[e].scrollbar.isVisible&&(yi(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!1)},t.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},t.prototype.onMouseMoveForAxis=function(e){e===void 0&&(e="y");var n=this.axis[e];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(e),vi(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?vi(n.scrollbar.el,this.classNames.hover):yi(n.scrollbar.el,this.classNames.hover)):(yi(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)))},t.prototype.onMouseLeaveForAxis=function(e){e===void 0&&(e="y"),yi(this.axis[e].track.el,this.classNames.hover),yi(this.axis[e].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)},t.prototype.onDragStart=function(e,n){var r;n===void 0&&(n="y");var i=Ng(this.el),o=mi(this.el),s=this.axis[n].scrollbar,a=n==="y"?e.pageY:e.pageX;this.axis[n].dragOffset=a-(((r=s.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,vi(this.el,this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.prototype.onTrackClick=function(e,n){var r=this,i,o,s,a;n===void 0&&(n="y");var l=this.axis[n];if(!(!this.options.clickOnTrack||!l.scrollbar.el||!this.contentWrapperEl)){e.preventDefault();var u=mi(this.el);this.axis[n].scrollbar.rect=l.scrollbar.el.getBoundingClientRect();var c=this.axis[n].scrollbar,h=(o=(i=c.rect)===null||i===void 0?void 0:i[this.axis[n].offsetAttr])!==null&&o!==void 0?o:0,f=parseInt((a=(s=this.elStyles)===null||s===void 0?void 0:s[this.axis[n].sizeAttr])!==null&&a!==void 0?a:"0px",10),d=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],p=n==="y"?this.mouseY-h:this.mouseX-h,g=p<0?-1:1,m=g===-1?d-f:d+f,b=40,x=function(){r.contentWrapperEl&&(g===-1?d>m&&(d-=b,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=d,u.requestAnimationFrame(x)):d<m&&(d+=b,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=d,u.requestAnimationFrame(x)))};x()}},t.prototype.getContentElement=function(){return this.contentEl},t.prototype.getScrollElement=function(){return this.contentWrapperEl},t.prototype.removeListeners=function(){var e=mi(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},t.prototype.unMount=function(){this.removeListeners()},t.prototype.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.prototype.findChild=function(e,n){var r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,function(i){return r.call(i,n)})[0]},t.rtlHelpers=null,t.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},t.getOptions=poe,t.helpers=doe,t}(),On=function(){return On=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},On.apply(this,arguments)};function goe(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}var t5=Ce.forwardRef(function(t,e){var n=t.children,r=t.scrollableNodeProps,i=r===void 0?{}:r,o=goe(t,["children","scrollableNodeProps"]),s=Ce.useRef(),a=Ce.useRef(),l=Ce.useRef(),u={},c={};Object.keys(o).forEach(function(d){Object.prototype.hasOwnProperty.call(wh.defaultOptions,d)?u[d]=o[d]:c[d]=o[d]});var h=On(On({},wh.defaultOptions.classNames),u.classNames),f=On(On({},i),{className:"".concat(h.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:0,role:"region","aria-label":u.ariaLabel||wh.defaultOptions.ariaLabel});return Ce.useEffect(function(){var d;return a.current=f.ref?f.ref.current:a.current,s.current&&(d=new wh(s.current,On(On(On({},u),a.current&&{scrollableNode:a.current}),l.current&&{contentNode:l.current})),typeof e=="function"?e(d):e&&(e.current=d)),function(){d==null||d.unMount(),d=null,typeof e=="function"&&e(null)}},[]),Ce.createElement("div",On({"data-simplebar":"init",ref:s},c),Ce.createElement("div",{className:h.wrapper},Ce.createElement("div",{className:h.heightAutoObserverWrapperEl},Ce.createElement("div",{className:h.heightAutoObserverEl})),Ce.createElement("div",{className:h.mask},Ce.createElement("div",{className:h.offset},typeof n=="function"?n({scrollableNodeRef:a,scrollableNodeProps:On(On({},f),{ref:a}),contentNodeRef:l,contentNodeProps:{className:h.contentEl,ref:l}}):Ce.createElement("div",On({},f),Ce.createElement("div",{className:h.contentEl},n)))),Ce.createElement("div",{className:h.placeholder})),Ce.createElement("div",{className:"".concat(h.track," simplebar-horizontal")},Ce.createElement("div",{className:h.scrollbar})),Ce.createElement("div",{className:"".concat(h.track," simplebar-vertical")},Ce.createElement("div",{className:h.scrollbar})))});t5.displayName="SimpleBar";const moe=ur("div")(()=>({flexGrow:1,height:"100%",overflow:"hidden"})),voe=ur(t5)(({theme:t})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:Y(t.palette.grey[600],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-mask":{zIndex:"inherit"}})),yoe=({children:t,sx:e,...n})=>{const r=typeof navigator>"u"?"SSR":navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(r)?y.jsx(M.Box,{sx:{overflowX:"auto",...e},...n,children:t}):y.jsx(moe,{children:y.jsx(voe,{clickOnTrack:!1,sx:e,...n,children:t})})},n5=v.memo(yoe),boe=M.styled(M.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,padding:"22px 20px"})),xoe=M.styled(M.Stack)({padding:32}),woe=({headerTitle:t,onClose:e,children:n,contentProps:r,...i})=>y.jsxs(M.Drawer,{anchor:"right",PaperProps:{sx:{width:1,maxWidth:684}},onClose:e,...i,children:[y.jsxs(boe,{children:[y.jsx(M.Typography,{variant:"subtitle1",children:t}),y.jsx(M.IconButton,{onClick:e,children:y.jsx(vt,{icon:"ic:round-close"})})]}),y.jsx(n5,{children:y.jsx(xoe,{...r,children:n})})]}),Coe=ur(M.Box)(({theme:t})=>({overflow:"hidden",position:"relative",borderRadius:t.shape.borderRadius,border:`solid 1px ${Y(t.palette.grey[500],.32)}`,"& .ql-container.ql-snow":{borderColor:"transparent",...t.typography.body1,fontFamily:t.typography.fontFamily},"& .ql-editor":{minHeight:200,maxHeight:640,"&.ql-blank::before":{fontStyle:"normal",color:t.palette.text.disabled},"& pre.ql-syntax":{...t.typography.body2,padding:t.spacing(2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.grey[900]}}})),Soe=ur("div")(({theme:t})=>{const e=t.direction==="rtl";return{"& .ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow .ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button:focus .ql-fill, .ql-snow .ql-toolbar button:focus .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill":{fill:t.palette.primary.main},"& .ql-snow.ql-toolbar button:hover, .ql-snow .ql-toolbar button:hover, .ql-snow.ql-toolbar button:focus, .ql-snow .ql-toolbar button:focus, .ql-snow.ql-toolbar button.ql-active, .ql-snow .ql-toolbar button.ql-active, .ql-snow.ql-toolbar .ql-picker-label:hover, .ql-snow .ql-toolbar .ql-picker-label:hover, .ql-snow.ql-toolbar .ql-picker-label.ql-active, .ql-snow .ql-toolbar .ql-picker-label.ql-active, .ql-snow.ql-toolbar .ql-picker-item:hover, .ql-snow .ql-toolbar .ql-picker-item:hover, .ql-snow.ql-toolbar .ql-picker-item.ql-selected, .ql-snow .ql-toolbar .ql-picker-item.ql-selected":{color:t.palette.primary.main},"& .ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button:focus .ql-stroke, .ql-snow .ql-toolbar button:focus .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke, .ql-snow .ql-toolbar button.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow.ql-toolbar button:hover .ql-stroke-miter, .ql-snow .ql-toolbar button:hover .ql-stroke-miter, .ql-snow.ql-toolbar button:focus .ql-stroke-miter, .ql-snow .ql-toolbar button:focus .ql-stroke-miter, .ql-snow.ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter":{stroke:t.palette.primary.main},"& .ql-stroke":{stroke:t.palette.text.primary},"& .ql-fill, .ql-stroke.ql-fill":{fill:t.palette.text.primary},"& .ql-picker, .ql-picker-options, .ql-picker-item, .ql-picker-label, button":{"&:focus":{outline:"none"}},"& .ql-toolbar.ql-snow":{border:"none",borderBottom:`solid 1px ${Y(t.palette.grey[500],.32)}`,"& .ql-formats":{"&:not(:last-of-type)":{marginRight:t.spacing(2)}},"& button":{padding:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,color:t.palette.text.primary},"& button svg, span svg":{width:20,height:20},"& .ql-picker-label":{...t.typography.subtitle2,color:t.palette.text.primary,"& .ql-stroke":{stroke:t.palette.text.primary}},"& .ql-picker-label svg":{...e&&{right:"0 !important",left:"auto !important"}},"& .ql-color,& .ql-background,& .ql-align ":{"& .ql-picker-label":{padding:0,display:"flex",alignItems:"center",justifyContent:"center"}},"& .ql-expanded":{"& .ql-picker-label":{borderRadius:4,color:t.palette.text.disabled,borderColor:"transparent !important",backgroundColor:t.palette.action.focus,"& .ql-stroke":{stroke:t.palette.text.disabled}},"& .ql-picker-options":{padding:0,marginTop:4,border:"none",maxHeight:200,overflow:"auto",boxShadow:t.customShadows.z20,borderRadius:t.shape.borderRadius,backgroundColor:t.palette.background.paper},"& .ql-picker-item":{color:t.palette.text.primary},"&.ql-align":{"& .ql-picker-options":{padding:0,display:"flex"},"& .ql-picker-item":{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"}},"&.ql-color, &.ql-background":{"& .ql-picker-options":{padding:8},"& .ql-picker-item":{margin:3,borderRadius:4,"&.ql-selected":{border:"solid 1px black"}}},"&.ql-font, &.ql-size, &.ql-header":{"& .ql-picker-options":{padding:t.spacing(1,0)},"& .ql-picker-item":{padding:t.spacing(.5,1.5)}}}}}}),koe=["Título 1","Título 2","Título 3","Título 4","Título 5","Título 6"],Toe=({id:t,isSimple:e,...n})=>y.jsx(Soe,{...n,children:y.jsxs("div",{id:t,children:[y.jsx("div",{className:"ql-formats",children:y.jsxs("select",{className:"ql-header",defaultValue:"",children:[koe.map((r,i)=>y.jsx("option",{value:i+1,children:r},r)),y.jsx("option",{value:"",children:"Normal"})]})}),y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-bold"}),y.jsx("button",{type:"button",className:"ql-italic"}),y.jsx("button",{type:"button",className:"ql-underline"}),y.jsx("button",{type:"button",className:"ql-strike"})]}),!e&&y.jsxs("div",{className:"ql-formats",children:[y.jsx("select",{className:"ql-color"}),y.jsx("select",{className:"ql-background"})]}),y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-list",value:"ordered"}),y.jsx("button",{type:"button",className:"ql-list",value:"bullet"}),!e&&y.jsx("button",{type:"button",className:"ql-indent",value:"-1"}),!e&&y.jsx("button",{type:"button",className:"ql-indent",value:"+1"})]}),!e&&y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-script",value:"super"}),y.jsx("button",{type:"button",className:"ql-script",value:"sub"})]}),!e&&y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-code-block"}),y.jsx("button",{type:"button",className:"ql-blockquote"})]}),y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-direction",value:"rtl"}),y.jsx("select",{className:"ql-align"})]}),y.jsxs("div",{className:"ql-formats",children:[y.jsx("button",{type:"button",className:"ql-link"}),y.jsx("button",{type:"button",className:"ql-image"}),y.jsx("button",{type:"button",className:"ql-video"})]}),y.jsxs("div",{className:"ql-formats",children:[!e&&y.jsx("button",{type:"button",className:"ql-formula"}),y.jsx("button",{type:"button",className:"ql-clean"})]})]})}),r5=({id:t="minimal-quill",error:e,simple:n=!1,helperText:r,sx:i})=>y.jsxs(M.Stack,{children:[y.jsxs(Coe,{sx:{...e&&{border:o=>`solid 1px ${o.palette.error.main}`},...i},children:[y.jsx(Toe,{id:t,isSimple:n}),"<ReactQuill"]}),r&&y.jsx(M.FormHelperText,{error:!!e,sx:{px:2},children:r})]});/*! *****************************************************************************
135
+ Copyright (c) Microsoft Corporation.
136
+
137
+ Permission to use, copy, modify, and/or distribute this software for any
138
+ purpose with or without fee is hereby granted.
139
+
140
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
141
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
142
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
143
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
144
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
145
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
146
+ PERFORMANCE OF THIS SOFTWARE.
147
+ ***************************************************************************** */var jg=function(t,e){return jg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},jg(t,e)};function Eoe(t,e){jg(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var en=function(){return en=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},en.apply(this,arguments)},i5=!1,fo,Vg,zg,Ch,Sh,o5,kh,Wg,Hg,qg,s5,Ug,Yg,a5,l5;function vn(){if(!i5){i5=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(Ug=/\b(iPhone|iP[ao]d)/.exec(t),Yg=/\b(iP[ao]d)/.exec(t),qg=/Android/i.exec(t),a5=/FBAN\/\w+;/i.exec(t),l5=/Mobile/i.exec(t),s5=!!/Win64/.exec(t),e){fo=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,fo&&document&&document.documentMode&&(fo=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(t);o5=r?parseFloat(r[1])+4:fo,Vg=e[2]?parseFloat(e[2]):NaN,zg=e[3]?parseFloat(e[3]):NaN,Ch=e[4]?parseFloat(e[4]):NaN,Ch?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),Sh=e&&e[1]?parseFloat(e[1]):NaN):Sh=NaN}else fo=Vg=zg=Sh=Ch=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);kh=i?parseFloat(i[1].replace("_",".")):!0}else kh=!1;Wg=!!n[2],Hg=!!n[3]}else kh=Wg=Hg=!1}}var Gg={ie:function(){return vn()||fo},ieCompatibilityMode:function(){return vn()||o5>fo},ie64:function(){return Gg.ie()&&s5},firefox:function(){return vn()||Vg},opera:function(){return vn()||zg},webkit:function(){return vn()||Ch},safari:function(){return Gg.webkit()},chrome:function(){return vn()||Sh},windows:function(){return vn()||Wg},osx:function(){return vn()||kh},linux:function(){return vn()||Hg},iphone:function(){return vn()||Ug},mobile:function(){return vn()||Ug||Yg||qg||l5},nativeApp:function(){return vn()||a5},android:function(){return vn()||qg},ipad:function(){return vn()||Yg}},Moe=Gg,Th=!!(typeof window<"u"&&window.document&&window.document.createElement),Ooe={canUseDOM:Th,canUseWorkers:typeof Worker<"u",canUseEventListeners:Th&&!!(window.addEventListener||window.attachEvent),canUseViewport:Th&&!!window.screen,isInWorker:!Th},Aoe=Ooe,u5=Aoe,c5;u5.canUseDOM&&(c5=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
148
+ * Checks if an event is supported in the current execution environment.
149
+ *
150
+ * NOTE: This will not work correctly for non-generic events such as `change`,
151
+ * `reset`, `load`, `error`, and `select`.
152
+ *
153
+ * Borrows from Modernizr.
154
+ *
155
+ * @param {string} eventNameSuffix Event name, e.g. "click".
156
+ * @param {?boolean} capture Check if the capture phase is supported.
157
+ * @return {boolean} True if the event is supported.
158
+ * @internal
159
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
160
+ */function Poe(t,e){if(!u5.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&c5&&t==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var Doe=Poe,_oe=Moe,Ioe=Doe,h5=10,f5=40,d5=800;function p5(t){var e=0,n=0,r=0,i=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),r=e*h5,i=n*h5,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||i)&&t.deltaMode&&(t.deltaMode==1?(r*=f5,i*=f5):(r*=d5,i*=d5)),r&&!e&&(e=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:i}}p5.getEventType=function(){return _oe.firefox()?"DOMMouseScroll":Ioe("wheel")?"wheel":"mousewheel"};var $oe=p5,Foe=$oe;const Loe=Ni(Foe);function Roe(t,e,n,r,i,o){o===void 0&&(o=0);var s=zs(t,e,o),a=s.width,l=s.height,u=Math.min(a,n),c=Math.min(l,r);return u>c*i?{width:c*i,height:c}:{width:u,height:u/i}}function Boe(t){return t.width>t.height?t.width/t.naturalWidth:t.height/t.naturalHeight}function Eh(t,e,n,r,i){i===void 0&&(i=0);var o=zs(e.width,e.height,i),s=o.width,a=o.height;return{x:g5(t.x,s,n.width,r),y:g5(t.y,a,n.height,r)}}function g5(t,e,n,r){var i=e*r/2-n/2;return Mh(t,-i,i)}function m5(t,e){return Math.sqrt(Math.pow(t.y-e.y,2)+Math.pow(t.x-e.x,2))}function v5(t,e){return Math.atan2(e.y-t.y,e.x-t.x)*180/Math.PI}function Noe(t,e,n,r,i,o,s){o===void 0&&(o=0),s===void 0&&(s=!0);var a=s?joe:Voe,l=zs(e.width,e.height,o),u=zs(e.naturalWidth,e.naturalHeight,o),c={x:a(100,((l.width-n.width/i)/2-t.x/i)/l.width*100),y:a(100,((l.height-n.height/i)/2-t.y/i)/l.height*100),width:a(100,n.width/l.width*100/i),height:a(100,n.height/l.height*100/i)},h=Math.round(a(u.width,c.width*u.width/100)),f=Math.round(a(u.height,c.height*u.height/100)),d=u.width>=u.height*r,p=d?{width:Math.round(f*r),height:f}:{width:h,height:Math.round(h/r)},g=en(en({},p),{x:Math.round(a(u.width-p.width,c.x*u.width/100)),y:Math.round(a(u.height-p.height,c.y*u.height/100))});return{croppedAreaPercentages:c,croppedAreaPixels:g}}function joe(t,e){return Math.min(t,Math.max(0,e))}function Voe(t,e){return e}function zoe(t,e,n,r,i,o){var s=zs(e.width,e.height,n),a=Mh(r.width/s.width*(100/t.width),i,o),l={x:a*s.width/2-r.width/2-s.width*a*(t.x/100),y:a*s.height/2-r.height/2-s.height*a*(t.y/100)};return{crop:l,zoom:a}}function Woe(t,e,n){var r=Boe(e);return n.height>n.width?n.height/(t.height*r):n.width/(t.width*r)}function Hoe(t,e,n,r,i,o){n===void 0&&(n=0);var s=zs(e.naturalWidth,e.naturalHeight,n),a=Mh(Woe(t,e,r),i,o),l=r.height>r.width?r.height/t.height:r.width/t.width,u={x:((s.width-t.width)/2-t.x)*l,y:((s.height-t.height)/2-t.y)*l};return{crop:u,zoom:a}}function y5(t,e){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function qoe(t){return t*Math.PI/180}function zs(t,e,n){var r=qoe(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}function Mh(t,e,n){return Math.min(Math.max(t,e),n)}function Oh(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter(function(n){return typeof n=="string"&&n.length>0}).join(" ").trim()}var Uoe=`.reactEasyCrop_Container {
161
+ position: absolute;
162
+ top: 0;
163
+ left: 0;
164
+ right: 0;
165
+ bottom: 0;
166
+ overflow: hidden;
167
+ user-select: none;
168
+ touch-action: none;
169
+ cursor: move;
170
+ display: flex;
171
+ justify-content: center;
172
+ align-items: center;
173
+ }
174
+
175
+ .reactEasyCrop_Image,
176
+ .reactEasyCrop_Video {
177
+ will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
178
+ }
179
+
180
+ .reactEasyCrop_Contain {
181
+ max-width: 100%;
182
+ max-height: 100%;
183
+ margin: auto;
184
+ position: absolute;
185
+ top: 0;
186
+ bottom: 0;
187
+ left: 0;
188
+ right: 0;
189
+ }
190
+ .reactEasyCrop_Cover_Horizontal {
191
+ width: 100%;
192
+ height: auto;
193
+ }
194
+ .reactEasyCrop_Cover_Vertical {
195
+ width: auto;
196
+ height: 100%;
197
+ }
198
+
199
+ .reactEasyCrop_CropArea {
200
+ position: absolute;
201
+ left: 50%;
202
+ top: 50%;
203
+ transform: translate(-50%, -50%);
204
+ border: 1px solid rgba(255, 255, 255, 0.5);
205
+ box-sizing: border-box;
206
+ box-shadow: 0 0 0 9999em;
207
+ color: rgba(0, 0, 0, 0.5);
208
+ overflow: hidden;
209
+ }
210
+
211
+ .reactEasyCrop_CropAreaRound {
212
+ border-radius: 50%;
213
+ }
214
+
215
+ .reactEasyCrop_CropAreaGrid::before {
216
+ content: ' ';
217
+ box-sizing: border-box;
218
+ position: absolute;
219
+ border: 1px solid rgba(255, 255, 255, 0.5);
220
+ top: 0;
221
+ bottom: 0;
222
+ left: 33.33%;
223
+ right: 33.33%;
224
+ border-top: 0;
225
+ border-bottom: 0;
226
+ }
227
+
228
+ .reactEasyCrop_CropAreaGrid::after {
229
+ content: ' ';
230
+ box-sizing: border-box;
231
+ position: absolute;
232
+ border: 1px solid rgba(255, 255, 255, 0.5);
233
+ top: 33.33%;
234
+ bottom: 33.33%;
235
+ left: 0;
236
+ right: 0;
237
+ border-left: 0;
238
+ border-right: 0;
239
+ }
240
+ `,Yoe=1,Goe=3,Koe=function(t){Eoe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.imageRef=v.createRef(),n.videoRef=v.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<"u"?document:null,n.currentWindow=typeof window<"u"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=zoe(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=i.crop,s=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(s)}else if(n.props.initialCroppedAreaPixels){var a=Hoe(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=a.crop,s=a.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(s)}},n.computeSizes=function(){var r,i,o,s,a,l,u=n.imageRef.current||n.videoRef.current;if(u&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var c=n.containerRect.width/n.containerRect.height,h=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,f=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((s=n.videoRef.current)===null||s===void 0?void 0:s.videoHeight)||0,d=u.offsetWidth<h||u.offsetHeight<f,p=h/f,g=void 0;if(d){var m=n.getObjectFit();switch(m){default:case"contain":g=c>p?{width:n.containerRect.height*p,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/p};break;case"horizontal-cover":g={width:n.containerRect.width,height:n.containerRect.width/p};break;case"vertical-cover":g={width:n.containerRect.height*p,height:n.containerRect.height};break}}else g={width:u.offsetWidth,height:u.offsetHeight};n.mediaSize=en(en({},g),{naturalWidth:h,naturalHeight:f}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:Roe(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((a=n.state.cropSize)===null||a===void 0?void 0:a.height)!==b.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==b.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(e.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(e.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(e.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(e.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=e.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var s=n.gestureRotationStart+r.rotation;n.props.onRotationChange(s)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,s=r.x,a=r.y;n.dragStartPosition={x:s,y:a},n.dragStartCrop=en({},n.props.crop),(o=(i=n.props).onInteractionStart)===null||o===void 0||o.call(i)},n.onDrag=function(r){var i=r.x,o=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||o===void 0)){var s=i-n.dragStartPosition.x,a=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+s,y:n.dragStartCrop.y+a},u=n.props.restrictPosition?Eh(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(u)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=e.getMousePoint(r),o=Loe(r).pixelY,s=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(s,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var a,l;return(l=(a=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(a)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var a,l;return(l=(a=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(a)})},250)}},n.getPointOnContainer=function(r,i){var o=r.x,s=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-i.x),y:n.containerRect.height/2-(s-i.y)}},n.getPointOnMedia=function(r){var i=r.x,o=r.y,s=n.props,a=s.crop,l=s.zoom;return{x:(i+a.x)/l,y:(o+a.y)/l}},n.setNewZoom=function(r,i,o){var s=o===void 0?{}:o,a=s.shouldUpdatePosition,l=a===void 0?!0:a;if(!(!n.state.cropSize||!n.props.onZoomChange)){var u=Mh(r,n.props.minZoom,n.props.maxZoom);if(l){var c=n.getPointOnContainer(i,n.containerPosition),h=n.getPointOnMedia(c),f={x:h.x*u-c.x,y:h.y*u-c.y},d=n.props.restrictPosition?Eh(f,n.mediaSize,n.state.cropSize,u,n.props.rotation):f;n.props.onCropChange(d)}n.props.onZoomChange(u)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?Eh(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return Noe(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?Eh(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return e.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=Uoe,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},e.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},e.prototype.componentDidUpdate=function(n){var r,i,o,s,a,l,u,c,h;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((s=this.props.cropSize)===null||s===void 0?void 0:s.width)?this.computeSizes():(((a=n.crop)===null||a===void 0?void 0:a.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((u=n.crop)===null||u===void 0?void 0:u.y)!==((c=this.props.crop)===null||c===void 0?void 0:c.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((h=this.videoRef.current)===null||h===void 0||h.load())},e.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},e.prototype.getObjectFit=function(){var n,r,i,o;if(this.props.objectFit==="cover"){var s=this.imageRef.current||this.videoRef.current;if(s&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var a=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,c=l/u;return c<a?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},e.prototype.onPinchStart=function(n){var r=e.getTouchPoint(n.touches[0]),i=e.getTouchPoint(n.touches[1]);this.lastPinchDistance=m5(r,i),this.lastPinchRotation=v5(r,i),this.onDragStart(y5(r,i))},e.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=e.getTouchPoint(n.touches[0]),o=e.getTouchPoint(n.touches[1]),s=y5(i,o);this.onDrag(s),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var a=m5(i,o),l=r.props.zoom*(a/r.lastPinchDistance);r.setNewZoom(l,s,{shouldUpdatePosition:!1}),r.lastPinchDistance=a;var u=v5(i,o),c=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(c),r.lastPinchRotation=u})}},e.prototype.render=function(){var n=this,r=this.props,i=r.image,o=r.video,s=r.mediaProps,a=r.transform,l=r.crop,u=l.x,c=l.y,h=r.rotation,f=r.zoom,d=r.cropShape,p=r.showGrid,g=r.style,m=g.containerStyle,b=g.cropAreaStyle,x=g.mediaStyle,C=r.classes,S=C.containerClassName,w=C.cropAreaClassName,k=C.mediaClassName,T=this.getObjectFit();return v.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(P){return n.containerRef=P},"data-testid":"container",style:m,className:Oh("reactEasyCrop_Container",S)},i?v.createElement("img",en({alt:"",className:Oh("reactEasyCrop_Image",T==="contain"&&"reactEasyCrop_Contain",T==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",T==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",k)},s,{src:i,ref:this.imageRef,style:en(en({},x),{transform:a||"translate(".concat(u,"px, ").concat(c,"px) rotate(").concat(h,"deg) scale(").concat(f,")")}),onLoad:this.onMediaLoad})):o&&v.createElement("video",en({autoPlay:!0,loop:!0,muted:!0,className:Oh("reactEasyCrop_Video",T==="contain"&&"reactEasyCrop_Contain",T==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",T==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",k)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:en(en({},x),{transform:a||"translate(".concat(u,"px, ").concat(c,"px) rotate(").concat(h,"deg) scale(").concat(f,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map(function(O){return v.createElement("source",en({key:O.src},O))})),this.state.cropSize&&v.createElement("div",{style:en(en({},b),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Oh("reactEasyCrop_CropArea",d==="round"&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",w)}))},e.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:Goe,minZoom:Yoe,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},e.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e}(v.Component);const b5=({crop:t,zoom:e,onCropChange:n,onZoomChange:r,onCropComplete:i,image:{width:o,height:s,aspect:a,imgSrc:l=""}})=>y.jsx(M.Stack,{position:"relative",alignItems:"center",justifyContent:"center",style:{position:"relative",width:o*1.1,height:s*1.1,margin:"auto"},children:y.jsx(Koe,{image:l,crop:t,zoom:e,minZoom:1,maxZoom:5,cropSize:{width:o,height:s},aspect:a,onCropChange:n,onZoomChange:r,onCropComplete:i,objectFit:"horizontal-cover"})});function x5(t,e,n=0){return Math.round(10**(n||0)*t)%Math.round(10**(n||0)*e)===0}function Xoe(t=0){return Math.round(t*100)/100}const Zoe=Object.freeze(Object.defineProperty({__proto__:null,isMultiple:x5,roundIfNecessary:Xoe},Symbol.toStringTag,{value:"Module"}));var w5={exports:{}};/*! @preserve
241
+ * numeral.js
242
+ * version : 2.0.6
243
+ * author : Adam Draper
244
+ * license : MIT
245
+ * http://adamwdraper.github.com/Numeral-js/
246
+ */(function(t){(function(e,n){t.exports?t.exports=n():e.numeral=n()})(ba,function(){var e,n,r="2.0.6",i={},o={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},a={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function l(u,c){this._input=u,this._value=c}return e=function(u){var c,h,f,d;if(e.isNumeral(u))c=u.value();else if(u===0||typeof u>"u")c=0;else if(u===null||n.isNaN(u))c=null;else if(typeof u=="string")if(a.zeroFormat&&u===a.zeroFormat)c=0;else if(a.nullFormat&&u===a.nullFormat||!u.replace(/[^0-9]+/g,"").length)c=null;else{for(h in i)if(d=typeof i[h].regexps.unformat=="function"?i[h].regexps.unformat():i[h].regexps.unformat,d&&u.match(d)){f=i[h].unformat;break}f=f||e._.stringToNumber,c=f(u)}else c=Number(u)||null;return new l(u,c)},e.version=r,e.isNumeral=function(u){return u instanceof l},e._=n={numberToFormat:function(u,c,h){var f=o[e.options.currentLocale],d=!1,p=!1,g=0,m="",b=1e12,x=1e9,C=1e6,S=1e3,w="",k=!1,T,O,P,D,R,H,W;if(u=u||0,O=Math.abs(u),e._.includes(c,"(")?(d=!0,c=c.replace(/[\(|\)]/g,"")):(e._.includes(c,"+")||e._.includes(c,"-"))&&(R=e._.includes(c,"+")?c.indexOf("+"):u<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),e._.includes(c,"a")&&(T=c.match(/a(k|m|b|t)?/),T=T?T[1]:!1,e._.includes(c," a")&&(m=" "),c=c.replace(new RegExp(m+"a[kmbt]?"),""),O>=b&&!T||T==="t"?(m+=f.abbreviations.trillion,u=u/b):O<b&&O>=x&&!T||T==="b"?(m+=f.abbreviations.billion,u=u/x):O<x&&O>=C&&!T||T==="m"?(m+=f.abbreviations.million,u=u/C):(O<C&&O>=S&&!T||T==="k")&&(m+=f.abbreviations.thousand,u=u/S)),e._.includes(c,"[.]")&&(p=!0,c=c.replace("[.]",".")),P=u.toString().split(".")[0],D=c.split(".")[1],H=c.indexOf(","),g=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,D?(e._.includes(D,"[")?(D=D.replace("]",""),D=D.split("["),w=e._.toFixed(u,D[0].length+D[1].length,h,D[1].length)):w=e._.toFixed(u,D.length,h),P=w.split(".")[0],e._.includes(w,".")?w=f.delimiters.decimal+w.split(".")[1]:w="",p&&Number(w.slice(1))===0&&(w="")):P=e._.toFixed(u,0,h),m&&!T&&Number(P)>=1e3&&m!==f.abbreviations.trillion)switch(P=String(Number(P)/1e3),m){case f.abbreviations.thousand:m=f.abbreviations.million;break;case f.abbreviations.million:m=f.abbreviations.billion;break;case f.abbreviations.billion:m=f.abbreviations.trillion;break}if(e._.includes(P,"-")&&(P=P.slice(1),k=!0),P.length<g)for(var B=g-P.length;B>0;B--)P="0"+P;return H>-1&&(P=P.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f.delimiters.thousands)),c.indexOf(".")===0&&(P=""),W=P+w+(m||""),d?W=(d&&k?"(":"")+W+(d&&k?")":""):R>=0?W=R===0?(k?"-":"+")+W:W+(k?"-":"+"):k&&(W="-"+W),W},stringToNumber:function(u){var c=o[a.currentLocale],h=u,f={thousand:3,million:6,billion:9,trillion:12},d,p,g;if(a.zeroFormat&&u===a.zeroFormat)p=0;else if(a.nullFormat&&u===a.nullFormat||!u.replace(/[^0-9]+/g,"").length)p=null;else{p=1,c.delimiters.decimal!=="."&&(u=u.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(d in f)if(g=new RegExp("[^a-zA-Z]"+c.abbreviations[d]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),h.match(g)){p*=Math.pow(10,f[d]);break}p*=(u.split("-").length+Math.min(u.split("(").length-1,u.split(")").length-1))%2?1:-1,u=u.replace(/[^0-9\.]+/g,""),p*=Number(u)}return p},isNaN:function(u){return typeof u=="number"&&isNaN(u)},includes:function(u,c){return u.indexOf(c)!==-1},insert:function(u,c,h){return u.slice(0,h)+c+u.slice(h)},reduce:function(u,c){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof c!="function")throw new TypeError(c+" is not a function");var h=Object(u),f=h.length>>>0,d=0,p;if(arguments.length===3)p=arguments[2];else{for(;d<f&&!(d in h);)d++;if(d>=f)throw new TypeError("Reduce of empty array with no initial value");p=h[d++]}for(;d<f;d++)d in h&&(p=c(p,h[d],d,h));return p},multiplier:function(u){var c=u.toString().split(".");return c.length<2?1:Math.pow(10,c[1].length)},correctionFactor:function(){var u=Array.prototype.slice.call(arguments);return u.reduce(function(c,h){var f=n.multiplier(h);return c>f?c:f},1)},toFixed:function(u,c,h,f){var d=u.toString().split("."),p=c-(f||0),g,m,b,x;return d.length===2?g=Math.min(Math.max(d[1].length,p),c):g=p,b=Math.pow(10,g),x=(h(u+"e+"+g)/b).toFixed(g),f>c-g&&(m=new RegExp("\\.?0{1,"+(f-(c-g))+"}$"),x=x.replace(m,"")),x}},e.options=a,e.formats=i,e.locales=o,e.locale=function(u){return u&&(a.currentLocale=u.toLowerCase()),a.currentLocale},e.localeData=function(u){if(!u)return o[a.currentLocale];if(u=u.toLowerCase(),!o[u])throw new Error("Unknown locale : "+u);return o[u]},e.reset=function(){for(var u in s)a[u]=s[u]},e.zeroFormat=function(u){a.zeroFormat=typeof u=="string"?u:null},e.nullFormat=function(u){a.nullFormat=typeof u=="string"?u:null},e.defaultFormat=function(u){a.defaultFormat=typeof u=="string"?u:"0.0"},e.register=function(u,c,h){if(c=c.toLowerCase(),this[u+"s"][c])throw new TypeError(c+" "+u+" already registered.");return this[u+"s"][c]=h,h},e.validate=function(u,c){var h,f,d,p,g,m,b,x;if(typeof u!="string"&&(u+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",u)),u=u.trim(),u.match(/^\d+$/))return!0;if(u==="")return!1;try{b=e.localeData(c)}catch{b=e.localeData(e.locale())}return d=b.currency.symbol,g=b.abbreviations,h=b.delimiters.decimal,b.delimiters.thousands==="."?f="\\.":f=b.delimiters.thousands,x=u.match(/^[^\d]+/),x!==null&&(u=u.substr(1),x[0]!==d)||(x=u.match(/[^\d]+$/),x!==null&&(u=u.slice(0,-1),x[0]!==g.thousand&&x[0]!==g.million&&x[0]!==g.billion&&x[0]!==g.trillion))?!1:(m=new RegExp(f+"{2}"),u.match(/[^\d.,]/g)?!1:(p=u.split(h),p.length>2?!1:p.length<2?!!p[0].match(/^\d+.*\d$/)&&!p[0].match(m):p[0].length===1?!!p[0].match(/^\d+$/)&&!p[0].match(m)&&!!p[1].match(/^\d+$/):!!p[0].match(/^\d+.*\d$/)&&!p[0].match(m)&&!!p[1].match(/^\d+$/)))},e.fn=l.prototype={clone:function(){return e(this)},format:function(u,c){var h=this._value,f=u||a.defaultFormat,d,p,g;if(c=c||Math.round,h===0&&a.zeroFormat!==null)p=a.zeroFormat;else if(h===null&&a.nullFormat!==null)p=a.nullFormat;else{for(d in i)if(f.match(i[d].regexps.format)){g=i[d].format;break}g=g||e._.numberToFormat,p=g(h,f,c)}return p},value:function(){return this._value},input:function(){return this._input},set:function(u){return this._value=Number(u),this},add:function(u){var c=n.correctionFactor.call(null,this._value,u);function h(f,d,p,g){return f+Math.round(c*d)}return this._value=n.reduce([this._value,u],h,0)/c,this},subtract:function(u){var c=n.correctionFactor.call(null,this._value,u);function h(f,d,p,g){return f-Math.round(c*d)}return this._value=n.reduce([u],h,Math.round(this._value*c))/c,this},multiply:function(u){function c(h,f,d,p){var g=n.correctionFactor(h,f);return Math.round(h*g)*Math.round(f*g)/Math.round(g*g)}return this._value=n.reduce([this._value,u],c,1),this},divide:function(u){function c(h,f,d,p){var g=n.correctionFactor(h,f);return Math.round(h*g)/Math.round(f*g)}return this._value=n.reduce([this._value,u],c),this},difference:function(u){return Math.abs(e(this._value).subtract(u).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(u){var c=u%10;return~~(u%100/10)===1?"th":c===1?"st":c===2?"nd":c===3?"rd":"th"},currency:{symbol:"$"}}),function(){e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(u,c,h){var f=e._.includes(c," BPS")?" ":"",d;return u=u*1e4,c=c.replace(/\s?BPS/,""),d=e._.numberToFormat(u,c,h),e._.includes(d,")")?(d=d.split(""),d.splice(-1,0,f+"BPS"),d=d.join("")):d=d+f+"BPS",d},unformat:function(u){return+(e._.stringToNumber(u)*1e-4).toFixed(15)}})}(),function(){var u={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},h=u.suffixes.concat(c.suffixes.filter(function(d){return u.suffixes.indexOf(d)<0})),f=h.join("|");f="("+f.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(f)},format:function(d,p,g){var m,b=e._.includes(p,"ib")?c:u,x=e._.includes(p," b")||e._.includes(p," ib")?" ":"",C,S,w;for(p=p.replace(/\s?i?b/,""),C=0;C<=b.suffixes.length;C++)if(S=Math.pow(b.base,C),w=Math.pow(b.base,C+1),d===null||d===0||d>=S&&d<w){x+=b.suffixes[C],S>0&&(d=d/S);break}return m=e._.numberToFormat(d,p,g),m+x},unformat:function(d){var p=e._.stringToNumber(d),g,m;if(p){for(g=u.suffixes.length-1;g>=0;g--){if(e._.includes(d,u.suffixes[g])){m=Math.pow(u.base,g);break}if(e._.includes(d,c.suffixes[g])){m=Math.pow(c.base,g);break}}p*=m||1}return p}})}(),function(){e.register("format","currency",{regexps:{format:/(\$)/},format:function(u,c,h){var f=e.locales[e.options.currentLocale],d={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},p,g,m;for(c=c.replace(/\s?\$\s?/,""),p=e._.numberToFormat(u,c,h),u>=0?(d.before=d.before.replace(/[\-\(]/,""),d.after=d.after.replace(/[\-\)]/,"")):u<0&&!e._.includes(d.before,"-")&&!e._.includes(d.before,"(")&&(d.before="-"+d.before),m=0;m<d.before.length;m++)switch(g=d.before[m],g){case"$":p=e._.insert(p,f.currency.symbol,m);break;case" ":p=e._.insert(p," ",m+f.currency.symbol.length-1);break}for(m=d.after.length-1;m>=0;m--)switch(g=d.after[m],g){case"$":p=m===d.after.length-1?p+f.currency.symbol:e._.insert(p,f.currency.symbol,-(d.after.length-(1+m)));break;case" ":p=m===d.after.length-1?p+" ":e._.insert(p," ",-(d.after.length-(1+m)+f.currency.symbol.length-1));break}return p}})}(),function(){e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(u,c,h){var f,d=typeof u=="number"&&!e._.isNaN(u)?u.toExponential():"0e+0",p=d.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),f=e._.numberToFormat(Number(p[0]),c,h),f+"e"+p[1]},unformat:function(u){var c=e._.includes(u,"e+")?u.split("e+"):u.split("e-"),h=Number(c[0]),f=Number(c[1]);f=e._.includes(u,"e-")?f*=-1:f;function d(p,g,m,b){var x=e._.correctionFactor(p,g),C=p*x*(g*x)/(x*x);return C}return e._.reduce([h,Math.pow(10,f)],d,1)}})}(),function(){e.register("format","ordinal",{regexps:{format:/(o)/},format:function(u,c,h){var f=e.locales[e.options.currentLocale],d,p=e._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),p+=f.ordinal(u),d=e._.numberToFormat(u,c,h),d+p}})}(),function(){e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(u,c,h){var f=e._.includes(c," %")?" ":"",d;return e.options.scalePercentBy100&&(u=u*100),c=c.replace(/\s?\%/,""),d=e._.numberToFormat(u,c,h),e._.includes(d,")")?(d=d.split(""),d.splice(-1,0,f+"%"),d=d.join("")):d=d+f+"%",d},unformat:function(u){var c=e._.stringToNumber(u);return e.options.scalePercentBy100?c*.01:c}})}(),function(){e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(u,c,h){var f=Math.floor(u/60/60),d=Math.floor((u-f*60*60)/60),p=Math.round(u-f*60*60-d*60);return f+":"+(d<10?"0"+d:d)+":"+(p<10?"0"+p:p)},unformat:function(u){var c=u.split(":"),h=0;return c.length===3?(h=h+Number(c[0])*60*60,h=h+Number(c[1])*60,h=h+Number(c[2])):c.length===2&&(h=h+Number(c[0])*60,h=h+Number(c[1])),Number(h)}})}(),e})})(w5);var Qoe=w5.exports;const El=Ni(Qoe);function Joe(t){return El(t).format()}function ese(t){const e=t?El(t).format("$0,0.00"):"";return Ah(e,".00")}function tse(t){const e=t?El(Number(t)/100).format("0.0%"):"";return Ah(e,".0")}function nse(t){const e=t?El(t).format("0.00a"):"";return Ah(e,".00")}function Kg(t){const e=t?El(t).format("0.0 b"):"";return Ah(e,".0")}function Ah(t,e=".00"){return t.includes(e)?t.replace(e,""):t}const Xg=t=>+Number(t).toFixed(12),rse=Object.freeze(Object.defineProperty({__proto__:null,fCurrency:ese,fData:Kg,fNumber:Joe,fPercent:tse,fShortenNumber:nse,fWithDecimalPlacesOrNot:Xg},Symbol.toStringTag,{value:"Module"}));function C5(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}var Ml;(function(t){t.event="event",t.props="prop"})(Ml||(Ml={}));function bi(){}function ise(t){var e,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e&&r.length===e.length&&r.every(function(o,s){return o===e[s]})||(e=r,n=t.apply(void 0,r)),n}}function Ol(t){return!!(t||"").match(/\d/)}function Ws(t){return t==null}function ose(t){return typeof t=="number"&&isNaN(t)}function S5(t){return Ws(t)||ose(t)||typeof t=="number"&&!isFinite(t)}function k5(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function sse(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function ase(t,e,n){var r=sse(n),i=t.search(/[1-9]/);return i=i===-1?t.length:i,t.substring(0,i)+t.substring(i,t.length).replace(r,"$1"+e)}function lse(t){var e=v.useRef(t);e.current=t;var n=v.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return e.current.apply(e,r)});return n.current}function Zg(t,e){e===void 0&&(e=!0);var n=t[0]==="-",r=n&&e;t=t.replace("-","");var i=t.split("."),o=i[0],s=i[1]||"";return{beforeDecimal:o,afterDecimal:s,hasNegation:n,addNegation:r}}function use(t){if(!t)return t;var e=t[0]==="-";e&&(t=t.substring(1,t.length));var n=t.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(e?"-":"")+r+(i?"."+i:"")}function T5(t,e,n){for(var r="",i=n?"0":"",o=0;o<=e-1;o++)r+=t[o]||i;return r}function E5(t,e){return Array(e+1).join(t)}function M5(t){var e=t+"",n=e[0]==="-"?"-":"";n&&(e=e.substring(1));var r=e.split(/[eE]/g),i=r[0],o=r[1];if(o=Number(o),!o)return n+i;i=i.replace(".","");var s=1+o,a=i.length;return s<0?i="0."+E5("0",Math.abs(s))+i:s>=a?i=i+E5("0",s-a):i=(i.substring(0,s)||"0")+"."+i.substring(s),n+i}function O5(t,e,n){if(["","-"].indexOf(t)!==-1)return t;var r=(t.indexOf(".")!==-1||n)&&e,i=Zg(t),o=i.beforeDecimal,s=i.afterDecimal,a=i.hasNegation,l=parseFloat("0."+(s||"0")),u=s.length<=e?"0."+s:l.toFixed(e),c=u.split("."),h=o.split("").reverse().reduce(function(g,m,b){return g.length>b?(Number(g[0])+Number(m)).toString()+g.substring(1,g.length):m+g},c[0]),f=T5(c[1]||"",e,n),d=a?"-":"",p=r?".":"";return""+d+h+p+f}function po(t,e){if(t.value=t.value,t!==null){if(t.createTextRange){var n=t.createTextRange();return n.move("character",e),n.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}var A5=ise(function(t,e){for(var n=0,r=0,i=t.length,o=e.length;t[n]===e[n]&&n<i;)n++;for(;t[i-1-r]===e[o-1-r]&&o-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}});function cse(t,e,n){return Math.min(Math.max(t,e),n)}function Qg(t){return Math.max(t.selectionStart,t.selectionEnd)}function hse(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function fse(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function dse(t){var e=t.currentValue,n=t.formattedValue,r=t.currentValueIndex,i=t.formattedValueIndex;return e[r]===n[i]}function pse(t,e,n,r,i,o,s){s===void 0&&(s=dse);var a=i.findIndex(function(S){return S}),l=t.slice(0,a);!e&&!n.startsWith(l)&&(e=l,n=l+n,r=r+l.length);for(var u=n.length,c=t.length,h={},f=new Array(u),d=0;d<u;d++){f[d]=-1;for(var p=0,g=c;p<g;p++){var m=s({currentValue:n,lastValue:e,formattedValue:t,currentValueIndex:d,formattedValueIndex:p});if(m&&h[p]!==!0){f[d]=p,h[p]=!0;break}}}for(var b=r;b<u&&(f[b]===-1||!o(n[b]));)b++;var x=b===u||f[b]===-1?c:f[b];for(b=r-1;b>0&&f[b]===-1;)b--;var C=b===-1||f[b]===-1?0:f[b]+1;return C>x?x:r-C<x-r?C:x}function P5(t,e,n,r){var i=t.length;if(e=cse(e,0,i),r==="left"){for(;e>=0&&!n[e];)e--;e===-1&&(e=n.indexOf(!0))}else{for(;e<=i&&!n[e];)e++;e>i&&(e=n.lastIndexOf(!0))}return e===-1&&(e=i),e}function gse(t){for(var e=Array.from({length:t.length+1}).map(function(){return!0}),n=0,r=e.length;n<r;n++)e[n]=!!(Ol(t[n])||Ol(t[n-1]));return e}function D5(t,e,n,r,i,o){o===void 0&&(o=bi);var s=lse(function(p,g){var m,b;return S5(p)?(b="",m=""):typeof p=="number"||g?(b=typeof p=="number"?M5(p):p,m=r(b)):(b=i(p,void 0),m=r(b)),{formattedValue:m,numAsString:b}}),a=v.useState(function(){return s(Ws(t)?e:t,n)}),l=a[0],u=a[1],c=function(p,g){p.formattedValue!==l.formattedValue&&u({formattedValue:p.formattedValue,numAsString:p.value}),o(p,g)},h=t,f=n;Ws(t)&&(h=l.numAsString,f=!0);var d=s(h,f);return v.useMemo(function(){u(d)},[d.formattedValue]),[l,c]}function mse(t){return t.replace(/[^0-9]/g,"")}function vse(t){return t}function yse(t){var e=t.type;e===void 0&&(e="text");var n=t.displayType;n===void 0&&(n="input");var r=t.customInput,i=t.renderText,o=t.getInputRef,s=t.format;s===void 0&&(s=vse);var a=t.removeFormatting;a===void 0&&(a=mse);var l=t.defaultValue,u=t.valueIsNumericString,c=t.onValueChange,h=t.isAllowed,f=t.onChange;f===void 0&&(f=bi);var d=t.onKeyDown;d===void 0&&(d=bi);var p=t.onMouseUp;p===void 0&&(p=bi);var g=t.onFocus;g===void 0&&(g=bi);var m=t.onBlur;m===void 0&&(m=bi);var b=t.value,x=t.getCaretBoundary;x===void 0&&(x=gse);var C=t.isValidInputCharacter;C===void 0&&(C=Ol);var S=t.isCharacterSame,w=C5(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),k=D5(b,l,!!u,s,a,c),T=k[0],O=T.formattedValue,P=T.numAsString,D=k[1],R=v.useRef({formattedValue:O,numAsString:P}),H=function(X,fe){R.current={formattedValue:X.formattedValue,numAsString:X.value},D(X,fe)},W=v.useState(!1),B=W[0],j=W[1],N=v.useRef(null),V=v.useRef({setCaretTimeout:null,focusTimeout:null});v.useEffect(function(){return j(!0),function(){clearTimeout(V.current.setCaretTimeout),clearTimeout(V.current.focusTimeout)}},[]);var me=s,re=function(X,fe){var xe=parseFloat(fe);return{formattedValue:X,value:fe,floatValue:isNaN(xe)?void 0:xe}},_=function(X,fe,xe){X.selectionStart===0&&X.selectionEnd===X.value.length||(po(X,fe),V.current.setCaretTimeout=setTimeout(function(){X.value===xe&&X.selectionStart!==X.selectionEnd&&po(X,fe)},0))},F=function(X,fe,xe){return P5(X,fe,x(X),xe)},U=function(X,fe,xe){var st=x(fe),Je=pse(fe,O,X,xe,st,C,S);return Je=P5(fe,Je,st),Je},se=function(X){var fe=X.formattedValue;fe===void 0&&(fe="");var xe=X.input,st=X.setCaretPosition;st===void 0&&(st=!0);var Je=X.source,et=X.event,Dt=X.numAsString,_t=X.caretPos;if(xe){if(_t===void 0&&st){var Zr=X.inputValue||xe.value,J=Qg(xe);xe.value=fe,_t=U(Zr,fe,J)}xe.value=fe,st&&_t!==void 0&&_(xe,_t,fe)}fe!==O&&H(re(fe,Dt),{event:et,source:Je})};v.useEffect(function(){var X=R.current,fe=X.formattedValue,xe=X.numAsString;O!==fe&&(O!==P||fe!==xe)&&H(re(O,P),{event:void 0,source:Ml.props})},[O,P]);var Q=N.current?Qg(N.current):void 0,ve=typeof window<"u"?v.useLayoutEffect:v.useEffect;ve(function(){var X=N.current;if(O!==R.current.formattedValue&&X){var fe=U(R.current.formattedValue,O,Q);X.value=O,_(X,fe,O)}},[O]);var le=function(X,fe,xe){var st=A5(O,X),Je=Object.assign(Object.assign({},st),{lastValue:O}),et=a(X,Je),Dt=me(et);if(et=a(Dt,void 0),h&&!h(re(Dt,et))){var _t=fe.target,Zr=Qg(_t),J=U(X,O,Zr);return _t.value=O,_(_t,J,O),!1}return se({formattedValue:Dt,numAsString:et,inputValue:X,event:fe,source:xe,setCaretPosition:!0,input:fe.target}),!0},ye=function(X){var fe=X.target,xe=fe.value,st=le(xe,X,Ml.event);st&&f(X)},ue=function(X){var fe=X.target,xe=X.key,st=fe.selectionStart,Je=fe.selectionEnd,et=fe.value;et===void 0&&(et="");var Dt;if(xe==="ArrowLeft"||xe==="Backspace"?Dt=Math.max(st-1,0):xe==="ArrowRight"?Dt=Math.min(st+1,et.length):xe==="Delete"&&(Dt=st),Dt===void 0||st!==Je){d(X);return}var _t=Dt;if(xe==="ArrowLeft"||xe==="ArrowRight"){var Zr=xe==="ArrowLeft"?"left":"right";_t=F(et,Dt,Zr),_t!==Dt&&X.preventDefault()}else xe==="Delete"&&!C(et[Dt])?_t=F(et,Dt,"right"):xe==="Backspace"&&!C(et[Dt])&&(_t=F(et,Dt,"left"));_t!==Dt&&_(fe,_t,et),X.isUnitTestRun&&_(fe,_t,et),d(X)},ne=function(X){var fe=X.target,xe=fe.selectionStart,st=fe.selectionEnd,Je=fe.value;if(Je===void 0&&(Je=""),xe===st){var et=F(Je,xe);et!==xe&&_(fe,et,Je)}p(X)},ce=function(X){X.persist&&X.persist();var fe=X.target;N.current=fe,V.current.focusTimeout=setTimeout(function(){var xe=fe.selectionStart,st=fe.selectionEnd,Je=fe.value;Je===void 0&&(Je="");var et=F(Je,xe);et!==xe&&!(xe===0&&st===Je.length)&&_(fe,et,Je),g(X)},0)},_e=function(X){N.current=null,clearTimeout(V.current.focusTimeout),clearTimeout(V.current.setCaretTimeout),m(X)},q=B&&hse()?"numeric":void 0,ht=Object.assign({inputMode:q},w,{type:e,value:O,onChange:ye,onKeyDown:ue,onMouseUp:ne,onFocus:ce,onBlur:_e});if(n==="text")return i?v.createElement(v.Fragment,null,i(O,w)||null):v.createElement("span",Object.assign({},w,{ref:o}),O);if(r){var ae=r;return v.createElement(ae,Object.assign({},ht,{ref:o}))}return v.createElement("input",Object.assign({},ht,{ref:o}))}function _5(t,e){var n=e.decimalScale,r=e.fixedDecimalScale,i=e.prefix;i===void 0&&(i="");var o=e.suffix;o===void 0&&(o="");var s=e.allowNegative,a=e.thousandsGroupStyle;if(a===void 0&&(a="thousand"),t===""||t==="-")return t;var l=Ph(e),u=l.thousandSeparator,c=l.decimalSeparator,h=n!==0&&t.indexOf(".")!==-1||n&&r,f=Zg(t,s),d=f.beforeDecimal,p=f.afterDecimal,g=f.addNegation;return n!==void 0&&(p=T5(p,n,!!r)),u&&(d=ase(d,u,a)),i&&(d=i+d),o&&(p=p+o),g&&(d="-"+d),t=d+(h&&c||"")+p,t}function Ph(t){var e=t.decimalSeparator;e===void 0&&(e=".");var n=t.thousandSeparator,r=t.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}function bse(t,e){t===void 0&&(t="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(t),o=r.test(t);return t=t.replace(/-/g,""),i&&!o&&e&&(t="-"+t),t}function xse(t,e){return new RegExp("(^-)|[0-9]|"+k5(t),e?"g":void 0)}function wse(t,e,n){return t===""?!0:!(e!=null&&e.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof t=="string"&&!isNaN(Number(t))}function Cse(t,e,n){var r;e===void 0&&(e=fse(t));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var s=n.suffix;s===void 0&&(s="");var a=n.decimalScale,l=e.from,u=e.to,c=u.start,h=u.end,f=Ph(n),d=f.allowedDecimalSeparators,p=f.decimalSeparator,g=t[h]===p;if(Ol(t)&&(t===o||t===s)&&e.lastValue==="")return t;if(h-c===1&&d.indexOf(t[c])!==-1){var m=a===0?"":p;t=t.substring(0,c)+m+t.substring(c+1,t.length)}var b=function(V,me,re){var _=!1,F=!1;o.startsWith("-")?_=!1:V.startsWith("--")?(_=!1,F=!0):s.startsWith("-")&&V.length===s.length?_=!1:V[0]==="-"&&(_=!0);var U=_?1:0;return F&&(U=2),U&&(V=V.substring(U),me-=U,re-=U),{value:V,start:me,end:re,hasNegation:_}},x=b(t,c,h),C=x.hasNegation;r=x,t=r.value,c=r.start,h=r.end;var S=b(e.lastValue,l.start,l.end),w=S.start,k=S.end,T=S.value,O=t.substring(c,h);t.length&&T.length&&(w>T.length-s.length||k<o.length)&&!(O&&s.startsWith(O))&&(t=T);var P=0;t.startsWith(o)?P+=o.length:c<o.length&&(P=c),t=t.substring(P),h-=P;var D=t.length,R=t.length-s.length;t.endsWith(s)?D=R:(h>R||h>t.length-s.length)&&(D=h),t=t.substring(0,D),t=bse(C?"-"+t:t,i),t=(t.match(xse(p,!0))||[]).join("");var H=t.indexOf(p);t=t.replace(new RegExp(k5(p),"g"),function(V,me){return me===H?".":""});var W=Zg(t,i),B=W.beforeDecimal,j=W.afterDecimal,N=W.addNegation;return u.end-u.start<l.end-l.start&&B===""&&g&&!parseFloat(j)&&(t=N?"-":""),t}function Sse(t,e){var n=e.prefix;n===void 0&&(n="");var r=e.suffix;r===void 0&&(r="");var i=Array.from({length:t.length+1}).map(function(){return!0}),o=t[0]==="-";i.fill(!1,0,n.length+(o?1:0));var s=t.length;return i.fill(!1,s-r.length+1,s+1),i}function kse(t){var e=Ph(t),n=e.thousandSeparator,r=e.decimalSeparator,i=t.prefix;i===void 0&&(i="");var o=t.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
247
+ Decimal separator can't be same as thousand separator.
248
+ thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
249
+ decimalSeparator: `+r+` (default value for decimalSeparator is .)
250
+ `);return i.startsWith("-")&&o&&(console.error(`
251
+ Prefix can't start with '-' when allowNegative is true.
252
+ prefix: `+i+`
253
+ allowNegative: `+o+`
254
+ `),o=!1),Object.assign(Object.assign({},t),{allowNegative:o})}function Tse(t){t=kse(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,n=t.allowNegative,r=t.allowLeadingZeros,i=t.onKeyDown;i===void 0&&(i=bi);var o=t.onBlur;o===void 0&&(o=bi);var s=t.thousandSeparator,a=t.decimalScale,l=t.fixedDecimalScale,u=t.prefix;u===void 0&&(u="");var c=t.defaultValue,h=t.value,f=t.valueIsNumericString,d=t.onValueChange,p=C5(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=Ph(t),m=g.decimalSeparator,b=g.allowedDecimalSeparators,x=function(N){return _5(N,t)},C=function(N,V){return Cse(N,V,t)},S=Ws(h)?c:h,w=f??wse(S,u,e);Ws(h)?Ws(c)||(w=w||typeof c=="number"):w=w||typeof h=="number";var k=function(N){return S5(N)?N:(typeof N=="number"&&(N=M5(N)),w&&typeof a=="number"?O5(N,a,!!l):N)},T=D5(k(h),k(c),!!w,x,C,d),O=T[0],P=O.numAsString,D=O.formattedValue,R=T[1],H=function(N){var V=N.target,me=N.key,re=V.selectionStart,_=V.selectionEnd,F=V.value;if(F===void 0&&(F=""),re!==_){i(N);return}me==="Backspace"&&F[0]==="-"&&re===u.length+1&&n&&po(V,1),a&&l&&(me==="Backspace"&&F[re-1]===m?(po(V,re-1),N.preventDefault()):me==="Delete"&&F[re]===m&&N.preventDefault()),b!=null&&b.includes(me)&&F[re]===m&&po(V,re+1);var U=s===!0?",":s;me==="Backspace"&&F[re-1]===U&&po(V,re-1),me==="Delete"&&F[re]===U&&po(V,re+1),i(N)},W=function(N){var V=P;if(V.match(/\d/g)||(V=""),r||(V=use(V)),l&&a&&(V=O5(V,a,l)),V!==P){var me=_5(V,t);R({formattedValue:me,value:V,floatValue:parseFloat(V)},{event:N,source:Ml.event})}o(N)},B=function(N){return N===m?!0:Ol(N)},j=function(N){var V=N.currentValue,me=N.lastValue,re=N.formattedValue,_=N.currentValueIndex,F=N.formattedValueIndex,U=V[_],se=re[F],Q=A5(me,V),ve=Q.to;return _>=ve.start&&_<ve.end&&b&&b.includes(U)&&se===m?!0:U===se};return Object.assign(Object.assign({},p),{value:D,valueIsNumericString:!1,isValidInputCharacter:B,isCharacterSame:j,onValueChange:R,format:x,removeFormatting:C,getCaretBoundary:function(N){return Sse(N,t)},onKeyDown:H,onBlur:W})}function Ese(t){var e=Tse(t);return v.createElement(yse,Object.assign({},e))}const Dh=v.forwardRef(({decimalScale:t=0,fixedDecimalScale:e=!0,prefix:n,allowNegative:r,minValue:i,maxValue:o=1/0,maxLength:s,value:a,inputProps:l,InputProps:u,size:c,disabled:h,name:f,helperText:d,error:p,fullWidth:g,label:m,required:b,onChange:x,tabIndex:C},S)=>{const w=v.useRef(null),k=T=>{x&&(w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{const{floatValue:O}=T,P=O||0;if(i!==void 0&&i>P){x({target:{name:f,value:i}});return}if(O!==void 0&&o<P){x({target:{name:f,value:o}});return}x({target:{name:f,value:O}})},600))};return v.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]),y.jsx(Ese,{getInputRef:S,value:a,prefix:n,decimalSeparator:",",thousandSeparator:".",decimalScale:t,fixedDecimalScale:e,autoComplete:"off",allowNegative:r,maxLength:s,onValueChange:k,customInput:M.TextField,InputProps:{...u},inputProps:{...l,tabIndex:C},disabled:h,size:c,helperText:d,error:p,fullWidth:g,label:m,required:b})});Dh.displayName="NumberInput";const Jg=v.forwardRef(({name:t,increment:e=1,updadteForMultiple:n,allowNegative:r=!1,value:i=0,onChange:o,minValue:s,maxValue:a,decimalScale:l,disabled:u,tabIndex:c,...h},f)=>{const d=x5(i,e,l),p=()=>{if(!r&&i-e<0)return;const b=i-e,x=Math.floor(i/e)*e,C=!d&&n?x:b;s!==void 0&&b<s?o(s):o(Xg(C))},g=()=>{const b=Number(i)+e,x=Math.ceil(i/e)*e,S=Xg(!d&&n?x:b);a!==void 0&&b>=a?o(a):o(s!==void 0&&S<=s?s:S)},m=b=>{const x=Number(b.target.value),C=Math.ceil(x/e)*e,S=n?C:x;if(s!==void 0&&x<=s){o(s);return}if(a!==void 0&&x>=a){o(a);return}o(S)};return y.jsx(Dh,{ref:f,name:t,value:i,minValue:s,maxValue:a,allowNegative:r,decimalScale:l,InputProps:{startAdornment:y.jsx(M.InputAdornment,{position:"start",children:y.jsx(M.IconButton,{size:"medium",disabled:u||(r?!1:!i),onClick:p,children:y.jsx(vt,{icon:"eva:minus-fill",width:14,height:14,color:"primary.main"})})}),endAdornment:y.jsx(M.InputAdornment,{position:"end",children:y.jsx(M.IconButton,{size:"medium",onClick:g,disabled:u,children:y.jsx(vt,{icon:"eva:plus-fill",width:14,height:14,color:"primary.main"})})}),inputProps:{style:{textAlign:"center"}}},inputProps:{tabIndex:c},onChange:m,disabled:u,...h})});Jg.displayName="Incrementer";const Mse=ur(M.Box)(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=e.variant==="filled",i=e.variant==="outlined",o=e.variant==="soft",s={...e.color==="default"&&{...i&&{backgroundColor:"transparent",color:t.palette.text.primary,border:`1px solid ${Y(t.palette.grey[500],.32)}`},...o&&{color:n?t.palette.text.primary:t.palette.common.white,backgroundColor:Y(t.palette.grey[500],.16)}}},a={...e.color!=="default"&&{...r&&{color:t.palette[e.color].contrastText,backgroundColor:t.palette[e.color].main},...i&&{backgroundColor:"transparent",color:t.palette[e.color].main,border:`1px solid ${t.palette[e.color].main}`},...o&&{color:t.palette[e.color][n?"dark":"light"],backgroundColor:Y(t.palette[e.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"none",padding:t.spacing(0,1),color:t.palette.grey[800],fontSize:t.typography.pxToRem(12),fontFamily:t.typography.fontFamily,backgroundColor:t.palette.grey[300],fontWeight:t.typography.fontWeightBold,...a,...s}}),I5=v.forwardRef(({children:t,color:e="default",variant:n="soft",startIcon:r,endIcon:i,sx:o,...s},a)=>{const l=Yi(),u={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return y.jsxs(Mse,{ref:a,component:"span",ownerState:{color:e,variant:n},sx:{...r&&{pl:.75},...i&&{pr:.75},...o},theme:l,...s,children:[r&&y.jsxs(M.Box,{sx:{mr:.75,...u},children:[" ",r," "]}),t,i&&y.jsxs(M.Box,{sx:{ml:.75,...u},children:[" ",i," "]})]})});I5.displayName="Label";function xi(t){return typeof t=="string"||t instanceof String}function $5(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function F5(t,e){return Array.isArray(e)?F5(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,o]=r;return e(o,i)&&(n[i]=o),n},{})}const be={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Ose(t){switch(t){case be.LEFT:return be.FORCE_LEFT;case be.RIGHT:return be.FORCE_RIGHT;default:return t}}function em(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function _h(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!_h(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const o=e instanceof Date,s=t instanceof Date;if(o&&s)return e.getTime()==t.getTime();if(o!=s)return!1;const a=e instanceof RegExp,l=t instanceof RegExp;if(a&&l)return e.toString()==t.toString();if(a!=l)return!1;const u=Object.keys(e);for(i=0;i<u.length;i++)if(!Object.prototype.hasOwnProperty.call(t,u[i]))return!1;for(i=0;i<u.length;i++)if(!_h(t[u[i]],e[u[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Ase{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?be.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?be.RIGHT:be.LEFT}}function Me(t,e){return new Me.InputMask(t,e)}function L5(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?Me.MaskedRegExp:xi(t)?Me.MaskedPattern:t===Date?Me.MaskedDate:t===Number?Me.MaskedNumber:Array.isArray(t)||t===Array?Me.MaskedDynamic:Me.Masked&&t.prototype instanceof Me.Masked?t:Me.Masked&&t instanceof Me.Masked?t.constructor:t instanceof Function?Me.MaskedFunction:(console.warn("Mask not found for mask",t),Me.Masked)}function Ih(t){if(!t)throw new Error("Options in not defined");if(Me.Masked){if(t.prototype instanceof Me.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof Me.Masked?{mask:t}:$5(t)&&t.mask instanceof Me.Masked?t:{};if(e){const r=e.mask;return{...F5(e,(i,o)=>!o.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return $5(t)?{...t}:{mask:t}}function go(t){if(Me.Masked&&t instanceof Me.Masked)return t;const e=Ih(t),n=L5(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}Me.createMask=go;class tm{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}Me.MaskElement=tm;class mo extends tm{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(mo.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}mo.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},Me.HTMLMaskElement=mo;class Pse extends mo{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}Me.HTMLMaskElement=mo;class R5 extends mo{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,o=i.getSelection&&i.getSelection();o&&(o.removeAllRanges(),o.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}Me.HTMLContenteditableMaskElement=R5;class Dse{constructor(e,n){this.el=e instanceof tm?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new R5(e):new Pse(e),this.masked=go(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof Me.Masked)&&this.masked.constructor===L5(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof Me.Masked?e:go({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,r=this.displayValue,i=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==r&&(this.el.value=r),i&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),o=!_h(this.masked,r);i&&(this.mask=n),o&&this.masked.updateOptions(r),(i||o)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,be.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new Ase({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,o=r===this.masked.rawInputValue?n.removeDirection:be.NONE;let s=this.masked.nearestInputPos(n.startChangePos+i,o);o!==be.NONE&&(s=this.masked.nearestInputPos(s,be.NONE)),this.updateControl(),this.updateCursor(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Me.InputMask=Dse;class rt{static normalize(e){return Array.isArray(e)?e:[e,new rt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}Me.ChangeDetails=rt;class Hr{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class An{constructor(e){this._value="",this._update({...An.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new Hr(this.extractInput(e,n),e)}appendTail(e){return xi(e)&&(e=new Hr(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new rt({inserted:e,rawInserted:e})):new rt}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let o;if([e,o]=this.doPrepareChar(e,n),o=o.aggregate(this._appendCharRaw(e,n)),o.inserted){let s,a=this.doValidate(n)!==!1;if(a&&r!=null){const l=this.state;this.overwrite===!0&&(s=r.state,r.unshift(this.displayValue.length-o.tailShift));let u=this.appendTail(r);a=u.rawInserted===r.toString(),!(a&&u.inserted)&&this.overwrite==="shift"&&(this.state=l,s=r.state,r.shift(),u=this.appendTail(r),a=u.rawInserted===r.toString()),a&&u.inserted&&(this.state=l)}a||(o=new rt,this.state=i,r&&s&&(r.state=s))}return o}_appendPlaceholder(){return new rt}_appendEager(){return new rt}append(e,n,r){if(!xi(e))throw new Error("value should be string");const i=xi(r)?new Hr(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let o;[e,o]=this.doPrepare(e,n);for(let s=0;s<e.length;++s){const a=this._appendChar(e[s],n,i);if(!a.rawInserted&&!this.doSkipInvalid(e[s],n,i))break;o.aggregate(a)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&o.aggregate(this._appendEager()),i!=null&&(o.tailShift+=this.appendTail(i).tailShift),o}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new rt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&this.append(r.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),rt.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),rt.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,o){i===void 0&&(i=be.NONE),o===void 0&&(o={input:!0});const s=e+n,a=this.extractTail(s),l=this.eager===!0||this.eager==="remove";let u;l&&(i=Ose(i),u=this.extractInput(0,s,{raw:!0}));let c=e;const h=new rt;if(i!==be.NONE&&(c=this.nearestInputPos(e,n>1&&e!==0&&!l?be.NONE:i),h.tailShift=c-e),h.aggregate(this.remove(c)),l&&i!==be.NONE&&u===this.rawInputValue)if(i===be.FORCE_LEFT){let f;for(;u===this.rawInputValue&&(f=this.displayValue.length);)h.aggregate(new rt({tailShift:-1})).aggregate(this.remove(f-1))}else i===be.FORCE_RIGHT&&a.unshift();return h.aggregate(this.append(r,o,a))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||An.EMPTY_VALUES.includes(e)&&An.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}An.DEFAULTS={skipInvalid:!0},An.EMPTY_VALUES=[void 0,null,""],Me.Masked=An;class vo{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=xi(e)?new Hr(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof Hr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof vo){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof Me.MaskedPattern))return new Hr(this.toString()).appendTo(e);const n=new rt;for(let r=0;r<this.chunks.length&&!n.skip;++r){const i=this.chunks[r],o=e._mapPosToBlock(e.displayValue.length),s=i.stop;let a;if(s!=null&&(!o||o.index<=s)){if(i instanceof vo||e._stops.indexOf(s)>=0){const l=e._appendPlaceholder(s);n.aggregate(l)}a=i instanceof vo&&e._blocks[s]}if(a){const l=a.appendTail(i);l.skip=!1,n.aggregate(l),e._value+=l.inserted;const u=i.toString().slice(l.rawInserted.length);u&&n.aggregate(e.append(u,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const o="chunks"in i?new vo:new Hr;return o.state=i,o})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],o=i.unshift(n);if(i.toString()){if(!o)break;++r}else this.chunks.splice(r,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class _se{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,be.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,be.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,be.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,be.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,be.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,be.NONE),!0})}}class B5{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new rt}nearestInputPos(e,n){n===void 0&&(n=be.NONE);const r=0,i=this._value.length;switch(n){case be.LEFT:case be.FORCE_LEFT:return r;case be.NONE:case be.RIGHT:case be.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const r=new rt;if(this.isFilled)return r;const i=this.eager===!0||this.eager==="append",s=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!i)&&!n.tail;return s&&(r.rawInserted=this.char),this._value=r.inserted=this.char,this._isRawInput=s&&(n.raw||n.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new rt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Hr("")}appendTail(e){return xi(e)&&(e=new Hr(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class $h{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:o,lazy:s,eager:a,...l}=e;this.masked=go(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:o,lazy:s,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new rt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new rt;const r=this.masked.state,i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i.inserted=i.rawInserted="",this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){const e=new rt;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new rt}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=be.NONE);const r=0,i=this.value.length,o=Math.min(Math.max(e,r),i);switch(n){case be.LEFT:case be.FORCE_LEFT:return this.isComplete?o:r;case be.RIGHT:case be.FORCE_RIGHT:return this.isComplete?o:i;case be.NONE:default:return o}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||(e==null?void 0:e._beforeTailState)}}}$h.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Ise extends An{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}Me.MaskedRegExp=Ise;class Pn extends An{constructor(e){super({...Pn.DEFAULTS,...e,definitions:Object.assign({},$h.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let o=0;o<n.length;++o){if(this.blocks){const u=n.slice(o),c=Object.keys(this.blocks).filter(f=>u.indexOf(f)===0);c.sort((f,d)=>d.length-f.length);const h=c[0];if(h){const{expose:f,...d}=Ih(this.blocks[h]),p=go({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...d,parent:this});p&&(this._blocks.push(p),f&&(this.exposeBlock=p),this._maskedBlocks[h]||(this._maskedBlocks[h]=[]),this._maskedBlocks[h].push(this._blocks.length-1)),o+=h.length-1;continue}}let s=n[o],a=s in e;if(s===Pn.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){r=!r;continue}if(s==="["||s==="]"){i=!i;continue}if(s===Pn.ESCAPE_CHAR){if(++o,s=n[o],!s)break;a=!1}const l=a?new $h({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Ih(e[s]),parent:this}):new B5({char:s,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...r}=e;this._blocks.forEach((i,o)=>i.state=n[o]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new rt;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const o=this._blocks[i]._appendEager();if(!o.inserted)break;n.aggregate(o)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new rt;if(!r)return i;for(let s=r.index;;++s){var o;const a=this._blocks[s];if(!a)break;const l=a._appendChar(e,{...n,_beforeTailState:(o=n._beforeTailState)==null||(o=o._blocks)==null?void 0:o[s]}),u=l.skip;if(i.aggregate(l),u||l.rawInserted)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new vo;return e===n||this._forEachBlocksInRange(e,n,(i,o,s,a)=>{const l=i.extractTail(s,a);l.stop=this._findStopBefore(o),l.from=this._blockStartPos(o),l instanceof vo&&(l.blockIndex=o),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(o,s,a,l)=>{i+=o.extractInput(a,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new rt;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,o=e??this._blocks.length;return this._blocks.slice(i,o).forEach(s=>{if(!s.lazy||e!=null){var a;const l=s._appendPlaceholder((a=s._blocks)==null?void 0:a.length);this._value+=l.inserted,n.aggregate(l)}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],o=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-o}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const o=this._mapPosToBlock(n),s=o&&i.index===o.index,a=i.offset,l=o&&s?o.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,a,l),o&&!s){for(let u=i.index+1;u<o.index;++u)r(this._blocks[u],u,0,this._blocks[u].displayValue.length);r(this._blocks[o.index],o.index,0,o.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,o,s,a)=>{r.aggregate(i.remove(s,a))}),r}nearestInputPos(e,n){if(n===void 0&&(n=be.NONE),!this._blocks.length)return 0;const r=new _se(this,e);if(n===be.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===be.LEFT||n===be.FORCE_LEFT){if(n===be.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===be.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===be.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===be.RIGHT||n===be.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===be.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,be.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,o,s,a)=>{r+=i.totalInputPositions(s,a)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}}Pn.DEFAULTS={lazy:!0,placeholderChar:"_"},Pn.STOP_CHAR="`",Pn.ESCAPE_CHAR="\\",Pn.InputDefinition=$h,Pn.FixedDefinition=B5,Me.MaskedPattern=Pn;class Fh extends Pn{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:o=this.autofix,...s}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=o;const a=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<l.length&&l[u]===a[u];)++u;s.mask=l.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(s)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,o]=e.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(n="0".repeat(i.length)+o,r="9".repeat(i.length)+o),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;if([e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,r];const i=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0"),s=this.value+e;if(s.length>this.maxLength)return["",r];const[a,l]=this.boundaries(s);return Number(l)<this.from?[i[s.length-1],r]:Number(a)>this.to?this.autofix==="pad"&&s.length<this.maxLength?["",r.aggregate(this.append(i[s.length-1]+e,n))]:[o[s.length-1],r]:[e,r]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,o]=this.boundaries(n);return this.from<=Number(o)&&Number(i)<=this.to&&super.doValidate(e)}}Me.MaskedRange=Fh;class yo extends Pn{constructor(e){const{mask:n,pattern:r,...i}={...yo.DEFAULTS,...e};super({...i,mask:xi(n)?n:r})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...o}={...yo.DEFAULTS,...e},s=Object.assign({},yo.GET_DEFAULT_BLOCKS());e.min&&(s.Y.from=e.min.getFullYear()),e.max&&(s.Y.to=e.max.getFullYear()),e.min&&e.max&&s.Y.from===s.Y.to&&(s.m.from=e.min.getMonth()+1,s.m.to=e.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=e.min.getDate(),s.d.to=e.max.getDate())),Object.assign(s,this.blocks,i),Object.keys(s).forEach(a=>{const l=s[a];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update({...o,mask:xi(n)?n:r,blocks:s})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}yo.GET_DEFAULT_BLOCKS=()=>({d:{mask:Fh,from:1,to:31,maxLength:2},m:{mask:Fh,from:1,to:12,maxLength:2},Y:{mask:Fh,from:1900,to:9999}}),yo.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}},Me.MaskedDate=yo;class Al extends An{constructor(e){super({...Al.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=Ih(n),o=go({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=o),o}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,o=this.rawInputValue,s=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:o,a=o.slice(s.length),l=this.currentMask,u=new rt,c=l==null?void 0:l.state;if(this.currentMask=this.doDispatch(e,{...n},r),this.currentMask)if(this.currentMask!==l){if(this.currentMask.reset(),s){const h=this.currentMask.append(s,{raw:!0});u.tailShift=h.inserted.length-i.length}a&&(u.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)}else c&&(this.currentMask.state=c);return u}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new rt;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let o;[r,o]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(o)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let o;[r,o]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(o)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new rt;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...o}=e;n&&this.compiledMasks.forEach((s,a)=>s.state=n[a]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=o}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...o}=e[r];return _h(n,o)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}Al.DEFAULTS=void 0,Al.DEFAULTS={dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,o=e.compiledMasks.map((s,a)=>{const l=e.currentMask===s,u=l?s.displayValue.length:s.nearestInputPos(s.displayValue.length,be.FORCE_LEFT);return s.rawInputValue!==i?(s.reset(),s.append(i,{raw:!0})):l||s.remove(u),s.append(t,e.currentMaskFlags(n)),s.appendTail(r),{index:a,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,be.FORCE_LEFT)))}});return o.sort((s,a)=>a.weight-s.weight||a.totalInputPositions-s.totalInputPositions),e.compiledMasks[o[0].index]}},Me.MaskedDynamic=Al;class $se extends Pn{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(a=>a.length),o=Math.min(...i),s=Math.max(...i)-o;r.mask="*".repeat(o),s&&(r.mask+="["+"*".repeat(s)+"]"),this.enum=n}super._update(r)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}Me.MaskedEnum=$se;class Fse extends An{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}Me.MaskedFunction=Fse;class Vn extends An{constructor(e){super({...Vn.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+em(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(em).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(em(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const o=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const s=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(s);return o.tailShift+=(a-i)*this.thousandsSeparator.length,o.skip=!o.rawInserted&&e===this.thousandsSeparator,o}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),o=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const s=this._separatorsCountFromSlice(r);return new rt({tailShift:(s-o)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case be.NONE:case be.LEFT:case be.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===be.FORCE_LEFT)return r}break}case be.RIGHT:case be.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const r=this.number;n=n&&!isNaN(r)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,o,s)=>i+s),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Vn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Vn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Vn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Vn.EMPTY_VALUES.includes(e)&&Vn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Vn.UNMASKED_RADIX=".",Vn.EMPTY_VALUES=[...An.EMPTY_VALUES,0],Vn.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Vn.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Me.MaskedNumber=Vn;const nm={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function N5(t,e,n){e===void 0&&(e=nm.MASKED),n===void 0&&(n=nm.MASKED);const r=go(t);return i=>r.runIsolated(o=>(o[e]=i,o[n]))}function Lse(t,e,n,r){return N5(e,n,r)(t)}Me.PIPE_TYPE=nm,Me.createPipe=N5,Me.pipe=Lse;try{globalThis.IMask=Me}catch{}const j5={mask:A.oneOfType([A.array,A.func,A.string,A.instanceOf(RegExp),A.oneOf([Date,Number,Me.Masked]),A.instanceOf(Me.Masked)]),value:A.any,unmask:A.oneOfType([A.bool,A.oneOf(["typed"])]),prepare:A.func,prepareChar:A.func,validate:A.func,commit:A.func,overwrite:A.oneOfType([A.bool,A.oneOf(["shift"])]),eager:A.oneOfType([A.bool,A.oneOf(["append","remove"])]),skipInvalid:A.bool,onAccept:A.func,onComplete:A.func,placeholderChar:A.string,displayChar:A.string,lazy:A.bool,definitions:A.object,blocks:A.object,enum:A.arrayOf(A.string),maxLength:A.number,from:A.number,to:A.number,pattern:A.string,format:A.func,parse:A.func,autofix:A.oneOfType([A.bool,A.oneOf(["pad"])]),radix:A.string,thousandsSeparator:A.string,mapToRadix:A.arrayOf(A.string),scale:A.number,normalizeZeros:A.bool,padFractionalZeros:A.bool,min:A.oneOfType([A.number,A.instanceOf(Date)]),max:A.oneOfType([A.number,A.instanceOf(Date)]),dispatch:A.func,inputRef:A.oneOfType([A.func,A.shape({current:A.object})])},V5=Object.keys(j5).filter(t=>t!=="value"),Rse=["value","unmask","onAccept","onComplete","inputRef"],Bse=V5.filter(t=>Rse.indexOf(t)<0);function z5(t){var e;const n=(e=class extends v.Component{constructor(o){super(o),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const o=this.props,s=this._extractMaskOptionsFromProps(o);if(s.mask)this.maskRef?(this.maskRef.updateOptions(s),"value"in o&&o.value!==void 0&&(this.maskValue=o.value)):this.initMask(s);else if(this.destroyMask(),"value"in o&&o.value!==void 0){var a;(a=this.element)!=null&&a.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=o.value:this.element.value=o.value}}componentWillUnmount(){this.destroyMask()}_inputRef(o){this.element=o,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=o:this.props.inputRef(o))}initMask(o){o===void 0&&(o=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Me(this.element,o).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(o){const{...s}=o;return Object.keys(s).filter(a=>Bse.indexOf(a)<0).forEach(a=>{delete s[a]}),s}_extractNonMaskProps(o){const{...s}=o;return V5.forEach(a=>{delete s[a]}),"defaultValue"in s||(s.defaultValue=o.mask?"":s.value),delete s.value,s}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(o){this.maskRef&&(o=o==null&&this.props.unmask!=="typed"?"":o,this.props.unmask==="typed"?this.maskRef.typedValue=o:this.props.unmask?this.maskRef.unmaskedValue=o:this.maskRef.value=o)}_onAccept(o){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,o)}_onComplete(o){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,o)}render(){return v.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),r=t.displayName||t.name||"Component";return n.displayName="IMask("+r+")",n.propTypes=j5,v.forwardRef((i,o)=>v.createElement(n,{...i,ref:o}))}const Nse=z5(t=>{let{inputRef:e,...n}=t;return v.createElement("input",{...n,ref:e})}),jse=(t,e)=>v.createElement(Nse,{...t,ref:e});v.forwardRef(jse);const Vse=z5(t=>{const{inputRef:e,"data-value":n,defaultValue:r,tabIndex:i,...o}=t;return y.jsx(M.TextField,{inputRef:e,fullWidth:!0,...o,inputProps:{...o.inputProps,tabIndex:i},value:n})}),rm=v.forwardRef(({onChange:t,name:e,...n},r)=>{const[i,o]=v.useState("");return y.jsx(Vse,{inputRef:r,name:e,"data-value":i,...n,onAccept:(s,a)=>{o(s),t({target:{name:e,value:a._unmaskedValue}})}})});rm.displayName="MaskedInput";function zse(t){let e;switch(t){case"top-left":e={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":e={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":e={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":e={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":e={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":e={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":e={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return e}const Wse=ur("span")(({arrow:t,theme:e})=>{const i=`solid 1px ${Y(e.palette.grey[500],.12)}`,o={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},s={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},a={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[e.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:e.palette.background.paper},...t==="top-left"&&{...o,left:20},...t==="top-center"&&{...o,left:0,right:0,margin:"auto"},...t==="top-right"&&{...o,right:20},...t==="bottom-left"&&{...s,left:20},...t==="bottom-center"&&{...s,left:0,right:0,margin:"auto"},...t==="bottom-right"&&{...s,right:20},...t==="left-top"&&{...a,top:20},...t==="left-center"&&{...a,top:0,bottom:0,margin:"auto"},...t==="left-bottom"&&{...a,bottom:20},...t==="right-top"&&{...l,top:20},...t==="right-center"&&{...l,top:0,bottom:0,margin:"auto"},...t==="right-bottom"&&{...l,bottom:20}}}),Hse=({open:t,children:e,arrow:n="top-right",disabledArrow:r,sx:i,...o})=>{const{style:s,anchorOrigin:a,transformOrigin:l}=zse(n);return y.jsxs(M.Popover,{open:!!t,anchorEl:t,anchorOrigin:a,transformOrigin:l,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...s,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...o,children:[!r&&y.jsx(Wse,{arrow:n}),e]})},qse=M.styled(M.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,button:{marginRight:24}})),Use=M.styled(M.DialogContent)({padding:"24px !important"}),Yse=M.styled(M.DialogActions)(({theme:t})=>({borderTop:`1px solid ${t.palette.grey[300]}`,backgroundColor:t.palette.grey[50]})),Gse=({children:t,actionsProps:e})=>y.jsx(Yse,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...e,children:t}),W5=({actions:t,actionsProps:e,children:n,dialogContentProps:r,dialogTitle:i,dialogTitleProps:o,onClose:s,id:a,...l})=>{const u=a||"modal-actions";return y.jsxs(M.Dialog,{id:a,scroll:"body",...l,onClose:s,children:[y.jsxs(qse,{children:[i&&y.jsx(M.DialogTitle,{variant:"subtitle1",...o,children:i}),y.jsx(M.IconButton,{onClick:s,children:y.jsx(vt,{icon:"ic:round-close"})})]}),y.jsx(Use,{...r,children:n}),t&&y.jsx(Gse,{actionsProps:{...e,id:u},children:t})]})},H5=({children:t,container:e,waitBeforeShow:n=50})=>{const[r,i]=v.useState(!1);return v.useEffect(()=>{const o=setTimeout(()=>i(!0),n);return()=>clearTimeout(o)},[n]),r?xv.createPortal(t,document.getElementById(e)||document.body):null},Kse=({children:t,id:e="modal-actions"})=>y.jsx(H5,{container:e,children:t}),Xse=t=>{if(!t||(t=t==null?void 0:t.replace(/[^\d]+/g,""),t.length!==11||t==="00000000000"||t==="11111111111"||t==="22222222222"||t==="33333333333"||t==="44444444444"||t==="55555555555"||t==="66666666666"||t==="77777777777"||t==="88888888888"||t==="99999999999"))return!1;let e=0;for(let r=0;r<9;r++)e+=parseInt(t.charAt(r))*(10-r);let n=11-e%11;if((n===10||n===11)&&(n=0),n!==parseInt(t.charAt(9)))return!1;e=0;for(let r=0;r<10;r++)e+=parseInt(t.charAt(r))*(11-r);return n=11-e%11,(n===10||n===11)&&(n=0),n===parseInt(t.charAt(10))},Zse=t=>{if(!t||(t=t.replace(/[^\d]+/g,""),t.length!==14)||t==="00000000000000"||t==="11111111111111"||t==="22222222222222"||t==="33333333333333"||t==="44444444444444"||t==="55555555555555"||t==="66666666666666"||t==="77777777777777"||t==="88888888888888"||t==="99999999999999")return!1;let e=t.length-2,n=t.substring(0,e);const r=t.substring(e);let i=0,o=e-7;for(let a=e;a>=1;a--)i+=parseInt(n.charAt(e-a))*o--,o<2&&(o=9);let s=i%11<2?0:11-i%11;if(s!==parseInt(r.charAt(0)))return!1;e+=1,n=t.substring(0,e),i=0,o=e-7;for(let a=e;a>=1;a--)i+=parseInt(n.charAt(e-a))*o--,o<2&&(o=9);return s=i%11<2?0:11-i%11,s===parseInt(r.charAt(1))},Lh=(t="",e=[8,20],n=!1,r=!1,i=!1)=>{const o=t.length>=e[0]&&t.length<=e[1],s=!i||/[A-Z]/.test(t),a=!r||/[!@#$%^&*(),.?":{}|<>]/.test(t),l=!n||/\d/.test(t);return{isLengthValid:o,hasUpperCaseChar:s,hasSpecialCharacter:a,hasNumberChar:l}},Qse=Object.freeze(Object.defineProperty({__proto__:null,cnpjIsValid:Zse,cpfIsValid:Xse,validatePassword:Lh},Symbol.toStringTag,{value:"Module"})),Jse=M.styled(M.Stack)(({theme:t})=>({width:"100%",border:`solid 1px ${M.alpha(t.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),eae=M.styled(M.Stack)(()=>({gap:4})),Rh=M.styled(M.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",gap:8,color:t.palette.text.secondary,div:{fontSize:12},strong:{fontWeight:700,color:t.palette.text.primary}})),Bh=({passed:t})=>t?y.jsx(vt,{icon:"ic:round-check",color:"success.main"}):y.jsx(vt,{icon:"ic:outline-warning",color:"warning.main"}),tae=({password:t,passwordSize:e,numberChar:n=!1,specialCharacter:r=!1,upperCaseChar:i=!1})=>{const{hasSpecialCharacter:o,hasUpperCaseChar:s,isLengthValid:a,hasNumberChar:l}=Lh(t,e,n,r,i);return y.jsxs(Jse,{children:[y.jsx(M.Typography,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),y.jsxs(eae,{children:[y.jsxs(Rh,{children:[y.jsx(Bh,{passed:a}),y.jsxs(M.Typography,{component:"div",children:[y.jsxs("strong",{children:[e[0],"-",e[1]]})," ","caracteres"]})]}),i&&y.jsxs(Rh,{children:[y.jsx(Bh,{passed:s}),y.jsxs(M.Typography,{component:"div",children:["Pelo menos uma ",y.jsx("strong",{children:"letra maiúscula"})]})]}),n&&y.jsxs(Rh,{children:[y.jsx(Bh,{passed:l}),y.jsxs(M.Typography,{component:"div",children:["Pelo menos ",y.jsx("strong",{children:"um número"})]})]}),r&&y.jsxs(Rh,{children:[y.jsx(Bh,{passed:o}),y.jsxs(M.Typography,{component:"div",children:["Pelo menos um ",y.jsx("strong",{children:"caracter especial"})," ",y.jsx("span",{children:"(#,@,!,?)"})]})]})]})]})},q5=1024;let nae=0,im=class{constructor(e,n){this.from=e,this.to=n}};class Fe{constructor(e={}){this.id=nae++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=yn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Fe.closedBy=new Fe({deserialize:t=>t.split(" ")}),Fe.openedBy=new Fe({deserialize:t=>t.split(" ")}),Fe.group=new Fe({deserialize:t=>t.split(" ")}),Fe.contextHash=new Fe({perNode:!0}),Fe.lookAhead=new Fe({perNode:!0}),Fe.mounted=new Fe({perNode:!0});class Nh{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Fe.mounted.id]}}const rae=Object.create(null);class yn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):rae,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new yn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Fe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Fe.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}yn.none=new yn("",Object.create(null),0,8);class om{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new yn(r.name,i,r.id,r.flags):r)}return new om(n)}}const jh=new WeakMap,U5=new WeakMap;var Yt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Yt||(Yt={}));class Nt{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=Nh.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new lm(this.topNode,e)}cursorAt(e,n=0,r=0){let i=jh.get(this)||this.topNode,o=new lm(i);return o.moveTo(e,n),jh.set(this,o._tree),o}get topNode(){return new zn(this,0,0,null)}resolve(e,n=0){let r=Pl(jh.get(this)||this.topNode,e,n,!1);return jh.set(this,r),r}resolveInner(e,n=0){let r=Pl(U5.get(this)||this.topNode,e,n,!0);return U5.set(this,r),r}resolveStack(e,n=0){return sae(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&Yt.IncludeAnonymous)>0;for(let l=this.cursor(s|Yt.IncludeAnonymous);;){let u=!1;if(l.from<=o&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:cm(yn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Nt(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Nt(yn.none,n,r,i)))}static build(e){return aae(e)}}Nt.empty=new Nt(yn.none,[],[],0);class sm{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new sm(this.buffer,this.index)}}class wi{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return yn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let l=e;l!=n&&!(Y5(o,i,s[l+1],s[l+2])&&(a=l,r>0));l=s[l+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,l=0;a<n;){o[l++]=i[a++],o[l++]=i[a++]-r;let u=o[l++]=i[a++]-r;o[l++]=i[a++]-e,s=Math.max(s,u)}return new wi(o,s,this.set)}}function Y5(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Pl(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof zn&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:Yt.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof zn&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class G5{cursor(e=0){return new lm(this,e)}getChild(e,n=null,r=null){let i=K5(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return K5(this,e,n,r)}resolve(e,n=0){return Pl(this,e,n,!1)}resolveInner(e,n=0){return Pl(this,e,n,!0)}matchContext(e){return am(this,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class zn extends G5{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:l}=s._tree,u=n>0?a.length:-1;e!=u;e+=n){let c=a[e],h=l[e]+s.from;if(Y5(i,r,h,h+c.length)){if(c instanceof wi){if(o&Yt.ExcludeBuffers)continue;let f=c.findChild(0,c.buffer.length,n,r-h,i);if(f>-1)return new Ci(new iae(s,c,e,h),null,f)}else if(o&Yt.IncludeAnonymous||!c.type.isAnonymous||um(c)){let f;if(!(o&Yt.IgnoreMounts)&&(f=Nh.get(c))&&!f.overlay)return new zn(f.tree,h,e,s);let d=new zn(c,h,e,s);return o&Yt.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(n<0?c.children.length-1:0,n,r,i)}}}if(o&Yt.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Yt.IgnoreOverlays)&&(i=Nh.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new zn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function K5(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(;!i.type.is(n);)if(!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function am(t,e,n=e.length-1){for(let r=t.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class iae{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Ci extends G5{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Ci(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Yt.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Ci(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Ci(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Ci(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new Nt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function X5(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof zn&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new oae(i,n)}class oae{constructor(e,n){this.heads=e,this.node=n}get next(){return X5(this.heads)}}function sae(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof zn?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=Nh.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new zn(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Pl(a,e,n,!1))}}return i?X5(i):r}class lm{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof zn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof zn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Yt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Yt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Yt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&Yt.IncludeAnonymous||a instanceof wi||!a.type.isAnonymous||um(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new Ci(this.buffer,n,this.stack[i]);return this.bufferNode=new Ci(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;i&&n&&n(this),i=this.type.isAnonymous,!this.nextSibling();){if(!r)return;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return am(this.node,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return am(this.node,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function um(t){return t.children.some(e=>e instanceof wi||!e.type.isAnonymous||um(e))}function aae(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=q5,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new sm(n,n.length):n,l=r.types,u=0,c=0;function h(w,k,T,O,P,D){let{id:R,start:H,end:W,size:B}=a,j=c;for(;B<0;)if(a.next(),B==-1){let _=o[R];T.push(_),O.push(H-w);return}else if(B==-3){u=R;return}else if(B==-4){c=R;return}else throw new RangeError(`Unrecognized record size: ${B}`);let N=l[R],V,me,re=H-w;if(W-H<=i&&(me=m(a.pos-k,P))){let _=new Uint16Array(me.size-me.skip),F=a.pos-me.size,U=_.length;for(;a.pos>F;)U=b(me.start,_,U);V=new wi(_,W-me.start,r),re=me.start-w}else{let _=a.pos-B;a.next();let F=[],U=[],se=R>=s?R:-1,Q=0,ve=W;for(;a.pos>_;)se>=0&&a.id==se&&a.size>=0?(a.end<=ve-i&&(p(F,U,H,Q,a.end,ve,se,j),Q=F.length,ve=a.end),a.next()):D>2500?f(H,_,F,U):h(H,_,F,U,se,D+1);if(se>=0&&Q>0&&Q<F.length&&p(F,U,H,Q,H,ve,se,j),F.reverse(),U.reverse(),se>-1&&Q>0){let le=d(N);V=cm(N,F,U,0,F.length,0,W-H,le,le)}else V=g(N,F,U,W-H,j-W)}T.push(V),O.push(re)}function f(w,k,T,O){let P=[],D=0,R=-1;for(;a.pos>k;){let{id:H,start:W,end:B,size:j}=a;if(j>4)a.next();else{if(R>-1&&W<R)break;R<0&&(R=B-i),P.push(H,W,B),D++,a.next()}}if(D){let H=new Uint16Array(D*4),W=P[P.length-2];for(let B=P.length-3,j=0;B>=0;B-=3)H[j++]=P[B],H[j++]=P[B+1]-W,H[j++]=P[B+2]-W,H[j++]=j;T.push(new wi(H,P[2]-W,r)),O.push(W-w)}}function d(w){return(k,T,O)=>{let P=0,D=k.length-1,R,H;if(D>=0&&(R=k[D])instanceof Nt){if(!D&&R.type==w&&R.length==O)return R;(H=R.prop(Fe.lookAhead))&&(P=T[D]+R.length+H)}return g(w,k,T,O,P)}}function p(w,k,T,O,P,D,R,H){let W=[],B=[];for(;w.length>O;)W.push(w.pop()),B.push(k.pop()+T-P);w.push(g(r.types[R],W,B,D-P,H-D)),k.push(P-T)}function g(w,k,T,O,P=0,D){if(u){let R=[Fe.contextHash,u];D=D?[R].concat(D):[R]}if(P>25){let R=[Fe.lookAhead,P];D=D?[R].concat(D):[R]}return new Nt(w,k,T,O,D)}function m(w,k){let T=a.fork(),O=0,P=0,D=0,R=T.end-i,H={size:0,start:0,skip:0};e:for(let W=T.pos-w;T.pos>W;){let B=T.size;if(T.id==k&&B>=0){H.size=O,H.start=P,H.skip=D,D+=4,O+=4,T.next();continue}let j=T.pos-B;if(B<0||j<W||T.start<R)break;let N=T.id>=s?4:0,V=T.start;for(T.next();T.pos>j;){if(T.size<0)if(T.size==-3)N+=4;else break e;else T.id>=s&&(N+=4);T.next()}P=V,O+=B,D+=N}return(k<0||O==w)&&(H.size=O,H.start=P,H.skip=D),H.size>4?H:void 0}function b(w,k,T){let{id:O,start:P,end:D,size:R}=a;if(a.next(),R>=0&&O<s){let H=T;if(R>4){let W=a.pos-(R-4);for(;a.pos>W;)T=b(w,k,T)}k[--T]=H,k[--T]=D-w,k[--T]=P-w,k[--T]=O}else R==-3?u=O:R==-4&&(c=O);return T}let x=[],C=[];for(;a.pos>0;)h(t.start||0,t.bufferStart||0,x,C,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:x.length?C[0]+x[0].length:0;return new Nt(l[t.topID],x.reverse(),C.reverse(),S)}const Z5=new WeakMap;function Vh(t,e){if(!t.isAnonymous||e instanceof wi||e.type!=t)return 1;let n=Z5.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Nt)){n=1;break}n+=Vh(t,r)}Z5.set(e,n)}return n}function cm(t,e,n,r,i,o,s,a,l){let u=0;for(let p=r;p<i;p++)u+=Vh(t,e[p]);let c=Math.ceil(u*1.5/8),h=[],f=[];function d(p,g,m,b,x){for(let C=m;C<b;){let S=C,w=g[C],k=Vh(t,p[C]);for(C++;C<b;C++){let T=Vh(t,p[C]);if(k+T>=c)break;k+=T}if(C==S+1){if(k>c){let T=p[S];d(T.children,T.positions,0,T.children.length,g[S]+x);continue}h.push(p[S])}else{let T=g[C-1]+p[C-1].length-w;h.push(cm(t,p,g,S,C,w,T,null,l))}f.push(w+x-o)}}return d(e,n,r,i,0),(a||l)(h,f,s)}class bo{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new bo(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,u=0;;a++){let c=a<n.length?n[a]:null,h=c?c.fromA:1e9;if(h-l>=r)for(;s&&s.from<h;){let f=s;if(l>=f.from||h<=f.to||u){let d=Math.max(f.from,l)-u,p=Math.min(f.to,h)-u;f=d>=p?null:new bo(d,p,f.tree,f.offset+u,a>0,!!c)}if(f&&i.push(f),s.to>h)break;s=o<e.length?e[o++]:null}if(!c)break;l=c.toA,u=c.toA-c.toB}return i}}class Q5{startParse(e,n,r){return typeof e=="string"&&(e=new lae(e)),r=r?r.length?r.map(i=>new im(i.from,i.to)):[new im(0,0)]:[new im(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class lae{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Fe({perNode:!0});class Ue{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),mr.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){let r=[];return this.decompose(e,n,r,0),mr.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Dl(this),o=new Dl(e);for(let s=n,a=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Dl(this,e)}iterRange(e,n=this.length){return new e3(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new t3(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ue.empty:e.length<=32?new Ft(e):mr.from(Ft.split(e,[]))}}class Ft extends Ue{constructor(e,n=uae(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((n?r:a)>=e)return new cae(i,a,r,s);i=a+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Ft(J5(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),a=zh(o.text,s.text.slice(),0,o.length);if(a.length<=32)r.push(new Ft(a,s.length+o.length));else{let l=a.length>>1;r.push(new Ft(a.slice(0,l)),new Ft(a.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Ft))return super.replace(e,n,r);let i=zh(this.text,zh(r.text,J5(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Ft(i,o):mr.from(Ft.split(i,[]),o)}sliceString(e,n=this.length,r=`
255
+ `){let i="";for(let o=0,s=0;o<=n&&s<this.text.length;s++){let a=this.text[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&n>o&&(i+=a.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new Ft(r,i)),r=[],i=-1);return i>-1&&n.push(new Ft(r,i)),n}}class mr extends Ue{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.children[o],a=i+s.length,l=r+s.lines-1;if((n?l:a)>=e)return s.lineInner(e,n,r,i);i=a+1,r=l+1}}decompose(e,n,r,i){for(let o=0,s=0;s<=n&&o<this.children.length;o++){let a=this.children[o],l=s+a.length;if(e<=l&&n>=s){let u=i&((s<=e?1:0)|(l>=n?2:0));s>=e&&l<=n&&!u?r.push(a):a.decompose(e-s,n-s,r,u)}s=l+1}}replace(e,n,r){if(r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e>=o&&n<=a){let l=s.replace(e-o,n-o,r),u=this.lines-s.lines+l.lines;if(l.lines<u>>5-1&&l.lines>u>>5+1){let c=this.children.slice();return c[i]=l,new mr(c,this.length-(n-e)+r.length)}return super.replace(o,a,l)}o=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
256
+ `){let i="";for(let o=0,s=0;o<this.children.length&&s<=n;o++){let a=this.children[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&n>s&&(i+=a.sliceString(e-s,n-s,r)),s=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof mr))return 0;let r=0,[i,o,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==s||o==a)return r;let l=this.children[i],u=e.children[o];if(l!=u)return r+l.scanIdentical(u,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let d of e)r+=d.lines;if(r<32){let d=[];for(let p of e)p.flatten(d);return new Ft(d,n)}let i=Math.max(32,r>>5),o=i<<1,s=i>>1,a=[],l=0,u=-1,c=[];function h(d){let p;if(d.lines>o&&d instanceof mr)for(let g of d.children)h(g);else d.lines>s&&(l>s||!l)?(f(),a.push(d)):d instanceof Ft&&l&&(p=c[c.length-1])instanceof Ft&&d.lines+p.lines<=32?(l+=d.lines,u+=d.length+1,c[c.length-1]=new Ft(p.text.concat(d.text),p.length+1+d.length)):(l+d.lines>i&&f(),l+=d.lines,u+=d.length+1,c.push(d))}function f(){l!=0&&(a.push(c.length==1?c[0]:mr.from(c,u)),u=-1,l=c.length=0)}for(let d of e)h(d);return f(),a.length==1?a[0]:new mr(a,n)}}Ue.empty=new Ft([""],0);function uae(t){let e=-1;for(let n of t)e+=n.length+1;return e}function zh(t,e,n=0,r=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=r;o++){let a=t[o],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(e[e.length-1]+=a,s=!1):e.push(a)),i=l+1}return e}function J5(t,e,n){return zh(t,[""],e,n)}class Dl{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Ft?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],s=o>>1,a=i instanceof Ft?i.text.length:i.children.length;if(s==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
257
+ `,this;e--}else if(i instanceof Ft){let l=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Ft?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class e3{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Dl(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class t3{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ue.prototype[Symbol.iterator]=function(){return this.iter()},Dl.prototype[Symbol.iterator]=e3.prototype[Symbol.iterator]=t3.prototype[Symbol.iterator]=function(){return this});class cae{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}let Hs="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;t<Hs.length;t++)Hs[t]+=Hs[t-1];function hae(t){for(let e=1;e<Hs.length;e+=2)if(Hs[e]>t)return Hs[e-1]<=t;return!1}function n3(t){return t>=127462&&t<=127487}const r3=8205;function tn(t,e,n=!0,r=!0){return(n?i3:fae)(t,e,r)}function i3(t,e,n){if(e==t.length)return e;e&&o3(t.charCodeAt(e))&&s3(t.charCodeAt(e-1))&&e--;let r=Kt(t,e);for(e+=Wn(r);e<t.length;){let i=Kt(t,e);if(r==r3||i==r3||n&&hae(i))e+=Wn(i),r=i;else if(n3(i)){let o=0,s=e-2;for(;s>=0&&n3(Kt(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function fae(t,e,n){for(;e>0;){let r=i3(t,e-2,n);if(r<e)return r;e--}return 0}function o3(t){return t>=56320&&t<57344}function s3(t){return t>=55296&&t<56320}function Kt(t,e){let n=t.charCodeAt(e);if(!s3(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return o3(r)?(n-55296<<10)+(r-56320)+65536:n}function hm(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Wn(t){return t<65536?1:2}const fm=/\r\n?|\n/;var ln=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(ln||(ln={}));class vr{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){dm(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new vr(e)}composeDesc(e){return this.empty?e:e.empty?this:a3(this,e)}mapDesc(e,n=!1){return e.empty?this:pm(this,e,n)}mapPos(e,n=-1,r=ln.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],l=this.sections[s++],u=i+a;if(l<0){if(u>e)return o+(e-i);o+=a}else{if(r!=ln.Simple&&u>=e&&(r==ln.TrackDel&&i<e&&u>e||r==ln.TrackBefore&&i<e||r==ln.TrackAfter&&u>e))return null;if(u>e||u==e&&n<0&&!a)return e==i||n<0?o:o+l;o+=l}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],a=i+o;if(s>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new vr(e)}static create(e){return new vr(e)}}class zt extends vr{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return dm(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return pm(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=s;let l=i>>1;for(;r.length<l;)r.push(Ue.empty);r.push(s?e.slice(o,o+s):Ue.empty)}o+=s}return new zt(n,r)}compose(e){return this.empty?e:e.empty?this:a3(this,e,!0)}map(e,n=!1){return e.empty?this:pm(this,e,n,!0)}iterChanges(e,n=!1){dm(this,e,n)}get desc(){return vr.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new _l(this);e:for(let s=0,a=0;;){let l=s==e.length?1e9:e[s++];for(;a<l||a==l&&o.len==0;){if(o.done)break e;let c=Math.min(o.len,l-a);nn(i,c,-1);let h=o.ins==-1?-1:o.off==0?o.ins:0;nn(n,c,h),h>0&&Si(r,n,o.text),o.forward(c),a+=c}let u=e[s++];for(;a<u;){if(o.done)break e;let c=Math.min(o.len,u-a);nn(n,c,-1),nn(i,c,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(c),a+=c}}return{changes:new zt(n,r),filtered:vr.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,a=null;function l(c=!1){if(!c&&!i.length)return;s<n&&nn(i,n-s,-1);let h=new zt(i,o);a=a?a.compose(h.map(a)):h,i=[],o=[],s=0}function u(c){if(Array.isArray(c))for(let h of c)u(h);else if(c instanceof zt){if(c.length!=n)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);l(),a=a?a.compose(c.map(a)):c}else{let{from:h,to:f=h,insert:d}=c;if(h>f||h<0||f>n)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${n})`);let p=d?typeof d=="string"?Ue.of(d.split(r||fm)):d:Ue.empty,g=p.length;if(h==f&&g==0)return;h<s&&l(),h>s&&nn(i,h-s,-1),nn(i,f-h,g),Si(o,i,p),s=f}}return u(e),l(!a),a}static empty(e){return new zt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(Ue.empty);r[i]=Ue.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new zt(n,r)}static createSet(e,n){return new zt(e,n)}}function nn(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Si(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Ue.empty);t.push(n)}}function dm(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)i+=a,o+=a;else{let u=i,c=o,h=Ue.empty;for(;u+=a,c+=l,l&&r&&(h=h.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(i,u,o,c,h),i=u,o=c}}}function pm(t,e,n,r=!1){let i=[],o=r?[]:null,s=new _l(t),a=new _l(e);for(let l=-1;;)if(s.ins==-1&&a.ins==-1){let u=Math.min(s.len,a.len);nn(i,u,-1),s.forward(u),a.forward(u)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let u=a.len;for(nn(i,a.ins,-1);u;){let c=Math.min(s.len,u);s.ins>=0&&l<s.i&&s.len<=c&&(nn(i,0,s.ins),o&&Si(o,i,s.text),l=s.i),s.forward(c),u-=c}a.next()}else if(s.ins>=0){let u=0,c=s.len;for(;c;)if(a.ins==-1){let h=Math.min(c,a.len);u+=h,c-=h,a.forward(h)}else if(a.ins==0&&a.len<c)c-=a.len,a.next();else break;nn(i,u,l<s.i?s.ins:0),o&&l<s.i&&Si(o,i,s.text),l=s.i,s.forward(s.len-c)}else{if(s.done&&a.done)return o?zt.createSet(i,o):vr.create(i);throw new Error("Mismatched change set lengths")}}function a3(t,e,n=!1){let r=[],i=n?[]:null,o=new _l(t),s=new _l(e);for(let a=!1;;){if(o.done&&s.done)return i?zt.createSet(r,i):vr.create(r);if(o.ins==0)nn(r,o.len,0,a),o.next();else if(s.len==0&&!s.done)nn(r,0,s.ins,a),i&&Si(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let l=Math.min(o.len2,s.len),u=r.length;if(o.ins==-1){let c=s.ins==-1?-1:s.off?0:s.ins;nn(r,l,c,a),i&&c&&Si(i,r,s.text)}else s.ins==-1?(nn(r,o.off?0:o.len,l,a),i&&Si(i,r,o.textBit(l))):(nn(r,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&Si(i,r,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||r.length>u),o.forward2(l),s.forward(l)}}}}class _l{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Ue.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ue.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class xo{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new xo(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return L.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return L.range(this.anchor,r)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return L.range(e.anchor,e.head)}static create(e,n,r){return new xo(e,n,r)}}class L{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:L.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new L([this.main],0)}addRange(e,n=!0){return L.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,L.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new L(e.ranges.map(n=>xo.fromJSON(n)),e.main)}static single(e,n=e){return new L([L.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return L.normalized(e.slice(),n);r=o.to}return new L(e,n)}static cursor(e,n=0,r,i){return xo.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?xo.create(n,e,48|o):xo.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,l=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?L.range(l,a):L.range(a,l))}}return new L(e,n)}}function l3(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let gm=0;class he{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=gm++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new he(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:mm),!!e.static,e.enables)}of(e){return new Wh([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Wh(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Wh(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function mm(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Wh{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=gm++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,l=!1,u=!1,c=[];for(let h of this.dependencies)h=="doc"?l=!0:h=="selection"?u=!0:((n=e[h.id])!==null&&n!==void 0?n:1)&1||c.push(e[h.id]);return{create(h){return h.values[s]=r(h),1},update(h,f){if(l&&f.docChanged||u&&(f.docChanged||f.selection)||vm(h,c)){let d=r(h);if(a?!u3(d,h.values[s],i):!i(d,h.values[s]))return h.values[s]=d,1}return 0},reconfigure:(h,f)=>{let d,p=f.config.address[o];if(p!=null){let g=Uh(f,p);if(this.dependencies.every(m=>m instanceof he?f.facet(m)===h.facet(m):m instanceof Xt?f.field(m,!1)==h.field(m,!1):!0)||(a?u3(d=r(h),g,i):i(d=r(h),g)))return h.values[s]=g,0}else d=r(h);return h.values[s]=d,1}}}}function u3(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function vm(t,e){let n=!1;for(let r of e)$l(t,r)&1&&(n=!0);return n}function dae(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let u=[];for(let c=0;c<r.length;c++){let h=Uh(l,r[c]);if(i[c]==2)for(let f of h)u.push(f);else u.push(h)}return e.combine(u)}return{create(l){for(let u of r)$l(l,u);return l.values[s]=a(l),1},update(l,u){if(!vm(l,o))return 0;let c=a(l);return e.compare(c,l.values[s])?0:(l.values[s]=c,1)},reconfigure(l,u){let c=vm(l,r),h=u.config.facets[e.id],f=u.facet(e);if(h&&!c&&mm(n,h))return l.values[s]=f,0;let d=a(l);return e.compare(d,f)?(l.values[s]=f,0):(l.values[s]=d,1)}}}const c3=he.define({static:!0});class Xt{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new Xt(gm++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(c3).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,c3.of({field:this,create:e})]}get extension(){return this}}const wo={lowest:4,low:3,default:2,high:1,highest:0};function Il(t){return e=>new h3(e,t)}const qs={highest:Il(wo.highest),high:Il(wo.high),default:Il(wo.default),low:Il(wo.low),lowest:Il(wo.lowest)};class h3{constructor(e,n){this.inner=e,this.prec=n}}class Hh{of(e){return new ym(this,e)}reconfigure(e){return Hh.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ym{constructor(e,n){this.compartment=e,this.inner=n}}class qh{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let f of pae(e,n,s))f instanceof Xt?i.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let a=Object.create(null),l=[],u=[];for(let f of i)a[f.id]=u.length<<1,u.push(d=>f.slot(d));let c=r==null?void 0:r.config.facets;for(let f in o){let d=o[f],p=d[0].facet,g=c&&c[f]||[];if(d.every(m=>m.type==0))if(a[p.id]=l.length<<1|1,mm(g,d))l.push(r.facet(p));else{let m=p.combine(d.map(b=>b.value));l.push(r&&p.compare(m,r.facet(p))?r.facet(p):m)}else{for(let m of d)m.type==0?(a[m.id]=l.length<<1|1,l.push(m.value)):(a[m.id]=u.length<<1,u.push(b=>m.dynamicSlot(b)));a[p.id]=u.length<<1,u.push(m=>dae(m,p,d))}}let h=u.map(f=>f(a));return new qh(e,s,h,a,l,o)}}function pae(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,a){let l=i.get(s);if(l!=null){if(l<=a)return;let u=r[l].indexOf(s);u>-1&&r[l].splice(u,1),s instanceof ym&&n.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let u of s)o(u,a);else if(s instanceof ym){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;n.set(s.compartment,u),o(u,a)}else if(s instanceof h3)o(s.inner,s.prec);else if(s instanceof Xt)r[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof Wh)r[a].push(s),s.facet.extensions&&o(s.facet.extensions,wo.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(u,a)}}return o(t,wo.default),r.reduce((s,a)=>s.concat(a))}function $l(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Uh(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const f3=he.define(),d3=he.define({combine:t=>t.some(e=>e),static:!0}),p3=he.define({combine:t=>t.length?t[0]:void 0,static:!0}),g3=he.define(),m3=he.define(),v3=he.define(),y3=he.define({combine:t=>t.length?t[0]:!1});class yr{constructor(e,n){this.type=e,this.value=n}static define(){return new gae}}class gae{of(e){return new yr(this,e)}}class mae{constructor(e){this.map=e}of(e){return new De(this,e)}}class De{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new De(this.type,n)}is(e){return this.type==e}static define(e={}){return new mae(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}De.reconfigure=De.define(),De.appendConfig=De.define();class Wt{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&l3(r,n.newLength),o.some(a=>a.type==Wt.time)||(this.annotations=o.concat(Wt.time.of(Date.now())))}static create(e,n,r,i,o,s){return new Wt(e,n,r,i,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Wt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Wt.time=yr.define(),Wt.userEvent=yr.define(),Wt.addToHistory=yr.define(),Wt.remote=yr.define();function vae(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function b3(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=zt.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:De.mapEffects(t.effects,i).concat(De.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function bm(t,e,n){let r=e.selection,i=Us(e.annotations);return e.userEvent&&(i=i.concat(Wt.userEvent.of(e.userEvent))),{changes:e.changes instanceof zt?e.changes:zt.of(e.changes||[],n,t.facet(p3)),selection:r&&(r instanceof L?r:L.single(r.anchor,r.head)),effects:Us(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function x3(t,e,n){let r=bm(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=b3(r,bm(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=Wt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return bae(n?yae(i):i)}function yae(t){let e=t.startState,n=!0;for(let i of e.facet(g3)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:vae(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=zt.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=Wt.create(e,i,t.selection&&t.selection.map(o),De.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(m3);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof Wt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Wt?t=o[0]:t=x3(e,Us(o),!1)}return t}function bae(t){let e=t.startState,n=e.facet(v3),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=b3(r,bm(e,o,t.changes.newLength),!0))}return r==t?t:Wt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const xae=[];function Us(t){return t==null?xae:Array.isArray(t)?t:[t]}var bt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(bt||(bt={}));const wae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let xm;try{xm=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Cae(t){if(xm)return xm.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||wae.test(n)))return!0}return!1}function Sae(t){return e=>{if(!/\S/.test(e))return bt.Space;if(Cae(e))return bt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return bt.Word;return bt.Other}}class je{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)$l(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return $l(this,r),Uh(this,r)}update(...e){return x3(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let s of e.effects)s.is(Hh.reconfigure)?(n&&(i=new Map,n.compartments.forEach((a,l)=>i.set(l,a)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(De.reconfigure)?(n=null,r=s.value):s.is(De.appendConfig)&&(n=null,r=Us(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=qh.resolve(r,i,this),o=new je(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(a,l)=>l.reconfigure(a,this),null).values),new je(n,e.newDoc,e.newSelection,o,(s,a)=>a.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:L.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=Us(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),u=this.changes(l.changes),c=u.map(i);for(let f=0;f<a;f++)o[f]=o[f].map(c);let h=i.mapDesc(u,!0);o.push(l.range.map(h)),i=i.compose(c),s=De.mapEffects(s,c).concat(De.mapEffects(Us(l.effects),h))}return{changes:i,selection:L.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof zt?e:zt.of(e,this.doc.length,this.facet(je.lineSeparator))}toText(e){return Ue.of(e.split(this.facet(je.lineSeparator)||fm))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:($l(this,n),Uh(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof Xt&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],a=e[o];i.push(s.init(l=>s.spec.fromJSON(a,l)))}}return je.create({doc:e.doc,selection:L.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=qh.resolve(e.extensions||[],new Map),r=e.doc instanceof Ue?e.doc:Ue.of((e.doc||"").split(n.staticFacet(je.lineSeparator)||fm)),i=e.selection?e.selection instanceof L?e.selection:L.single(e.selection.anchor,e.selection.head):L.single(0);return l3(i,r.length),n.staticFacet(d3)||(i=i.asSingle()),new je(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(je.tabSize)}get lineBreak(){return this.facet(je.lineSeparator)||`
258
+ `}get readOnly(){return this.facet(y3)}phrase(e,...n){for(let r of this.facet(je.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(f3))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return Sae(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,a=e-r;for(;s>0;){let l=tn(n,s,!1);if(o(n.slice(l,s))!=bt.Word)break;s=l}for(;a<i;){let l=tn(n,a);if(o(n.slice(a,l))!=bt.Word)break;a=l}return s==a?null:L.range(s+r,a+r)}}je.allowMultipleSelections=d3,je.tabSize=he.define({combine:t=>t.length?t[0]:4}),je.lineSeparator=p3,je.readOnly=y3,je.phrases=he.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}}),je.languageData=f3,je.changeFilter=g3,je.transactionFilter=m3,je.transactionExtender=v3,Hh.reconfigure=De.define();function br(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],a=r[o];if(a===void 0)r[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Co{eq(e){return this==e}range(e,n=e){return Fl.create(e,n,this)}}Co.prototype.startSide=Co.prototype.endSide=0,Co.prototype.point=!1,Co.prototype.mapMode=ln.TrackDel;class Fl{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new Fl(e,n,r)}}function wm(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Cm{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let s=i,a=o.length;;){if(s==a)return s;let l=s+a>>1,u=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==s)return u>=0?s:a;u>=0?a=l:s=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-1,a=-1;for(let l=0;l<this.value.length;l++){let u=this.value[l],c=this.from[l]+e,h=this.to[l]+e,f,d;if(c==h){let p=n.mapPos(c,u.startSide,u.mapMode);if(p==null||(f=d=p,u.startSide!=u.endSide&&(d=n.mapPos(c,u.endSide),d<f)))continue}else if(f=n.mapPos(c,u.startSide),d=n.mapPos(h,u.endSide),f>d||f==d&&u.startSide>0&&u.endSide<=0)continue;(d-f||u.endSide-u.startSide)<0||(s<0&&(s=f),u.point&&(a=Math.max(a,d-f)),r.push(u),i.push(f-s),o.push(d-s))}return{mapped:r.length?new Cm(i,o,r,a):null,pos:s}}}class tt{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new tt(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(wm)),this.isEmpty)return n.length?tt.of(n):this;let a=new C3(this,null,-1).goto(0),l=0,u=[],c=new ki;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let h=n[l++];c.addInner(h.from,h.to,h.value)||u.push(h)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!s||i>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||i>a.to||o<a.from||s(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||u.push(Fl.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!u.length?tt.empty:this.nextLayer.update({add:u,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],l=this.chunk[s],u=e.touchesRange(a,a+l.length);if(u===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(a));else if(u===!0){let{mapped:c,pos:h}=l.map(a,e);c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(h))}}let o=this.nextLayer.map(e);return n.length==0?o:new tt(r,n,o||tt.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Ll.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Ll.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=o),a=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=o),l=w3(s,a,r),u=new Rl(s,l,o),c=new Rl(a,l,o);r.iterGaps((h,f,d)=>S3(u,h,c,f,d,i)),r.empty&&r.length==0&&S3(u,0,c,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=1e9-1);let o=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),s=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=w3(o,s),l=new Rl(o,a,0).goto(r),u=new Rl(s,a,0).goto(r);for(;;){if(l.to!=u.to||!km(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>i)return!0;l.next(),u.next()}}static spans(e,n,r,i,o=-1){let s=new Rl(e,null,o).goto(n),a=n,l=s.openStart;for(;;){let u=Math.min(s.to,r);if(s.point){let c=s.activeForPoint(s.to),h=s.pointFrom<n?c.length+1:Math.min(c.length,l);i.point(a,u,s.point,c,h,s.pointRank),l=Math.min(s.openEnd(u),c.length)}else u>a&&(i.span(a,u,s.active,l),l=s.openEnd(u));if(s.to>r)return l+(s.point&&s.to>r?1:0);a=s.to,s.next()}}static of(e,n=!1){let r=new ki;for(let i of e instanceof Fl?[e]:n?kae(e):e)r.add(i.from,i.to,i.value);return r.finish()}}tt.empty=new tt([],[],null,-1);function kae(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(wm(e,r)>0)return t.slice().sort(wm);e=r}return t}tt.empty.nextLayer=tt.empty;class ki{finishChunk(e){this.chunks.push(new Cm(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new ki)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(tt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=tt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function w3(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=r.get(o.chunk[s]);a!=null&&(n?n.mapPos(a):a)==o.chunkPos[s]&&!(n!=null&&n.touchesRange(a,a+o.chunk[s].length))&&i.add(o.chunk[s])}return i}class C3{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Ll{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new C3(s,n,r,o));return i.length==1?i[0]:new Ll(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)Sm(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)Sm(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Sm(this.heap,0)}}}function Sm(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Rl{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ll.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Yh(this.active,e),Yh(this.activeTo,e),Yh(this.activeRank,e),this.minActive=k3(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&this.activeRank[n]<=o;)n++;Gh(this.active,n,r),Gh(this.activeTo,n,i),Gh(this.activeRank,n,o),e&&Gh(e,n,this.cursor.from),this.minActive=k3(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Yh(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function S3(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=r+i,a=r,l=r-e;for(;;){let u=t.to+l-n.to||t.endSide-n.endSide,c=u<0?t.to+l:n.to,h=Math.min(c,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&km(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,h,t.point,n.point):h>a&&!km(t.active,n.active)&&o.compareRange(a,h,t.active,n.active),c>s)break;a=c,u<=0&&t.next(),u>=0&&n.next()}}function km(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Yh(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Gh(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function k3(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Ys(t,e,n=t.length){let r=0;for(let i=0;i<n;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=tn(t,i));return r}function Tm(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=tn(t,i)}return r===!0?-1:t.length}const Em="ͼ",T3=typeof Symbol>"u"?"__"+Em:Symbol.for(Em),Mm=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),E3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ti{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,l,u){let c=[],h=/^@(\w+)\b/.exec(s[0]),f=h&&h[1]=="keyframes";if(h&&a==null)return l.push(s[0]+";");for(let d in a){let p=a[d];if(/&/.test(d))o(d.split(/,\s*/).map(g=>s.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),p,l);else if(p&&typeof p=="object"){if(!h)throw new RangeError("The value of a property ("+d+") should be a primitive value.");o(i(d),p,c,f)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||f)&&l.push((r&&!h&&!u?s.map(r):s).join(", ")+" {"+c.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
259
+ `)}static newName(){let e=E3[T3]||1;return E3[T3]=e+1,Em+e.toString(36)}static mount(e,n,r){let i=e[Mm],o=r&&r.nonce;i?o&&i.setNonce(o):i=new Tae(e,o),i.mount(Array.isArray(n)?n:[n])}}let M3=new Map;class Tae{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=M3.get(r);if(o)return e.adoptedStyleSheets=[o.sheet,...e.adoptedStyleSheets],e[Mm]=o;this.sheet=new i.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],M3.set(r,this)}else{this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let o=e.head||e;o.insertBefore(this.styleTag,o.firstChild)}this.modules=[],e[Mm]=this}mount(e){let n=this.sheet,r=0,i=0;for(let o=0;o<e.length;o++){let s=e[o],a=this.modules.indexOf(s);if(a<i&&a>-1&&(this.modules.splice(a,1),i--,a=-1),a==-1){if(this.modules.splice(i++,0,s),n)for(let l=0;l<s.rules.length;l++)n.insertRule(s.rules[l],r++)}else{for(;i<a;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(!n){let o="";for(let s=0;s<this.modules.length;s++)o+=this.modules[s].getRules()+`
260
+ `;this.styleTag.textContent=o}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var Ei={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:"'"},Bl={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Eae=typeof navigator<"u"&&/Mac/.test(navigator.platform),Mae=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Zt=0;Zt<10;Zt++)Ei[48+Zt]=Ei[96+Zt]=String(Zt);for(var Zt=1;Zt<=24;Zt++)Ei[Zt+111]="F"+Zt;for(var Zt=65;Zt<=90;Zt++)Ei[Zt]=String.fromCharCode(Zt+32),Bl[Zt]=String.fromCharCode(Zt);for(var Om in Ei)Bl.hasOwnProperty(Om)||(Bl[Om]=Ei[Om]);function Oae(t){var e=Eae&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Mae&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Bl:Ei)[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}function Kh(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Am(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function Aae(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Xh(t,e){if(!e.anchorNode)return!1;try{return Am(t,e.anchorNode)}catch{return!1}}function Gs(t){return t.nodeType==3?So(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Zh(t,e,n,r){return n?O3(t,e,n,r,-1)||O3(t,e,n,r,1):!1}function Nl(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function O3(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:qr(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=Nl(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?qr(t):0}else return!1}}function qr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Qh(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function Pae(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function Dae(t,e,n,r,i,o,s,a){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,h=!1;c&&!h;)if(c.nodeType==1){let f,d=c==l.body,p=1,g=1;if(d)f=Pae(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let x=c.getBoundingClientRect();p=x.width/c.offsetWidth,g=x.height/c.offsetHeight,f={left:x.left,right:x.left+c.clientWidth*p,top:x.top,bottom:x.top+c.clientHeight*g}}let m=0,b=0;if(i=="nearest")e.top<f.top?(b=-(f.top-e.top+s),n>0&&e.bottom>f.bottom+b&&(b=e.bottom-f.bottom+b+s)):e.bottom>f.bottom&&(b=e.bottom-f.bottom+s,n<0&&e.top-b<f.top&&(b=-(f.top+b-e.top+s)));else{let x=e.bottom-e.top,C=f.bottom-f.top;b=(i=="center"&&x<=C?e.top+x/2-C/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-C+s)-f.top}if(r=="nearest"?e.left<f.left?(m=-(f.left-e.left+o),n>0&&e.right>f.right+m&&(m=e.right-f.right+m+o)):e.right>f.right&&(m=e.right-f.right+o,n<0&&e.left<f.left+m&&(m=-(f.left+m-e.left+o))):m=(r=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:r=="start"==a?e.left-o:e.right-(f.right-f.left)+o)-f.left,m||b)if(d)u.scrollBy(m,b);else{let x=0,C=0;if(b){let S=c.scrollTop;c.scrollTop+=b/g,C=(c.scrollTop-S)*g}if(m){let S=c.scrollLeft;c.scrollLeft+=m/p,x=(c.scrollLeft-S)*p}e={left:e.left-x,top:e.top-C,right:e.right-x,bottom:e.bottom-C},x&&Math.abs(x-m)<1&&(r="nearest"),C&&Math.abs(C-b)<1&&(i="nearest")}if(d)break;c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function _ae(t){let e=t.ownerDocument;for(let n=t.parentNode;n&&n!=e.body;)if(n.nodeType==1){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class Iae{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?qr(n):0),r,Math.min(e.focusOffset,r?qr(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Ks=null;function A3(t){if(t.setActive)return t.setActive();if(Ks)return t.focus(Ks);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Ks==null?{get preventScroll(){return Ks={preventScroll:!0},!0}}:void 0),!Ks){Ks=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let P3;function So(t,e,n=e){let r=P3||(P3=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Xs(t,e,n){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,t.dispatchEvent(i);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,t.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function $ae(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function D3(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function Fae(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,qr(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=qr(n))}else{if(n==t)return!0;r=Nl(n),n=n.parentNode}}function _3(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}class rn{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new rn(e.parentNode,Nl(e),n)}static after(e,n){return new rn(e.parentNode,Nl(e)+1,n)}}const Pm=[];class pt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let a=pt.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=I3(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=I3(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=qr(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!pt.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-1,a=-1;for(let l=0,u=r,c=r;l<this.children.length;l++){let h=this.children[l],f=u+h.length;if(u<e&&f>n)return h.domBoundsAround(e,n,u);if(f>=e&&i==-1&&(i=l,o=u),u>n&&h.dom.parentNode==this.dom){s=l,a=c;break}c=f,u=f+h.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=Pm){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&o.destroy()}this.children.splice(e,n-e,...r);for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new $3(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){this.parent=null}}pt.prototype.breakAfter=0;function I3(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class $3{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function F3(t,e,n,r,i,o,s,a,l){let{children:u}=t,c=u.length?u[e]:null,h=o.length?o[o.length-1]:null,f=h?h.breakAfter:s;if(!(e==r&&c&&!s&&!f&&o.length<2&&c.merge(n,i,o.length?h:null,n==0,a,l))){if(r<u.length){let d=u[r];d&&(i<d.length||d.breakAfter&&(h!=null&&h.breakAfter))?(e==r&&(d=d.split(i),i=0),!f&&h&&d.merge(0,i,h,!0,0,l)?o[o.length-1]=d:((i||d.children.length&&!d.children[0].length)&&d.merge(0,i,null,!1,0,l),o.push(d))):d!=null&&d.breakAfter&&(h?h.breakAfter=1:s=1),r++}for(c&&(c.breakAfter=s,n>0&&(!s&&o.length&&c.merge(n,c.length,o[0],!1,a,0)?c.breakAfter=o.shift().breakAfter:(n<c.length||c.children.length&&c.children[c.children.length-1].length==0)&&c.merge(n,c.length,null,!1,a,0),e++));e<r&&o.length;)if(u[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else if(u[e].become(o[0]))e++,o.shift(),a=o.length?0:l;else break;!o.length&&e&&r<u.length&&!u[e-1].breakAfter&&u[r].merge(0,0,u[e-1],!1,a,l)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function L3(t,e,n,r,i,o){let s=t.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:u,off:c}=s.findPos(e,-1),h=e-n;for(let f of r)h+=f.length;t.length+=h,F3(t,u,c,a,l,r,0,i,o)}let Dn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Dm=typeof document<"u"?document:{documentElement:{style:{}}};const _m=/Edge\/(\d+)/.exec(Dn.userAgent),R3=/MSIE \d/.test(Dn.userAgent),Im=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Dn.userAgent),Jh=!!(R3||Im||_m),B3=!Jh&&/gecko\/(\d+)/i.test(Dn.userAgent),$m=!Jh&&/Chrome\/(\d+)/.exec(Dn.userAgent),N3="webkitFontSmoothing"in Dm.documentElement.style,j3=!Jh&&/Apple Computer/.test(Dn.vendor),V3=j3&&(/Mobile\/\w+/.test(Dn.userAgent)||Dn.maxTouchPoints>2);var pe={mac:V3||/Mac/.test(Dn.platform),windows:/Win/.test(Dn.platform),linux:/Linux|X11/.test(Dn.platform),ie:Jh,ie_version:R3?Dm.documentMode||6:Im?+Im[1]:_m?+_m[1]:0,gecko:B3,gecko_version:B3?+(/Firefox\/(\d+)/.exec(Dn.userAgent)||[0,0])[1]:0,chrome:!!$m,chrome_version:$m?+$m[1]:0,ios:V3,android:/Android\b/.test(Dn.userAgent),webkit:N3,safari:j3,webkit_version:N3?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Dm.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const Lae=256;class Ur extends pt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof Ur)||this.length-(n-e)+r.length>Lae||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Ur(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new rn(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return Rae(this.dom,e,n)}}class Yr extends pt{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(D3(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,s){return r&&(!(r instanceof Yr&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:(L3(this,e,n,r?r.children:[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let a of this.children){let l=r+a.length;l>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=o),r=l,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Yr(this.mark,n,s)}domAtPos(e){return z3(this,e)}coordsAt(e,n){return H3(this,e,n)}}function Rae(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?pe.chrome||pe.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=So(t,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];return pe.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,u=>u.width)||l),s?Qh(l,s<0):l||null}class Mi extends pt{static create(e,n,r){return new Mi(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Mi.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,n,r,i,o,s){return r&&(!(r instanceof Mi)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Mi&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Ue.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):Ue.empty}domAtPos(e){return(this.length?e==0:this.side>0)?rn.before(this.dom):rn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?i.length-1:0;o=i[a],!(e>0?a==0:a==i.length-1||o.top<o.bottom);a+=s?-1:1);return Qh(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Zs extends pt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Zs&&e.side==this.side}split(){return new Zs(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?rn.before(this.dom):rn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ue.empty}get isHidden(){return!0}}Ur.prototype.children=Mi.prototype.children=Zs.prototype.children=Pm;function z3(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new rn(n,0)}function W3(t,e,n){let r,{children:i}=t;n>0&&e instanceof Yr&&i.length&&(r=i[i.length-1])instanceof Yr&&r.mark.eq(e.mark)?W3(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function H3(t,e,n){let r=null,i=-1,o=null,s=-1;function a(u,c){for(let h=0,f=0;h<u.children.length&&f<=c;h++){let d=u.children[h],p=f+d.length;p>=c&&(d.children.length?a(d,c-f):(!o||o.isHidden&&n>0)&&(p>c||f==p&&d.getSide()>0)?(o=d,s=c-f):(f<c||f==p&&d.getSide()<0&&!d.isHidden)&&(r=d,i=c-f)),f=p}}a(t,e);let l=(n<0?r:o)||r||o;return l?l.coordsAt(Math.max(0,l==r?i:s),n):Bae(t)}function Bae(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Gs(e);return n[n.length-1]||null}function Fm(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const q3=Object.create(null);function Lm(t,e,n){if(t==e)return!0;t||(t=q3),e||(e=q3);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function Rm(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function Nae(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class Ht extends pt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof Ht))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),L3(this,e,n,r?r.children:[],o,s),!0}split(e){let n=new Ht;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Lm(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){W3(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=Fm(n,this.attrs||{})),r&&(this.attrs=Fm({class:r},this.attrs||{}))}domAtPos(e){return z3(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(D3(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Rm(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&pt.get(i)instanceof Yr;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=pt.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!pe.ios||!this.children.some(o=>o instanceof Ur))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof Ur)||/[^ -~]/.test(r.text))return null;let i=Gs(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=H3(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:r.top+s,bottom:r.bottom-s,left:r.left,right:r.left}}}return r}become(e){return!1}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof Ht)return o;if(s>n)break}i=s+o.breakAfter}return null}}class Oi extends pt{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,s){return r&&(!(r instanceof Oi)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?rn.before(this.dom):rn.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new Oi(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return Pm}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ue.empty}domBoundsAround(){return null}become(e){return e instanceof Oi&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){return this.widget.coordsAt(this.dom,e,n)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class Gr{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}destroy(e){}}var un=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(un||(un={}));class ke extends Co{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new jl(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Ai(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:s}=U3(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new Ai(e,r,i,n,e.widget||null,!0)}static line(e){return new Vl(e)}static set(e,n=!1){return tt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}ke.none=tt.empty;class jl extends ke{constructor(e){let{start:n,end:r}=U3(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof jl&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Lm(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}jl.prototype.point=!1;class Vl extends ke{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Vl&&this.spec.class==e.spec.class&&Lm(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Vl.prototype.mapMode=ln.TrackBefore,Vl.prototype.point=!0;class Ai extends ke{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?ln.TrackBefore:ln.TrackAfter:ln.TrackDel}get type(){return this.startSide!=this.endSide?un.WidgetRange:this.startSide<=0?un.WidgetBefore:un.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ai&&jae(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Ai.prototype.point=!0;function U3(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function jae(t,e){return t==e||!!(t&&e&&t.compare(e))}function Bm(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class zl{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Oi&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ht),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ef(new Zs(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Oi)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(ef(new Ur(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof Ai){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(r instanceof Ai)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Oi(r.widget||new Y3("div"),a,r));else{let l=Mi.create(r.widget||new Y3("span"),a,a?0:r.startSide),u=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e<n||r.startSide>0),c=!l.isEditable&&(e<n||o>i.length||r.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(h.append(ef(new Zs(1),i),o),o=i.length+Math.max(0,o-i.length)),h.append(ef(l,i),o),this.atCursorPos=c,this.pendingBuffer=c?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let s=new zl(e,n,r,o);return s.openEnd=tt.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function ef(t,e){for(let n of e)t=new Yr(n,[t],t.length);return t}class Y3 extends Gr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const G3=he.define(),K3=he.define(),X3=he.define(),Z3=he.define(),Nm=he.define(),Q3=he.define(),J3=he.define(),e4=he.define({combine:t=>t.some(e=>e)}),t4=he.define({combine:t=>t.some(e=>e)});class Qs{constructor(e,n="nearest",r="nearest",i=5,o=5,s=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new Qs(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Qs(L.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const tf=De.define({map:(t,e)=>t.map(e)});function Hn(t,e,n){let r=t.facet(Z3);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const nf=he.define({combine:t=>t.length?t[0]:!0});let Vae=0;const Wl=he.define();class Lt{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:s}=n||{};return new Lt(Vae++,e,r,i,a=>{let l=[Wl.of(a)];return s&&l.push(Hl.of(u=>{let c=u.plugin(a);return c?s(c):ke.none})),o&&l.push(o(a)),l})}static fromClass(e,n){return Lt.define(r=>new e(r),n)}}class jm{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Hn(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Hn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Hn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const n4=he.define(),Vm=he.define(),Hl=he.define(),zm=he.define(),r4=he.define();function i4(t,e,n){let r=t.state.facet(r4);if(!r.length)return r;let i=r.map(s=>s instanceof Function?s(t):s),o=[];return tt.spans(i,e,n,{point(){},span(s,a,l,u){let c=o;for(let h=l.length-1;h>=0;h--,u--){let f=l[h].spec.bidiIsolate,d;if(f!=null)if(u>0&&c.length&&(d=c[c.length-1]).to==s&&d.direction==f)d.to=a,c=d.inner;else{let p={from:s,to:a,direction:f,inner:[]};c.push(p),c=p.inner}}}}),o}const o4=he.define();function s4(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(o4)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:r,bottom:i}}const ql=he.define();class qn{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new qn(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,s=0,a=0;;i++){let l=i==e.length?null:e[i],u=s-a,c=l?l.fromB:1e9;for(;o<n.length&&n[o]<c;){let h=n[o],f=n[o+1],d=Math.max(a,h),p=Math.min(c,f);if(d<=p&&new qn(d+u,p+u,d,p).addToSet(r),f>c)break;o+=2}if(!l)return r;new qn(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),s=l.toA,a=l.toB}}}class rf{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=zt.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,a,l)=>i.push(new qn(o,s,a,l))),this.changedRanges=i}static create(e,n,r){return new rf(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var Ct=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Ct||(Ct={}));const Ul=Ct.LTR,a4=Ct.RTL;function l4(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const zae=l4("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Wae=l4("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Wm=Object.create(null),xr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);Wm[e]=n,Wm[n]=-e}function Hae(t){return t<=247?zae[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?Wae[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8203?256:64336<=t&&t<=65023?4:t==8204?256:1}const qae=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Pi{get dir(){return this.level%2?a4:Ul}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=n&&a.to>=n){if(a.level==r)return s;(o<0||(i!=0?i<0?a.from<n:a.to>n:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function u4(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!u4(r.inner,i.inner))return!1}return!0}const ot=[];function Uae(t,e,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,a=o<r.length?r[o].from:n,l=o?256:i;for(let u=s,c=l,h=l;u<a;u++){let f=Hae(t.charCodeAt(u));f==512?f=c:f==8&&h==4&&(f=16),ot[u]=f==4?2:f,f&7&&(h=f),c=f}for(let u=s,c=l,h=l;u<a;u++){let f=ot[u];if(f==128)u<a-1&&c==ot[u+1]&&c&24?f=ot[u]=c:ot[u]=256;else if(f==64){let d=u+1;for(;d<a&&ot[d]==64;)d++;let p=u&&c==8||d<n&&ot[d]==8?h==1?1:8:256;for(let g=u;g<d;g++)ot[g]=p;u=d-1}else f==8&&h==1&&(ot[u]=1);c=f,f&7&&(h=f)}}}function Yae(t,e,n,r,i){let o=i==1?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let u=s?r[s-1].to:e,c=s<r.length?r[s].from:n;for(let h=u,f,d,p;h<c;h++)if(d=Wm[f=t.charCodeAt(h)])if(d<0){for(let g=a-3;g>=0;g-=3)if(xr[g+1]==-d){let m=xr[g+2],b=m&2?i:m&4?m&1?o:i:0;b&&(ot[h]=ot[xr[g]]=b),a=g;break}}else{if(xr.length==189)break;xr[a++]=h,xr[a++]=f,xr[a++]=l}else if((p=ot[h])==2||p==1){let g=p==i;l=g?0:1;for(let m=a-3;m>=0;m-=3){let b=xr[m+2];if(b&2)break;if(g)xr[m+2]|=2;else{if(b&4)break;xr[m+2]|=4}}}}}function Gae(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=s;l<a;){let u=ot[l];if(u==256){let c=l+1;for(;;)if(c==a){if(i==n.length)break;c=n[i++].to,a=i<n.length?n[i].from:e}else if(ot[c]==256)c++;else break;let h=o==1,f=(c<e?ot[c]:r)==1,d=h==f?h?1:2:r;for(let p=c,g=i,m=g?n[g-1].to:t;p>l;)p==m&&(p=n[--g].from,m=g?n[g-1].to:t),ot[--p]=d;l=c}else o=u,l++}}}function Hm(t,e,n,r,i,o,s){let a=r%2?2:1;if(r%2==i%2)for(let l=e,u=0;l<n;){let c=!0,h=!1;if(u==o.length||l<o[u].from){let g=ot[l];g!=a&&(c=!1,h=g==16)}let f=!c&&a==1?[]:null,d=c?r:r+1,p=l;e:for(;;)if(u<o.length&&p==o[u].from){if(h)break e;let g=o[u];if(!c)for(let m=g.to,b=u+1;;){if(m==n)break e;if(b<o.length&&o[b].from==m)m=o[b++].to;else{if(ot[m]==a)break e;break}}if(u++,f)f.push(g);else{g.from>l&&s.push(new Pi(l,g.from,d));let m=g.direction==Ul!=!(d%2);qm(t,m?r+1:r,i,g.inner,g.from,g.to,s),l=g.to}p=g.to}else{if(p==n||(c?ot[p]!=a:ot[p]==a))break;p++}f?Hm(t,l,p,r+1,i,f,s):l<p&&s.push(new Pi(l,p,d)),l=p}else for(let l=n,u=o.length;l>e;){let c=!0,h=!1;if(!u||l>o[u-1].to){let g=ot[l-1];g!=a&&(c=!1,h=g==16)}let f=!c&&a==1?[]:null,d=c?r:r+1,p=l;e:for(;;)if(u&&p==o[u-1].to){if(h)break e;let g=o[--u];if(!c)for(let m=g.from,b=u;;){if(m==e)break e;if(b&&o[b-1].to==m)m=o[--b].from;else{if(ot[m-1]==a)break e;break}}if(f)f.push(g);else{g.to<l&&s.push(new Pi(g.to,l,d));let m=g.direction==Ul!=!(d%2);qm(t,m?r+1:r,i,g.inner,g.from,g.to,s),l=g.from}p=g.from}else{if(p==e||(c?ot[p-1]!=a:ot[p-1]==a))break;p--}f?Hm(t,p,l,r+1,i,f,s):p<l&&s.push(new Pi(p,l,d)),l=p}}function qm(t,e,n,r,i,o,s){let a=e%2?2:1;Uae(t,i,o,r,a),Yae(t,i,o,r,a),Gae(i,o,r,a),Hm(t,i,o,e,n,r,s)}function Kae(t,e,n){if(!t)return[new Pi(0,0,e==a4?1:0)];if(e==Ul&&!n.length&&!qae.test(t))return c4(t.length);if(n.length)for(;t.length>ot.length;)ot[ot.length]=256;let r=[],i=e==Ul?0:1;return qm(t,i,i,n,0,t.length,r),r}function c4(t){return[new Pi(0,t,0)]}let h4="";function Xae(t,e,n,r,i){var o;let s=r.head-t.from,a=-1;if(s==0){if(!i||!t.length)return null;e[0].level!=n&&(s=e[0].side(!1,n),a=0)}else if(s==t.length){if(i)return null;let f=e[e.length-1];f.level!=n&&(s=f.side(!0,n),a=e.length-1)}a<0&&(a=Pi.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc));let l=e[a];s==l.side(i,n)&&(l=e[a+=i?1:-1],s=l.side(!i,n));let u=i==(l.dir==n),c=tn(t.text,s,u);if(h4=t.text.slice(Math.min(s,c),Math.max(s,c)),c!=l.side(i,n))return L.cursor(c+t.from,u?-1:1,l.level);let h=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return!h&&l.level!=n?L.cursor(i?t.to:t.from,i?-1:1,n):h&&h.level<l.level?L.cursor(h.side(!i,n)+t.from,i?1:-1,h.level):L.cursor(c+t.from,i?-1:1,l.level)}class f4 extends pt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Ht],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new qn(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:c})=>c<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let i=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!rle(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?Qae(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;r=new qn(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(pe.ie||pe.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),l=tle(s,a,e.changes);return r=qn.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=pe.chrome||pe.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof Oi&&s.widget instanceof d4&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let s=i.length-1;;s--){let a=s>=0?i[s]:null;if(!a)break;let{fromA:l,toA:u,fromB:c,toB:h}=a,f,d,p,g;if(r&&r.range.fromB<h&&r.range.toB>c){let S=zl.build(this.view.state.doc,c,r.range.fromB,this.decorations,this.dynamicDecorationMap),w=zl.build(this.view.state.doc,r.range.toB,h,this.decorations,this.dynamicDecorationMap);d=S.breakAtStart,p=S.openStart,g=w.openEnd;let k=this.compositionView(r);w.breakAtStart?k.breakAfter=1:w.content.length&&k.merge(k.length,k.length,w.content[0],!1,w.openStart,0)&&(k.breakAfter=w.content[0].breakAfter,w.content.shift()),S.content.length&&k.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),f=S.content.concat(k).concat(w.content)}else({content:f,breakAtStart:d,openStart:p,openEnd:g}=zl.build(this.view.state.doc,c,h,this.decorations,this.dynamicDecorationMap));let{i:m,off:b}=o.findPos(u,1),{i:x,off:C}=o.findPos(l,-1);F3(this,x,C,m,b,f,d,p,g)}r&&this.fixCompositionDOM(r)}compositionView(e){let n=new Ur(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new Yr(i,[n],n.length);let r=new Ht;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(s);let a=pt.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&Xh(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),u=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(pe.gecko&&a.empty&&!this.hasComposition&&Zae(l)){let h=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(h,l.node.childNodes[l.offset]||null)),l=u=new rn(h,0),s=!0}let c=this.view.observer.selectionRange;(s||!c.focusNode||!Zh(l.node,l.offset,c.anchorNode,c.anchorOffset)||!Zh(u.node,u.offset,c.focusNode,c.focusOffset))&&(this.view.observer.ignore(()=>{pe.android&&pe.chrome&&this.dom.contains(c.focusNode)&&nle(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=Kh(this.view.root);if(h)if(a.empty){if(pe.gecko){let f=Jae(l.node,l.offset);if(f&&f!=3){let d=g4(l.node,l.offset,f==1?1:-1);d&&(l=new rn(d.node,d.offset))}}h.collapse(l.node,l.offset),a.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=a.bidiLevel)}else if(h.extend){h.collapse(l.node,l.offset);try{h.extend(u.node,u.offset)}catch{}}else{let f=document.createRange();a.anchor>a.head&&([l,u]=[u,l]),f.setEnd(u.node,u.offset),f.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new rn(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new rn(c.focusNode,c.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Kh(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=Ht.find(this,n.head);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);r.collapse(c.node,c.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=pt.get(n.childNodes[i]);o instanceof Ht&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=pt.get(n.childNodes[i]);o instanceof Ht&&(r=o.domAtPos(o.length))}return r?new rn(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=pt.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof Ht)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],l=o-a.breakAfter,u=l-a.length;if(l<e)break;u<=e&&(u<e||a.covers(-1))&&(l>e||a.covers(1))&&(!r||a instanceof Ht&&!(r instanceof Ht&&n>=0))&&(r=a,i=u),o=u}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof Ht))return null;for(;i.children.length;){let{i:a,off:l}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=l}if(!(i instanceof Ur))return null;let o=tn(i.text,r);if(o==r)return null;let s=So(i.dom,r,o).getClientRects();for(let a=0;a<s.length;a++){let l=s[a];if(a==s.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Ct.LTR;for(let u=0,c=0;c<this.children.length;c++){let h=this.children[c],f=u+h.length;if(f>i)break;if(u>=r){let d=h.dom.getBoundingClientRect();if(n.push(d.height),s){let p=h.dom.lastChild,g=p?Gs(p):[];if(g.length){let m=g[g.length-1],b=l?m.right-d.left:d.right-m.left;b>a&&(a=b,this.minWidth=o,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+h.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Ct.RTL:Ct.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Ht){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Gs(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new $3(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(ke.replace({widget:new d4(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return ke.set(e)}updateDeco(){let e=this.view.state.facet(Hl).map((n,r)=>(this.dynamicDecorationMap[r]=typeof n=="function")?n(this.view):n);for(let n=e.length;n<e.length+3;n++)this.dynamicDecorationMap[n]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let u=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=u.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=s4(this.view),s={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;Dae(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==Ct.LTR)}}function Zae(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}class d4 extends Gr{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function p4(t,e){let n=t.observer.selectionRange,r=n.focusNode&&g4(n.focusNode,n.focusOffset,0);if(!r)return null;let i=e-r.offset;return{from:i,to:i+r.node.nodeValue.length,node:r.node}}function Qae(t,e,n){let r=p4(t,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,u=new qn(l.mapPos(o),l.mapPos(s),o,s),c=[];for(let h=i.parentNode;;h=h.parentNode){let f=pt.get(h);if(f instanceof Yr)c.push({node:h,deco:f.mark});else{if(f instanceof Ht||h.nodeName=="DIV"&&h.parentNode==t.contentDOM)return{range:u,text:i,marks:c,line:h};if(h!=t.contentDOM)c.push({node:h,deco:new jl({inclusive:!0,attributes:Nae(h),tagName:h.tagName.toLowerCase()})});else return null}}}function g4(t,e,n){if(n<=0)for(let r=t,i=e;;){if(r.nodeType==3)return{node:r,offset:i};if(r.nodeType==1&&i>0)r=r.childNodes[i-1],i=qr(r);else break}if(n>=0)for(let r=t,i=e;;){if(r.nodeType==3)return{node:r,offset:i};if(r.nodeType==1&&i<r.childNodes.length&&n>=0)r=r.childNodes[i],i=0;else break}return null}function Jae(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let ele=class{constructor(){this.changes=[]}compareRange(e,n){Bm(e,n,this.changes)}comparePoint(e,n){Bm(e,n,this.changes)}};function tle(t,e,n){let r=new ele;return tt.compare(t,e,n,r),r.changes}function nle(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function rle(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function ile(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return L.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=tn(i.text,o,!1):a=tn(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let u=tn(i.text,s,!1);if(r(i.text.slice(u,s))!=l)break;s=u}for(;a<i.length;){let u=tn(i.text,a);if(r(i.text.slice(a,u))!=l)break;a=u}return L.range(s+i.from,a+i.from)}function ole(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function sle(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Um(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function m4(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function v4(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Ym(t,e,n){let r,i,o,s,a=!1,l,u,c,h;for(let p=t.firstChild;p;p=p.nextSibling){let g=Gs(p);for(let m=0;m<g.length;m++){let b=g[m];i&&Um(i,b)&&(b=m4(v4(b,i.bottom),i.top));let x=ole(e,b),C=sle(n,b);if(x==0&&C==0)return p.nodeType==3?y4(p,e,n):Ym(p,e,n);if(!r||s>C||s==C&&o>x){r=p,i=b,o=x,s=C;let S=C?n<b.top?-1:1:x?e<b.left?-1:1:0;a=!S||(S>0?m<g.length-1:m>0)}x==0?n>b.bottom&&(!c||c.bottom<b.bottom)?(l=p,c=b):n<b.top&&(!h||h.top>b.top)&&(u=p,h=b):c&&Um(c,b)?c=v4(c,b.bottom):h&&Um(h,b)&&(h=m4(h,b.top))}}if(c&&c.bottom>=n?(r=l,i=c):h&&h.top<=n&&(r=u,i=h),!r)return{node:t,offset:0};let f=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return y4(r,f,n);if(a&&r.contentEditable!="false")return Ym(r,f,n);let d=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:d}}function y4(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let l=So(t,a,a+1).getClientRects();for(let u=0;u<l.length;u++){let c=l[u];if(c.top==c.bottom)continue;s||(s=e-c.left);let h=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&h<o){let f=e>=(c.left+c.right)/2,d=f;if((pe.chrome||pe.gecko)&&So(t,a).getBoundingClientRect().left==c.right&&(d=!f),h<=0)return{node:t,offset:a+(d?1:0)};i=a+(d?1:0),o=h}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function b4(t,e,n,r=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:h}=e,f=h-a;if(f<0)return 0;if(f>u)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,w=!1;l=t.elementAtHeight(f),l.type!=un.Text;)for(;f=r>0?l.bottom+S:l.top-S,!(f>=0&&f<=u);){if(w)return n?null:0;w=!0,r=-r}h=a+f;let d=l.from;if(d<t.viewport.from)return t.viewport.from==0?0:n?null:x4(t,s,l,c,h);if(d>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:x4(t,s,l,c,h);let p=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:p,m=g.elementFromPoint(c,h);m&&!t.contentDOM.contains(m)&&(m=null),m||(c=Math.max(s.left+1,Math.min(s.right-1,c)),m=g.elementFromPoint(c,h),m&&!t.contentDOM.contains(m)&&(m=null));let b,x=-1;if(m&&((i=t.docView.nearest(m))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let S=p.caretPositionFromPoint(c,h);S&&({offsetNode:b,offset:x}=S)}else if(p.caretRangeFromPoint){let S=p.caretRangeFromPoint(c,h);S&&({startContainer:b,startOffset:x}=S,(!t.contentDOM.contains(b)||pe.safari&&ale(b,x,c)||pe.chrome&&lle(b,x,c))&&(b=void 0))}}if(!b||!t.docView.dom.contains(b)){let S=Ht.find(t.docView,d);if(!S)return f>l.top+l.height/2?l.to:l.from;({node:b,offset:x}=Ym(S.dom,c,h))}let C=t.docView.nearest(b);if(!C)return null;if(C.isWidget&&((o=C.dom)===null||o===void 0?void 0:o.nodeType)==1){let S=C.dom.getBoundingClientRect();return e.y<S.top||e.y<=S.bottom&&e.x<=(S.left+S.right)/2?C.posAtStart:C.posAtEnd}else return C.localPosFromDOM(b,x)+C.posAtStart}function x4(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);o+=l*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+Tm(s,o,t.state.tabSize)}function ale(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return So(t,r-1,r).getBoundingClientRect().left>n}function lle(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():So(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function Gm(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==un.Text))return r}return n}function ule(t,e,n,r){let i=Gm(t,e.head),o=!r||i.type!=un.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(a==Ct.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(l!=null)return L.cursor(l,n?-1:1)}return L.cursor(n?i.to:i.from,n?-1:1)}function w4(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,l=null;;){let u=Xae(i,o,s,a,n),c=h4;if(!u){if(i.number==(n?t.state.doc.lines:1))return a;c=`
261
+ `,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),u=L.cursor(n?i.from:i.to)}if(l){if(!l(c))return a}else{if(!r)return u;l=r(c)}a=u}}function cle(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let s=r(o);return i==bt.Space&&(i=s),i==s}}function hle(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return L.cursor(i,e.assoc);let s=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(u)s==null&&(s=u.left-l.left),a=o<0?u.top:u.bottom;else{let d=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-d.from))),a=(o<0?d.top:d.bottom)+c}let h=l.left+s,f=r??t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=a+(f+d)*o,g=b4(t,{x:h,y:p},!1,o);if(p<l.top||p>l.bottom||(o<0?g<i:g>i)){let m=t.docView.coordsForChar(g),b=!m||p<m.top?-1:1;return L.cursor(g,b,void 0,s)}}}function of(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,s,a)=>{if(e>o&&e<s){let l=r||n||(e-o<s-e?-1:1);e=l<0?o:s,r=l}});if(!r)return e}}function Km(t,e,n){let r=of(t.state.facet(zm).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:L.cursor(r,r<n.from?1:-1)}class fle{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,pe.safari&&e.contentDOM.addEventListener("input",()=>null),pe.gecko&&Ole(e.contentDOM.ownerDocument)}handleEvent(e){!xle(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=dle(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,a=r[o];a&&s!=!a.handlers.length&&(i.removeEventListener(o,this.handleEvent),a=null),a||i.addEventListener(o,this.handleEvent,{passive:s})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(e.keyCode!=27&&k4.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),pe.android&&pe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return pe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=S4.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||ple.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,Xs(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:pe.safari&&!pe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function C4(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Hn(n.state,i)}}}function dle(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let s=i.domEventHandlers[o];s&&n(o).handlers.push(C4(r.value,s))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let s=i.domEventObservers[o];s&&n(o).observers.push(C4(r.value,s))}}for(let r in nr)n(r).handlers.push(nr[r]);for(let r in rr)n(r).observers.push(rr[r]);return e}const S4=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ple="dthko",k4=[16,17,18,20,91,92,224,225],sf=6;function af(t){return Math.max(0,t)*.7+8}function gle(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class mle{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=_ae(e.contentDOM),this.atoms=e.state.facet(zm).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(je.allowMultipleSelections)&&vle(e,n),this.dragging=ble(e,n)&&$4(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&gle(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let r=0,i=0,o=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=s4(this.view);e.clientX-s.left<=o.left+sf?r=-af(o.left-e.clientX):e.clientX+s.right>=o.right-sf&&(r=af(e.clientX-o.right)),e.clientY-s.top<=o.top+sf?i=-af(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-sf&&(i=af(e.clientY-o.bottom)),this.setScrollSpeed(r,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let s=of(this.atoms,i.from,0);s!=i.from&&(o=L.cursor(s,-1))}else{let s=of(this.atoms,i.from,-1),a=of(this.atoms,i.to,1);(s!=i.from||a!=i.to)&&(o=L.range(i.from==i.anchor?s:a,i.from==i.head?s:a))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?L.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection)||r.main.assoc!=n.state.selection.main.assoc&&this.dragging===!1)&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function vle(t,e){let n=t.state.facet(G3);return n.length?n[0](e):pe.mac?e.metaKey:e.ctrlKey}function yle(t,e){let n=t.state.facet(K3);return n.length?n[0](e):pe.mac?!e.altKey:!e.ctrlKey}function ble(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Kh(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function xle(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=pt.get(n))&&r.ignoreEvent(e))return!1;return!0}const nr=Object.create(null),rr=Object.create(null),T4=pe.ie&&pe.ie_version<15||pe.ios&&pe.webkit_version<604;function wle(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),E4(t,n.value)},50)}function E4(t,e){let{state:n}=t,r,i=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(Xm!=null&&n.selection.ranges.every(l=>l.empty)&&Xm==o.toString()){let l=-1;r=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let h=n.toText((s?o.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:h},range:L.cursor(u.from+h.length)}})}else s?r=n.changeByRange(l=>{let u=o.line(i++);return{changes:{from:l.from,to:l.to,insert:u.text},range:L.cursor(l.from+u.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}rr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},nr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1),rr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},rr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},nr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(X3))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=kle(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new mle(t,e,n,r)),r&&t.observer.ignore(()=>A3(t.contentDOM));let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function M4(t,e,n,r){if(r==1)return L.cursor(e,n);if(r==2)return ile(t.state,e,n);{let i=Ht.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,a=i?i.posAtEnd:o.to;return a<t.state.doc.length&&a==o.to&&a++,L.range(s,a)}}let O4=(t,e)=>t>=e.top&&t<=e.bottom,A4=(t,e,n)=>O4(e,n)&&t>=n.left&&t<=n.right;function Cle(t,e,n,r){let i=Ht.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&A4(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&A4(n,r,a)?1:s&&O4(r,s)?-1:1}function P4(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:Cle(t,n,e.clientX,e.clientY)}}const Sle=pe.ie&&pe.ie_version<=11;let D4=null,_4=0,I4=0;function $4(t){if(!Sle)return t.detail;let e=D4,n=I4;return D4=t,I4=Date.now(),_4=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(_4+1)%3:1}function kle(t,e){let n=P4(t,e),r=$4(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,s,a){let l=P4(t,o),u,c=M4(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!s){let h=M4(t,n.pos,n.bias,r),f=Math.min(h.from,c.from),d=Math.max(h.to,c.to);c=f<c.from?L.range(f,d):L.range(d,f)}return s?i.replaceRange(i.main.extend(c.from,c.to)):a&&r==1&&i.ranges.length>1&&(u=Tle(i,l.pos))?u:a?i.addRange(c):L.create([c])}}}function Tle(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return L.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}nr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,s=o+i.length;(o>=n.to||s<=n.from)&&(n=L.range(o,s))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1},nr.dragend=t=>(t.inputState.draggedContent=null,!1);function F4(t,e,n,r){if(!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=r&&o&&yle(t,e)?{from:o.from,to:o.to}:null,a={from:i,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}nr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&F4(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let a=new FileReader;a.onerror=o,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[s]=a.result),o()},a.readAsText(n[s])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return F4(t,e,r,!0),!0}return!1},nr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=T4?null:e.clipboardData;return n?(E4(t,n.getData("text/plain")||n.getData("text/uri-text")),!0):(wle(t),!1)};function Ele(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function Mle(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:r}}let Xm=null;nr.copy=nr.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=Mle(t.state);if(!n&&!i)return!1;Xm=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=T4?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(Ele(t,n),!1)};const L4=yr.define();function R4(t,e){let n=[];for(let r of t.facet(J3)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:L4.of(!0)}):null}function B4(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=R4(t.state,e);n?t.dispatch(n):t.update([])}},10)}rr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),B4(t)},rr.blur=t=>{t.observer.clearSelectionRange(),B4(t)},rr.compositionstart=rr.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},rr.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,pe.chrome&&pe.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)},rr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},nr.beforeinput=(t,e)=>{var n;let r;if(pe.chrome&&pe.android&&(r=S4.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let i=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return!1};const N4=new Set;function Ole(t){N4.has(t)||(N4.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const j4=["pre-wrap","normal","pre-line","break-spaces"];class Ale{constructor(e){this.lineWrapping=e,this.doc=Ue.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return j4.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,s){let a=j4.indexOf(e)>-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let u=0;u<s.length;u++){let c=s[u];c<0?u++:this.heightSamples[Math.floor(c*10)]=!0}}return l}}class Ple{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class wr{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?un.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Ai?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new wr(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var gt=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(gt||(gt={}));const lf=.001;class cn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>lf&&(e.heightChanged=!0),this.height=n)}replace(e,n,r){return cn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,s=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:u,fromB:c,toB:h}=i[a],f=o.lineAt(l,gt.ByPosNoHeight,r.setDoc(n),0,0),d=f.to>=u?f:o.lineAt(u,gt.ByPosNoHeight,r,0,0);for(h+=d.to-u,u=d.to;a>0&&f.from<=i[a-1].toA;)l=i[a-1].fromA,c=i[a-1].fromB,a--,l<f.from&&(f=o.lineAt(l,gt.ByPosNoHeight,r,0,0));c+=f.from-l,l=f.from;let p=Zm.build(r.setDoc(s),e,c,h);o=o.replace(l,u,p)}return o.updateHeight(r,0)}static empty(){return new _n(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(o>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,o-=a.size}else break;else if(i<o){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(o+=a.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,r++),new Dle(cn.of(e.slice(0,n)),s,cn.of(e.slice(r)))}}cn.prototype.size=1;class V4 extends cn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new wr(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,s){e<=o+this.length&&n>=o&&s(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(e,i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class _n extends V4{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new wr(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof _n||i instanceof Qt&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Qt?i=new _n(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):cn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(e,i.heights[i.index++]):(r||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Qt extends cn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,s,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);s=l/o,this.length>o+1&&(a=(this.height-l)/(this.length-o-1))}else s=this.height/o;return{firstLine:r,lastLine:i,perLine:s,perChar:a}}blockAt(e,n,r,i){let{firstLine:o,lastLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let u=i+Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length),c=n.doc.lineAt(u),h=a+c.length*l,f=Math.max(r,e-h/2);return new wr(c.from,c.length,f,h,0)}else{let u=Math.max(0,Math.min(s-o,Math.floor((e-r)/a))),{from:c,length:h}=n.doc.line(o+u);return new wr(c,h,r+a*u,a,0)}}lineAt(e,n,r,i,o){if(n==gt.ByHeight)return this.blockAt(e,r,i,o);if(n==gt.ByPosNoHeight){let{from:d,to:p}=r.doc.lineAt(e);return new wr(d,p-d,0,0,0)}let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(r,o),u=r.doc.lineAt(e),c=a+u.length*l,h=u.number-s,f=i+a*h+l*(u.from-o-h);return new wr(u.from,u.length,Math.max(i,Math.min(f,i+this.height-c)),c,0)}forEachLine(e,n,r,i,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:a,perLine:l,perChar:u}=this.heightMetrics(r,o);for(let c=e,h=i;c<=n;){let f=r.doc.lineAt(c);if(c==e){let p=f.number-a;h+=l*p+u*(e-o-p)}let d=l+u*f.length;s(new wr(f.from,f.length,h,d,0)),h+=d,c=f.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof Qt?r[r.length-1]=new Qt(o.length+i):r.push(null,new Qt(i-1))}if(e>0){let o=r[0];o instanceof Qt?r[0]=new Qt(e+o.length):r.unshift(new Qt(e-1),null)}return cn.of(r)}decomposeLeft(e,n){n.push(new Qt(e-1),null)}decomposeRight(e,n){n.push(null,new Qt(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],a=Math.max(n,i.from),l=-1;for(i.from>n&&s.push(new Qt(i.from-n-1).updateHeight(e,n));a<=o&&i.more;){let c=e.doc.lineAt(a).length;s.length&&s.push(null);let h=i.heights[i.index++];l==-1?l=h:Math.abs(h-l)>=lf&&(l=-2);let f=new _n(c,h);f.outdated=!1,s.push(f),a+=c+1}a<=o&&s.push(null,new Qt(o-a).updateHeight(e,a));let u=cn.of(s);return(l<0||Math.abs(u.height-this.height)>=lf||Math.abs(l-this.heightMetrics(e,n).perLine)>=lf)&&(e.heightChanged=!0),u}else(r||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Dle extends cn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let s=i+this.left.height,a=o+this.left.length+this.break,l=n==gt.ByHeight?e<s:e<a,u=l?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,s,a);if(this.break||(l?u.to<a:u.from>a))return u;let c=n==gt.ByPosNoHeight?gt.ByPosNoHeight:gt.ByPos;return l?u.join(this.right.lineAt(a,c,r,s,a)):this.left.lineAt(a,c,r,i,o).join(u)}forEachLine(e,n,r,i,o,s){let a=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,o,s),n>=l&&this.right.forEachLine(e,n,r,a,l,s);else{let u=this.lineAt(l,gt.ByPos,r,i,o);e<u.from&&this.left.forEachLine(e,u.from-1,r,i,o,s),u.to>=e&&u.from<=n&&s(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,a,l,s)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of r)o.push(a);if(e>0&&z4(o,s-1),n<this.length){let a=o.length;this.decomposeRight(n,o),z4(o,a)}return cn.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?cn.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:s}=this,a=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=a+s.length&&i.more?l=s=s.updateHeight(e,a,r,i):s.updateHeight(e,a,r),l?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function z4(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Qt&&(r=t[e+1])instanceof Qt&&t.splice(e-1,3,new Qt(n.length+1+r.length))}const _le=5;class Zm{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof _n?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new _n(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-e;r.block?this.addBlock(new V4(s,i,r)):(s||o||i>=_le)&&this.addLineDeco(i,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new _n(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Qt(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof _n)return e;let n=new _n(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof _n)&&!this.isCovered?this.nodes.push(new _n(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof _n&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new Zm(r,e);return tt.spans(n,r,i,o,0),o.finish(r)}}function Ile(t,e,n){let r=new $le;return tt.compare(t,e,n,r,0),r.changes}class $le{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&Bm(e,n,this.changes,5)}}function Fle(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let u=t.parentNode;u&&u!=r.body;)if(u.nodeType==1){let c=u,h=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&h.overflow!="visible"){let f=c.getBoundingClientRect();o=Math.max(o,f.left),s=Math.min(s,f.right),a=Math.max(a,f.top),l=u==t.parentNode?f.bottom:Math.min(l,f.bottom)}u=h.position=="absolute"||h.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function Lle(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Qm{constructor(e,n,r){this.from=e,this.to=n,this.size=r}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return ke.replace({widget:new Rle(this.size*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class Rle extends Gr{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class W4{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=H4,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ct.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(Vm).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new Ale(n),this.stateDeco=e.facet(Hl).filter(r=>typeof r!="function"),this.heightMap=cn.empty().applyChanges(this.stateDeco,Ue.empty,this.heightOracle.setDoc(e.doc),[new qn(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ke.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new uf(o,s))}}this.viewports=e.sort((r,i)=>r.from-i.from),this.scaler=this.heightMap.height<=7e6?H4:new jle(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Yl(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Hl).filter(c=>typeof c!="function");let i=e.changedRanges,o=qn.extendWithRanges(i,Ile(r,this.stateDeco,e?e.changes:zt.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(t4)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Ct.RTL:Ct.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=n.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,c=0;if(a.width&&a.height){let S=a.width/n.offsetWidth,w=a.height/n.offsetHeight;(S>.995&&S<1.005||!isFinite(S)||Math.abs(a.width-n.offsetWidth)<1)&&(S=1),(w>.995&&w<1.005||!isFinite(w)||Math.abs(a.height-n.offsetHeight)<1)&&(w=1),(this.scaleX!=S||this.scaleY!=w)&&(this.scaleX=S,this.scaleY=w,u|=8,s=l=!0)}let h=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=_3(e.scrollDOM);let p=(this.printing?Lle:Fle)(n,this.paddingTop),g=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let x=a.width;if((this.contentDOMWidth!=x||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(s=!0),s||i.lineWrapping&&Math.abs(x-this.contentDOMWidth)>i.charWidth){let{lineHeight:w,charWidth:k,textHeight:T}=e.docView.measureTextSize();s=w>0&&i.refresh(o,w,k,T,x/k,S),s&&(e.docView.minWidth=0,u|=8)}g>0&&m>0?c=Math.max(g,m):g<0&&m<0&&(c=Math.min(g,m)),i.heightChanged=!1;for(let w of this.viewports){let k=w.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(w);this.heightMap=(s?cn.empty().applyChanges(this.stateDeco,Ue.empty,this.heightOracle,[new qn(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new Ple(w.from,k))}i.heightChanged&&(u|=2)}let C=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return C&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||C)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,l=new uf(i.lineAt(s-r*1e3,gt.ByHeight,o,0,0).from,i.lineAt(a+(1-r)*1e3,gt.ByHeight,o,0,0).to);if(n){let{head:u}=n.range;if(u<l.from||u>l.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=i.lineAt(u,gt.ByPos,o,0,0),f;n.y=="center"?f=(h.top+h.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u<l.from?f=h.top:f=h.bottom-c,l=new uf(i.lineAt(f-1e3/2,gt.ByHeight,o,0,0).from,i.lineAt(f+c+1e3/2,gt.ByHeight,o,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new uf(this.heightMap.lineAt(r,gt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,gt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,gt.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,gt.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||i<=s-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=a+Math.max(10,Math.min(r,250)))&&i>s-2*1e3&&o<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new Qm(n.mapPos(i.from),n.mapPos(i.to),i.size));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=Ct.LTR&&!r)return[];let a=[],l=(u,c,h,f)=>{if(c-u<o)return;let d=this.state.selection.main,p=[d.from];d.empty||p.push(d.to);for(let m of p)if(m>u&&m<c){l(u,m-10,h,f),l(m+10,c,h,f);return}let g=Nle(e,m=>m.from>=h.from&&m.to<=h.to&&Math.abs(m.from-u)<o&&Math.abs(m.to-c)<o&&!p.some(b=>m.from<b&&m.to>b));if(!g){if(c<h.to&&n&&r&&n.visibleRanges.some(m=>m.from<=c&&m.to>=c)){let m=n.moveToLineBoundary(L.cursor(c),!1,!0).head;m>u&&(c=m)}g=new Qm(u,c,this.gapSize(h,u,c,f))}a.push(g)};for(let u of this.viewportLines){if(u.length<s)continue;let c=Ble(u.from,u.to,this.stateDeco);if(c.total<s)continue;let h=this.scrollTarget?this.scrollTarget.range.head:null,f,d;if(r){let p=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,m;if(h!=null){let b=hf(c,h),x=((this.visibleBottom-this.visibleTop)/2+p)/u.height;g=b-x,m=b+x}else g=(this.visibleTop-u.top-p)/u.height,m=(this.visibleBottom-u.top+p)/u.height;f=cf(c,g),d=cf(c,m)}else{let p=c.total*this.heightOracle.charWidth,g=i*this.heightOracle.charWidth,m,b;if(h!=null){let x=hf(c,h),C=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/p;m=x-C,b=x+C}else m=(this.pixelViewport.left-g)/p,b=(this.pixelViewport.right+g)/p;f=cf(c,m),d=cf(c,b)}f>u.from&&l(u.from,f,u,c),d<u.to&&l(d,u.to,u,c)}return a}gapSize(e,n,r,i){let o=hf(i,r)-hf(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){Qm.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ke.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];tt.spans(e,this.viewport.from,this.viewport.to,{span(i,o){n.push({from:i,to:o})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((i,o)=>i.from!=n[o].from||i.to!=n[o].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Yl(this.heightMap.lineAt(e,gt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Yl(this.heightMap.lineAt(this.scaler.fromDOM(e),gt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Yl(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class uf{constructor(e,n){this.from=e,this.to=n}}function Ble(t,e,n){let r=[],i=t,o=0;return tt.spans(n,t,e,{span(){},point(s,a){s>i&&(r.push({from:i,to:s}),o+=s-i),i=a}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function cf({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:s}=e[i],a=s-o;if(r<=a)return o+r;r-=a}}function hf(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function Nle(t,e){for(let n of t)if(e(n))return n}const H4={toDOM(t){return t},fromDOM(t){return t},scale:1};class jle{constructor(e,n,r){let i=0,o=0,s=0;this.viewports=r.map(({from:a,to:l})=>{let u=n.lineAt(a,gt.ByPos,e,0,0).top,c=n.lineAt(l,gt.ByPos,e,0,0).bottom;return i+=c-u,{from:a,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let a of this.viewports)a.domTop=s+(a.top-o)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),o=a.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}}function Yl(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new wr(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Yl(i,e)):t._content)}const ff=he.define({combine:t=>t.join(" ")}),Jm=he.define({combine:t=>t.indexOf(!0)>-1}),e1=Ti.newName(),q4=Ti.newName(),U4=Ti.newName(),Y4={"&light":"."+q4,"&dark":"."+U4};function t1(t,e,n){return new Ti(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const Vle=t1("."+e1,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Y4),Gl="￿";class zle{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(je.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Gl}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let s=i.nextSibling;if(s==n)break;let a=pt.get(i),l=pt.get(s);(a&&l?a.breakAfter:(a?a.breakAfter:G4(i))||G4(s)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(a=i.exec(n))&&(o=a.index,s=a[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=s-1);r=o+s}}readNode(e){if(e.cmIgnore)return;let n=pt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(Wle(e,r.node,r.offset)?n:0))}}function Wle(t,e,n){for(;;){if(!e||n<qr(e))return!1;if(e==t)return!0;n=Nl(e)+1,e=e.parentNode}}function G4(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class K4{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class Hle{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="";let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=o||s?[]:Yle(e),l=new zle(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=Gle(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!Am(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),u=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!Am(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset);this.newSel=L.single(u,l)}}}function X4(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,l=i.from,u=null;(o===8||pe.android&&e.text.length<a-s)&&(l=i.to,u="end");let c=Ule(t.state.doc.sliceString(s,a,Gl),e.text,l-s,u);c&&(pe.chrome&&o==13&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==Gl+Gl&&c.toB--,n={from:s+c.from,to:s+c.toA,insert:Ue.of(e.text.slice(c.from,c.toB).split(Gl))})}else r&&(!t.hasFocus&&t.state.facet(nf)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(pe.mac||pe.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=L.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ue.of([" "])}):pe.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
262
+ `&&t.lineWrapping&&(r&&(r=L.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ue.of([" "])}),n){if(pe.ios&&t.inputState.flushIOSKey()||pe.android&&(n.from==i.from&&n.to==i.to&&n.insert.length==1&&n.insert.lines==2&&Xs(t.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&n.insert.length==0||o==8&&n.insert.length<n.to-n.from&&n.to>i.head)&&Xs(t.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&n.insert.length==0&&Xs(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,l=()=>a||(a=qle(t,n,r));return t.state.facet(Q3).some(u=>u(t,n.from,n.to,s,l))||t.dispatch(l()),!0}else if(r&&!r.main.eq(i)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:s,userEvent:a}),!0}else return!1}function qle(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=o.from<e.from?i.sliceDoc(o.from,e.from):"",l=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=i.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),c,h=n&&p4(t,n.main.head);if(h){let p=e.insert.length-(e.to-e.from);c={from:h.from,to:h.to-p}}else c=t.state.doc.lineAt(o.head);let f=o.to-e.to,d=o.to-o.from;r=i.changeByRange(p=>{if(p.from==o.from&&p.to==o.to)return{changes:a,range:l||p.map(a)};let g=p.to-f,m=g-u.length;if(p.to-p.from!=d||t.state.sliceDoc(m,g)!=u||p.to>=c.from&&p.from<=c.to)return{range:p};let b=i.changes({from:m,to:g,insert:e.insert}),x=p.to-o.to;return{changes:b,range:l?L.range(Math.max(0,l.anchor+x),Math.max(0,l.head+x)):p.map(b)}})}else r={changes:a,selection:l&&i.selection.replaceRange(l)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function Ule(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(r=="end"){let l=Math.max(0,o-Math.min(s,a));n-=s+l-o}if(s<o&&t.length<e.length){let l=n<=o&&n>=s?o-n:0;o-=l,a=o+(a-s),s=o}else if(a<o){let l=n<=o&&n>=a?o-n:0;o-=l,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function Yle(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new K4(n,r)),(i!=n||o!=r)&&e.push(new K4(i,o))),e}function Gle(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?L.single(n+e,r+e):null}const Kle={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},n1=pe.ie&&pe.ie_version<=11;class Xle{constructor(e){this.view=e,this.active=!1,this.selectionRange=new Iae,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(pe.ie&&pe.ie_version<=11||pe.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),n1&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(nf)?r.root.activeElement!=this.dom:!Xh(r.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(pe.ie&&pe.ie_version<=11||pe.android&&pe.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Zh(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=pe.safari&&e.root.nodeType==11&&Aae(this.dom.ownerDocument)==this.dom&&Zle(this.view)||Kh(e.root);if(!n||this.selectionRange.eq(n))return!1;let r=Xh(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&Fae(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Kle),n1&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),n1&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&Xs(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(i=!0),n==-1?{from:n,to:r}=s:(n=Math.min(s.from,n),r=Math.max(s.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Xh(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new Hle(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=X4(this.view,n);return this.view.state==r&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=Z4(n,e.previousSibling||e.target.previousSibling,-1),i=Z4(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Z4(t,e,n){for(;e;){let r=pt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function Zle(t){let e=null;function n(l){l.preventDefault(),l.stopImmediatePropagation(),e=l.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let r=e.startContainer,i=e.startOffset,o=e.endContainer,s=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Zh(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}class oe{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(r=>r.forEach(i=>n(i,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||$ae(e.parent)||document,this.viewState=new W4(e.state||je.create(e)),e.scrollTo&&e.scrollTo.is(tf)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Wl).map(r=>new jm(r));for(let r of this.plugins)r.update(this);this.observer=new Xle(this),this.inputState=new fle(this),this.inputState.ensureHandlers(this.plugins),this.docView=new f4(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let n=e.length==1&&e[0]instanceof Wt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,l=null;e.some(f=>f.annotation(L4))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=R4(o,s),l||(a=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(je.phrases)!=this.state.facet(je.phrases))return this.setState(o);i=rf.create(this,o,e),i.flags|=a;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;h=new Qs(d.empty?d:L.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(tf)&&(h=d.value.clip(this.state))}this.viewState.update(i,h),this.bidiCache=df.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(ql)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(ff)!=i.state.facet(ff)&&(this.viewState.mustMeasureContent=!0),(n||r||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty)for(let f of this.state.facet(Nm))try{f(i)}catch(d){Hn(this.state,d,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!X4(this,c)&&u.force&&Xs(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new W4(e),this.plugins=e.facet(Wl).map(r=>new jm(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView=new f4(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Wl),r=e.state.facet(Wl);if(n!=r){let i=[];for(let o of r){let s=n.indexOf(o);if(s<0)i.push(new jm(o));else{let a=this.plugins[s];a.mustUpdate=e,i.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(_3(r))o=-1,s=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(i);o=d.from,s=d.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(d=>{try{return d.read(this)}catch(p){return Hn(this.state,p),Q4}}),h=rf.create(this,this.state,[]),f=!1;h.flags|=l,n?n.flags|=l:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h));for(let d=0;d<u.length;d++)if(c[d]!=Q4)try{let p=u[d];p.write&&p.write(c[d],this)}catch(p){Hn(this.state,p)}if(f&&this.docView.updateSelection(!0),!h.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null;continue}else{let p=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-s;if(p>1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(Nm))a(n)}get themeClasses(){return e1+" "+(this.state.facet(Jm)?U4:q4)+" "+this.state.facet(ff)}updateAttrs(){let e=J4(this,n4,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(nf)?"true":"false",class:"cm-content",style:`${pe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),J4(this,Vm,n);let r=this.observer.ignore(()=>{let i=Rm(this.contentDOM,this.contentAttrs,n),o=Rm(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(oe.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ql);let e=this.state.facet(oe.cspNonce);Ti.mount(this.root,this.styleModules.concat(Vle).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.spec!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return Km(this,e,w4(this,e,n,r))}moveByGroup(e,n){return Km(this,e,w4(this,e,n,r=>cle(this,e.head,r)))}moveToLineBoundary(e,n,r=!0){return ule(this,e,n,r)}moveVertically(e,n,r){return Km(this,e,hle(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),b4(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),s=o[Pi.find(o,e-i.from,-1,n)];return Qh(r,s.dir==Ct.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(e4)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Qle)return c4(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||u4(o.isolates,r=i4(this,e.from,e.to))))return o.order;r||(r=i4(this,e.from,e.to));let i=Kae(e.text,n,r);return this.bidiCache.push(new df(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||pe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{A3(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return tf.of(new Qs(typeof e=="number"?L.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return tf.of(new Qs(L.cursor(r.from),"start","start",r.top-e,n,!0))}static domEventHandlers(e){return Lt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Lt.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Ti.newName(),i=[ff.of(r),ql.of(t1(`.${r}`,e))];return n&&n.dark&&i.push(Jm.of(!0)),i}static baseTheme(e){return qs.lowest(ql.of(t1("."+e1,e,Y4)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&pt.get(r)||pt.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}oe.styleModule=ql,oe.inputHandler=Q3,oe.focusChangeEffect=J3,oe.perLineTextDirection=e4,oe.exceptionSink=Z3,oe.updateListener=Nm,oe.editable=nf,oe.mouseSelectionStyle=X3,oe.dragMovesSelection=K3,oe.clickAddsSelectionRange=G3,oe.decorations=Hl,oe.atomicRanges=zm,oe.bidiIsolatedRanges=r4,oe.scrollMargins=o4,oe.darkTheme=Jm,oe.cspNonce=he.define({combine:t=>t.length?t[0]:""}),oe.contentAttributes=Vm,oe.editorAttributes=n4,oe.lineWrapping=oe.contentAttributes.of({class:"cm-lineWrapping"}),oe.announce=De.define();const Qle=4096,Q4={};class df{constructor(e,n,r,i,o,s){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Ct.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new df(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}}function J4(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],s=typeof o=="function"?o(t):o;s&&Fm(s,n)}return n}const Jle=pe.mac?"mac":pe.windows?"win":pe.linux?"linux":"key";function eue(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,s,a;for(let l=0;l<n.length-1;++l){const u=n[l];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))o=!0;else if(/^s(hift)?$/i.test(u))s=!0;else if(/^mod$/i.test(u))e=="mac"?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),a&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function pf(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const tue=qs.default(oe.domEventHandlers({keydown(t,e){return nT(tT(e.state),t,e,"editor")}})),gf=he.define({enables:tue}),eT=new WeakMap;function tT(t){let e=t.facet(gf),n=eT.get(e);return n||eT.set(e,n=iue(e.reduce((r,i)=>r.concat(i),[]))),n}function nue(t,e,n){return nT(tT(t.state),e,t,n)}let Di=null;const rue=4e3;function iue(t,e=Jle){let n=Object.create(null),r=Object.create(null),i=(s,a)=>{let l=r[s];if(l==null)r[s]=a;else if(l!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,a,l,u,c)=>{var h,f;let d=n[s]||(n[s]=Object.create(null)),p=a.split(/ (?!$)/).map(b=>eue(b,e));for(let b=1;b<p.length;b++){let x=p.slice(0,b).join(" ");i(x,!0),d[x]||(d[x]={preventDefault:!0,stopPropagation:!1,run:[C=>{let S=Di={view:C,prefix:x,scope:s};return setTimeout(()=>{Di==S&&(Di=null)},rue),!0}]})}let g=p.join(" ");i(g,!1);let m=d[g]||(d[g]={preventDefault:!1,stopPropagation:!1,run:((f=(h=d._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});l&&m.run.push(l),u&&(m.preventDefault=!0),c&&(m.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let u of a){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let h in c)c[h].run.push(s.any)}let l=s[e]||s.key;if(l)for(let u of a)o(u,l,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(u,"Shift-"+l,s.shift,s.preventDefault,s.stopPropagation)}return n}function nT(t,e,n,r){let i=Oae(e),o=Kt(i,0),s=Wn(o)==i.length&&i!=" ",a="",l=!1,u=!1,c=!1;Di&&Di.view==n&&Di.scope==r&&(a=Di.prefix+" ",k4.indexOf(e.keyCode)<0&&(u=!0,Di=null));let h=new Set,f=m=>{if(m){for(let b of m.run)if(!h.has(b)&&(h.add(b),b(n,e)))return m.stopPropagation&&(c=!0),!0;m.preventDefault&&(m.stopPropagation&&(c=!0),u=!0)}return!1},d=t[r],p,g;return d&&(f(d[a+pf(i,e,!s)])?l=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(pe.windows&&e.ctrlKey&&e.altKey)&&(p=Ei[e.keyCode])&&p!=i?(f(d[a+pf(p,e,!0)])||e.shiftKey&&(g=Bl[e.keyCode])!=i&&g!=p&&f(d[a+pf(g,e,!1)]))&&(l=!0):s&&e.shiftKey&&f(d[a+pf(i,e,!0)])&&(l=!0),!l&&f(d._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),l}class Kl{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=rT(e);return[new Kl(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return oue(e,n,r)}}function rT(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Ct.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function iT(t,e,n){let r=L.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(r,!0,!0).from),type:un.Text}}function oue(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==Ct.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=rT(t),u=s.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),h=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=a.right-(c?parseInt(c.paddingRight):0),d=Gm(t,r),p=Gm(t,i),g=d.type==un.Text?d:null,m=p.type==un.Text?p:null;if(g&&(t.lineWrapping||d.widgetLineBreaks)&&(g=iT(t,r,g)),m&&(t.lineWrapping||p.widgetLineBreaks)&&(m=iT(t,i,m)),g&&m&&g.from==m.from)return x(C(n.from,n.to,g));{let w=g?C(n.from,null,g):S(d,!1),k=m?C(null,n.to,m):S(p,!0),T=[];return(g||d).to<(m||p).from-(g&&m?1:0)||d.widgetLineBreaks>1&&w.bottom+t.defaultLineHeight/2<k.top?T.push(b(h,w.bottom,f,k.top)):w.bottom<k.top&&t.elementAtHeight((w.bottom+k.top)/2).type==un.Text&&(w.bottom=k.top=(w.bottom+k.top)/2),x(w).concat(T).concat(x(k))}function b(w,k,T,O){return new Kl(e,w-l.left,k-l.top-.01,T-w,O-k+.01)}function x({top:w,bottom:k,horizontal:T}){let O=[];for(let P=0;P<T.length;P+=2)O.push(b(T[P],w,T[P+1],k));return O}function C(w,k,T){let O=1e9,P=-1e9,D=[];function R(B,j,N,V,me){let re=t.coordsAtPos(B,B==T.to?-2:2),_=t.coordsAtPos(N,N==T.from?2:-2);!re||!_||(O=Math.min(re.top,_.top,O),P=Math.max(re.bottom,_.bottom,P),me==Ct.LTR?D.push(o&&j?h:re.left,o&&V?f:_.right):D.push(!o&&V?h:_.left,!o&&j?f:re.right))}let H=w??T.from,W=k??T.to;for(let B of t.visibleRanges)if(B.to>H&&B.from<W)for(let j=Math.max(B.from,H),N=Math.min(B.to,W);;){let V=t.state.doc.lineAt(j);for(let me of t.bidiSpans(V)){let re=me.from+V.from,_=me.to+V.from;if(re>=N)break;_>j&&R(Math.max(re,j),w==null&&re<=H,Math.min(_,N),k==null&&_>=W,me.dir)}if(j=V.to+1,j>=N)break}return D.length==0&&R(H,w==null,W,k==null,t.textDirection),{top:O,bottom:P,horizontal:D}}function S(w,k){let T=a.top+(k?w.top:w.bottom);return{top:T,bottom:T,horizontal:[]}}}function sue(t,e){return t.constructor==e.constructor&&t.eq(e)}class aue{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(mf)!=e.state.facet(mf)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let n=0,r=e.facet(mf);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!sue(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const mf=he.define();function oT(t){return[Lt.define(e=>new aue(e,t)),mf.of(t)]}const sT=!pe.ios,Xl=he.define({combine(t){return br(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function lue(t={}){return[Xl.of(t),uue,cue,hue,t4.of(!0)]}function aT(t){return t.startState.facet(Xl)!=t.state.facet(Xl)}const uue=oT({above:!0,markers(t){let{state:e}=t,n=e.facet(Xl),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||sT:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:L.cursor(i.head,i.head>i.anchor?-1:1);for(let l of Kl.forRange(t,s,a))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=aT(t);return n&&lT(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){lT(e.state,t)},class:"cm-cursorLayer"});function lT(t,e){e.style.animationDuration=t.facet(Xl).cursorBlinkRate+"ms"}const cue=oT({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Kl.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||aT(t)},class:"cm-selectionLayer"}),uT={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};sT&&(uT[".cm-line"].caretColor="transparent !important");const hue=qs.highest(oe.theme(uT)),cT=De.define({map(t,e){return t==null?null:e.mapPos(t)}}),Zl=Xt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(cT)?r.value:n,t)}}),fue=Lt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Zl);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Zl)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Zl),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Zl)!=t&&this.view.dispatch({effects:cT.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function due(){return[Zl,fue]}function hT(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),s=n,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)i(s+a.index,a)}function pue(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class gue{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(a,l,u,c)=>i(c,u,u+a[0].length,a,l);else if(typeof r=="function")this.addMatch=(a,l,u,c)=>{let h=r(a,l,u);h&&c(u,u+a[0].length,h)};else if(r)this.addMatch=(a,l,u,c)=>c(u,u+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new ki,r=n.add.bind(n);for(let{from:i,to:o}of pue(e,this.maxLength))hT(e.state.doc,this.regexp,i,o,(s,a)=>this.addMatch(a,e,s,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,l)=>{l>e.view.viewport.from&&a<e.view.viewport.to&&(r=Math.min(a,r),i=Math.max(l,i))}),e.viewportChanged||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let s=Math.max(o.from,r),a=Math.min(o.to,i);if(a>s){let l=e.state.doc.lineAt(s),u=l.to<a?e.state.doc.lineAt(a):l,c=Math.max(o.from,l.from),h=Math.min(o.to,u.to);if(this.boundary){for(;s>l.from;s--)if(this.boundary.test(l.text[s-1-l.from])){c=s;break}for(;a<u.to;a++)if(this.boundary.test(u.text[a-u.from])){h=a;break}}let f=[],d,p=(g,m,b)=>f.push(b.range(g,m));if(l==u)for(this.regexp.lastIndex=c-l.from;(d=this.regexp.exec(l.text))&&d.index<h-l.from;)this.addMatch(d,e,d.index+l.from,p);else hT(e.state.doc,this.regexp,c,h,(g,m)=>this.addMatch(m,e,g,p));n=n.update({filterFrom:c,filterTo:h,filter:(g,m)=>g<c||m>h,add:f})}}return n}}const r1=/x/.unicode!=null?"gu":"g",mue=new RegExp(`[\0-\b
263
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,r1),vue={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let i1=null;function yue(){var t;if(i1==null&&typeof document<"u"&&document.body){let e=document.body.style;i1=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return i1||!1}const vf=he.define({combine(t){let e=br(t,{render:null,specialChars:mue,addSpecialChars:null});return(e.replaceTabs=!yue())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,r1)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,r1)),e}});function bue(t={}){return[vf.of(t),xue()]}let fT=null;function xue(){return fT||(fT=Lt.fromClass(class{constructor(t){this.view=t,this.decorations=ke.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(vf)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new gue({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=Kt(e[0],0);if(o==9){let s=i.lineAt(r),a=n.state.tabSize,l=Ys(s.text,a,r-s.from);return ke.replace({widget:new kue((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=ke.replace({widget:new Sue(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(vf);t.startState.facet(vf)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const wue="•";function Cue(t){return t>=32?wue:t==10?"␤":String.fromCharCode(9216+t)}class Sue extends Gr{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=Cue(this.code),r=e.state.phrase("Control character")+" "+(vue[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class kue extends Gr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Tue(){return Mue}const Eue=ke.line({class:"cm-activeLine"}),Mue=Lt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(Eue.range(i.from)),e=i.from)}return ke.set(n)}},{decorations:t=>t.decorations});let Oue=class extends Gr{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let n=e.firstChild?Gs(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Qh(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}};function Aue(t){return Lt.fromClass(class{constructor(e){this.view=e,this.placeholder=t?ke.set([ke.widget({widget:new Oue(t),side:1}).range(0)]):ke.none}get decorations(){return this.view.state.doc.length?ke.none:this.placeholder}},{decorations:e=>e.decorations})}const o1=2e3;function Pue(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>o1||n.off>o1||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let u=t.doc.line(l);u.length<=a&&o.push(L.range(u.from+s,u.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let u=t.doc.line(l),c=Tm(u.text,s,t.tabSize,!0);if(c<0)o.push(L.cursor(u.to));else{let h=Tm(u.text,a,t.tabSize);o.push(L.range(u.from+c,u.from+h))}}}return o}function Due(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function dT(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>o1?-1:i==r.length?Due(t,e.clientX):Ys(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function _ue(t,e){let n=dT(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),s=i.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(i.changes)}},get(i,o,s){let a=dT(t,i);if(!a)return r;let l=Pue(t.state,n,a);return l.length?s?L.create(l.concat(r.ranges)):L.create(l):r}}:null}function Iue(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return oe.mouseSelectionStyle.of((n,r)=>e(r)?_ue(n,r):null)}const $ue={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Fue={style:"cursor: crosshair"};function Lue(t={}){let[e,n]=$ue[t.key||"Alt"],r=Lt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,oe.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?Fue:null})]}const Ql="-10000px";class pT{constructor(e,n,r){this.facet=n,this.createTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(i=>i),this.tooltipViews=this.tooltips.map(r)}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[],a=n?[]:null;for(let l=0;l<o.length;l++){let u=o[l],c=-1;if(u){for(let h=0;h<this.tooltips.length;h++){let f=this.tooltips[h];f&&f.create==u.create&&(c=h)}if(c<0)s[l]=this.createTooltipView(u),a&&(a[l]=!!u.above);else{let h=s[l]=this.tooltipViews[c];a&&(a[l]=n[c]),h.update&&h.update(e)}}}for(let l of this.tooltipViews)s.indexOf(l)<0&&(l.dom.remove(),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(a.forEach((l,u)=>n[u]=l),n.length=a.length),this.input=i,this.tooltips=o,this.tooltipViews=s,!0}}function Rue(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const s1=he.define({combine:t=>{var e,n,r;return{position:pe.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||Rue}}}),gT=new WeakMap,mT=Lt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(s1);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new pT(t,a1,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(s1);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=Ql,e.dom.style.left="0px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);this.parent&&this.container.remove(),(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(pe.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(this.view.scaleX!=1||this.view.scaleY!=1)r=!0;else if(i.style.top==Ql&&i.style.left=="0px"){let o=i.getBoundingClientRect();r=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,n=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((i,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(s1).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:r}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{editor:n,space:r,scaleX:i,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],u=this.manager.tooltipViews[a],{dom:c}=u,h=t.pos[a],f=t.size[a];if(!h||h.bottom<=Math.max(n.top,r.top)||h.top>=Math.min(n.bottom,r.bottom)||h.right<Math.max(n.left,r.left)-.1||h.left>Math.min(n.right,r.right)+.1){c.style.top=Ql;continue}let d=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,g=f.right-f.left,m=(e=gT.get(u))!==null&&e!==void 0?e:f.bottom-f.top,b=u.offset||Nue,x=this.view.textDirection==Ct.LTR,C=f.width>r.right-r.left?x?r.left:r.right-f.width:x?Math.min(h.left-(d?14:0)+b.x,r.right-g):Math.max(r.left,h.left-g+(d?14:0)-b.x),S=this.above[a];!l.strictSide&&(S?h.top-(f.bottom-f.top)-b.y<r.top:h.bottom+(f.bottom-f.top)+b.y>r.bottom)&&S==r.bottom-h.bottom>h.top-r.top&&(S=this.above[a]=!S);let w=(S?h.top-r.top:r.bottom-h.bottom)-p;if(w<m&&u.resize!==!1){if(w<this.view.defaultLineHeight){c.style.top=Ql;continue}gT.set(u,m),c.style.height=(m=w)/o+"px"}else c.style.height&&(c.style.height="");let k=S?h.top-m-p-b.y:h.bottom+p+b.y,T=C+g;if(u.overlap!==!0)for(let O of s)O.left<T&&O.right>C&&O.top<k+m&&O.bottom>k&&(k=S?O.top-m-2-p:O.bottom+p+2);if(this.position=="absolute"?(c.style.top=(k-t.parent.top)/o+"px",c.style.left=(C-t.parent.left)/i+"px"):(c.style.top=k/o+"px",c.style.left=C/i+"px"),d){let O=h.left+(x?b.x:-b.x)-(C+14-7);d.style.left=O/i+"px"}u.overlap!==!0&&s.push({left:C,top:k,right:T,bottom:k+m}),c.classList.toggle("cm-tooltip-above",S),c.classList.toggle("cm-tooltip-below",!S),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Ql}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Bue=oe.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Nue={x:0,y:0},a1=he.define({enables:[mT,Bue]}),yf=he.define();class l1{static create(e){return new l1(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new pT(e,yf,n=>this.createHostedView(n))}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const jue=a1.compute([yf],t=>{let e=t.facet(yf).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.filter(n=>n.end!=null).map(n=>n.end)),create:l1.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class Vue{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof Mi)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(c=>c.from<=i&&c.to>=i),u=l&&l.dir==Ct.RTL?-1:1;o=n.x<a.left?-u:u}let s=this.source(e,i,o);if(s!=null&&s.then){let a=this.pending={pos:i};s.then(l=>{this.pending==a&&(this.pending=null,l&&e.dispatch({effects:this.setHover.of(l)}))},l=>Hn(e.state,l,"hover tooltip"))}else s&&e.dispatch({effects:this.setHover.of(s)})}mousemove(e){var n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let r=this.active;if(r&&!vT(this.lastMove.target)||this.pending){let{pos:i}=r||this.pending,o=(n=r==null?void 0:r.end)!==null&&n!==void 0?n:i;(i==o?this.view.posAtCoords(this.lastMove)!=i:!zue(this.view,i,o,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!vT(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function vT(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function zue(t,e,n,r,i,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.right<r||s.top>i||Math.min(s.bottom,a)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function Wue(t,e={}){let n=De.define(),r=Xt.define({create(){return null},update(i,o){if(i&&(e.hideOnChange&&(o.docChanged||o.selection)||e.hideOn&&e.hideOn(o,i)))return null;if(i&&o.docChanged){let s=o.changes.mapPos(i.pos,-1,ln.TrackDel);if(s==null)return null;let a=Object.assign(Object.create(null),i);a.pos=s,i.end!=null&&(a.end=o.changes.mapPos(i.end)),i=a}for(let s of o.effects)s.is(n)&&(i=s.value),s.is(Hue)&&(i=null);return i},provide:i=>yf.from(i)});return[r,Lt.define(i=>new Vue(i,t,r,n,e.hoverTime||300)),jue]}function yT(t,e){let n=t.plugin(mT);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const Hue=De.define(),bT=he.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Jl(t,e){let n=t.plugin(xT),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const xT=Lt.fromClass(class{constructor(t){this.input=t.state.facet(eu),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(bT);this.top=new bf(t,!0,e.topContainer),this.bottom=new bf(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(bT);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new bf(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new bf(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(eu);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],s=[],a=[];for(let l of r){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),a.push(c)):(c=this.panels[u],c.update&&c.update(t)),i.push(c),(c.top?o:s).push(c)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(s);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>oe.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class bf{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=wT(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=wT(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function wT(t){let e=t.nextSibling;return t.remove(),e}const eu=he.define({enables:xT});class Kr extends Co{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Kr.prototype.elementClass="",Kr.prototype.toDOM=void 0,Kr.prototype.mapMode=ln.TrackBefore,Kr.prototype.startSide=Kr.prototype.endSide=-1,Kr.prototype.point=!0;const xf=he.define(),que={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>tt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},tu=he.define();function Uue(t){return[CT(),tu.of(Object.assign(Object.assign({},que),t))]}const u1=he.define({combine:t=>t.some(e=>e)});function CT(t){let e=[Yue];return t&&t.fixed===!1&&e.push(u1.of(!0)),e}const Yue=Lt.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(tu).map(e=>new kT(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(u1),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(u1)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=tt.iter(this.view.state.facet(xf),this.view.viewport.from),r=[],i=this.gutters.map(o=>new Gue(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==un.Text&&s){c1(n,r,a.from);for(let l of i)l.line(this.view,a,r);s=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(o.type==un.Text){c1(n,r,o.from);for(let s of i)s.line(this.view,o,r)}else if(o.widget)for(let s of i)s.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(tu),n=t.state.facet(tu),r=t.docChanged||t.heightChanged||t.viewportChanged||!tt.eq(t.startState.facet(xf),t.state.facet(xf),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let s=e.indexOf(o);s<0?i.push(new kT(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>oe.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==Ct.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function ST(t){return Array.isArray(t)?t:[t]}function c1(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class Gue{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=tt.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==i.elements.length){let a=new TT(e,s,o,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,s,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];c1(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let s=this.gutter;i.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n);r&&this.addElement(e,n,[r])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class kT{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();s=(l.top+l.bottom)/2}else s=i.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=ST(n.markers(e)),n.initialSpacer&&(this.spacer=new TT(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=ST(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!tt.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class TT{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),Kue(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let a=s,l=o<n.length?n[o++]:null,u=!1;if(l){let c=l.elementClass;c&&(r+=" "+c);for(let h=s;h<this.markers.length;h++)if(this.markers[h].compare(l)){a=h,u=!0;break}}else a=this.markers.length;for(;s<a;){let c=this.markers[s++];if(c.toDOM){c.destroy(i);let h=i.nextSibling;i.remove(),i=h}}if(!l)break;l.toDOM&&(u?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),u&&s++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function Kue(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const Xue=he.define(),Js=he.define({combine(t){return br(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],s=n[i];r[i]=o?(a,l,u)=>o(a,l,u)||s(a,l,u):s}return r}})}});class h1 extends Kr{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function f1(t,e){return t.state.facet(Js).formatNumber(e,t.state)}const Zue=tu.compute([Js],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Xue)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new h1(f1(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Js)!=e.state.facet(Js),initialSpacer(e){return new h1(f1(e,ET(e.state.doc.lines)))},updateSpacer(e,n){let r=f1(n.view,ET(n.view.state.doc.lines));return r==e.number?e:new h1(r)},domEventHandlers:t.facet(Js).domEventHandlers}));function Que(t={}){return[Js.of(t),CT(),Zue]}function ET(t){let e=9;for(;e<t;)e=e*10+9;return e}const Jue=new class extends Kr{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},ece=xf.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(Jue.range(i)))}return tt.of(e)});function tce(){return ece}let nce=0;class Cr{constructor(e,n,r){this.set=e,this.base=n,this.modified=r,this.id=nce++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Cr([],null,[]);if(n.set.push(n),e)for(let r of e.set)n.set.push(r);return n}static defineModifier(){let e=new wf;return n=>n.modified.indexOf(e)>-1?n:wf.get(n.base||n,n.modified.concat(e).sort((r,i)=>r.id-i.id))}}let rce=0;class wf{constructor(){this.instances=[],this.id=rce++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&ice(n,a.modified));if(r)return r;let i=[],o=new Cr(i,e,n);for(let a of n)a.instances.push(o);let s=oce(n);for(let a of e.set)if(!a.modified.length)for(let l of s)i.push(wf.get(a,l));return o}}function ice(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function oce(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function MT(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let h=0;;){if(a=="..."&&h>0&&h+3==i.length){s=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!f)throw new RangeError("Invalid path: "+i);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==i.length)break;let d=i[h++];if(h==i.length&&d=="!"){s=0;break}if(d!="/")throw new RangeError("Invalid path: "+i);a=i.slice(h)}let l=o.length-1,u=o[l];if(!u)throw new RangeError("Invalid path: "+i);let c=new Cf(r,s,l>0?o.slice(0,l):null);e[u]=c.sort(e[u])}}return OT.add(e)}const OT=new Fe;class Cf{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Cf.empty=new Cf([],2,null);function AT(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let l of a.set){let u=n[l.id];if(u){s=s?s+" "+u:u;break}}return s},scope:r}}function sce(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function ace(t,e,n,r=0,i=t.length){let o=new lce(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class lce{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:s,from:a,to:l}=e;if(a>=r||l<=n)return;s.isTop&&(o=this.highlighters.filter(d=>!d.scope||d.scope(s)));let u=i,c=uce(e)||Cf.empty,h=sce(o,c.tags);if(h&&(u&&(u+=" "),u+=h,c.mode==1&&(i+=(i?" ":"")+h)),this.startSpan(Math.max(n,a),u),c.opaque)return;let f=e.tree&&e.tree.prop(Fe.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+a,1),p=this.highlighters.filter(m=>!m.scope||m.scope(f.tree.type)),g=e.firstChild();for(let m=0,b=a;;m++){let x=m<f.overlay.length?f.overlay[m]:null,C=x?x.from+a:l,S=Math.max(n,b),w=Math.min(r,C);if(S<w&&g)for(;e.from<w&&(this.highlightRange(e,S,w,i,o),this.startSpan(Math.min(w,e.to),u),!(e.to>=C||!e.nextSibling())););if(!x||C>r)break;b=x.to+a,b>n&&(this.highlightRange(d.cursor(),Math.max(n,x.from+a),Math.min(r,b),"",p),this.startSpan(Math.min(r,b),u))}g&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function uce(t){let e=t.type.prop(OT);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Z=Cr.define,Sf=Z(),_i=Z(),PT=Z(_i),DT=Z(_i),Ii=Z(),kf=Z(Ii),d1=Z(Ii),Sr=Z(),ko=Z(Sr),kr=Z(),Tr=Z(),p1=Z(),nu=Z(p1),Tf=Z(),I={comment:Sf,lineComment:Z(Sf),blockComment:Z(Sf),docComment:Z(Sf),name:_i,variableName:Z(_i),typeName:PT,tagName:Z(PT),propertyName:DT,attributeName:Z(DT),className:Z(_i),labelName:Z(_i),namespace:Z(_i),macroName:Z(_i),literal:Ii,string:kf,docString:Z(kf),character:Z(kf),attributeValue:Z(kf),number:d1,integer:Z(d1),float:Z(d1),bool:Z(Ii),regexp:Z(Ii),escape:Z(Ii),color:Z(Ii),url:Z(Ii),keyword:kr,self:Z(kr),null:Z(kr),atom:Z(kr),unit:Z(kr),modifier:Z(kr),operatorKeyword:Z(kr),controlKeyword:Z(kr),definitionKeyword:Z(kr),moduleKeyword:Z(kr),operator:Tr,derefOperator:Z(Tr),arithmeticOperator:Z(Tr),logicOperator:Z(Tr),bitwiseOperator:Z(Tr),compareOperator:Z(Tr),updateOperator:Z(Tr),definitionOperator:Z(Tr),typeOperator:Z(Tr),controlOperator:Z(Tr),punctuation:p1,separator:Z(p1),bracket:nu,angleBracket:Z(nu),squareBracket:Z(nu),paren:Z(nu),brace:Z(nu),content:Sr,heading:ko,heading1:Z(ko),heading2:Z(ko),heading3:Z(ko),heading4:Z(ko),heading5:Z(ko),heading6:Z(ko),contentSeparator:Z(Sr),list:Z(Sr),quote:Z(Sr),emphasis:Z(Sr),strong:Z(Sr),link:Z(Sr),monospace:Z(Sr),strikethrough:Z(Sr),inserted:Z(),deleted:Z(),changed:Z(),invalid:Z(),meta:Tf,documentMeta:Z(Tf),annotation:Z(Tf),processingInstruction:Z(Tf),definition:Cr.defineModifier(),constant:Cr.defineModifier(),function:Cr.defineModifier(),standard:Cr.defineModifier(),local:Cr.defineModifier(),special:Cr.defineModifier()};AT([{tag:I.link,class:"tok-link"},{tag:I.heading,class:"tok-heading"},{tag:I.emphasis,class:"tok-emphasis"},{tag:I.strong,class:"tok-strong"},{tag:I.keyword,class:"tok-keyword"},{tag:I.atom,class:"tok-atom"},{tag:I.bool,class:"tok-bool"},{tag:I.url,class:"tok-url"},{tag:I.labelName,class:"tok-labelName"},{tag:I.inserted,class:"tok-inserted"},{tag:I.deleted,class:"tok-deleted"},{tag:I.literal,class:"tok-literal"},{tag:I.string,class:"tok-string"},{tag:I.number,class:"tok-number"},{tag:[I.regexp,I.escape,I.special(I.string)],class:"tok-string2"},{tag:I.variableName,class:"tok-variableName"},{tag:I.local(I.variableName),class:"tok-variableName tok-local"},{tag:I.definition(I.variableName),class:"tok-variableName tok-definition"},{tag:I.special(I.variableName),class:"tok-variableName2"},{tag:I.definition(I.propertyName),class:"tok-propertyName tok-definition"},{tag:I.typeName,class:"tok-typeName"},{tag:I.namespace,class:"tok-namespace"},{tag:I.className,class:"tok-className"},{tag:I.macroName,class:"tok-macroName"},{tag:I.propertyName,class:"tok-propertyName"},{tag:I.operator,class:"tok-operator"},{tag:I.comment,class:"tok-comment"},{tag:I.meta,class:"tok-meta"},{tag:I.invalid,class:"tok-invalid"},{tag:I.punctuation,class:"tok-punctuation"}]);var g1;const ea=new Fe;function cce(t){return he.define({combine:t?e=>e.concat(t):void 0})}const hce=new Fe;class ir{constructor(e,n,r=[],i=""){this.data=e,this.name=i,je.prototype.hasOwnProperty("tree")||Object.defineProperty(je.prototype,"tree",{get(){return Gt(this)}}),this.parser=n,this.extension=[$i.of(this),je.languageData.of((o,s,a)=>{let l=_T(o,s,a),u=l.type.prop(ea);if(!u)return[];let c=o.facet(u),h=l.type.prop(hce);if(h){let f=l.resolve(s-l.from,a);for(let d of h)if(d.test(f,o)){let p=o.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return _T(e,n,r).type.prop(ea)==this.data}findRegions(e){let n=e.facet($i);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,s)=>{if(o.prop(ea)==this.data){r.push({from:s,to:s+o.length});return}let a=o.prop(Fe.mounted);if(a){if(a.tree.prop(ea)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+s,to:l.to+s});else r.push({from:s,to:s+o.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+s),r.length>l)return}}for(let l=0;l<o.children.length;l++){let u=o.children[l];u instanceof Nt&&i(u,o.positions[l]+s)}};return i(Gt(e),0),r}get allowsNesting(){return!0}}ir.setState=De.define();function _T(t,e,n){let r=t.facet($i),i=Gt(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,Yt.ExcludeBuffers))o.type.isTop&&(i=o);return i}class Ef extends ir{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=cce(e.languageData);return new Ef(n,e.parser.configure({props:[ea.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new Ef(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Gt(t){let e=t.field(ir.state,!1);return e?e.tree:Nt.empty}class fce{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let ru=null;class Mf{constructor(e,n,r=[],i,o,s,a,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Mf(e,n,[],Nt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new fce(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Nt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(bo.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(bo.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=ru;ru=this;try{return e()}finally{ru=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=IT(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,h,f)=>l.push({fromA:u,toA:c,fromB:h,toB:f})),r=bo.applyChanges(r,l),i=Nt.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),h=e.mapPos(u.to,-1);c<h&&a.push({from:c,to:h})}}}return new Mf(this.parser,n,r,i,o,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=IT(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Q5{createParse(n,r,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let l=ru;if(l){for(let u of i)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=s,new Nt(yn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return ru}}function IT(t,e,n){return bo.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class ta{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new ta(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Mf.create(e.facet($i).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new ta(r)}}ir.state=Xt.define({create:ta.init,update(t,e){for(let n of e.effects)if(n.is(ir.setState))return n.value;return e.startState.facet($i)!=e.state.facet($i)?ta.init(e.state):t.apply(e)}});let $T=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&($T=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const m1=typeof navigator<"u"&&(!((g1=navigator.scheduling)===null||g1===void 0)&&g1.isInputPending)?()=>navigator.scheduling.isInputPending():null,dce=Lt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(ir.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(ir.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=$T(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(ir.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!m1?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<i&&r.doc.length>i+1e3,l=o.context.work(()=>m1&&m1()||Date.now()>s,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:ir.setState.of(new ta(o.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Hn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),$i=he.define({combine(t){return t.length?t[0]:null},enables:t=>[ir.state,dce,oe.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class pce{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const gce=he.define(),Of=he.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Af(t){let e=t.facet(Of);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function iu(t,e){let n="",r=t.tabSize,i=t.facet(Of)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function v1(t,e){t instanceof je&&(t=new Pf(t));for(let r of t.state.facet(gce)){let i=r(t,e);if(i!==void 0)return i}let n=Gt(t.state);return n.length>=e?mce(t,n,e):null}class Pf{constructor(e,n={}){this.state=e,this.options=n,this.unit=Af(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Ys(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const FT=new Fe;function mce(t,e,n){let r=e.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let s=i;s!=r.node;s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)r={node:o[s],next:r}}return LT(r,t,n)}function LT(t,e,n){for(let r=t;r;r=r.next){let i=yce(r.node);if(i)return i(y1.create(e,n,r))}return 0}function vce(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function yce(t){let e=t.type.prop(FT);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Fe.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return s=>Cce(s,!0,1,void 0,o&&!vce(s)?i.from:void 0)}return t.parent==null?bce:null}function bce(){return 0}class y1 extends Pf{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new y1(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(xce(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return LT(this.context.next,this.base,this.pos)}}function xce(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function wce(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped)return l.from<s?n:null;a=l.to}}function Cce(t,e,n,r,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==t.pos+s,l=e?wce(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}function Sce({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const kce=200;function Tce(){return je.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+kce)return t;let o=n.sliceString(i.from,r);if(!e.some(u=>u.test(o)))return t;let{state:s}=t,a=-1,l=[];for(let{head:u}of s.selection.ranges){let c=s.doc.lineAt(u);if(c.from==a)continue;a=c.from;let h=v1(s,c.from);if(h==null)continue;let f=/^\s*/.exec(c.text)[0],d=iu(s,h);f!=d&&l.push({from:c.from,to:c.from+f.length,insert:d})}return l.length?[t,{changes:l,sequential:!0}]:t})}const Ece=he.define(),RT=new Fe;function Mce(t,e,n){let r=Gt(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let s=i;s;s=s.next){let a=s.node;if(a.to<=n||a.from>n)continue;if(o&&a.from<e)break;let l=a.type.prop(RT);if(l&&(a.to<r.length-50||r.length==t.doc.length||!Oce(a))){let u=l(a,t);u&&u.from<=n&&u.from>=e&&u.to>n&&(o=u)}}return o}function Oce(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Df(t,e,n){for(let r of t.facet(Ece)){let i=r(t,e,n);if(i)return i}return Mce(t,e,n)}function BT(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const _f=De.define({map:BT}),ou=De.define({map:BT});function NT(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const To=Xt.define({create(){return ke.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(_f)&&!Ace(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(b1),i=r?ke.replace({widget:new $ce(r(e.state,n.value))}):HT;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(ou)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>oe.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(HT.range(r,i))}return ke.set(e,!0)}});function If(t,e,n){var r;let i=null;return(r=t.field(To,!1))===null||r===void 0||r.between(e,n,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function Ace(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function jT(t,e){return t.field(To,!1)?e:e.concat(De.appendConfig.of(zT()))}const Pce=t=>{for(let e of NT(t)){let n=Df(t.state,e.from,e.to);if(n)return t.dispatch({effects:jT(t.state,[_f.of(n),VT(t,n)])}),!0}return!1},Dce=t=>{if(!t.state.field(To,!1))return!1;let e=[];for(let n of NT(t)){let r=If(t.state,n.from,n.to);r&&e.push(ou.of(r),VT(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function VT(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return oe.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const _ce=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Pce},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Dce},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=Df(e,i.from,i.to);o&&n.push(_f.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:jT(t.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(To,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(ou.of({from:r,to:i}))}),t.dispatch({effects:n}),!0}}],Ice={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},b1=he.define({combine(t){return br(t,Ice)}});function zT(t){let e=[To,Rce];return t&&e.push(b1.of(t)),e}function WT(t,e){let{state:n}=t,r=n.facet(b1),i=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),l=If(t.state,a.from,a.to);l&&t.dispatch({effects:ou.of(l)}),s.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const HT=ke.replace({widget:new class extends Gr{toDOM(t){return WT(t,null)}}});class $ce extends Gr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return WT(e,this.value)}}const Fce={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class x1 extends Kr{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Lce(t={}){let e=Object.assign(Object.assign({},Fce),t),n=new x1(e,!0),r=new x1(e,!1),i=Lt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet($i)!=s.state.facet($i)||s.startState.field(To,!1)!=s.state.field(To,!1)||Gt(s.startState)!=Gt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new ki;for(let l of s.viewportLineBlocks){let u=If(s.state,l.from,l.to)?r:Df(s.state,l.from,l.to)?n:null;u&&a.add(l.from,l.from,u)}return a.finish()}}),{domEventHandlers:o}=e;return[i,Uue({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(i))===null||a===void 0?void 0:a.markers)||tt.empty},initialSpacer(){return new x1(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,a,l)=>{if(o.click&&o.click(s,a,l))return!0;let u=If(s.state,a.from,a.to);if(u)return s.dispatch({effects:ou.of(u)}),!0;let c=Df(s.state,a.from,a.to);return c?(s.dispatch({effects:_f.of(c)}),!0):!1}})}),zT()]}const Rce=oe.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class su{constructor(e,n){this.specs=e;let r;function i(a){let l=Ti.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof ir?a=>a.prop(ea)==s.data:s?a=>a==s:void 0,this.style=AT(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=r?new Ti(r):null,this.themeType=n.themeType}static define(e,n){return new su(e,n||{})}}const w1=he.define(),qT=he.define({combine(t){return t.length?[t[0]]:null}});function C1(t){let e=t.facet(w1);return e.length?e:t.facet(qT)}function UT(t,e){let n=[Nce],r;return t instanceof su&&(t.module&&n.push(oe.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(qT.of(t)):r?n.push(w1.computeN([oe.darkTheme],i=>i.facet(oe.darkTheme)==(r=="dark")?[t]:[])):n.push(w1.of(t)),n}class Bce{constructor(e){this.markCache=Object.create(null),this.tree=Gt(e.state),this.decorations=this.buildDeco(e,C1(e.state))}update(e){let n=Gt(e.state),r=C1(e.state),i=r!=C1(e.startState);n.length<e.view.viewport.to&&!i&&n.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r))}buildDeco(e,n){if(!n||!this.tree.length)return ke.none;let r=new ki;for(let{from:i,to:o}of e.visibleRanges)ace(this.tree,n,(s,a,l)=>{r.add(s,a,this.markCache[l]||(this.markCache[l]=ke.mark({class:l})))},i,o);return r.finish()}}const Nce=qs.high(Lt.fromClass(Bce,{decorations:t=>t.decorations})),jce=su.define([{tag:I.meta,color:"#404740"},{tag:I.link,textDecoration:"underline"},{tag:I.heading,textDecoration:"underline",fontWeight:"bold"},{tag:I.emphasis,fontStyle:"italic"},{tag:I.strong,fontWeight:"bold"},{tag:I.strikethrough,textDecoration:"line-through"},{tag:I.keyword,color:"#708"},{tag:[I.atom,I.bool,I.url,I.contentSeparator,I.labelName],color:"#219"},{tag:[I.literal,I.inserted],color:"#164"},{tag:[I.string,I.deleted],color:"#a11"},{tag:[I.regexp,I.escape,I.special(I.string)],color:"#e40"},{tag:I.definition(I.variableName),color:"#00f"},{tag:I.local(I.variableName),color:"#30a"},{tag:[I.typeName,I.namespace],color:"#085"},{tag:I.className,color:"#167"},{tag:[I.special(I.variableName),I.macroName],color:"#256"},{tag:I.definition(I.propertyName),color:"#00c"},{tag:I.comment,color:"#940"},{tag:I.invalid,color:"#f00"}]),Vce=oe.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),YT=1e4,GT="()[]{}",KT=he.define({combine(t){return br(t,{afterCursor:!0,brackets:GT,maxScanDistance:YT,renderMatch:Hce})}}),zce=ke.mark({class:"cm-matchingBracket"}),Wce=ke.mark({class:"cm-nonmatchingBracket"});function Hce(t){let e=[],n=t.matched?zce:Wce;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const qce=[Xt.define({create(){return ke.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(KT);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=Er(e.state,i.head,-1,r)||i.head>0&&Er(e.state,i.head-1,1,r)||r.afterCursor&&(Er(e.state,i.head,1,r)||i.head<e.state.doc.length&&Er(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return ke.set(n,!0)},provide:t=>oe.decorations.from(t)}),Vce];function Uce(t={}){return[KT.of(t),qce]}const Yce=new Fe;function S1(t,e,n){let r=t.prop(e<0?Fe.openedBy:Fe.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function k1(t){let e=t.type.prop(Yce);return e?e(t.node):t}function Er(t,e,n,r={}){let i=r.maxScanDistance||YT,o=r.brackets||GT,s=Gt(t),a=s.resolveInner(e,n);for(let l=a;l;l=l.parent){let u=S1(l.type,n,o);if(u&&l.from<l.to){let c=k1(l);if(c&&(n>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return Gce(t,e,n,l,c,u,o)}}return Kce(t,e,n,s,a.type,i,o)}function Gce(t,e,n,r,i,o,s){let a=r.parent,l={from:i.from,to:i.to},u=0,c=a==null?void 0:a.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(u==0&&o.indexOf(c.type.name)>-1&&c.from<c.to){let h=k1(c);return{start:l,end:h?{from:h.from,to:h.to}:void 0,matched:!0}}else if(S1(c.type,n,s))u++;else if(S1(c.type,-n,s)){if(u==0){let h=k1(c);return{start:l,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}u--}}while(n<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}function Kce(t,e,n,r,i,o,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let f=0;!c.next().done&&f<=o;){let d=c.value;n<0&&(f+=d.length);let p=e+f*n;for(let g=n>0?0:d.length-1,m=n>0?d.length:-1;g!=m;g+=n){let b=s.indexOf(d[g]);if(!(b<0||r.resolveInner(p+g,1).type!=i))if(b%2==0==n>0)h++;else{if(h==1)return{start:u,end:{from:p+g,to:p+g+1},matched:b>>1==l>>1};h--}}n>0&&(f+=d.length)}return c.done?{start:u,matched:!1}:null}const Xce=Object.create(null),XT=[yn.none],ZT=[],Zce=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Zce[t]=Qce(Xce,e);function T1(t,e){ZT.indexOf(t)>-1||(ZT.push(t),console.warn(e))}function Qce(t,e){let n=[];for(let o of e.split(" ")){let s=[];for(let a of o.split(".")){let l=t[a]||I[a];l?typeof l=="function"?s.length?s=s.map(l):T1(a,`Modifier ${a} used at start of tag`):s.length?T1(a,`Tag ${a} used as modifier`):s=Array.isArray(l)?l:[l]:T1(a,`Unknown highlighting tag ${a}`)}for(let a of s)n.push(a)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=yn.define({id:XT.length,name:r,props:[MT({[r]:n})]});return XT.push(i),i.id}class $f{constructor(e,n,r,i,o,s,a,l,u,c=0,h){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=h}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new $f(e,[],n,r,r,0,[],0,i?new QT(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,s=o.dynamicPrecedence(i);if(s&&(this.score+=s),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,4,!0),this.reduceContext(i,this.reducePos);return}let a=this.stack.length-(r-1)*3-(e&262144?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from,u=this.reducePos-l;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=u));let c=a?this.stack[a-1]:0,h=this.bufferBase+this.buffer.length-c;if(i<o.minRepeatTerm||e&131072){let f=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,l,f,h+4,!0)}if(e&262144)this.state=this.stack[a];else{let f=this.stack[a-3];this.state=o.getGoto(f,i,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(i,l)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==r)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new $f(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Jce(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((a,l)=>l&1&&a==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let l=s&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return a<<19|65536|l}}else{let a=r(s,o+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new QT(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class QT{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Jce{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Ff{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Ff(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Ff(this.stack,this.pos,this.index)}}function Lf(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class Rf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const JT=new Rf;class ehe{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=JT,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=JT,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class na{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;nhe(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}na.prototype.contextual=na.prototype.fallback=na.prototype.extend=!1,na.prototype.fallback=na.prototype.extend=!1;class the{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function nhe(t,e,n,r,i,o){let s=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;a&t[s];){let u=t[s+1];for(let d=s+3;d<u;d+=2)if((t[d+1]&a)>0){let p=t[d];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||rhe(p,e.token.value,i,o))){e.acceptToken(p);break}}let c=e.next,h=0,f=t[s+2];if(e.next<0&&f>h&&t[u+f*3-3]==65535){s=t[u+f*3-1];continue e}for(;h<f;){let d=h+f>>1,p=u+d+(d<<1),g=t[p],m=t[p+1]||65536;if(c<g)f=d;else if(c>=m)h=d+1;else{s=t[p+2],e.advance();continue e}}break}}function eE(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function rhe(t,e,n,r){let i=eE(n,r,e);return i<0||eE(n,r,t)<i}const In=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let E1=null;function tE(t,e,n){let r=t.cursor(Yt.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class ihe{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?tE(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?tE(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof Nt){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let l=o.prop(Fe.lookAhead);if(!l||a+l<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}}class ohe{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Rf)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let u=0;u<o.length;u++){if(!(1<<u&s))continue;let c=o[u],h=this.tokens[u];if(!(r&&!c.fallback)&&((c.contextual||h.start!=e.pos||h.mask!=s||h.context!=a)&&(this.updateCachedToken(h,c,e),h.mask=s,h.context=a),h.lookAhead>h.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let f=n;if(h.extended>-1&&(n=this.addActions(e,h.extended,h.end,n)),n=this.addActions(e,h.value,h.end,n),!c.extend&&(r=h,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new Rf,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Rf,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let l=0;l<2;l++)for(let u=s.stateSlot(o,l?2:1);;u+=3){if(a[u]==65535)if(a[u+1]==1)u=Xr(a,u+2);else{i==0&&a[u+1]==2&&(i=this.putAction(Xr(a,u+2),n,r,i));break}a[u]==n&&(i=this.putAction(Xr(a,u+1),n,r,i))}return i}}class she{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new ehe(n,i),this.tokens=new ohe(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[$f.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new ihe(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],o=[]),i.push(a);let l=this.tokens.getMainToken(a);o.push(l.value,l.end)}}break}}if(!r.length){let s=i&&lhe(i);if(s)return In&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw In&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return In&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((a,l)=>l.score-a.score);r.length>s;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let a=r[s];for(let l=s+1;l<r.length;l++){let u=r[l];if(a.sameState(u)||a.buffer.length>500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)r.splice(l--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,s=In?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let h=this.fragments.nodeAt(i);h;){let f=this.parser.nodeSet.types[h.type.id]==h.type?o.getGoto(e.state,h.type.id):-1;if(f>-1&&h.length&&(!u||(h.prop(Fe.contextHash)||0)==c))return e.useNode(h,f),In&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(h.type.id)})`),!0;if(!(h instanceof Nt)||h.children.length==0||h.positions[0]>0)break;let d=h.children[0];if(d instanceof Nt&&h.positions[0]==0)h=d;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),In&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;u<l.length;){let c=l[u++],h=l[u++],f=l[u++],d=u==l.length||!r,p=d?e:e.split(),g=this.tokens.mainToken;if(p.apply(c,h,g?g.start:p.pos,f),In&&console.log(s+this.stackID(p)+` (via ${c&65536?`reduce of ${o.getName(c&65535)}`:"shift"} for ${o.getName(h)} @ ${i}${p==e?"":", split"})`),d)return!0;p.pos>i?n.push(p):r.push(p)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return nE(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],l=n[s<<1],u=n[(s<<1)+1],c=In?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),In&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let h=a.split(),f=c;for(let d=0;h.forceReduce()&&d<10&&(In&&console.log(f+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,r));d++)In&&(f=this.stackID(h)+" -> ");for(let d of a.recoverByInsert(l))In&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,r);this.stream.end>a.pos?(u==a.pos&&(u++,l=0),a.recoverByDelete(l,u),In&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),nE(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),Nt.build({buffer:Ff.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(E1||(E1=new WeakMap)).get(e);return n||E1.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function nE(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class ahe{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}class Bf extends Q5{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function o(a,l,u){i[a].push([l,l.deserialize(String(u))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Fe[l]);for(let u=1;u<a.length;){let c=a[u++];if(c>=0)o(c,l,a[u++]);else{let h=a[u+-c];for(let f=-c;f>0;f--)o(a[u++],l,h);u++}}}this.nodeSet=new om(n.map((a,l)=>yn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=q5;let s=Lf(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(rE),this.states=Lf(e.states,Uint32Array),this.data=Lf(e.stateData),this.goto=Lf(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new na(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new she(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],a=s&1,l=i[o++];if(a&&r)return l;for(let u=o+(s>>1);o<u;o++)if(i[o]==e)return l;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=Xr(r,o+2)];else{if(r[o+1]==2)return Xr(r,o+2);break}if(s==n||s==0)return Xr(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Xr(this.data,o+2);else break;i=n(Xr(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Xr(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Bf.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(a=>a.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=rE(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],a;(a=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new ahe(e,r,i)}static deserialize(e){return new Bf(e)}}function Xr(t,e){return t[e]|t[e+1]<<16}function lhe(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function rE(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}class iE{constructor(e,n,r){this.state=e,this.pos=n,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let n=Gt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(lE(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function oE(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function uhe(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=oE(e)+oE(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function sE(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:uhe(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function che(t,e){return n=>{for(let r=Gt(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class aE{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function Fi(t){return t.selection.main.from}function lE(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const hhe=yr.define();function fhe(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(a=>a!=i&&n!=r&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(n,r)?{range:a}:{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:e},range:L.cursor(a.from+o+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const uE=new WeakMap;function dhe(t){if(!Array.isArray(t))return t;let e=uE.get(t);return e||uE.set(t,e=sE(t)),e}const M1=De.define(),au=De.define();class phe{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=Kt(e,n),i=Wn(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(Kt(s==o?o.toLowerCase():s,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,!0}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return!1;let{chars:n,folded:r,any:i,precise:o,byWord:s}=this;if(n.length==1){let x=Kt(e,0),C=Wn(x),S=C==e.length?0:-100;if(x!=n[0])if(x==r[0])S+=-200;else return!1;return this.ret(S,[0,C])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,u=0;if(a<0){for(let x=0,C=Math.min(e.length,200);x<C&&u<l;){let S=Kt(e,x);(S==n[u]||S==r[u])&&(i[u++]=x),x+=Wn(S)}if(u<l)return!1}let c=0,h=0,f=!1,d=0,p=-1,g=-1,m=/[a-z]/.test(e),b=!0;for(let x=0,C=Math.min(e.length,200),S=0;x<C&&h<l;){let w=Kt(e,x);a<0&&(c<l&&w==n[c]&&(o[c++]=x),d<l&&(w==n[d]||w==r[d]?(d==0&&(p=x),g=x+1,d++):d=0));let k,T=w<255?w>=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(k=hm(w))!=k.toLowerCase()?1:k!=k.toUpperCase()?2:0;(!x||T==1&&m||S==0&&T!=0)&&(n[h]==w||r[h]==w&&(f=!0)?s[h++]=x:s.length&&(b=!1)),S=T,x+=Wn(w)}return h==l&&s[0]==0&&b?this.result(-100+(f?-200:0),s,e):d==l&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):d==l?this.ret(-200+-700-e.length,[p,g]):h==l?this.result(-100+(f?-200:0)+-700+(b?0:-1100),s,e):n.length==2?!1:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let a=s+(this.astral?Wn(Kt(r,s)):1);o&&i[o-1]==s?i[o-1]=a:(i[o++]=s,i[o++]=a)}return this.ret(e-r.length,i)}}const on=he.define({combine(t){return br(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:ghe,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>cE(e(r),n(r)),optionClass:(e,n)=>r=>cE(e(r),n(r)),addToOptions:(e,n)=>e.concat(n)})}});function cE(t,e){return t?e?t+" "+e:t:e}function ghe(t,e,n,r,i,o){let s=t.textDirection==Ct.RTL,a=s,l=!1,u="top",c,h,f=e.left-i.left,d=i.right-e.right,p=r.right-r.left,g=r.bottom-r.top;if(a&&f<Math.min(p,d)?a=!1:!a&&d<Math.min(p,f)&&(a=!0),p<=(a?f:d))c=Math.max(i.top,Math.min(n.top,i.bottom-g))-e.top,h=Math.min(400,a?f:d);else{l=!0,h=Math.min(400,(s?e.right:i.right-e.left)-30);let x=i.bottom-e.bottom;x>=g||x>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let m=(e.bottom-e.top)/o.offsetHeight,b=(e.right-e.left)/o.offsetWidth;return{style:`${u}: ${c/m}px; max-width: ${h/b}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}function mhe(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let u=0;u<o.length;){let c=o[u++],h=o[u++];c>l&&s.appendChild(document.createTextNode(a.slice(l,c)));let f=s.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(a.slice(c,h))),f.className="cm-completionMatchedText",l=h}return l<a.length&&s.appendChild(document.createTextNode(a.slice(l))),s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function O1(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class vhe{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:s}=i.open,a=e.state.facet(on);this.optionContent=mhe(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=O1(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,h;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(h=/-(\d+)$/.exec(c.id))&&+h[1]<u.length){this.applyCompletion(e,u[+h[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(on).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:au.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:s,disabled:a}=r.open;(!i.open||i.open.options!=o)&&(this.range=O1(o.length,s,e.state.facet(on).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),a!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=O1(n.options.length,n.selected,this.view.state.facet(on).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>Hn(this.view.state,s,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&bhe(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(on).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let s=r.from;s<r.to;s++){let{completion:a,match:l}=e[s],{section:u}=a;if(u){let f=typeof u=="string"?u:u.name;if(f!=o&&(s>r.from||r.from==0))if(o=f,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let d=i.appendChild(document.createElement("completion-section"));d.textContent=f}}const c=i.appendChild(document.createElement("li"));c.id=n+"-"+s,c.setAttribute("role","option");let h=this.optionClass(a);h&&(c.className=h);for(let f of this.optionContent){let d=f(a,this.view.state,this.view,l);d&&c.appendChild(d)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function yhe(t,e){return n=>new vhe(n,t,e)}function bhe(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function hE(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function xhe(t,e){let n=[],r=null,i=l=>{n.push(l);let{section:u}=l.completion;if(u){r||(r=[]);let c=typeof u=="string"?u:u.name;r.some(h=>h.name==c)||r.push(typeof u=="string"?{name:c}:u)}};for(let l of t)if(l.hasResult()){let u=l.result.getMatch;if(l.result.filter===!1)for(let c of l.result.options)i(new aE(c,l.source,u?u(c):[],1e9-n.length));else{let c=new phe(e.sliceDoc(l.from,l.to));for(let h of l.result.options)if(c.match(h.label)){let f=h.displayLabel?u?u(h,c.matched):[]:c.matched;i(new aE(h,l.source,f,c.score+(h.boost||0)))}}}if(r){let l=Object.create(null),u=0,c=(h,f)=>{var d,p;return((d=h.rank)!==null&&d!==void 0?d:1e9)-((p=f.rank)!==null&&p!==void 0?p:1e9)||(h.name<f.name?-1:1)};for(let h of r.sort(c))u-=1e5,l[h.name]=u;for(let h of n){let{section:f}=h.completion;f&&(h.score+=l[typeof f=="string"?f:f.name])}}let o=[],s=null,a=e.facet(on).compareCompletions;for(let l of n.sort((u,c)=>c.score-u.score||a(u.completion,c.completion))){let u=l.completion;!s||s.label!=u.label||s.detail!=u.detail||s.type!=null&&u.type!=null&&s.type!=u.type||s.apply!=u.apply||s.boost!=u.boost?o.push(l):hE(l.completion)>hE(s)&&(o[o.length-1]=l),s=l.completion}return o}class ra{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new ra(this.options,fE(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o){let s=xhe(e,n);if(!s.length)return i&&e.some(l=>l.state==1)?new ra(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let a=n.facet(on).selectOnOpen?0:-1;if(i&&i.selected!=a&&i.selected!=-1){let l=i.options[i.selected].completion;for(let u=0;u<s.length;u++)if(s[u].completion==l){a=u;break}}return new ra(s,fE(r,a),{pos:e.reduce((l,u)=>u.hasResult()?Math.min(l,u.from):l,1e8),create:The,above:o.aboveCursor},i?i.timestamp:Date.now(),a,!1)}map(e){return new ra(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Nf{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Nf(She,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(on),o=(r.override||n.languageDataAt("autocomplete",Fi(n)).map(dhe)).map(a=>(this.active.find(u=>u.source==a)||new bn(a,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((a,l)=>a==this.active[l])&&(o=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!whe(o,this.active)?s=ra.build(o,n,this.id,s,r):s&&s.disabled&&!o.some(a=>a.state==1)&&(s=null),!s&&o.every(a=>a.state!=1)&&o.some(a=>a.hasResult())&&(o=o.map(a=>a.hasResult()?new bn(a.source,0):a));for(let a of e.effects)a.is(pE)&&(s=s&&s.setSelected(a.value,this.id));return o==this.active&&s==this.open?this:new Nf(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Che}}function whe(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult;)n++;for(;r<e.length&&!e[r].hasResult;)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const Che={"aria-autocomplete":"list"};function fE(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const She=[];function A1(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class bn{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=A1(e),i=this;r?i=i.handleUserEvent(e,r,n):e.docChanged?i=i.handleChange(e):e.selection&&i.state!=0&&(i=new bn(i.source,0));for(let o of e.effects)if(o.is(M1))i=new bn(i.source,1,o.value?Fi(e.state):-1);else if(o.is(au))i=new bn(i.source,0);else if(o.is(dE))for(let s of o.value)s.source==i.source&&(i=s);return i}handleUserEvent(e,n,r){return n=="delete"||!r.activateOnTyping?this.map(e.changes):new bn(this.source,1)}handleChange(e){return e.changes.touchesRange(Fi(e.startState))?new bn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new bn(this.source,this.state,e.mapPos(this.explicitPos))}}class ia extends bn{constructor(e,n,r,i,o){super(e,2,n),this.result=r,this.from=i,this.to=o}hasResult(){return!0}handleUserEvent(e,n,r){var i;let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),a=Fi(e.state);if((this.explicitPos<0?a<=o:a<this.from)||a>s||n=="delete"&&Fi(e.startState)==this.from)return new bn(this.source,n=="input"&&r.activateOnTyping?1:0);let l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return khe(this.result.validFor,e.state,o,s)?new ia(this.source,l,this.result,o,s):this.result.update&&(u=this.result.update(this.result,o,s,new iE(e.state,a,l>=0)))?new ia(this.source,l,u,u.from,(i=u.to)!==null&&i!==void 0?i:Fi(e.state)):new bn(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new bn(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new ia(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function khe(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):lE(t,!0).test(i)}const dE=De.define({map(t,e){return t.map(n=>n.map(e))}}),pE=De.define(),$n=Xt.define({create(){return Nf.start()},update(t,e){return t.update(e)},provide:t=>[a1.from(t,e=>e.tooltip),oe.contentAttributes.from(t,e=>e.attrs)]});function gE(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field($n).active.find(i=>i.source==e.source);return r instanceof ia?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},fhe(t.state,n,r.from,r.to)),{annotations:hhe.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const The=yhe($n,gE);function jf(t,e="option"){return n=>{let r=n.state.field($n,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(on).interactionDelay)return!1;let i=1,o;e=="page"&&(o=yT(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),n.dispatch({effects:pE.of(a)}),!0}}const Ehe=t=>{let e=t.state.field($n,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(on).interactionDelay?!1:gE(t,e.open.options[e.open.selected])},Mhe=t=>t.state.field($n,!1)?(t.dispatch({effects:M1.of(!0)}),!0):!1,Ohe=t=>{let e=t.state.field($n,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:au.of(null)}),!0)};class Ahe{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Phe=50,Dhe=1e3,_he=Lt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field($n).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field($n);if(!t.selectionSet&&!t.docChanged&&t.startState.field($n)==e)return;let n=t.transactions.some(r=>(r.selection||r.docChanged)&&!A1(r));for(let r=0;r<this.running.length;r++){let i=this.running[r];if(n||i.updates.length+t.transactions.length>Phe&&Date.now()-i.time>Dhe){for(let o of i.context.abortListeners)try{o()}catch(s){Hn(this.view.state,s)}i.context.abortListeners=null,this.running.splice(r--,1)}else i.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(i=>i.active.source==r.source))?setTimeout(()=>this.startUpdate(),50):-1,this.composing!=0)for(let r of t.transactions)A1(r)=="input"?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field($n);for(let n of e.active)n.state==1&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=Fi(e),r=new iE(e,n,t.explicitPos==n),i=new Ahe(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:au.of(null)}),Hn(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(on).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(on);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let s=new ia(i.active.source,i.active.explicitPos,i.done,i.done.from,(t=i.done.to)!==null&&t!==void 0?t:Fi(i.updates.length?i.updates[0].startState:this.view.state));for(let a of i.updates)s=s.update(a,n);if(s.hasResult()){e.push(s);continue}}let o=this.view.state.field($n).active.find(s=>s.source==i.active.source);if(o&&o.state==1)if(i.done==null){let s=new bn(i.active.source,0);for(let a of i.updates)s=s.update(a,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:dE.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field($n,!1);if(e&&e.tooltip&&this.view.state.facet(on).closeOnBlur){let n=e.open&&yT(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:au.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:M1.of(!1)}),20),this.composing=0}}}),Ihe=oe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),lu={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Eo=De.define({map(t,e){let n=e.mapPos(t,-1,ln.TrackAfter);return n??void 0}}),P1=new class extends Co{};P1.startSide=1,P1.endSide=-1;const mE=Xt.define({create(){return tt.empty},update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}t=t.map(e.changes);for(let n of e.effects)n.is(Eo)&&(t=t.update({add:[P1.range(n.value,n.value+1)]}));return t}});function $he(){return[Lhe,mE]}const D1="()[]{}<>";function vE(t){for(let e=0;e<D1.length;e+=2)if(D1.charCodeAt(e)==t)return D1.charAt(e+1);return hm(t<128?t:t+1)}function yE(t,e){return t.languageDataAt("closeBrackets",e)[0]||lu}const Fhe=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Lhe=oe.inputHandler.of((t,e,n,r)=>{if((Fhe?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Wn(Kt(r,0))==1||e!=i.from||n!=i.to)return!1;let o=Bhe(t.state,r);return o?(t.dispatch(o),!0):!1}),Rhe=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=yE(t,t.selection.main.head).brackets||lu.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let a=Nhe(t.doc,s.head);for(let l of r)if(l==a&&Vf(t.doc,s.head)==vE(Kt(l,0)))return{changes:{from:s.head-l.length,to:s.head+l.length},range:L.cursor(s.head-l.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function Bhe(t,e){let n=yE(t,t.selection.main.head),r=n.brackets||lu.brackets;for(let i of r){let o=vE(Kt(i,0));if(e==i)return o==i?zhe(t,i,r.indexOf(i+i+i)>-1,n):jhe(t,i,o,n.before||lu.before);if(e==o&&bE(t,t.selection.main.from))return Vhe(t,i,o)}return null}function bE(t,e){let n=!1;return t.field(mE).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function Vf(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Wn(Kt(n,0)))}function Nhe(t,e){let n=t.sliceString(e-2,e);return Wn(Kt(n,0))==n.length?n:n.slice(1)}function jhe(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:Eo.of(s.to+e.length),range:L.range(s.anchor+e.length,s.head+e.length)};let a=Vf(t.doc,s.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:Eo.of(s.head+e.length),range:L.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Vhe(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&Vf(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:L.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function zhe(t,e,n,r){let i=r.stringPrefixes||lu.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:Eo.of(a.to+e.length),range:L.range(a.anchor+e.length,a.head+e.length)};let l=a.head,u=Vf(t.doc,l),c;if(u==e){if(xE(t,l))return{changes:{insert:e+e,from:l},effects:Eo.of(l+e.length),range:L.cursor(l+e.length)};if(bE(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:L.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=wE(t,l-2*e.length,i))>-1&&xE(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Eo.of(l+e.length),range:L.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=bt.Word&&wE(t,l,i)>-1&&!Whe(t,l,e,i))return{changes:{insert:e+e,from:l},effects:Eo.of(l+e.length),range:L.cursor(l+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function xE(t,e){let n=Gt(t).resolveInner(e+1);return n.parent&&n.from==e}function Whe(t,e,n,r){let i=Gt(t).resolveInner(e,-1),o=r.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=a.indexOf(n);if(!l||l>-1&&r.indexOf(a.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function wE(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=bt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=bt.Word)return o}return-1}function Hhe(t={}){return[$n,on.of(t),_he,qhe,Ihe]}const CE=[{key:"Ctrl-Space",run:Mhe},{key:"Escape",run:Ohe},{key:"ArrowDown",run:jf(!0)},{key:"ArrowUp",run:jf(!1)},{key:"PageDown",run:jf(!0,"page")},{key:"PageUp",run:jf(!1,"page")},{key:"Enter",run:Ehe}],qhe=qs.highest(gf.computeN([on],t=>t.facet(on).defaultKeymap?[CE]:[])),Uhe=36,SE=1,Yhe=2,uu=3,_1=4,Ghe=5,Khe=6,Xhe=7,Zhe=8,Qhe=9,Jhe=10,efe=11,tfe=12,nfe=13,rfe=14,ife=15,ofe=16,sfe=17,kE=18,afe=19,TE=20,EE=21,ME=22,lfe=23,ufe=24;function I1(t){return t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57}function cfe(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function Mo(t,e,n){for(let r=!1;;){if(t.next<0)return;if(t.next==e&&!r){t.advance();return}r=n&&!r&&t.next==92,t.advance()}}function hfe(t){for(;;){if(t.next<0||t.peek(1)<0)return;if(t.next==36&&t.peek(1)==36){t.advance(2);return}t.advance()}}function ffe(t,e){let n="[{<(".indexOf(String.fromCharCode(e)),r=n<0?e:"]}>)".charCodeAt(n);for(;;){if(t.next<0)return;if(t.next==r&&t.peek(1)==39){t.advance(2);return}t.advance()}}function OE(t,e){for(;!(t.next!=95&&!I1(t.next));)e!=null&&(e+=String.fromCharCode(t.next)),t.advance();return e}function dfe(t){if(t.next==39||t.next==34||t.next==96){let e=t.next;t.advance(),Mo(t,e,!1)}else OE(t)}function AE(t,e){for(;t.next==48||t.next==49;)t.advance();e&&t.next==e&&t.advance()}function PE(t,e){for(;;){if(t.next==46){if(e)break;e=!0}else if(t.next<48||t.next>57)break;t.advance()}if(t.next==69||t.next==101)for(t.advance(),(t.next==43||t.next==45)&&t.advance();t.next>=48&&t.next<=57;)t.advance()}function DE(t){for(;!(t.next<0||t.next==10);)t.advance()}function Oo(t,e){for(let n=0;n<e.length;n++)if(e.charCodeAt(n)==t)return!0;return!1}const $1=` \r
264
+ `;function _E(t,e,n){let r=Object.create(null);r.true=r.false=Ghe,r.null=r.unknown=Khe;for(let i of t.split(" "))i&&(r[i]=TE);for(let i of e.split(" "))i&&(r[i]=EE);for(let i of(n||"").split(" "))i&&(r[i]=ufe);return r}const F1={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',words:_E("absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ","array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ")};function pfe(t,e,n,r){let i={};for(let o in F1)i[o]=(t.hasOwnProperty(o)?t:F1)[o];return e&&(i.words=_E(e,n||"",r)),i}function IE(t){return new the(e=>{var n;let{next:r}=e;if(e.advance(),Oo(r,$1)){for(;Oo(e.next,$1);)e.advance();e.acceptToken(Uhe)}else if(r==36&&e.next==36&&t.doubleDollarQuotedStrings)hfe(e),e.acceptToken(uu);else if(r==39||r==34&&t.doubleQuotedStrings)Mo(e,r,t.backslashEscapes),e.acceptToken(uu);else if(r==35&&t.hashComments||r==47&&e.next==47&&t.slashComments)DE(e),e.acceptToken(SE);else if(r==45&&e.next==45&&(!t.spaceAfterDashes||e.peek(1)==32))DE(e),e.acceptToken(SE);else if(r==47&&e.next==42){e.advance();for(let i=1;;){let o=e.next;if(e.next<0)break;if(e.advance(),o==42&&e.next==47){if(i--,e.advance(),!i)break}else o==47&&e.next==42&&(i++,e.advance())}e.acceptToken(Yhe)}else if((r==101||r==69)&&e.next==39)e.advance(),Mo(e,39,!0);else if((r==110||r==78)&&e.next==39&&t.charSetCasts)e.advance(),Mo(e,39,t.backslashEscapes),e.acceptToken(uu);else if(r==95&&t.charSetCasts)for(let i=0;;i++){if(e.next==39&&i>1){e.advance(),Mo(e,39,t.backslashEscapes),e.acceptToken(uu);break}if(!I1(e.next))break;e.advance()}else if(t.plsqlQuotingMechanism&&(r==113||r==81)&&e.next==39&&e.peek(1)>0&&!Oo(e.peek(1),$1)){let i=e.peek(1);e.advance(2),ffe(e,i),e.acceptToken(uu)}else if(r==40)e.acceptToken(Xhe);else if(r==41)e.acceptToken(Zhe);else if(r==123)e.acceptToken(Qhe);else if(r==125)e.acceptToken(Jhe);else if(r==91)e.acceptToken(efe);else if(r==93)e.acceptToken(tfe);else if(r==59)e.acceptToken(nfe);else if(t.unquotedBitLiterals&&r==48&&e.next==98)e.advance(),AE(e),e.acceptToken(ME);else if((r==98||r==66)&&(e.next==39||e.next==34)){const i=e.next;e.advance(),t.treatBitsAsBytes?(Mo(e,i,t.backslashEscapes),e.acceptToken(lfe)):(AE(e,i),e.acceptToken(ME))}else if(r==48&&(e.next==120||e.next==88)||(r==120||r==88)&&e.next==39){let i=e.next==39;for(e.advance();cfe(e.next);)e.advance();i&&e.next==39&&e.advance(),e.acceptToken(_1)}else if(r==46&&e.next>=48&&e.next<=57)PE(e,!0),e.acceptToken(_1);else if(r==46)e.acceptToken(rfe);else if(r>=48&&r<=57)PE(e,!1),e.acceptToken(_1);else if(Oo(r,t.operatorChars)){for(;Oo(e.next,t.operatorChars);)e.advance();e.acceptToken(ife)}else if(Oo(r,t.specialVar))e.next==r&&e.advance(),dfe(e),e.acceptToken(sfe);else if(Oo(r,t.identifierQuotes))Mo(e,r,!1),e.acceptToken(afe);else if(r==58||r==44)e.acceptToken(ofe);else if(I1(r)){let i=OE(e,String.fromCharCode(r));e.acceptToken(e.next==46?kE:(n=t.words[i.toLowerCase()])!==null&&n!==void 0?n:kE)}})}const $E=IE(F1),gfe=Bf.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,$E],topRules:{Script:[0,25]},tokenPrec:0});function L1(t){let e=t.cursor().moveTo(t.from,-1);for(;/Comment/.test(e.name);)e.moveTo(e.from,-1);return e.node}function cu(t,e){let n=t.sliceString(e.from,e.to),r=/^([`'"])(.*)\1$/.exec(n);return r?r[2]:n}function zf(t){return t&&(t.name=="Identifier"||t.name=="QuotedIdentifier")}function mfe(t,e){if(e.name=="CompositeIdentifier"){let n=[];for(let r=e.firstChild;r;r=r.nextSibling)zf(r)&&n.push(cu(t,r));return n}return[cu(t,e)]}function FE(t,e){for(let n=[];;){if(!e||e.name!=".")return n;let r=L1(e);if(!zf(r))return n;n.unshift(cu(t,r)),e=L1(r)}}function vfe(t,e){let n=Gt(t).resolveInner(e,-1),r=bfe(t.doc,n);return n.name=="Identifier"||n.name=="QuotedIdentifier"||n.name=="Keyword"?{from:n.from,quoted:n.name=="QuotedIdentifier"?t.doc.sliceString(n.from,n.from+1):null,parents:FE(t.doc,L1(n)),aliases:r}:n.name=="."?{from:e,quoted:null,parents:FE(t.doc,n),aliases:r}:{from:e,quoted:null,parents:[],empty:!0,aliases:r}}const yfe=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function bfe(t,e){let n;for(let i=e;!n;i=i.parent){if(!i)return null;i.name=="Statement"&&(n=i)}let r=null;for(let i=n.firstChild,o=!1,s=null;i;i=i.nextSibling){let a=i.name=="Keyword"?t.sliceString(i.from,i.to).toLowerCase():null,l=null;if(!o)o=a=="from";else if(a=="as"&&s&&zf(i.nextSibling))l=cu(t,i.nextSibling);else{if(a&&yfe.has(a))break;s&&zf(i)&&(l=cu(t,i))}l&&(r||(r=Object.create(null)),r[l]=mfe(t,s)),s=/Identifier$/.test(i.name)?i:null}return r}function xfe(t,e){return t?e.map(n=>Object.assign(Object.assign({},n),{label:t+n.label+t,apply:void 0})):e}const wfe=/^\w*$/,Cfe=/^[`'"]?\w*[`'"]?$/;class R1{constructor(){this.list=[],this.children=void 0}child(e,n){let r=this.children||(this.children=Object.create(null)),i=r[e];return i||(e&&this.list.push(LE(e,"type",n)),r[e]=new R1)}addCompletions(e){for(let n of e){let r=this.list.findIndex(i=>i.label==n.label);r>-1?this.list[r]=n:this.list.push(n)}}}function LE(t,e,n){return/[^\w\xb5-\uffff]/.test(t)?{label:t,type:e,apply:n+t+n}:{label:t,type:e}}function Sfe(t,e,n,r,i,o){var s;let a=new R1,l=((s=o==null?void 0:o.spec.identifierQuotes)===null||s===void 0?void 0:s[0])||'"',u=a.child(i||"",l);for(let c in t){let h=c.replace(/\\?\./g,d=>d=="."?"\0":d).split("\0"),f=h.length==1?u:a;for(let d of h)f=f.child(d.replace(/\\\./g,"."),l);for(let d of t[c])d&&f.list.push(typeof d=="string"?LE(d,"property",l):d)}return e&&u.addCompletions(e),n&&a.addCompletions(n),a.addCompletions(u.list),r&&a.addCompletions(u.child(r,l).list),c=>{let{parents:h,from:f,quoted:d,empty:p,aliases:g}=vfe(c.state,c.pos);if(p&&!c.explicit)return null;g&&h.length==1&&(h=g[h[0]]||h);let m=a;for(let C of h){for(;!m.children||!m.children[C];)if(m==a)m=u;else if(m==u&&r)m=m.child(r,l);else return null;m=m.child(C,l)}let b=d&&c.state.sliceDoc(c.pos,c.pos+1)==d,x=m.list;return m==a&&g&&(x=x.concat(Object.keys(g).map(C=>({label:C,type:"constant"})))),{from:f,to:b?c.pos+1:void 0,options:xfe(d,x),validFor:d?Cfe:wfe}}}function kfe(t,e){let n=Object.keys(t).map(r=>({label:e?r.toUpperCase():r,type:t[r]==EE?"type":t[r]==TE?"keyword":"variable",boost:-1}));return che(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],sE(n))}let Tfe=gfe.configure({props:[FT.add({Statement:Sce()}),RT.add({Statement(t){return{from:t.firstChild.to,to:t.to}},BlockComment(t){return{from:t.from+2,to:t.to-2}}}),MT({Keyword:I.keyword,Type:I.typeName,Builtin:I.standard(I.name),Bits:I.number,Bytes:I.string,Bool:I.bool,Null:I.null,Number:I.number,String:I.string,Identifier:I.name,QuotedIdentifier:I.special(I.string),SpecialVar:I.special(I.name),LineComment:I.lineComment,BlockComment:I.blockComment,Operator:I.operator,"Semi Punctuation":I.punctuation,"( )":I.paren,"{ }":I.brace,"[ ]":I.squareBracket})]});class B1{constructor(e,n,r){this.dialect=e,this.language=n,this.spec=r}get extension(){return this.language.extension}static define(e){let n=pfe(e,e.keywords,e.types,e.builtin),r=Ef.define({name:"sql",parser:Tfe.configure({tokenizers:[{from:$E,to:IE(n)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new B1(n,r,e)}}function Efe(t,e=!1){return kfe(t.dialect.words,e)}function Mfe(t,e=!1){return t.language.data.of({autocomplete:Efe(t,e)})}function Ofe(t){return t.schema?Sfe(t.schema,t.tables,t.schemas,t.defaultTable,t.defaultSchema,t.dialect||N1):()=>null}function Afe(t){return t.schema?(t.dialect||N1).language.data.of({autocomplete:Ofe(t)}):[]}function Pfe(t={}){let e=t.dialect||N1;return new pce(e.language,[Afe(t),Mfe(e,!!t.upperCaseKeywords)])}const N1=B1.define({});function j1(){return j1=Object.assign?Object.assign.bind():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},j1.apply(this,arguments)}function Dfe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const _fe=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=z1(t.state,n.from);return r.line?Ife(t):r.block?Ffe(t):!1};function V1(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const Ife=V1(Bfe,0),$fe=V1(RE,0),Ffe=V1((t,e)=>RE(t,e,Rfe(e)),0);function z1(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const hu=50;function Lfe(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-hu,r),s=t.sliceDoc(i,i+hu),a=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(s)[0].length,u=o.length-a;if(o.slice(u-e.length,u)==e&&s.slice(l,l+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let c,h;i-r<=2*hu?c=h=t.sliceDoc(r,i):(c=t.sliceDoc(r,r+hu),h=t.sliceDoc(i-hu,i));let f=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(h)[0].length,p=h.length-d-n.length;return c.slice(f,f+e.length)==e&&h.slice(p,p+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(c.charAt(f+e.length))?1:0},close:{pos:i-d-n.length,margin:/\s/.test(h.charAt(p-1))?1:0}}:null}function Rfe(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function RE(t,e,n=e.selection.ranges){let r=n.map(o=>z1(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,s)=>Lfe(e,r[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,s)=>i[s]?[]:[{from:o.from,insert:r[s].open+" "},{from:o.to,insert:" "+r[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,a;s<i.length;s++)if(a=i[s]){let l=r[s],{open:u,close:c}=a;o.push({from:u.pos-l.open.length,to:u.pos+u.margin},{from:c.pos-c.margin,to:c.pos+l.close.length})}return{changes:o}}return null}function Bfe(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:s}of n){let a=r.length,l=1e9,u=z1(e,o).line;if(u){for(let c=o;c<=s;){let h=e.doc.lineAt(c);if(h.from>i&&(o==s||s>h.from)){i=h.from;let f=/^\s*/.exec(h.text)[0].length,d=f==h.length,p=h.text.slice(f,f+u.length)==u?f:-1;f<h.text.length&&f<l&&(l=f),r.push({line:h,comment:p,token:u,indent:f,empty:d,single:!1})}c=h.to+1}if(l<1e9)for(let c=a;c<r.length;c++)r[c].indent<r[c].line.text.length&&(r[c].indent=l);r.length==a+1&&(r[a].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:l,indent:u,empty:c,single:h}of r)(h||!c)&&o.push({from:a.from+u,insert:l+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:l}of r)if(a>=0){let u=s.from+a,c=u+l.length;s.text[c-s.from]==" "&&c++,o.push({from:u,to:c})}return{changes:o}}return null}const W1=yr.define(),Nfe=yr.define(),jfe=he.define(),BE=he.define({combine(t){return br(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}});function Vfe(t){let e=0;return t.iterChangedRanges((n,r)=>e=r),e}const NE=Xt.define({create(){return Mr.empty},update(t,e){let n=e.state.facet(BE),r=e.annotation(W1);if(r){let l=e.docChanged?L.single(Vfe(e.changes)):void 0,u=xn.fromTransaction(e,l),c=r.side,h=c==0?t.undone:t.done;return u?h=Hf(h,h.length,n.minDepth,u):h=zE(h,e.startState.selection),new Mr(c==0?r.rest:h,c==0?h:r.rest)}let i=e.annotation(Nfe);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Wt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=xn.fromTransaction(e),s=e.annotation(Wt.time),a=e.annotation(Wt.userEvent);return o?t=t.addChanges(o,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Mr(t.done.map(xn.fromJSON),t.undone.map(xn.fromJSON))}});function zfe(t={}){return[NE,BE.of(t),oe.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?jE:e.inputType=="historyRedo"?H1:null;return r?(e.preventDefault(),r(n)):!1}})]}function Wf(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(NE,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const jE=Wf(0,!1),H1=Wf(1,!1),Wfe=Wf(0,!0),Hfe=Wf(1,!0);class xn{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new xn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new xn(e.changes&&zt.fromJSON(e.changes),[],e.mapped&&vr.fromJSON(e.mapped),e.startSelection&&L.fromJSON(e.startSelection),e.selectionsAfter.map(L.fromJSON))}static fromTransaction(e,n){let r=Un;for(let i of e.startState.facet(jfe)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new xn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Un)}static selection(e){return new xn(void 0,Un,void 0,void 0,e)}}function Hf(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function qfe(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,s,a)=>{for(let l=0;l<n.length;){let u=n[l++],c=n[l++];a>=u&&s<=c&&(r=!0)}}),r}function Ufe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function VE(t,e){return t.length?e.length?t.concat(e):t:e}const Un=[],Yfe=200;function zE(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Yfe));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Hf(t,t.length-1,1e9,n.setSelAfter(r)))}else return[xn.selection([e])]}function Gfe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function q1(t,e){if(!t.length)return t;let n=t.length,r=Un;for(;n;){let i=Kfe(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[xn.selection(r)]:Un}function Kfe(t,e,n){let r=VE(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Un,n);if(!t.changes)return xn.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new xn(i,De.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const Xfe=/^(input\.type|delete)($|\.)/;class Mr{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Mr(this.done,this.undone):this}addChanges(e,n,r,i,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||Xfe.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,qfe(a.changes,e.changes))||r=="input.type.compose")?s=Hf(s,s.length-1,i.minDepth,new xn(e.changes.compose(a.changes),VE(e.effects,a.effects),a.mapped,a.startSelection,Un)):s=Hf(s,s.length,i.minDepth,e),new Mr(s,Un,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Un;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Ufe(o[o.length-1],e)?this:new Mr(zE(this.done,e),this.undone,n,r)}addMapping(e){return new Mr(q1(this.done,e),q1(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1];if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:W1.of({side:e,rest:Gfe(i)}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let s=i.length==1?Un:i.slice(0,i.length-1);return o.mapped&&(s=q1(s,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:W1.of({side:e,rest:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Mr.empty=new Mr(Un,Un);const Zfe=[{key:"Mod-z",run:jE,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:H1,preventDefault:!0},{linux:"Ctrl-Shift-z",run:H1,preventDefault:!0},{key:"Mod-u",run:Wfe,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Hfe,preventDefault:!0}];function oa(t,e){return L.create(t.ranges.map(e),t.mainIndex)}function Or(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function or({state:t,dispatch:e},n){let r=oa(t.selection,n);return r.eq(t.selection)?!1:(e(Or(t,r)),!0)}function qf(t,e){return L.cursor(e?t.to:t.from)}function WE(t,e){return or(t,n=>n.empty?t.moveByChar(n,e):qf(n,e))}function sn(t){return t.textDirectionAt(t.state.selection.main.head)==Ct.LTR}const HE=t=>WE(t,!sn(t)),qE=t=>WE(t,sn(t));function UE(t,e){return or(t,n=>n.empty?t.moveByGroup(n,e):qf(n,e))}const Qfe=t=>UE(t,!sn(t)),Jfe=t=>UE(t,sn(t));function ede(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Uf(t,e,n){let r=Gt(t).resolveInner(e.head),i=n?Fe.closedBy:Fe.openedBy;for(let l=e.head;;){let u=n?r.childAfter(l):r.childBefore(l);if(!u)break;ede(t,u,i)?r=u:l=n?u.to:u.from}let o=r.type.prop(i),s,a;return o&&(s=n?Er(t,r.from,1):Er(t,r.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?r.to:r.from,L.cursor(a,n?-1:1)}const tde=t=>or(t,e=>Uf(t.state,e,!sn(t))),nde=t=>or(t,e=>Uf(t.state,e,sn(t)));function YE(t,e){return or(t,n=>{if(!n.empty)return qf(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const GE=t=>YE(t,!1),KE=t=>YE(t,!0);function XE(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(oe.scrollMargins)){let s=o(t);s!=null&&s.top&&(n=Math.max(s==null?void 0:s.top,n)),s!=null&&s.bottom&&(r=Math.max(s==null?void 0:s.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function ZE(t,e){let n=XE(t),{state:r}=t,i=oa(r.selection,s=>s.empty?t.moveVertically(s,e,n.height):qf(s,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,u=a.bottom-n.marginBottom;s&&s.top>l&&s.bottom<u&&(o=oe.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-l}))}return t.dispatch(Or(r,i),{effects:o}),!0}const QE=t=>ZE(t,!1),U1=t=>ZE(t,!0);function Li(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=L.cursor(r.from+o))}return i}const rde=t=>or(t,e=>Li(t,e,!0)),ide=t=>or(t,e=>Li(t,e,!1)),ode=t=>or(t,e=>Li(t,e,!sn(t))),sde=t=>or(t,e=>Li(t,e,sn(t))),ade=t=>or(t,e=>L.cursor(t.lineBlockAt(e.head).from,1)),lde=t=>or(t,e=>L.cursor(t.lineBlockAt(e.head).to,-1));function ude(t,e,n){let r=!1,i=oa(t.selection,o=>{let s=Er(t,o.head,-1)||Er(t,o.head,1)||o.head>0&&Er(t,o.head-1,1)||o.head<t.doc.length&&Er(t,o.head+1,-1);if(!s||!s.end)return o;r=!0;let a=s.start.from==o.head?s.end.to:s.end.from;return n?L.range(o.anchor,a):L.cursor(a)});return r?(e(Or(t,i)),!0):!1}const cde=({state:t,dispatch:e})=>ude(t,e,!1);function Yn(t,e){let n=oa(t.state.selection,r=>{let i=e(r);return L.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Or(t.state,n)),!0)}function JE(t,e){return Yn(t,n=>t.moveByChar(n,e))}const eM=t=>JE(t,!sn(t)),tM=t=>JE(t,sn(t));function nM(t,e){return Yn(t,n=>t.moveByGroup(n,e))}const hde=t=>nM(t,!sn(t)),fde=t=>nM(t,sn(t)),dde=t=>Yn(t,e=>Uf(t.state,e,!sn(t))),pde=t=>Yn(t,e=>Uf(t.state,e,sn(t)));function rM(t,e){return Yn(t,n=>t.moveVertically(n,e))}const iM=t=>rM(t,!1),oM=t=>rM(t,!0);function sM(t,e){return Yn(t,n=>t.moveVertically(n,e,XE(t).height))}const aM=t=>sM(t,!1),lM=t=>sM(t,!0),gde=t=>Yn(t,e=>Li(t,e,!0)),mde=t=>Yn(t,e=>Li(t,e,!1)),vde=t=>Yn(t,e=>Li(t,e,!sn(t))),yde=t=>Yn(t,e=>Li(t,e,sn(t))),bde=t=>Yn(t,e=>L.cursor(t.lineBlockAt(e.head).from)),xde=t=>Yn(t,e=>L.cursor(t.lineBlockAt(e.head).to)),uM=({state:t,dispatch:e})=>(e(Or(t,{anchor:0})),!0),cM=({state:t,dispatch:e})=>(e(Or(t,{anchor:t.doc.length})),!0),hM=({state:t,dispatch:e})=>(e(Or(t,{anchor:t.selection.main.anchor,head:0})),!0),fM=({state:t,dispatch:e})=>(e(Or(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),wde=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Cde=({state:t,dispatch:e})=>{let n=Gf(t).map(({from:r,to:i})=>L.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:L.create(n),userEvent:"select"})),!0},Sde=({state:t,dispatch:e})=>{let n=oa(t.selection,r=>{var i;let o=Gt(t).resolveStack(r.from,1);for(let s=o;s;s=s.next){let{node:a}=s;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&(!((i=a.parent)===null||i===void 0)&&i.parent))return L.range(a.to,a.from)}return r});return e(Or(t,n)),!0},kde=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=L.create([n.main]):n.main.empty||(r=L.create([L.cursor(n.main.head)])),r?(e(Or(t,r)),!0):!1};function fu(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let l=e(o);l<s?(n="delete.backward",l=Yf(t,l,!1)):l>s&&(n="delete.forward",l=Yf(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=Yf(t,s,!1),a=Yf(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:L.cursor(s,s<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?oe.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Yf(t,e,n){if(t instanceof oe)for(let r of t.state.facet(oe.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const dM=(t,e)=>fu(t,n=>{let r=n.from,{state:i}=t,o=i.doc.lineAt(r),s,a;if(!e&&r>o.from&&r<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,r-o.from))){if(s[s.length-1]==" ")return r-1;let l=Ys(s,i.tabSize),u=l%Af(i)||Af(i);for(let c=0;c<u&&s[s.length-1-c]==" ";c++)r--;a=r}else a=tn(o.text,r-o.from,e,e)+o.from,a==r&&o.number!=(e?i.doc.lines:1)&&(a+=e?1:-1);return a}),Y1=t=>dM(t,!1),pM=t=>dM(t,!0),gM=(t,e)=>fu(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let a=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=tn(o.text,r-o.from,e)+o.from,u=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),c=s(u);if(a!=null&&c!=a)break;(u!=" "||r!=n.head)&&(a=c),r=l}return r}),mM=t=>gM(t,!1),Tde=t=>gM(t,!0),Ede=t=>fu(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Mde=t=>fu(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Ode=t=>fu(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Ade=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ue.of(["",""])},range:L.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Pde=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),s=i==o.from?i-1:tn(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:tn(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(s,i))},range:L.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Gf(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function vM(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of Gf(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),a=s.length+1;if(n){r.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let l of o.ranges)i.push(L.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{r.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let l of o.ranges)i.push(L.range(l.anchor-a,l.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:L.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Dde=({state:t,dispatch:e})=>vM(t,e,!1),_de=({state:t,dispatch:e})=>vM(t,e,!0);function yM(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Gf(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Ide=({state:t,dispatch:e})=>yM(t,e,!1),$de=({state:t,dispatch:e})=>yM(t,e,!0),Fde=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Gf(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=oa(e.selection,i=>t.moveVertically(i,!0)).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Lde(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Gt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(Fe.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const Rde=bM(!1),Bde=bM(!0);function bM(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:s}=i,a=e.doc.lineAt(o),l=!t&&o==s&&Lde(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let u=new Pf(e,{simulateBreak:o,simulateDoubleBreak:!!l}),c=v1(u,o);for(c==null&&(c=Ys(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;l?{from:o,to:s}=l:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let h=["",iu(e,c)];return l&&h.push(iu(e,u.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:Ue.of(h)},range:L.cursor(o+1+h[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function G1(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let a=t.doc.lineAt(s);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),s=a.to+1}let o=t.changes(i);return{changes:i,range:L.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const Nde=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Pf(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),i=G1(t,(o,s,a)=>{let l=v1(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let u=/^\s*/.exec(o.text)[0],c=iu(t,l);(u!=c||a.from<o.from+u.length)&&(n[o.from]=l,s.push({from:o.from,to:o.from+u.length,insert:c}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},xM=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(G1(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Of)})}),{userEvent:"input.indent"})),!0),wM=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(G1(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Ys(i,t.tabSize),s=0,a=iu(t,Math.max(0,o-Af(t)));for(;s<i.length&&s<a.length&&i.charCodeAt(s)==a.charCodeAt(s);)s++;r.push({from:n.from+s,to:n.from+i.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0),jde=[{key:"Ctrl-b",run:HE,shift:eM,preventDefault:!0},{key:"Ctrl-f",run:qE,shift:tM},{key:"Ctrl-p",run:GE,shift:iM},{key:"Ctrl-n",run:KE,shift:oM},{key:"Ctrl-a",run:ade,shift:bde},{key:"Ctrl-e",run:lde,shift:xde},{key:"Ctrl-d",run:pM},{key:"Ctrl-h",run:Y1},{key:"Ctrl-k",run:Ede},{key:"Ctrl-Alt-h",run:mM},{key:"Ctrl-o",run:Ade},{key:"Ctrl-t",run:Pde},{key:"Ctrl-v",run:U1}],Vde=[{key:"ArrowLeft",run:HE,shift:eM,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Qfe,shift:hde,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:ode,shift:vde,preventDefault:!0},{key:"ArrowRight",run:qE,shift:tM,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Jfe,shift:fde,preventDefault:!0},{mac:"Cmd-ArrowRight",run:sde,shift:yde,preventDefault:!0},{key:"ArrowUp",run:GE,shift:iM,preventDefault:!0},{mac:"Cmd-ArrowUp",run:uM,shift:hM},{mac:"Ctrl-ArrowUp",run:QE,shift:aM},{key:"ArrowDown",run:KE,shift:oM,preventDefault:!0},{mac:"Cmd-ArrowDown",run:cM,shift:fM},{mac:"Ctrl-ArrowDown",run:U1,shift:lM},{key:"PageUp",run:QE,shift:aM},{key:"PageDown",run:U1,shift:lM},{key:"Home",run:ide,shift:mde,preventDefault:!0},{key:"Mod-Home",run:uM,shift:hM},{key:"End",run:rde,shift:gde,preventDefault:!0},{key:"Mod-End",run:cM,shift:fM},{key:"Enter",run:Rde},{key:"Mod-a",run:wde},{key:"Backspace",run:Y1,shift:Y1},{key:"Delete",run:pM},{key:"Mod-Backspace",mac:"Alt-Backspace",run:mM},{key:"Mod-Delete",mac:"Alt-Delete",run:Tde},{mac:"Mod-Backspace",run:Mde},{mac:"Mod-Delete",run:Ode}].concat(jde.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),zde=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:tde,shift:dde},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:nde,shift:pde},{key:"Alt-ArrowUp",run:Dde},{key:"Shift-Alt-ArrowUp",run:Ide},{key:"Alt-ArrowDown",run:_de},{key:"Shift-Alt-ArrowDown",run:$de},{key:"Escape",run:kde},{key:"Mod-Enter",run:Bde},{key:"Alt-l",mac:"Ctrl-l",run:Cde},{key:"Mod-i",run:Sde,preventDefault:!0},{key:"Mod-[",run:wM},{key:"Mod-]",run:xM},{key:"Mod-Alt-\\",run:Nde},{key:"Shift-Mod-k",run:Fde},{key:"Shift-Mod-\\",run:cde},{key:"Mod-/",run:_fe},{key:"Alt-A",run:$fe}].concat(Vde),Wde={key:"Tab",run:xM,shift:wM};function ct(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)CM(t,arguments[e]);return t}function CM(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)CM(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const SM=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class sa{constructor(e,n,r=0,i=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?a=>o(SM(a)):SM,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Kt(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=hm(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Wn(e);let i=this.normalize(n);for(let o=0,s=r;;o++){let a=i.charCodeAt(o),l=this.match(a,s);if(o==i.length-1){if(l)return this.value=l,this;break}s==r&&o<n.length&&n.charCodeAt(o)==a&&s++}}}match(e,n){let r=null;for(let i=0;i<this.matches.length;i+=2){let o=this.matches[i],s=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[i+1],to:n+1}:(this.matches[i]++,s=!0)),s||(this.matches.splice(i,2),i-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:n,to:n+1}:this.matches.push(1,n)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}typeof Symbol<"u"&&(sa.prototype[Symbol.iterator]=function(){return this});const kM={from:-1,to:-1,match:/.*/.exec("")},K1="gm"+(/x/.unicode==null?"":"u");class TM{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=kM,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new EM(e,n,r,i,o);this.re=new RegExp(n,K1+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=Kf(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Kf(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const X1=new WeakMap;class aa{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=X1.get(e);if(!i||i.from>=r||i.to<=n){let a=new aa(n,e.sliceString(n,r));return X1.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:o,from:s}=i;return s>n&&(o=e.sliceString(n,s)+o,s=n),i.to<r&&(o+=e.sliceString(i.to,r)),X1.set(e,new aa(s,o)),new aa(n,o.slice(n-s,r-s))}}class EM{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=kM,this.matchPos=Kf(e,i),this.re=new RegExp(n,K1+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=aa.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Kf(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=aa.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(TM.prototype[Symbol.iterator]=EM.prototype[Symbol.iterator]=function(){return this});function Hde(t){try{return new RegExp(t,K1),!0}catch{return!1}}function Kf(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function Z1(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=ct("input",{class:"cm-textfield",name:"line",value:e}),r=ct("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Xf.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},ct("label",t.state.phrase("Go to line"),": ",n)," ",ct("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,l,u,c,h]=o,f=c?+c.slice(1):0,d=u?+u:a.number;if(u&&h){let m=d/100;l&&(m=m*(l=="-"?-1:1)+a.number/s.doc.lines),d=Math.round(s.doc.lines*m)}else u&&l&&(d=d*(l=="-"?-1:1)+a.number);let p=s.doc.line(Math.max(1,Math.min(s.doc.lines,d))),g=L.cursor(p.from+Math.max(0,Math.min(f,p.length)));t.dispatch({effects:[Xf.of(!1),oe.scrollIntoView(g.from,{y:"center"})],selection:g}),t.focus()}return{dom:r}}const Xf=De.define(),MM=Xt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Xf)&&(t=n.value);return t},provide:t=>eu.from(t,e=>e?Z1:null)}),qde=t=>{let e=Jl(t,Z1);if(!e){let n=[Xf.of(!0)];t.state.field(MM,!1)==null&&n.push(De.appendConfig.of([MM,Ude])),t.dispatch({effects:n}),e=Jl(t,Z1)}return e&&e.dom.querySelector("input").select(),!0},Ude=oe.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Yde={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},OM=he.define({combine(t){return br(t,Yde,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Gde(t){let e=[Jde,Qde];return t&&e.push(OM.of(t)),e}const Kde=ke.mark({class:"cm-selectionMatch"}),Xde=ke.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function AM(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=bt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=bt.Word)}function Zde(t,e,n,r){return t(e.sliceDoc(n,n+1))==bt.Word&&t(e.sliceDoc(r-1,r))==bt.Word}const Qde=Lt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(OM),{state:n}=t,r=n.selection;if(r.ranges.length>1)return ke.none;let i=r.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return ke.none;let l=n.wordAt(i.head);if(!l)return ke.none;s=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return ke.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),s=n.charCategorizer(i.head),!(AM(s,n,i.from,i.to)&&Zde(s,n,i.from,i.to)))return ke.none}else if(o=n.sliceDoc(i.from,i.to).trim(),!o)return ke.none}let a=[];for(let l of t.visibleRanges){let u=new sa(n.doc,o,l.from,l.to);for(;!u.next().done;){let{from:c,to:h}=u.value;if((!s||AM(s,n,c,h))&&(i.empty&&c<=i.from&&h>=i.to?a.push(Xde.range(c,h)):(c>=i.to||h<=i.from)&&a.push(Kde.range(c,h)),a.length>e.maxMatches))return ke.none}}return ke.set(a)}},{decorations:t=>t.decorations}),Jde=oe.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),epe=({state:t,dispatch:e})=>{let{selection:n}=t,r=L.create(n.ranges.map(i=>t.wordAt(i.head)||L.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function tpe(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,a=new sa(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new sa(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.some(l=>l.from==a.value.from))continue;if(o){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const npe=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return epe({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=tpe(t,r);return i?(e(t.update({selection:t.selection.addRange(L.range(i.from,i.to),!1),effects:oe.scrollIntoView(i.to)})),!0):!1},la=he.define({combine(t){return br(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new ppe(e),scrollToMatch:e=>oe.scrollIntoView(e)})}});class PM{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Hde(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
265
+ `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new spe(this):new ipe(this)}getCursor(e,n=0,r){let i=e.doc?e:je.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?ca(this,i,n,r):ua(this,i,n,r)}}class DM{constructor(e){this.spec=e}}function ua(t,e,n,r){return new sa(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?rpe(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function rpe(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(Zf(i,n-o))!=bt.Word||e(Qf(i,n-o))!=bt.Word)&&(e(Qf(i,r-o))!=bt.Word||e(Zf(i,r-o))!=bt.Word))}class ipe extends DM{constructor(e){super(e)}nextMatch(e,n,r){let i=ua(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=ua(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=ua(this.spec,e,o,i),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=ua(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=ua(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function ca(t,e,n,r){return new TM(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?ope(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Zf(t,e){return t.slice(tn(t,e,!1),e)}function Qf(t,e){return t.slice(e,tn(t,e))}function ope(t){return(e,n,r)=>!r[0].length||(t(Zf(r.input,r.index))!=bt.Word||t(Qf(r.input,r.index))!=bt.Word)&&(t(Qf(r.input,r.index+r[0].length))!=bt.Word||t(Zf(r.input,r.index+r[0].length))!=bt.Word)}class spe extends DM{nextMatch(e,n,r){let i=ca(this.spec,e,r,e.doc.length).next();return i.done&&(i=ca(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=ca(this.spec,e,o,r),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==n||a.from>o+10))return a;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n))}matchAll(e,n){let r=ca(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=ca(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const du=De.define(),Q1=De.define(),Ri=Xt.define({create(t){return new J1(tv(t).create(),null)},update(t,e){for(let n of e.effects)n.is(du)?t=new J1(n.value.create(),t.panel):n.is(Q1)&&(t=new J1(t.query,n.value?ev:null));return t},provide:t=>eu.from(t,e=>e.panel)});class J1{constructor(e,n){this.query=e,this.panel=n}}const ape=ke.mark({class:"cm-searchMatch"}),lpe=ke.mark({class:"cm-searchMatch cm-searchMatch-selected"}),upe=Lt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ri))}update(t){let e=t.state.field(Ri);(e!=t.startState.field(Ri)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ke.none;let{view:n}=this,r=new ki;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:a,to:l}=o[i];for(;i<s-1&&l>o[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,a,l,(u,c)=>{let h=n.state.selection.ranges.some(f=>f.from==u&&f.to==c);r.add(u,c,h?lpe:ape)})}return r.finish()}},{decorations:t=>t.decorations});function pu(t){return e=>{let n=e.state.field(Ri,!1);return n&&n.query.spec.valid?t(e,n):FM(e)}}const Jf=pu((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=L.single(r.from,r.to),o=t.state.facet(la);return t.dispatch({selection:i,effects:[nv(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),$M(t),!0}),ed=pu((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=L.single(i.from,i.to),s=t.state.facet(la);return t.dispatch({selection:o,effects:[nv(t,i),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),$M(t),!0}),cpe=pu((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:L.create(n.map(r=>L.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),hpe=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let a=new sa(t.doc,t.sliceDoc(r,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==r&&(s=o.length),o.push(L.range(a.value.from,a.value.to))}return e(t.update({selection:L.create(o,s),userEvent:"select.search.matches"})),!0},_M=pu((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=[],a,l,u=[];if(o.from==r&&o.to==i&&(l=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(n,o.from,o.to),u.push(oe.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let c=s.length==0||s[0].from>=o.to?0:o.to-o.from-l.length;a=L.single(o.from-c,o.to-c),u.push(nv(t,o)),u.push(n.facet(la).scrollToMatch(a.main,t))}return t.dispatch({changes:s,selection:a,effects:u,userEvent:"input.replace"}),!0}),fpe=pu((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:oe.announce.of(r),userEvent:"input.replace.all"}),!0});function ev(t){return t.state.facet(la).createPanel(t)}function tv(t,e){var n,r,i,o,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let u=t.facet(la);return new PM({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:u.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:u.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:u.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:u.wholeWord})}function IM(t){let e=Jl(t,ev);return e&&e.dom.querySelector("[main-field]")}function $M(t){let e=IM(t);e&&e==t.root.activeElement&&e.select()}const FM=t=>{let e=t.state.field(Ri,!1);if(e&&e.panel){let n=IM(t);if(n&&n!=t.root.activeElement){let r=tv(t.state,e.query.spec);r.valid&&t.dispatch({effects:du.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[Q1.of(!0),e?du.of(tv(t.state,e.query.spec)):De.appendConfig.of(mpe)]});return!0},LM=t=>{let e=t.state.field(Ri,!1);if(!e||!e.panel)return!1;let n=Jl(t,ev);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Q1.of(!1)}),!0},dpe=[{key:"Mod-f",run:FM,scope:"editor search-panel"},{key:"F3",run:Jf,shift:ed,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Jf,shift:ed,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:LM,scope:"editor search-panel"},{key:"Mod-Shift-l",run:hpe},{key:"Alt-g",run:qde},{key:"Mod-d",run:npe,preventDefault:!0}];class ppe{constructor(e){this.view=e;let n=this.query=e.state.field(Ri).query.spec;this.commit=this.commit.bind(this),this.searchField=ct("input",{value:n.search,placeholder:Fn(e,"Find"),"aria-label":Fn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ct("input",{value:n.replace,placeholder:Fn(e,"Replace"),"aria-label":Fn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ct("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=ct("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=ct("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return ct("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=ct("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Jf(e),[Fn(e,"next")]),r("prev",()=>ed(e),[Fn(e,"previous")]),r("select",()=>cpe(e),[Fn(e,"all")]),ct("label",null,[this.caseField,Fn(e,"match case")]),ct("label",null,[this.reField,Fn(e,"regexp")]),ct("label",null,[this.wordField,Fn(e,"by word")]),...e.state.readOnly?[]:[ct("br"),this.replaceField,r("replace",()=>_M(e),[Fn(e,"replace")]),r("replaceAll",()=>fpe(e),[Fn(e,"replace all")])],ct("button",{name:"close",onclick:()=>LM(e),"aria-label":Fn(e,"close"),type:"button"},["×"])])}commit(){let e=new PM({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:du.of(e)}))}keydown(e){nue(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?ed:Jf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),_M(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(du)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(la).top}}function Fn(t,e){return t.state.phrase(e)}const td=30,nd=/[\s\.,:;?!]/;function nv(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-td),s=Math.min(i,n+td),a=t.state.sliceDoc(o,s);if(o!=r.from){for(let l=0;l<td;l++)if(!nd.test(a[l+1])&&nd.test(a[l])){a=a.slice(l);break}}if(s!=i){for(let l=a.length-1;l>a.length-td;l--)if(!nd.test(a[l-1])&&nd.test(a[l])){a=a.slice(0,l);break}}return oe.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const gpe=oe.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),mpe=[Ri,qs.low(upe),gpe];class vpe{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Ao{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(jM).markerFilter;o&&(i=o(i));let s=ke.set(i.map(a=>a.from==a.to||a.from==a.to-1&&r.doc.lineAt(a.from).to==a.from?ke.widget({widget:new Tpe(a),diagnostic:a}).range(a.from):ke.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity+(a.markClass?" "+a.markClass:"")},diagnostic:a}).range(a.from,a.to)),!0);return new Ao(s,n,ha(s))}}function ha(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return r=new vpe(i,o,s.diagnostic),!1}),r}function ype(t,e){let n=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(r=>r.is(RM))||t.changes.touchesRange(n.from,n.to))}function bpe(t,e){return t.field(Ln,!1)?e:e.concat(De.appendConfig.of(Ope))}const RM=De.define(),rv=De.define(),BM=De.define(),Ln=Xt.define({create(){return new Ao(ke.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),r=null;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=ha(n,t.selected.diagnostic,i)||ha(n,null,i)}t=new Ao(n,t.panel,r)}for(let n of e.effects)n.is(RM)?t=Ao.init(n.value,t.panel,e.state):n.is(rv)?t=new Ao(t.diagnostics,n.value?rd.open:null,t.selected):n.is(BM)&&(t=new Ao(t.diagnostics,t.panel,n.value));return t},provide:t=>[eu.from(t,e=>e.panel),oe.decorations.from(t,e=>e.diagnostics)]}),xpe=ke.mark({class:"cm-lintRange cm-lintRange-active"});function wpe(t,e,n){let{diagnostics:r}=t.state.field(Ln),i=[],o=2e8,s=0;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||n>0)&&(e<u||n<0))&&(i.push(c.diagnostic),o=Math.min(l,o),s=Math.max(u,s))});let a=t.state.facet(jM).tooltipFilter;return a&&(i=a(i)),i.length?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:Cpe(t,i)}}}:null}function Cpe(t,e){return ct("ul",{class:"cm-tooltip-lint"},e.map(n=>zM(t,n,!1)))}const Spe=t=>{let e=t.state.field(Ln,!1);(!e||!e.panel)&&t.dispatch({effects:bpe(t.state,[rv.of(!0)])});let n=Jl(t,rd.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},NM=t=>{let e=t.state.field(Ln,!1);return!e||!e.panel?!1:(t.dispatch({effects:rv.of(!1)}),!0)},kpe=[{key:"Mod-Shift-m",run:Spe,preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(Ln,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],jM=he.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},br(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function VM(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function zM(t,e,n){var r;let i=n?VM(e.actions):[];return ct("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ct("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let a=!1,l=f=>{if(f.preventDefault(),a)return;a=!0;let d=ha(t.state.field(Ln).diagnostics,e);d&&o.apply(t,d.from,d.to)},{name:u}=o,c=i[s]?u.indexOf(i[s]):-1,h=c<0?u:[u.slice(0,c),ct("u",u.slice(c,c+1)),u.slice(c+1)];return ct("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[s]})"`}.`},h)}),e.source&&ct("div",{class:"cm-diagnosticSource"},e.source))}class Tpe extends Gr{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return ct("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class WM{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=zM(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class rd{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)NM(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=VM(o.actions);for(let a=0;a<s.length;a++)if(s[a].toUpperCase().charCodeAt(0)==i.keyCode){let l=ha(this.view.state.field(Ln).diagnostics,o);l&&o.actions[a].apply(e,l.from,l.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=ct("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=ct("div",{class:"cm-panel-lint"},this.list,ct("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>NM(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ln).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Ln),r=0,i=!1,o=null;for(e.between(0,this.view.state.doc.length,(s,a,{spec:l})=>{let u=-1,c;for(let h=r;h<this.items.length;h++)if(this.items[h].diagnostic==l.diagnostic){u=h;break}u<0?(c=new WM(this.view,l.diagnostic),this.items.splice(r,0,c),i=!0):(c=this.items[u],u>r&&(this.items.splice(r,u-r),i=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),o=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),r++});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new WM(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:a})=>{let l=a.height/this.list.offsetHeight;s.top<a.top?this.list.scrollTop-=(a.top-s.top)/l:s.bottom>a.bottom&&(this.list.scrollTop+=(s.bottom-a.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Ln),r=ha(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:BM.of(r)})}static open(e){return new rd(e)}}function Epe(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function id(t){return Epe(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Mpe=oe.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:id("#d11")},".cm-lintRange-warning":{backgroundImage:id("orange")},".cm-lintRange-info":{backgroundImage:id("#999")},".cm-lintRange-hint":{backgroundImage:id("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Ope=[Ln,oe.decorations.compute([Ln],t=>{let{selected:e,panel:n}=t.field(Ln);return!e||!n||e.from==e.to?ke.none:ke.set([xpe.range(e.from,e.to)])}),Wue(wpe,{hideOn:ype}),Mpe];var HM=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(Rhe)),e.defaultKeymap!==!1&&(r=r.concat(zde)),e.searchKeymap!==!1&&(r=r.concat(dpe)),e.historyKeymap!==!1&&(r=r.concat(Zfe)),e.foldKeymap!==!1&&(r=r.concat(_ce)),e.completionKeymap!==!1&&(r=r.concat(CE)),e.lintKeymap!==!1&&(r=r.concat(kpe));var i=[];return e.lineNumbers!==!1&&i.push(Que()),e.highlightActiveLineGutter!==!1&&i.push(tce()),e.highlightSpecialChars!==!1&&i.push(bue()),e.history!==!1&&i.push(zfe()),e.foldGutter!==!1&&i.push(Lce()),e.drawSelection!==!1&&i.push(lue()),e.dropCursor!==!1&&i.push(due()),e.allowMultipleSelections!==!1&&i.push(je.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(Tce()),e.syntaxHighlighting!==!1&&i.push(UT(jce,{fallback:!0})),e.bracketMatching!==!1&&i.push(Uce()),e.closeBrackets!==!1&&i.push($he()),e.autocompletion!==!1&&i.push(Hhe()),e.rectangularSelection!==!1&&i.push(Iue()),n!==!1&&i.push(Lue()),e.highlightActiveLine!==!1&&i.push(Tue()),e.highlightSelectionMatches!==!1&&i.push(Gde()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Of.of(" ".repeat(e.tabSize))),i.concat([gf.of(r.flat())]).filter(Boolean)};const Ape="#e5c07b",qM="#e06c75",Ppe="#56b6c2",Dpe="#ffffff",od="#abb2bf",iv="#7d8799",_pe="#61afef",Ipe="#98c379",UM="#d19a66",$pe="#c678dd",Fpe="#21252b",YM="#2c313a",GM="#282c34",ov="#353a42",Lpe="#3E4451",KM="#528bff",Rpe=oe.theme({"&":{color:od,backgroundColor:GM},".cm-content":{caretColor:KM},".cm-cursor, .cm-dropCursor":{borderLeftColor:KM},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Lpe},".cm-panels":{backgroundColor:Fpe,color:od},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:GM,color:iv,border:"none"},".cm-activeLineGutter":{backgroundColor:YM},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ov},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ov,borderBottomColor:ov},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:YM,color:od}}},{dark:!0}),Bpe=su.define([{tag:I.keyword,color:$pe},{tag:[I.name,I.deleted,I.character,I.propertyName,I.macroName],color:qM},{tag:[I.function(I.variableName),I.labelName],color:_pe},{tag:[I.color,I.constant(I.name),I.standard(I.name)],color:UM},{tag:[I.definition(I.name),I.separator],color:od},{tag:[I.typeName,I.className,I.number,I.changed,I.annotation,I.modifier,I.self,I.namespace],color:Ape},{tag:[I.operator,I.operatorKeyword,I.url,I.escape,I.regexp,I.link,I.special(I.string)],color:Ppe},{tag:[I.meta,I.comment],color:iv},{tag:I.strong,fontWeight:"bold"},{tag:I.emphasis,fontStyle:"italic"},{tag:I.strikethrough,textDecoration:"line-through"},{tag:I.link,color:iv,textDecoration:"underline"},{tag:I.heading,fontWeight:"bold",color:qM},{tag:[I.atom,I.bool,I.special(I.variableName)],color:UM},{tag:[I.processingInstruction,I.string,I.inserted],color:Ipe},{tag:I.invalid,color:Dpe}]),Npe=[Rpe,UT(Bpe)];var jpe=oe.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Vpe=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:s="",basicSetup:a=!0}=e,l=[];switch(n&&l.unshift(gf.of([Wde])),a&&(typeof a=="boolean"?l.unshift(HM()):l.unshift(HM(a))),s&&l.unshift(Aue(s)),o){case"light":l.push(jpe);break;case"dark":l.push(Npe);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(oe.editable.of(!1)),i&&l.push(je.readOnly.of(!0)),[...l]},zpe=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),XM=yr.define(),Wpe=[];function Hpe(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:s,extensions:a=Wpe,autoFocus:l,theme:u="light",height:c=null,minHeight:h=null,maxHeight:f=null,width:d=null,minWidth:p=null,maxWidth:g=null,placeholder:m="",editable:b=!0,readOnly:x=!1,indentWithTab:C=!0,basicSetup:S=!0,root:w,initialState:k}=t,[T,O]=v.useState(),[P,D]=v.useState(),[R,H]=v.useState(),W=oe.theme({"&":{height:c,minHeight:h,maxHeight:f,width:d,minWidth:p,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),B=oe.updateListener.of(V=>{if(V.docChanged&&typeof r=="function"&&!V.transactions.some(_=>_.annotation(XM))){var me=V.state.doc,re=me.toString();r(re,V)}i&&i(zpe(V))}),j=Vpe({theme:u,editable:b,readOnly:x,placeholder:m,indentWithTab:C,basicSetup:S}),N=[B,W,...j];return s&&typeof s=="function"&&N.push(oe.updateListener.of(s)),N=N.concat(a),v.useEffect(()=>{if(T&&!R){var V={doc:e,selection:n,extensions:N},me=k?je.fromJSON(k.json,V,k.fields):je.create(V);if(H(me),!P){var re=new oe({state:me,parent:T,root:w});D(re),o&&o(re,me)}}return()=>{P&&(H(void 0),D(void 0))}},[T,R]),v.useEffect(()=>O(t.container),[t.container]),v.useEffect(()=>()=>{P&&(P.destroy(),D(void 0))},[P]),v.useEffect(()=>{l&&P&&P.focus()},[l,P]),v.useEffect(()=>{P&&P.dispatch({effects:De.reconfigure.of(N)})},[u,a,c,h,f,d,p,g,m,b,x,C,S,r,s]),v.useEffect(()=>{if(e!==void 0){var V=P?P.state.doc.toString():"";P&&e!==V&&P.dispatch({changes:{from:0,to:V.length,insert:e||""},annotations:[XM.of(!0)]})}},[e,P]),{state:R,setState:H,view:P,setView:D,container:T,setContainer:O}}var qpe=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],ZM=v.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:u,autoFocus:c,theme:h="light",height:f,minHeight:d,maxHeight:p,width:g,minWidth:m,maxWidth:b,basicSetup:x,placeholder:C,indentWithTab:S,editable:w,readOnly:k,root:T,initialState:O}=t,P=Dfe(t,qpe),D=v.useRef(null),{state:R,view:H,container:W}=Hpe({container:D.current,root:T,value:r,autoFocus:c,theme:h,height:f,minHeight:d,maxHeight:p,width:g,minWidth:m,maxWidth:b,basicSetup:x,placeholder:C,indentWithTab:S,editable:w,readOnly:k,selection:i,onChange:s,onStatistics:a,onCreateEditor:l,onUpdate:u,extensions:o,initialState:O});if(v.useImperativeHandle(e,()=>({editor:D.current,state:R,view:H}),[D,W,R,H]),typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var B=typeof h=="string"?"cm-theme-"+h:"cm-theme";return y.jsx("div",j1({ref:D,className:""+B+(n?" "+n:"")},P))});ZM.displayName="CodeMirror";const Upe=M.styled(M.Stack,{shouldForwardProp:t=>t!=="error"})(({theme:t,error:e})=>({width:"100%",borderRadius:8,overflow:"hidden","& .cm-theme-light":{border:`solid 1px ${M.alpha(t.palette.grey[500],.32)}`,padding:t.spacing(2),borderRadius:8,...e&&{borderColor:t.palette.error.main},"&:hover":{borderColor:t.palette.text.primary}},"& .cm-focused":{outline:"none"},"& .cm-scroller":{fontFamily:"inherit",lineHeight:"22px",fontSize:12}})),QM=({sx:t,error:e,helperText:n,...r})=>y.jsxs(Upe,{sx:t,error:e,children:[y.jsx(ZM,{extensions:[Pfe()],minHeight:"200px",basicSetup:{foldGutter:!1,lineNumbers:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1},...r}),n&&y.jsx(M.FormHelperText,{error:e,sx:{px:2},children:n})]}),Ype=({onSearch:t,onChange:e,trigger:n="click",iconPosition:r="end",tabIndex:i,...o})=>{const s=v.useRef(null),a=y.jsx(M.InputAdornment,{position:r,children:y.jsx(M.IconButton,{color:"inherit",onClick:()=>{var l;t((l=s.current)==null?void 0:l.value)},children:y.jsx(vt,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return y.jsx(M.TextField,{inputRef:s,InputProps:{onKeyDown:l=>{var u;l.key==="Enter"&&t((u=s.current)==null?void 0:u.value)},...r==="start"?{startAdornment:a}:{endAdornment:a}},inputProps:{tabIndex:i,...o.inputProps},onChange:l=>{if(n==="change"){t(l.target.value);return}l.target.value===""&&t(""),e&&e(l)},...o})},Gpe=M.styled(M.StepConnector)(({theme:t})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:t.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:t.palette.primary.main}}})),Kpe=({active:t,completed:e})=>y.jsx(M.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...t&&{color:"primary.main"}},children:e?y.jsx(vt,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):y.jsx(M.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),Xpe=({steps:t,activeStep:e,showLabels:n=!0,sx:r,...i})=>y.jsx(M.Stepper,{alternativeLabel:!0,activeStep:e,connector:y.jsx(Gpe,{}),sx:r,...i,children:t.map(o=>y.jsx(M.Step,{children:y.jsx(M.StepLabel,{StepIconComponent:Kpe,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&o})},o))}),Zpe=({children:t,value:e,index:n,sx:r})=>y.jsx(M.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...e.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"},...r},children:t});function fa(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(c){try{u(r.next(c))}catch(h){s(h)}}function l(c){try{u(r.throw(c))}catch(h){s(h)}}function u(c){c.done?o(c.value):i(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})}function da(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function JM(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function eO(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var Qpe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function gu(t,e){var n=Jpe(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Jpe(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=Qpe.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var e0e=[".DS_Store","Thumbs.db"];function t0e(t){return fa(this,void 0,void 0,function(){return da(this,function(e){return sd(t)&&n0e(t.dataTransfer)?[2,s0e(t.dataTransfer,t.type)]:r0e(t)?[2,i0e(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,o0e(t)]:[2,[]]})})}function n0e(t){return sd(t)}function r0e(t){return sd(t)&&sd(t.target)}function sd(t){return typeof t=="object"&&t!==null}function i0e(t){return sv(t.target.files).map(function(e){return gu(e)})}function o0e(t){return fa(this,void 0,void 0,function(){var e;return da(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return gu(r)})]}})})}function s0e(t,e){return fa(this,void 0,void 0,function(){var n,r;return da(this,function(i){switch(i.label){case 0:return t.items?(n=sv(t.items).filter(function(o){return o.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(a0e))]):[3,2];case 1:return r=i.sent(),[2,tO(nO(r))];case 2:return[2,tO(sv(t.files).map(function(o){return gu(o)}))]}})})}function tO(t){return t.filter(function(e){return e0e.indexOf(e.name)===-1})}function sv(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function a0e(t){if(typeof t.webkitGetAsEntry!="function")return rO(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?iO(e):rO(t)}function nO(t){return t.reduce(function(e,n){return eO(eO([],JM(e),!1),JM(Array.isArray(n)?nO(n):[n]),!1)},[])}function rO(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=gu(e);return Promise.resolve(n)}function l0e(t){return fa(this,void 0,void 0,function(){return da(this,function(e){return[2,t.isDirectory?iO(t):u0e(t)]})})}function iO(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function o(){var s=this;e.readEntries(function(a){return fa(s,void 0,void 0,function(){var l,u,c;return da(this,function(h){switch(h.label){case 0:if(a.length)return[3,5];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=h.sent(),n(l),[3,4];case 3:return u=h.sent(),r(u),[3,4];case 4:return[3,6];case 5:c=Promise.all(a.map(l0e)),i.push(c),o(),h.label=6;case 6:return[2]}})})},function(a){r(a)})}o()})}function u0e(t){return fa(this,void 0,void 0,function(){return da(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var o=gu(i,t.fullPath);n(o)},function(i){r(i)})})]})})}var c0e=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=(t.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?o===a.replace(/\/.*$/,""):i===a})}return!0};function oO(t){return d0e(t)||f0e(t)||uO(t)||h0e()}function h0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
266
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f0e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function d0e(t){if(Array.isArray(t))return av(t)}function sO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function aO(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sO(Object(n),!0).forEach(function(r){lO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mu(t,e){return m0e(t)||g0e(t,e)||uO(t,e)||p0e()}function p0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
267
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uO(t,e){if(t){if(typeof t=="string")return av(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return av(t,e)}}function av(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function g0e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function m0e(t){if(Array.isArray(t))return t}var v0e="file-invalid-type",y0e="file-too-large",b0e="file-too-small",x0e="too-many-files",w0e=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:v0e,message:"File type must be ".concat(n)}},cO=function(e){return{code:y0e,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},hO=function(e){return{code:b0e,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},C0e={code:x0e,message:"Too many files"};function fO(t,e){var n=t.type==="application/x-moz-file"||c0e(t,e);return[n,n?null:w0e(e)]}function dO(t,e,n){if(Po(t.size))if(Po(e)&&Po(n)){if(t.size>n)return[!1,cO(n)];if(t.size<e)return[!1,hO(e)]}else{if(Po(e)&&t.size<e)return[!1,hO(e)];if(Po(n)&&t.size>n)return[!1,cO(n)]}return[!0,null]}function Po(t){return t!=null}function S0e(t){var e=t.files,n=t.accept,r=t.minSize,i=t.maxSize,o=t.multiple,s=t.maxFiles,a=t.validator;return!o&&e.length>1||o&&s>=1&&e.length>s?!1:e.every(function(l){var u=fO(l,n),c=mu(u,1),h=c[0],f=dO(l,r,i),d=mu(f,1),p=d[0],g=a?a(l):null;return h&&p&&!g})}function ad(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function ld(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function pO(t){t.preventDefault()}function k0e(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function T0e(t){return t.indexOf("Edge/")!==-1}function E0e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return k0e(t)||T0e(t)}function Ar(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return e.some(function(a){return!ad(r)&&a&&a.apply(void 0,[r].concat(o)),ad(r)})}}function M0e(){return"showOpenFilePicker"in window}function O0e(t){if(Po(t)){var e=Object.entries(t).filter(function(n){var r=mu(n,2),i=r[0],o=r[1],s=!0;return gO(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(o)||!o.every(mO))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var i=mu(r,2),o=i[0],s=i[1];return aO(aO({},n),{},lO({},o,s))},{});return[{description:"Files",accept:e}]}return t}function A0e(t){if(Po(t))return Object.entries(t).reduce(function(e,n){var r=mu(n,2),i=r[0],o=r[1];return[].concat(oO(e),[i],oO(o))},[]).filter(function(e){return gO(e)||mO(e)}).join(",")}function P0e(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function D0e(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function gO(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function mO(t){return/^.*\.[\w]+$/.test(t)}var _0e=["children"],I0e=["open"],$0e=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],F0e=["refKey","onChange","onClick"];function L0e(t){return N0e(t)||B0e(t)||vO(t)||R0e()}function R0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
268
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B0e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function N0e(t){if(Array.isArray(t))return uv(t)}function lv(t,e){return z0e(t)||V0e(t,e)||vO(t,e)||j0e()}function j0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
269
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vO(t,e){if(t){if(typeof t=="string")return uv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uv(t,e)}}function uv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function V0e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function z0e(t){if(Array.isArray(t))return t}function yO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function St(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yO(Object(n),!0).forEach(function(r){cv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yO(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function cv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ud(t,e){if(t==null)return{};var n=W0e(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function W0e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var hv=v.forwardRef(function(t,e){var n=t.children,r=ud(t,_0e),i=cd(r),o=i.open,s=ud(i,I0e);return v.useImperativeHandle(e,function(){return{open:o}},[o]),v.createElement(v.Fragment,null,n(St(St({},s),{},{open:o})))});hv.displayName="Dropzone";var bO={disabled:!1,getFilesFromEvent:t0e,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};hv.defaultProps=bO,hv.propTypes={children:A.func,accept:A.objectOf(A.arrayOf(A.string)),multiple:A.bool,preventDropOnDocument:A.bool,noClick:A.bool,noKeyboard:A.bool,noDrag:A.bool,noDragEventsBubbling:A.bool,minSize:A.number,maxSize:A.number,maxFiles:A.number,disabled:A.bool,getFilesFromEvent:A.func,onFileDialogCancel:A.func,onFileDialogOpen:A.func,useFsAccessApi:A.bool,autoFocus:A.bool,onDragEnter:A.func,onDragLeave:A.func,onDragOver:A.func,onDrop:A.func,onDropAccepted:A.func,onDropRejected:A.func,onError:A.func,validator:A.func};var fv={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function cd(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=St(St({},bO),t),n=e.accept,r=e.disabled,i=e.getFilesFromEvent,o=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,u=e.onDragEnter,c=e.onDragLeave,h=e.onDragOver,f=e.onDrop,d=e.onDropAccepted,p=e.onDropRejected,g=e.onFileDialogCancel,m=e.onFileDialogOpen,b=e.useFsAccessApi,x=e.autoFocus,C=e.preventDropOnDocument,S=e.noClick,w=e.noKeyboard,k=e.noDrag,T=e.noDragEventsBubbling,O=e.onError,P=e.validator,D=v.useMemo(function(){return A0e(n)},[n]),R=v.useMemo(function(){return O0e(n)},[n]),H=v.useMemo(function(){return typeof m=="function"?m:xO},[m]),W=v.useMemo(function(){return typeof g=="function"?g:xO},[g]),B=v.useRef(null),j=v.useRef(null),N=v.useReducer(H0e,fv),V=lv(N,2),me=V[0],re=V[1],_=me.isFocused,F=me.isFileDialogActive,U=v.useRef(typeof window<"u"&&window.isSecureContext&&b&&M0e()),se=function(){!U.current&&F&&setTimeout(function(){if(j.current){var we=j.current.files;we.length||(re({type:"closeDialog"}),W())}},300)};v.useEffect(function(){return window.addEventListener("focus",se,!1),function(){window.removeEventListener("focus",se,!1)}},[j,F,W,U]);var Q=v.useRef([]),ve=function(we){B.current&&B.current.contains(we.target)||(we.preventDefault(),Q.current=[])};v.useEffect(function(){return C&&(document.addEventListener("dragover",pO,!1),document.addEventListener("drop",ve,!1)),function(){C&&(document.removeEventListener("dragover",pO),document.removeEventListener("drop",ve))}},[B,C]),v.useEffect(function(){return!r&&x&&B.current&&B.current.focus(),function(){}},[B,x,r]);var le=v.useCallback(function(J){O?O(J):console.error(J)},[O]),ye=v.useCallback(function(J){J.preventDefault(),J.persist(),et(J),Q.current=[].concat(L0e(Q.current),[J.target]),ld(J)&&Promise.resolve(i(J)).then(function(we){if(!(ad(J)&&!T)){var kt=we.length,Tt=kt>0&&S0e({files:we,accept:D,minSize:s,maxSize:o,multiple:a,maxFiles:l,validator:P}),hn=kt>0&&!Tt;re({isDragAccept:Tt,isDragReject:hn,isDragActive:!0,type:"setDraggedFiles"}),u&&u(J)}}).catch(function(we){return le(we)})},[i,u,le,T,D,s,o,a,l,P]),ue=v.useCallback(function(J){J.preventDefault(),J.persist(),et(J);var we=ld(J);if(we&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return we&&h&&h(J),!1},[h,T]),ne=v.useCallback(function(J){J.preventDefault(),J.persist(),et(J);var we=Q.current.filter(function(Tt){return B.current&&B.current.contains(Tt)}),kt=we.indexOf(J.target);kt!==-1&&we.splice(kt,1),Q.current=we,!(we.length>0)&&(re({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ld(J)&&c&&c(J))},[B,c,T]),ce=v.useCallback(function(J,we){var kt=[],Tt=[];J.forEach(function(hn){var Bi=fO(hn,D),Qr=lv(Bi,2),_o=Qr[0],vu=Qr[1],yu=dO(hn,s,o),pa=lv(yu,2),bu=pa[0],xu=pa[1],wu=P?P(hn):null;if(_o&&bu&&!wu)kt.push(hn);else{var Cu=[vu,xu];wu&&(Cu=Cu.concat(wu)),Tt.push({file:hn,errors:Cu.filter(function(Su){return Su})})}}),(!a&&kt.length>1||a&&l>=1&&kt.length>l)&&(kt.forEach(function(hn){Tt.push({file:hn,errors:[C0e]})}),kt.splice(0)),re({acceptedFiles:kt,fileRejections:Tt,type:"setFiles"}),f&&f(kt,Tt,we),Tt.length>0&&p&&p(Tt,we),kt.length>0&&d&&d(kt,we)},[re,a,D,s,o,l,f,d,p,P]),_e=v.useCallback(function(J){J.preventDefault(),J.persist(),et(J),Q.current=[],ld(J)&&Promise.resolve(i(J)).then(function(we){ad(J)&&!T||ce(we,J)}).catch(function(we){return le(we)}),re({type:"reset"})},[i,ce,le,T]),q=v.useCallback(function(){if(U.current){re({type:"openDialog"}),H();var J={multiple:a,types:R};window.showOpenFilePicker(J).then(function(we){return i(we)}).then(function(we){ce(we,null),re({type:"closeDialog"})}).catch(function(we){P0e(we)?(W(we),re({type:"closeDialog"})):D0e(we)?(U.current=!1,j.current?(j.current.value=null,j.current.click()):le(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):le(we)});return}j.current&&(re({type:"openDialog"}),H(),j.current.value=null,j.current.click())},[re,H,W,b,ce,le,R,a]),ht=v.useCallback(function(J){!B.current||!B.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),q())},[B,q]),ae=v.useCallback(function(){re({type:"focus"})},[]),X=v.useCallback(function(){re({type:"blur"})},[]),fe=v.useCallback(function(){S||(E0e()?setTimeout(q,0):q())},[S,q]),xe=function(we){return r?null:we},st=function(we){return w?null:xe(we)},Je=function(we){return k?null:xe(we)},et=function(we){T&&we.stopPropagation()},Dt=v.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},we=J.refKey,kt=we===void 0?"ref":we,Tt=J.role,hn=J.onKeyDown,Bi=J.onFocus,Qr=J.onBlur,_o=J.onClick,vu=J.onDragEnter,yu=J.onDragOver,pa=J.onDragLeave,bu=J.onDrop,xu=ud(J,$0e);return St(St(cv({onKeyDown:st(Ar(hn,ht)),onFocus:st(Ar(Bi,ae)),onBlur:st(Ar(Qr,X)),onClick:xe(Ar(_o,fe)),onDragEnter:Je(Ar(vu,ye)),onDragOver:Je(Ar(yu,ue)),onDragLeave:Je(Ar(pa,ne)),onDrop:Je(Ar(bu,_e)),role:typeof Tt=="string"&&Tt!==""?Tt:"presentation"},kt,B),!r&&!w?{tabIndex:0}:{}),xu)}},[B,ht,ae,X,fe,ye,ue,ne,_e,w,k,r]),_t=v.useCallback(function(J){J.stopPropagation()},[]),Zr=v.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},we=J.refKey,kt=we===void 0?"ref":we,Tt=J.onChange,hn=J.onClick,Bi=ud(J,F0e),Qr=cv({accept:D,multiple:a,type:"file",style:{display:"none"},onChange:xe(Ar(Tt,_e)),onClick:xe(Ar(hn,_t)),tabIndex:-1},kt,j);return St(St({},Qr),Bi)}},[j,n,a,_e,r]);return St(St({},me),{},{isFocused:_&&!r,getRootProps:Dt,getInputProps:Zr,rootRef:B,inputRef:j,open:xe(q)})}function H0e(t,e){switch(e.type){case"focus":return St(St({},t),{},{isFocused:!0});case"blur":return St(St({},t),{},{isFocused:!1});case"openDialog":return St(St({},fv),{},{isFileDialogActive:!0});case"closeDialog":return St(St({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return St(St({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return St(St({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return St({},fv);default:return t}}function xO(){}const q0e=["pdf"],U0e=["txt"],Y0e=["psd"],G0e=["doc","docx"],K0e=["xls","xlsx"],X0e=["zip","rar","iso"],Z0e=["ai","esp"],Q0e=["ppt","pptx"],J0e=["wav","aif","mp3","aac"],ege=["jpg","jpeg","gif","bmp","png","svg"],tge=["m4v","avi","mpg","mp4","webm"],Rn=t=>`/assets/icons/files/${t}.svg`;function wO(t){let e;switch(t==null?void 0:t.includes(wn(t))){case U0e.includes(wn(t)):e="txt";break;case X0e.includes(wn(t)):e="zip";break;case J0e.includes(wn(t)):e="audio";break;case ege.includes(wn(t)):e="image";break;case tge.includes(wn(t)):e="video";break;case G0e.includes(wn(t)):e="word";break;case K0e.includes(wn(t)):e="excel";break;case Q0e.includes(wn(t)):e="powerpoint";break;case q0e.includes(wn(t)):e="pdf";break;case Y0e.includes(wn(t)):e="photoshop";break;case Z0e.includes(wn(t)):e="illustrator";break;default:e=wn(t)}return e}function nge(t){let e;switch(wO(t)){case"folder":e=Rn("ic_folder");break;case"txt":e=Rn("ic_txt");break;case"zip":e=Rn("ic_zip");break;case"audio":e=Rn("ic_audio");break;case"video":e=Rn("ic_video");break;case"word":e=Rn("ic_word");break;case"excel":e=Rn("ic_excel");break;case"powerpoint":e=Rn("ic_power_point");break;case"pdf":e=Rn("ic_pdf");break;case"photoshop":e=Rn("ic_pts");break;case"illustrator":e=Rn("ic_ai");break;case"image":e=Rn("ic_img");break;default:e=Rn("ic_file")}return e}function wn(t=""){return t&&t.split(".").pop()||""}function rge(t){return t.split("/").pop()}function dv(t){return typeof t=="string"?{key:t,preview:t,name:rge(t),type:wn(t)}:{key:t.preview,name:t.name,size:t.size,path:t.path,type:t.type,preview:t.preview,lastModified:t.lastModified,lastModifiedDate:t.lastModifiedDate}}function CO(t){const e=(t==null?void 0:t.color)||"#000000",n=(t==null?void 0:t.blur)||6,r=(t==null?void 0:t.opacity)||.8,i=t==null?void 0:t.imgUrl;return i?{position:"relative",backgroundImage:`url(${i})`,"&:before":{position:"absolute",top:0,left:0,zIndex:9,content:'""',width:"100%",height:"100%",backdropFilter:`blur(${n}px)`,WebkitBackdropFilter:`blur(${n}px)`,backgroundColor:Y(e,r)}}:{backdropFilter:`blur(${n}px)`,WebkitBackdropFilter:`blur(${n}px)`,backgroundColor:Y(e,r)}}function ige(t){const e=(t==null?void 0:t.direction)||"to bottom",n=t==null?void 0:t.startColor,r=t==null?void 0:t.endColor,i=t==null?void 0:t.imgUrl,o=t==null?void 0:t.color;return i?{background:`linear-gradient(${e}, ${n||o}, ${r||o}), url(${i})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center"}:{background:`linear-gradient(${e}, ${n}, ${r})`}}function oge(t){return{background:`-webkit-linear-gradient(${t})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}function sge(t){return{filter:t,WebkitFilter:t,MozFilter:t}}const age=Object.freeze(Object.defineProperty({__proto__:null,bgBlur:CO,bgGradient:ige,filterStyles:sge,hideScrollbarX:{msOverflowStyle:"none",scrollbarWidth:"none",overflowX:"scroll","&::-webkit-scrollbar":{display:"none"}},hideScrollbarY:{msOverflowStyle:"none",scrollbarWidth:"none",overflowY:"scroll","&::-webkit-scrollbar":{display:"none"}},textGradient:oge},Symbol.toStringTag,{value:"Module"})),SO=({onDownload:t})=>{const e=Yi();return y.jsx(M.IconButton,{onClick:t,sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",borderRadius:"unset",justifyContent:"center",bgcolor:"grey.800",color:"common.white",transition:e.transitions.create("opacity"),"&:hover":{opacity:1,...CO({opacity:.64,color:e.palette.grey[900]})}},children:y.jsx(vt,{icon:"eva:arrow-circle-down-fill",width:24})})},kO=({file:t,tooltip:e,imageView:n,onDownload:r,sx:i,imgSx:o})=>{const{name:s="",path:a="",preview:l=""}=dv(t),u=wO(a||l),c=u==="image"&&n?y.jsx(M.Box,{component:"img",src:l,sx:{width:1,height:1,flexShrink:0,objectFit:"cover",...o}}):y.jsx(M.Box,{component:"img",src:nge(u),sx:{width:32,height:32,flexShrink:0,...i}});return e?y.jsx(M.Tooltip,{title:s,children:y.jsxs(M.Stack,{flexShrink:0,component:"span",alignItems:"center",justifyContent:"center",sx:{width:"fit-content",height:"inherit"},children:[c,r&&y.jsx(SO,{onDownload:r})]})}):y.jsxs(y.Fragment,{children:[c,r&&y.jsx(SO,{onDownload:r})]})},TO=({fileRejections:t})=>t.length?y.jsx(M.Paper,{variant:"outlined",sx:{py:1,px:2,mt:3,bgcolor:e=>Y(e.palette.error.main,.08),borderColor:e=>Y(e.palette.error.main,.24)},children:t.map(({file:e,errors:n})=>{const{path:r,size:i}=dv(e);return y.jsxs(M.Box,{sx:{my:1},children:[y.jsxs(M.Typography,{variant:"subtitle2",noWrap:!0,children:[r," - ",i?Kg(i):""]}),n.map(o=>y.jsxs(M.Box,{component:"span",sx:{typography:"caption"},children:["- ",o.message]},o.code))]},r)})}):null,lge=({thumbnail:t,files:e,onRemove:n,sx:r})=>e!=null&&e.length?y.jsx(Kb,{initial:!1,children:e.map(i=>{const{key:o,name:s="",size:a=0}=dv(i),l=typeof i=="string";return t?y.jsxs(M.Stack,{component:Xn.div,...ya().inUp,alignItems:"center",display:"inline-flex",justifyContent:"center",sx:{m:.5,width:80,height:80,borderRadius:1.25,overflow:"hidden",position:"relative",border:u=>`solid 1px ${u.palette.divider}`,...r},children:[y.jsx(kO,{tooltip:!0,imageView:!0,file:i,sx:{position:"absolute"},imgSx:{position:"absolute"}}),n&&y.jsx(M.IconButton,{size:"small",onClick:()=>n(i),sx:{top:4,right:4,p:"1px",position:"absolute",color:u=>Y(u.palette.common.white,.72),bgcolor:u=>Y(u.palette.grey[900],.48),"&:hover":{bgcolor:u=>Y(u.palette.grey[900],.72)}},children:y.jsx(vt,{icon:"eva:close-fill",width:16})})]},o):y.jsxs(M.Stack,{component:Xn.div,...ya().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:u=>`solid 1px ${u.palette.divider}`,...r},children:[y.jsx(kO,{file:i}),y.jsxs(M.Stack,{flexGrow:1,sx:{minWidth:0},children:[y.jsx(M.Typography,{variant:"subtitle2",noWrap:!0,children:l?i:s}),y.jsx(M.Typography,{variant:"caption",sx:{color:"text.secondary"},children:l?"":Kg(a)})]}),n&&y.jsx(M.IconButton,{edge:"end",size:"small",onClick:()=>n(i),children:y.jsx(vt,{icon:"eva:close-fill"})})]},o)})}):null,uge=({file:t})=>{if(!t)return null;const e=typeof t=="string"?t:t.preview;return y.jsx(M.Stack,{position:"absolute",width:1,height:1,maxHeight:"100%",alignItems:"center",justifyContent:"center",top:0,right:0,bottom:0,left:0,padding:2,margin:"auto",children:y.jsx("img",{alt:"file preview",src:e,style:{borderRadius:8,width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}})})},cge=ur("div")(({theme:t})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:t.spacing(5),borderRadius:t.shape.borderRadius,transition:t.transitions.create("padding"),backgroundColor:t.palette.background.neutral,border:`1px dashed ${Y(t.palette.grey[500],.32)}`,"&:hover":{opacity:.72}})),hge=({header:t,description:e,sx:n,...r})=>y.jsxs(M.Stack,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...n},...r,children:[y.jsx(aoe,{sx:{width:220}}),y.jsxs("div",{children:[y.jsx(M.Typography,{gutterBottom:!0,variant:"h5",children:t||"Soltar ou selecionar arquivos"}),y.jsx(M.Typography,{variant:"body2",sx:{color:"text.secondary"},children:e||y.jsxs(y.Fragment,{children:["Solte os arquivos aqui ou clique",y.jsx(M.Typography,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua máquina"]})})]})]}),EO=({id:t,disabled:e,multiple:n=!1,error:r,helperText:i,file:o,onDelete:s,files:a,thumbnail:l,onUpload:u,onRemove:c,onRemoveAll:h,sx:f,dropZoneProps:d,placeholderProps:p,placeholderAlt:g,image:m,tabIndex:b,...x})=>{const{getRootProps:C,getInputProps:S,isDragActive:w,isDragReject:k,fileRejections:T}=cd({multiple:n,disabled:e,...x}),O=!!o&&!n||m,P=a&&n&&a.length>0,D=k||!!r;return y.jsxs(M.Box,{sx:{width:1,position:"relative",...f},children:[y.jsxs(cge,{...C(),sx:{...w&&{opacity:.72},...D&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...e&&{opacity:.48,pointerEvents:"none"},...d},children:[y.jsx("input",{...S(),id:t,tabIndex:b}),g?y.jsx(M.Stack,{sx:{...O&&{opacity:0}},children:g}):y.jsx(hge,{sx:{...O&&{opacity:0}},header:p==null?void 0:p.title,description:p==null?void 0:p.description}),O&&y.jsx(uge,{file:o||m||""})]}),i&&y.jsx(M.FormHelperText,{error:!!r,sx:R=>({mx:"14px",color:e?R.palette.grey[500]:void 0}),children:i}),y.jsx(TO,{fileRejections:T}),O&&s&&y.jsx(M.IconButton,{size:"small",onClick:s,sx:{top:16,right:16,zIndex:9,position:"absolute",color:R=>Y(R.palette.common.white,.8),bgcolor:R=>Y(R.palette.grey[900],.72),"&:hover":{bgcolor:R=>Y(R.palette.grey[900],.48)}},children:y.jsx(vt,{icon:"eva:close-fill",width:18})}),P&&y.jsxs(y.Fragment,{children:[y.jsx(M.Box,{sx:{my:3},children:y.jsx(lge,{files:a,thumbnail:l,onRemove:c})}),y.jsxs(M.Stack,{direction:"row",justifyContent:"flex-end",spacing:1.5,children:[h&&y.jsx(M.Button,{color:"inherit",variant:"outlined",size:"small",onClick:h,children:"Remove all"}),u&&y.jsx(M.Button,{size:"small",variant:"contained",onClick:u,children:"Upload files"})]})]})]})},fge=({file:t})=>{if(!t)return null;const e=typeof t=="string"?t:t.preview;return y.jsx("img",{alt:"avatar",src:e,style:{zIndex:8,overflow:"hidden",borderRadius:"50%",position:"absolute",width:"calc(100% - 16px)",height:"calc(100% - 16px)"}})},dge=ur("div")(({theme:t})=>({width:144,height:144,margin:"auto",display:"flex",cursor:"pointer",overflow:"hidden",borderRadius:"50%",alignItems:"center",position:"relative",justifyContent:"center",border:`1px dashed ${Y(t.palette.grey[500],.32)}`})),pge=ur("div")(({theme:t})=>({zIndex:7,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",width:"calc(100% - 16px)",height:"calc(100% - 16px)",color:t.palette.text.disabled,backgroundColor:t.palette.background.neutral,transition:t.transitions.create("opacity",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.shorter})})),MO=({error:t,file:e,image:n,disabled:r,helperText:i,sx:o,tabIndex:s,...a})=>{const{getRootProps:l,getInputProps:u,isDragActive:c,isDragReject:h,fileRejections:f}=cd({multiple:!1,disabled:r,...a}),d=!!e||n,p=h||!!t;return y.jsxs(y.Fragment,{children:[y.jsxs(dge,{...l(),sx:{...c&&{opacity:.72},...p&&{borderColor:"error.light",...d&&{bgcolor:"error.lighter"}},...r&&{opacity:.48,pointerEvents:"none"},...d&&{"&:hover":{"& .placeholder":{opacity:1}}},...o},children:[y.jsx("input",{...u(),tabIndex:s}),d&&y.jsx(fge,{file:e||n||""}),y.jsxs(pge,{className:"placeholder",sx:{"&:hover":{opacity:.72},...d&&{zIndex:9,opacity:0,color:"common.white",bgcolor:g=>Y(g.palette.grey[900],.64)},...p&&{color:"error.main",bgcolor:"error.lighter"}},children:[y.jsx(vt,{icon:"ic:round-add-a-photo",width:24,sx:{mb:1}}),y.jsx(M.Typography,{variant:"caption",children:e?"Update photo":"Upload photo"})]})]}),i&&i,y.jsx(TO,{fileRejections:f})]})},gge=ur("div")(({theme:t})=>({width:64,height:64,fontSize:24,display:"flex",flexShrink:0,cursor:"pointer",alignItems:"center",justifyContent:"center",margin:t.spacing(.5),color:t.palette.text.disabled,borderRadius:t.shape.borderRadius,border:`dashed 1px ${t.palette.divider}`,backgroundColor:Y(t.palette.grey[500],.08),"&:hover":{opacity:.72}})),mge=({placeholderAlt:t,error:e,disabled:n,sx:r,tabIndex:i,...o})=>{const{getRootProps:s,getInputProps:a,isDragActive:l,isDragReject:u}=cd({disabled:n,...o}),c=u||e;return y.jsxs(gge,{...s(),sx:{...l&&{opacity:.72},...c&&{color:"error.main",bgcolor:"error.lighter",borderColor:"error.light"},...n&&{opacity:.48,pointerEvents:"none"},...r},children:[y.jsx("input",{...a(),tabIndex:i}),t||y.jsx(vt,{icon:"eva:cloud-upload-fill",width:28})]})},vge=t=>new Promise((e,n)=>{const r=new Image;r.addEventListener("load",()=>e(r)),r.addEventListener("error",i=>n(i)),r.setAttribute("crossOrigin","anonymous"),r.src=t});function OO(t){return t*Math.PI/180}function yge(t,e,n){const r=OO(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}async function bge(t,e,n=0,r={horizontal:!1,vertical:!1}){const i=await vge(t),o=document.createElement("canvas"),s=o.getContext("2d");if(!s)return null;const a=OO(n),{width:l,height:u}=yge(i.width,i.height,n);o.width=l,o.height=u,s.translate(l/2,u/2),s.rotate(a),s.scale(r.horizontal?-1:1,r.vertical?-1:1),s.translate(-i.width/2,-i.height/2),s.drawImage(i,0,0);const c=s.getImageData(e.x,e.y,e.width,e.height);return o.width=e.width,o.height=e.height,s.putImageData(c,0,0),new Promise((h,f)=>{o.toBlob(d=>{h(d)},"image/png")})}const AO=(t=!1)=>{const[e,n]=v.useState(t),r=v.useCallback(()=>n(i=>!i),[]);return[e,r,n]},PO=({onFileCropped:t,onImageUploaded:e,onCancel:n,image:r})=>{const i=v.useId(),[o,s,a]=AO(),[l,u]=v.useState({x:0,y:0}),[c,h]=v.useState(1),f=v.useRef();return{id:i,crop:l,setCrop:u,zoom:c,setZoom:h,fileRef:f,onCropComplete:async(b,x)=>{try{const C=await bge(r,x,0);f.current=new File([C],"image.png",{type:C.type})}catch{t(void 0)}},saveChanges:()=>{t(f.current),s()},cancelChanges:()=>{n&&n(),a(!1)},handleRemove:()=>{t(void 0),e(void 0),u({x:0,y:0}),h(1),a(!1)},cropModalOpen:o,toggleCropModalOpen:s,setCropModalOpen:a}},DO=({id:t,open:e,onClose:n,label:r,onSave:i,onRemove:o,imgSrc:s,aspect:a,size:{height:l,width:u},crop:c,zoom:h,onCropComplete:f,onCropChange:d,onZoomChange:p})=>y.jsx(W5,{open:e,onClose:n,dialogTitle:r,actions:y.jsxs(y.Fragment,{children:[y.jsx(M.Button,{variant:"outlined",size:"medium",onClick:n,color:"inherit",children:"Cancelar"}),y.jsx(M.Button,{variant:"contained",size:"medium",onClick:i,children:"Salvar"})]}),children:y.jsxs(M.Stack,{gap:2,children:[y.jsx(b5,{image:{width:u,height:l,aspect:a,imgSrc:s},crop:c,zoom:h,onCropComplete:f,onCropChange:d,onZoomChange:p}),y.jsxs(M.Stack,{gap:1.5,children:[y.jsxs(M.Stack,{width:1,direction:"row",gap:3,flex:1,alignItems:"center",mr:"auto",children:[y.jsx(M.Typography,{variant:"body1",children:"Zoom"}),y.jsx(M.Slider,{value:h,onChange:(g,m)=>p(Array.isArray(m)?m[0]:m),min:1,max:5,size:"medium",step:.5})]}),y.jsxs(M.Stack,{direction:"row",gap:2,children:[y.jsx(M.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:y.jsx(vt,{icon:"eva:trash-2-outline",color:"error.main"}),onClick:o,children:"Remover"}),y.jsx(M.Button,{variant:"outlined",color:"inherit",size:"large",fullWidth:!0,startIcon:y.jsx(vt,{icon:"ic:outline-image-search",color:Bg.main}),component:"label",htmlFor:t,children:"Alterar"})]})]})]})}),xge=M.styled(M.Stack)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),wge=M.styled(M.Stack)(({theme:t})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:M.alpha(t.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:"#fff"}}})),Cge=M.styled(M.CircularProgress)({position:"absolute",width:"100%",height:"100%",zIndex:99,backgroundColor:"#fff",borderRadius:"50%"}),_O=({onFileCropped:t,onImageUploaded:e,onCancel:n,aspect:r,size:i,label:o,image:s="",uploading:a,file:l,tabIndex:u,...c})=>{const{id:h,crop:f,cropModalOpen:d,zoom:p,cancelChanges:g,handleRemove:m,onCropComplete:b,saveChanges:x,setCrop:C,setCropModalOpen:S,setZoom:w,toggleCropModalOpen:k}=PO({image:s,onFileCropped:t,onImageUploaded:e,onCancel:n});return y.jsxs(y.Fragment,{children:[y.jsxs(xge,{children:[a&&y.jsx(xh,{}),y.jsx(EO,{...c,id:h,file:l,onDrop:T=>{if(T.length>0){S(!0),w(1),C({x:0,y:0});const O=new FileReader;O.addEventListener("load",()=>{var D;const P=((D=O.result)==null?void 0:D.toString())||"";e(P),t(void 0)}),O.readAsDataURL(T[0])}},image:s,tabIndex:u}),(l||s)&&y.jsxs(wge,{className:"actions",children:[y.jsx(M.Button,{color:"inherit",startIcon:y.jsx(vt,{icon:"eva:trash-2-outline",color:"error.main"}),onClick:m,children:"Remover"}),y.jsx(M.Button,{color:"inherit",startIcon:y.jsx(vt,{icon:"ic:outline-image",color:Bg.main}),onClick:k,children:"Editar"})]})]}),y.jsx(DO,{id:h,open:d,onClose:g,label:o,aspect:r,crop:f,zoom:p,onCropComplete:b,onCropChange:C,onZoomChange:w,imgSrc:s,onRemove:m,onSave:x,size:i})]})},IO=({name:t,helperText:e,rules:n,onSelectOption:r,...i})=>{const{control:o}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:o,rules:n,render:({field:s,fieldState:{error:a}})=>y.jsx(n0,{...s,...i,onChange:l=>{r&&r(l),s.onChange(l)},error:!!a,helperText:(a==null?void 0:a.message)||e})})},Do=({name:t,helperText:e,rules:n,onChange:r,tabIndex:i,...o})=>{const{control:s}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:s,rules:n,render:({field:{ref:a,...l},fieldState:{error:u}})=>y.jsx(M.TextField,{...l,onChange:c=>{l.onChange(c),r&&r(c)},inputRef:a,fullWidth:!0,error:!!u,helperText:(u==null?void 0:u.message)||e,...o,inputProps:{...o.inputProps,tabIndex:i}})})},$O=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:i,rules:n,render:({field:{name:o,onChange:s,value:a,ref:l},fieldState:{error:u}})=>y.jsx(rm,{ref:l,...r,name:o,value:a,error:!!u,helperText:(u==null?void 0:u.message)||e,onChange:({target:{value:c}})=>s(c)})})},Sge=({name:t,containerProps:e,required:n,rules:r,tabIndex:i})=>{const o=`${t}.zipCode`,s=`${t}.publicPlace`,a=`${t}.number`,l=`${t}.district`,u=`${t}.complement`,c=`${t}.state`,h=`${t}.city`,f=d=>{d.key==="Enter"&&d.preventDefault()};return y.jsxs(M.Stack,{gap:1.5,...e,children:[y.jsxs(M.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[y.jsx($O,{name:o,label:"CEP",mask:[{mask:"00000-000"}],InputProps:{endAdornment:y.jsx(M.InputAdornment,{position:"end",children:y.jsx(M.CircularProgress,{size:24})})},rules:r,onKeyDown:f,required:n,sx:{width:"auto",flex:1,minWidth:160},tabIndex:i}),y.jsxs(M.Stack,{direction:{xs:"column",sm:"row"},gap:1.5,flex:{xs:1,md:"1 1 50%"},children:[y.jsx(Do,{name:s,label:"Logradouro",onKeyDown:f,inputProps:{maxLength:70},sx:{width:"auto",minWidth:250,flex:1},tabIndex:i}),y.jsx(Do,{name:a,label:"Número",onKeyDown:f,inputProps:{maxLength:6},sx:{width:"auto",minWidth:100},tabIndex:i})]})]}),y.jsxs(M.Stack,{direction:{xs:"column",md:"row"},gap:1.5,flexWrap:"wrap",children:[y.jsx(Do,{name:l,label:"Bairro",onKeyDown:f,inputProps:{maxLength:20},sx:{width:"auto",flex:{xs:1,md:"1 1 100px"}},tabIndex:i}),y.jsx(Do,{name:u,label:"Complemento",onKeyDown:f,inputProps:{maxLength:30},sx:{minWidth:200,width:"auto",flex:{xs:1,md:"1 1 500px"}},tabIndex:i})]}),y.jsxs(M.Stack,{gap:1.5,flexWrap:"wrap",direction:{xs:"column",sm:"row"},children:[y.jsx(IO,{name:c,label:"Estado",options:[],disabled:!0,required:n,sx:{flex:1},tabIndex:i}),y.jsx(Do,{name:h,label:"Cidade",disabled:!0,required:n,sx:{flex:1},tabIndex:i})]})]})},kge=({name:t,rules:e,helperText:n,tabIndex:r,...i})=>{const{control:o}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:o,rules:e,render:({field:s,fieldState:{error:a}})=>y.jsxs("div",{children:[y.jsx(M.FormControlLabel,{control:y.jsx(M.Checkbox,{...s,checked:s.value,tabIndex:r}),...i}),(!!a||n)&&y.jsx(M.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:n})]})})},Tge=({row:t,name:e,rules:n,label:r,options:i,spacing:o,helperText:s,required:a,...l})=>{const{control:u}=Oe.useFormContext(),c=(h,f)=>h.includes(f)?h.filter(d=>d!==f):[...h,f];return y.jsx(Oe.Controller,{name:e,control:u,rules:n,render:({field:{value:h=[],...f},fieldState:{error:d}})=>y.jsxs(M.FormControl,{component:"fieldset",children:[r&&y.jsx(M.FormLabel,{component:"legend",sx:{typography:"body2"},required:a,children:r}),y.jsx(M.FormGroup,{sx:{...t&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:o||0},...t&&{mr:0,"&:not(:last-of-type)":{mr:o||2}}}},children:i.map(p=>y.jsx(M.FormControlLabel,{control:y.jsx(M.Checkbox,{checked:h.includes(p.value),onChange:()=>f.onChange(c(h,p.value))}),label:p.label,...l},p.value))}),(!!d||s)&&y.jsx(M.FormHelperText,{error:!!d,sx:p=>({color:l.disabled?p.palette.grey[500]:void 0}),children:d?d==null?void 0:d.message:s})]})})},Ege=typeof window<"u"?v.useLayoutEffect:v.useEffect;function pv(t,e,n,r){const i=v.useRef(e);Ege(()=>{i.current=e},[e]),v.useEffect(()=>{const o=(n==null?void 0:n.current)||window;if(!(o&&o.addEventListener))return;const s=a=>i.current(a);return o.addEventListener(t,s,r),()=>{o.removeEventListener(t,s)}},[t,n,r])}const Mge=({keyName:t,inputs:e=[],rules:n,tabIndex:r,...i})=>{const o=v.useRef(null),{control:s,setValue:a,formState:{errors:l}}=Oe.useFormContext(),u=f=>{const d=f.clipboardData.getData("text").split("");e.map((p,g)=>a(p,d[g])),f.preventDefault()},c=(f,d)=>{const{maxLength:p,value:g,name:m}=f.target,b=m.replace(t,""),x=Number(b),C=document.querySelector(`input[name=${t}${x+1}]`);g.length>p&&(f.target.value=g[0]),g.length>=p&&x<6&&C!==null&&C.focus(),d(f)};pv("paste",u,o);const h=e.some(f=>l[f]);return y.jsxs(M.Stack,{children:[y.jsx(M.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:o,children:e.map((f,d)=>y.jsx(Oe.Controller,{name:`${t}${d+1}`,control:s,rules:n,render:({field:p,fieldState:{error:g}})=>y.jsx(M.TextField,{...i,...p,autoComplete:"none",error:!!g,autoFocus:d===0,placeholder:"-",onChange:m=>{c(m,p.onChange)},onFocus:m=>m.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number",tabIndex:r}})},f))}),h&&y.jsx(M.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Oge=({name:t,rules:e,helperText:n,...r})=>{const{control:i}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:i,rules:{...e,validate:{...e==null?void 0:e.validate,validation:o=>{const s="#"+o.replaceAll("#","");return/^#([0-9A-Fa-f]{3}){1,2}$/.test(s)?!0:"Cor inválida"}}},render:({field:{ref:o,onChange:s,...a},fieldState:{error:l}})=>y.jsx(XS,{...a,onChangeColor:s,inputRef:o,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||n,...r})})},Age=({name:t,rules:e,tabIndex:n,helperText:r,required:i,...o})=>{const{control:s}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:s,rules:e,render:({field:{ref:a,...l},fieldState:{error:u}})=>{var c;return y.jsx(va.DatePicker,{inputRef:a,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...o.localeText},...l,...o,value:l.value?new Date(l.value):null,slotProps:{textField:{...(c=o.slotProps)==null?void 0:c.textField,required:i,error:!!u,helperText:(u==null?void 0:u.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},Pge=({name:t,label:e,rules:n,tabIndex:r,helperText:i,required:o,...s})=>{const{control:a,setError:l}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:a,rules:n,render:({field:{value:u,onChange:c},fieldState:{error:h}})=>y.jsx(va.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...s.localeText},value:[(u==null?void 0:u.startDate)||null,(u==null?void 0:u.endDate)||null],onChange:f=>c({startDate:f[0],endDate:f[1]}),onError:f=>{l(t,{message:f[0]||f[1]||void 0})},...s,slotProps:{textField:({position:f})=>{var d;return{...(d=s.slotProps)==null?void 0:d.textField,required:o,error:!!h,helperText:(h==null?void 0:h.message)||i,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:f==="start"?`${e} (Dt. Início)`:`${e} (Dt. Fim)`,inputProps:{tabIndex:r}}}},sx:{width:1}})})},Dge=({name:t,rules:e,tabIndex:n,helperText:r,required:i,...o})=>{const{control:s}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:s,rules:e,render:({field:{ref:a,...l},fieldState:{error:u}})=>{var c;return y.jsx(va.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:a,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...o.localeText},...l,...o,value:l.value?new Date(l.value):null,slotProps:{textField:{...(c=o.slotProps)==null?void 0:c.textField,required:i,error:!!u,helperText:(u==null?void 0:u.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})},_ge=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:i,rules:n,render:({field:{name:o,onBlur:s,onChange:a,value:l},fieldState:{error:u}})=>y.jsx(r5,{id:`quill${o}`,onBlur:s,onChange:(c,h,f,d)=>a(d.getLength()===1?"":c),value:l,error:!!u,helperText:(u==null?void 0:u.message)||e,...r})})},Ige=({id:t,children:e,onSubmit:n,methods:r,...i})=>y.jsx(Oe.FormProvider,{...r,children:y.jsx(M.Stack,{component:"form",id:t,onSubmit:n,flex:1,width:1,noValidate:!0,...i,children:e})}),$ge=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:i,rules:n,render:({field:{ref:o,value:s,...a},fieldState:{error:l}})=>y.jsx(Jg,{value:s,inputRef:o,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||e,...r,...a,name:t})})},Fge=({name:t,helperText:e,rules:n,onChange:r,...i})=>{const{control:o}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:o,rules:n,render:({field:s,fieldState:{error:a}})=>y.jsx(Dh,{...s,onChange:l=>{s.onChange(l),r&&r(l)},fullWidth:!0,error:!!a,helperText:(a==null?void 0:a.message)||e,...i})})},Lge=({name:t,sx:e,rules:n,passwordSize:r,specialCharacter:i,upperCaseChar:o,numberChar:s,...a})=>{const{watch:l}=Oe.useFormContext(),u=l(t),[c,h]=v.useState(!1),{hasNumberChar:f,hasSpecialCharacter:d,hasUpperCaseChar:p,isLengthValid:g}=Lh(u,r,s,i,o);return y.jsx(Do,{...a,name:t,type:c?"text":"password",InputProps:{endAdornment:y.jsx(M.InputAdornment,{position:"end",children:y.jsx(M.IconButton,{onClick:()=>h(!c),edge:"end","aria-label":"Mostrar/Ocultar senha",children:y.jsx(vt,{icon:c?"eva:eye-off-fill":"eva:eye-fill"})})})},rules:{...n,validate:{...n==null?void 0:n.validate,validationPassword:m=>{const b=Lh(m,r,s,i,o);return!b.hasNumberChar||!b.hasSpecialCharacter||!b.hasUpperCaseChar||!b.isLengthValid?"Senha inválida":!0}}},sx:{...e,"& .MuiFormHelperText-root":{display:!d||!p||!g||!f?"none":void 0}}})},Rge=({name:t,rules:e,row:n,label:r,options:i,spacing:o,helperText:s,decorated:a,onChange:l,tabIndex:u,required:c,disabled:h,...f})=>{const{control:d}=Oe.useFormContext(),p=r?`${t}-${r}`:"";return y.jsx(Oe.Controller,{name:t,control:d,rules:e,render:({field:g,fieldState:{error:m}})=>y.jsxs(M.FormControl,{component:"fieldset",sx:{...a&&{paddingLeft:1.5}},children:[r&&y.jsx(M.FormLabel,{component:"legend",id:p,sx:{typography:"body2"},required:c,children:r}),y.jsx(M.RadioGroup,{...f,...g,onChange:(b,x)=>{g.onChange(b),l&&l(b,x)},"aria-labelledby":p,row:n,children:i.map(b=>y.jsx(M.FormControlLabel,{value:b.value,control:y.jsx(M.Radio,{inputProps:{tabIndex:u},disabled:h,checked:b.value===g.value}),label:b.label,sx:({palette:x})=>({"&:not(:last-of-type)":{mb:o||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:o||2}},...a&&{border:`1px solid ${M.alpha(x.grey[500],.32)}`,borderRadius:1,padding:.25,paddingRight:(o||0)/2||1,...g.value===b.value&&{borderColor:"primary.main",backgroundColor:M.alpha(x.primary.main,.05)}}})},b.value))}),(!!m||s)&&y.jsx(M.FormHelperText,{error:!!m,sx:b=>({color:h?b.palette.grey[500]:void 0}),children:m?m==null?void 0:m.message:s})]})})},Bge=({name:t,rules:e,...n})=>{const{control:r}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:r,rules:e,render:({field:{onChange:i,onBlur:o,value:s},fieldState:{error:a}})=>y.jsx(QM,{onChange:i,onBlur:o,value:s,...n,error:!!a,helperText:a==null?void 0:a.message})})},Nge=({name:t,helperText:e,onChange:n,tabIndex:r,...i})=>{const{control:o}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:o,render:({field:s,fieldState:{error:a}})=>y.jsxs("div",{children:[y.jsx(M.FormControlLabel,{control:y.jsx(M.Switch,{...s,checked:s.value,onChange:(l,u)=>{s.onChange(l),n&&n(l,u)},inputProps:{tabIndex:r}}),...i}),(!!a||e)&&y.jsx(M.FormHelperText,{error:!!a,sx:l=>({mx:"14px",color:i.disabled?l.palette.grey[500]:void 0}),children:a?a==null?void 0:a.message:e})]})})},jge=({name:t,rules:e,tabIndex:n,helperText:r,required:i,...o})=>{const{control:s}=Oe.useFormContext();return y.jsx(Oe.Controller,{name:t,control:s,rules:e,render:({field:{ref:a,...l},fieldState:{error:u}})=>{var c;return y.jsx(va.TimePicker,{ampm:!1,format:"HH:mm",inputRef:a,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...o.localeText},...l,...o,value:l.value?new Date(l.value):null,slotProps:{textField:{...(c=o.slotProps)==null?void 0:c.textField,error:!!u,required:i,helperText:(u==null?void 0:u.message)||r,autoComplete:"off",spellCheck:"false",fullWidth:!0,inputProps:{tabIndex:n}},openPickerButton:{tabIndex:n}}})}})};function FO(t,e){const{watch:n,setValue:r}=Oe.useFormContext(),[i,o]=v.useState(e),s=n(t)||[];return{uploadFile:async f=>{if(!f){r(t,void 0),o(void 0);return}r(t,f),o(Object.assign(f,{preview:URL.createObjectURL(f)}))},uploadFiles:async f=>{r(t,[...s,...f.map(d=>Object.assign(d,{preview:URL.createObjectURL(d)}))])},handleDeleteFile:()=>{r(t,void 0),o(void 0)},handleRemoveAll:()=>{r(t,void 0)},handleRemove:f=>{const d=s.filter(p=>p!==f);r(t,d)},file:i,setFileValue:o}}const Vge=({name:t,rules:e,helperText:n,aspect:r,label:i,size:o,image:s,onFileCropped:a,onImageUploaded:l,onCancel:u,...c})=>{const{control:h}=Oe.useFormContext(),{uploadFile:f,file:d,setFileValue:p}=FO(t);return y.jsx(Oe.Controller,{name:t,control:h,rules:e,render:({field:{value:g},fieldState:{error:m}})=>y.jsx(_O,{accept:{"image/*":[]},file:g?d:void 0,onFileCropped:b=>{f(b),a&&a(b)},onImageUploaded:l,onCancel:()=>{p(void 0),u&&u()},error:!!m,disableMultiple:!0,helperText:(!!m||n)&&y.jsx(M.FormHelperText,{error:!!m,sx:{px:2},children:m?m==null?void 0:m.message:n}),aspect:r,label:i,size:o,image:s,...c})})},zge=({onFileCropped:t,onImageUploaded:e,onCancel:n,aspect:r,size:i,label:o,image:s="",uploading:a,file:l,tabIndex:u,...c})=>{const{id:h,crop:f,cropModalOpen:d,zoom:p,cancelChanges:g,handleRemove:m,onCropComplete:b,saveChanges:x,setCrop:C,setCropModalOpen:S,setZoom:w}=PO({image:s,onFileCropped:t,onImageUploaded:e,onCancel:n});return y.jsxs(y.Fragment,{children:[y.jsxs(M.Stack,{position:"relative",alignItems:"center",justifyContent:"center",children:[a&&y.jsx(Cge,{}),y.jsx(MO,{...c,id:h,file:l,onDrop:k=>{if(k.length>0){S(!0),w(1),C({x:0,y:0});const T=new FileReader;T.addEventListener("load",()=>{var P;const O=((P=T.result)==null?void 0:P.toString())||"";e(O),t(void 0)}),T.readAsDataURL(k[0])}},image:s,tabIndex:u})]}),y.jsx(DO,{id:h,open:d,onClose:g,label:o,aspect:r,crop:f,zoom:p,onCropComplete:b,onCropChange:C,onZoomChange:w,imgSrc:s,onRemove:m,onSave:x,size:i})]})},Wge=({name:t,rules:e,helperText:n,aspect:r,label:i,size:o,image:s,onFileCropped:a,onImageUploaded:l,onCancel:u,...c})=>{const{control:h}=Oe.useFormContext(),{uploadFile:f,file:d,setFileValue:p}=FO(t);return y.jsx(Oe.Controller,{name:t,control:h,rules:e,render:({field:{value:g},fieldState:{error:m}})=>y.jsx(zge,{accept:{"image/*":[]},file:g?d:void 0,onFileCropped:b=>{f(b),a&&a(b)},onImageUploaded:l,onCancel:()=>{p(void 0),u&&u()},error:!!m,disableMultiple:!0,helperText:(!!m||n)&&y.jsx(M.FormHelperText,{error:!!m,sx:{px:2},children:m?m==null?void 0:m.message:n}),aspect:r,label:i,size:o,image:s,...c})})},Hge=()=>{const[t,e]=v.useState(!1),[n,r]=v.useState(document.activeElement);return v.useEffect(()=>{const i=s=>r(s.target),o=()=>r(null);return window.addEventListener("focus",i,!0),window.addEventListener("blur",o,!0),e(!0),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",o)}},[]),{activeElement:n,listenersReady:t}};function qge(){const[t,e]=v.useState(null);return{copiedText:t,copy:async r=>{if(!(navigator!=null&&navigator.clipboard))return!1;try{return await navigator.clipboard.writeText(r),e(r),!0}catch{return e(null),!1}}}}const Uge=({page:t,perPage:e,dir:n,search:r,searchValue:i,sort:o}={page:0,perPage:25})=>{const s=ei.useGridApiRef(),[a,l]=v.useState({page:t,perPage:e,dir:n,search:r,searchValue:i,sort:o}),u=({pageSize:g=25,page:m=0})=>{l(b=>({...b,page:m,perPage:g}))},c=g=>l(m=>({...m,page:0,search:g})),h=g=>l(m=>({...m,searchValue:g})),f=()=>l(g=>({...g,page:0,search:g.searchValue})),d=(g,m)=>l(b=>({...b,sort:g,dir:m})),p=()=>{s.current.setPage(0),u({page:0})};return{...a,apiRef:s,page:a.page||0,perPage:a.perPage||25,handlePaginationModelChange:u,handleSearch:c,handleSort:d,handleSearchValue:h,applySearchValue:f,goToPageFirstPage:p}};var Yge=S0;function Gge(t,e){return Yge(t,e)}var Kge=Gge;const Xge=Ni(Kge),Zge=(t,e)=>Xge(t,e),Qge=t=>{const e=v.useRef();return Zge(t,e.current)||(e.current=t),e.current},Jge=(t,e)=>{v.useEffect(t,e.map(Qge))},eme=()=>{const t=v.useRef(!0);return t.current?(t.current=!1,!0):t.current};function tme(t=""){const[e,n]=v.useState(t);return{currentTab:e,onChangeTab:(r,i)=>{n(i)},setCurrentTab:n}}function nme({items:t,itemsPerPage:e}){const[n,r]=v.useState(1),i=Math.ceil(t.length/e),o=t.slice((n-1)*e,n*e);return{currentPage:n,totalPages:i,currentItems:o,goToPage:u=>{u>0&&u<=i&&r(u)},nextPage:()=>{n<i&&r(u=>u+1)},prevPage:()=>{n>1&&r(u=>u-1)}}}const rme=(t,e,n="mousedown")=>{pv(n,r=>{const i=t==null?void 0:t.current;!i||i.contains(r.target)||e(r)})},ime=Object.freeze(Object.defineProperty({__proto__:null,downloadFile:(t,e,n)=>{const r=`data:application/octet-stream;base64,${n}`,i=document.createElement("a"),o=`${t.replace(e,"")}.${e}`;i.href=r,i.download=o,i.click()}},Symbol.toStringTag,{value:"Module"}));function ome(t){return Ag({},t)}var LO=1440,sme=2520,gv=43200,ame=86400;function lme(t,e,n){var r,i;G(2,arguments);var o=tr(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:fh;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=As(t,e);if(isNaN(a))throw new RangeError("Invalid time value");var l=Ag(ome(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),u,c;a>0?(u=K(e),c=K(t)):(u=K(t),c=K(e));var h=tk(c,u),f=(Ps(c)-Ps(u))/1e3,d=Math.round((h-f)/60),p;if(d<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):d===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",d,l);if(d<45)return s.formatDistance("xMinutes",d,l);if(d<90)return s.formatDistance("aboutXHours",1,l);if(d<LO){var g=Math.round(d/60);return s.formatDistance("aboutXHours",g,l)}else{if(d<sme)return s.formatDistance("xDays",1,l);if(d<gv){var m=Math.round(d/LO);return s.formatDistance("xDays",m,l)}else if(d<ame)return p=Math.round(d/gv),s.formatDistance("aboutXMonths",p,l)}if(p=wg(c,u),p<12){var b=Math.round(d/gv);return s.formatDistance("xMonths",b,l)}else{var x=p%12,C=Math.floor(p/12);return x<3?s.formatDistance("aboutXYears",C,l):x<9?s.formatDistance("overXYears",C,l):s.formatDistance("almostXYears",C+1,l)}}function ume(t,e){return G(1,arguments),lme(t,Date.now(),e)}function cme(t){G(1,arguments);var e=K(t),n=e.getTime();return n}function hme(t,e){const n=e||"dd/MM/yyyy";return t?Mg(new Date(t),n):null}function fme(t,e){const n=e||"dd/MM/yyyy HH:mm:ss";return t?Mg(new Date(t),n):null}function dme(t){return t?cme(new Date(t)):null}function pme(t){return t?ume(new Date(t),{addSuffix:!0}):null}function gme(t,e="dd/MM/yyyy hh:mm:ss"){if(!t)return null;const n=Sk(t,e,new Date);return kg(n)?n:null}const mme=Object.freeze(Object.defineProperty({__proto__:null,fDate:hme,fDateTime:fme,fTimestamp:dme,fToNow:pme,stringToDate:gme},Symbol.toStringTag,{value:"Module"}));function vme(t){const e=t.match(/\/([^/]+)/);return e?e[0]:t}const yme=Object.freeze(Object.defineProperty({__proto__:null,getRoot:vme},Symbol.toStringTag,{value:"Module"}));function bme(t,e,n="asc"){return t.slice().sort((r,i)=>{const o=r[e],s=i[e];return o<s?n==="asc"?-1:1:o>s?n==="asc"?1:-1:0})}function xme(t,e,n){const r=[...n],i=r.splice(t,1)[0];return r.splice(e,0,i),r}const wme=Object.freeze(Object.defineProperty({__proto__:null,sort:bme,updatePosition:xme},Symbol.toStringTag,{value:"Module"})),mv=(t="",e)=>{let n="",r=0;return[...e].forEach(i=>{n+=i==="#"?t[r++]||"_":i}),n},Cme=Object.freeze(Object.defineProperty({__proto__:null,applyMask:mv,cnpjMask:t=>mv(t.replace(/\D/g,""),"##.###.###/####-##"),cpfMask:t=>mv(t.replace(/\D/g,""),"###.###.###-##")},Symbol.toStringTag,{value:"Module"}));function Sme(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}const kme=t=>function(n){return y.jsx(v.Suspense,{fallback:y.jsx(xh,{}),children:y.jsx(t,{...n})})},Tme=Object.freeze(Object.defineProperty({__proto__:null,default:m9},Symbol.toStringTag,{value:"Module"}));$.Address=Sge,$.Autocomplete=n0,$.AutocompleteField=IO,$.Checkbox=kge,$.Codes=Mge,$.ColorPickerField=Oge,$.ColorPickerInput=XS,$.Common=eoe,$.Confirm=toe,$.CustomAvatar=Vk,$.CustomAvatarGroup=zk,$.DataGrid=uoe,$.DatePicker=Age,$.DateRangePicker=Pge,$.DateTimePicker=Dge,$.Delayed=coe,$.DialogAnimate=v9,$.Drawer=woe,$.Editor=r5,$.EditorField=_ge,$.EmptyView=Hk,$.FabButtonAnimate=Xb,$.Field=Do,$.FixedProgressBar=xh,$.Form=Ige,$.IconButtonAnimate=Zb,$.Iconify=vt,$.ImageCrop=b5,$.Incrementer=Jg,$.IncrementerField=$ge,$.Label=I5,$.MaskedInput=rm,$.MaskedInputField=$O,$.MaterialDesignContent=d2,$.MenuPopover=Hse,$.Modal=W5,$.ModalActions=Kse,$.MotionContainer=_D,$.MotionLazyContainer=Wx,$.MotionViewport=DD,$.MultiCheckbox=Tge,$.NumberInput=Dh,$.NumberInputField=Fge,$.PasswordField=Lge,$.PasswordRules=tae,$.Portal=H5,$.RadioGroupField=Rge,$.SQLEditor=QM,$.SQLEditorEditorField=Bge,$.Scrollbar=n5,$.SearchInput=Ype,$.SnackbarContent=$p,$.SnackbarProvider=m2,$.Steps=Xpe,$.Switch=Nge,$.TRANSITION=wv,$.TabPanel=Zpe,$.TextAnimate=y9,$.ThemeProvider=jk,$.TimePicker=jge,$.Transition=fc,$.Upload=EO,$.UploadAvatar=MO,$.UploadAvatarWithCropField=Wge,$.UploadBox=mge,$.UploadWithCrop=_O,$.UploadWithCropField=Vge,$.cssStyles=age,$.file=ime,$.formatNumber=rse,$.formatTime=mme,$.loadable=kme,$.mask=Cme,$.number=Zoe,$.routes=yme,$.sort=wme,$.useActiveElement=Hge,$.useCopyToClipboard=qge,$.useDatagrid=Uge,$.useDeepCompareEffect=Jge,$.useEventListener=pv,$.useIsMounting=eme,$.useOnClickOutside=rme,$.usePagination=nme,$.useResponsive=zx,$.useSnackbar=c_,$.useTabs=tme,$.useToggle=AO,$.uuidv4=Sme,$.validators=Qse,$.varBgColor=n6,$.varBgKenburns=r6,$.varBgPan=i6,$.varBounce=JO,$.varContainer=ku,$.varFade=ya,$.varFlip=XO,$.varHover=t6,$.varPath=YO,$.varRotate=e6,$.varScale=QO,$.varSlide=ZO,$.varTranEnter=Ae,$.varTranExit=$e,$.varTranHover=GO,$.varZoom=KO,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});