VictoriaMetrics/app/vmselect/vmui/static/js/main.0072b105.js
Yury Molodov 681a800086
vmui: legend fixes (#1995)
* feat: add a reset query by clicking the logo

* feat: add sequence number for query fields

* feat: invert behavior on the graph's legend

* app/vmselect/vmui: `make vmui-update`

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2021-12-23 12:14:16 +02:00

2 lines
1.1 MiB

/*! For license information please see main.0072b105.js.LICENSE.txt */
!function(){var e={4575:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},3913:function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},5318:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},7757:function(e,t,n){e.exports=n(8937)},8508:function(e,t,n){"use strict";n.d(t,{Z:function(){return ie}});var r=n(3324),i=Math.abs,o=String.fromCharCode,a=Object.assign;function s(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function u(e,t){return e.indexOf(t)}function c(e,t){return 0|e.charCodeAt(t)}function f(e,t,n){return e.slice(t,n)}function d(e){return e.length}function h(e){return e.length}function p(e,t){return t.push(e),e}var v=1,m=1,g=0,y=0,b=0,x="";function w(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:v,column:m,length:a,return:""}}function k(e,t){return a(w("",null,null,"",null,null,0),e,{length:-e.length},t)}function S(){return b=y>0?c(x,--y):0,m--,10===b&&(m=1,v--),b}function O(){return b=y<g?c(x,y++):0,m++,10===b&&(m=1,v++),b}function C(){return c(x,y)}function M(){return y}function P(e,t){return f(x,e,t)}function T(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function E(e){return v=m=1,g=d(x=e),y=0,[]}function Z(e){return x="",e}function A(e){return s(P(y-1,j(91===e?e+2:40===e?e+1:e)))}function R(e){for(;(b=C())&&b<33;)O();return T(e)>2||T(b)>3?"":" "}function D(e,t){for(;--t&&O()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return P(e,M()+(t<6&&32==C()&&32==O()))}function j(e){for(;O();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&j(b);break;case 40:41===e&&j(e);break;case 92:O()}return y}function _(e,t){for(;O()&&e+b!==57&&(e+b!==84||47!==C()););return"/*"+P(t,y-1)+"*"+o(47===e?e:O())}function N(e){for(;!T(C());)O();return P(e,y)}var L="-ms-",I="-moz-",z="-webkit-",B="comm",F="rule",$="decl",W="@keyframes";function H(e,t){for(var n="",r=h(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function V(e,t,n,r){switch(e.type){case"@import":case $:return e.return=e.return||e.value;case B:return"";case W:return e.return=e.value+"{"+H(e.children,r)+"}";case F:e.value=e.props.join(",")}return d(n=H(e.children,r))?e.return=e.value+"{"+n+"}":""}function q(e,t){switch(function(e,t){return(((t<<2^c(e,0))<<2^c(e,1))<<2^c(e,2))<<2^c(e,3)}(e,t)){case 5103:return z+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return z+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return z+e+I+e+L+e+e;case 6828:case 4268:return z+e+L+e+e;case 6165:return z+e+L+"flex-"+e+e;case 5187:return z+e+l(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return z+e+L+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return z+e+L+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return z+e+L+l(e,"shrink","negative")+e;case 5292:return z+e+L+l(e,"basis","preferred-size")+e;case 6060:return z+"box-"+l(e,"-grow","")+z+e+L+l(e,"grow","positive")+e;case 4554:return z+l(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,z+"$1"),/(image-set)/,z+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,z+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+z+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,z+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(d(e)-1-t>6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+I+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?q(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,d(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+z)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+z+(45===c(e,14)?"inline-":"")+"box$3$1"+z+"$2$3$1"+L+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return z+e+L+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return z+e+L+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return z+e+L+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return z+e+L+e+e}return e}function U(e){return Z(Q("",null,null,null,[""],e=E(e),0,[0],e))}function Q(e,t,n,r,i,a,s,c,f){for(var h=0,v=0,m=s,g=0,y=0,b=0,x=1,w=1,k=1,P=0,T="",E=i,Z=a,j=r,L=T;w;)switch(b=P,P=O()){case 40:if(108!=b&&58==L.charCodeAt(m-1)){-1!=u(L+=l(A(P),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:L+=A(P);break;case 9:case 10:case 13:case 32:L+=R(b);break;case 92:L+=D(M()-1,7);continue;case 47:switch(C()){case 42:case 47:p(Y(_(O(),M()),t,n),f);break;default:L+="/"}break;case 123*x:c[h++]=d(L)*k;case 125*x:case 59:case 0:switch(P){case 0:case 125:w=0;case 59+v:y>0&&d(L)-m&&p(y>32?G(L+";",r,n,m-1):G(l(L," ","")+";",r,n,m-2),f);break;case 59:L+=";";default:if(p(j=X(L,t,n,h,v,i,c,T,E=[],Z=[],m),a),123===P)if(0===v)Q(L,t,j,j,E,a,m,c,Z);else switch(g){case 100:case 109:case 115:Q(e,j,j,r&&p(X(e,j,j,0,0,i,c,T,i,E=[],m),Z),i,Z,m,c,r?E:Z);break;default:Q(L,j,j,j,[""],Z,0,c,Z)}}h=v=y=0,x=k=1,T=L="",m=s;break;case 58:m=1+d(L),y=b;default:if(x<1)if(123==P)--x;else if(125==P&&0==x++&&125==S())continue;switch(L+=o(P),P*x){case 38:k=v>0?1:(L+="\f",-1);break;case 44:c[h++]=(d(L)-1)*k,k=1;break;case 64:45===C()&&(L+=A(O())),g=C(),v=m=d(T=L+=N(M())),P++;break;case 45:45===b&&2==d(L)&&(x=0)}}return a}function X(e,t,n,r,o,a,u,c,d,p,v){for(var m=o-1,g=0===o?a:[""],y=h(g),b=0,x=0,k=0;b<r;++b)for(var S=0,O=f(e,m+1,m=i(x=u[b])),C=e;S<y;++S)(C=s(x>0?g[S]+" "+O:l(O,/&\f/g,g[S])))&&(d[k++]=C);return w(e,t,n,0===o?F:c,d,p,v)}function Y(e,t,n){return w(e,t,n,B,o(b),f(e,2,-2),0)}function G(e,t,n,r){return w(e,t,n,$,f(e,0,r),f(e,r+1,-1),r)}var K=function(e,t,n){for(var r=0,i=0;r=i,i=C(),38===r&&12===i&&(t[n]=1),!T(i);)O();return P(e,y)},J=function(e,t){return Z(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===C()&&(t[n]=1),e[n]+=K(y-1,t,n);break;case 2:e[n]+=A(r);break;case 4:if(44===r){e[++n]=58===C()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=O());return e}(E(e),t))},ee=new WeakMap,te=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ee.get(n))&&!r){ee.set(e,!0);for(var i=[],o=J(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[u]):a[u]+" "+o[s]}}},ne=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case $:e.return=q(e.value,e.length);break;case W:return H([k(e,{value:l(e.value,"@","@"+z)})],r);case F:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([k(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([k(e,{props:[l(t,/:(plac\w+)/,":-webkit-input-$1")]}),k(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),k(e,{props:[l(t,/:(plac\w+)/,L+"input-$1")]})],r)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||re;var o,a,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)}));var u,c,f=[V,(c=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=h(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([te,ne].concat(i,f));a=function(e,t,n,r){u=n,H(U(e?e+"{"+t.styles+"}":t.styles),d),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new r.m({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:a};return p.sheet.hydrate(l),p}},3390:function(e,t){"use strict";t.Z=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},1639:function(e,t,n){"use strict";n.d(t,{C:function(){return a},T:function(){return l},w:function(){return s}});var r=n(7313),i=n(8508),o=(n(4544),(0,r.createContext)("undefined"!==typeof HTMLElement?(0,i.Z)({key:"css"}):null));var a=o.Provider,s=function(e){return(0,r.forwardRef)((function(t,n){var i=(0,r.useContext)(o);return e(t,i,n)}))},l=(0,r.createContext)({})},4544:function(e,t,n){"use strict";n.d(t,{O:function(){return v}});var r=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},i={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(3390),a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!==typeof e},c=(0,o.Z)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),f=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return h={name:t,styles:n,next:h},t}))}return 1===i[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return h={name:n.name,styles:n.styles,next:h},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)h={name:r.name,styles:r.styles,next:h},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=d(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!==typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":u(a)&&(r+=c(o)+":"+f(o,a)+";");else if(!Array.isArray(a)||"string"!==typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=d(e,t,a);switch(o){case"animation":case"animationName":r+=c(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var l=0;l<a.length;l++)u(a[l])&&(r+=c(o)+":"+f(o,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=h,o=n(e);return h=i,d(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var h,p=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var v=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i=!0,o="";h=void 0;var a=e[0];null==a||void 0===a.raw?(i=!1,o+=d(n,t,a)):o+=a[0];for(var s=1;s<e.length;s++)o+=d(n,t,e[s]),i&&(o+=a[s]);p.lastIndex=0;for(var l,u="";null!==(l=p.exec(o));)u+="-"+l[1];return{name:r(o)+u,styles:o,next:h}}},3324:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}()},4911:function(e,t,n){"use strict";n.d(t,{f:function(){return r},M:function(){return i}});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var i=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0);i=i.next}while(void 0!==i)}}},317:function(e,t,n){"use strict";function r(e,t,n){var r={};return Object.keys(e).forEach((function(i){r[i]=e[i].reduce((function(e,r){return r&&(n&&n[r]&&e.push(n[r]),e.push(t(r))),e}),[]).join(" ")})),r}n.d(t,{Z:function(){return r}})},672:function(e,t){"use strict";var n=function(e){return e},r=function(){var e=n;return{configure:function(t){e=t},generate:function(t){return e(t)},reset:function(){e=n}}}();t.Z=r},2131:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(672),i={active:"Mui-active",checked:"Mui-checked",completed:"Mui-completed",disabled:"Mui-disabled",error:"Mui-error",expanded:"Mui-expanded",focused:"Mui-focused",focusVisible:"Mui-focusVisible",required:"Mui-required",selected:"Mui-selected"};function o(e,t){return i[t]||"".concat(r.Z.generate(e),"-").concat(t)}},655:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(2131);function i(e,t){var n={};return t.forEach((function(t){n[t]=(0,r.Z)(e,t)})),n}},5211:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=a},1198:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.Z=a},4839:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}),"Code");t.Z=a},2314:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"}),"Equalizer");t.Z=a},6306:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=a},3745:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"HighlightOff");t.Z=a},8711:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"}),"Lock");t.Z=a},1163:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");t.Z=a},3451:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"m10 16.5 6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"PlayCircleOutline");t.Z=a},1864:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"}),"Security");t.Z=a},2495:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");t.Z=a},3657:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"}),"ShowChart");t.Z=a},9344:function(e,t,n){"use strict";var r=n(5318);t.Z=void 0;var i=r(n(5045)),o=n(6417),a=(0,i.default)((0,o.jsx)("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"}),"TableChart");t.Z=a},5045:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(6415)},210:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(7462),i=n(3366),o=n(7313),a=(n(5192),n(3061)),s=n(317),l=n(1615),u=n(5469),c=n(8564),f=n(2131);function d(e){return(0,f.Z)("MuiSvgIcon",e)}(0,n(655).Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var h=n(6417),p=["children","className","color","component","fontSize","htmlColor","titleAccess","viewBox"],v=(0,c.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.Z)(n.color))],t["fontSize".concat((0,l.Z)(n.fontSize))]]}})((function(e){var t,n,r=e.theme,i=e.ownerState;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:r.transitions.create("fill",{duration:r.transitions.duration.shorter}),fontSize:{inherit:"inherit",small:r.typography.pxToRem(20),medium:r.typography.pxToRem(24),large:r.typography.pxToRem(35)}[i.fontSize],color:null!=(t=null==(n=r.palette[i.color])?void 0:n.main)?t:{action:r.palette.action.active,disabled:r.palette.action.disabled,inherit:void 0}[i.color]}})),m=o.forwardRef((function(e,t){var n=(0,u.Z)({props:e,name:"MuiSvgIcon"}),o=n.children,c=n.className,f=n.color,m=void 0===f?"inherit":f,g=n.component,y=void 0===g?"svg":g,b=n.fontSize,x=void 0===b?"medium":b,w=n.htmlColor,k=n.titleAccess,S=n.viewBox,O=void 0===S?"0 0 24 24":S,C=(0,i.Z)(n,p),M=(0,r.Z)({},n,{color:m,component:y,fontSize:x,viewBox:O}),P=function(e){var t=e.color,n=e.fontSize,r=e.classes,i={root:["root","inherit"!==t&&"color".concat((0,l.Z)(t)),"fontSize".concat((0,l.Z)(n))]};return(0,s.Z)(i,d,r)}(M);return(0,h.jsxs)(v,(0,r.Z)({as:y,className:(0,a.default)(P.root,c),ownerState:M,focusable:"false",viewBox:O,color:w,"aria-hidden":!k||void 0,role:k?"img":void 0,ref:t},C,{children:[o,k?(0,h.jsx)("title",{children:k}):null]}))}));m.muiName="SvgIcon";var g=m},7458:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(7462),i=n(3366),o=n(3019),a=n(9456),s=n(4942);function l(e,t,n){var i;return(0,r.Z)({toolbar:(i={minHeight:56},(0,s.Z)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,s.Z)(i,e.up("sm"),{minHeight:64}),i)},n)}var u=n(7219),c=n(7551),f={black:"#000",white:"#fff"},d={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"},h={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"},p={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"},v={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"},m={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"},g={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"},y={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"},b=["mode","contrastThreshold","tonalOffset"],x={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:f.white,default:f.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}},w={text:{primary:f.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:f.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 k(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,c.$n)(e.main,i):"dark"===t&&(e.dark=(0,c._j)(e.main,o)))}function S(e){var t=e.mode,n=void 0===t?"light":t,a=e.contrastThreshold,s=void 0===a?3:a,l=e.tonalOffset,S=void 0===l?.2:l,O=(0,i.Z)(e,b),C=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[200],light:m[50],dark:m[400]}:{main:m[700],light:m[400],dark:m[800]}}(n),M=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[200],light:h[50],dark:h[400]}:{main:h[500],light:h[300],dark:h[700]}}(n),P=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[500],light:p[300],dark:p[700]}:{main:p[700],light:p[400],dark:p[800]}}(n),T=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[400],light:g[300],dark:g[700]}:{main:g[700],light:g[500],dark:g[900]}}(n),E=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(n),Z=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:"#ed6c02",light:v[500],dark:v[900]}}(n);function A(e){return(0,c.mi)(e,w.text.primary)>=s?w.text.primary:x.text.primary}var R=function(e){var t=e.color,n=e.name,i=e.mainShade,o=void 0===i?500:i,a=e.lightShade,s=void 0===a?300:a,l=e.darkShade,c=void 0===l?700:l;if(!(t=(0,r.Z)({},t)).main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,u.Z)(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error((0,u.Z)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return k(t,"light",s,S),k(t,"dark",c,S),t.contrastText||(t.contrastText=A(t.main)),t},D={dark:w,light:x};return(0,o.Z)((0,r.Z)({common:f,mode:n,primary:R({color:C,name:"primary"}),secondary:R({color:M,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:R({color:P,name:"error"}),warning:R({color:Z,name:"warning"}),info:R({color:T,name:"info"}),success:R({color:E,name:"success"}),grey:d,contrastThreshold:s,getContrastText:A,augmentColor:R,tonalOffset:S},D[n]),O)}var O=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];var C={textTransform:"uppercase"},M='"Roboto", "Helvetica", "Arial", sans-serif';function P(e,t){var n="function"===typeof t?t(e):t,a=n.fontFamily,s=void 0===a?M:a,l=n.fontSize,u=void 0===l?14:l,c=n.fontWeightLight,f=void 0===c?300:c,d=n.fontWeightRegular,h=void 0===d?400:d,p=n.fontWeightMedium,v=void 0===p?500:p,m=n.fontWeightBold,g=void 0===m?700:m,y=n.htmlFontSize,b=void 0===y?16:y,x=n.allVariants,w=n.pxToRem,k=(0,i.Z)(n,O);var S=u/14,P=w||function(e){return"".concat(e/b*S,"rem")},T=function(e,t,n,i,o){return(0,r.Z)({fontFamily:s,fontWeight:e,fontSize:P(t),lineHeight:n},s===M?{letterSpacing:"".concat((a=i/t,Math.round(1e5*a)/1e5),"em")}:{},o,x);var a},E={h1:T(f,96,1.167,-1.5),h2:T(f,60,1.2,-.5),h3:T(h,48,1.167,0),h4:T(h,34,1.235,.25),h5:T(h,24,1.334,0),h6:T(v,20,1.6,.15),subtitle1:T(h,16,1.75,.15),subtitle2:T(v,14,1.57,.1),body1:T(h,16,1.5,.15),body2:T(h,14,1.43,.15),button:T(v,14,1.75,.4,C),caption:T(h,12,1.66,.4),overline:T(h,12,2.66,1,C)};return(0,o.Z)((0,r.Z)({htmlFontSize:b,pxToRem:P,fontFamily:s,fontSize:u,fontWeightLight:f,fontWeightRegular:h,fontWeightMedium:v,fontWeightBold:g},E),k,{clone:!1})}function T(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var E=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)],Z=n(5829),A={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},R=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mixins,n=void 0===t?{}:t,s=e.palette,u=void 0===s?{}:s,c=e.transitions,f=void 0===c?{}:c,d=e.typography,h=void 0===d?{}:d,p=(0,i.Z)(e,R),v=S(u),m=(0,a.Z)(e),g=(0,o.Z)(m,{mixins:l(m.breakpoints,m.spacing,n),palette:v,shadows:E.slice(),typography:P(v,h),transitions:(0,Z.ZP)(f),zIndex:(0,r.Z)({},A)});g=(0,o.Z)(g,p);for(var y=arguments.length,b=new Array(y>1?y-1:0),x=1;x<y;x++)b[x-1]=arguments[x];return g=b.reduce((function(e,t){return(0,o.Z)(e,t)}),g)}var j=D},5829:function(e,t,n){"use strict";n.d(t,{x9:function(){return s},ZP:function(){return c}});var r=n(3366),i=n(7462),o=["duration","easing","delay"],a={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)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}function u(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}function c(e){var t=(0,i.Z)({},a,e.easing),n=(0,i.Z)({},s,e.duration);return(0,i.Z)({getAutoHeightDuration:u,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.duration,s=void 0===a?n.standard:a,u=i.easing,c=void 0===u?t.easeInOut:u,f=i.delay,d=void 0===f?0:f;(0,r.Z)(i,o);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof s?s:l(s)," ").concat(c," ").concat("string"===typeof d?d:l(d))})).join(",")}},e,{easing:t,duration:n})}},2248:function(e,t,n){"use strict";var r=(0,n(7458).Z)();t.Z=r},8564:function(e,t,n){"use strict";n.d(t,{ZP:function(){return M},FO:function(){return S},Dz:function(){return O}});var r=n(3433),i=n(7462),o=n(3366),a=n(297),s=n(9456),l=n(3649),u=n(114),c=["variant"];function f(e){return 0===e.length}function d(e){var t=e.variant,n=(0,o.Z)(e,c),r=t||"";return Object.keys(n).sort().forEach((function(t){r+="color"===t?f(r)?e[t]:(0,u.Z)(e[t]):"".concat(f(r)?t:(0,u.Z)(t)).concat((0,u.Z)(e[t].toString()))})),r}var h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],p=["theme"],v=["theme"];function m(e){return 0===Object.keys(e).length}var g=function(e,t){return t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null},y=function(e,t){var n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);var r={};return n.forEach((function(e){var t=d(e.props);r[t]=e.style})),r},b=function(e,t,n,r){var i,o,a=e.ownerState,s=void 0===a?{}:a,l=[],u=null==n||null==(i=n.components)||null==(o=i[r])?void 0:o.variants;return u&&u.forEach((function(n){var r=!0;Object.keys(n.props).forEach((function(t){s[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&l.push(t[d(n.props)])})),l};function x(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}var w=(0,s.Z)();var k=n(2248),S=function(e){return x(e)&&"classes"!==e},O=x,C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=void 0===t?w:t,s=e.rootShouldForwardProp,u=void 0===s?x:s,c=e.slotShouldForwardProp,f=void 0===c?x:c;return function(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=s.name,d=s.slot,w=s.skipVariantsResolver,k=s.skipSx,S=s.overridesResolver,O=(0,o.Z)(s,h),C=void 0!==w?w:d&&"Root"!==d||!1,M=k||!1;var P=x;"Root"===d?P=u:d&&(P=f);var T=(0,a.ZP)(e,(0,i.Z)({shouldForwardProp:P,label:t},O)),E=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),s=1;s<t;s++)a[s-1]=arguments[s];var u=a?a.map((function(e){return"function"===typeof e&&e.__emotion_real!==e?function(t){var r=t.theme,a=(0,o.Z)(t,p);return e((0,i.Z)({theme:m(r)?n:r},a))}:e})):[],f=e;c&&S&&u.push((function(e){var t=m(e.theme)?n:e.theme,r=g(c,t);return r?S(e,r):null})),c&&!C&&u.push((function(e){var t=m(e.theme)?n:e.theme;return b(e,y(c,t),t,c)})),M||u.push((function(e){var t=m(e.theme)?n:e.theme;return(0,l.Z)((0,i.Z)({},e,{theme:t}))}));var d=u.length-a.length;if(Array.isArray(e)&&d>0){var h=new Array(d).fill("");(f=[].concat((0,r.Z)(e),(0,r.Z)(h))).raw=[].concat((0,r.Z)(e.raw),(0,r.Z)(h))}else"function"===typeof e&&(f=function(t){var r=t.theme,a=(0,o.Z)(t,v);return e((0,i.Z)({theme:m(r)?n:r},a))});var x=T.apply(void 0,[f].concat((0,r.Z)(u)));return x};return E}}({defaultTheme:k.Z,rootShouldForwardProp:S}),M=C},5469:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(4290),i=n(6728);var o=n(2248);function a(e){return function(e){var t=e.props,n=e.name,o=e.defaultTheme,a=(0,i.Z)(o);return(0,r.Z)({theme:a,name:n,props:t})}({props:e.props,name:e.name,defaultTheme:o.Z})}},1615:function(e,t,n){"use strict";var r=n(114);t.Z=r.Z},4750:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(7462),i=n(7313),o=n(210),a=n(6417);function s(e,t){var n=function(n,i){return(0,a.jsx)(o.Z,(0,r.Z)({"data-testid":"".concat(t,"Icon"),ref:i},n,{children:e}))};return n.muiName=o.Z.muiName,i.memo(i.forwardRef(n))}},8706:function(e,t,n){"use strict";var r=n(4312);t.Z=r.Z},6415:function(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:function(){return r.Z},createChainedFunction:function(){return i},createSvgIcon:function(){return o.Z},debounce:function(){return a.Z},deprecatedPropType:function(){return s},isMuiElement:function(){return l.Z},ownerDocument:function(){return u.Z},ownerWindow:function(){return c.Z},requirePropFactory:function(){return f},setRef:function(){return d},unstable_ClassNameGenerator:function(){return x.Z},unstable_useEnhancedEffect:function(){return h.Z},unstable_useId:function(){return p.Z},unsupportedProp:function(){return v},useControlled:function(){return m.Z},useEventCallback:function(){return g.Z},useForkRef:function(){return y.Z},useIsFocusVisible:function(){return b.Z}});var r=n(1615),i=n(4246).Z,o=n(4750),a=n(8706);var s=function(e,t){return function(){return null}},l=n(7816),u=n(6106),c=n(3533);n(7462);var f=function(e,t){return function(){return null}},d=n(9265).Z,h=n(4993),p=n(7677);var v=function(e,t,n,r,i){return null},m=n(522),g=n(3236),y=n(6983),b=n(9127),x=n(672)},7816:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7313);var i=function(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},6106:function(e,t,n){"use strict";var r=n(9081);t.Z=r.Z},3533:function(e,t,n){"use strict";var r=n(3282);t.Z=r.Z},522:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9439),i=n(7313);var o=function(e){var t=e.controlled,n=e.default,o=(e.name,e.state,i.useRef(void 0!==t).current),a=i.useState(n),s=(0,r.Z)(a,2),l=s[0],u=s[1];return[o?t:l,i.useCallback((function(e){o||u(e)}),[])]}},4993:function(e,t,n){"use strict";var r=n(2678);t.Z=r.Z},3236:function(e,t,n){"use strict";var r=n(2780);t.Z=r.Z},6983:function(e,t,n){"use strict";var r=n(7472);t.Z=r.Z},7677:function(e,t,n){"use strict";var r=n(3362);t.Z=r.Z},9127:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r,i=n(7313),o=!0,a=!1,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function u(){o=!1}function c(){"hidden"===this.visibilityState&&a&&(o=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return o||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!s[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}var d=function(){var e=i.useCallback((function(e){var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",c,!0))}),[]),t=i.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!f(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,window.clearTimeout(r),r=window.setTimeout((function(){a=!1}),100),t.current=!1,!0)},ref:e}}},5693:function(e,t,n){"use strict";var r=n(7313).createContext(null);t.Z=r},201:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7313),i=n(5693);function o(){return r.useContext(i.Z)}},297:function(e,t,n){"use strict";n.d(t,{ZP:function(){return b}});var r=n(7313),i=n(7462),o=n(3390),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,o.Z)((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(1639),u=n(4911),c=n(4544),f=s,d=function(e){return"theme"!==e},h=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?f:d},p=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},v=function(){return null},m=function e(t,n){var o,a,s=t.__emotion_real===t,f=s&&t.__emotion_base||t;void 0!==n&&(o=n.label,a=n.target);var d=p(t,n,s),m=d||h(f),g=!m("as");return function(){var y=arguments,b=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&b.push("label:"+o+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{0,b.push(y[0][0]);for(var x=y.length,w=1;w<x;w++)b.push(y[w],y[0][w])}var k=(0,l.w)((function(e,t,n){var i=g&&e.as||f,o="",s=[],p=e;if(null==e.theme){for(var y in p={},e)p[y]=e[y];p.theme=(0,r.useContext)(l.T)}"string"===typeof e.className?o=(0,u.f)(t.registered,s,e.className):null!=e.className&&(o=e.className+" ");var x=(0,c.O)(b.concat(s),t.registered,p);(0,u.M)(t,x,"string"===typeof i);o+=t.key+"-"+x.name,void 0!==a&&(o+=" "+a);var w=g&&void 0===d?h(i):m,k={};for(var S in e)g&&"as"===S||w(S)&&(k[S]=e[S]);k.className=o,k.ref=n;var O=(0,r.createElement)(i,k),C=(0,r.createElement)(v,null);return(0,r.createElement)(r.Fragment,null,C,O)}));return k.displayName=void 0!==o?o:"Styled("+("string"===typeof f?f:f.displayName||f.name||"Component")+")",k.defaultProps=t.defaultProps,k.__emotion_real=k,k.__emotion_base=f,k.__emotion_styles=b,k.__emotion_forwardProp=d,Object.defineProperty(k,"toString",{value:function(){return"."+a}}),k.withComponent=function(t,r){return e(t,(0,i.Z)({},n,r,{shouldForwardProp:p(k,r,!0)})).apply(void 0,b)},k}},g=m.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){g[e]=g(e)}));var y=g;function b(e,t){return y(e,t)}},4929:function(e,t,n){"use strict";n.d(t,{VO:function(){return r},k9:function(){return o},W8:function(){return a},L7:function(){return s},P$:function(){return l}});n(5192);var r={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(r[e],"px)")}};function o(e,t,n){var o=e.theme||{};if(Array.isArray(t)){var a=o.breakpoints||i;return t.reduce((function(e,r,i){return e[a.up(a.keys[i])]=n(t[i]),e}),{})}if("object"===typeof t){var s=o.breakpoints||i;return Object.keys(t).reduce((function(e,i){if(-1!==Object.keys(s.values||r).indexOf(i)){e[s.up(i)]=n(t[i],i)}else{var o=i;e[o]=t[o]}return e}),{})}return n(t)}function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=null==t||null==(e=t.keys)?void 0:e.reduce((function(e,n){return e[t.up(n)]={},e}),{});return n||{}}function s(e,t){return e.reduce((function(e,t){var n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function l(e){var t,n=e.values,r=e.breakpoints,i=e.base||function(e,t){if("object"!==typeof e)return{};var n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((function(t,r){r<e.length&&(n[t]=!0)})):r.forEach((function(t){null!=e[t]&&(n[t]=!0)})),n}(n,r),o=Object.keys(i);return 0===o.length?n:o.reduce((function(e,r,i){return Array.isArray(n)?(e[r]=null!=n[i]?n[i]:n[t],t=i):(e[r]=null!=n[r]?n[r]:n[t]||n,t=r),e}),{})}},7551:function(e,t,n){"use strict";n.d(t,{mi:function(){return l},Fq:function(){return u},_j:function(){return c},$n:function(){return f},_4:function(){return d}});var r=n(7219);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.Z)(9,e));var i,a=e.substring(t+1,e.length-1);if("color"===n){if(i=(a=a.split(" ")).shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].substr(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,r.Z)(10,i))}else a=a.split(",");return{type:n,values:a=a.map((function(e){return parseFloat(e)})),colorSpace:i}}function a(e){var t=e.type,n=e.colorSpace,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function s(e){var t="hsl"===(e=o(e)).type?o(function(e){var t=(e=o(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",c=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),a({type:u,values:c})}(e)).values:e.values;return t=t.map((function(t){return"color"!==e.type&&(t/=255),t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){var n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,a(e)}function c(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function f(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(var r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return a(e)}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return s(e)>.5?c(e,t):f(e,t)}},9456:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(7462),i=n(3366),o=n(3019),a=["values","unit","step"];function s(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:900,lg:1200,xl:1536}:t,o=e.unit,s=void 0===o?"px":o,l=e.step,u=void 0===l?5:l,c=(0,i.Z)(e,a),f=Object.keys(n);function d(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function h(e){var t="number"===typeof n[e]?n[e]:e;return"@media (max-width:".concat(t-u/100).concat(s,")")}function p(e,t){var r=f.indexOf(t);return"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[f[r]]?n[f[r]]:t)-u/100).concat(s,")")}return(0,r.Z)({keys:f,values:n,up:d,down:h,between:p,only:function(e){return f.indexOf(e)+1<f.length?p(e,f[f.indexOf(e)+1]):d(e)},not:function(e){var t=f.indexOf(e);return 0===t?d(f[1]):t===f.length-1?h(f[t]):p(e,f[f.indexOf(e)+1]).replace("@media","@media not all and")},unit:s},c)}var l={borderRadius:4},u=n(6886);function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=(0,u.hB)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=0===n.length?[1]:n;return i.map((function(e){var n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return n.mui=!0,n}var f=["breakpoints","palette","spacing","shape"];var d=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,a=e.palette,u=void 0===a?{}:a,d=e.spacing,h=e.shape,p=void 0===h?{}:h,v=(0,i.Z)(e,f),m=s(n),g=c(d),y=(0,o.Z)({breakpoints:m,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},u),spacing:g,shape:(0,r.Z)({},l,p)},v),b=arguments.length,x=new Array(b>1?b-1:0),w=1;w<b;w++)x[w-1]=arguments[w];return y=x.reduce((function(e,t){return(0,o.Z)(e,t)}),y)}},9716:function(e,t,n){"use strict";n.d(t,{Z:function(){return Y},G:function(){return X}});var r=n(4942),i=n(6428),o=n(7330);var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce((function(e,t){return t.filterProps.forEach((function(n){e[n]=t})),e}),{}),i=function(e){return Object.keys(e).reduce((function(t,n){return r[n]?(0,o.Z)(t,r[n](e)):t}),{})};return i.propTypes={},i.filterProps=t.reduce((function(e,t){return e.concat(t.filterProps)}),[]),i},s=n(6886),l=n(4929);function u(e){return"number"!==typeof e?e:"".concat(e,"px solid")}var c=(0,i.Z)({prop:"border",themeKey:"borders",transform:u}),f=(0,i.Z)({prop:"borderTop",themeKey:"borders",transform:u}),d=(0,i.Z)({prop:"borderRight",themeKey:"borders",transform:u}),h=(0,i.Z)({prop:"borderBottom",themeKey:"borders",transform:u}),p=(0,i.Z)({prop:"borderLeft",themeKey:"borders",transform:u}),v=(0,i.Z)({prop:"borderColor",themeKey:"palette"}),m=(0,i.Z)({prop:"borderTopColor",themeKey:"palette"}),g=(0,i.Z)({prop:"borderRightColor",themeKey:"palette"}),y=(0,i.Z)({prop:"borderBottomColor",themeKey:"palette"}),b=(0,i.Z)({prop:"borderLeftColor",themeKey:"palette"}),x=function(e){if(void 0!==e.borderRadius&&null!==e.borderRadius){var t=(0,s.eI)(e.theme,"shape.borderRadius",4,"borderRadius");return(0,l.k9)(e,e.borderRadius,(function(e){return{borderRadius:(0,s.NA)(t,e)}}))}return null};x.propTypes={},x.filterProps=["borderRadius"];var w=a(c,f,d,h,p,v,m,g,y,b,x),k=a((0,i.Z)({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),(0,i.Z)({prop:"display"}),(0,i.Z)({prop:"overflow"}),(0,i.Z)({prop:"textOverflow"}),(0,i.Z)({prop:"visibility"}),(0,i.Z)({prop:"whiteSpace"})),S=a((0,i.Z)({prop:"flexBasis"}),(0,i.Z)({prop:"flexDirection"}),(0,i.Z)({prop:"flexWrap"}),(0,i.Z)({prop:"justifyContent"}),(0,i.Z)({prop:"alignItems"}),(0,i.Z)({prop:"alignContent"}),(0,i.Z)({prop:"order"}),(0,i.Z)({prop:"flex"}),(0,i.Z)({prop:"flexGrow"}),(0,i.Z)({prop:"flexShrink"}),(0,i.Z)({prop:"alignSelf"}),(0,i.Z)({prop:"justifyItems"}),(0,i.Z)({prop:"justifySelf"})),O=function(e){if(void 0!==e.gap&&null!==e.gap){var t=(0,s.eI)(e.theme,"spacing",8,"gap");return(0,l.k9)(e,e.gap,(function(e){return{gap:(0,s.NA)(t,e)}}))}return null};O.propTypes={},O.filterProps=["gap"];var C=function(e){if(void 0!==e.columnGap&&null!==e.columnGap){var t=(0,s.eI)(e.theme,"spacing",8,"columnGap");return(0,l.k9)(e,e.columnGap,(function(e){return{columnGap:(0,s.NA)(t,e)}}))}return null};C.propTypes={},C.filterProps=["columnGap"];var M=function(e){if(void 0!==e.rowGap&&null!==e.rowGap){var t=(0,s.eI)(e.theme,"spacing",8,"rowGap");return(0,l.k9)(e,e.rowGap,(function(e){return{rowGap:(0,s.NA)(t,e)}}))}return null};M.propTypes={},M.filterProps=["rowGap"];var P=a(O,C,M,(0,i.Z)({prop:"gridColumn"}),(0,i.Z)({prop:"gridRow"}),(0,i.Z)({prop:"gridAutoFlow"}),(0,i.Z)({prop:"gridAutoColumns"}),(0,i.Z)({prop:"gridAutoRows"}),(0,i.Z)({prop:"gridTemplateColumns"}),(0,i.Z)({prop:"gridTemplateRows"}),(0,i.Z)({prop:"gridTemplateAreas"}),(0,i.Z)({prop:"gridArea"})),T=a((0,i.Z)({prop:"position"}),(0,i.Z)({prop:"zIndex",themeKey:"zIndex"}),(0,i.Z)({prop:"top"}),(0,i.Z)({prop:"right"}),(0,i.Z)({prop:"bottom"}),(0,i.Z)({prop:"left"})),E=a((0,i.Z)({prop:"color",themeKey:"palette"}),(0,i.Z)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),(0,i.Z)({prop:"backgroundColor",themeKey:"palette"})),Z=(0,i.Z)({prop:"boxShadow",themeKey:"shadows"});function A(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}var R=(0,i.Z)({prop:"width",transform:A}),D=function(e){if(void 0!==e.maxWidth&&null!==e.maxWidth){return(0,l.k9)(e,e.maxWidth,(function(t){var n,r,i;return{maxWidth:(null==(n=e.theme)||null==(r=n.breakpoints)||null==(i=r.values)?void 0:i[t])||l.VO[t]||A(t)}}))}return null};D.filterProps=["maxWidth"];var j=(0,i.Z)({prop:"minWidth",transform:A}),_=(0,i.Z)({prop:"height",transform:A}),N=(0,i.Z)({prop:"maxHeight",transform:A}),L=(0,i.Z)({prop:"minHeight",transform:A}),I=((0,i.Z)({prop:"size",cssProperty:"width",transform:A}),(0,i.Z)({prop:"size",cssProperty:"height",transform:A}),a(R,D,j,_,N,L,(0,i.Z)({prop:"boxSizing"}))),z=(0,i.Z)({prop:"fontFamily",themeKey:"typography"}),B=(0,i.Z)({prop:"fontSize",themeKey:"typography"}),F=(0,i.Z)({prop:"fontStyle",themeKey:"typography"}),$=(0,i.Z)({prop:"fontWeight",themeKey:"typography"}),W=(0,i.Z)({prop:"letterSpacing"}),H=(0,i.Z)({prop:"lineHeight"}),V=(0,i.Z)({prop:"textAlign"}),q=a((0,i.Z)({prop:"typography",cssProperty:!1,themeKey:"typography"}),z,B,F,$,W,H,V),U={borders:w.filterProps,display:k.filterProps,flexbox:S.filterProps,grid:P.filterProps,positions:T.filterProps,palette:E.filterProps,shadows:Z.filterProps,sizing:I.filterProps,spacing:s.ZP.filterProps,typography:q.filterProps},Q={borders:w,display:k,flexbox:S,grid:P,positions:T,palette:E,shadows:Z,sizing:I,spacing:s.ZP,typography:q},X=Object.keys(U).reduce((function(e,t){return U[t].forEach((function(n){e[n]=Q[t]})),e}),{});var Y=function(e,t,n){var i,o=(i={},(0,r.Z)(i,e,t),(0,r.Z)(i,"theme",n),i),a=X[e];return a?a(o):(0,r.Z)({},e,t)}},7330:function(e,t,n){"use strict";var r=n(3019);t.Z=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},6886:function(e,t,n){"use strict";n.d(t,{hB:function(){return v},eI:function(){return p},ZP:function(){return k},NA:function(){return m}});var r=n(9439),i=n(4929),o=n(6428),a=n(7330);var s={m:"margin",p:"padding"},l={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},u={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!u[e])return[e];e=u[e]}var t=e.split(""),n=(0,r.Z)(t,2),i=n[0],o=n[1],a=s[i],c=l[o]||"";return Array.isArray(c)?c.map((function(e){return a+e})):[a+c]})),f=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[].concat(f,d);function p(e,t,n,r){var i=(0,o.D)(e,t)||n;return"number"===typeof i?function(e){return"string"===typeof e?e:i*e}:Array.isArray(i)?function(e){return"string"===typeof e?e:i[e]}:"function"===typeof i?i:function(){}}function v(e){return p(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function g(e,t,n,r){if(-1===t.indexOf(n))return null;var o=function(e,t){return function(n){return e.reduce((function(e,r){return e[r]=m(t,n),e}),{})}}(c(n),r),a=e[n];return(0,i.k9)(e,a,o)}function y(e,t){var n=v(e.theme);return Object.keys(e).map((function(r){return g(e,t,r,n)})).reduce(a.Z,{})}function b(e){return y(e,f)}function x(e){return y(e,d)}function w(e){return y(e,h)}b.propTypes={},b.filterProps=f,x.propTypes={},x.filterProps=d,w.propTypes={},w.filterProps=h;var k=w},6428:function(e,t,n){"use strict";n.d(t,{D:function(){return a}});var r=n(4942),i=n(114),o=n(4929);function a(e,t){return t&&"string"===typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}function s(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:a(e,n)||i,t&&(r=t(r)),r}t.Z=function(e){var t=e.prop,n=e.cssProperty,l=void 0===n?e.prop:n,u=e.themeKey,c=e.transform,f=function(e){if(null==e[t])return null;var n=e[t],f=a(e.theme,u)||{};return(0,o.k9)(e,n,(function(e){var n=s(f,c,e);return e===n&&"string"===typeof e&&(n=s(f,c,"".concat(t).concat("default"===e?"":(0,i.Z)(e)),e)),!1===l?n:(0,r.Z)({},l,n)}))};return f.propTypes={},f.filterProps=[t],f}},3649:function(e,t,n){"use strict";var r=n(4942),i=n(7330),o=n(9716),a=n(4929);function s(e){var t=e||{},n=t.sx,l=t.theme,u=void 0===l?{}:l;if(!n)return null;function c(e){var t=e;if("function"===typeof e)t=e(u);else if("object"!==typeof e)return e;var n=(0,a.W8)(u.breakpoints),l=Object.keys(n),c=n;return Object.keys(t).forEach((function(e){var n,l,f=(n=t[e],l=u,"function"===typeof n?n(l):n);if(null!==f&&void 0!==f)if("object"===typeof f)if(o.G[e])c=(0,i.Z)(c,(0,o.Z)(e,f,u));else{var d=(0,a.k9)({theme:u},f,(function(t){return(0,r.Z)({},e,t)}));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce((function(e,t){return e.concat(Object.keys(t))}),[]),i=new Set(r);return t.every((function(e){return i.size===Object.keys(e).length}))}(d,f)?c=(0,i.Z)(c,d):c[e]=s({sx:f,theme:u})}else c=(0,i.Z)(c,(0,o.Z)(e,f,u))})),(0,a.L7)(l,c)}return Array.isArray(n)?n.map(c):c(n)}s.filterProps=["sx"],t.Z=s},6728:function(e,t,n){"use strict";var r=n(9456),i=n(4976),o=(0,r.Z)();t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;return(0,i.Z)(e)}},4290:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9023);function i(e){var t=e.theme,n=e.name,i=e.props;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,i):i}},4976:function(e,t,n){"use strict";var r=n(201);function i(e){return 0===Object.keys(e).length}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=(0,r.Z)();return!t||i(t)?e:t}},114:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7219);function i(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},4246:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}n.d(t,{Z:function(){return r}})},4312:function(e,t,n){"use strict";function r(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){e.apply(r,o)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}n.d(t,{Z:function(){return r}})},3019:function(e,t,n){"use strict";n.d(t,{P:function(){return i},Z:function(){return o}});var r=n(7462);function i(e){return null!==e&&"object"===typeof e&&e.constructor===Object}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},a=n.clone?(0,r.Z)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e&&i(e[r])?a[r]=o(e[r],t[r],n):a[r]=t[r])})),a}},7219:function(e,t,n){"use strict";function r(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{Z:function(){return r}})},9081:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:function(){return r}})},3282:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9081);function i(e){return(0,r.Z)(e).defaultView||window}},9023:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7462);function i(e,t){var n=(0,r.Z)({},t);return Object.keys(e).forEach((function(t){void 0===n[t]&&(n[t]=e[t])})),n}},9265:function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:function(){return r}})},2678:function(e,t,n){"use strict";var r=n(7313),i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;t.Z=i},2780:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7313),i=n(2678);function o(e){var t=r.useRef(e);return(0,i.Z)((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},7472:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7313),i=n(9265);function o(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){(0,i.Z)(e,n),(0,i.Z)(t,n)}}),[e,t])}},3362:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9439),i=n(7313),o=0;function a(e){var t=i.useState(e),n=(0,r.Z)(t,2),a=n[0],s=n[1],l=e||a;return i.useEffect((function(){null==a&&s("mui-".concat(o+=1))}),[a]),l}},4680:function(e,t,n){"use strict";var r=n(8476),i=n(9962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},9962:function(e,t,n){"use strict";var r=n(1199),i=n(8476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),u=i("%Object.defineProperty%",!0),c=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(d){u=null}e.exports=function(e){var t=s(r,a,arguments);if(l&&u){var n=l(t,"length");n.configurable&&u(t,"length",{value:1+c(0,e.length-(arguments.length-1))})}return t};var f=function(){return s(r,o,arguments)};u?u(e.exports,"apply",{value:f}):e.exports.apply=f},3061:function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"===typeof e||"number"===typeof e)i+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function i(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}n.r(t),n.d(t,{default:function(){return i}})},658:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",o="minute",a="hour",s="day",l="week",u="month",c="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,u),o=n-i<0,a=t.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:l,d:s,D:d,h:a,m:o,s:i,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",x={};x[b]=m;var w=function(e){return e instanceof C},k=function(e,t,n){var r;if(!e)return b;if("string"==typeof e)x[e]&&(r=e),t&&(x[e]=t,r=e);else{var i=e.name;x[i]=e,r=i}return!n&&r&&(b=r),r||!n&&b},S=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},O=y;O.l=k,O.i=w,O.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=k(e.locale,null,!0),this.parse(e)}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(O.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return O},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<S(e)},g.$g=function(e,t,n){return O.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!O.u(t)||t,c=O.p(e),h=function(e,t){var i=O.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},p=function(e,t){return O.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,m=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case f:return r?h(1,0):h(31,11);case u:return r?h(1,m):h(0,m+1);case l:var b=this.$locale().weekStart||0,x=(v<b?v+7:v)-b;return h(r?g-x:g+(6-x),m);case s:case d:return p(y+"Hours",0);case a:return p(y+"Minutes",1);case o:return p(y+"Seconds",2);case i:return p(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,l=O.p(e),c="set"+(this.$u?"UTC":""),h=(n={},n[s]=c+"Date",n[d]=c+"Date",n[u]=c+"Month",n[f]=c+"FullYear",n[a]=c+"Hours",n[o]=c+"Minutes",n[i]=c+"Seconds",n[r]=c+"Milliseconds",n)[l],p=l===s?this.$D+(t-this.$W):t;if(l===u||l===f){var v=this.clone().set(d,1);v.$d[h](p),v.init(),this.$d=v.set(d,Math.min(this.$D,v.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[O.p(e)]()},g.add=function(r,c){var d,h=this;r=Number(r);var p=O.p(c),v=function(e){var t=S(h);return O.w(t.date(t.date()+Math.round(e*r)),h)};if(p===u)return this.set(u,this.$M+r);if(p===f)return this.set(f,this.$y+r);if(p===s)return v(1);if(p===l)return v(7);var m=(d={},d[o]=t,d[a]=n,d[i]=e,d)[p]||1,g=this.$d.getTime()+r*m;return O.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),o=this.$H,a=this.$m,s=this.$M,l=n.weekdays,u=n.months,c=function(e,n,i,o){return e&&(e[n]||e(t,r))||i[n].substr(0,o)},f=function(e){return O.s(o%12||12,e,"0")},d=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:O.s(s+1,2,"0"),MMM:c(n.monthsShort,s,u,3),MMMM:c(u,s),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:c(n.weekdaysMin,this.$W,l,2),ddd:c(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(o),HH:O.s(o,2,"0"),h:f(1),hh:f(2),a:d(o,a,!0),A:d(o,a,!1),m:String(a),mm:O.s(a,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(v,(function(e,t){return t||p[e]||i.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,d,h){var p,v=O.p(d),m=S(r),g=(m.utcOffset()-this.utcOffset())*t,y=this-m,b=O.m(this,m);return b=(p={},p[f]=b/12,p[u]=b,p[c]=b/3,p[l]=(y-g)/6048e5,p[s]=(y-g)/864e5,p[a]=y/n,p[o]=y/t,p[i]=y/e,p)[v]||y,h?b:O.a(b)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return x[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=k(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return O.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),M=C.prototype;return S.prototype=M,[["$ms",r],["$s",i],["$m",o],["$H",a],["$W",s],["$M",u],["$y",f],["$D",d]].forEach((function(e){M[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,C,S),e.$i=!0),S},S.locale=k,S.isDayjs=w,S.unix=function(e){return S(1e3*e)},S.en=x[b],S.Ls=x,S.p={},S}()},7798:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},a=function(e){return(e=+e)+(e>68?1900:2e3)},s=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},c=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},f={A:[i,function(e){this.afternoon=c(e,!1)}],a:[i,function(e){this.afternoon=c(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,s("seconds")],ss:[r,s("seconds")],m:[r,s("minutes")],mm:[r,s("minutes")],H:[r,s("hours")],h:[r,s("hours")],HH:[r,s("hours")],hh:[r,s("hours")],D:[r,s("day")],DD:[n,s("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,s("month")],MM:[n,s("month")],MMM:[i,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.substr(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,s("year")],YY:[n,function(e){this.year=a(e)}],YYYY:[/\d{4}/,s("year")],Z:l,ZZ:l};function d(n){var r,i;r=n,i=o&&o.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,l=0;l<s;l+=1){var u=a[l],c=f[u],d=c&&c[0],h=c&&c[1];a[l]=h?{regex:d,parser:h}:u.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if("string"==typeof i)r+=i.length;else{var o=i.regex,l=i.parser,u=e.substr(r),c=o.exec(u)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if("string"==typeof s){var l=!0===a[2],u=!0===a[3],c=l||u,f=a[2];u&&(f=a[2]),o=this.$locale(),!l&&f&&(o=n.Ls[f]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=d(t)(e),i=r.year,o=r.month,a=r.day,s=r.hours,l=r.minutes,u=r.seconds,c=r.milliseconds,f=r.zone,h=new Date,p=a||(i||o?1:h.getDate()),v=i||h.getFullYear(),m=0;i&&!o||(m=o>0?o-1:h.getMonth());var g=s||0,y=l||0,b=u||0,x=c||0;return f?new Date(Date.UTC(v,m,p,g,y,b,x+60*f.offset*1e3)):n?new Date(Date.UTC(v,m,p,g,y,b,x)):new Date(v,m,p,g,y,b,x)}catch(e){return new Date("")}}(t,s,r),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),c&&t!=this.format(s)&&(this.$d=new Date("")),o={}}else if(s instanceof Array)for(var h=s.length,p=1;p<=h;p+=1){a[1]=s[p-1];var v=n.apply(this,a);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}p===h&&(this.$d=new Date(""))}else i.call(this,e)}}}()},6446:function(e){e.exports=function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,o=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,l=2592e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,c={years:s,months:l,days:o,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},f=function(e){return e instanceof y},d=function(e,t,n){return new y(e,n,t.$l)},h=function(e){return t.p(e)+"s"},p=function(e){return e<0},v=function(e){return p(e)?Math.ceil(e):Math.floor(e)},m=function(e){return Math.abs(e)},g=function(e,t){return e?p(e)?{negative:!0,format:""+m(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},y=function(){function p(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(e*c[h(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){r.$d[h(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var i=e.match(u);if(i){var o=i.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var m=p.prototype;return m.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*c[n]}),0)},m.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=v(e/s),e%=s,this.$d.months=v(e/l),e%=l,this.$d.days=v(e/o),e%=o,this.$d.hours=v(e/i),e%=i,this.$d.minutes=v(e/r),e%=r,this.$d.seconds=v(e/n),e%=n,this.$d.milliseconds=e},m.toISOString=function(){var e=g(this.$d.years,"Y"),t=g(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=g(n,"D"),i=g(this.$d.hours,"H"),o=g(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3);var s=g(a,"S"),l=e.negative||t.negative||r.negative||i.negative||o.negative||s.negative,u=i.format||o.format||s.format?"T":"",c=(l?"-":"")+"P"+e.format+t.format+r.format+u+i.format+o.format+s.format;return"P"===c||"-P"===c?"P0D":c},m.toJSON=function(){return this.toISOString()},m.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(a,(function(e,t){return t||String(r[e])}))},m.as=function(e){return this.$ms/c[h(e)]},m.get=function(e){var t=this.$ms,n=h(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?v(t/c[n]):this.$d[n],0===t?0:t},m.add=function(e,t,n){var r;return r=t?e*c[h(t)]:f(e)?e.$ms:d(e,this).$ms,d(this.$ms+r*(n?-1:1),this)},m.subtract=function(e,t){return this.add(e,t,!0)},m.locale=function(e){var t=this.clone();return t.$l=e,t},m.clone=function(){return d(this.$ms,this)},m.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},m.milliseconds=function(){return this.get("milliseconds")},m.asMilliseconds=function(){return this.as("milliseconds")},m.seconds=function(){return this.get("seconds")},m.asSeconds=function(){return this.as("seconds")},m.minutes=function(){return this.get("minutes")},m.asMinutes=function(){return this.as("minutes")},m.hours=function(){return this.get("hours")},m.asHours=function(){return this.as("hours")},m.days=function(){return this.get("days")},m.asDays=function(){return this.as("days")},m.weeks=function(){return this.get("weeks")},m.asWeeks=function(){return this.as("weeks")},m.months=function(){return this.get("months")},m.asMonths=function(){return this.as("months")},m.years=function(){return this.get("years")},m.asYears=function(){return this.as("years")},p}();return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){var n=i.locale();return d(e,{$l:n},t)},i.isDuration=f;var o=r.prototype.add,a=r.prototype.subtract;r.prototype.add=function(e,t){return f(e)&&(e=e.asMilliseconds()),o.bind(this)(e,t)},r.prototype.subtract=function(e,t){return f(e)&&(e=e.asMilliseconds()),a.bind(this)(e,t)}}}()},8743:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isBetween=function(e,t,r,i){var o=n(e),a=n(t),s="("===(i=i||"()")[0],l=")"===i[1];return(s?this.isAfter(o,r):!this.isBefore(o,r))&&(l?this.isBefore(a,r):!this.isAfter(a,r))||(s?this.isBefore(o,r):!this.isAfter(o,r))&&(l?this.isAfter(a,r):!this.isBefore(a,r))}}}()},3825:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var i=n.prototype,o=i.format;r.en.formats=e,i.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,i){var o=i&&i.toUpperCase();return r||n[i]||e[i]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return o.call(this,r)}}}()},1635:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,i,o){var a=i.prototype;o.utc=function(e){return new i({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(r,i){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?u.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var i=(""+r[0]).match(n)||["-",0,0],o=i[0],a=60*+i[1]+ +i[2];return 0===a?0:"+"===o?a:-a}(r)))return this;var a=Math.abs(r)<=16?60*r:r,s=this;if(i)return s.$offset=a,s.$u=0===r,s;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,e)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var r=this.local(),i=o(e).local();return d.call(r,i,t,n)}}}()},2781:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,i="[object Function]";e.exports=function(e){var o=this;if("function"!==typeof o||r.call(o)!==i)throw new TypeError(t+o);for(var a,s=n.call(arguments,1),l=function(){if(this instanceof a){var t=o.apply(this,s.concat(n.call(arguments)));return Object(t)===t?t:this}return o.apply(e,s.concat(n.call(arguments)))},u=Math.max(0,o.length-s.length),c=[],f=0;f<u;f++)c.push("$"+f);if(a=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(l),o.prototype){var d=function(){};d.prototype=o.prototype,a.prototype=new d,d.prototype=null}return a}},1199:function(e,t,n){"use strict";var r=n(2781);e.exports=Function.prototype.bind||r},8476:function(e,t,n){"use strict";var r,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(t){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(T){l=null}var u=function(){throw new a},c=l?function(){try{return u}catch(e){try{return l(arguments,"callee").get}catch(t){return u}}}():u,f=n(5520)(),d=Object.getPrototypeOf||function(e){return e.__proto__},h={},p="undefined"===typeof Uint8Array?r:d(Uint8Array),v={"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":f?d([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?d(d([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&f?d((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&f?d((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?d(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":c,"%TypedArray%":p,"%TypeError%":a,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet},m=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=d(i.prototype))}return v[t]=n,n},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=n(1199),b=n(7838),x=y.call(Function.call,Array.prototype.concat),w=y.call(Function.apply,Array.prototype.splice),k=y.call(Function.call,String.prototype.replace),S=y.call(Function.call,String.prototype.slice),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,M=function(e){var t=S(e,0,1),n=S(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return k(e,O,(function(e,t,n,i){r[r.length]=n?k(i,C,"$1"):t||e})),r},P=function(e,t){var n,r=e;if(b(g,r)&&(r="%"+(n=g[r])[0]+"%"),b(v,r)){var o=v[r];if(o===h&&(o=m(r)),"undefined"===typeof o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');var n=M(e),r=n.length>0?n[0]:"",o=P("%"+r+"%",t),s=o.name,u=o.value,c=!1,f=o.alias;f&&(r=f[0],w(n,x([0,1],f)));for(var d=1,h=!0;d<n.length;d+=1){var p=n[d],m=S(p,0,1),g=S(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&h||(c=!0),b(v,s="%"+(r+="."+p)+"%"))u=v[s];else if(null!=u){if(!(p in u)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&d+1>=n.length){var y=l(u,p);u=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:u[p]}else h=b(u,p),u=u[p];h&&!c&&(v[s]=u)}}return u}},5520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(e){"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7838:function(e,t,n){"use strict";var r=n(1199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},7861:function(e,t,n){"use strict";var r=n(2535),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var a=c(n);f&&(a=a.concat(f(n)));for(var s=l(t),v=l(n),m=0;m<a.length;++m){var g=a[m];if(!o[g]&&(!r||!r[g])&&(!v||!v[g])&&(!s||!s[g])){var y=d(n,g);try{u(t,g,y)}catch(b){}}}}return t}},229:function(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case f:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case d:case m:case v:case l:return e;default:return t}}case i:return t}}}function k(e){return w(e)===f}t.AsyncMode=c,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=m,t.Memo=v,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return k(e)||w(e)===c},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===v},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===f||e===s||e===a||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===g)},t.typeOf=w},2535:function(e,t,n){"use strict";e.exports=n(229)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return c.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,l,u=0,c=!1,f=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function b(e){return u=e,s=setTimeout(w,t),c?y(e):a}function x(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-u>=o}function w(){var e=p();if(x(e))return k(e);s=setTimeout(w,function(e){var n=t-(e-l);return f?h(n,o-(e-u)):n}(e))}function k(e){return s=void 0,g&&r?y(e):(r=i=void 0,a)}function S(){var e=p(),n=x(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return b(l);if(f)return s=setTimeout(w,t),y(l)}return void 0===s&&(s=setTimeout(w,t)),a}return t=m(t)||0,v(n)&&(c=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},S.flush=function(){return void 0===s?a:k(p())},S}},4007:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,l=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,g=Object.prototype,y=p["__core-js_shared__"],b=function(){var e=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),x=m.toString,w=g.hasOwnProperty,k=g.toString,S=RegExp("^"+x.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=p.Symbol,C=v.splice,M=L(p,"Map"),P=L(Object,"create"),T=O?O.prototype:void 0,E=T?T.toString:void 0;function Z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function A(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!==n&&r!==r)return i;return-1}function j(e,t){var n;t=function(e,t){if(F(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||W(e))return!0;return s.test(e)||!a.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:F(n=t)?n:I(n);for(var r=0,i=t.length;null!=e&&r<i;)e=e[z(t[r++])];return r&&r==i?e:void 0}function _(e){if(!$(e)||(t=e,b&&b in t))return!1;var t,n=function(e){var t=$(e)?k.call(e):"";return t==i||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?S:f;return n.test(function(e){if(null!=e){try{return x.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function N(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return _(n)?n:void 0}Z.prototype.clear=function(){this.__data__=P?P(null):{}},Z.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Z.prototype.get=function(e){var t=this.__data__;if(P){var n=t[e];return n===r?void 0:n}return w.call(t,e)?t[e]:void 0},Z.prototype.has=function(e){var t=this.__data__;return P?void 0!==t[e]:w.call(t,e)},Z.prototype.set=function(e,t){return this.__data__[e]=P&&void 0===t?r:t,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(e){var t=this.__data__,n=D(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),!0)},A.prototype.get=function(e){var t=this.__data__,n=D(t,e);return n<0?void 0:t[n][1]},A.prototype.has=function(e){return D(this.__data__,e)>-1},A.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new Z,map:new(M||A),string:new Z}},R.prototype.delete=function(e){return N(this,e).delete(e)},R.prototype.get=function(e){return N(this,e).get(e)},R.prototype.has=function(e){return N(this,e).has(e)},R.prototype.set=function(e,t){return N(this,e).set(e,t),this};var I=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(W(e))return E?E.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(u,(function(e,t,r,i){n.push(r?i.replace(c,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||W(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(B.Cache||R),n}B.Cache=R;var F=Array.isArray;function $(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:j(e,t);return void 0===r?n:r}},2061:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,f=u||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,s,l,u,c=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=i,r=o;return i=o=void 0,c=t,s=e.apply(r,n)}function x(e){return c=e,l=setTimeout(k,t),f?b(e):s}function w(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-c>=a}function k(){var e=v();if(w(e))return S(e);l=setTimeout(k,function(e){var n=t-(e-u);return d?p(n,a-(e-c)):n}(e))}function S(e){return l=void 0,m&&i?b(e):(i=o=void 0,s)}function O(){var e=v(),n=w(e);if(i=arguments,o=this,u=e,n){if(void 0===l)return x(u);if(d)return l=setTimeout(k,t),b(u)}return void 0===l&&(l=setTimeout(k,t)),s}return t=y(t)||0,g(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(y(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),O.cancel=function(){void 0!==l&&clearTimeout(l),c=0,i=u=o=l=void 0},O.flush=function(){return void 0===l?s:S(v())},O}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||s.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return g(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},2985:function(e,t,n){"use strict";var r=n(4575).default,i=n(3913).default,o=n(9808),a=Symbol("max"),s=Symbol("length"),l=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),f=Symbol("dispose"),d=Symbol("noDisposeOnSet"),h=Symbol("lruList"),p=Symbol("cache"),v=Symbol("updateAgeOnGet"),m=function(){return 1},g=function(){function e(t){if(r(this,e),"number"===typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!==typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[a]=t.max||1/0;var n=t.length||m;if(this[l]="function"!==typeof n?m:n,this[u]=t.stale||!1,t.maxAge&&"number"!==typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[f]=t.dispose,this[d]=t.noDisposeOnSet||!1,this[v]=t.updateAgeOnGet||!1,this.reset()}return i(e,[{key:"max",get:function(){return this[a]},set:function(e){if("number"!==typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,x(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!==typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,x(this)}},{key:"lengthCalculator",get:function(){return this[l]},set:function(e){var t=this;"function"!==typeof e&&(e=m),e!==this[l]&&(this[l]=e,this[s]=0,this[h].forEach((function(e){e.length=t[l](e.value,e.key),t[s]+=e.length}))),x(this)}},{key:"length",get:function(){return this[s]}},{key:"itemCount",get:function(){return this[h].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var n=this[h].tail;null!==n;){var r=n.prev;S(this,e,n,t),n=r}}},{key:"forEach",value:function(e,t){t=t||this;for(var n=this[h].head;null!==n;){var r=n.next;S(this,e,n,t),n=r}}},{key:"keys",value:function(){return this[h].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[h].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[f]&&this[h]&&this[h].length&&this[h].forEach((function(t){return e[f](t.key,t.value)})),this[p]=new Map,this[h]=new o,this[s]=0}},{key:"dump",value:function(){var e=this;return this[h].map((function(t){return!b(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[h]}},{key:"set",value:function(e,t,n){if((n=n||this[c])&&"number"!==typeof n)throw new TypeError("maxAge must be a number");var r=n?Date.now():0,i=this[l](t,e);if(this[p].has(e)){if(i>this[a])return w(this,this[p].get(e)),!1;var o=this[p].get(e).value;return this[f]&&(this[d]||this[f](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[s]+=i-o.length,o.length=i,this.get(e),x(this),!0}var u=new k(e,t,i,r,n);return u.length>this[a]?(this[f]&&this[f](e,t),!1):(this[s]+=u.length,this[h].unshift(u),this[p].set(e,this[h].head),x(this),!0)}},{key:"has",value:function(e){if(!this[p].has(e))return!1;var t=this[p].get(e).value;return!b(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[h].tail;return e?(w(this,e),e.value):null}},{key:"del",value:function(e){w(this,this[p].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),n=e.length-1;n>=0;n--){var r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{var o=i-t;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var e=this;this[p].forEach((function(t,n){return y(e,n,!1)}))}}]),e}(),y=function(e,t,n){var r=e[p].get(t);if(r){var i=r.value;if(b(e,i)){if(w(e,r),!e[u])return}else n&&(e[v]&&(r.value.now=Date.now()),e[h].unshiftNode(r));return i.value}},b=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},x=function(e){if(e[s]>e[a])for(var t=e[h].tail;e[s]>e[a]&&null!==t;){var n=t.prev;w(e,t),t=n}},w=function(e,t){if(t){var n=t.value;e[f]&&e[f](n.key,n.value),e[s]-=n.length,e[p].delete(n.key),e[h].removeNode(t)}},k=i((function e(t,n,i,o,a){r(this,e),this.key=t,this.value=n,this.length=i,this.now=o,this.maxAge=a||0})),S=function(e,t,n,r){var i=n.value;b(e,i)&&(w(e,n),e[u]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=g},1733:function(e,t,n){var r,i;r=function(){var e,t,n="2.0.6",r={},i={},o={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},a={currentLocale:o.currentLocale,zeroFormat:o.zeroFormat,nullFormat:o.nullFormat,defaultFormat:o.defaultFormat,scalePercentBy100:o.scalePercentBy100};function s(e,t){this._input=e,this._value=t}return(e=function(n){var i,o,l,u;if(e.isNumeral(n))i=n.value();else if(0===n||"undefined"===typeof n)i=0;else if(null===n||t.isNaN(n))i=null;else if("string"===typeof n)if(a.zeroFormat&&n===a.zeroFormat)i=0;else if(a.nullFormat&&n===a.nullFormat||!n.replace(/[^0-9]+/g,"").length)i=null;else{for(o in r)if((u="function"===typeof r[o].regexps.unformat?r[o].regexps.unformat():r[o].regexps.unformat)&&n.match(u)){l=r[o].unformat;break}i=(l=l||e._.stringToNumber)(n)}else i=Number(n)||null;return new s(n,i)}).version=n,e.isNumeral=function(e){return e instanceof s},e._=t={numberToFormat:function(t,n,r){var o,a,s,l,u,c,f,d=i[e.options.currentLocale],h=!1,p=!1,v=0,m="",g=1e12,y=1e9,b=1e6,x=1e3,w="",k=!1;if(t=t||0,a=Math.abs(t),e._.includes(n,"(")?(h=!0,n=n.replace(/[\(|\)]/g,"")):(e._.includes(n,"+")||e._.includes(n,"-"))&&(u=e._.includes(n,"+")?n.indexOf("+"):t<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),e._.includes(n,"a")&&(o=!!(o=n.match(/a(k|m|b|t)?/))&&o[1],e._.includes(n," a")&&(m=" "),n=n.replace(new RegExp(m+"a[kmbt]?"),""),a>=g&&!o||"t"===o?(m+=d.abbreviations.trillion,t/=g):a<g&&a>=y&&!o||"b"===o?(m+=d.abbreviations.billion,t/=y):a<y&&a>=b&&!o||"m"===o?(m+=d.abbreviations.million,t/=b):(a<b&&a>=x&&!o||"k"===o)&&(m+=d.abbreviations.thousand,t/=x)),e._.includes(n,"[.]")&&(p=!0,n=n.replace("[.]",".")),s=t.toString().split(".")[0],l=n.split(".")[1],c=n.indexOf(","),v=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,l?(e._.includes(l,"[")?(l=(l=l.replace("]","")).split("["),w=e._.toFixed(t,l[0].length+l[1].length,r,l[1].length)):w=e._.toFixed(t,l.length,r),s=w.split(".")[0],w=e._.includes(w,".")?d.delimiters.decimal+w.split(".")[1]:"",p&&0===Number(w.slice(1))&&(w="")):s=e._.toFixed(t,0,r),m&&!o&&Number(s)>=1e3&&m!==d.abbreviations.trillion)switch(s=String(Number(s)/1e3),m){case d.abbreviations.thousand:m=d.abbreviations.million;break;case d.abbreviations.million:m=d.abbreviations.billion;break;case d.abbreviations.billion:m=d.abbreviations.trillion}if(e._.includes(s,"-")&&(s=s.slice(1),k=!0),s.length<v)for(var S=v-s.length;S>0;S--)s="0"+s;return c>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),0===n.indexOf(".")&&(s=""),f=s+w+(m||""),h?f=(h&&k?"(":"")+f+(h&&k?")":""):u>=0?f=0===u?(k?"-":"+")+f:f+(k?"-":"+"):k&&(f="-"+f),f},stringToNumber:function(e){var t,n,r,o=i[a.currentLocale],s=e,l={thousand:3,million:6,billion:9,trillion:12};if(a.zeroFormat&&e===a.zeroFormat)n=0;else if(a.nullFormat&&e===a.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==o.delimiters.decimal&&(e=e.replace(/\./g,"").replace(o.delimiters.decimal,".")),l)if(r=new RegExp("[^a-zA-Z]"+o.abbreviations[t]+"(?:\\)|(\\"+o.currency.symbol+")?(?:\\))?)?$"),s.match(r)){n*=Math.pow(10,l[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return"number"===typeof e&&isNaN(e)})),includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!==typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),i=r.length>>>0,o=0;if(3===arguments.length)n=arguments[2];else{for(;o<i&&!(o in r);)o++;if(o>=i)throw new TypeError("Reduce of empty array with no initial value");n=r[o++]}for(;o<i;o++)o in r&&(n=t(n,r[o],o,r));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce((function(e,n){var r=t.multiplier(n);return e>r?e:r}),1)},toFixed:function(e,t,n,r){var i,o,a,s,l=e.toString().split("."),u=t-(r||0);return i=2===l.length?Math.min(Math.max(l[1].length,u),t):u,a=Math.pow(10,i),s=(n(e+"e+"+i)/a).toFixed(i),r>t-i&&(o=new RegExp("\\.?0{1,"+(r-(t-i))+"}$"),s=s.replace(o,"")),s}},e.options=a,e.formats=r,e.locales=i,e.locale=function(e){return e&&(a.currentLocale=e.toLowerCase()),a.currentLocale},e.localeData=function(e){if(!e)return i[a.currentLocale];if(e=e.toLowerCase(),!i[e])throw new Error("Unknown locale : "+e);return i[e]},e.reset=function(){for(var e in o)a[e]=o[e]},e.zeroFormat=function(e){a.zeroFormat="string"===typeof e?e:null},e.nullFormat=function(e){a.nullFormat="string"===typeof e?e:null},e.defaultFormat=function(e){a.defaultFormat="string"===typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,i,o,a,s,l,u,c;if("string"!==typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{u=e.localeData(n)}catch(f){u=e.localeData(e.locale())}return o=u.currency.symbol,s=u.abbreviations,r=u.delimiters.decimal,i="."===u.delimiters.thousands?"\\.":u.delimiters.thousands,(null===(c=t.match(/^[^\d]+/))||(t=t.substr(1),c[0]===o))&&(null===(c=t.match(/[^\d]+$/))||(t=t.slice(0,-1),c[0]===s.thousand||c[0]===s.million||c[0]===s.billion||c[0]===s.trillion))&&(l=new RegExp(i+"{2}"),!t.match(/[^\d.,]/g)&&!((a=t.split(r)).length>2)&&(a.length<2?!!a[0].match(/^\d+.*\d$/)&&!a[0].match(l):1===a[0].length?!!a[0].match(/^\d+$/)&&!a[0].match(l)&&!!a[1].match(/^\d+$/):!!a[0].match(/^\d+.*\d$/)&&!a[0].match(l)&&!!a[1].match(/^\d+$/)))},e.fn=s.prototype={clone:function(){return e(this)},format:function(t,n){var i,o,s,l=this._value,u=t||a.defaultFormat;if(n=n||Math.round,0===l&&null!==a.zeroFormat)o=a.zeroFormat;else if(null===l&&null!==a.nullFormat)o=a.nullFormat;else{for(i in r)if(u.match(r[i].regexps.format)){s=r[i].format;break}o=(s=s||e._.numberToFormat)(l,u,n)}return o},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);function r(e,t,r,i){return e+Math.round(n*t)}return this._value=t.reduce([this._value,e],r,0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);function r(e,t,r,i){return e-Math.round(n*t)}return this._value=t.reduce([e],r,Math.round(this._value*n))/n,this},multiply:function(e){function n(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)*Math.round(n*o)/Math.round(o*o)}return this._value=t.reduce([this._value,e],n,1),this},divide:function(e){function n(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)/Math.round(n*o)}return this._value=t.reduce([this._value,e],n),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var i,o=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"BPS"),i=i.join("")):i=i+o+"BPS",i},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),function(){var t={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},n={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},r=t.suffixes.concat(n.suffixes.filter((function(e){return t.suffixes.indexOf(e)<0}))).join("|");r="("+r.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(r)},format:function(r,i,o){var a,s,l,u=e._.includes(i,"ib")?n:t,c=e._.includes(i," b")||e._.includes(i," ib")?" ":"";for(i=i.replace(/\s?i?b/,""),a=0;a<=u.suffixes.length;a++)if(s=Math.pow(u.base,a),l=Math.pow(u.base,a+1),null===r||0===r||r>=s&&r<l){c+=u.suffixes[a],s>0&&(r/=s);break}return e._.numberToFormat(r,i,o)+c},unformat:function(r){var i,o,a=e._.stringToNumber(r);if(a){for(i=t.suffixes.length-1;i>=0;i--){if(e._.includes(r,t.suffixes[i])){o=Math.pow(t.base,i);break}if(e._.includes(r,n.suffixes[i])){o=Math.pow(n.base,i);break}}a*=o||1}return a}})}(),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var i,o,a=e.locales[e.options.currentLocale],s={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),i=e._.numberToFormat(t,n,r),t>=0?(s.before=s.before.replace(/[\-\(]/,""),s.after=s.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(s.before,"-")&&!e._.includes(s.before,"(")&&(s.before="-"+s.before),o=0;o<s.before.length;o++)switch(s.before[o]){case"$":i=e._.insert(i,a.currency.symbol,o);break;case" ":i=e._.insert(i," ",o+a.currency.symbol.length-1)}for(o=s.after.length-1;o>=0;o--)switch(s.after[o]){case"$":i=o===s.after.length-1?i+a.currency.symbol:e._.insert(i,a.currency.symbol,-(s.after.length-(1+o)));break;case" ":i=o===s.after.length-1?i+" ":e._.insert(i," ",-(s.after.length-(1+o)+a.currency.symbol.length-1))}return i}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var i=("number"!==typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(i[0]),n,r)+"e"+i[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),i=Number(n[1]);function o(t,n,r,i){var o=e._.correctionFactor(t,n);return t*o*(n*o)/(o*o)}return i=e._.includes(t,"e-")?i*=-1:i,e._.reduce([r,Math.pow(10,i)],o,1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var i=e.locales[e.options.currentLocale],o=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),o+=i.ordinal(t),e._.numberToFormat(t,n,r)+o}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var i,o=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"%"),i=i.join("")):i=i+o+"%",i},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),i=Math.floor((e-60*r*60)/60),o=Math.round(e-60*r*60-60*i);return r+":"+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e},void 0===(i="function"===typeof r?r.call(t,n,t,e):r)||(e.exports=i)},1843:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,o){for(var a,s,l=i(e),u=1;u<arguments.length;u++){for(var c in a=Object(arguments[u]))n.call(a,c)&&(l[c]=a[c]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(l[s[f]]=a[s[f]])}}return l}},3154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&l&&"function"===typeof l.get?l.get:null,c=s&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,g=String.prototype.match,y="function"===typeof BigInt?BigInt.prototype.valueOf:null,b=Object.getOwnPropertySymbols,x="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,w="function"===typeof Symbol&&"object"===typeof Symbol.iterator,k=Object.prototype.propertyIsEnumerable,S=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),O=n(4654).custom,C=O&&Z(O)?O:null,M="function"===typeof Symbol&&"undefined"!==typeof Symbol.toStringTag?Symbol.toStringTag:null;function P(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function T(e){return String(e).replace(/"/g,"&quot;")}function E(e){return"[object Array]"===D(e)&&(!M||!("object"===typeof e&&M in e))}function Z(e){if(w)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!x)return!1;try{return x.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var s=n||{};if(R(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(R(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!R(s,"customInspect")||s.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(R(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return _(t,s);if("number"===typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"===typeof t)return String(t)+"n";var v="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof r&&(r=0),r>=v&&v>0&&"object"===typeof t)return E(t)?"[Array]":"[Object]";var b=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=Array(e.indent+1).join(" ")}return{base:n,prev:Array(t+1).join(n)}}(s,r);if("undefined"===typeof i)i=[];else if(j(i,t)>=0)return"[Circular]";function k(t,n,o){if(n&&(i=i.slice()).push(n),o){var a={depth:s.depth};return R(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,i)}return e(t,s,r+1,i)}if("function"===typeof t){var O=function(e){if(e.name)return e.name;var t=g.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),A=F(t,k);return"[Function"+(O?": "+O:" (anonymous)")+"]"+(A.length>0?" { "+A.join(", ")+" }":"")}if(Z(t)){var N=w?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(t);return"object"!==typeof t||w?N:L(N)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var $="<"+String(t.nodeName).toLowerCase(),W=t.attributes||[],H=0;H<W.length;H++)$+=" "+W[H].name+"="+P(T(W[H].value),"double",s);return $+=">",t.childNodes&&t.childNodes.length&&($+="..."),$+="</"+String(t.nodeName).toLowerCase()+">"}if(E(t)){if(0===t.length)return"[]";var V=F(t,k);return b&&!function(e){for(var t=0;t<e.length;t++)if(j(e[t],"\n")>=0)return!1;return!0}(V)?"["+B(V,b)+"]":"[ "+V.join(", ")+" ]"}if(function(e){return"[object Error]"===D(e)&&(!M||!("object"===typeof e&&M in e))}(t)){var q=F(t,k);return 0===q.length?"["+String(t)+"]":"{ ["+String(t)+"] "+q.join(", ")+" }"}if("object"===typeof t&&l){if(C&&"function"===typeof t[C])return t[C]();if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{u.call(e)}catch($){return!0}return e instanceof Map}catch(t){}return!1}(t)){var U=[];return a.call(t,(function(e,n){U.push(k(n,t,!0)+" => "+k(e,t))})),z("Map",o.call(t),U,b)}if(function(e){if(!u||!e||"object"!==typeof e)return!1;try{u.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var Q=[];return c.call(t,(function(e){Q.push(k(e,t))})),z("Set",u.call(t),Q,b)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch($){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return I("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch($){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return I("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return I("WeakRef");if(function(e){return"[object Number]"===D(e)&&(!M||!("object"===typeof e&&M in e))}(t))return L(k(Number(t)));if(function(e){if(!e||"object"!==typeof e||!y)return!1;try{return y.call(e),!0}catch(t){}return!1}(t))return L(k(y.call(t)));if(function(e){return"[object Boolean]"===D(e)&&(!M||!("object"===typeof e&&M in e))}(t))return L(p.call(t));if(function(e){return"[object String]"===D(e)&&(!M||!("object"===typeof e&&M in e))}(t))return L(k(String(t)));if(!function(e){return"[object Date]"===D(e)&&(!M||!("object"===typeof e&&M in e))}(t)&&!function(e){return"[object RegExp]"===D(e)&&(!M||!("object"===typeof e&&M in e))}(t)){var X=F(t,k),Y=S?S(t)===Object.prototype:t instanceof Object||t.constructor===Object,G=t instanceof Object?"":"null prototype",K=!Y&&M&&Object(t)===t&&M in t?D(t).slice(8,-1):G?"Object":"",J=(Y||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(K||G?"["+[].concat(K||[],G||[]).join(": ")+"] ":"");return 0===X.length?J+"{}":b?J+"{"+B(X,b)+"}":J+"{ "+X.join(", ")+" }"}return String(t)};var A=Object.prototype.hasOwnProperty||function(e){return e in this};function R(e,t){return A.call(e,t)}function D(e){return v.call(e)}function j(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function _(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return _(e.slice(0,t.maxStringLength),t)+r}return P(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,N),"single",t)}function N(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function L(e){return"Object("+e+")"}function I(e){return e+" { ? }"}function z(e,t,n,r){return e+" ("+t+") {"+(r?B(n,r):n.join(", "))+"}"}function B(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+e.join(","+n)+"\n"+t.prev}function F(e,t){var n=E(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=R(e,i)?t(e[i],e):""}var o,a="function"===typeof b?b(e):[];if(w){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var l in e)R(e,l)&&(n&&String(Number(l))===l&&l<e.length||w&&o["$"+l]instanceof Symbol||(/[^\w$]/.test(l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"===typeof b)for(var u=0;u<a.length;u++)k.call(e,a[u])&&r.push("["+t(a[u])+"]: "+t(e[a[u]],e));return r}},1729:function(e,t,n){"use strict";var r=n(9165);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5192:function(e,t,n){e.exports=n(1729)()},9165:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5609:function(e){"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:i}},4776:function(e,t,n){"use strict";var r=n(2816),i=n(7668),o=n(5609);e.exports={formats:o,parse:i,stringify:r}},7668:function(e,t,n){"use strict";var r=n(9837),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),u=s?o.slice(0,s.index):o,c=[];if(u){if(!n.plainObjects&&i.call(Object.prototype,u)&&!n.allowPrototypes)return;c.push(u)}for(var f=0;n.depth>0&&null!==(s=a.exec(o))&&f<n.depth;){if(f+=1,!n.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(s[1])}return s&&c.push("["+o.slice(s.index)+"]"),function(e,t,n,r){for(var i=r?t:l(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(u,10);n.parseArrays||""!==u?!isNaN(c)&&s!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[])[c]=i:a[u]=i:a={0:i}}i=a}return i}(c,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var c="string"===typeof e?function(e,t){var n,u={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=c.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?p="utf-8":"utf8=%26%2310003%3B"===d[n]&&(p="iso-8859-1"),h=n,n=d.length);for(n=0;n<d.length;++n)if(n!==h){var v,m,g=d[n],y=g.indexOf("]="),b=-1===y?g.indexOf("="):y+1;-1===b?(v=t.decoder(g,a.decoder,p,"key"),m=t.strictNullHandling?null:""):(v=t.decoder(g.slice(0,b),a.decoder,p,"key"),m=r.maybeMap(l(g.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,p,"value")}))),m&&t.interpretNumericEntities&&"iso-8859-1"===p&&(m=s(m)),g.indexOf("[]=")>-1&&(m=o(m)?[m]:m),i.call(u,v)?u[v]=r.combine(u[v],m):u[v]=m}return u}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(c),h=0;h<d.length;++h){var p=d[h],v=u(p,c[p],n,"string"===typeof e);f=r.merge(f,v,n)}return!0===n.allowSparse?f:r.compact(f)}},2816:function(e,t,n){"use strict";var r=n(3170),i=n(9837),o=n(5609),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,u=String.prototype.split,c=Array.prototype.push,f=function(e,t){c.apply(e,l(t)?t:[t])},d=Date.prototype.toISOString,h=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},v={},m=function e(t,n,o,a,s,c,d,h,m,g,y,b,x,w,k){for(var S,O=t,C=k,M=0,P=!1;void 0!==(C=C.get(v))&&!P;){var T=C.get(t);if(M+=1,"undefined"!==typeof T){if(T===M)throw new RangeError("Cyclic object value");P=!0}"undefined"===typeof C.get(v)&&(M=0)}if("function"===typeof d?O=d(n,O):O instanceof Date?O=g(O):"comma"===o&&l(O)&&(O=i.maybeMap(O,(function(e){return e instanceof Date?g(e):e}))),null===O){if(a)return c&&!x?c(n,p.encoder,w,"key",y):n;O=""}if("string"===typeof(S=O)||"number"===typeof S||"boolean"===typeof S||"symbol"===typeof S||"bigint"===typeof S||i.isBuffer(O)){if(c){var E=x?n:c(n,p.encoder,w,"key",y);if("comma"===o&&x){for(var Z=u.call(String(O),","),A="",R=0;R<Z.length;++R)A+=(0===R?"":",")+b(c(Z[R],p.encoder,w,"value",y));return[b(E)+"="+A]}return[b(E)+"="+b(c(O,p.encoder,w,"value",y))]}return[b(n)+"="+b(String(O))]}var D,j=[];if("undefined"===typeof O)return j;if("comma"===o&&l(O))D=[{value:O.length>0?O.join(",")||null:void 0}];else if(l(d))D=d;else{var _=Object.keys(O);D=h?_.sort(h):_}for(var N=0;N<D.length;++N){var L=D[N],I="object"===typeof L&&void 0!==L.value?L.value:O[L];if(!s||null!==I){var z=l(O)?"function"===typeof o?o(n,L):n:n+(m?"."+L:"["+L+"]");k.set(t,M);var B=r();B.set(v,k),f(j,e(I,z,o,a,s,c,d,h,m,g,y,b,x,w,B))}}return j};e.exports=function(e,t){var n,i=e,u=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if("undefined"!==typeof e.format){if(!a.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=p.filter;return("function"===typeof e.filter||l(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:"undefined"===typeof e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:"undefined"===typeof e.delimiter?p.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:p.encode,encoder:"function"===typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"===typeof u.filter?i=(0,u.filter)("",i):l(u.filter)&&(n=u.filter);var c,d=[];if("object"!==typeof i||null===i)return"";c=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=s[c];n||(n=Object.keys(i)),u.sort&&n.sort(u.sort);for(var v=r(),g=0;g<n.length;++g){var y=n[g];u.skipNulls&&null===i[y]||f(d,m(i[y],y,h,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,v))}var b=d.join(u.delimiter),x=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),b.length>0?x+b:""}},9837:function(e,t,n){"use strict";var r=n(5609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)"undefined"!==typeof e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),l=0;l<s.length;++l){var u=s[l],c=a[u];"object"===typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:a,prop:u}),n.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)"undefined"!==typeof n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(i){return r}},encode:function(e,t,n,i,o){if(0===e.length)return e;var s=e;if("symbol"===typeof e?s=Symbol.prototype.toString.call(e):"string"!==typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",u=0;u<s.length;++u){var c=s.charCodeAt(u);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===r.RFC1738&&(40===c||41===c)?l+=s.charAt(u):c<128?l+=a[c]:c<2048?l+=a[192|c>>6]+a[128|63&c]:c<55296||c>=57344?l+=a[224|c>>12]+a[128|c>>6&63]+a[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&s.charCodeAt(u)),l+=a[240|c>>18]+a[128|c>>12&63]+a[128|c>>6&63]+a[128|63&c])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!==typeof n){if(o(t))t.push(n);else{if(!t||"object"!==typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!==typeof t)return[t].concat(n);var a=t;return o(t)&&!o(n)&&(a=s(t,r)),o(t)&&o(n)?(n.forEach((function(n,o){if(i.call(t,o)){var a=t[o];a&&"object"===typeof a&&n&&"object"===typeof n?t[o]=e(a,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return i.call(t,o)?t[o]=e(t[o],a,r):t[o]=a,t}),a)}}},534:function(e,t,n){"use strict";var r=n(7313),i=n(1843),o=n(2224);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,l={};function u(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(l[e]=t,e=0;e<t.length;e++)s.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h=Object.prototype.hasOwnProperty,p={},v={};function m(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function x(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!h.call(v,e)||!h.call(p,e)&&(d.test(e)?v[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=60103,S=60106,O=60107,C=60108,M=60114,P=60109,T=60110,E=60112,Z=60113,A=60120,R=60115,D=60116,j=60121,_=60128,N=60129,L=60130,I=60131;if("function"===typeof Symbol&&Symbol.for){var z=Symbol.for;k=z("react.element"),S=z("react.portal"),O=z("react.fragment"),C=z("react.strict_mode"),M=z("react.profiler"),P=z("react.provider"),T=z("react.context"),E=z("react.forward_ref"),Z=z("react.suspense"),A=z("react.suspense_list"),R=z("react.memo"),D=z("react.lazy"),j=z("react.block"),z("react.scope"),_=z("react.opaque.id"),N=z("react.debug_trace_mode"),L=z("react.offscreen"),I=z("react.legacy_hidden")}var B,F="function"===typeof Symbol&&Symbol.iterator;function $(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=F&&e[F]||e["@@iterator"])?e:null}function W(e){if(void 0===B)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var H=!1;function V(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?W(e):""}function q(e){switch(e.tag){case 5:return W(e.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1);case 11:return e=V(e.type.render,!1);case 22:return e=V(e.type._render,!1);case 1:return e=V(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case O:return"Fragment";case S:return"Portal";case M:return"Profiler";case C:return"StrictMode";case Z:return"Suspense";case A:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case R:return U(e.type);case j:return U(e._render);case D:t=e._payload,e=e._init;try{return U(e(t))}catch(n){}}return null}function Q(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function X(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=X(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=X(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Q(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=Q(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,Q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Q(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Q(n)}}function ue(e,t){var n=Q(t.value),r=Q(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function he(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?he(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,me,ge=(me=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xe=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){xe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Se=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oe(e,t){if(t){if(Se[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Me(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Pe=null,Te=null,Ee=null;function Ze(e){if(e=ri(e)){if("function"!==typeof Pe)throw Error(a(280));var t=e.stateNode;t&&(t=oi(t),Pe(e.stateNode,e.type,t))}}function Ae(e){Te?Ee?Ee.push(e):Ee=[e]:Te=e}function Re(){if(Te){var e=Te,t=Ee;if(Ee=Te=null,Ze(e),t)for(e=0;e<t.length;e++)Ze(t[e])}}function De(e,t){return e(t)}function je(e,t,n,r,i){return e(t,n,r,i)}function _e(){}var Ne=De,Le=!1,Ie=!1;function ze(){null===Te&&null===Ee||(_e(),Re())}function Be(e,t){var n=e.stateNode;if(null===n)return null;var r=oi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Fe=!1;if(f)try{var $e={};Object.defineProperty($e,"passive",{get:function(){Fe=!0}}),window.addEventListener("test",$e,$e),window.removeEventListener("test",$e,$e)}catch(me){Fe=!1}function We(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var He=!1,Ve=null,qe=!1,Ue=null,Qe={onError:function(e){He=!0,Ve=e}};function Xe(e,t,n,r,i,o,a,s,l){He=!1,Ve=null,We.apply(Qe,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ge(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ke(e){if(Ye(e)!==e)throw Error(a(188))}function Je(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Ke(i),e;if(o===r)return Ke(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,ot=!1,at=[],st=null,lt=null,ut=null,ct=new Map,ft=new Map,dt=[],ht="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":ut=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function mt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,i,o),null!==t&&(null!==(t=ri(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function gt(e){var t=ni(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ge(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ri(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function xt(){for(ot=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ri(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&yt(st)&&(st=null),null!==lt&&yt(lt)&&(lt=null),null!==ut&&yt(ut)&&(ut=null),ct.forEach(bt),ft.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,xt)))}function kt(e){function t(t){return wt(t,e)}if(0<at.length){wt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&wt(st,e),null!==lt&&wt(lt,e),null!==ut&&wt(ut,e),ct.forEach(t),ft.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)gt(n),null===n.blockedOn&&dt.shift()}function St(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ot={animationend:St("Animation","AnimationEnd"),animationiteration:St("Animation","AnimationIteration"),animationstart:St("Animation","AnimationStart"),transitionend:St("Transition","TransitionEnd")},Ct={},Mt={};function Pt(e){if(Ct[e])return Ct[e];if(!Ot[e])return e;var t,n=Ot[e];for(t in n)if(n.hasOwnProperty(t)&&t in Mt)return Ct[e]=n[t];return e}f&&(Mt=document.createElement("div").style,"AnimationEvent"in window||(delete Ot.animationend.animation,delete Ot.animationiteration.animation,delete Ot.animationstart.animation),"TransitionEvent"in window||delete Ot.transitionend.transition);var Tt=Pt("animationend"),Et=Pt("animationiteration"),Zt=Pt("animationstart"),At=Pt("transitionend"),Rt=new Map,Dt=new Map,jt=["abort","abort",Tt,"animationEnd",Et,"animationIteration",Zt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",At,"transitionEnd","waiting","waiting"];function _t(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Dt.set(r,t),Rt.set(r,i),u(i,[r])}}(0,o.unstable_now)();var Nt=8;function Lt(e){if(0!==(1&e))return Nt=15,1;if(0!==(2&e))return Nt=14,2;if(0!==(4&e))return Nt=13,4;var t=24&e;return 0!==t?(Nt=12,t):0!==(32&e)?(Nt=11,32):0!==(t=192&e)?(Nt=10,t):0!==(256&e)?(Nt=9,256):0!==(t=3584&e)?(Nt=8,t):0!==(4096&e)?(Nt=7,4096):0!==(t=4186112&e)?(Nt=6,t):0!==(t=62914560&e)?(Nt=5,t):67108864&e?(Nt=4,67108864):0!==(134217728&e)?(Nt=3,134217728):0!==(t=805306368&e)?(Nt=2,t):0!==(1073741824&e)?(Nt=1,1073741824):(Nt=8,e)}function It(e,t){var n=e.pendingLanes;if(0===n)return Nt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Nt=15;else if(0!==(o=134217727&n)){var l=o&~a;0!==l?(r=Lt(l),i=Nt):0!==(s&=o)&&(r=Lt(s),i=Nt)}else 0!==(o=n&~a)?(r=Lt(o),i=Nt):0!==s&&(r=Lt(s),i=Nt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Lt(t),i<=Nt)return t;Nt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Ht(t)),r|=e[n],t&=~i;return r}function zt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Bt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ft(24&~t))?Bt(10,t):e;case 10:return 0===(e=Ft(192&~t))?Bt(8,t):e;case 8:return 0===(e=Ft(3584&~t))&&(0===(e=Ft(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ft(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Ft(e){return e&-e}function $t(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Vt(e)/qt|0)|0},Vt=Math.log,qt=Math.LN2;var Ut=o.unstable_UserBlockingPriority,Qt=o.unstable_runWithPriority,Xt=!0;function Yt(e,t,n,r){Le||_e();var i=Kt,o=Le;Le=!0;try{je(i,e,t,n,r)}finally{(Le=o)||ze()}}function Gt(e,t,n,r){Qt(Ut,Kt.bind(null,e,t,n,r))}function Kt(e,t,n,r){var i;if(Xt)if((i=0===(4&t))&&0<at.length&&-1<ht.indexOf(e))e=pt(null,e,t,n,r),at.push(e);else{var o=Jt(e,t,n,r);if(null===o)i&&vt(e,r);else{if(i){if(-1<ht.indexOf(e))return e=pt(o,e,t,n,r),void at.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return st=mt(st,e,t,n,r,i),!0;case"dragenter":return lt=mt(lt,e,t,n,r,i),!0;case"mouseover":return ut=mt(ut,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ct.set(o,mt(ct.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ft.set(o,mt(ft.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;vt(e,r)}_r(e,t,r,null,n)}}}function Jt(e,t,n,r){var i=Me(r);if(null!==(i=ni(i))){var o=Ye(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Ge(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return _r(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function ln(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:sn,this.isPropagationStopped=sn,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var un,cn,fn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=ln(dn),pn=i({},dn,{view:0,detail:0}),vn=ln(pn),mn=i({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(un=e.screenX-fn.screenX,cn=e.screenY-fn.screenY):cn=un=0,fn=e),un)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=ln(mn),yn=ln(i({},mn,{dataTransfer:0})),bn=ln(i({},pn,{relatedTarget:0})),xn=ln(i({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=i({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=ln(wn),Sn=ln(i({},dn,{data:0})),On={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Mn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Mn[e])&&!!t[e]}function Tn(){return Pn}var En=i({},pn,{key:function(e){if(e.key){var t=On[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Cn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Zn=ln(En),An=ln(i({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=ln(i({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),Dn=ln(i({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=i({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_n=ln(jn),Nn=[9,13,27,32],Ln=f&&"CompositionEvent"in window,In=null;f&&"documentMode"in document&&(In=document.documentMode);var zn=f&&"TextEvent"in window&&!In,Bn=f&&(!Ln||In&&8<In&&11>=In),Fn=String.fromCharCode(32),$n=!1;function Wn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Un(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Qn(e,t,n,r){Ae(r),0<(t=Lr(t,"onChange")).length&&(n=new hn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xn=null,Yn=null;function Gn(e){Er(e,0)}function Kn(e){if(G(ii(e)))return e}function Jn(e,t){if("change"===e)return t}var er=!1;if(f){var tr;if(f){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function ir(){Xn&&(Xn.detachEvent("onpropertychange",or),Yn=Xn=null)}function or(e){if("value"===e.propertyName&&Kn(Yn)){var t=[];if(Qn(t,Yn,e,Me(e)),e=Gn,Le)e(t);else{Le=!0;try{De(e,t)}finally{Le=!1,ze()}}}}function ar(e,t,n){"focusin"===e?(ir(),Yn=n,(Xn=t).attachEvent("onpropertychange",or)):"focusout"===e&&ir()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Yn)}function lr(e,t){if("click"===e)return Kn(t)}function ur(e,t){if("input"===e||"change"===e)return Kn(t)}var cr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},fr=Object.prototype.hasOwnProperty;function dr(e,t){if(cr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!fr.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n,r=hr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=hr(r)}}function vr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var yr=f&&"documentMode"in document&&11>=document.documentMode,br=null,xr=null,wr=null,kr=!1;function Sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==br||br!==K(r)||("selectionStart"in(r=br)&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Lr(xr,"onSelect")).length&&(t=new hn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}_t("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),_t("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),_t(jt,2);for(var Or="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Cr=0;Cr<Or.length;Cr++)Dt.set(Or[Cr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Pr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mr));function Tr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,u){if(Xe.apply(this,arguments),He){if(!He)throw Error(a(198));var c=Ve;He=!1,Ve=null,qe||(qe=!0,Ue=c)}}(r,t,void 0,e),e.currentTarget=null}function Er(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Tr(i,s,u),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Tr(i,s,u),o=l}}}if(qe)throw e=Ue,qe=!1,Ue=null,e}function Zr(e,t){var n=ai(t),r=e+"__bubble";n.has(r)||(jr(t,e,2,!1),n.add(r))}var Ar="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){e[Ar]||(e[Ar]=!0,s.forEach((function(t){Pr.has(t)||Dr(t,!1,e,null),Dr(t,!0,e,null)})))}function Dr(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Pr.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=ai(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),jr(o,e,i,t),a.add(s))}function jr(e,t,n,r){var i=Dt.get(t);switch(void 0===i?2:i){case 0:i=Yt;break;case 1:i=Gt;break;default:i=Kt}n=i.bind(null,t,n,e),i=void 0,!Fe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function _r(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=ni(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Ie)return e(t,n);Ie=!0;try{Ne(e,t,n)}finally{Ie=!1,ze()}}((function(){var r=o,i=Me(n),a=[];e:{var s=Rt.get(e);if(void 0!==s){var l=hn,u=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":l=Zn;break;case"focusin":u="focus",l=bn;break;case"focusout":u="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Rn;break;case Tt:case Et:case Zt:l=xn;break;case At:l=Dn;break;case"scroll":l=vn;break;case"wheel":l=_n;break;case"copy":case"cut":case"paste":l=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=An}var c=0!==(4&t),f=!c&&"scroll"===e,d=c?null!==s?s+"Capture":null:s;c=[];for(var h,p=r;null!==p;){var v=(h=p).stateNode;if(5===h.tag&&null!==v&&(h=v,null!==d&&(null!=(v=Be(p,d))&&c.push(Nr(p,v,h)))),f)break;p=p.return}0<c.length&&(s=new l(s,u,null,n,i),a.push({event:s,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(u=n.relatedTarget||n.fromElement)||!ni(u)&&!u[ei])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?ni(u):null)&&(u!==(f=Ye(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=gn,v="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=An,v="onPointerLeave",d="onPointerEnter",p="pointer"),f=null==l?s:ii(l),h=null==u?s:ii(u),(s=new c(v,p+"leave",l,n,i)).target=f,s.relatedTarget=h,v=null,ni(i)===r&&((c=new c(d,p+"enter",u,n,i)).target=h,c.relatedTarget=f,v=c),f=v,l&&u)e:{for(d=u,p=0,h=c=l;h;h=Ir(h))p++;for(h=0,v=d;v;v=Ir(v))h++;for(;0<p-h;)c=Ir(c),p--;for(;0<h-p;)d=Ir(d),h--;for(;p--;){if(c===d||null!==d&&c===d.alternate)break e;c=Ir(c),d=Ir(d)}c=null}else c=null;null!==l&&zr(a,s,l,c,!1),null!==u&&null!==f&&zr(a,f,u,c,!0)}if("select"===(l=(s=r?ii(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=Jn;else if(Un(s))if(er)m=ur;else{m=sr;var g=ar}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=lr);switch(m&&(m=m(e,r))?Qn(a,m,n,i):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&ie(s,"number",s.value)),g=r?ii(r):window,e){case"focusin":(Un(g)||"true"===g.contentEditable)&&(br=g,xr=r,wr=null);break;case"focusout":wr=xr=br=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,Sr(a,n,i);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":Sr(a,n,i)}var y;if(Ln)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Vn?Wn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Bn&&"ko"!==n.locale&&(Vn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Vn&&(y=rn()):(tn="value"in(en=i)?en.value:en.textContent,Vn=!0)),0<(g=Lr(r,b)).length&&(b=new Sn(b,e,null,n,i),a.push({event:b,listeners:g}),y?b.data=y:null!==(y=Hn(n))&&(b.data=y))),(y=zn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:($n=!0,Fn);case"textInput":return(e=t.data)===Fn&&$n?null:e;default:return null}}(e,n):function(e,t){if(Vn)return"compositionend"===e||!Ln&&Wn(e,t)?(e=rn(),nn=tn=en=null,Vn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Lr(r,"onBeforeInput")).length&&(i=new Sn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Er(a,t)}))}function Nr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Be(e,n))&&r.unshift(Nr(e,o,i)),null!=(o=Be(e,t))&&r.push(Nr(e,o,i))),e=e.return}return r}function Ir(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function zr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,i?null!=(l=Be(n,o))&&a.unshift(Nr(n,l,s)):i||null!=(l=Be(n,o))&&a.push(Nr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Br(){}var Fr=null,$r=null;function Wr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Vr="function"===typeof setTimeout?setTimeout:void 0,qr="function"===typeof clearTimeout?clearTimeout:void 0;function Ur(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Qr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Xr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0;var Gr=Math.random().toString(36).slice(2),Kr="__reactFiber$"+Gr,Jr="__reactProps$"+Gr,ei="__reactContainer$"+Gr,ti="__reactEvents$"+Gr;function ni(e){var t=e[Kr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ei]||n[Kr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Xr(e);null!==e;){if(n=e[Kr])return n;e=Xr(e)}return t}n=(e=n).parentNode}return null}function ri(e){return!(e=e[Kr]||e[ei])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ii(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function oi(e){return e[Jr]||null}function ai(e){var t=e[ti];return void 0===t&&(t=e[ti]=new Set),t}var si=[],li=-1;function ui(e){return{current:e}}function ci(e){0>li||(e.current=si[li],si[li]=null,li--)}function fi(e,t){li++,si[li]=e.current,e.current=t}var di={},hi=ui(di),pi=ui(!1),vi=di;function mi(e,t){var n=e.type.contextTypes;if(!n)return di;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function gi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function yi(){ci(pi),ci(hi)}function bi(e,t,n){if(hi.current!==di)throw Error(a(168));fi(hi,t),fi(pi,n)}function xi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,U(t)||"Unknown",o));return i({},n,r)}function wi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,vi=hi.current,fi(hi,e),fi(pi,pi.current),!0}function ki(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=xi(e,t,vi),r.__reactInternalMemoizedMergedChildContext=e,ci(pi),ci(hi),fi(hi,e)):ci(pi),fi(pi,n)}var Si=null,Oi=null,Ci=o.unstable_runWithPriority,Mi=o.unstable_scheduleCallback,Pi=o.unstable_cancelCallback,Ti=o.unstable_shouldYield,Ei=o.unstable_requestPaint,Zi=o.unstable_now,Ai=o.unstable_getCurrentPriorityLevel,Ri=o.unstable_ImmediatePriority,Di=o.unstable_UserBlockingPriority,ji=o.unstable_NormalPriority,_i=o.unstable_LowPriority,Ni=o.unstable_IdlePriority,Li={},Ii=void 0!==Ei?Ei:function(){},zi=null,Bi=null,Fi=!1,$i=Zi(),Wi=1e4>$i?Zi:function(){return Zi()-$i};function Hi(){switch(Ai()){case Ri:return 99;case Di:return 98;case ji:return 97;case _i:return 96;case Ni:return 95;default:throw Error(a(332))}}function Vi(e){switch(e){case 99:return Ri;case 98:return Di;case 97:return ji;case 96:return _i;case 95:return Ni;default:throw Error(a(332))}}function qi(e,t){return e=Vi(e),Ci(e,t)}function Ui(e,t,n){return e=Vi(e),Mi(e,t,n)}function Qi(){if(null!==Bi){var e=Bi;Bi=null,Pi(e)}Xi()}function Xi(){if(!Fi&&null!==zi){Fi=!0;var e=0;try{var t=zi;qi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),zi=null}catch(n){throw null!==zi&&(zi=zi.slice(e+1)),Mi(Ri,Qi),n}finally{Fi=!1}}}var Yi=w.ReactCurrentBatchConfig;function Gi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Ki=ui(null),Ji=null,eo=null,to=null;function no(){to=eo=Ji=null}function ro(e){var t=Ki.current;ci(Ki),e.type._context._currentValue=t}function io(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function oo(e,t){Ji=e,to=eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(La=!0),e.firstContext=null)}function ao(e,t){if(to!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(to=e,t=1073741823),t={context:e,observedBits:t,next:null},null===eo){if(null===Ji)throw Error(a(308));eo=t,Ji.dependencies={lanes:0,firstContext:t,responders:null}}else eo=eo.next=t;return e._currentValue}var so=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function uo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function co(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ho(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function po(e,t,n,r){var o=e.updateQueue;so=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var u=l,c=u.next;u.next=null,null===s?a=c:s.next=c,s=u;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==s&&(null===d?f.firstBaseUpdate=c:d.next=c,f.lastBaseUpdate=u)}}if(null!==a){for(d=o.baseState,s=0,f=c=u=null;;){l=a.lane;var h=a.eventTime;if((r&l)===l){null!==f&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,v=a;switch(l=t,h=n,v.tag){case 1:if("function"===typeof(p=v.payload)){d=p.call(h,d,l);break e}d=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(l="function"===typeof(p=v.payload)?p.call(h,d,l):p)||void 0===l)break e;d=i({},d,l);break e;case 2:so=!0}}null!==a.callback&&(e.flags|=32,null===(l=o.effects)?o.effects=[a]:l.push(a))}else h={eventTime:h,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(c=f=h,u=d):f=f.next=h,s|=l;if(null===(a=a.next)){if(null===(l=o.shared.pending))break;a=l.next,l.next=null,o.lastBaseUpdate=l,o.shared.pending=null}}null===f&&(u=d),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=f,Fs|=s,e.lanes=s,e.memoizedState=d}}function vo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var mo=(new r.Component).refs;function go(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yo={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=dl(),i=hl(e),o=co(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),fo(e,o),pl(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=dl(),i=hl(e),o=co(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),fo(e,o),pl(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=dl(),r=hl(e),i=co(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),fo(e,i),pl(e,r,n)}};function bo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(i,o))}function xo(e,t,n){var r=!1,i=di,o=t.contextType;return"object"===typeof o&&null!==o?o=ao(o):(i=gi(t)?vi:hi.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?mi(e,i):di),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function wo(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yo.enqueueReplaceState(t,t.state,null)}function ko(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=mo,lo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=ao(o):(o=gi(t)?vi:hi.current,i.context=mi(e,o)),po(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(go(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&yo.enqueueReplaceState(i,i.state,null),po(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var So=Array.isArray;function Oo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===mo&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Co(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Mo(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=ql(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Yl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Oo(e,t,n),r.return=e,r):((r=Ul(n.type,n.key,n.props,null,e.mode,r)).ref=Oo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Gl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Ql(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Yl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case k:return(n=Ul(t.type,t.key,t.props,null,e.mode,n)).ref=Oo(e,null,t),n.return=e,n;case S:return(t=Gl(t,e.mode,n)).return=e,t}if(So(t)||$(t))return(t=Ql(t,e.mode,n,null)).return=e,t;Co(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===i?n.type===O?f(e,t,n.props.children,r,i):u(e,t,n,r):null;case S:return n.key===i?c(e,t,n,r):null}if(So(n)||$(n))return null!==i?null:f(e,t,n,r,null);Co(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case k:return e=e.get(null===r.key?n:r.key)||null,r.type===O?f(t,e,r.props.children,i,r.key):u(t,e,r,i);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(So(r)||$(r))return f(t,e=e.get(n)||null,r,i,null);Co(t,r)}return null}function v(i,a,s,l){for(var u=null,c=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var g=h(i,f,s[v],l);if(null===g){null===f&&(f=m);break}e&&f&&null===g.alternate&&t(i,f),a=o(g,a,v),null===c?u=g:c.sibling=g,c=g,f=m}if(v===s.length)return n(i,f),u;if(null===f){for(;v<s.length;v++)null!==(f=d(i,s[v],l))&&(a=o(f,a,v),null===c?u=f:c.sibling=f,c=f);return u}for(f=r(i,f);v<s.length;v++)null!==(m=p(f,i,v,s[v],l))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=o(m,a,v),null===c?u=m:c.sibling=m,c=m);return e&&f.forEach((function(e){return t(i,e)})),u}function m(i,s,l,u){var c=$(l);if("function"!==typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var f=c=null,v=s,m=s=0,g=null,y=l.next();null!==v&&!y.done;m++,y=l.next()){v.index>m?(g=v,v=null):g=v.sibling;var b=h(i,v,y.value,u);if(null===b){null===v&&(v=g);break}e&&v&&null===b.alternate&&t(i,v),s=o(b,s,m),null===f?c=b:f.sibling=b,f=b,v=g}if(y.done)return n(i,v),c;if(null===v){for(;!y.done;m++,y=l.next())null!==(y=d(i,y.value,u))&&(s=o(y,s,m),null===f?c=y:f.sibling=y,f=y);return c}for(v=r(i,v);!y.done;m++,y=l.next())null!==(y=p(v,i,m,y.value,u))&&(e&&null!==y.alternate&&v.delete(null===y.key?m:y.key),s=o(y,s,m),null===f?c=y:f.sibling=y,f=y);return e&&v.forEach((function(e){return t(i,e)})),c}return function(e,r,o,l){var u="object"===typeof o&&null!==o&&o.type===O&&null===o.key;u&&(o=o.props.children);var c="object"===typeof o&&null!==o;if(c)switch(o.$$typeof){case k:e:{for(c=o.key,u=r;null!==u;){if(u.key===c){if(7===u.tag){if(o.type===O){n(e,u.sibling),(r=i(u,o.props.children)).return=e,e=r;break e}}else if(u.elementType===o.type){n(e,u.sibling),(r=i(u,o.props)).ref=Oo(e,u,o),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}o.type===O?((r=Ql(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=Ul(o.type,o.key,o.props,null,e.mode,l)).ref=Oo(e,r,o),l.return=e,e=l)}return s(e);case S:e:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Gl(o,e.mode,l)).return=e,e=r}return s(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Yl(o,e.mode,l)).return=e,e=r),s(e);if(So(o))return v(e,r,o,l);if($(o))return m(e,r,o,l);if(c&&Co(e,o),"undefined"===typeof o&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,U(e.type)||"Component"))}return n(e,r)}}var Po=Mo(!0),To=Mo(!1),Eo={},Zo=ui(Eo),Ao=ui(Eo),Ro=ui(Eo);function Do(e){if(e===Eo)throw Error(a(174));return e}function jo(e,t){switch(fi(Ro,t),fi(Ao,e),fi(Zo,Eo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ci(Zo),fi(Zo,t)}function _o(){ci(Zo),ci(Ao),ci(Ro)}function No(e){Do(Ro.current);var t=Do(Zo.current),n=pe(t,e.type);t!==n&&(fi(Ao,e),fi(Zo,n))}function Lo(e){Ao.current===e&&(ci(Zo),ci(Ao))}var Io=ui(0);function zo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bo=null,Fo=null,$o=!1;function Wo(e,t){var n=Hl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ho(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Vo(e){if($o){var t=Fo;if(t){var n=t;if(!Ho(e,t)){if(!(t=Qr(n.nextSibling))||!Ho(e,t))return e.flags=-1025&e.flags|2,$o=!1,void(Bo=e);Wo(Bo,n)}Bo=e,Fo=Qr(t.firstChild)}else e.flags=-1025&e.flags|2,$o=!1,Bo=e}}function qo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Bo=e}function Uo(e){if(e!==Bo)return!1;if(!$o)return qo(e),$o=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=Fo;t;)Wo(e,t),t=Qr(t.nextSibling);if(qo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Fo=Qr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Fo=null}}else Fo=Bo?Qr(e.stateNode.nextSibling):null;return!0}function Qo(){Fo=Bo=null,$o=!1}var Xo=[];function Yo(){for(var e=0;e<Xo.length;e++)Xo[e]._workInProgressVersionPrimary=null;Xo.length=0}var Go=w.ReactCurrentDispatcher,Ko=w.ReactCurrentBatchConfig,Jo=0,ea=null,ta=null,na=null,ra=!1,ia=!1;function oa(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,i,o){if(Jo=o,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Go.current=null===e||null===e.memoizedState?Da:ja,e=n(r,i),ia){o=0;do{if(ia=!1,!(25>o))throw Error(a(301));o+=1,na=ta=null,t.updateQueue=null,Go.current=_a,e=n(r,i)}while(ia)}if(Go.current=Ra,t=null!==ta&&null!==ta.next,Jo=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ua(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function ca(e,t){return"function"===typeof t?t(e):t}function fa(e){var t=ua(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=o=null,u=i;do{var c=u.lane;if((Jo&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===l?(s=l=f,o=r):l=l.next=f,ea.lanes|=c,Fs|=c}u=u.next}while(null!==u&&u!==i);null===l?o=r:l.next=s,cr(r,t.memoizedState)||(La=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=ua(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);cr(o,t.memoizedState)||(La=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ha(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Jo&e)===e)&&(t._workInProgressVersionPrimary=r,Xo.push(t))),e)return n(t._source);throw Xo.push(t),Error(a(350))}function pa(e,t,n,r){var i=Ds;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),l=Go.current,u=l.useState((function(){return ha(i,t,n)})),c=u[1],f=u[0];u=na;var d=e.memoizedState,h=d.refs,p=h.getSnapshot,v=d.source;d=d.subscribe;var m=ea;return e.memoizedState={refs:h,source:t,subscribe:r},l.useEffect((function(){h.getSnapshot=n,h.setSnapshot=c;var e=o(t._source);if(!cr(s,e)){e=n(t._source),cr(f,e)||(c(e),e=hl(m),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var l=31-Ht(a),u=1<<l;r[l]|=e,a&=~u}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=h.getSnapshot,n=h.setSnapshot;try{n(e(t._source));var r=hl(m);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),cr(p,n)&&cr(v,t)&&cr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:f}).dispatch=c=Aa.bind(null,ea,e),u.queue=e,u.baseQueue=null,f=ha(i,t,n),u.memoizedState=u.baseState=f),f}function va(e,t,n){return pa(ua(),e,t,n)}function ma(e){var t=la();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e}).dispatch=Aa.bind(null,ea,e),[t.memoizedState,e]}function ga(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ya(e){return e={current:e},la().memoizedState=e}function ba(){return ua().memoizedState}function xa(e,t,n,r){var i=la();ea.flags|=e,i.memoizedState=ga(1|t,n,void 0,void 0===r?null:r)}function wa(e,t,n,r){var i=ua();r=void 0===r?null:r;var o=void 0;if(null!==ta){var a=ta.memoizedState;if(o=a.destroy,null!==r&&aa(r,a.deps))return void ga(t,n,o,r)}ea.flags|=e,i.memoizedState=ga(1|t,n,o,r)}function ka(e,t){return xa(516,4,e,t)}function Sa(e,t){return wa(516,4,e,t)}function Oa(e,t){return wa(4,2,e,t)}function Ca(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ma(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,Ca.bind(null,t,e),n)}function Pa(){}function Ta(e,t){var n=ua();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ea(e,t){var n=ua();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Za(e,t){var n=Hi();qi(98>n?98:n,(function(){e(!0)})),qi(97<n?97:n,(function(){var n=Ko.transition;Ko.transition=1;try{e(!1),t()}finally{Ko.transition=n}}))}function Aa(e,t,n){var r=dl(),i=hl(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===ea||null!==a&&a===ea)ia=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,cr(l,s))return}catch(u){}pl(e,i,r)}}var Ra={readContext:ao,useCallback:oa,useContext:oa,useEffect:oa,useImperativeHandle:oa,useLayoutEffect:oa,useMemo:oa,useReducer:oa,useRef:oa,useState:oa,useDebugValue:oa,useDeferredValue:oa,useTransition:oa,useMutableSource:oa,useOpaqueIdentifier:oa,unstable_isNewReconciler:!1},Da={readContext:ao,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:ao,useEffect:ka,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,xa(4,2,Ca.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xa(4,2,e,t)},useMemo:function(e,t){var n=la();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=la();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Aa.bind(null,ea,e),[r.memoizedState,e]},useRef:ya,useState:ma,useDebugValue:Pa,useDeferredValue:function(e){var t=ma(e),n=t[0],r=t[1];return ka((function(){var t=Ko.transition;Ko.transition=1;try{r(e)}finally{Ko.transition=t}}),[e]),n},useTransition:function(){var e=ma(!1),t=e[0];return ya(e=Za.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=la();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},pa(r,e,t,n)},useOpaqueIdentifier:function(){if($o){var e=!1,t=function(e){return{$$typeof:_,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(a(355))})),n=ma(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ga(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return ma(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},ja={readContext:ao,useCallback:Ta,useContext:ao,useEffect:Sa,useImperativeHandle:Ma,useLayoutEffect:Oa,useMemo:Ea,useReducer:fa,useRef:ba,useState:function(){return fa(ca)},useDebugValue:Pa,useDeferredValue:function(e){var t=fa(ca),n=t[0],r=t[1];return Sa((function(){var t=Ko.transition;Ko.transition=1;try{r(e)}finally{Ko.transition=t}}),[e]),n},useTransition:function(){var e=fa(ca)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return fa(ca)[0]},unstable_isNewReconciler:!1},_a={readContext:ao,useCallback:Ta,useContext:ao,useEffect:Sa,useImperativeHandle:Ma,useLayoutEffect:Oa,useMemo:Ea,useReducer:da,useRef:ba,useState:function(){return da(ca)},useDebugValue:Pa,useDeferredValue:function(e){var t=da(ca),n=t[0],r=t[1];return Sa((function(){var t=Ko.transition;Ko.transition=1;try{r(e)}finally{Ko.transition=t}}),[e]),n},useTransition:function(){var e=da(ca)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return da(ca)[0]},unstable_isNewReconciler:!1},Na=w.ReactCurrentOwner,La=!1;function Ia(e,t,n,r){t.child=null===e?To(t,null,n,r):Po(t,e.child,n,r)}function za(e,t,n,r,i){n=n.render;var o=t.ref;return oo(t,i),r=sa(e,t,n,r,o,i),null===e||La?(t.flags|=1,Ia(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function Ba(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||Vl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ul(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Fa(e,t,a,r,i,o))}return a=e.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(i,r)&&e.ref===t.ref)?os(e,t,o):(t.flags|=1,(e=ql(a,r)).ref=t.ref,e.return=t,t.child=e)}function Fa(e,t,n,r,i,o){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(La=!1,0===(o&i))return t.lanes=e.lanes,os(e,t,o);0!==(16384&e.flags)&&(La=!0)}return Ha(e,t,n,r,o)}function $a(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},kl(t,n);else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},kl(t,e),null;t.memoizedState={baseLanes:0},kl(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,kl(t,r);return Ia(e,t,i,n),t.child}function Wa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ha(e,t,n,r,i){var o=gi(n)?vi:hi.current;return o=mi(t,o),oo(t,i),n=sa(e,t,n,r,o,i),null===e||La?(t.flags|=1,Ia(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function Va(e,t,n,r,i){if(gi(n)){var o=!0;wi(t)}else o=!1;if(oo(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),xo(t,n,r),ko(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=ao(u):u=mi(t,u=gi(n)?vi:hi.current);var c=n.getDerivedStateFromProps,f="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==u)&&wo(t,a,r,u),so=!1;var d=t.memoizedState;a.state=d,po(t,r,a,i),l=t.memoizedState,s!==r||d!==l||pi.current||so?("function"===typeof c&&(go(t,n,c,r),l=t.memoizedState),(s=so||bo(t,n,s,r,d,l,u))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,uo(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Gi(t.type,s),a.props=u,f=t.pendingProps,d=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=ao(l):l=mi(t,l=gi(n)?vi:hi.current);var h=n.getDerivedStateFromProps;(c="function"===typeof h||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||d!==l)&&wo(t,a,r,l),so=!1,d=t.memoizedState,a.state=d,po(t,r,a,i);var p=t.memoizedState;s!==f||d!==p||pi.current||so?("function"===typeof h&&(go(t,n,h,r),p=t.memoizedState),(u=so||bo(t,n,u,r,d,p,l))?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return qa(e,t,n,r,o,i)}function qa(e,t,n,r,i,o){Wa(e,t);var a=0!==(64&t.flags);if(!r&&!a)return i&&ki(t,n,!1),os(e,t,o);r=t.stateNode,Na.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Po(t,e.child,null,o),t.child=Po(t,null,s,o)):Ia(e,t,s,o),t.memoizedState=r.state,i&&ki(t,n,!0),t.child}function Ua(e){var t=e.stateNode;t.pendingContext?bi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(0,t.context,!1),jo(e,t.containerInfo)}var Qa,Xa,Ya,Ga={dehydrated:null,retryLane:0};function Ka(e,t,n){var r,i=t.pendingProps,o=Io.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),fi(Io,1&o),null===e?(void 0!==i.fallback&&Vo(t),e=i.children,o=i.fallback,a?(e=Ja(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ga,e):"number"===typeof i.unstable_expectedLoadTime?(e=Ja(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ga,t.lanes=33554432,e):((n=Xl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=ts(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Ga,i):(n=es(e,t,i.children,n),t.memoizedState=null,n))}function Ja(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Xl(t,i,0,null),n=Ql(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function es(e,t,n,r){var i=e.child;return e=i.sibling,n=ql(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=ql(a,s),null!==e?r=ql(e,r):(r=Ql(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),io(e.return,t)}function rs(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function is(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ia(e,t,r.children,n),0!==(2&(r=Io.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fi(Io,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===zo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rs(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===zo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rs(t,!0,n,null,o,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function os(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fs|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=ql(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ql(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!$o)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return gi(t.type)&&yi(),null;case 3:return _o(),ci(pi),ci(hi),Yo(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Uo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Lo(t);var o=Do(Ro.current);if(n=t.type,null!==e&&null!=t.stateNode)Xa(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Do(Zo.current),Uo(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Kr]=t,r[Jr]=s,n){case"dialog":Zr("cancel",r),Zr("close",r);break;case"iframe":case"object":case"embed":Zr("load",r);break;case"video":case"audio":for(e=0;e<Mr.length;e++)Zr(Mr[e],r);break;case"source":Zr("error",r);break;case"img":case"image":case"link":Zr("error",r),Zr("load",r);break;case"details":Zr("toggle",r);break;case"input":ee(r,s),Zr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Zr("invalid",r);break;case"textarea":le(r,s),Zr("invalid",r)}for(var u in Oe(n,s),e=null,s)s.hasOwnProperty(u)&&(o=s[u],"children"===u?"string"===typeof o?r.textContent!==o&&(e=["children",o]):"number"===typeof o&&r.textContent!==""+o&&(e=["children",""+o]):l.hasOwnProperty(u)&&null!=o&&"onScroll"===u&&Zr("scroll",r));switch(n){case"input":Y(r),re(r,s,!0);break;case"textarea":Y(r),ce(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Br)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(u=9===o.nodeType?o:o.ownerDocument,e===fe&&(e=he(n)),e===fe?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Kr]=t,e[Jr]=r,Qa(e,t),t.stateNode=e,u=Ce(n,r),n){case"dialog":Zr("cancel",e),Zr("close",e),o=r;break;case"iframe":case"object":case"embed":Zr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Mr.length;o++)Zr(Mr[o],e);o=r;break;case"source":Zr("error",e),o=r;break;case"img":case"image":case"link":Zr("error",e),Zr("load",e),o=r;break;case"details":Zr("toggle",e),o=r;break;case"input":ee(e,r),o=J(e,r),Zr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Zr("invalid",e);break;case"textarea":le(e,r),o=se(e,r),Zr("invalid",e);break;default:o=r}Oe(n,o);var c=o;for(s in c)if(c.hasOwnProperty(s)){var f=c[s];"style"===s?ke(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&ge(e,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&&ye(e,f):"number"===typeof f&&ye(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(l.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Zr("scroll",e):null!=f&&x(e,s,f,u))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Q(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Br)}Wr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ya(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Do(Ro.current),Do(Zo.current),Uo(t)?(r=t.stateNode,n=t.memoizedProps,r[Kr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Kr]=t,t.stateNode=r)}return null;case 13:return ci(Io),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Uo(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Io.current)?0===Is&&(Is=3):(0!==Is&&3!==Is||(Is=4),null===Ds||0===(134217727&Fs)&&0===(134217727&$s)||yl(Ds,_s))),(r||n)&&(t.flags|=4),null);case 4:return _o(),null===e&&Rr(t.stateNode.containerInfo),null;case 10:return ro(t),null;case 19:if(ci(Io),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(u=r.rendering))if(s)as(r,!1);else{if(0!==Is||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(u=zo(e))){for(t.flags|=64,as(r,!1),null!==(s=u.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(u=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=u.childLanes,s.lanes=u.lanes,s.child=u.child,s.memoizedProps=u.memoizedProps,s.memoizedState=u.memoizedState,s.updateQueue=u.updateQueue,s.type=u.type,e=u.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fi(Io,1&Io.current|2),t.child}e=e.sibling}null!==r.tail&&Wi()>qs&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=zo(u))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!$o)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Wi()-r.renderingStartTime>qs&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Wi(),n.sibling=null,t=Io.current,fi(Io,s?1&t|2:1&t),n):null;case 23:case 24:return Sl(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function ls(e){switch(e.tag){case 1:gi(e.type)&&yi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(_o(),ci(pi),ci(hi),Yo(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Lo(e),null;case 13:return ci(Io),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ci(Io),null;case 4:return _o(),null;case 10:return ro(e),null;case 23:case 24:return Sl(),null;default:return null}}function us(e,t){try{var n="",r=t;do{n+=q(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function cs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Qa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Xa=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Do(Zo.current);var a,s=null;switch(n){case"input":o=J(e,o),r=J(e,r),s=[];break;case"option":o=oe(e,o),r=oe(e,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=se(e,o),r=se(e,r),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Br)}for(f in Oe(n,r),n=null,o)if(!r.hasOwnProperty(f)&&o.hasOwnProperty(f)&&null!=o[f])if("style"===f){var u=o[f];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(l.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var c=r[f];if(u=null!=o?o[f]:void 0,r.hasOwnProperty(f)&&c!==u&&(null!=c||null!=u))if("style"===f)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(s=s||[]).push(f,c)):"children"===f?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(l.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&Zr("scroll",e),s||u===c||(s=[])):"object"===typeof c&&null!==c&&c.$$typeof===_?c.toString():(s=s||[]).push(f,c))}n&&(s=s||[]).push("style",n);var f=s;(t.updateQueue=f)&&(t.flags|=4)}},Ya=function(e,t,n,r){n!==r&&(t.flags|=4)};var fs="function"===typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=co(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ys||(Ys=!0,Gs=r),cs(0,t)},n}function hs(e,t,n){(n=co(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return cs(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Ks?Ks=new Set([this]):Ks.add(this),cs(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var ps="function"===typeof WeakSet?WeakSet:Set;function vs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Bl(e,n)}else t.current=null}function ms(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Gi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Ur(t.stateNode.containerInfo))}throw Error(a(163))}function gs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(Ll(n,e),Nl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Gi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&vo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}vo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Wr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))))}throw Error(a(163))}function ys(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=we("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(Oi&&"function"===typeof Oi.onCommitFiberUnmount)try{Oi.onCommitFiberUnmount(Si,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))Ll(t,n);else{r=t;try{i()}catch(o){Bl(r,o)}}n=n.next}while(n!==e)}break;case 1:if(vs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Bl(t,o)}break;case 5:vs(t);break;case 4:Cs(e,t)}}function xs(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ws(e){return 5===e.tag||3===e.tag||4===e.tag}function ks(e){e:{for(var t=e.return;null!==t;){if(ws(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ws(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Ss(e,n,t):Os(e,n,t)}function Ss(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Br));else if(4!==r&&null!==(e=e.child))for(Ss(e,t,n),e=e.sibling;null!==e;)Ss(e,t,n),e=e.sibling}function Os(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Os(e,t,n),e=e.sibling;null!==e;)Os(e,t,n),e=e.sibling}function Cs(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var s=e,l=i,u=l;;)if(bs(s,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===l)break e;for(;null===u.sibling;){if(null===u.return||u.return===l)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(s=n,l=i.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(bs(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Ms(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Jr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ce(e,i),t=Ce(e,r),i=0;i<o.length;i+=2){var s=o[i],l=o[i+1];"style"===s?ke(n,l):"dangerouslySetInnerHTML"===s?ge(n,l):"children"===s?ye(n,l):x(n,s,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ue(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ae(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Vs=Wi(),ys(t.child,!0)),void Ps(t);case 19:return void Ps(t);case 23:case 24:return void ys(t,null!==t.memoizedState)}throw Error(a(163))}function Ps(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ps),t.forEach((function(t){var r=$l.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ts(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Es=Math.ceil,Zs=w.ReactCurrentDispatcher,As=w.ReactCurrentOwner,Rs=0,Ds=null,js=null,_s=0,Ns=0,Ls=ui(0),Is=0,zs=null,Bs=0,Fs=0,$s=0,Ws=0,Hs=null,Vs=0,qs=1/0;function Us(){qs=Wi()+500}var Qs,Xs=null,Ys=!1,Gs=null,Ks=null,Js=!1,el=null,tl=90,nl=[],rl=[],il=null,ol=0,al=null,sl=-1,ll=0,ul=0,cl=null,fl=!1;function dl(){return 0!==(48&Rs)?Wi():-1!==sl?sl:sl=Wi()}function hl(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Hi()?1:2;if(0===ll&&(ll=Bs),0!==Yi.transition){0!==ul&&(ul=null!==Hs?Hs.pendingLanes:0),e=ll;var t=4186112&~ul;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Hi(),0!==(4&Rs)&&98===e?e=Bt(12,ll):e=Bt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ll),e}function pl(e,t,n){if(50<ol)throw ol=0,al=null,Error(a(185));if(null===(e=vl(e,t)))return null;Wt(e,t,n),e===Ds&&($s|=t,4===Is&&yl(e,_s));var r=Hi();1===t?0!==(8&Rs)&&0===(48&Rs)?bl(e):(ml(e,n),0===Rs&&(Us(),Qi())):(0===(4&Rs)||98!==r&&99!==r||(null===il?il=new Set([e]):il.add(e)),ml(e,n)),Hs=e}function vl(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function ml(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Ht(s),u=1<<l,c=o[l];if(-1===c){if(0===(u&r)||0!==(u&i)){c=t,Lt(u);var f=Nt;o[l]=10<=f?c+250:6<=f?c+5e3:-1}}else c<=t&&(e.expiredLanes|=u);s&=~u}if(r=It(e,e===Ds?_s:0),t=Nt,0===r)null!==n&&(n!==Li&&Pi(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Li&&Pi(n)}15===t?(n=bl.bind(null,e),null===zi?(zi=[n],Bi=Mi(Ri,Xi)):zi.push(n),n=Li):14===t?n=Ui(99,bl.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Ui(n,gl.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function gl(e){if(sl=-1,ul=ll=0,0!==(48&Rs))throw Error(a(327));var t=e.callbackNode;if(_l()&&e.callbackNode!==t)return null;var n=It(e,e===Ds?_s:0);if(0===n)return null;var r=n,i=Rs;Rs|=16;var o=Ml();for(Ds===e&&_s===r||(Us(),Ol(e,r));;)try{El();break}catch(l){Cl(e,l)}if(no(),Zs.current=o,Rs=i,null!==js?r=0:(Ds=null,_s=0,r=Is),0!==(Bs&$s))Ol(e,0);else if(0!==r){if(2===r&&(Rs|=64,e.hydrate&&(e.hydrate=!1,Ur(e.containerInfo)),0!==(n=zt(e))&&(r=Pl(e,n))),1===r)throw t=zs,Ol(e,0),yl(e,n),ml(e,Wi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Rl(e);break;case 3:if(yl(e,n),(62914560&n)===n&&10<(r=Vs+500-Wi())){if(0!==It(e,0))break;if(((i=e.suspendedLanes)&n)!==n){dl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Vr(Rl.bind(null,e),r);break}Rl(e);break;case 4:if(yl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-Ht(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Wi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Es(n/1960))-n)){e.timeoutHandle=Vr(Rl.bind(null,e),n);break}Rl(e);break;default:throw Error(a(329))}}return ml(e,Wi()),e.callbackNode===t?gl.bind(null,e):null}function yl(e,t){for(t&=~Ws,t&=~$s,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function bl(e){if(0!==(48&Rs))throw Error(a(327));if(_l(),e===Ds&&0!==(e.expiredLanes&_s)){var t=_s,n=Pl(e,t);0!==(Bs&$s)&&(n=Pl(e,t=It(e,t)))}else n=Pl(e,t=It(e,0));if(0!==e.tag&&2===n&&(Rs|=64,e.hydrate&&(e.hydrate=!1,Ur(e.containerInfo)),0!==(t=zt(e))&&(n=Pl(e,t))),1===n)throw n=zs,Ol(e,0),yl(e,t),ml(e,Wi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rl(e),ml(e,Wi()),null}function xl(e,t){var n=Rs;Rs|=1;try{return e(t)}finally{0===(Rs=n)&&(Us(),Qi())}}function wl(e,t){var n=Rs;Rs&=-2,Rs|=8;try{return e(t)}finally{0===(Rs=n)&&(Us(),Qi())}}function kl(e,t){fi(Ls,Ns),Ns|=t,Bs|=t}function Sl(){Ns=Ls.current,ci(Ls)}function Ol(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,qr(n)),null!==js)for(n=js.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&yi();break;case 3:_o(),ci(pi),ci(hi),Yo();break;case 5:Lo(r);break;case 4:_o();break;case 13:case 19:ci(Io);break;case 10:ro(r);break;case 23:case 24:Sl()}n=n.return}Ds=e,js=ql(e.current,null),_s=Ns=Bs=t,Is=0,zs=null,Ws=$s=Fs=0}function Cl(e,t){for(;;){var n=js;try{if(no(),Go.current=Ra,ra){for(var r=ea.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ra=!1}if(Jo=0,na=ta=ea=null,ia=!1,As.current=null,null===n||null===n.return){Is=1,zs=t,js=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=_s,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=l;if(0===(2&s.mode)){var c=s.alternate;c?(s.updateQueue=c.updateQueue,s.memoizedState=c.memoizedState,s.lanes=c.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!==(1&Io.current),d=a;do{var h;if(h=13===d.tag){var p=d.memoizedState;if(null!==p)h=null!==p.dehydrated;else{var v=d.memoizedProps;h=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(h){var m=d.updateQueue;if(null===m){var g=new Set;g.add(u),d.updateQueue=g}else m.add(u);if(0===(2&d.mode)){if(d.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=co(-1,1);y.tag=2,fo(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new fs,l=new Set,b.set(u,l)):void 0===(l=b.get(u))&&(l=new Set,b.set(u,l)),!l.has(s)){l.add(s);var x=Fl.bind(null,o,u,s);u.then(x,x)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);l=Error((U(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Is&&(Is=2),l=us(l,s),d=a;do{switch(d.tag){case 3:o=l,d.flags|=4096,t&=-t,d.lanes|=t,ho(d,ds(0,o,t));break e;case 1:o=l;var w=d.type,k=d.stateNode;if(0===(64&d.flags)&&("function"===typeof w.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===Ks||!Ks.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t,ho(d,hs(d,o,t));break e}}d=d.return}while(null!==d)}Al(n)}catch(S){t=S,js===n&&null!==n&&(js=n=n.return);continue}break}}function Ml(){var e=Zs.current;return Zs.current=Ra,null===e?Ra:e}function Pl(e,t){var n=Rs;Rs|=16;var r=Ml();for(Ds===e&&_s===t||Ol(e,t);;)try{Tl();break}catch(i){Cl(e,i)}if(no(),Rs=n,Zs.current=r,null!==js)throw Error(a(261));return Ds=null,_s=0,Is}function Tl(){for(;null!==js;)Zl(js)}function El(){for(;null!==js&&!Ti();)Zl(js)}function Zl(e){var t=Qs(e.alternate,e,Ns);e.memoizedProps=e.pendingProps,null===t?Al(e):js=t,As.current=null}function Al(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Ns)))return void(js=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Ns)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ls(t)))return n.flags&=2047,void(js=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(js=t);js=t=e}while(null!==t);0===Is&&(Is=5)}function Rl(e){var t=Hi();return qi(99,Dl.bind(null,e,t)),null}function Dl(e,t){do{_l()}while(null!==el);if(0!==(48&Rs))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<o;){var u=31-Ht(o),c=1<<u;i[u]=0,s[u]=-1,l[u]=-1,o&=~c}if(null!==il&&0===(24&r)&&il.has(e)&&il.delete(e),e===Ds&&(js=Ds=null,_s=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Rs,Rs|=32,As.current=null,Fr=Xt,gr(s=mr())){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(c=l.getSelection&&l.getSelection())&&0!==c.rangeCount){l=c.anchorNode,o=c.anchorOffset,u=c.focusNode,c=c.focusOffset;try{l.nodeType,u.nodeType}catch(M){l=null;break e}var f=0,d=-1,h=-1,p=0,v=0,m=s,g=null;t:for(;;){for(var y;m!==l||0!==o&&3!==m.nodeType||(d=f+o),m!==u||0!==c&&3!==m.nodeType||(h=f+c),3===m.nodeType&&(f+=m.nodeValue.length),null!==(y=m.firstChild);)g=m,m=y;for(;;){if(m===s)break t;if(g===l&&++p===o&&(d=f),g===u&&++v===c&&(h=f),null!==(y=m.nextSibling))break;g=(m=g).parentNode}m=y}l=-1===d||-1===h?null:{start:d,end:h}}else l=null;l=l||{start:0,end:0}}else l=null;$r={focusedElem:s,selectionRange:l},Xt=!1,cl=null,fl=!1,Xs=r;do{try{jl()}catch(M){if(null===Xs)throw Error(a(330));Bl(Xs,M),Xs=Xs.nextEffect}}while(null!==Xs);cl=null,Xs=r;do{try{for(s=e;null!==Xs;){var b=Xs.flags;if(16&b&&ye(Xs.stateNode,""),128&b){var x=Xs.alternate;if(null!==x){var w=x.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&b){case 2:ks(Xs),Xs.flags&=-3;break;case 6:ks(Xs),Xs.flags&=-3,Ms(Xs.alternate,Xs);break;case 1024:Xs.flags&=-1025;break;case 1028:Xs.flags&=-1025,Ms(Xs.alternate,Xs);break;case 4:Ms(Xs.alternate,Xs);break;case 8:Cs(s,l=Xs);var k=l.alternate;xs(l),null!==k&&xs(k)}Xs=Xs.nextEffect}}catch(M){if(null===Xs)throw Error(a(330));Bl(Xs,M),Xs=Xs.nextEffect}}while(null!==Xs);if(w=$r,x=mr(),b=w.focusedElem,s=w.selectionRange,x!==b&&b&&b.ownerDocument&&vr(b.ownerDocument.documentElement,b)){null!==s&&gr(b)&&(x=s.start,void 0===(w=s.end)&&(w=x),"selectionStart"in b?(b.selectionStart=x,b.selectionEnd=Math.min(w,b.value.length)):(w=(x=b.ownerDocument||document)&&x.defaultView||window).getSelection&&(w=w.getSelection(),l=b.textContent.length,k=Math.min(s.start,l),s=void 0===s.end?k:Math.min(s.end,l),!w.extend&&k>s&&(l=s,s=k,k=l),l=pr(b,k),o=pr(b,s),l&&o&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==o.node||w.focusOffset!==o.offset)&&((x=x.createRange()).setStart(l.node,l.offset),w.removeAllRanges(),k>s?(w.addRange(x),w.extend(o.node,o.offset)):(x.setEnd(o.node,o.offset),w.addRange(x))))),x=[];for(w=b;w=w.parentNode;)1===w.nodeType&&x.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<x.length;b++)(w=x[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Xt=!!Fr,$r=Fr=null,e.current=n,Xs=r;do{try{for(b=e;null!==Xs;){var S=Xs.flags;if(36&S&&gs(b,Xs.alternate,Xs),128&S){x=void 0;var O=Xs.ref;if(null!==O){var C=Xs.stateNode;Xs.tag,x=C,"function"===typeof O?O(x):O.current=x}}Xs=Xs.nextEffect}}catch(M){if(null===Xs)throw Error(a(330));Bl(Xs,M),Xs=Xs.nextEffect}}while(null!==Xs);Xs=null,Ii(),Rs=i}else e.current=n;if(Js)Js=!1,el=e,tl=t;else for(Xs=r;null!==Xs;)t=Xs.nextEffect,Xs.nextEffect=null,8&Xs.flags&&((S=Xs).sibling=null,S.stateNode=null),Xs=t;if(0===(r=e.pendingLanes)&&(Ks=null),1===r?e===al?ol++:(ol=0,al=e):ol=0,n=n.stateNode,Oi&&"function"===typeof Oi.onCommitFiberRoot)try{Oi.onCommitFiberRoot(Si,n,void 0,64===(64&n.current.flags))}catch(M){}if(ml(e,Wi()),Ys)throw Ys=!1,e=Gs,Gs=null,e;return 0!==(8&Rs)||Qi(),null}function jl(){for(;null!==Xs;){var e=Xs.alternate;fl||null===cl||(0!==(8&Xs.flags)?et(Xs,cl)&&(fl=!0):13===Xs.tag&&Ts(e,Xs)&&et(Xs,cl)&&(fl=!0));var t=Xs.flags;0!==(256&t)&&ms(e,Xs),0===(512&t)||Js||(Js=!0,Ui(97,(function(){return _l(),null}))),Xs=Xs.nextEffect}}function _l(){if(90!==tl){var e=97<tl?97:tl;return tl=90,qi(e,Il)}return!1}function Nl(e,t){nl.push(t,e),Js||(Js=!0,Ui(97,(function(){return _l(),null})))}function Ll(e,t){rl.push(t,e),Js||(Js=!0,Ui(97,(function(){return _l(),null})))}function Il(){if(null===el)return!1;var e=el;if(el=null,0!==(48&Rs))throw Error(a(331));var t=Rs;Rs|=32;var n=rl;rl=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"===typeof s)try{s()}catch(u){if(null===o)throw Error(a(330));Bl(o,u)}}for(n=nl,nl=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(u){if(null===o)throw Error(a(330));Bl(o,u)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Rs=t,Qi(),!0}function zl(e,t,n){fo(e,t=ds(0,t=us(n,t),1)),t=dl(),null!==(e=vl(e,1))&&(Wt(e,1,t),ml(e,t))}function Bl(e,t){if(3===e.tag)zl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){zl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ks||!Ks.has(r))){var i=hs(n,e=us(t,e),1);if(fo(n,i),i=dl(),null!==(n=vl(n,1)))Wt(n,1,i),ml(n,i);else if("function"===typeof r.componentDidCatch&&(null===Ks||!Ks.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Fl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=dl(),e.pingedLanes|=e.suspendedLanes&n,Ds===e&&(_s&n)===n&&(4===Is||3===Is&&(62914560&_s)===_s&&500>Wi()-Vs?Ol(e,0):Ws|=n),ml(e,t)}function $l(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Hi()?1:2:(0===ll&&(ll=Bs),0===(t=Ft(62914560&~ll))&&(t=4194304))),n=dl(),null!==(e=vl(e,t))&&(Wt(e,t,n),ml(e,n))}function Wl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Hl(e,t,n,r){return new Wl(e,t,n,r)}function Vl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ql(e,t){var n=e.alternate;return null===n?((n=Hl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ul(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)Vl(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case O:return Ql(n.children,i,o,t);case N:s=8,i|=16;break;case C:s=8,i|=1;break;case M:return(e=Hl(12,n,t,8|i)).elementType=M,e.type=M,e.lanes=o,e;case Z:return(e=Hl(13,n,t,i)).type=Z,e.elementType=Z,e.lanes=o,e;case A:return(e=Hl(19,n,t,i)).elementType=A,e.lanes=o,e;case L:return Xl(n,i,o,t);case I:return(e=Hl(24,n,t,i)).elementType=I,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case P:s=10;break e;case T:s=9;break e;case E:s=11;break e;case R:s=14;break e;case D:s=16,r=null;break e;case j:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Hl(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ql(e,t,n,r){return(e=Hl(7,e,r,t)).lanes=n,e}function Xl(e,t,n,r){return(e=Hl(23,e,r,t)).elementType=L,e.lanes=n,e}function Yl(e,t,n){return(e=Hl(6,e,null,t)).lanes=n,e}function Gl(e,t,n){return(t=Hl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=$t(0),this.expirationTimes=$t(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$t(0),this.mutableSourceEagerHydrationData=null}function Jl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function eu(e,t,n,r){var i=t.current,o=dl(),s=hl(i);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(gi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var u=n.type;if(gi(u)){n=xi(n,u,l);break e}}n=l}else n=di;return null===t.context?t.context=n:t.pendingContext=n,(t=co(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fo(i,t),pl(i,s,o),s}function tu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ru(e,t){nu(e,t),(e=e.alternate)&&nu(e,t)}function iu(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Kl(e,t,null!=n&&!0===n.hydrate),t=Hl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,lo(t),e[ei]=n.current,Rr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function ou(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function au(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=tu(a);s.call(e)}}eu(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new iu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var l=i;i=function(){var e=tu(a);l.call(e)}}wl((function(){eu(t,a,e,i)}))}return tu(a)}function su(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ou(t))throw Error(a(200));return Jl(e,t,null,n)}Qs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||pi.current)La=!0;else{if(0===(n&r)){switch(La=!1,t.tag){case 3:Ua(t),Qo();break;case 5:No(t);break;case 1:gi(t.type)&&wi(t);break;case 4:jo(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;fi(Ki,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Ka(e,t,n):(fi(Io,1&Io.current),null!==(t=os(e,t,n))?t.sibling:null);fi(Io,1&Io.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return is(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),fi(Io,Io.current),r)break;return null;case 23:case 24:return t.lanes=0,$a(e,t,n)}return os(e,t,n)}La=0!==(16384&e.flags)}else La=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=mi(t,hi.current),oo(t,n),i=sa(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,gi(r)){var o=!0;wi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,lo(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&go(t,r,s,e),i.updater=yo,t.stateNode=i,i._reactInternals=t,ko(t,r,e,n),t=qa(null,t,r,!0,o,n)}else t.tag=0,Ia(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"===typeof e)return Vl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===E)return 11;if(e===R)return 14}return 2}(i),e=Gi(i,e),o){case 0:t=Ha(null,t,i,e,n);break e;case 1:t=Va(null,t,i,e,n);break e;case 11:t=za(null,t,i,e,n);break e;case 14:t=Ba(null,t,i,Gi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ha(e,t,r,i=t.elementType===r?i:Gi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Va(e,t,r,i=t.elementType===r?i:Gi(r,i),n);case 3:if(Ua(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,uo(e,t),po(t,r,null,n),(r=t.memoizedState.element)===i)Qo(),t=os(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(Fo=Qr(t.stateNode.containerInfo.firstChild),Bo=t,o=$o=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Xo.push(o);for(n=To(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Ia(e,t,r,n),Qo();t=t.child}return t;case 5:return No(t),null===e&&Vo(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Hr(r,i)?s=null:null!==o&&Hr(r,o)&&(t.flags|=16),Wa(e,t),Ia(e,t,s,n),t.child;case 6:return null===e&&Vo(t),null;case 13:return Ka(e,t,n);case 4:return jo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Po(t,null,r,n):Ia(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,za(e,t,r,i=t.elementType===r?i:Gi(r,i),n);case 7:return Ia(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ia(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var l=t.type._context;if(fi(Ki,l._currentValue),l._currentValue=o,null!==s)if(l=s.value,0===(o=cr(l,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!pi.current){t=os(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var u=l.dependencies;if(null!==u){s=l.child;for(var c=u.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&o)){1===l.tag&&((c=co(-1,n&-n)).tag=2,fo(l,c)),l.lanes|=n,null!==(c=l.alternate)&&(c.lanes|=n),io(l.return,n),u.lanes|=n;break}c=c.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Ia(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,oo(t,n),r=r(i=ao(i,o.unstable_observedBits)),t.flags|=1,Ia(e,t,r,n),t.child;case 14:return o=Gi(i=t.type,t.pendingProps),Ba(e,t,i,o=Gi(i.type,o),r,n);case 15:return Fa(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Gi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,gi(r)?(e=!0,wi(t)):e=!1,oo(t,n),xo(t,r,i),ko(t,r,i,n),qa(null,t,r,!0,e,n);case 19:return is(e,t,n);case 23:case 24:return $a(e,t,n)}throw Error(a(156,t.tag))},iu.prototype.render=function(e){eu(e,this._internalRoot,null,null)},iu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;eu(null,e,null,(function(){t[ei]=null}))},tt=function(e){13===e.tag&&(pl(e,4,dl()),ru(e,4))},nt=function(e){13===e.tag&&(pl(e,67108864,dl()),ru(e,67108864))},rt=function(e){if(13===e.tag){var t=dl(),n=hl(e);pl(e,n,t),ru(e,n)}},it=function(e,t){return t()},Pe=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=oi(r);if(!i)throw Error(a(90));G(r),ne(r,i)}}}break;case"textarea":ue(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},De=xl,je=function(e,t,n,r,i){var o=Rs;Rs|=4;try{return qi(98,e.bind(null,t,n,r,i))}finally{0===(Rs=o)&&(Us(),Qi())}},_e=function(){0===(49&Rs)&&(function(){if(null!==il){var e=il;il=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,ml(e,Wi())}))}Qi()}(),_l())},Ne=function(e,t){var n=Rs;Rs|=2;try{return e(t)}finally{0===(Rs=n)&&(Us(),Qi())}};var lu={Events:[ri,ii,oi,Ae,Re,_l,{current:!1}]},uu={findFiberByHostInstance:ni,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cu={bundleType:uu.bundleType,version:uu.version,rendererPackageName:uu.rendererPackageName,rendererConfig:uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Je(e))?null:e.stateNode},findFiberByHostInstance:uu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fu.isDisabled&&fu.supportsFiber)try{Si=fu.inject(cu),Oi=fu}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lu,t.createPortal=su,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Je(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Rs;if(0!==(48&n))return e(t);Rs|=1;try{if(e)return qi(99,e.bind(null,t))}finally{Rs=n,Qi()}},t.hydrate=function(e,t,n){if(!ou(t))throw Error(a(200));return au(null,e,t,!0,n)},t.render=function(e,t,n){if(!ou(t))throw Error(a(200));return au(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ou(e))throw Error(a(40));return!!e._reactRootContainer&&(wl((function(){au(null,null,e,!1,(function(){e._reactRootContainer=null,e[ei]=null}))})),!0)},t.unstable_batchedUpdates=xl,t.unstable_createPortal=function(e,t){return su(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ou(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return au(e,t,n,!1,r)},t.version="17.0.2"},1168:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(534)},4561:function(e,t,n){"use strict";function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return f.default}}),t.default=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,n&&n.set(e,i);return i}(n(7313)),o=p(n(5192)),a=p(n(1168)),s=p(n(3061)),l=n(1407),u=n(9873),c=n(3579),f=p(n(4303)),d=p(n(7776)),h=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function p(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}function g(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}function O(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=P(e);if(t){var i=P(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return M(e)}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(c,e);var t,n,r,o=O(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),T(M(t=o.call(this,e)),"onDragStart",(function(e,n){if((0,d.default)("Draggable: onDragStart: %j",n),!1===t.props.onStart(e,(0,u.createDraggableData)(M(t),n)))return!1;t.setState({dragging:!0,dragged:!0})})),T(M(t),"onDrag",(function(e,n){if(!t.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",n);var r=(0,u.createDraggableData)(M(t),n),i={x:r.x,y:r.y};if(t.props.bounds){var o=i.x,a=i.y;i.x+=t.state.slackX,i.y+=t.state.slackY;var s=x((0,u.getBoundPosition)(M(t),i.x,i.y),2),l=s[0],c=s[1];i.x=l,i.y=c,i.slackX=t.state.slackX+(o-i.x),i.slackY=t.state.slackY+(a-i.y),r.x=i.x,r.y=i.y,r.deltaX=i.x-t.state.x,r.deltaY=i.y-t.state.y}if(!1===t.props.onDrag(e,r))return!1;t.setState(i)})),T(M(t),"onDragStop",(function(e,n){if(!t.state.dragging)return!1;if(!1===t.props.onStop(e,(0,u.createDraggableData)(M(t),n)))return!1;(0,d.default)("Draggable: onDragStop: %j",n);var r={dragging:!1,slackX:0,slackY:0};if(Boolean(t.props.position)){var i=t.props.position,o=i.x,a=i.y;r.x=o,r.y=a}t.setState(r)})),t.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:b({},e.position),slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return t=c,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:b({},n)})}}],(n=[{key:"componentDidMount",value:function(){"undefined"!==typeof window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:a.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),r=t.defaultPosition,o=t.defaultClassName,a=t.defaultClassNameDragging,c=t.defaultClassNameDragged,d=t.position,p=t.positionOffset,v=(t.scale,g(t,h)),y={},x=null,w=!Boolean(d)||this.state.dragging,k=d||r,S={x:(0,u.canDragX)(this)&&w?this.state.x:k.x,y:(0,u.canDragY)(this)&&w?this.state.y:k.y};this.state.isElementSVG?x=(0,l.createSVGTransform)(S,p):y=(0,l.createCSSTransform)(S,p);var O=(0,s.default)(n.props.className||"",o,(T(e={},a,this.state.dragging),T(e,c,this.state.dragged),e));return i.createElement(f.default,m({},v,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),i.cloneElement(i.Children.only(n),{className:O,style:b(b({},n.props.style),y),transform:x}))}}])&&k(t.prototype,n),r&&k(t,r),c}(i.Component);t.default=E,T(E,"displayName","Draggable"),T(E,"propTypes",b(b({},f.default.propTypes),{},{axis:o.default.oneOf(["both","x","y","none"]),bounds:o.default.oneOfType([o.default.shape({left:o.default.number,right:o.default.number,top:o.default.number,bottom:o.default.number}),o.default.string,o.default.oneOf([!1])]),defaultClassName:o.default.string,defaultClassNameDragging:o.default.string,defaultClassNameDragged:o.default.string,defaultPosition:o.default.shape({x:o.default.number,y:o.default.number}),positionOffset:o.default.shape({x:o.default.oneOfType([o.default.number,o.default.string]),y:o.default.oneOfType([o.default.number,o.default.string])}),position:o.default.shape({x:o.default.number,y:o.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe})),T(E,"defaultProps",b(b({},f.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},4303:function(e,t,n){"use strict";function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,n&&n.set(e,i);return i}(n(7313)),o=f(n(5192)),a=f(n(1168)),s=n(1407),l=n(9873),u=n(3579),c=f(n(7776));function f(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function y(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var i=w(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S={start:"touchstart",move:"touchmove",stop:"touchend"},O={start:"mousedown",move:"mousemove",stop:"mouseup"},C=O,M=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(u,e);var t,n,r,o=y(u);function u(){var e;v(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return k(x(e=o.call.apply(o,[this].concat(n))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),k(x(e),"mounted",!1),k(x(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"===typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,s.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,s.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var i=(0,s.getTouchIdentifier)(t);e.setState({touchIdentifier:i});var o=(0,l.getControlPosition)(t,i,x(e));if(null!=o){var a=o.x,u=o.y,f=(0,l.createCoreData)(x(e),a,u);(0,c.default)("DraggableCore: handleDragStart: %j",f),(0,c.default)("calling",e.props.onStart),!1!==e.props.onStart(t,f)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,s.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:a,lastY:u}),(0,s.addEvent)(r,C.move,e.handleDrag),(0,s.addEvent)(r,C.stop,e.handleDragStop))}}})),k(x(e),"handleDrag",(function(t){var n=(0,l.getControlPosition)(t,e.state.touchIdentifier,x(e));if(null!=n){var r=n.x,i=n.y;if(Array.isArray(e.props.grid)){var o=r-e.state.lastX,a=i-e.state.lastY,s=h((0,l.snapToGrid)(e.props.grid,o,a),2);if(o=s[0],a=s[1],!o&&!a)return;r=e.state.lastX+o,i=e.state.lastY+a}var u=(0,l.createCoreData)(x(e),r,i);if((0,c.default)("DraggableCore: handleDrag: %j",u),!1!==e.props.onDrag(t,u)&&!1!==e.mounted)e.setState({lastX:r,lastY:i});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(d){var f=document.createEvent("MouseEvents");f.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(f)}}})),k(x(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,l.getControlPosition)(t,e.state.touchIdentifier,x(e));if(null!=n){var r=n.x,i=n.y,o=(0,l.createCoreData)(x(e),r,i);if(!1===e.props.onStop(t,o)||!1===e.mounted)return!1;var a=e.findDOMNode();a&&e.props.enableUserSelectHack&&(0,s.removeUserSelectStyles)(a.ownerDocument),(0,c.default)("DraggableCore: handleDragStop: %j",o),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),a&&((0,c.default)("DraggableCore: Removing handlers"),(0,s.removeEvent)(a.ownerDocument,C.move,e.handleDrag),(0,s.removeEvent)(a.ownerDocument,C.stop,e.handleDragStop))}}})),k(x(e),"onMouseDown",(function(t){return C=O,e.handleDragStart(t)})),k(x(e),"onMouseUp",(function(t){return C=O,e.handleDragStop(t)})),k(x(e),"onTouchStart",(function(t){return C=S,e.handleDragStart(t)})),k(x(e),"onTouchEnd",(function(t){return C=S,e.handleDragStop(t)})),e}return t=u,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,s.addEvent)(e,S.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,s.removeEvent)(t,O.move,this.handleDrag),(0,s.removeEvent)(t,S.move,this.handleDrag),(0,s.removeEvent)(t,O.stop,this.handleDragStop),(0,s.removeEvent)(t,S.stop,this.handleDragStop),(0,s.removeEvent)(e,S.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,s.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:a.default.findDOMNode(this)}},{key:"render",value:function(){return i.cloneElement(i.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&m(t.prototype,n),r&&m(t,r),u}(i.Component);t.default=M,k(M,"displayName","DraggableCore"),k(M,"propTypes",{allowAnyClick:o.default.bool,disabled:o.default.bool,enableUserSelectHack:o.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:o.default.arrayOf(o.default.number),handle:o.default.string,cancel:o.default.string,nodeRef:o.default.object,onStart:o.default.func,onDrag:o.default.func,onStop:o.default.func,onMouseDown:o.default.func,scale:o.default.number,className:u.dontSetMe,style:u.dontSetMe,transform:u.dontSetMe}),k(M,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},9461:function(e,t,n){"use strict";var r=n(4561),i=r.default,o=r.DraggableCore;e.exports=i,e.exports.default=i,e.exports.DraggableCore=o},1407:function(e,t,n){"use strict";function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.matchesSelector=f,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(f(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.addEvent=function(e,t,n,r){if(!e)return;var i=l({capture:!0},r);e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n,r){if(!e)return;var i=l({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,i.int)(n.borderTopWidth),t+=(0,i.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,i.int)(n.borderLeftWidth),t+=(0,i.int)(n.borderRightWidth)},t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,i.int)(n.paddingTop),t-=(0,i.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,i.int)(n.paddingLeft),t-=(0,i.int)(n.paddingRight)},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,o=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:o}},t.createCSSTransform=function(e,t){var n=d(e,t,"px");return u({},(0,o.browserPrefixToKey)("transform",o.default),n)},t.createSVGTransform=function(e,t){return d(e,t,"")},t.getTranslation=d,t.getTouch=function(e,t){return e.targetTouches&&(0,i.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,i.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&h(e.body,"react-draggable-transparent-selection")},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&p(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(n){}},t.addClassName=h,t.removeClassName=p;var i=n(3579),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=o?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(i,s,l):i[s]=e[s]}i.default=e,n&&n.set(e,i);return i}(n(4580));function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c="";function f(e,t){return c||(c=(0,i.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,i.isFunction)(e[t])}))),!!(0,i.isFunction)(e[c])&&e[c](t)}function d(e,t,n){var r=e.x,i=e.y,o="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){var a="".concat("string"===typeof t.x?t.x:t.x+n),s="".concat("string"===typeof t.y?t.y:t.y+n);o="translate(".concat(a,", ").concat(s,")")+o}return o}function h(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function p(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},4580:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrefix=r,t.browserPrefixToKey=i,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0;var n=["Moz","Webkit","O","ms"];function r(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"===typeof window)return"";var o=null===(e=window.document)||void 0===e||null===(t=e.documentElement)||void 0===t?void 0:t.style;if(!o)return"";if(r in o)return"";for(var a=0;a<n.length;a++)if(i(r,n[a])in o)return n[a];return""}function i(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}var o=r();t.default=o},7776:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){0}},9873:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var a=e.props.bounds;a="string"===typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);var s=o(e);if("string"===typeof a){var l,u=s.ownerDocument,c=u.defaultView;if(!((l="parent"===a?s.parentNode:u.querySelector(a))instanceof c.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');var f=l,d=c.getComputedStyle(s),h=c.getComputedStyle(f);a={left:-s.offsetLeft+(0,r.int)(h.paddingLeft)+(0,r.int)(d.marginLeft),top:-s.offsetTop+(0,r.int)(h.paddingTop)+(0,r.int)(d.marginTop),right:(0,i.innerWidth)(f)-(0,i.outerWidth)(s)-s.offsetLeft+(0,r.int)(h.paddingRight)-(0,r.int)(d.marginRight),bottom:(0,i.innerHeight)(f)-(0,i.outerHeight)(s)-s.offsetTop+(0,r.int)(h.paddingBottom)-(0,r.int)(d.marginBottom)}}(0,r.isNum)(a.right)&&(t=Math.min(t,a.right));(0,r.isNum)(a.bottom)&&(n=Math.min(n,a.bottom));(0,r.isNum)(a.left)&&(t=Math.max(t,a.left));(0,r.isNum)(a.top)&&(n=Math.max(n,a.top));return[t,n]},t.snapToGrid=function(e,t,n){var r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]},t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.getControlPosition=function(e,t,n){var r="number"===typeof t?(0,i.getTouch)(e,t):null;if("number"===typeof t&&!r)return null;var a=o(n),s=n.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,i.offsetXYFromParent)(r||e,s,n.props.scale)},t.createCoreData=function(e,t,n){var i=e.state,a=!(0,r.isNum)(i.lastX),s=o(e);return a?{node:s,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:s,deltaX:t-i.lastX,deltaY:n-i.lastY,lastX:i.lastX,lastY:i.lastY,x:t,y:n}},t.createDraggableData=function(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}};var r=n(3579),i=n(1407);function o(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}},3579:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findInArray=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},t.isFunction=function(e){return"function"===typeof e||"[object Function]"===Object.prototype.toString.call(e)},t.isNum=function(e){return"number"===typeof e&&!isNaN(e)},t.int=function(e){return parseInt(e,10)},t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}},1624:function(e,t){"use strict";var n=60103,r=60106,i=60107,o=60108,a=60114,s=60109,l=60110,u=60112,c=60113,f=60120,d=60115,h=60116,p=60121,v=60122,m=60117,g=60129,y=60131;if("function"===typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),r=b("react.portal"),i=b("react.fragment"),o=b("react.strict_mode"),a=b("react.profiler"),s=b("react.provider"),l=b("react.context"),u=b("react.forward_ref"),c=b("react.suspense"),f=b("react.suspense_list"),d=b("react.memo"),h=b("react.lazy"),p=b("react.block"),v=b("react.server.block"),m=b("react.fundamental"),g=b("react.debug_trace_mode"),y=b("react.legacy_hidden")}function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case c:case f:return e;default:switch(e=e&&e.$$typeof){case l:case u:case h:case d:case s:return e;default:return t}}case r:return t}}}},6214:function(e,t,n){"use strict";n(1624)},5918:function(e,t,n){"use strict";n(1843);var r=n(7313),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:c,props:o,_owner:a.current}}t.jsx=u,t.jsxs=u},306:function(e,t,n){"use strict";var r=n(1843),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var u=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;i=f("react.element"),o=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),l=f("react.forward_ref"),t.Suspense=f("react.suspense"),u=f("react.memo"),c=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}function g(){}function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(h(85));this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=m.prototype;var b=y.prototype=new g;b.constructor=y,r(b,m.prototype),b.isPureReactComponent=!0;var x={current:null},w=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:x.current}}function O(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var C=/\/+/g;function M(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case o:l=!0}}if(l)return a=a(l=e),e=""===r?"."+M(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(C,"$&/")+"/"),P(a,t,n,"",(function(e){return e}))):null!=a&&(O(a)&&(a=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=r+M(s=e[u],u);l+=P(s,t,n,c,a)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=P(s=s.value,t,n,c=r+M(s,u++),a);else if("object"===s)throw t=""+e,Error(h(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function T(e,t,n){if(null==e)return e;var r=[],i=0;return P(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function E(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var Z={current:null};function A(){var e=Z.current;if(null===e)throw Error(h(321));return e}var R={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:x,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:T,forEach:function(e,t,n){T(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!O(e))throw Error(h(143));return e}},t.Component=m,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(h(267,e));var o=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=x.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)w.call(t,c)&&!k.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){u=Array(c);for(var f=0;f<c;f++)u[f]=arguments[f+2];o.children=u}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=O,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:E}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return A().useCallback(e,t)},t.useContext=function(e,t){return A().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return A().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return A().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return A().useLayoutEffect(e,t)},t.useMemo=function(e,t){return A().useMemo(e,t)},t.useReducer=function(e,t,n){return A().useReducer(e,t,n)},t.useRef=function(e){return A().useRef(e)},t.useState=function(e){return A().useState(e)},t.version="17.0.2"},7313:function(e,t,n){"use strict";e.exports=n(306)},6417:function(e,t,n){"use strict";e.exports=n(5918)},8937:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(A){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new T(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return Z()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var l=c(e,t,n);if("normal"===l.type){if(r=n.done?p:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",v={};function m(){}function g(){}function y(){}var b={};l(b,o,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(E([])));w&&w!==n&&r.call(w,o)&&(b=w);var k=y.prototype=m.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"===typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function C(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function E(e){if(e){var n=e[o];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:Z}}function Z(){return{value:t,done:!0}}return g.prototype=y,l(k,"constructor",y),l(y,"constructor",g),g.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,l(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(O.prototype),l(O.prototype,a,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(k),l(k,s,"Generator"),l(k,o,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:E(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(n){"object"===typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},3095:function(e,t){"use strict";var n,r,i,o;if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,c=null,f=function e(){if(null!==u)try{var n=t.unstable_now();u(!0,n),u=null}catch(r){throw setTimeout(e,0),r}};n=function(e){null!==u?setTimeout(n,0,e):(u=e,setTimeout(f,0))},r=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var p=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var v=!1,m=null,g=-1,y=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,w=x.port2;x.port1.onmessage=function(){if(null!==m){var e=t.unstable_now();b=e+y;try{m(!0,e)?w.postMessage(null):(v=!1,m=null)}catch(n){throw w.postMessage(null),n}}else v=!1},n=function(e){m=e,v||(v=!0,w.postMessage(null))},r=function(e,n){g=d((function(){e(t.unstable_now())}),n)},i=function(){h(g),g=-1}}function k(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<C(i,t)))break e;e[r]=t,e[n]=i,n=r}}function S(e){return void 0===(e=e[0])?null:e}function O(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>C(a,n))void 0!==l&&0>C(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>C(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var M=[],P=[],T=1,E=null,Z=3,A=!1,R=!1,D=!1;function j(e){for(var t=S(P);null!==t;){if(null===t.callback)O(P);else{if(!(t.startTime<=e))break;O(P),t.sortIndex=t.expirationTime,k(M,t)}t=S(P)}}function _(e){if(D=!1,j(e),!R)if(null!==S(M))R=!0,n(N);else{var t=S(P);null!==t&&r(_,t.startTime-e)}}function N(e,n){R=!1,D&&(D=!1,i()),A=!0;var o=Z;try{for(j(n),E=S(M);null!==E&&(!(E.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=E.callback;if("function"===typeof a){E.callback=null,Z=E.priorityLevel;var s=a(E.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?E.callback=s:E===S(M)&&O(M),j(n)}else O(M);E=S(M)}if(null!==E)var l=!0;else{var u=S(P);null!==u&&r(_,u.startTime-n),l=!1}return l}finally{E=null,Z=o,A=!1}}var L=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||A||(R=!0,n(N))},t.unstable_getCurrentPriorityLevel=function(){return Z},t.unstable_getFirstCallbackNode=function(){return S(M)},t.unstable_next=function(e){switch(Z){case 1:case 2:case 3:var t=3;break;default:t=Z}var n=Z;Z=t;try{return e()}finally{Z=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=L,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Z;Z=e;try{return t()}finally{Z=n}},t.unstable_scheduleCallback=function(e,o,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:T++,callback:o,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,k(P,e),null===S(M)&&e===S(P)&&(D?i():D=!0,r(_,a-s))):(e.sortIndex=l,k(M,e),R||A||(R=!0,n(N))),e},t.unstable_wrapCallback=function(e){var t=Z;return function(){var n=Z;Z=t;try{return e.apply(this,arguments)}finally{Z=n}}}},2224:function(e,t,n){"use strict";e.exports=n(3095)},3170:function(e,t,n){"use strict";var r=n(8476),i=n(4680),o=n(3154),a=r("%TypeError%"),s=r("%WeakMap%",!0),l=r("%Map%",!0),u=i("WeakMap.prototype.get",!0),c=i("WeakMap.prototype.set",!0),f=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),v=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+o(e))},get:function(r){if(s&&r&&("object"===typeof r||"function"===typeof r)){if(e)return u(e,r)}else if(l){if(t)return d(t,r)}else if(n)return function(e,t){var n=v(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"===typeof r||"function"===typeof r)){if(e)return f(e,r)}else if(l){if(t)return p(t,r)}else if(n)return function(e,t){return!!v(e,t)}(n,r);return!1},set:function(r,i){s&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new s),c(e,r,i)):l?(t||(t=new l),h(t,r,i)):(n||(n={key:{},next:null}),function(e,t,n){var r=v(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,i))}};return r}},5863:function(e,t,n){"use strict";var r=n(7757);e.exports=function(e){e.prototype[Symbol.iterator]=r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}},9808:function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"===typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new s(n,null,t,e):new s(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function o(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,n,r){if(!(this instanceof s))return new s(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=s,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)n.push(o.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n<e;n++)r=r.next;var o=[];for(n=0;r&&n<t;n++)o.push(r.value),r=this.removeNode(r);null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(n=0;n<(arguments.length<=2?0:arguments.length-2);n++)r=i(this,r,n+2<2||arguments.length<=n+2?void 0:arguments[n+2]);return o},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(5863)(r)}catch(l){}},4654:function(){},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},3878:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return r}})},4942:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},7462:function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:function(){return r}})},9199:function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:function(){return r}})},5267:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:function(){return r}})},3366:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{Z:function(){return r}})},9439:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(3878);var i=n(181),o=n(5267);function a(e,t){return(0,r.Z)(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||(0,i.Z)(e,t)||(0,o.Z)()}},3433:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(907);var i=n(9199),o=n(181);function a(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||(0,i.Z)(e)||(0,o.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+".85f0e2b0.chunk.js"},n.miniCssF=function(e){},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="vmui:";n.l=function(r,i,o,a){if(e[r])e[r].push(i);else{var s,l;if(void 0!==o)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var f=u[c];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==t+o){s=f;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+o),s.src=r),e[r]=[i];var d=function(t,n){s.onerror=s.onload=null,clearTimeout(h);var i=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((function(e){return e(n)})),t)return t(n)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,o,a=r[0],s=r[1],l=r[2],u=0;if(a.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)l(n)}for(t&&t(r);u<a.length;u++)o=a[u],n.o(e,o)&&e[o]&&e[o][0](),e[a[u]]=0},r=self.webpackChunkvmui=self.webpackChunkvmui||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e=n(7313),t=n(1168),r=n(9439),i=n(4942),o=n(3366),a=n(7462),s=n(5192),l=n.n(s),u=n(3061),c=n(317),f=n(7472),d=n(2780),h=n(9081),p=n(6417);function v(e){return e.substring(2).toLowerCase()}var m=function(t){var n=t.children,r=t.disableReactTree,i=void 0!==r&&r,o=t.mouseEvent,a=void 0===o?"onClick":o,s=t.onClickAway,l=t.touchEvent,u=void 0===l?"onTouchEnd":l,c=e.useRef(!1),m=e.useRef(null),g=e.useRef(!1),y=e.useRef(!1);e.useEffect((function(){return setTimeout((function(){g.current=!0}),0),function(){g.current=!1}}),[]);var b=(0,f.Z)(n.ref,m),x=(0,d.Z)((function(e){var t=y.current;y.current=!1;var n=(0,h.Z)(m.current);!g.current||!m.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,n)||(c.current?c.current=!1:(e.composedPath?e.composedPath().indexOf(m.current)>-1:!n.documentElement.contains(e.target)||m.current.contains(e.target))||!i&&t||s(e))})),w=function(e){return function(t){y.current=!0;var r=n.props[e];r&&r(t)}},k={ref:b};return!1!==u&&(k[u]=w(u)),e.useEffect((function(){if(!1!==u){var e=v(u),t=(0,h.Z)(m.current),n=function(){c.current=!0};return t.addEventListener(e,x),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,x),t.removeEventListener("touchmove",n)}}}),[x,u]),!1!==a&&(k[a]=w(a)),e.useEffect((function(){if(!1!==a){var e=v(a),t=(0,h.Z)(m.current);return t.addEventListener(e,x),function(){t.removeEventListener(e,x)}}}),[x,a]),(0,p.jsx)(e.Fragment,{children:e.cloneElement(n,k)})},g=n(8564),y=n(6728),b=n(2248);function x(){return(0,y.Z)(b.Z)}var w=n(5469),k=n(5829),S=n(3236),O=n(1615);function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function M(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,C(e,t)}var P=!1,T=e.createContext(null),E="unmounted",Z="exited",A="entering",R="entered",D="exiting",j=function(n){function r(e,t){var r;r=n.call(this,e,t)||this;var i,o=t&&!t.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?o?(i=Z,r.appearStatus=A):i=R:i=e.unmountOnExit||e.mountOnEnter?E:Z,r.state={status:i},r.nextCallback=null,r}M(r,n),r.getDerivedStateFromProps=function(e,t){return e.in&&t.status===E?{status:Z}:null};var i=r.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==A&&n!==R&&(t=A):n!==A&&n!==R||(t=D)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===A?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===Z&&this.setState({status:E})},i.performEnter=function(e){var n=this,r=this.props.enter,i=this.context?this.context.isMounting:e,o=this.props.nodeRef?[i]:[t.findDOMNode(this),i],a=o[0],s=o[1],l=this.getTimeouts(),u=i?l.appear:l.enter;!e&&!r||P?this.safeSetState({status:R},(function(){n.props.onEntered(a)})):(this.props.onEnter(a,s),this.safeSetState({status:A},(function(){n.props.onEntering(a,s),n.onTransitionEnd(u,(function(){n.safeSetState({status:R},(function(){n.props.onEntered(a,s)}))}))})))},i.performExit=function(){var e=this,n=this.props.exit,r=this.getTimeouts(),i=this.props.nodeRef?void 0:t.findDOMNode(this);n&&!P?(this.props.onExit(i),this.safeSetState({status:D},(function(){e.props.onExiting(i),e.onTransitionEnd(r.exit,(function(){e.safeSetState({status:Z},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:Z},(function(){e.props.onExited(i)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,n){this.setNextCallback(n);var r=this.props.nodeRef?this.props.nodeRef.current:t.findDOMNode(this),i=null==e&&!this.props.addEndListener;if(r&&!i){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],a=o[0],s=o[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},i.render=function(){var t=this.state.status;if(t===E)return null;var n=this.props,r=n.children,i=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,(0,o.Z)(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e.createElement(T.Provider,{value:null},"function"===typeof r?r(t,i):e.cloneElement(e.Children.only(r),i))},r}(e.Component);function _(){}j.contextType=T,j.propTypes={},j.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:_,onEntering:_,onEntered:_,onExit:_,onExiting:_,onExited:_},j.UNMOUNTED=E,j.EXITED=Z,j.ENTERING=A,j.ENTERED=R,j.EXITING=D;var N=j,L=function(e){return e.scrollTop};function I(e,t){var n,r,i=e.timeout,o=e.easing,a=e.style,s=void 0===a?{}:a;return{duration:null!=(n=s.transitionDuration)?n:"number"===typeof i?i:i[t.mode]||0,easing:null!=(r=s.transitionTimingFunction)?r:"object"===typeof o?o[t.mode]:o,delay:s.transitionDelay}}var z=n(6983),B=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function F(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var $={entering:{opacity:1,transform:F(1)},entered:{opacity:1,transform:"none"}},W=e.forwardRef((function(t,n){var r=t.addEndListener,i=t.appear,s=void 0===i||i,l=t.children,u=t.easing,c=t.in,f=t.onEnter,d=t.onEntered,h=t.onEntering,v=t.onExit,m=t.onExited,g=t.onExiting,y=t.style,b=t.timeout,w=void 0===b?"auto":b,k=t.TransitionComponent,S=void 0===k?N:k,O=(0,o.Z)(t,B),C=e.useRef(),M=e.useRef(),P=x(),T=e.useRef(null),E=(0,z.Z)(l.ref,n),Z=(0,z.Z)(T,E),A=function(e){return function(t){if(e){var n=T.current;void 0===t?e(n):e(n,t)}}},R=A(h),D=A((function(e,t){L(e);var n,r=I({style:y,timeout:w,easing:u},{mode:"enter"}),i=r.duration,o=r.delay,a=r.easing;"auto"===w?(n=P.transitions.getAutoHeightDuration(e.clientHeight),M.current=n):n=i,e.style.transition=[P.transitions.create("opacity",{duration:n,delay:o}),P.transitions.create("transform",{duration:.666*n,delay:o,easing:a})].join(","),f&&f(e,t)})),j=A(d),_=A(g),W=A((function(e){var t,n=I({style:y,timeout:w,easing:u},{mode:"exit"}),r=n.duration,i=n.delay,o=n.easing;"auto"===w?(t=P.transitions.getAutoHeightDuration(e.clientHeight),M.current=t):t=r,e.style.transition=[P.transitions.create("opacity",{duration:t,delay:i}),P.transitions.create("transform",{duration:.666*t,delay:i||.333*t,easing:o})].join(","),e.style.opacity="0",e.style.transform=F(.75),v&&v(e)})),H=A(m);return e.useEffect((function(){return function(){clearTimeout(C.current)}}),[]),(0,p.jsx)(S,(0,a.Z)({appear:s,in:c,nodeRef:T,onEnter:D,onEntered:j,onEntering:R,onExit:W,onExited:H,onExiting:_,addEndListener:function(e){"auto"===w&&(C.current=setTimeout(e,M.current||0)),r&&r(T.current,e)},timeout:"auto"===w?null:w},O,{children:function(t,n){return e.cloneElement(l,(0,a.Z)({style:(0,a.Z)({opacity:0,transform:F(.75),visibility:"exited"!==t||c?void 0:"hidden"},$[t],y,l.props.style),ref:Z},n))}}))}));W.muiSupportAuto=!0;var H=W,V=n(7551),q=n(2131),U=n(655);function Q(e){return(0,q.Z)("MuiPaper",e)}(0,U.Z)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var X=["className","component","elevation","square","variant"],Y=function(e){return((e<1?5.11916*Math.pow(e,2):4.5*Math.log(e+1)+2)/100).toFixed(2)},G=(0,g.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({backgroundColor:t.palette.background.paper,color:t.palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat(t.palette.divider)},"elevation"===n.variant&&(0,a.Z)({boxShadow:t.shadows[n.elevation]},"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,V.Fq)("#fff",Y(n.elevation)),", ").concat((0,V.Fq)("#fff",Y(n.elevation)),")")}))})),K=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiPaper"}),r=n.className,i=n.component,s=void 0===i?"div":i,l=n.elevation,f=void 0===l?1:l,d=n.square,h=void 0!==d&&d,v=n.variant,m=void 0===v?"elevation":v,g=(0,o.Z)(n,X),y=(0,a.Z)({},n,{component:s,elevation:f,square:h,variant:m}),b=function(e){var t=e.square,n=e.elevation,r=e.variant,i=e.classes,o={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,c.Z)(o,Q,i)}(y);return(0,p.jsx)(G,(0,a.Z)({as:s,ownerState:y,className:(0,u.default)(b.root,r),ref:t},g))})),J=K;function ee(e){return(0,q.Z)("MuiSnackbarContent",e)}(0,U.Z)("MuiSnackbarContent",["root","message","action"]);var te=["action","className","message","role"],ne=(0,g.ZP)(J,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t=e.theme,n="light"===t.palette.mode?.8:.98,r=(0,V._4)(t.palette.background.default,n);return(0,a.Z)({},t.typography.body2,(0,i.Z)({color:t.palette.getContrastText(r),backgroundColor:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:t.shape.borderRadius,flexGrow:1},t.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}))})),re=(0,g.ZP)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:function(e,t){return t.message}})({padding:"8px 0"}),ie=(0,g.ZP)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:function(e,t){return t.action}})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),oe=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiSnackbarContent"}),r=n.action,i=n.className,s=n.message,l=n.role,f=void 0===l?"alert":l,d=(0,o.Z)(n,te),h=n,v=function(e){var t=e.classes;return(0,c.Z)({root:["root"],action:["action"],message:["message"]},ee,t)}(h);return(0,p.jsxs)(ne,(0,a.Z)({role:f,square:!0,elevation:6,className:(0,u.default)(v.root,i),ownerState:h,ref:t},d,{children:[(0,p.jsx)(re,{className:v.message,ownerState:h,children:s}),r?(0,p.jsx)(ie,{className:v.action,ownerState:h,children:r}):null]}))})),ae=oe;function se(e){return(0,q.Z)("MuiSnackbar",e)}(0,U.Z)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);var le=["onEnter","onExited"],ue=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],ce=(0,g.ZP)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["anchorOrigin".concat((0,O.Z)(n.anchorOrigin.vertical)).concat((0,O.Z)(n.anchorOrigin.horizontal))]]}})((function(e){var t=e.theme,n=e.ownerState,r=(0,a.Z)({},!n.isRtl&&{left:"50%",right:"auto",transform:"translateX(-50%)"},n.isRtl&&{right:"50%",left:"auto",transform:"translateX(50%)"});return(0,a.Z)({zIndex:t.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===n.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===n.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===n.anchorOrigin.horizontal&&{justifyContent:"flex-end"},(0,i.Z)({},t.breakpoints.up("sm"),(0,a.Z)({},"top"===n.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===n.anchorOrigin.horizontal&&r,"left"===n.anchorOrigin.horizontal&&(0,a.Z)({},!n.isRtl&&{left:24,right:"auto"},n.isRtl&&{right:24,left:"auto"}),"right"===n.anchorOrigin.horizontal&&(0,a.Z)({},!n.isRtl&&{right:24,left:"auto"},n.isRtl&&{left:24,right:"auto"}))))})),fe=e.forwardRef((function(t,n){var i=(0,w.Z)({props:t,name:"MuiSnackbar"}),s=i.action,l=i.anchorOrigin,f=(l=void 0===l?{vertical:"bottom",horizontal:"left"}:l).vertical,d=l.horizontal,h=i.autoHideDuration,v=void 0===h?null:h,g=i.children,y=i.className,b=i.ClickAwayListenerProps,C=i.ContentProps,M=i.disableWindowBlurListener,P=void 0!==M&&M,T=i.message,E=i.onBlur,Z=i.onClose,A=i.onFocus,R=i.onMouseEnter,D=i.onMouseLeave,j=i.open,_=i.resumeHideDuration,N=i.TransitionComponent,L=void 0===N?H:N,I=i.transitionDuration,z=void 0===I?{enter:k.x9.enteringScreen,exit:k.x9.leavingScreen}:I,B=i.TransitionProps,F=(B=void 0===B?{}:B).onEnter,$=B.onExited,W=(0,o.Z)(i.TransitionProps,le),V=(0,o.Z)(i,ue),q="rtl"===x().direction,U=(0,a.Z)({},i,{anchorOrigin:{vertical:f,horizontal:d},isRtl:q}),Q=function(e){var t=e.classes,n=e.anchorOrigin,r={root:["root","anchorOrigin".concat((0,O.Z)(n.vertical)).concat((0,O.Z)(n.horizontal))]};return(0,c.Z)(r,se,t)}(U),X=e.useRef(),Y=e.useState(!0),G=(0,r.Z)(Y,2),K=G[0],J=G[1],ee=(0,S.Z)((function(){Z&&Z.apply(void 0,arguments)})),te=(0,S.Z)((function(e){Z&&null!=e&&(clearTimeout(X.current),X.current=setTimeout((function(){ee(null,"timeout")}),e))}));e.useEffect((function(){return j&&te(v),function(){clearTimeout(X.current)}}),[j,v,te]);var ne=function(){clearTimeout(X.current)},re=e.useCallback((function(){null!=v&&te(null!=_?_:.5*v)}),[v,_,te]);return e.useEffect((function(){if(!P&&j)return window.addEventListener("focus",re),window.addEventListener("blur",ne),function(){window.removeEventListener("focus",re),window.removeEventListener("blur",ne)}}),[P,re,j]),e.useEffect((function(){if(j)return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||Z&&Z(e,"escapeKeyDown")}}),[K,j,Z]),!j&&K?null:(0,p.jsx)(m,(0,a.Z)({onClickAway:function(e){Z&&Z(e,"clickaway")}},b,{children:(0,p.jsx)(ce,(0,a.Z)({className:(0,u.default)(Q.root,y),onBlur:function(e){E&&E(e),re()},onFocus:function(e){A&&A(e),ne()},onMouseEnter:function(e){R&&R(e),ne()},onMouseLeave:function(e){D&&D(e),re()},ownerState:U,ref:n},V,{children:(0,p.jsx)(L,(0,a.Z)({appear:!0,in:j,timeout:z,direction:"top"===f?"down":"up",onEnter:function(e,t){J(!1),F&&F(e,t)},onExited:function(e){J(!0),$&&$(e)}},W,{children:g||(0,p.jsx)(ae,(0,a.Z)({message:T,action:s},C))}))}))}))})),de=fe;function he(e){return(0,q.Z)("MuiAlert",e)}var pe=(0,U.Z)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),ve=n(9127),me=n(3433);function ge(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function be(t,n){var r=Object.create(null);return t&&e.Children.map(t,(function(e){return e})).forEach((function(t){r[t.key]=function(t){return n&&(0,e.isValidElement)(t)?n(t):t}(t)})),r}function xe(e,t,n){return null!=n[t]?n[t]:e.props[t]}function we(t,n,r){var i=be(t.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(n,i);return Object.keys(o).forEach((function(a){var s=o[a];if((0,e.isValidElement)(s)){var l=a in n,u=a in i,c=n[a],f=(0,e.isValidElement)(c)&&!c.props.in;!u||l&&!f?u||!l||f?u&&l&&(0,e.isValidElement)(c)&&(o[a]=(0,e.cloneElement)(s,{onExited:r.bind(null,s),in:c.props.in,exit:xe(s,"exit",t),enter:xe(s,"enter",t)})):o[a]=(0,e.cloneElement)(s,{in:!1}):o[a]=(0,e.cloneElement)(s,{onExited:r.bind(null,s),in:!0,exit:xe(s,"exit",t),enter:xe(s,"enter",t)})}})),o}var ke=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Se=function(t){function n(e,n){var r,i=(r=t.call(this,e,n)||this).handleExited.bind(ye(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}M(n,t);var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(t,n){var r,i,o=n.children,a=n.handleExited;return{children:n.firstRender?(r=t,i=a,be(r.children,(function(t){return(0,e.cloneElement)(t,{onExited:i.bind(null,t),in:!0,appear:xe(t,"appear",r),enter:xe(t,"enter",r),exit:xe(t,"exit",r)})}))):we(t,o,a),firstRender:!1}},r.handleExited=function(e,t){var n=be(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,a.Z)({},t.children);return delete n[e.key],{children:n}})))},r.render=function(){var t=this.props,n=t.component,r=t.childFactory,i=(0,o.Z)(t,["component","childFactory"]),a=this.state.contextValue,s=ke(this.state.children).map(r);return delete i.appear,delete i.enter,delete i.exit,null===n?e.createElement(T.Provider,{value:a},s):e.createElement(T.Provider,{value:a},e.createElement(n,i,s))},n}(e.Component);Se.propTypes={},Se.defaultProps={component:"div",childFactory:function(e){return e}};var Oe=Se,Ce=n(8508),Me=n(1639),Pe=n(7861),Te=n.n(Pe),Ee=n(4911),Ze=n(4544),Ae=n(3324),Re=(0,Me.w)((function(t,n){var r=t.styles,i=(0,Ze.O)([r],void 0,(0,e.useContext)(Me.T)),o=(0,e.useRef)();return(0,e.useLayoutEffect)((function(){var e=n.key+"-global",t=new Ae.m({key:e,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),r=!1,a=document.querySelector('style[data-emotion="'+e+" "+i.name+'"]');return n.sheet.tags.length&&(t.before=n.sheet.tags[0]),null!==a&&(r=!0,a.setAttribute("data-emotion",e),t.hydrate([a])),o.current=[t,r],function(){t.flush()}}),[n]),(0,e.useLayoutEffect)((function(){var e=o.current,t=e[0];if(e[1])e[1]=!1;else{if(void 0!==i.next&&(0,Ee.M)(n,i.next,!0),t.tags.length){var r=t.tags[t.tags.length-1].nextElementSibling;t.before=r,t.flush()}n.insert("",i,t,!1)}}),[n,i.name]),null}));function De(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,Ze.O)(t)}var je=function(){var e=De.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};var _e=function(t){var n=t.className,i=t.classes,o=t.pulsate,a=void 0!==o&&o,s=t.rippleX,l=t.rippleY,c=t.rippleSize,f=t.in,d=t.onExited,h=t.timeout,v=e.useState(!1),m=(0,r.Z)(v,2),g=m[0],y=m[1],b=(0,u.default)(n,i.ripple,i.rippleVisible,a&&i.ripplePulsate),x={width:c,height:c,top:-c/2+l,left:-c/2+s},w=(0,u.default)(i.child,g&&i.childLeaving,a&&i.childPulsate);return f||g||y(!0),e.useEffect((function(){if(!f&&null!=d){var e=setTimeout(d,h);return function(){clearTimeout(e)}}}),[d,f,h]),(0,p.jsx)("span",{className:b,style:x,children:(0,p.jsx)("span",{className:w})})};var Ne,Le,Ie,ze,Be,Fe,$e,We,He=(0,U.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ve=["center","classes","className"],qe=je(Be||(Be=Ne||(Ne=ge(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),Ue=je(Fe||(Fe=Le||(Le=ge(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),Qe=je($e||($e=Ie||(Ie=ge(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),Xe=(0,g.ZP)("span",{name:"MuiTouchRipple",slot:"Root",skipSx:!0})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Ye=(0,g.ZP)(_e,{name:"MuiTouchRipple",slot:"Ripple"})(We||(We=ze||(ze=ge(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),He.rippleVisible,qe,550,(function(e){return e.theme.transitions.easing.easeInOut}),He.ripplePulsate,(function(e){return e.theme.transitions.duration.shorter}),He.child,He.childLeaving,Ue,550,(function(e){return e.theme.transitions.easing.easeInOut}),He.childPulsate,Qe,(function(e){return e.theme.transitions.easing.easeInOut})),Ge=e.forwardRef((function(t,n){var i=(0,w.Z)({props:t,name:"MuiTouchRipple"}),s=i.center,l=void 0!==s&&s,c=i.classes,f=void 0===c?{}:c,d=i.className,h=(0,o.Z)(i,Ve),v=e.useState([]),m=(0,r.Z)(v,2),g=m[0],y=m[1],b=e.useRef(0),x=e.useRef(null);e.useEffect((function(){x.current&&(x.current(),x.current=null)}),[g]);var k=e.useRef(!1),S=e.useRef(null),O=e.useRef(null),C=e.useRef(null);e.useEffect((function(){return function(){clearTimeout(S.current)}}),[]);var M=e.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,o=e.cb;y((function(e){return[].concat((0,me.Z)(e),[(0,p.jsx)(Ye,{classes:{ripple:(0,u.default)(f.ripple,He.ripple),rippleVisible:(0,u.default)(f.rippleVisible,He.rippleVisible),ripplePulsate:(0,u.default)(f.ripplePulsate,He.ripplePulsate),child:(0,u.default)(f.child,He.child),childLeaving:(0,u.default)(f.childLeaving,He.childLeaving),childPulsate:(0,u.default)(f.childPulsate,He.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},b.current)])})),b.current+=1,x.current=o}),[f]),P=e.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,o=t.center,a=void 0===o?l||t.pulsate:o,s=t.fakeElement,u=void 0!==s&&s;if("mousedown"===e.type&&k.current)k.current=!1;else{"touchstart"===e.type&&(k.current=!0);var c,f,d,h=u?null:C.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(a||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(p.width/2),f=Math.round(p.height/2);else{var v=e.touches?e.touches[0]:e,m=v.clientX,g=v.clientY;c=Math.round(m-p.left),f=Math.round(g-p.top)}if(a)(d=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(d+=1);else{var y=2*Math.max(Math.abs((h?h.clientWidth:0)-c),c)+2,b=2*Math.max(Math.abs((h?h.clientHeight:0)-f),f)+2;d=Math.sqrt(Math.pow(y,2)+Math.pow(b,2))}e.touches?null===O.current&&(O.current=function(){M({pulsate:i,rippleX:c,rippleY:f,rippleSize:d,cb:n})},S.current=setTimeout((function(){O.current&&(O.current(),O.current=null)}),80)):M({pulsate:i,rippleX:c,rippleY:f,rippleSize:d,cb:n})}}),[l,M]),T=e.useCallback((function(){P({},{pulsate:!0})}),[P]),E=e.useCallback((function(e,t){if(clearTimeout(S.current),"touchend"===e.type&&O.current)return O.current(),O.current=null,void(S.current=setTimeout((function(){E(e,t)})));O.current=null,y((function(e){return e.length>0?e.slice(1):e})),x.current=t}),[]);return e.useImperativeHandle(n,(function(){return{pulsate:T,start:P,stop:E}}),[T,P,E]),(0,p.jsx)(Xe,(0,a.Z)({className:(0,u.default)(f.root,He.root,d),ref:C},h,{children:(0,p.jsx)(Oe,{component:null,exit:!0,children:g})}))})),Ke=Ge;function Je(e){return(0,q.Z)("MuiButtonBase",e)}var et,tt=(0,U.Z)("MuiButtonBase",["root","disabled","focusVisible"]),nt=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","type"],rt=(0,g.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:function(e,t){return t.root}})((et={display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"}},(0,i.Z)(et,"&.".concat(tt.disabled),{pointerEvents:"none",cursor:"default"}),(0,i.Z)(et,"@media print",{colorAdjust:"exact"}),et)),it=e.forwardRef((function(t,n){var i=(0,w.Z)({props:t,name:"MuiButtonBase"}),s=i.action,l=i.centerRipple,f=void 0!==l&&l,d=i.children,h=i.className,v=i.component,m=void 0===v?"button":v,g=i.disabled,y=void 0!==g&&g,b=i.disableRipple,x=void 0!==b&&b,k=i.disableTouchRipple,O=void 0!==k&&k,C=i.focusRipple,M=void 0!==C&&C,P=i.LinkComponent,T=void 0===P?"a":P,E=i.onBlur,Z=i.onClick,A=i.onContextMenu,R=i.onDragLeave,D=i.onFocus,j=i.onFocusVisible,_=i.onKeyDown,N=i.onKeyUp,L=i.onMouseDown,I=i.onMouseLeave,B=i.onMouseUp,F=i.onTouchEnd,$=i.onTouchMove,W=i.onTouchStart,H=i.tabIndex,V=void 0===H?0:H,q=i.TouchRippleProps,U=i.type,Q=(0,o.Z)(i,nt),X=e.useRef(null),Y=e.useRef(null),G=(0,ve.Z)(),K=G.isFocusVisibleRef,J=G.onFocus,ee=G.onBlur,te=G.ref,ne=e.useState(!1),re=(0,r.Z)(ne,2),ie=re[0],oe=re[1];function ae(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O;return(0,S.Z)((function(r){return t&&t(r),!n&&Y.current&&Y.current[e](r),!0}))}y&&ie&&oe(!1),e.useImperativeHandle(s,(function(){return{focusVisible:function(){oe(!0),X.current.focus()}}}),[]),e.useEffect((function(){ie&&M&&!x&&Y.current.pulsate()}),[x,M,ie]);var se=ae("start",L),le=ae("stop",A),ue=ae("stop",R),ce=ae("stop",B),fe=ae("stop",(function(e){ie&&e.preventDefault(),I&&I(e)})),de=ae("start",W),he=ae("stop",F),pe=ae("stop",$),me=ae("stop",(function(e){ee(e),!1===K.current&&oe(!1),E&&E(e)}),!1),ge=(0,S.Z)((function(e){X.current||(X.current=e.currentTarget),J(e),!0===K.current&&(oe(!0),j&&j(e)),D&&D(e)})),ye=function(){var e=X.current;return m&&"button"!==m&&!("A"===e.tagName&&e.href)},be=e.useRef(!1),xe=(0,S.Z)((function(e){M&&!be.current&&ie&&Y.current&&" "===e.key&&(be.current=!0,Y.current.stop(e,(function(){Y.current.start(e)}))),e.target===e.currentTarget&&ye()&&" "===e.key&&e.preventDefault(),_&&_(e),e.target===e.currentTarget&&ye()&&"Enter"===e.key&&!y&&(e.preventDefault(),Z&&Z(e))})),we=(0,S.Z)((function(e){M&&" "===e.key&&Y.current&&ie&&!e.defaultPrevented&&(be.current=!1,Y.current.stop(e,(function(){Y.current.pulsate(e)}))),N&&N(e),Z&&e.target===e.currentTarget&&ye()&&" "===e.key&&!e.defaultPrevented&&Z(e)})),ke=m;"button"===ke&&(Q.href||Q.to)&&(ke=T);var Se={};"button"===ke?(Se.type=void 0===U?"button":U,Se.disabled=y):(Q.href||Q.to||(Se.role="button"),y&&(Se["aria-disabled"]=y));var Oe=(0,z.Z)(te,X),Ce=(0,z.Z)(n,Oe),Me=e.useState(!1),Pe=(0,r.Z)(Me,2),Te=Pe[0],Ee=Pe[1];e.useEffect((function(){Ee(!0)}),[]);var Ze=Te&&!x&&!y;var Ae=(0,a.Z)({},i,{centerRipple:f,component:m,disabled:y,disableRipple:x,disableTouchRipple:O,focusRipple:M,tabIndex:V,focusVisible:ie}),Re=function(e){var t=e.disabled,n=e.focusVisible,r=e.focusVisibleClassName,i=e.classes,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,c.Z)(o,Je,i);return n&&r&&(a.root+=" ".concat(r)),a}(Ae);return(0,p.jsxs)(rt,(0,a.Z)({as:ke,className:(0,u.default)(Re.root,h),ownerState:Ae,onBlur:me,onClick:Z,onContextMenu:le,onFocus:ge,onKeyDown:xe,onKeyUp:we,onMouseDown:se,onMouseLeave:fe,onMouseUp:ce,onDragLeave:ue,onTouchEnd:he,onTouchMove:pe,onTouchStart:de,ref:Ce,tabIndex:y?-1:V,type:U},Se,Q,{children:[d,Ze?(0,p.jsx)(Ke,(0,a.Z)({ref:Y,center:f},q)):null]}))})),ot=it;function at(e){return(0,q.Z)("MuiIconButton",e)}var st,lt=(0,U.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),ut=["edge","children","className","color","disabled","disableFocusRipple","size"],ct=(0,g.ZP)(ot,{name:"MuiIconButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,"default"!==n.color&&t["color".concat((0,O.Z)(n.color))],n.edge&&t["edge".concat((0,O.Z)(n.edge))],t["size".concat((0,O.Z)(n.size))]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:t.palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:(0,V.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,a.Z)({color:t.palette[n.color].main},!n.disableRipple&&{"&:hover":{backgroundColor:(0,V.Fq)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},(0,i.Z)({},"&.".concat(lt.disabled),{backgroundColor:"transparent",color:t.palette.action.disabled}))})),ft=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiIconButton"}),r=n.edge,i=void 0!==r&&r,s=n.children,l=n.className,f=n.color,d=void 0===f?"default":f,h=n.disabled,v=void 0!==h&&h,m=n.disableFocusRipple,g=void 0!==m&&m,y=n.size,b=void 0===y?"medium":y,x=(0,o.Z)(n,ut),k=(0,a.Z)({},n,{edge:i,color:d,disabled:v,disableFocusRipple:g,size:b}),S=function(e){var t=e.classes,n=e.disabled,r=e.color,i=e.edge,o=e.size,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,O.Z)(r)),i&&"edge".concat((0,O.Z)(i)),"size".concat((0,O.Z)(o))]};return(0,c.Z)(a,at,t)}(k);return(0,p.jsx)(ct,(0,a.Z)({className:(0,u.default)(S.root,l),centerRipple:!0,focusRipple:!g,disabled:v,ref:t,ownerState:k},x,{children:s}))})),dt=ft,ht=n(4750),pt=(0,ht.Z)((0,p.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),vt=(0,ht.Z)((0,p.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),mt=(0,ht.Z)((0,p.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),gt=(0,ht.Z)((0,p.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),yt=(0,ht.Z)((0,p.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),bt=["action","children","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"],xt=(0,g.ZP)(J,{name:"MuiAlert",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,O.Z)(n.color||n.severity))]]}})((function(e){var t=e.theme,n=e.ownerState,r="light"===t.palette.mode?V._j:V.$n,o="light"===t.palette.mode?V.$n:V._j,s=n.color||n.severity;return(0,a.Z)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},s&&"standard"===n.variant&&(0,i.Z)({color:r(t.palette[s].light,.6),backgroundColor:o(t.palette[s].light,.9)},"& .".concat(pe.icon),{color:"dark"===t.palette.mode?t.palette[s].main:t.palette[s].light}),s&&"outlined"===n.variant&&(0,i.Z)({color:r(t.palette[s].light,.6),border:"1px solid ".concat(t.palette[s].light)},"& .".concat(pe.icon),{color:"dark"===t.palette.mode?t.palette[s].main:t.palette[s].light}),s&&"filled"===n.variant&&{color:"#fff",fontWeight:t.typography.fontWeightMedium,backgroundColor:"dark"===t.palette.mode?t.palette[s].dark:t.palette[s].main})})),wt=(0,g.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:function(e,t){return t.icon}})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),kt=(0,g.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:function(e,t){return t.message}})({padding:"8px 0"}),St=(0,g.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:function(e,t){return t.action}})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Ot={success:(0,p.jsx)(pt,{fontSize:"inherit"}),warning:(0,p.jsx)(vt,{fontSize:"inherit"}),error:(0,p.jsx)(mt,{fontSize:"inherit"}),info:(0,p.jsx)(gt,{fontSize:"inherit"})},Ct=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiAlert"}),r=n.action,i=n.children,s=n.className,l=n.closeText,f=void 0===l?"Close":l,d=n.color,h=n.icon,v=n.iconMapping,m=void 0===v?Ot:v,g=n.onClose,y=n.role,b=void 0===y?"alert":y,x=n.severity,k=void 0===x?"success":x,S=n.variant,C=void 0===S?"standard":S,M=(0,o.Z)(n,bt),P=(0,a.Z)({},n,{color:d,severity:k,variant:C}),T=function(e){var t=e.variant,n=e.color,r=e.severity,i=e.classes,o={root:["root","".concat(t).concat((0,O.Z)(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,c.Z)(o,he,i)}(P);return(0,p.jsxs)(xt,(0,a.Z)({role:b,elevation:0,ownerState:P,className:(0,u.default)(T.root,s),ref:t},M,{children:[!1!==h?(0,p.jsx)(wt,{ownerState:P,className:T.icon,children:h||m[k]||Ot[k]}):null,(0,p.jsx)(kt,{ownerState:P,className:T.message,children:i}),null!=r?(0,p.jsx)(St,{className:T.action,children:r}):null,null==r&&g?(0,p.jsx)(St,{ownerState:P,className:T.action,children:(0,p.jsx)(dt,{size:"small","aria-label":f,title:f,color:"inherit",onClick:g,children:st||(st=(0,p.jsx)(yt,{fontSize:"small"}))})}):null]}))})),Mt=Ct,Pt=(0,e.createContext)({showInfoMessage:function(){}}),Tt=function(t){var n=t.children,i=(0,e.useState)({}),o=(0,r.Z)(i,2),a=o[0],s=o[1],l=(0,e.useState)(!1),u=(0,r.Z)(l,2),c=u[0],f=u[1],d=(0,e.useState)(void 0),h=(0,r.Z)(d,2),v=h[0],m=h[1];(0,e.useEffect)((function(){v&&(s({message:v,key:(new Date).getTime()}),f(!0))}),[v]);return(0,p.jsxs)(Pt.Provider,{value:{showInfoMessage:m},children:[(0,p.jsx)(de,{open:c,autoHideDuration:4e3,onClose:function(e,t){"clickaway"!==t&&(m(void 0),f(!1))},children:(0,p.jsx)(Mt,{children:a.message})},a.key),n]})},Et=n(297),Zt=n(3649),At=n(3019),Rt=n(9716),Dt=["sx"];function jt(e){var t,n=e.sx,r=function(e){var t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((function(n){Rt.G[n]?t.systemProps[n]=e[n]:t.otherProps[n]=e[n]})),t}((0,o.Z)(e,Dt)),i=r.systemProps,s=r.otherProps;return t=Array.isArray(n)?[i].concat((0,me.Z)(n)):"function"===typeof n?function(){var e=n.apply(void 0,arguments);return(0,At.P)(e)?(0,a.Z)({},i,e):i}:(0,a.Z)({},i,n),(0,a.Z)({},s,{sx:t})}var _t=["className","component"];var Nt=n(672),Lt=n(7458),It=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.defaultTheme,r=t.defaultClassName,i=void 0===r?"MuiBox-root":r,s=t.generateClassName,l=(0,Et.ZP)("div")(Zt.Z),c=e.forwardRef((function(e,t){var r=(0,y.Z)(n),c=jt(e),f=c.className,d=c.component,h=void 0===d?"div":d,v=(0,o.Z)(c,_t);return(0,p.jsx)(l,(0,a.Z)({as:h,ref:t,className:(0,u.default)(f,s?s(i):i),theme:r},v))}));return c}({defaultTheme:(0,Lt.Z)(),defaultClassName:"MuiBox-root",generateClassName:Nt.Z.generate}),zt=It,Bt=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Ft={entering:{opacity:1},entered:{opacity:1}},$t={enter:k.x9.enteringScreen,exit:k.x9.leavingScreen},Wt=e.forwardRef((function(t,n){var r=t.addEndListener,i=t.appear,s=void 0===i||i,l=t.children,u=t.easing,c=t.in,f=t.onEnter,d=t.onEntered,h=t.onEntering,v=t.onExit,m=t.onExited,g=t.onExiting,y=t.style,b=t.timeout,w=void 0===b?$t:b,k=t.TransitionComponent,S=void 0===k?N:k,O=(0,o.Z)(t,Bt),C=x(),M=e.useRef(null),P=(0,z.Z)(l.ref,n),T=(0,z.Z)(M,P),E=function(e){return function(t){if(e){var n=M.current;void 0===t?e(n):e(n,t)}}},Z=E(h),A=E((function(e,t){L(e);var n=I({style:y,timeout:w,easing:u},{mode:"enter"});e.style.webkitTransition=C.transitions.create("opacity",n),e.style.transition=C.transitions.create("opacity",n),f&&f(e,t)})),R=E(d),D=E(g),j=E((function(e){var t=I({style:y,timeout:w,easing:u},{mode:"exit"});e.style.webkitTransition=C.transitions.create("opacity",t),e.style.transition=C.transitions.create("opacity",t),v&&v(e)})),_=E(m);return(0,p.jsx)(S,(0,a.Z)({appear:s,in:c,nodeRef:M,onEnter:A,onEntered:R,onEntering:Z,onExit:j,onExited:_,onExiting:D,addEndListener:function(e){r&&r(M.current,e)},timeout:w},O,{children:function(t,n){return e.cloneElement(l,(0,a.Z)({style:(0,a.Z)({opacity:0,visibility:"exited"!==t||c?void 0:"hidden"},Ft[t],y,l.props.style),ref:T},n))}}))})),Ht=Wt;function Vt(e){return(0,q.Z)("MuiCircularProgress",e)}(0,U.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var qt,Ut,Qt,Xt,Yt,Gt,Kt,Jt,en=["className","color","disableShrink","size","style","thickness","value","variant"],tn=44,nn=je(Yt||(Yt=qt||(qt=ge(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),rn=je(Gt||(Gt=Ut||(Ut=ge(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),on=(0,g.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],t["color".concat((0,O.Z)(n.color))]]}})((function(e){var t=e.ownerState,n=e.theme;return(0,a.Z)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:n.palette[t.color].main})}),(function(e){return"indeterminate"===e.ownerState.variant&&De(Kt||(Kt=Qt||(Qt=ge(["\n animation: "," 1.4s linear infinite;\n "]))),nn)})),an=(0,g.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:function(e,t){return t.svg}})({display:"block"}),sn=(0,g.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:function(e,t){var n=e.ownerState;return[t.circle,t["circle".concat((0,O.Z)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})((function(e){var t=e.ownerState,n=e.theme;return(0,a.Z)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(function(e){var t=e.ownerState;return"indeterminate"===t.variant&&!t.disableShrink&&De(Jt||(Jt=Xt||(Xt=ge(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),rn)})),ln=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiCircularProgress"}),r=n.className,i=n.color,s=void 0===i?"primary":i,l=n.disableShrink,f=void 0!==l&&l,d=n.size,h=void 0===d?40:d,v=n.style,m=n.thickness,g=void 0===m?3.6:m,y=n.value,b=void 0===y?0:y,x=n.variant,k=void 0===x?"indeterminate":x,S=(0,o.Z)(n,en),C=(0,a.Z)({},n,{color:s,disableShrink:f,size:h,thickness:g,value:b,variant:k}),M=function(e){var t=e.classes,n=e.variant,r=e.color,i=e.disableShrink,o={root:["root",n,"color".concat((0,O.Z)(r))],svg:["svg"],circle:["circle","circle".concat((0,O.Z)(n)),i&&"circleDisableShrink"]};return(0,c.Z)(o,Vt,t)}(C),P={},T={},E={};if("determinate"===k){var Z=2*Math.PI*((tn-g)/2);P.strokeDasharray=Z.toFixed(3),E["aria-valuenow"]=Math.round(b),P.strokeDashoffset="".concat(((100-b)/100*Z).toFixed(3),"px"),T.transform="rotate(-90deg)"}return(0,p.jsx)(on,(0,a.Z)({className:(0,u.default)(M.root,r),style:(0,a.Z)({width:h,height:h},T,v),ownerState:C,ref:t,role:"progressbar"},E,S,{children:(0,p.jsx)(an,{className:M.svg,ownerState:C,viewBox:"".concat(22," ").concat(22," ").concat(tn," ").concat(tn),children:(0,p.jsx)(sn,{className:M.circle,style:P,ownerState:C,cx:tn,cy:tn,r:(tn-g)/2,fill:"none",strokeWidth:g})})}))})),un=ln;function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dn=n(658),hn=n.n(dn),pn=n(6446),vn=n.n(pn),mn=n(1635),gn=n.n(mn),yn=n(1733),bn=n.n(yn);hn().extend(vn()),hn().extend(gn());var xn,wn=window.innerWidth/2,kn=1,Sn=1578e8,On="YYYY-MM-DD[T]HH:mm:ss",Cn=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Mn=Cn.map((function(e){return e.short})),Pn=function(e){return+bn()(e).format("0.000")},Tn=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Mn.includes(n[0]))return(0,i.Z)({},n[0],t[0])},En=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Tn(t);return n?fn(fn({},e),n):fn({},e)}),{}),i=hn().duration(r).asSeconds();return{start:n-i,end:n,step:Pn(i/wn)||.001,date:Zn(t||new Date)}},Zn=function(e){return hn()(e).utc().format(On)},An=function(e){return hn()(e).format(On)},Rn=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],s=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return s.filter((function(e){return e})).join(" ")},Dn=function(e){return new Date(1e3*e)},jn=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Nn([e])},_n=function(e){var t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(r){return t}},Nn=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Ln=["BASIC_AUTH_DATA","BEARER_AUTH_DATA"],In=n(4776),zn=n.n(In),Bn=n(4007),Fn=n.n(Bn),$n={"time.duration":"range_input","time.period.date":"end_input","time.period.step":"step_input",displayType:"tab"},Wn=function(e){var t=new Map(Object.entries($n)),n=Fn()(e,"query",""),r=[];n.forEach((function(n,i){t.forEach((function(t,n){var o=Fn()(e,n,"");if(o){var a=encodeURIComponent(o);r.push("g".concat(i,".").concat(t,"=").concat(a))}})),r.push("g".concat(i,".expr=").concat(n))})),function(e){var t=window;if(t){var n="".concat(t.location.protocol,"//").concat(t.location.host).concat(t.location.pathname,"?").concat(e);t.history.pushState({path:n},"",n)}}(r.join("&"))},Hn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=zn().parse(n,{ignoreQueryPrefix:!0});return Fn()(r,e,t||"")},Vn=Hn("g0.range_input","1h"),qn=(xn=Hn("g0.end_input",new Date(hn()().utc().format(On))),hn()(xn).utcOffset(0,!0).local().format(On)),Un=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t).fill(1).map((function(e,t){return Hn("g".concat(t,".expr"),"")}))}(),Qn={serverUrl:window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus/"),displayType:Hn("tab","chart"),query:Un,queryHistory:Un.map((function(e){return{index:0,values:[e]}})),time:{duration:Vn,period:En(Vn,new Date(qn))},queryControls:{autoRefresh:!1,autocomplete:_n("AUTOCOMPLETE")||!1,nocache:_n("NO_CACHE")||!1}};function Xn(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return fn(fn({},e),{},{displayType:t.payload});case"SET_SERVER":return fn(fn({},e),{},{serverUrl:t.payload});case"SET_QUERY":return fn(fn({},e),{},{query:t.payload});case"SET_QUERY_HISTORY":return fn(fn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),fn(fn({},e),{},{queryHistory:e.queryHistory});case"SET_DURATION":return fn(fn({},e),{},{time:fn(fn({},e.time),{},{duration:t.payload,period:En(t.payload,Dn(e.time.period.end))})});case"SET_UNTIL":return fn(fn({},e),{},{time:fn(fn({},e.time),{},{period:En(e.time.duration,t.payload)})});case"SET_FROM":var n=Rn(1e3*e.time.period.end-t.payload.valueOf());return fn(fn({},e),{},{queryControls:fn(fn({},e.queryControls),{},{autoRefresh:!1}),time:fn(fn({},e.time),{},{duration:n,period:En(n,hn()(1e3*e.time.period.end).toDate())})});case"SET_PERIOD":var r=function(e){var t=e.to.valueOf()-e.from.valueOf();return Rn(t)}(t.payload);return fn(fn({},e),{},{queryControls:fn(fn({},e.queryControls),{},{autoRefresh:!1}),time:fn(fn({},e.time),{},{duration:r,period:En(r,t.payload.to)})});case"TOGGLE_AUTOREFRESH":return fn(fn({},e),{},{queryControls:fn(fn({},e.queryControls),{},{autoRefresh:!e.queryControls.autoRefresh})});case"TOGGLE_AUTOCOMPLETE":return fn(fn({},e),{},{queryControls:fn(fn({},e.queryControls),{},{autocomplete:!e.queryControls.autocomplete})});case"NO_CACHE":return fn(fn({},e),{},{queryControls:fn(fn({},e.queryControls),{},{nocache:!e.queryControls.nocache})});case"RUN_QUERY":return fn(fn({},e),{},{time:fn(fn({},e.time),{},{period:En(e.time.duration,Dn(e.time.period.end))})});case"RUN_QUERY_TO_NOW":return fn(fn({},e),{},{time:fn(fn({},e.time),{},{period:En(e.time.duration)})});default:throw new Error}}var Yn=(0,e.createContext)({}),Gn=function(){return(0,e.useContext)(Yn).state},Kn=function(){return(0,e.useContext)(Yn).dispatch},Jn=Object.entries(Qn).reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0],a=n[1];return fn(fn({},e),{},(0,i.Z)({},o,Hn(o)||a))}),{}),er=function(t){var n=t.children,i=(0,e.useReducer)(Xn,Jn),o=(0,r.Z)(i,2),a=o[0],s=o[1];(0,e.useEffect)((function(){Wn(a)}),[a]);var l=(0,e.useMemo)((function(){return{state:a,dispatch:s}}),[a,s]);return(0,p.jsx)(Yn.Provider,{value:l,children:n})};function tr(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:gr((n+r)/2)]<e?n=i:r=i;return e-t[n]<=t[r]-e?n:r}function nr(e,t,n,r){for(var i=1==r?t:n;i>=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}var rr=[0,0];function ir(e,t,n,r){return rr[0]=n<0?zr(e,-n):e,rr[1]=r<0?zr(t,-r):t,rr}function or(e,t,n,r){var i,o,a,s=Sr(e),l=10==n?Or:Cr;return e==t&&(-1==s?(e*=n,t/=n):(e/=n,t*=n)),r?(i=gr(l(e)),o=br(l(t)),e=(a=ir(kr(n,i),kr(n,o),i,o))[0],t=a[1]):(i=gr(l(mr(e))),o=gr(l(mr(t))),e=Ir(e,(a=ir(kr(n,i),kr(n,o),i,o))[0]),t=Lr(t,a[1])),[e,t]}function ar(e,t,n,r){var i=or(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var sr={mode:3,pad:.1},lr={pad:0,soft:null,mode:0},ur={min:lr,max:lr};function cr(e,t,n,r){return Qr(n)?dr(e,t,n):(lr.pad=n,lr.soft=r?0:null,lr.mode=r?3:0,dr(e,t,ur))}function fr(e,t){return null==e?t:e}function dr(e,t,n){var r=n.min,i=n.max,o=fr(r.pad,0),a=fr(i.pad,0),s=fr(r.hard,-Pr),l=fr(i.hard,Pr),u=fr(r.soft,Pr),c=fr(i.soft,-Pr),f=fr(r.mode,0),d=fr(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&u!=Pr&&(o=0),2==d&&c!=-Pr&&(a=0)));var p=h||mr(t)||1e3,v=Or(p),m=kr(10,gr(v)),g=zr(Ir(e-p*(0==h?0==e?.1:1:o),m/10),9),y=e>=u&&(1==f||3==f&&g<=u||2==f&&g>=u)?u:Pr,b=wr(s,g<y&&e>=y?y:xr(y,g)),x=zr(Lr(t+p*(0==h?0==t?.1:1:a),m/10),9),w=t<=c&&(1==d||3==d&&x>=c||2==d&&x<=c)?c:-Pr,k=xr(l,x>w&&t<=w?w:wr(w,x));return b==k&&0==b&&(k=100),[b,k]}var hr=new Intl.NumberFormat(navigator.language).format,pr=Math,vr=pr.PI,mr=pr.abs,gr=pr.floor,yr=pr.round,br=pr.ceil,xr=pr.min,wr=pr.max,kr=pr.pow,Sr=pr.sign,Or=pr.log10,Cr=pr.log2,Mr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return pr.asinh(e/t)},Pr=1/0;function Tr(e){return 1+(0|Or((e^e>>31)-(e>>31)))}function Er(e,t){return yr(e/t)*t}function Zr(e,t,n){return xr(wr(e,t),n)}function Ar(e){return"function"==typeof e?e:function(){return e}}var Rr=function(e){return e},Dr=function(e,t){return t},jr=function(e){return null},_r=function(e){return!0},Nr=function(e,t){return e==t};function Lr(e,t){return br(e/t)*t}function Ir(e,t){return gr(e/t)*t}function zr(e,t){return yr(e*(t=Math.pow(10,t)))/t}var Br=new Map;function Fr(e){return((""+e).split(".")[1]||"").length}function $r(e,t,n,r){for(var i=[],o=r.map(Fr),a=t;a<n;a++)for(var s=mr(a),l=zr(kr(e,a),s),u=0;u<r.length;u++){var c=r[u]*l,f=(c>=0&&a>=0?0:s)+(a>=o[u]?0:o[u]),d=zr(c,f);i.push(d),Br.set(d,f)}return i}var Wr={},Hr=[],Vr=[null,null],qr=Array.isArray;function Ur(e){return"string"==typeof e}function Qr(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function Xr(e){return null!=e&&"object"==typeof e}function Yr(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qr;if(qr(e)){var r=e.find((function(e){return null!=e}));if(qr(r)||n(r)){t=Array(e.length);for(var i=0;i<e.length;i++)t[i]=Yr(e[i],n)}else t=e.slice()}else if(n(e))for(var o in t={},e)t[o]=Yr(e[o],n);else t=e;return t}function Gr(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];for(var i in r)Qr(e[i])?Gr(e[i],Yr(r[i])):e[i]=Yr(r[i])}return e}function Kr(e,t,n){for(var r,i=0,o=-1;i<t.length;i++){var a=t[i];if(a>o){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r<n&&null==e[r];)e[o=r++]=null}}}var Jr,ei,ti="undefined"==typeof queueMicrotask?function(e){return Promise.resolve().then(e)}:queueMicrotask,ni="width",ri="height",ii="top",oi="bottom",ai="left",si="right",li="#000",ui="#0000",ci="mousemove",fi="mousedown",di="mouseup",hi="mouseenter",pi="mouseleave",vi="dblclick",mi="change",gi="dppxchange",yi="u-off",bi="u-label",xi=document,wi=window;function ki(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function Si(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function Oi(e,t,n){e.style[t]=n+"px"}function Ci(e,t,n,r){var i=xi.createElement(e);return null!=t&&ki(i,t),null!=n&&n.insertBefore(i,r),i}function Mi(e,t){return Ci("div",e,t)}var Pi=new WeakMap;function Ti(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=Pi.get(e)&&(e.style.transform=o,Pi.set(e,o),t<0||n<0||t>r||n>i?ki(e,yi):Si(e,yi))}var Ei=new WeakMap;function Zi(e,t,n){var r=t+n;r!=Ei.get(e)&&(Ei.set(e,r),e.style.background=t,e.style.borderColor=n)}var Ai=new WeakMap;function Ri(e,t,n,r){var i=t+""+n;i!=Ai.get(e)&&(Ai.set(e,i),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}var Di={passive:!0},ji=Gr({capture:!0},Di);function _i(e,t,n,r){t.addEventListener(e,n,r?ji:Di)}function Ni(e,t,n,r){t.removeEventListener(e,n,r?ji:Di)}!function e(){var t=devicePixelRatio;Jr!=t&&(Jr=t,ei&&Ni(mi,ei,e),ei=matchMedia("(min-resolution: ".concat(Jr-.001,"dppx) and (max-resolution: ").concat(Jr+.001,"dppx)")),_i(mi,ei,e),wi.dispatchEvent(new CustomEvent(gi)))}();var Li=["January","February","March","April","May","June","July","August","September","October","November","December"],Ii=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function zi(e){return e.slice(0,3)}var Bi=Ii.map(zi),Fi=Li.map(zi),$i={MMMM:Li,MMM:Fi,WWWW:Ii,WWW:Bi};function Wi(e){return(e<10?"0":"")+e}var Hi={YYYY:function(e){return e.getFullYear()},YY:function(e){return(e.getFullYear()+"").slice(2)},MMMM:function(e,t){return t.MMMM[e.getMonth()]},MMM:function(e,t){return t.MMM[e.getMonth()]},MM:function(e){return Wi(e.getMonth()+1)},M:function(e){return e.getMonth()+1},DD:function(e){return Wi(e.getDate())},D:function(e){return e.getDate()},WWWW:function(e,t){return t.WWWW[e.getDay()]},WWW:function(e,t){return t.WWW[e.getDay()]},HH:function(e){return Wi(e.getHours())},H:function(e){return e.getHours()},h:function(e){var t=e.getHours();return 0==t?12:t>12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Wi(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Wi(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Vi(e,t){t=t||$i;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Hi[n[1]]:n[0]);return function(e){for(var n="",i=0;i<r.length;i++)n+="string"==typeof r[i]?r[i]:r[i](e,t);return n}}var qi=(new Intl.DateTimeFormat).resolvedOptions().timeZone;var Ui=function(e){return e%1==0},Qi=[1,2,2.5,5],Xi=$r(10,-16,0,Qi),Yi=$r(10,0,16,Qi),Gi=Yi.filter(Ui),Ki=Xi.concat(Yi),Ji="{YYYY}",eo="\n"+Ji,to="{M}/{D}",no="\n"+to,ro=no+"/{YY}",io="{aa}",oo="{h}:{mm}"+io,ao="\n"+oo,so=":{ss}",lo=null;function uo(e){var t=1e3*e,n=60*t,r=60*n,i=24*r,o=30*i,a=365*i;return[(1==e?$r(10,0,3,Qi).filter(Ui):$r(10,-3,0,Qi)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,i,2*i,3*i,4*i,5*i,6*i,7*i,8*i,9*i,10*i,15*i,o,2*o,3*o,4*o,6*o,a,2*a,5*a,10*a,25*a,50*a,100*a]),[[a,Ji,lo,lo,lo,lo,lo,lo,1],[28*i,"{MMM}",eo,lo,lo,lo,lo,lo,1],[i,to,eo,lo,lo,lo,lo,lo,1],[r,"{h}"+io,ro,lo,no,lo,lo,lo,1],[n,oo,ro,lo,no,lo,lo,lo,1],[t,so,ro+" "+oo,lo,no+" "+oo,lo,ao,lo,1],[e,so+".{fff}",ro+" "+oo,lo,no+" "+oo,lo,ao,lo,1]],function(t){return function(s,l,u,c,f,d){var h=[],p=f>=a,v=f>=o&&f<a,m=t(u),g=zr(m*e,3),y=So(m.getFullYear(),p?0:m.getMonth(),v||p?1:m.getDate()),b=zr(y*e,3);if(v||p)for(var x=v?f/o:0,w=p?f/a:0,k=g==b?g:zr(So(y.getFullYear()+w,y.getMonth()+x,1)*e,3),S=new Date(yr(k/e)),O=S.getFullYear(),C=S.getMonth(),M=0;k<=c;M++){var P=So(O+w*M,C+x*M,1),T=P-t(zr(P*e,3));(k=zr((+P+T)*e,3))<=c&&h.push(k)}else{var E=f>=i?i:f,Z=b+(gr(u)-gr(g))+Lr(g-b,E);h.push(Z);for(var A=t(Z),R=A.getHours()+A.getMinutes()/n+A.getSeconds()/r,D=f/r,j=d/s.axes[l]._space;!((Z=zr(Z+f,1==e?0:3))>c);)if(D>1){var _=gr(zr(R+D,6))%24,N=t(Z).getHours()-_;N>1&&(N=-1),R=(R+D)%24,zr(((Z-=N*r)-h[h.length-1])/f,3)*j>=.7&&h.push(Z)}else h.push(Z)}return h}}]}var co=uo(1),fo=(0,r.Z)(co,3),ho=fo[0],po=fo[1],vo=fo[2],mo=uo(.001),go=(0,r.Z)(mo,3),yo=go[0],bo=go[1],xo=go[2];function wo(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function ko(e,t){return function(n,r,i,o,a){var s,l,u,c,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=s&&h[2]||i!=l&&h[3]||o!=u&&h[4]||a!=c&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return s=r,l=i,u=o,c=a,f=p,d=v,m(n)}))}}function So(e,t,n){return new Date(e,t,n)}function Oo(e,t){return t(e)}$r(2,-53,53,[1]);function Co(e,t){return function(n,r){return t(e(r))}}var Mo={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};var Po=[0,0];function To(e,t,n){return function(e){0==e.button&&n(e)}}function Eo(e,t,n){return n}var Zo={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return Po[0]=t,Po[1]=n,Po},points:{show:function(e,t){var n=e.cursor.points,r=Mi(),i=n.size(e,t);Oi(r,ni,i),Oi(r,ri,i);var o=i/-2;Oi(r,"marginLeft",o),Oi(r,"marginTop",o);var a=n.width(e,t,i);return a&&Oi(r,"borderWidth",a),r},size:function(e,t){return Qo(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:To,mouseup:To,click:To,dblclick:To,mousemove:Eo,mouseleave:Eo,mouseenter:Eo},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},Ao={show:!0,stroke:"rgba(0,0,0,0.07)",width:2,filter:Dr},Ro=Gr({},Ao,{size:10}),Do='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',jo="bold "+Do,_o={show:!0,scale:"x",stroke:li,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:jo,side:2,grid:Ao,ticks:Ro,font:Do,rotate:0},No={show:!0,scale:"x",auto:!1,sorted:1,min:Pr,max:-Pr,idxs:[]};function Lo(e,t,n,r,i){return t.map((function(e){return null==e?"":hr(e)}))}function Io(e,t,n,r,i,o,a){for(var s=[],l=Br.get(i)||0,u=n=a?n:zr(Lr(n,i),l);u<=r;u=zr(u+i,l))s.push(Object.is(u,-0)?0:u);return s}function zo(e,t,n,r,i,o,a){var s=[],l=e.scales[e.axes[t].scale].log,u=gr((10==l?Or:Cr)(n));i=kr(l,u),u<0&&(i=zr(i,-u));var c=n;do{s.push(c),(c=zr(c+i,Br.get(i)))>=i*l&&(i=c)}while(c<=r);return s}function Bo(e,t,n,r,i,o,a){var s=e.scales[e.axes[t].scale].asinh,l=r>s?zo(e,t,wr(s,n),r,i):[s],u=r>=0&&n<=0?[0]:[];return(n<-s?zo(e,t,wr(s,-r),-n,i):[s]).reverse().map((function(e){return-e})).concat(u,l)}var Fo=/./,$o=/[12357]/,Wo=/[125]/,Ho=/1/;function Vo(e,t,n,r,i){var o=e.axes[n],a=o.scale,s=e.scales[a];if(3==s.distr&&2==s.log)return t;var l=e.valToPos,u=o._space,c=l(10,a),f=l(9,a)-c>=u?Fo:l(7,a)-c>=u?$o:l(5,a)-c>=u?Wo:Ho;return t.map((function(e){return 4==s.distr&&0==e||f.test(e)?e:null}))}function qo(e,t){return null==t?"":hr(t)}var Uo={show:!0,scale:"y",stroke:li,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:jo,side:3,grid:Ao,ticks:Ro,font:Do,rotate:0};function Qo(e,t){return zr((3+2*(e||1))*t,3)}function Xo(e,t,n,r){var i=e.scales[e.series[t].scale],o=e.bands&&e.bands.some((function(e){return e.series[0]==t}));return 3==i.distr||o?i.min:0}var Yo={scale:null,auto:!0,min:Pr,max:-Pr},Go={show:!0,auto:!0,sorted:0,alpha:1,facets:[Gr({},Yo,{scale:"x"}),Gr({},Yo,{scale:"y"})]},Ko={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),s=e.valToPos(o[i[1]],r,!0),l=mr(s-a)/(e.series[t].points.space*Jr);return i[1]-i[0]<=l},filter:null},values:null,min:Pr,max:-Pr,idxs:[],path:null,clip:null};function Jo(e,t,n,r,i){return n/10}var ea={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},ta=Gr({},ea,{time:!1,ori:1}),na={};function ra(e,t){var n=na[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,s){for(var l=0;l<n.plots.length;l++)n.plots[l]!=t&&n.plots[l].pub(e,t,r,i,o,a,s)}},null!=e&&(na[e]=n)),n}function ia(e,t,n){var r=e.series[t],i=e.scales,o=e.bbox,a=2==e.mode?i[r.facets[0].scale]:i[e.series[0].scale],s=e._data[0],l=e._data[t],u=a,c=2==e.mode?i[r.facets[1].scale]:i[r.scale],f=o.left,d=o.top,h=o.width,p=o.height,v=e.valToPosH,m=e.valToPosV;return 0==u.ori?n(r,s,l,u,c,v,m,f,d,h,p,ca,da,pa,ma,ya):n(r,s,l,u,c,m,v,d,f,p,h,fa,ha,va,ga,ba)}function oa(e,t,n,r,i){return ia(e,t,(function(e,t,o,a,s,l,u,c,f,d,h){var p,v,m=e.pxRound,g=a.dir*(0==a.ori?1:-1),y=0==a.ori?da:ha;1==g?(p=n,v=r):(p=r,v=n);var b=m(l(t[p],a,d,c)),x=m(u(o[p],s,h,f)),w=m(l(t[v],a,d,c)),k=m(u(s.max,s,h,f)),S=new Path2D(i);return y(S,w,k),y(S,b,k),y(S,b,x),S}))}function aa(e,t,n,r,i,o){var a=null;if(e.length>0){a=new Path2D;for(var s=0==t?pa:va,l=n,u=0;u<e.length;u++){var c=e[u];if(c[1]>c[0]){var f=c[0]-l;f>0&&s(a,l,r,f,r+o),l=c[1]}}var d=n+i-l;d>0&&s(a,l,r,d,r+o)}return a}function sa(e,t,n){var r=e[e.length-1];r&&r[0]==t?r[1]=n:e.push([t,n])}function la(e){return 0==e?Rr:1==e?yr:function(t){return Er(t,e)}}function ua(e){var t=0==e?ca:fa,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,s){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,s):(l=xr(l,a/2,s/2),t(e,i+l,o),n(e,i+a,o,i+a,o+s,l),n(e,i+a,o+s,i,o+s,l),n(e,i,o+s,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var ca=function(e,t,n){e.moveTo(t,n)},fa=function(e,t,n){e.moveTo(n,t)},da=function(e,t,n){e.lineTo(t,n)},ha=function(e,t,n){e.lineTo(n,t)},pa=ua(0),va=ua(1),ma=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},ga=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},ya=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},ba=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function xa(e){return function(e,t,n,r,i){return ia(e,t,(function(t,o,a,s,l,u,c,f,d,h,p){var v,m,g=t.pxRound,y=t.points;0==s.ori?(v=ca,m=ma):(v=fa,m=ga);var b=zr(y.width*Jr,3),x=(y.size-y.width)/2*Jr,w=zr(2*x,3),k=new Path2D,S=new Path2D,O=e.bbox,C=O.left,M=O.top,P=O.width,T=O.height;pa(S,C-w,M-w,P+2*w,T+2*w);var E=function(e){if(null!=a[e]){var t=g(u(o[e],s,h,f)),n=g(c(a[e],l,p,d));v(k,t+x,n),m(k,t,n,x,0,2*vr)}};if(i)i.forEach(E);else for(var Z=n;Z<=r;Z++)E(Z);return{stroke:b>0?k:null,fill:k,clip:S,flags:3}}))}}function wa(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var ka=wa(da),Sa=wa(ha);function Oa(){return function(e,t,n,r){return ia(e,t,(function(i,o,a,s,l,u,c,f,d,h,p){var v,m,g=i.pxRound;0==s.ori?(v=da,m=ka):(v=ha,m=Sa);var y,b,x,w,k=s.dir*(0==s.ori?1:-1),S={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},O=S.stroke,C=Pr,M=-Pr,P=[],T=g(u(o[1==k?n:r],s,h,f)),E=!1,Z=!1,A=nr(a,n,r,1*k),R=nr(a,n,r,-1*k),D=g(u(o[A],s,h,f)),j=g(u(o[R],s,h,f));D>f&&sa(P,f,D);for(var _=1==k?n:r;_>=n&&_<=r;_+=k){var N=g(u(o[_],s,h,f));if(N==T)null!=a[_]?(b=g(c(a[_],l,p,d)),C==Pr&&(v(O,N,b),y=b),C=xr(b,C),M=wr(b,M)):null===a[_]&&(E=Z=!0);else{var L=!1;C!=Pr?(m(O,T,C,M,y,b),x=w=T):E&&(L=!0,E=!1),null!=a[_]?(v(O,N,b=g(c(a[_],l,p,d))),C=M=y=b,Z&&N-T>1&&(L=!0),Z=!1):(C=Pr,M=-Pr,null===a[_]&&(E=!0,N-T>1&&(L=!0))),L&&sa(P,x,N),T=N}}if(C!=Pr&&C!=M&&w!=T&&m(O,T,C,M,y,b),j<f+h&&sa(P,j,f+h),null!=i.fill){var I=S.fill=new Path2D(O),z=g(c(i.fillTo(e,t,i.min,i.max),l,p,d));v(I,j,z),v(I,D,z)}return S.gaps=P=i.gaps(e,t,n,r,P),i.spanGaps||(S.clip=aa(P,s.ori,f,d,h,p)),e.bands.length>0&&(S.band=oa(e,t,n,r,O)),S}))}}function Ca(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var s=new Path2D;if(n(s,e[0],t[0]),2==a)r(s,e[1],t[1]);else{for(var l=Array(a),u=Array(a-1),c=Array(a-1),f=Array(a-1),d=0;d<a-1;d++)c[d]=t[d+1]-t[d],f[d]=e[d+1]-e[d],u[d]=c[d]/f[d];l[0]=u[0];for(var h=1;h<a-1;h++)0===u[h]||0===u[h-1]||u[h-1]>0!==u[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/u[h-1]+(f[h]+2*f[h-1])/u[h]),isFinite(l[h])||(l[h]=0));l[a-1]=u[a-2];for(var p=0;p<a-1;p++)i(s,e[p]+f[p]/3,t[p]+l[p]*f[p]/3,e[p+1]-f[p]/3,t[p+1]-l[p+1]*f[p]/3,e[p+1],t[p+1])}return s}var Ma=new Set;function Pa(){Ma.forEach((function(e){e.syncRect(!0)}))}_i("resize",wi,Pa),_i("scroll",wi,Pa,!0);var Ta=Oa(),Ea=xa();function Za(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((function(e,r){return Aa(e,r,t,n)}))}function Aa(e,t,n,r){return Gr({},0==t?n:r,e)}function Ra(e,t,n){return null==t?Vr:[t,n]}var Da=Ra;function ja(e,t,n){return null==t?Vr:cr(t,n,.1,!0)}function _a(e,t,n,r){return null==t?Vr:or(t,n,e.scales[r].log,!1)}var Na=_a;function La(e,t,n,r){return null==t?Vr:ar(t,n,e.scales[r].log,!1)}var Ia=La;function za(e,t,n,r,i){var o=wr(Tr(e),Tr(t)),a=t-e,s=tr(i/r*a,n);do{var l=n[s],u=r*l/a;if(u>=i&&o+(l<5?Br.get(l):0)<=17)return[l,u]}while(++s<n.length);return[0,0]}function Ba(e){var t,n;return[e=e.replace(/(\d+)px/,(function(e,r){return(t=yr((n=+r)*Jr))+"px"})),t,n]}function Fa(e){e.show&&[e.font,e.labelFont].forEach((function(e){var t=zr(e[2]*Jr,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function $a(e,t,n){var i={mode:fr(e.mode,1)},o=i.mode;function a(e,t){return((3==t.distr?Or(e>0?e:t.clamp(i,e,t.min,t.max,t.key)):4==t.distr?Mr(e,t.asinh):e)-t._min)/(t._max-t._min)}function s(e,t,n,r){var i=a(e,t);return r+n*(-1==t.dir?1-i:i)}function l(e,t,n,r){var i=a(e,t);return r+n*(-1==t.dir?i:1-i)}function u(e,t,n,r){return 0==t.ori?s(e,t,n,r):l(e,t,n,r)}i.valToPosH=s,i.valToPosV=l;var c=!1;i.status=0;var f=i.root=Mi("uplot");(null!=e.id&&(f.id=e.id),ki(f,e.class),e.title)&&(Mi("u-title",f).textContent=e.title);var d=Ci("canvas"),h=i.ctx=d.getContext("2d"),p=Mi("u-wrap",f),v=i.under=Mi("u-under",p);p.appendChild(d);var m=i.over=Mi("u-over",p),g=+fr((e=Yr(e)).pxAlign,1),y=la(g);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(i,e)||e)}));var b,x,w=e.ms||.001,k=i.series=1==o?Za(e.series||[],No,Ko,!1):(b=e.series||[null],x=Go,b.map((function(e,t){return 0==t?null:Gr({},x,e)}))),S=i.axes=Za(e.axes||[],_o,Uo,!0),O=i.scales={},C=i.bands=e.bands||[];C.forEach((function(e){e.fill=Ar(e.fill||null)}));var M=2==o?k[1].facets[0].scale:k[0].scale,P={axes:function(){for(var e=function(e){var t=S[e];if(!t.show||!t._show)return"continue";var n=t.side,o=n%2,a=void 0,s=void 0,l=t.stroke(i,e),c=0==n||3==n?-1:1;if(t.label){var f=t.labelGap*c,d=yr((t._lpos+f)*Jr);et(t.labelFont[0],l,"center",2==n?ii:oi),h.save(),1==o?(a=s=0,h.translate(d,yr(ve+ge/2)),h.rotate((3==n?-vr:vr)/2)):(a=yr(pe+me/2),s=d),h.fillText(t.label,a,s),h.restore()}var p=(0,r.Z)(t._found,2),v=p[0],m=p[1];if(0==m)return"continue";var g=O[t.scale],b=0==o?me:ge,x=0==o?pe:ve,w=yr(t.gap*Jr),k=t._splits,C=2==g.distr?k.map((function(e){return Xe[e]})):k,M=2==g.distr?Xe[k[1]]-Xe[k[0]]:v,P=t.ticks,T=P.show?yr(P.size*Jr):0,E=t._rotate*-vr/180,Z=y(t._pos*Jr),A=Z+(T+w)*c;s=0==o?A:0,a=1==o?A:0,et(t.font[0],l,1==t.align?ai:2==t.align?si:E>0?ai:E<0?si:0==o?"center":3==n?si:ai,E||1==o?"middle":2==n?ii:oi);for(var R=1.5*t.font[1],D=k.map((function(e){return y(u(e,g,b,x))})),j=t._values,_=0;_<j.length;_++){var N=j[_];if(null!=N){0==o?a=D[_]:s=D[_];for(var L=-1==(N=""+N).indexOf("\n")?[N]:N.split(/\n/gm),I=0;I<L.length;I++){var z=L[I];E?(h.save(),h.translate(a,s+I*R),h.rotate(E),h.fillText(z,0,0),h.restore()):h.fillText(z,a,s+I*R)}}}P.show&&st(D,P.filter(i,C,e,m,M),o,n,Z,T,zr(P.width*Jr,3),P.stroke(i,e),P.dash,P.cap);var B=t.grid;B.show&&st(D,B.filter(i,C,e,m,M),o,0==o?2:1,0==o?ve:pe,0==o?ge:me,zr(B.width*Jr,3),B.stroke(i,e),B.dash,B.cap)},t=0;t<S.length;t++)e(t);sn("drawAxes")},series:function(){De>0&&(k.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var r=function(e){var t=Zr(qe-1,0,De-1),n=Zr(Ue+1,0,De-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n<De-1;)n++;return[t,n]}(t[n]);e._paths=e.paths(i,n,r[0],r[1])}})),k.forEach((function(e,t){if(t>0&&e.show){We!=e.alpha&&(h.globalAlpha=We=e.alpha),nt(t,!1),e._paths&&rt(t,!1),nt(t,!0);var n=e.points.show(i,t,qe,Ue),r=e.points.filter(i,t,n,e._paths?e._paths.gaps:null);(n||r)&&(e.points._paths=e.points.paths(i,t,qe,Ue,r),rt(t,!0)),1!=We&&(h.globalAlpha=We=1),sn("drawSeries",t)}})))}},T=(e.drawOrder||["axes","series"]).map((function(e){return P[e]}));function E(t){var n=O[t];if(null==n){var r=(e.scales||Wr)[t]||Wr;if(null!=r.from)E(r.from),O[t]=Gr({},O[r.from],r,{key:t});else{n=O[t]=Gr({},t==M?ea:ta,r),2==o&&(n.time=!1),n.key=t;var i=n.time,a=n.range,s=qr(a);if((t!=M||2==o)&&(!s||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?sr:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?sr:{mode:1,hard:a[1],soft:a[1]}},s=!1),!s&&Qr(a))){var l=a;a=function(e,t,n){return null==t?Vr:cr(t,n,l)}}n.range=Ar(a||(i?Da:t==M?3==n.distr?Na:4==n.distr?Ia:Ra:3==n.distr?_a:4==n.distr?La:ja)),n.auto=Ar(!s&&n.auto),n.clamp=Ar(n.clamp||Jo),n._min=n._max=null}}}for(var Z in E("x"),E("y"),1==o&&k.forEach((function(e){E(e.scale)})),S.forEach((function(e){E(e.scale)})),e.scales)E(Z);var A,R,D=O[M],j=D.distr;0==D.ori?(ki(f,"u-hz"),A=s,R=l):(ki(f,"u-vt"),A=l,R=s);var _={};for(var N in O){var L=O[N];null==L.min&&null==L.max||(_[N]={min:L.min,max:L.max},L.min=L.max=null)}var I,z=e.tzDate||function(e){return new Date(yr(e/w))},B=e.fmtDate||Vi,F=1==w?vo(z):xo(z),$=ko(z,wo(1==w?po:bo,B)),W=Co(z,Oo("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",B)),H=[],V=i.legend=Gr({},Mo,e.legend),q=V.show,U=V.markers;V.idxs=H,U.width=Ar(U.width),U.dash=Ar(U.dash),U.stroke=Ar(U.stroke),U.fill=Ar(U.fill);var Q,X=[],Y=[],G=!1,K={};if(V.live){var J=k[1]?k[1].values:null;for(var ee in Q=(G=null!=J)?J(i,1,0):{_:0})K[ee]="--"}if(q)if(I=Ci("table","u-legend",f),G){var te=Ci("tr","u-thead",I);for(var ne in Ci("th",null,te),Q)Ci("th",bi,te).textContent=ne}else ki(I,"u-inline"),V.live&&ki(I,"u-live");var re={show:!0},ie={show:!1};var oe=new Map;function ae(e,t,n){var r=oe.get(t)||{},o=Ce.bind[e](i,t,n);o&&(_i(e,t,r[e]=o),oe.set(t,r))}function se(e,t,n){var r=oe.get(t)||{};for(var i in r)null!=e&&i!=e||(Ni(i,t,r[i]),delete r[i]);null==e&&oe.delete(t)}var le=0,ue=0,ce=0,fe=0,de=0,he=0,pe=0,ve=0,me=0,ge=0;i.bbox={};var ye=!1,be=!1,xe=!1,we=!1,ke=!1;function Se(e,t,n){(n||e!=i.width||t!=i.height)&&Oe(e,t),ct(!1),xe=!0,be=!0,we=ke=Ce.left>=0,Ot()}function Oe(e,t){i.width=le=ce=e,i.height=ue=fe=t,de=he=0,function(){var e=!1,t=!1,n=!1,r=!1;S.forEach((function(i,o){if(i.show&&i._show){var a=i.side,s=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(s?(ce-=l,3==a?(de+=l,r=!0):n=!0):(fe-=l,0==a?(he+=l,e=!0):t=!0))}})),Ae[0]=e,Ae[1]=n,Ae[2]=t,Ae[3]=r,ce-=Ve[1]+Ve[3],de+=Ve[3],fe-=Ve[2]+Ve[0],he+=Ve[0]}(),function(){var e=de+ce,t=he+fe,n=de,r=he;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}S.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=i.bbox;pe=n.left=Er(de*Jr,.5),ve=n.top=Er(he*Jr,.5),me=n.width=Er(ce*Jr,.5),ge=n.height=Er(fe*Jr,.5)}i.setSize=function(e){Se(e.width,e.height)};var Ce=i.cursor=Gr({},Zo,{drag:{y:2==o}},e.cursor);Ce.idxs=H,Ce._lock=!1;var Me=Ce.points;Me.show=Ar(Me.show),Me.size=Ar(Me.size),Me.stroke=Ar(Me.stroke),Me.width=Ar(Me.width),Me.fill=Ar(Me.fill);var Pe=i.focus=Gr({},e.focus||{alpha:.3},Ce.focus),Te=Pe.prox>=0,Ee=[null];function Ze(e,t){if(1==o||t>0){var n=1==o&&O[e.scale].time,r=e.value;e.value=n?Ur(r)?Co(z,Oo(r,B)):r||W:r||qo,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Ta||jr,e.fillTo=Ar(e.fillTo||Xo),e.pxAlign=+fr(e.pxAlign,g),e.pxRound=la(e.pxAlign),e.stroke=Ar(e.stroke||null),e.fill=Ar(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=Qo(e.width,1),s=e.points=Gr({},{size:a,width:wr(1,.2*a),stroke:e.stroke,space:2*a,paths:Ea,_stroke:null,_fill:null},e.points);s.show=Ar(s.show),s.filter=Ar(s.filter),s.fill=Ar(s.fill),s.stroke=Ar(s.stroke),s.paths=Ar(s.paths),s.pxAlign=e.pxAlign}if(q){var l=function(e,t){if(0==t&&(G||!V.live||2==o))return Vr;var n=[],r=Ci("tr","u-series",I,I.childNodes[t]);ki(r,e.class),e.show||ki(r,yi);var a=Ci("th",null,r);if(U.show){var s=Mi("u-marker",a);if(t>0){var l=U.width(i,t);l&&(s.style.border=l+"px "+U.dash(i,t)+" "+U.stroke(i,t)),s.style.background=U.fill(i,t)}}var u=Mi(bi,a);for(var c in u.textContent=e.label,t>0&&(U.show||(u.style.color=e.width>0?U.stroke(i,t):U.fill(i,t)),ae("click",a,(function(t){if(!Ce._lock){var n=k.indexOf(e);if((t.ctrlKey||t.metaKey)!=V.isolate){var r=k.some((function(e,t){return t>0&&t!=n&&e.show}));k.forEach((function(e,t){t>0&&It(t,r?t==n?re:ie:re,!0,ln.setSeries)}))}else It(n,{show:!e.show},!0,ln.setSeries)}})),Te&&ae(hi,a,(function(t){Ce._lock||It(k.indexOf(e),zt,!0,ln.setSeries)}))),Q){var f=Ci("td","u-value",r);f.textContent="--",n.push(f)}return[r,n]}(e,t);X.splice(t,0,l[0]),Y.splice(t,0,l[1]),V.values.push(null)}if(Ce.show){H.splice(t,0,null);var u=function(e,t){if(t>0){var n=Ce.points.show(i,t);if(n)return ki(n,"u-cursor-pt"),ki(n,e.class),Ti(n,-10,-10,ce,fe),m.insertBefore(n,Ee[t]),n}}(e,t);u&&Ee.splice(t,0,u)}}i.addSeries=function(e,t){e=Aa(e,t=null==t?k.length:t,No,Ko),k.splice(t,0,e),Ze(k[t],t)},i.delSeries=function(e){if(k.splice(e,1),q){V.values.splice(e,1),Y.splice(e,1);var t=X.splice(e,1)[0];se(null,t.firstChild),t.remove()}Ce.show&&(H.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove())};var Ae=[!1,!1,!1,!1];function Re(e,t,n,i){var o=(0,r.Z)(n,4),a=o[0],s=o[1],l=o[2],u=o[3],c=t%2,f=0;return 0==c&&(u||s)&&(f=0==t&&!a||2==t&&!l?yr(_o.size/3):0),1==c&&(a||l)&&(f=1==t&&!s||3==t&&!u?yr(Uo.size/2):0),f}var De,je,_e,Ne,Le,Ie,ze,Be,Fe,$e,We,He=i.padding=(e.padding||[Re,Re,Re,Re]).map((function(e){return Ar(fr(e,Re))})),Ve=i._padding=He.map((function(e,t){return e(i,t,Ae,0)})),qe=null,Ue=null,Qe=1==o?k[0].idxs:null,Xe=null,Ye=!1;function Ge(e,n){if(2==o){De=0;for(var r=1;r<k.length;r++)De+=t[r][0].length;i.data=t=e}else(t=(e||[]).slice())[0]=t[0]||[],i.data=t.slice(),Xe=t[0],De=Xe.length,2==j&&(t[0]=Xe.map((function(e,t){return t})));if(i._data=t,ct(!0),sn("setData"),!1!==n){var a=D;a.auto(i,Ye)?Ke():Lt(M,a.min,a.max),we=Ce.left>=0,ke=!0,Ot()}}function Ke(){var e,n;if(Ye=!0,1==o)if(De>0){if(qe=Qe[0]=0,Ue=Qe[1]=De-1,e=t[0][qe],n=t[0][Ue],2==j)e=qe,n=Ue;else if(1==De)if(3==j){var i=or(e,e,D.log,!1),a=(0,r.Z)(i,2);e=a[0],n=a[1]}else if(4==j){var s=ar(e,e,D.log,!1),l=(0,r.Z)(s,2);e=l[0],n=l[1]}else if(D.time)n=e+yr(86400/w);else{var u=cr(e,n,.1,!0),c=(0,r.Z)(u,2);e=c[0],n=c[1]}}else qe=Qe[0]=e=null,Ue=Qe[1]=n=null;Lt(M,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ui,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Hr,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ui,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=je&&(h.strokeStyle=je=e),i!=_e&&(h.fillStyle=_e=i),t!=Ne&&(h.lineWidth=Ne=t),o!=Ie&&(h.lineJoin=Ie=o),r!=ze&&(h.lineCap=ze=r),n!=Le&&h.setLineDash(Le=n)}function et(e,t,n,r){t!=_e&&(h.fillStyle=_e=t),e!=Be&&(h.font=Be=e),n!=Fe&&(h.textAlign=Fe=n),r!=$e&&(h.textBaseline=$e=r)}function tt(e,t,n,r){if(e.auto(i,Ye)&&(null==t||null==t.min)){var o=fr(qe,0),a=fr(Ue,r.length-1),s=null==n.min?3==e.distr?function(e,t,n){for(var r=Pr,i=-Pr,o=t;o<=n;o++)e[o]>0&&(r=xr(r,e[o]),i=wr(i,e[o]));return[r==Pr?1:r,i==-Pr?10:i]}(r,o,a):function(e,t,n,r){var i=Pr,o=-Pr;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=xr(i,e[a]),o=wr(o,e[a]));return[i,o]}(r,o,a):[n.min,n.max];e.min=xr(e.min,n.min=s[0]),e.max=wr(e.max,n.max=s[1])}}function nt(e,t){var n=t?k[e].points:k[e];n._stroke=n.stroke(i,e),n._fill=n.fill(i,e)}function rt(e,n){var r=n?k[e].points:k[e],o=r._stroke,a=r._fill,s=r._paths,l=s.stroke,u=s.fill,c=s.clip,f=s.flags,d=null,p=zr(r.width*Jr,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==r.pxAlign;if(m&&h.translate(v,v),!n){var g=pe,y=ve,b=me,x=ge,w=p*Jr/2;0==r.min&&(x+=w),0==r.max&&(y-=w,x+=w),(d=new Path2D).rect(g,y,b,x)}n?it(o,p,r.dash,r.cap,a,l,u,f,c):function(e,n,r,o,a,s,l,u,c,f,d){var h=!1;C.forEach((function(p,v){if(p.series[0]==e){var m,g=k[p.series[1]],y=t[p.series[1]],b=(g._paths||Wr).band,x=null;g.show&&b&&function(e,t,n){for(t=fr(t,0),n=fr(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(y,qe,Ue)?(x=p.fill(i,v)||s,m=g._paths.clip):b=null,it(n,r,o,a,x,l,u,c,f,d,m,b),h=!0}})),h||it(n,r,o,a,s,l,u,c,f,d)}(e,o,p,r.dash,r.cap,a,l,u,f,d,c),m&&h.translate(-v,-v)}i.setData=Ge;function it(e,t,n,r,i,o,a,s,l,u,c,f){Je(e,t,n,r,i),(l||u||f)&&(h.save(),l&&h.clip(l),u&&h.clip(u)),f?3==(3&s)?(h.clip(f),c&&h.clip(c),at(i,a),ot(e,o,t)):2&s?(at(i,a),h.clip(f),ot(e,o,t)):1&s&&(h.save(),h.clip(f),c&&h.clip(c),at(i,a),h.restore(),ot(e,o,t)):(at(i,a),ot(e,o,t)),(l||u||f)&&h.restore()}function ot(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){h.strokeStyle=je=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function at(e,t){t instanceof Map?t.forEach((function(e,t){h.fillStyle=_e=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function st(e,t,n,r,i,o,a,s,l,u){var c=a%2/2;1==g&&h.translate(c,c),Je(s,a,l,u,s),h.beginPath();var f,d,p,v,m=i+(0==r||3==r?-o:o);0==n?(d=i,v=m):(f=i,p=m);for(var y=0;y<e.length;y++)null!=t[y]&&(0==n?f=p=e[y]:d=v=e[y],h.moveTo(f,d),h.lineTo(p,v));h.stroke(),1==g&&h.translate(-c,-c)}function lt(e){var t=!0;return S.forEach((function(n,o){if(n.show){var a=O[n.scale];if(null!=a.min){n._show||(t=!1,n._show=!0,ct(!1));var s=n.side,l=s%2,u=a.min,c=a.max,f=function(e,t,n,r){var o,a=S[e];if(r<=0)o=[0,0];else{var s=a._space=a.space(i,e,t,n,r);o=za(t,n,a._incrs=a.incrs(i,e,t,n,r,s),r,s)}return a._found=o}(o,u,c,0==l?ce:fe),d=(0,r.Z)(f,2),h=d[0],p=d[1];if(0!=p){var v=2==a.distr,m=n._splits=n.splits(i,o,u,c,h,p,v),g=2==a.distr?m.map((function(e){return Xe[e]})):m,y=2==a.distr?Xe[m[1]]-Xe[m[0]]:h,b=n._values=n.values(i,n.filter(i,g,o,p,y),o,p,y);n._rotate=2==s?n.rotate(i,b,o,p):0;var x=n._size;n._size=br(n.size(i,b,o,e)),null!=x&&n._size!=x&&(t=!1)}}else n._show&&(t=!1,n._show=!1,ct(!1))}})),t}function ut(e){var t=!0;return He.forEach((function(n,r){var o=n(i,r,Ae,e);o!=Ve[r]&&(t=!1),Ve[r]=o})),t}function ct(e){k.forEach((function(t,n){n>0&&(t._paths=null,e&&(1==o?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var ft,dt,ht,pt,vt,mt,gt,yt,bt,xt,wt,kt,St=!1;function Ot(){St||(ti(Ct),St=!0)}function Ct(){ye&&(!function(){var e=Yr(O,Xr);for(var n in e){var a=e[n],s=_[n];if(null!=s&&null!=s.min)Gr(a,s),n==M&&ct(!0);else if(n!=M||2==o)if(0==De&&null==a.from){var l=a.range(i,null,null,n);a.min=l[0],a.max=l[1]}else a.min=Pr,a.max=-Pr}if(De>0)for(var u in k.forEach((function(n,a){if(1==o){var s=n.scale,l=e[s],u=_[s];if(0==a){var c=l.range(i,l.min,l.max,s);l.min=c[0],l.max=c[1],qe=tr(l.min,t[0]),Ue=tr(l.max,t[0]),t[0][qe]<l.min&&qe++,t[0][Ue]>l.max&&Ue--,n.min=Xe[qe],n.max=Xe[Ue]}else n.show&&n.auto&&tt(l,u,n,t[a]);n.idxs[0]=qe,n.idxs[1]=Ue}else if(a>0&&n.show&&n.auto){var f=(0,r.Z)(n.facets,2),d=f[0],h=f[1],p=d.scale,v=h.scale,m=(0,r.Z)(t[a],2),g=m[0],y=m[1];tt(e[p],_[p],d,g),tt(e[v],_[v],h,y),n.min=h.min,n.max=h.max}})),e){var c=e[u],f=_[u];if(null==c.from&&(null==f||null==f.min)){var d=c.range(i,c.min==Pr?null:c.min,c.max==-Pr?null:c.max,u);c.min=d[0],c.max=d[1]}}for(var h in e){var p=e[h];if(null!=p.from){var v=e[p.from];if(null==v.min)p.min=p.max=null;else{var m=p.range(i,v.min,v.max,h);p.min=m[0],p.max=m[1]}}}var g={},y=!1;for(var b in e){var x=e[b],w=O[b];if(w.min!=x.min||w.max!=x.max){w.min=x.min,w.max=x.max;var S=w.distr;w._min=3==S?Or(w.min):4==S?Mr(w.min,w.asinh):w.min,w._max=3==S?Or(w.max):4==S?Mr(w.max,w.asinh):w.max,g[b]=y=!0}}if(y){for(var C in k.forEach((function(e,t){2==o?t>0&&g.y&&(e._paths=null):g[e.scale]&&(e._paths=null)})),g)xe=!0,sn("setScale",C);Ce.show&&(we=ke=Ce.left>=0)}for(var P in _)_[P]=null}(),ye=!1),xe&&(!function(){for(var e=!1,t=0;!e;){var n=lt(++t),r=ut(t);(e=3==t||n&&r)||(Oe(i.width,i.height),be=!0)}}(),xe=!1),be&&(Oi(v,ai,de),Oi(v,ii,he),Oi(v,ni,ce),Oi(v,ri,fe),Oi(m,ai,de),Oi(m,ii,he),Oi(m,ni,ce),Oi(m,ri,fe),Oi(p,ni,le),Oi(p,ri,ue),d.width=yr(le*Jr),d.height=yr(ue*Jr),S.forEach((function(e){var t=e._show,n=e._el,r=e._size,i=e._pos,o=e.side;if(t){var a=o%2==1;Oi(n,a?"left":"top",i-(3===o||0===o?r:0)),Oi(n,a?"width":"height",r),Oi(n,a?"top":"left",a?he:de),Oi(n,a?"height":"width",a?fe:ce),n&&Si(n,yi)}else n&&ki(n,yi)})),je=_e=Ne=Ie=ze=Be=Fe=$e=Le=null,We=1,Yt(!1),sn("setSize"),be=!1),le>0&&ue>0&&(h.clearRect(0,0,d.width,d.height),sn("drawClear"),T.forEach((function(e){return e()})),sn("draw")),Ce.show&&we&&(Qt(null,!0,!1),we=!1),c||(c=!0,i.status=1,sn("ready")),Ye=!1,St=!1}function Mt(e,n){var r=O[e];if(null==r.from){if(0==De){var o=r.range(i,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(De>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==M&&2==r.distr&&De>0&&(n.min=tr(n.min,t[0]),n.max=tr(n.max,t[0]),n.min==n.max&&n.max++),_[e]=n,ye=!0,Ot()}}i.redraw=function(e,t){xe=t||!1,!1!==e?Lt(M,D.min,D.max):Ot()},i.setScale=Mt;var Pt=!1,Tt=Ce.drag,Et=Tt.x,Zt=Tt.y;Ce.show&&(Ce.x&&(ft=Mi("u-cursor-x",m)),Ce.y&&(dt=Mi("u-cursor-y",m)),0==D.ori?(ht=ft,pt=dt):(ht=dt,pt=ft),wt=Ce.left,kt=Ce.top);var At,Rt,Dt,jt=i.select=Gr({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),_t=jt.show?Mi("u-select",jt.over?m:v):null;function Nt(e,t){if(jt.show){for(var n in e)Oi(_t,n,jt[n]=e[n]);!1!==t&&sn("setSelect")}}function Lt(e,t,n){Mt(e,{min:t,max:n})}function It(e,t,n,r){var a=k[e];null!=t.focus&&function(e){if(e!=Dt){var t=null==e,n=1!=Pe.alpha;k.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){k[e].alpha=t,Ce.show&&Ee[e]&&(Ee[e].style.opacity=t);q&&X[e]&&(X[e].style.opacity=t)}(i,o?1:Pe.alpha)})),Dt=e,n&&Ot()}}(e),null!=t.show&&(a.show=t.show,function(e,t){var n=k[e],r=q?X[e]:null;n.show?r&&Si(r,yi):(r&&ki(r,yi),Ee.length>1&&Ti(Ee[e],-10,-10,ce,fe))}(e,t.show),Lt(2==o?a.facets[1].scale:a.scale,null,null),Ot()),!1!==n&&sn("setSeries",e,t),r&&fn("setSeries",i,e,t)}i.setSelect=Nt,i.setSeries=It,i.addBand=function(e,t){e.fill=Ar(e.fill||null),t=null==t?C.length:t,C.splice(t,0,e)},i.setBand=function(e,t){Gr(C[e],t)},i.delBand=function(e){null==e?C.length=0:C.splice(e,1)};var zt={focus:!0},Bt={focus:!1};function Ft(e,t,n){var r=O[t];n&&(e=e/Jr-(1==r.ori?he:de));var i=ce;1==r.ori&&(e=(i=fe)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),s=r.distr;return 3==s?kr(10,a):4==s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return pr.sinh(e)*t}(a,r.asinh):a}function $t(e,t){Oi(_t,ai,jt.left=e),Oi(_t,ni,jt.width=t)}function Wt(e,t){Oi(_t,ii,jt.top=e),Oi(_t,ri,jt.height=t)}q&&Te&&_i(pi,I,(function(e){Ce._lock||(It(null,Bt,!0,ln.setSeries),Qt(null,!0,!1))})),i.valToIdx=function(e){return tr(e,t[0])},i.posToIdx=function(e,n){return tr(Ft(e,M,n),t[0],qe,Ue)},i.posToVal=Ft,i.valToPos=function(e,t,n){return 0==O[t].ori?s(e,O[t],n?me:ce,n?pe:0):l(e,O[t],n?ge:fe,n?ve:0)},i.batch=function(e){e(i),Ot()},i.setCursor=function(e,t,n){wt=e.left,kt=e.top,Qt(null,t,n)};var Ht=0==D.ori?$t:Wt,Vt=1==D.ori?$t:Wt;function qt(e,t){if(null!=e){var n=e.idx;V.idx=n,k.forEach((function(e,t){(t>0||!G)&&Ut(t,n)}))}q&&V.live&&function(){if(q&&V.live)for(var e=2==o?1:0;e<k.length;e++)if(0!=e||!G){var t=V.values[e],n=0;for(var r in t)Y[e][n++].firstChild.nodeValue=t[r]}}(),ke=!1,!1!==t&&sn("setLegend")}function Ut(e,n){var r;if(null==n)r=K;else{var o=k[e],a=0==e&&2==j?Xe:t[e];r=G?o.values(i,e,n):{_:o.value(i,a[n],e,n)}}V.values[e]=r}function Qt(e,n,a){bt=wt,xt=kt;var s,l=Ce.move(i,wt,kt),u=(0,r.Z)(l,2);wt=u[0],kt=u[1],Ce.show&&(ht&&Ti(ht,yr(wt),0,ce,fe),pt&&Ti(pt,0,yr(kt),ce,fe));var f=qe>Ue;At=Pr;var d=0==D.ori?ce:fe,h=1==D.ori?ce:fe;if(wt<0||0==De||f){s=null;for(var p=0;p<k.length;p++)p>0&&Ee.length>1&&Ti(Ee[p],-10,-10,ce,fe);if(Te&&It(null,zt,!0,null==e&&ln.setSeries),V.live){H.fill(null),ke=!0;for(var v=0;v<k.length;v++)V.values[v]=K}}else{var m,g;1==o&&(s=tr(m=Ft(0==D.ori?wt:kt,M),t[0],qe,Ue),g=Lr(A(t[0][s],D,d,0),.5));for(var y=2==o?1:0;y<k.length;y++){var b=k[y],x=H[y],w=1==o?t[y][x]:t[y][1][x],S=Ce.dataIdx(i,y,s,m),C=1==o?t[y][S]:t[y][1][S];ke=ke||C!=w||S!=x,H[y]=S;var P=S==s?g:Lr(A(1==o?t[0][S]:t[y][0][S],D,d,0),.5);if(y>0&&b.show){var T=null==C?-10:Lr(R(C,1==o?O[b.scale]:O[b.facets[1].scale],h,0),.5);if(T>0&&1==o){var E=mr(T-kt);E<=At&&(At=E,Rt=y)}var Z=void 0,j=void 0;if(0==D.ori?(Z=P,j=T):(Z=T,j=P),ke&&Ee.length>1){Zi(Ee[y],Ce.points.fill(i,y),Ce.points.stroke(i,y));var _=void 0,N=void 0,L=void 0,I=void 0,z=!0,B=Ce.points.bbox;if(null!=B){z=!1;var F=B(i,y);L=F.left,I=F.top,_=F.width,N=F.height}else L=Z,I=j,_=N=Ce.points.size(i,y);Ri(Ee[y],_,N,z),Ti(Ee[y],L,I,ce,fe)}}if(V.live){if(!ke||0==y&&G)continue;Ut(y,S)}}}if(Ce.idx=s,Ce.left=wt,Ce.top=kt,ke&&(V.idx=s,qt()),jt.show&&Pt)if(null!=e){var $=(0,r.Z)(ln.scales,2),W=$[0],q=$[1],U=(0,r.Z)(ln.match,2),Q=U[0],X=U[1],Y=(0,r.Z)(e.cursor.sync.scales,2),J=Y[0],ee=Y[1],te=e.cursor.drag;Et=te._x,Zt=te._y;var ne,re,ie,oe,ae,se=e.select,le=se.left,ue=se.top,de=se.width,he=se.height,pe=e.scales[W].ori,ve=e.posToVal,me=null!=W&&Q(W,J),ge=null!=q&&X(q,ee);me&&(0==pe?(ne=le,re=de):(ne=ue,re=he),Et?(ie=O[W],oe=A(ve(ne,J),ie,d,0),ae=A(ve(ne+re,J),ie,d,0),Ht(xr(oe,ae),mr(ae-oe))):Ht(0,d),ge||Vt(0,h)),ge&&(1==pe?(ne=le,re=de):(ne=ue,re=he),Zt?(ie=O[q],oe=R(ve(ne,ee),ie,h,0),ae=R(ve(ne+re,ee),ie,h,0),Vt(xr(oe,ae),mr(ae-oe))):Vt(0,h),me||Ht(0,d))}else{var ye=mr(bt-vt),be=mr(xt-mt);if(1==D.ori){var xe=ye;ye=be,be=xe}Et=Tt.x&&ye>=Tt.dist,Zt=Tt.y&&be>=Tt.dist;var we,Se,Oe=Tt.uni;null!=Oe?Et&&Zt&&(Zt=be>=Oe,(Et=ye>=Oe)||Zt||(be>ye?Zt=!0:Et=!0)):Tt.x&&Tt.y&&(Et||Zt)&&(Et=Zt=!0),Et&&(0==D.ori?(we=gt,Se=wt):(we=yt,Se=kt),Ht(xr(we,Se),mr(Se-we)),Zt||Vt(0,h)),Zt&&(1==D.ori?(we=gt,Se=wt):(we=yt,Se=kt),Vt(xr(we,Se),mr(Se-we)),Et||Ht(0,d)),Et||Zt||(Ht(0,0),Vt(0,0))}if(Tt._x=Et,Tt._y=Zt,null==e){if(a){if(null!=un){var Me=(0,r.Z)(ln.scales,2),Ze=Me[0],Ae=Me[1];ln.values[0]=null!=Ze?Ft(0==D.ori?wt:kt,Ze):null,ln.values[1]=null!=Ae?Ft(1==D.ori?wt:kt,Ae):null}fn(ci,i,wt,kt,ce,fe,s)}if(Te){var Re=a&&ln.setSeries,je=Pe.prox;null==Dt?At<=je&&It(Rt,zt,!0,Re):At>je?It(null,zt,!0,Re):Rt!=Dt&&It(Rt,zt,!0,Re)}}c&&!1!==n&&sn("setCursor")}i.setLegend=qt;var Xt=null;function Yt(e){!0===e?Xt=null:sn("syncRect",Xt=m.getBoundingClientRect())}function Gt(e,t,n,r,i,o,a){Ce._lock||(Kt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Qt(null,!0,!0):Qt(t,!0,!1))}function Kt(e,t,n,o,a,s,l,c,f){if(null==Xt&&Yt(!1),null!=e)n=e.clientX-Xt.left,o=e.clientY-Xt.top;else{if(n<0||o<0)return wt=-10,void(kt=-10);var d=(0,r.Z)(ln.scales,2),h=d[0],p=d[1],v=t.cursor.sync,m=(0,r.Z)(v.values,2),g=m[0],y=m[1],b=(0,r.Z)(v.scales,2),x=b[0],w=b[1],k=(0,r.Z)(ln.match,2),S=k[0],C=k[1],M=1==t.scales[x].ori,P=0==D.ori?ce:fe,T=1==D.ori?ce:fe,E=M?s:a,Z=M?a:s,A=M?o:n,R=M?n:o;if(n=null!=x?S(h,x)?u(g,O[h],P,0):-10:P*(A/E),o=null!=w?C(p,w)?u(y,O[p],T,0):-10:T*(R/Z),1==D.ori){var j=n;n=o,o=j}}if(f&&((n<=1||n>=ce-1)&&(n=Er(n,ce)),(o<=1||o>=fe-1)&&(o=Er(o,fe))),c){vt=n,mt=o;var _=Ce.move(i,n,o),N=(0,r.Z)(_,2);gt=N[0],yt=N[1]}else wt=n,kt=o}function Jt(){Nt({width:0,height:0},!1)}function en(e,t,n,r,o,a,s){Pt=!0,Et=Zt=Tt._x=Tt._y=!1,Kt(e,t,n,r,o,a,0,!0,!1),null!=e&&(ae(di,xi,tn),fn(fi,i,gt,yt,ce,fe,null))}function tn(e,t,n,r,o,a,s){Pt=Tt._x=Tt._y=!1,Kt(e,t,n,r,o,a,0,!1,!0);var l=jt.left,u=jt.top,c=jt.width,f=jt.height,d=c>0||f>0;if(d&&Nt(jt),Tt.setScale&&d){var h=l,p=c,v=u,m=f;if(1==D.ori&&(h=u,p=f,v=l,m=c),Et&&Lt(M,Ft(h,M),Ft(h+p,M)),Zt)for(var g in O){var y=O[g];g!=M&&null==y.from&&y.min!=Pr&&Lt(g,Ft(v+m,g),Ft(v,g))}Jt()}else Ce.lock&&(Ce._lock=!Ce._lock,Ce._lock||Qt(null,!0,!1));null!=e&&(se(di,xi),fn(di,i,wt,kt,ce,fe,null))}function nn(e,t,n,r,o,a,s){Ke(),Jt(),null!=e&&fn(vi,i,wt,kt,ce,fe,null)}function rn(){S.forEach(Fa),Se(i.width,i.height,!0)}_i(gi,wi,rn);var on={};on.mousedown=en,on.mousemove=Gt,on.mouseup=tn,on.dblclick=nn,on.setSeries=function(e,t,n,r){It(n,r,!0,!1)},Ce.show&&(ae(fi,m,en),ae(ci,m,Gt),ae(hi,m,Yt),ae(pi,m,(function(e,t,n,r,i,o,a){if(!Ce._lock){var s=Pt;if(Pt){var l,u,c=!0,f=!0;0==D.ori?(l=Et,u=Zt):(l=Zt,u=Et),l&&u&&(c=wt<=10||wt>=ce-10,f=kt<=10||kt>=fe-10),l&&c&&(wt=wt<gt?0:ce),u&&f&&(kt=kt<yt?0:fe),Qt(null,!0,!0),Pt=!1}wt=-10,kt=-10,Qt(null,!0,!0),s&&(Pt=s)}})),ae(vi,m,nn),Ma.add(i),i.syncRect=Yt);var an=i.hooks=e.hooks||{};function sn(e,t,n){e in an&&an[e].forEach((function(e){e.call(null,i,t,n)}))}(e.plugins||[]).forEach((function(e){for(var t in e.hooks)an[t]=(an[t]||[]).concat(e.hooks[t])}));var ln=Gr({key:null,setSeries:!1,filters:{pub:_r,sub:_r},scales:[M,k[1]?k[1].scale:null],match:[Nr,Nr],values:[null,null]},Ce.sync);Ce.sync=ln;var un=ln.key,cn=ra(un);function fn(e,t,n,r,i,o,a){ln.filters.pub(e,t,n,r,i,o,a)&&cn.pub(e,t,n,r,i,o,a)}function dn(){sn("init",e,t),Ge(t||e.data,!1),_[M]?Mt(M,_[M]):Ke(),Se(e.width,e.height),Qt(null,!0,!1),Nt(jt,!1)}return cn.sub(i),i.pub=function(e,t,n,r,i,o,a){ln.filters.sub(e,t,n,r,i,o,a)&&on[e](null,t,n,r,i,o,a)},i.destroy=function(){cn.unsub(i),Ma.delete(i),oe.clear(),Ni(gi,wi,rn),f.remove(),sn("destroy")},k.forEach(Ze),S.forEach((function(e,t){if(e._show=e.show,e.show){var n=e.side%2,r=O[e.scale];null==r&&(e.scale=n?k[1].scale:M,r=O[e.scale]);var o=r.time;e.size=Ar(e.size),e.space=Ar(e.space),e.rotate=Ar(e.rotate),e.incrs=Ar(e.incrs||(2==r.distr?Gi:o?1==w?ho:yo:Ki)),e.splits=Ar(e.splits||(o&&1==r.distr?F:3==r.distr?zo:4==r.distr?Bo:Io)),e.stroke=Ar(e.stroke),e.grid.stroke=Ar(e.grid.stroke),e.ticks.stroke=Ar(e.ticks.stroke);var a=e.values;e.values=qr(a)&&!qr(a[0])?Ar(a):o?qr(a)?ko(z,wo(a,B)):Ur(a)?function(e,t){var n=Vi(t);return function(t,r,i,o,a){return r.map((function(t){return n(e(t))}))}}(z,a):a||$:a||Lo,e.filter=Ar(e.filter||(r.distr>=3?Vo:Dr)),e.font=Ba(e.font),e.labelFont=Ba(e.labelFont),e._size=e.size(i,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(Ae[t]=!0),e._el=Mi("u-axis",p)}})),n?n instanceof HTMLElement?(n.appendChild(f),dn()):n(i,dn):dn(),i}$a.assign=Gr,$a.fmtNum=hr,$a.rangeNum=cr,$a.rangeLog=or,$a.rangeAsinh=ar,$a.orient=ia,$a.join=function(e,t){for(var n=new Set,r=0;r<e.length;r++)for(var i=e[r][0],o=i.length,a=0;a<o;a++)n.add(i[a]);for(var s=[Array.from(n).sort((function(e,t){return e-t}))],l=s[0].length,u=new Map,c=0;c<l;c++)u.set(s[0][c],c);for(var f=0;f<e.length;f++)for(var d=e[f],h=d[0],p=1;p<d.length;p++){for(var v=d[p],m=Array(l).fill(void 0),g=t?t[f][p]:1,y=[],b=0;b<v.length;b++){var x=v[b],w=u.get(h[b]);null===x?0!=g&&(m[w]=x,2==g&&y.push(w)):m[w]=x}Kr(m,y,l),s.push(m)}return s},$a.fmtDate=Vi,$a.tzDate=function(e,t){var n;return"UTC"==t||"Etc/UTC"==t?n=new Date(+e+6e4*e.getTimezoneOffset()):t==qi?n=e:(n=new Date(e.toLocaleString("en-US",{timeZone:t}))).setMilliseconds(e.getMilliseconds()),n},$a.sync=ra,$a.addGap=sa,$a.clipGaps=aa;var Wa=$a.paths={points:xa};Wa.linear=Oa,Wa.stepped=function(e){var t=fr(e.align,1),n=fr(e.ascDesc,!1);return function(e,r,i,o){return ia(e,r,(function(a,s,l,u,c,f,d,h,p,v,m){var g=a.pxRound,y=0==u.ori?da:ha,b={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},x=b.stroke,w=1*u.dir*(0==u.ori?1:-1);i=nr(l,i,o,1),o=nr(l,i,o,-1);var k=[],S=!1,O=g(d(l[1==w?i:o],c,m,p)),C=g(f(s[1==w?i:o],u,v,h)),M=C;y(x,C,O);for(var P=1==w?i:o;P>=i&&P<=o;P+=w){var T=l[P],E=g(f(s[P],u,v,h));if(null!=T){var Z=g(d(T,c,m,p));S&&(sa(k,M,E),S=!1),1==t?y(x,E,O):y(x,M,Z),y(x,E,Z),O=Z,M=E}else null===T&&(sa(k,M,E),S=!0)}if(null!=a.fill){var A=b.fill=new Path2D(x),R=g(d(a.fillTo(e,r,a.min,a.max),c,m,p));y(A,M,R),y(A,C,R)}b.gaps=k=a.gaps(e,r,i,o,k);var D=a.width*Jr/2,j=n||1==t?D:-D,_=n||-1==t?-D:D;return k.forEach((function(e){e[0]+=j,e[1]+=_})),a.spanGaps||(b.clip=aa(k,u.ori,h,p,v,m)),e.bands.length>0&&(b.band=oa(e,r,i,o,x)),b}))}},Wa.bars=function(e){var t=fr((e=e||Wr).size,[.6,Pr,1]),n=e.align||0,r=(e.gap||0)*Jr,i=fr(e.radius,0),o=1-t[0],a=fr(t[1],Pr)*Jr,s=fr(t[2],1)*Jr,l=fr(e.disp,Wr),u=fr(e.each,(function(e){})),c=l.fill,f=l.stroke;return function(e,t,d,h){return ia(e,t,(function(p,v,m,g,y,b,x,w,k,S,O){var C,M,P=p.pxRound,T=g.dir*(0==g.ori?1:-1),E=y.dir*(1==y.ori?1:-1),Z=0==g.ori?pa:va,A=0==g.ori?u:function(e,t,n,r,i,o,a){u(e,t,n,i,r,a,o)},R=p.fillTo(e,t,p.min,p.max),D=x(R,y,O,k),j=P(p.width*Jr),_=!1,N=null,L=null,I=null,z=null;null!=c&&null!=f&&(_=!0,N=c.values(e,t,d,h),L=new Map,new Set(N).forEach((function(e){null!=e&&L.set(e,new Path2D)})),I=f.values(e,t,d,h),z=new Map,new Set(I).forEach((function(e){null!=e&&z.set(e,new Path2D)})));var B=l.x0,F=l.size;if(null!=B&&null!=F){v=B.values(e,t,d,h),2==B.unit&&(v=v.map((function(t){return e.posToVal(w+t*S,g.key,!0)})));var $=F.values(e,t,d,h);M=P((M=2==F.unit?$[0]*S:b($[0],g,S,w)-b(0,g,S,w))-j),C=1==T?-j/2:M+j/2}else{var W=S;if(v.length>1)for(var H=null,V=0,q=1/0;V<v.length;V++)if(void 0!==m[V]){if(null!=H){var U=mr(v[V]-v[H]);U<q&&(q=U,W=mr(b(v[V],g,S,w)-b(v[H],g,S,w)))}H=V}M=P(xr(a,wr(s,W-W*o))-j-r),C=(0==n?M/2:n==T?0:M)-n*T*r/2}var Q,X={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:3},Y=e.bands.length>0;Y&&(X.band=new Path2D,Q=P(x(y.max,y,O,k)));for(var G=_?null:new Path2D,K=X.band,J=1==T?d:h;J>=d&&J<=h;J+=T){var ee=m[J],te=b(2!=g.distr||null!=l?v[J]:J,g,S,w),ne=x(fr(ee,R),y,O,k),re=P(te-C),ie=P(wr(ne,D)),oe=P(xr(ne,D)),ae=ie-oe,se=i*M;null!=ee&&(_?(j>0&&null!=I[J]&&Z(z.get(I[J]),re,oe+gr(j/2),M,wr(0,ae-j),se),null!=N[J]&&Z(L.get(N[J]),re,oe+gr(j/2),M,wr(0,ae-j),se)):Z(G,re,oe+gr(j/2),M,wr(0,ae-j),se),A(e,t,J,re-j/2,oe,M+j,ae)),Y&&(1==E?(ie=oe,oe=Q):(oe=ie,ie=Q),Z(K,re-j/2,oe,M+j,wr(0,ae=ie-oe),0))}return j>0&&(X.stroke=_?z:G),X.fill=_?L:G,X}))}},Wa.spline=function(e){return t=Ca,function(e,n,r,i){return ia(e,n,(function(o,a,s,l,u,c,f,d,h,p,v){var m,g,y,b=o.pxRound;0==l.ori?(m=ca,y=da,g=ya):(m=fa,y=ha,g=ba);var x=1*l.dir*(0==l.ori?1:-1);r=nr(s,r,i,1),i=nr(s,r,i,-1);for(var w=[],k=!1,S=b(c(a[1==x?r:i],l,p,d)),O=S,C=[],M=[],P=1==x?r:i;P>=r&&P<=i;P+=x){var T=s[P],E=c(a[P],l,p,d);null!=T?(k&&(sa(w,O,E),k=!1),C.push(O=E),M.push(f(s[P],u,v,h))):null===T&&(sa(w,O,E),k=!0)}var Z={stroke:t(C,M,m,y,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},A=Z.stroke;if(null!=o.fill&&null!=A){var R=Z.fill=new Path2D(A),D=b(f(o.fillTo(e,n,o.min,o.max),u,v,h));y(R,O,D),y(R,S,D)}return Z.gaps=w=o.gaps(e,n,r,i,w),o.spanGaps||(Z.clip=aa(w,l.ori,d,h,p,v)),e.bands.length>0&&(Z.band=oa(e,n,r,i,A)),Z}))};var t};var Ha={customStep:{enable:!1,value:1},yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Va(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return fn(fn({},e),{},{yaxis:fn(fn({},e.yaxis),{},{limits:fn(fn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"TOGGLE_CUSTOM_STEP":return fn(fn({},e),{},{customStep:fn(fn({},e.customStep),{},{enable:!e.customStep.enable})});case"SET_CUSTOM_STEP":return fn(fn({},e),{},{customStep:fn(fn({},e.customStep),{},{value:t.payload})});case"SET_YAXIS_LIMITS":return fn(fn({},e),{},{yaxis:fn(fn({},e.yaxis),{},{limits:fn(fn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var qa,Ua=(0,e.createContext)({}),Qa=function(){return(0,e.useContext)(Ua).state},Xa=function(){return(0,e.useContext)(Ua).dispatch},Ya=function(t){var n=t.children,i=(0,e.useReducer)(Va,Ha),o=(0,r.Z)(i,2),a=o[0],s=o[1],l=(0,e.useMemo)((function(){return{state:a,dispatch:s}}),[a,s]);return(0,p.jsx)(Ua.Provider,{value:l,children:n})},Ga=function(e){if(7!=e.length)return"0, 0, 0";var t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return"".concat(t,", ").concat(n,", ").concat(r)},Ka={height:500,legend:{show:!1},cursor:{drag:{x:!1,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{mouseup:function(){return null},mousedown:function(){return null},click:function(){return null},dblclick:function(){return null},mouseenter:function(){return null}}}},Ja=function(e,t){return t.map((function(e){return e>1e3?bn()(e).format("0.0a"):e}))},es=function(e,t){return function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);for(var r="#",i=0;i<3;i++)r+=("00"+(t>>8*i&255).toString(16)).substr(-2);return r}("".concat(e).concat(t))},ts=function(e){return e<=1?[]:[4*e,1.2*e]},ns=function(e){for(var t=e.length,n=-1/0;t--;)e[t]>n&&(n=e[t]);return n},rs=function(e){for(var t=e.length,n=1/0;t--;)e[t]<n&&(n=e[t]);return n},is=function(e){return Array.from(new Set(e.map((function(e){return e.scale})))).map((function(e){var t={scale:e,show:!0,font:"10px Arial",values:Ja};return e?Number(e)%2?t:fn(fn({},t),{},{side:1}):{space:80}}))},os=function(e){var t,n,r=e.u,i=e.tooltipIdx,o=e.metrics,a=e.series,s=e.tooltip,l=e.tooltipOffset,u=i.seriesIdx,c=i.dataIdx;if(null!==u&&void 0!==c){var f=r.data[u][c],d=r.data[0][c],h=(null===(t=o[u-1])||void 0===t?void 0:t.metric)||{},p=es(Number(a[u].scale||0),a[u].label||""),v=r.over.getBoundingClientRect(),m=v.width,g=v.height,y=r.valToPos(f||0,(null===(n=a[u])||void 0===n?void 0:n.scale)||"1"),b=r.valToPos(d,"x"),x=s.getBoundingClientRect(),w=x.width,k=x.height,S=b+w>=m,O=y+k>=g;s.style.display="grid",s.style.top="".concat(l.top+y+10-(O?k+10:0),"px"),s.style.left="".concat(l.left+b+10-(S?w+20:0),"px");var C=hn()(new Date(1e3*d)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)"),M=Object.keys(h).filter((function(e){return"__name__"!==e})).map((function(e){return"<div><b>".concat(e,"</b>: ").concat(h[e],"</div>")})).join(""),P='<div class="u-tooltip__marker" style="background: '.concat(p,'"></div>');s.innerHTML="<div>".concat(C,'</div>\n <div class="u-tooltip-data">\n ').concat(P).concat(h.__name__||"",': <b class="u-tooltip-data__value">').concat(f,'</b>\n </div>\n <div class="u-tooltip__info">').concat(M,"</div>")}},as=n(2061),ss=n.n(as),ls=function(t){var n=(0,e.useState)({width:0,height:0}),i=(0,r.Z)(n,2),o=i[0],a=i[1];return(0,e.useEffect)((function(){if(t){var e=function(){a({width:t.offsetWidth,height:t.offsetHeight})};return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}}}),[]),o};!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(qa||(qa={}));var us=function(t){var n=t.data,i=t.series,o=t.metrics,a=void 0===o?[]:o,s=Kn(),l=Gn().time.period,u=Qa().yaxis,c=(0,e.useRef)(null),f=(0,e.useState)(!1),d=(0,r.Z)(f,2),h=d[0],v=d[1],m=(0,e.useState)({min:l.start,max:l.end}),g=(0,r.Z)(m,2),y=g[0],b=g[1],x=(0,e.useState)(),w=(0,r.Z)(x,2),k=w[0],S=w[1],O=ls(document.getElementById("homeLayout")),C=document.createElement("div");C.className="u-tooltip";var M={seriesIdx:null,dataIdx:void 0},P={left:0,top:0},T=(0,e.useCallback)(ss()((function(e){var t=e.min,n=e.max;s({type:"SET_PERIOD",payload:{from:new Date(1e3*t),to:new Date(1e3*n)}})}),500),[]),E=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);i<kn||i>Sn||(t.setScale("x",{min:n,max:r}),b({min:n,max:r}),T({min:n,max:r}))},Z=function(){return[y.min,y.max]},A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0;return u.limits.enable?u.limits.range[r]:t&&n?[t-.25*t,n+.25*n]:[-1,1]},R=fn(fn({},Ka),{},{series:i,axes:is(i),scales:fn({},function(){var e={x:{range:Z}};return Object.keys(u.limits.range).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return A(e,n,r,t)}}})),e}()),width:O.width?O.width-64:400,plugins:[{hooks:{ready:function(e){var t,n=.85;P.left=parseFloat(e.over.style.left),P.top=parseFloat(e.over.style.top),null===(t=e.root.querySelector(".u-wrap"))||void 0===t||t.appendChild(C),e.over.addEventListener("mousedown",(function(t){return function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;if(0===t.button){t.preventDefault(),o(!0);var s=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),u=i.scales.x.min||0,c=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-s)*r);a({u:i,min:u-t,max:c-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}}({u:e,e:t,setPanning:v,setPlotScale:E,factor:n})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var r=e.over.getBoundingClientRect().width,i=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,o=e.posToVal(i,"x"),a=(e.scales.x.max||0)-(e.scales.x.min||0),s=t.deltaY<0?a*n:a/n,l=o-i/r*s,u=l+s;e.batch((function(){return E({u:e,min:l,max:u})}))}}))},setCursor:function(e){M.dataIdx!==e.cursor.idx&&(M.dataIdx=e.cursor.idx||0,null!==M.seriesIdx&&void 0!==M.dataIdx&&os({u:e,tooltipIdx:M,metrics:a,series:i,tooltip:C,tooltipOffset:P}))},setSeries:function(e,t){M.seriesIdx!==t&&(M.seriesIdx=t,t&&void 0!==M.dataIdx?os({u:e,tooltipIdx:M,metrics:a,series:i,tooltip:C,tooltipOffset:P}):C.style.display="none")}}}]}),D=function(e){if(k){switch(e){case qa.xRange:k.scales.x.range=Z;break;case qa.yRange:Object.keys(u.limits.range).forEach((function(e){k.scales[e]&&(k.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return A(t,n,r,e)})}));break;case qa.data:k.setData(n)}k.redraw()}};return(0,e.useEffect)((function(){return b({min:l.start,max:l.end})}),[l]),(0,e.useEffect)((function(){if(c.current){var e=new $a(R,n,c.current);return S(e),b({min:l.start,max:l.end}),e.destroy}}),[c.current,i,O]),(0,e.useEffect)((function(){return D(qa.data)}),[n]),(0,e.useEffect)((function(){return D(qa.xRange)}),[y]),(0,e.useEffect)((function(){return D(qa.yRange)}),[u]),(0,p.jsx)("div",{style:{pointerEvents:h?"none":"auto",height:"500px"},children:(0,p.jsx)("div",{ref:c})})},cs=function(t){var n=t.labels,r=t.onChange,i=Gn().query,o=(0,e.useMemo)((function(){return Array.from(new Set(n.map((function(e){return e.group}))))}),[n]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"legendWrapper",children:o.map((function(e){return(0,p.jsxs)("div",{className:"legendGroup",children:[(0,p.jsxs)("div",{className:"legendGroupTitle",children:[(0,p.jsxs)("span",{className:"legendGroupQuery",children:["Query ",e]}),(0,p.jsx)("svg",{className:"legendGroupLine",width:"33",height:"3",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{strokeWidth:"3",x1:"0",y1:"0",x2:"33",y2:"0",stroke:"#363636",strokeDasharray:ts(e).join(",")})}),(0,p.jsxs)("b",{children:['"',i[e-1],'":']})]}),(0,p.jsx)("div",{children:n.filter((function(t){return t.group===e})).map((function(e){return(0,p.jsxs)("div",{className:e.checked?"legendItem":"legendItem legendItemHide",onClick:function(t){return r(e,t.ctrlKey||t.metaKey)},children:[(0,p.jsx)("div",{className:"legendMarker",style:{borderColor:e.color,backgroundColor:"rgba(".concat(Ga(e.color),", 0.1)")}}),(0,p.jsx)("div",{className:"legendLabel",children:e.label})]},"".concat(e.group,".").concat(e.label))}))})]},e)}))}),(0,p.jsxs)("div",{className:"legendWrapperHotkey",children:[(0,p.jsxs)("p",{children:[(0,p.jsx)("code",{children:"Left click"})," - select series"]}),(0,p.jsxs)("p",{children:[(0,p.jsx)("code",{children:"Ctrl"})," + ",(0,p.jsx)("code",{children:"Left click"})," - toggle multiple series"]})]})]})};function fs(e,t){if(null==e)return{};var n,r,i=(0,o.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ds=["__name__"],hs=function(e,t){var n=function(e){if(0===Object.keys(e.metric).length)return"Query ".concat(e.group," result");var t=e.metric,n=t.__name__,r=fs(t,ds);return"".concat(n||""," {").concat(Object.entries(r).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e);return{label:n,dash:ts(e.group),width:1.4,stroke:es(e.group,n),show:!vs(n,e.group,t),scale:String(e.group),points:{size:4.2,width:1.4}}},ps=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1}},vs=function(e,t,n){return n.includes("".concat(t,".").concat(e))},ms=n(2495);var gs=e.createContext();function ys(){return e.useContext(gs)}function bs(e){return(0,q.Z)("MuiTypography",e)}(0,U.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var xs=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],ws=(0,g.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,O.Z)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({margin:0},n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),ks={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ss={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Os=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiTypography"}),r=function(e){return Ss[e]||e}(n.color),i=jt((0,a.Z)({},n,{color:r})),s=i.align,l=void 0===s?"inherit":s,f=i.className,d=i.component,h=i.gutterBottom,v=void 0!==h&&h,m=i.noWrap,g=void 0!==m&&m,y=i.paragraph,b=void 0!==y&&y,x=i.variant,k=void 0===x?"body1":x,S=i.variantMapping,C=void 0===S?ks:S,M=(0,o.Z)(i,xs),P=(0,a.Z)({},i,{align:l,color:r,className:f,component:d,gutterBottom:v,noWrap:g,paragraph:b,variant:k,variantMapping:C}),T=d||(b?"p":C[k]||ks[k])||"span",E=function(e){var t=e.align,n=e.gutterBottom,r=e.noWrap,i=e.paragraph,o=e.variant,a=e.classes,s={root:["root",o,"inherit"!==e.align&&"align".concat((0,O.Z)(t)),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,c.Z)(s,bs,a)}(P);return(0,p.jsx)(ws,(0,a.Z)({as:T,ref:t,ownerState:P,className:(0,u.default)(E.root,f)},M))})),Cs=Os;function Ms(e){return(0,q.Z)("MuiFormControlLabel",e)}var Ps=(0,U.Z)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label"]),Ts=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","value"],Es=(0,g.ZP)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[(0,i.Z)({},"& .".concat(Ps.label),t.label),t.root,t["labelPlacement".concat((0,O.Z)(n.labelPlacement))]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)((0,i.Z)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16},"&.".concat(Ps.disabled),{cursor:"default"}),"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},(0,i.Z)({},"& .".concat(Ps.label),(0,i.Z)({},"&.".concat(Ps.disabled),{color:t.palette.text.disabled})))})),Zs=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiFormControlLabel"}),i=r.className,s=r.componentsProps,l=void 0===s?{}:s,f=r.control,d=r.disabled,h=r.disableTypography,v=r.label,m=r.labelPlacement,g=void 0===m?"end":m,y=(0,o.Z)(r,Ts),b=ys(),x=d;"undefined"===typeof x&&"undefined"!==typeof f.props.disabled&&(x=f.props.disabled),"undefined"===typeof x&&b&&(x=b.disabled);var k={disabled:x};["checked","name","onChange","value","inputRef"].forEach((function(e){"undefined"===typeof f.props[e]&&"undefined"!==typeof r[e]&&(k[e]=r[e])}));var S=(0,a.Z)({},r,{disabled:x,label:v,labelPlacement:g}),C=function(e){var t=e.classes,n=e.disabled,r=e.labelPlacement,i={root:["root",n&&"disabled","labelPlacement".concat((0,O.Z)(r))],label:["label",n&&"disabled"]};return(0,c.Z)(i,Ms,t)}(S);return(0,p.jsxs)(Es,(0,a.Z)({className:(0,u.default)(C.root,i),ownerState:S,ref:n},y,{children:[e.cloneElement(f,k),v.type===Cs||h?v:(0,p.jsx)(Cs,(0,a.Z)({component:"span",className:C.label},l.typography,{children:v}))]}))})),As=Zs,Rs=n(3362),Ds=n(7219),js=n(3282),_s=n(4312),Ns=n(2678),Ls=["onChange","maxRows","minRows","style","value"];function Is(e,t){return parseInt(e[t],10)||0}var zs={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},Bs=e.forwardRef((function(t,n){var i=t.onChange,s=t.maxRows,l=t.minRows,u=void 0===l?1:l,c=t.style,d=t.value,h=(0,o.Z)(t,Ls),v=e.useRef(null!=d).current,m=e.useRef(null),g=(0,f.Z)(n,m),y=e.useRef(null),b=e.useRef(0),x=e.useState({}),w=(0,r.Z)(x,2),k=w[0],S=w[1],O=e.useCallback((function(){var e=m.current,n=(0,js.Z)(e).getComputedStyle(e);if("0px"!==n.width){var r=y.current;r.style.width=n.width,r.value=e.value||t.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");var i=n["box-sizing"],o=Is(n,"padding-bottom")+Is(n,"padding-top"),a=Is(n,"border-bottom-width")+Is(n,"border-top-width"),l=r.scrollHeight;r.value="x";var c=r.scrollHeight,f=l;u&&(f=Math.max(Number(u)*c,f)),s&&(f=Math.min(Number(s)*c,f));var d=(f=Math.max(f,c))+("border-box"===i?o+a:0),h=Math.abs(f-l)<=1;S((function(e){return b.current<20&&(d>0&&Math.abs((e.outerHeightStyle||0)-d)>1||e.overflow!==h)?(b.current+=1,{overflow:h,outerHeightStyle:d}):e}))}}),[s,u,t.placeholder]);e.useEffect((function(){var e,t=(0,_s.Z)((function(){b.current=0,O()})),n=(0,js.Z)(m.current);return n.addEventListener("resize",t),"undefined"!==typeof ResizeObserver&&(e=new ResizeObserver(t)).observe(m.current),function(){t.clear(),n.removeEventListener("resize",t),e&&e.disconnect()}}),[O]),(0,Ns.Z)((function(){O()})),e.useEffect((function(){b.current=0}),[d]);return(0,p.jsxs)(e.Fragment,{children:[(0,p.jsx)("textarea",(0,a.Z)({value:d,onChange:function(e){b.current=0,v||O(),i&&i(e)},ref:g,rows:u,style:(0,a.Z)({height:k.outerHeightStyle,overflow:k.overflow?"hidden":null},c)},h)),(0,p.jsx)("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:y,tabIndex:-1,style:(0,a.Z)({},zs,c,{padding:0})})]})})),Fs=Bs;var $s=function(e){return"string"===typeof e};function Ws(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}var Hs=n(4993);function Vs(e){var t=e.styles,n=e.defaultTheme,r=void 0===n?{}:n,i="function"===typeof t?function(e){return t(void 0===(n=e)||null===n||0===Object.keys(n).length?r:e);var n}:t;return(0,p.jsx)(Re,{styles:i})}var qs=function(e){return(0,p.jsx)(Vs,(0,a.Z)({},e,{defaultTheme:b.Z}))};function Us(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Qs(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Us(e.value)&&""!==e.value||t&&Us(e.defaultValue)&&""!==e.defaultValue)}function Xs(e){return(0,q.Z)("MuiInputBase",e)}var Ys=(0,U.Z)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Gs=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","startAdornment","type","value"],Ks=function(e,t){var n=e.ownerState;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat((0,O.Z)(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Js=function(e,t){var n=e.ownerState;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},el=(0,g.ZP)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Ks})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({},t.typography.body1,(0,i.Z)({color:t.palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center"},"&.".concat(Ys.disabled),{color:t.palette.text.disabled,cursor:"default"}),n.multiline&&(0,a.Z)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})})),tl=(0,g.ZP)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Js})((function(e){var t,n=e.theme,r=e.ownerState,o="light"===n.palette.mode,s={color:"currentColor",opacity:o?.42:.5,transition:n.transitions.create("opacity",{duration:n.transitions.duration.shorter})},l={opacity:"0 !important"},u={opacity:o?.42:.5};return(0,a.Z)((t={font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"}},(0,i.Z)(t,"label[data-shrink=false] + .".concat(Ys.formControl," &"),{"&::-webkit-input-placeholder":l,"&::-moz-placeholder":l,"&:-ms-input-placeholder":l,"&::-ms-input-placeholder":l,"&:focus::-webkit-input-placeholder":u,"&:focus::-moz-placeholder":u,"&:focus:-ms-input-placeholder":u,"&:focus::-ms-input-placeholder":u}),(0,i.Z)(t,"&.".concat(Ys.disabled),{opacity:1,WebkitTextFillColor:n.palette.text.disabled}),(0,i.Z)(t,"&:-webkit-autofill",{animationDuration:"5000s",animationName:"mui-auto-fill"}),t),"small"===r.size&&{paddingTop:1},r.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===r.type&&{MozAppearance:"textfield"})})),nl=(0,p.jsx)(qs,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),rl=e.forwardRef((function(t,n){var i=(0,w.Z)({props:t,name:"MuiInputBase"}),s=i["aria-describedby"],l=i.autoComplete,f=i.autoFocus,d=i.className,h=i.components,v=void 0===h?{}:h,m=i.componentsProps,g=void 0===m?{}:m,y=i.defaultValue,b=i.disabled,x=i.disableInjectingGlobalStyles,k=i.endAdornment,S=i.fullWidth,C=void 0!==S&&S,M=i.id,P=i.inputComponent,T=void 0===P?"input":P,E=i.inputProps,Z=void 0===E?{}:E,A=i.inputRef,R=i.maxRows,D=i.minRows,j=i.multiline,_=void 0!==j&&j,N=i.name,L=i.onBlur,I=i.onChange,B=i.onClick,F=i.onFocus,$=i.onKeyDown,W=i.onKeyUp,H=i.placeholder,V=i.readOnly,q=i.renderSuffix,U=i.rows,Q=i.startAdornment,X=i.type,Y=void 0===X?"text":X,G=i.value,K=(0,o.Z)(i,Gs),J=null!=Z.value?Z.value:G,ee=e.useRef(null!=J).current,te=e.useRef(),ne=e.useCallback((function(e){0}),[]),re=(0,z.Z)(Z.ref,ne),ie=(0,z.Z)(A,re),oe=(0,z.Z)(te,ie),ae=e.useState(!1),se=(0,r.Z)(ae,2),le=se[0],ue=se[1],ce=ys();var fe=Ws({props:i,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","size","required","filled"]});fe.focused=ce?ce.focused:le,e.useEffect((function(){!ce&&b&&le&&(ue(!1),L&&L())}),[ce,b,le,L]);var de=ce&&ce.onFilled,he=ce&&ce.onEmpty,pe=e.useCallback((function(e){Qs(e)?de&&de():he&&he()}),[de,he]);(0,Hs.Z)((function(){ee&&pe({value:J})}),[J,pe,ee]);e.useEffect((function(){pe(te.current)}),[]);var ve=T,me=Z;_&&"input"===ve&&(me=U?(0,a.Z)({type:void 0,minRows:U,maxRows:U},me):(0,a.Z)({type:void 0,maxRows:R,minRows:D},me),ve=Fs);e.useEffect((function(){ce&&ce.setAdornedStart(Boolean(Q))}),[ce,Q]);var ge=(0,a.Z)({},i,{color:fe.color||"primary",disabled:fe.disabled,endAdornment:k,error:fe.error,focused:fe.focused,formControl:ce,fullWidth:C,hiddenLabel:fe.hiddenLabel,multiline:_,size:fe.size,startAdornment:Q,type:Y}),ye=function(e){var t=e.classes,n=e.color,r=e.disabled,i=e.error,o=e.endAdornment,a=e.focused,s=e.formControl,l=e.fullWidth,u=e.hiddenLabel,f=e.multiline,d=e.size,h=e.startAdornment,p=e.type,v={root:["root","color".concat((0,O.Z)(n)),r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl","small"===d&&"sizeSmall",f&&"multiline",h&&"adornedStart",o&&"adornedEnd",u&&"hiddenLabel"],input:["input",r&&"disabled","search"===p&&"inputTypeSearch",f&&"inputMultiline","small"===d&&"inputSizeSmall",u&&"inputHiddenLabel",h&&"inputAdornedStart",o&&"inputAdornedEnd"]};return(0,c.Z)(v,Xs,t)}(ge),be=v.Root||el,xe=g.root||{},we=v.Input||tl;return me=(0,a.Z)({},me,g.input),(0,p.jsxs)(e.Fragment,{children:[!x&&nl,(0,p.jsxs)(be,(0,a.Z)({},xe,!$s(be)&&{ownerState:(0,a.Z)({},ge,xe.ownerState)},{ref:n,onClick:function(e){te.current&&e.currentTarget===e.target&&te.current.focus(),B&&B(e)}},K,{className:(0,u.default)(ye.root,xe.className,d),children:[Q,(0,p.jsx)(gs.Provider,{value:null,children:(0,p.jsx)(we,(0,a.Z)({ownerState:ge,"aria-invalid":fe.error,"aria-describedby":s,autoComplete:l,autoFocus:f,defaultValue:y,disabled:fe.disabled,id:M,onAnimationStart:function(e){pe("mui-auto-fill-cancel"===e.animationName?te.current:{value:"x"})},name:N,placeholder:H,readOnly:V,required:fe.required,rows:U,value:J,onKeyDown:$,onKeyUp:W,type:Y},me,!$s(we)&&{as:ve,ownerState:(0,a.Z)({},ge,me.ownerState)},{ref:oe,className:(0,u.default)(ye.input,me.className),onBlur:function(e){L&&L(e),Z.onBlur&&Z.onBlur(e),ce&&ce.onBlur?ce.onBlur(e):ue(!1)},onChange:function(e){if(!ee){var t=e.target||te.current;if(null==t)throw new Error((0,Ds.Z)(1));pe({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];Z.onChange&&Z.onChange.apply(Z,[e].concat(r)),I&&I.apply(void 0,[e].concat(r))},onFocus:function(e){fe.disabled?e.stopPropagation():(F&&F(e),Z.onFocus&&Z.onFocus(e),ce&&ce.onFocus?ce.onFocus(e):ue(!0))}}))}),k,q?q((0,a.Z)({},fe,{startAdornment:Q})):null]}))]})})),il=rl;function ol(e){return(0,q.Z)("MuiInput",e)}var al=(0,U.Z)("MuiInput",["root","formControl","focused","disabled","colorSecondary","underline","error","sizeSmall","multiline","fullWidth","input","inputSizeSmall","inputMultiline","inputTypeSearch"]),sl=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","type"],ll=(0,g.ZP)(el,{shouldForwardProp:function(e){return(0,g.FO)(e)||"classes"===e},name:"MuiInput",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[].concat((0,me.Z)(Ks(e,t)),[!n.disableUnderline&&t.underline])}})((function(e){var t,n=e.theme,r=e.ownerState,o="light"===n.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return(0,a.Z)({position:"relative"},r.formControl&&{"label + &":{marginTop:16}},!r.disableUnderline&&(t={"&:after":{borderBottom:"2px solid ".concat(n.palette[r.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:n.transitions.create("transform",{duration:n.transitions.duration.shorter,easing:n.transitions.easing.easeOut}),pointerEvents:"none"}},(0,i.Z)(t,"&.".concat(al.focused,":after"),{transform:"scaleX(1)"}),(0,i.Z)(t,"&.".concat(al.error,":after"),{borderBottomColor:n.palette.error.main,transform:"scaleX(1)"}),(0,i.Z)(t,"&:before",{borderBottom:"1px solid ".concat(o),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:n.transitions.create("border-bottom-color",{duration:n.transitions.duration.shorter}),pointerEvents:"none"}),(0,i.Z)(t,"&:hover:not(.".concat(al.disabled,"):before"),{borderBottom:"2px solid ".concat(n.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(o)}}),(0,i.Z)(t,"&.".concat(al.disabled,":before"),{borderBottomStyle:"dotted"}),t))})),ul=(0,g.ZP)(tl,{name:"MuiInput",slot:"Input",overridesResolver:Js})({}),cl=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiInput"}),r=n.disableUnderline,i=n.components,s=void 0===i?{}:i,l=n.componentsProps,u=n.fullWidth,f=void 0!==u&&u,d=n.inputComponent,h=void 0===d?"input":d,v=n.multiline,m=void 0!==v&&v,g=n.type,y=void 0===g?"text":g,b=(0,o.Z)(n,sl),x=function(e){var t=e.classes,n={root:["root",!e.disableUnderline&&"underline"],input:["input"]},r=(0,c.Z)(n,ol,t);return(0,a.Z)({},t,r)}(n),k={root:{ownerState:{disableUnderline:r}}},S=l?(0,At.Z)(l,k):k;return(0,p.jsx)(il,(0,a.Z)({components:(0,a.Z)({Root:ll,Input:ul},s),componentsProps:S,fullWidth:f,inputComponent:h,multiline:m,ref:t,type:y},b,{classes:x}))}));cl.muiName="Input";var fl=cl;function dl(e){return(0,q.Z)("MuiFilledInput",e)}var hl=(0,U.Z)("MuiFilledInput",["root","colorSecondary","underline","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","hiddenLabel","input","inputSizeSmall","inputHiddenLabel","inputMultiline","inputAdornedStart","inputAdornedEnd"]),pl=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","type"],vl=(0,g.ZP)(el,{shouldForwardProp:function(e){return(0,g.FO)(e)||"classes"===e},name:"MuiFilledInput",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[].concat((0,me.Z)(Ks(e,t)),[!n.disableUnderline&&t.underline])}})((function(e){var t,n,r=e.theme,o=e.ownerState,s="light"===r.palette.mode,l=s?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",u=s?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return(0,a.Z)((t={position:"relative",backgroundColor:u,borderTopLeftRadius:r.shape.borderRadius,borderTopRightRadius:r.shape.borderRadius,transition:r.transitions.create("background-color",{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut}),"&:hover":{backgroundColor:s?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:u}}},(0,i.Z)(t,"&.".concat(hl.focused),{backgroundColor:u}),(0,i.Z)(t,"&.".concat(hl.disabled),{backgroundColor:s?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}),t),!o.disableUnderline&&(n={"&:after":{borderBottom:"2px solid ".concat(r.palette[o.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:r.transitions.create("transform",{duration:r.transitions.duration.shorter,easing:r.transitions.easing.easeOut}),pointerEvents:"none"}},(0,i.Z)(n,"&.".concat(hl.focused,":after"),{transform:"scaleX(1)"}),(0,i.Z)(n,"&.".concat(hl.error,":after"),{borderBottomColor:r.palette.error.main,transform:"scaleX(1)"}),(0,i.Z)(n,"&:before",{borderBottom:"1px solid ".concat(l),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:r.transitions.create("border-bottom-color",{duration:r.transitions.duration.shorter}),pointerEvents:"none"}),(0,i.Z)(n,"&:hover:not(.".concat(hl.disabled,"):before"),{borderBottom:"1px solid ".concat(r.palette.text.primary)}),(0,i.Z)(n,"&.".concat(hl.disabled,":before"),{borderBottomStyle:"dotted"}),n),o.startAdornment&&{paddingLeft:12},o.endAdornment&&{paddingRight:12},o.multiline&&(0,a.Z)({padding:"25px 12px 8px"},"small"===o.size&&{paddingTop:21,paddingBottom:4},o.hiddenLabel&&{paddingTop:16,paddingBottom:17}))})),ml=(0,g.ZP)(tl,{name:"MuiFilledInput",slot:"Input",overridesResolver:Js})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9})})),gl=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiFilledInput"}),r=n.components,i=void 0===r?{}:r,s=n.componentsProps,l=n.fullWidth,u=void 0!==l&&l,f=n.inputComponent,d=void 0===f?"input":f,h=n.multiline,v=void 0!==h&&h,m=n.type,g=void 0===m?"text":m,y=(0,o.Z)(n,pl),b=(0,a.Z)({},n,{fullWidth:u,inputComponent:d,multiline:v,type:g}),x=function(e){var t=e.classes,n={root:["root",!e.disableUnderline&&"underline"],input:["input"]},r=(0,c.Z)(n,dl,t);return(0,a.Z)({},t,r)}(n),k={root:{ownerState:b},input:{ownerState:b}},S=s?(0,At.Z)(s,k):k;return(0,p.jsx)(il,(0,a.Z)({components:(0,a.Z)({Root:vl,Input:ml},i),componentsProps:S,fullWidth:u,inputComponent:d,multiline:v,ref:t,type:g},y,{classes:x}))}));gl.muiName="Input";var yl=gl,bl=["children","classes","className","label","notched"],xl=(0,g.ZP)("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),wl=(0,g.ZP)("legend",{skipSx:!0})((function(e){var t=e.ownerState,n=e.theme;return(0,a.Z)({float:"unset"},void 0===t.label&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},void 0!==t.label&&(0,a.Z)({display:"block",width:"auto",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))}));function kl(e){return(0,q.Z)("MuiOutlinedInput",e)}var Sl=(0,U.Z)("MuiOutlinedInput",["root","colorSecondary","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","notchedOutline","input","inputSizeSmall","inputMultiline","inputAdornedStart","inputAdornedEnd"]),Ol=["components","fullWidth","inputComponent","label","multiline","notched","type"],Cl=(0,g.ZP)(el,{shouldForwardProp:function(e){return(0,g.FO)(e)||"classes"===e},name:"MuiOutlinedInput",slot:"Root",overridesResolver:Ks})((function(e){var t,n=e.theme,r=e.ownerState,o="light"===n.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,a.Z)((t={position:"relative",borderRadius:n.shape.borderRadius},(0,i.Z)(t,"&:hover .".concat(Sl.notchedOutline),{borderColor:n.palette.text.primary}),(0,i.Z)(t,"@media (hover: none)",(0,i.Z)({},"&:hover .".concat(Sl.notchedOutline),{borderColor:o})),(0,i.Z)(t,"&.".concat(Sl.focused," .").concat(Sl.notchedOutline),{borderColor:n.palette[r.color].main,borderWidth:2}),(0,i.Z)(t,"&.".concat(Sl.error," .").concat(Sl.notchedOutline),{borderColor:n.palette.error.main}),(0,i.Z)(t,"&.".concat(Sl.disabled," .").concat(Sl.notchedOutline),{borderColor:n.palette.action.disabled}),t),r.startAdornment&&{paddingLeft:14},r.endAdornment&&{paddingRight:14},r.multiline&&(0,a.Z)({padding:"16.5px 14px"},"small"===r.size&&{padding:"8.5px 14px"}))})),Ml=(0,g.ZP)((function(e){var t=e.className,n=e.label,r=e.notched,i=(0,o.Z)(e,bl),s=(0,a.Z)({},e,{notched:r,label:n});return(0,p.jsx)(xl,(0,a.Z)({"aria-hidden":!0,className:t,ownerState:s},i,{children:(0,p.jsx)(wl,{ownerState:s,children:n?(0,p.jsx)("span",{children:n}):(0,p.jsx)("span",{className:"notranslate",dangerouslySetInnerHTML:{__html:"&#8203;"}})})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:function(e,t){return t.notchedOutline}})((function(e){return{borderColor:"light"===e.theme.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}})),Pl=(0,g.ZP)(tl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Js})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({padding:"16.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})})),Tl=e.forwardRef((function(t,n){var r,i=(0,w.Z)({props:t,name:"MuiOutlinedInput"}),s=i.components,l=void 0===s?{}:s,u=i.fullWidth,f=void 0!==u&&u,d=i.inputComponent,h=void 0===d?"input":d,v=i.label,m=i.multiline,g=void 0!==m&&m,y=i.notched,b=i.type,x=void 0===b?"text":b,k=(0,o.Z)(i,Ol),S=function(e){var t=e.classes,n=(0,c.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},kl,t);return(0,a.Z)({},t,n)}(i),O=Ws({props:i,muiFormControl:ys(),states:["required"]});return(0,p.jsx)(il,(0,a.Z)({components:(0,a.Z)({Root:Cl,Input:Pl},l),renderSuffix:function(t){return(0,p.jsx)(Ml,{className:S.notchedOutline,label:v&&O.required?r||(r=(0,p.jsxs)(e.Fragment,{children:[v,"\xa0","*"]})):v,notched:"undefined"!==typeof y?y:Boolean(t.startAdornment||t.filled||t.focused)})},fullWidth:f,inputComponent:h,multiline:g,ref:n,type:x},k,{classes:(0,a.Z)({},S,{notchedOutline:null})}))}));Tl.muiName="Input";var El=Tl;function Zl(e){return(0,q.Z)("MuiFormLabel",e)}var Al=(0,U.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Rl=["children","className","color","component","disabled","error","filled","focused","required"],Dl=(0,g.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return(0,a.Z)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((function(e){var t,n=e.theme,r=e.ownerState;return(0,a.Z)({color:n.palette.text.secondary},n.typography.body1,(t={lineHeight:"1.4375em",padding:0,position:"relative"},(0,i.Z)(t,"&.".concat(Al.focused),{color:n.palette[r.color].main}),(0,i.Z)(t,"&.".concat(Al.disabled),{color:n.palette.text.disabled}),(0,i.Z)(t,"&.".concat(Al.error),{color:n.palette.error.main}),t))})),jl=(0,g.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:function(e,t){return t.asterisk}})((function(e){var t=e.theme;return(0,i.Z)({},"&.".concat(Al.error),{color:t.palette.error.main})})),_l=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiFormLabel"}),r=n.children,i=n.className,s=n.component,l=void 0===s?"label":s,f=(0,o.Z)(n,Rl),d=Ws({props:n,muiFormControl:ys(),states:["color","required","focused","disabled","error","filled"]}),h=(0,a.Z)({},n,{color:d.color||"primary",component:l,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),v=function(e){var t=e.classes,n=e.color,r=e.focused,i=e.disabled,o=e.error,a=e.filled,s=e.required,l={root:["root","color".concat((0,O.Z)(n)),i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return(0,c.Z)(l,Zl,t)}(h);return(0,p.jsxs)(Dl,(0,a.Z)({as:l,ownerState:h,className:(0,u.default)(v.root,i),ref:t},f,{children:[r,d.required&&(0,p.jsxs)(jl,{ownerState:h,"aria-hidden":!0,className:v.asterisk,children:["\u2009","*"]})]}))})),Nl=_l;function Ll(e){return(0,q.Z)("MuiInputLabel",e)}(0,U.Z)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);var Il=["disableAnimation","margin","shrink","variant"],zl=(0,g.ZP)(Nl,{shouldForwardProp:function(e){return(0,g.FO)(e)||"classes"===e},name:"MuiInputLabel",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[(0,i.Z)({},"& .".concat(Al.asterisk),t.asterisk),t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,t[n.variant]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,a.Z)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,a.Z)({transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,a.Z)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))})),Bl=e.forwardRef((function(e,t){var n=(0,w.Z)({name:"MuiInputLabel",props:e}),r=n.disableAnimation,i=void 0!==r&&r,s=n.shrink,l=(0,o.Z)(n,Il),u=ys(),f=s;"undefined"===typeof f&&u&&(f=u.filled||u.focused||u.adornedStart);var d=Ws({props:n,muiFormControl:u,states:["size","variant","required"]}),h=(0,a.Z)({},n,{disableAnimation:i,formControl:u,shrink:f,size:d.size,variant:d.variant,required:d.required}),v=function(e){var t=e.classes,n=e.formControl,r=e.size,i=e.shrink,o={root:["root",n&&"formControl",!e.disableAnimation&&"animated",i&&"shrink","small"===r&&"sizeSmall",e.variant],asterisk:[e.required&&"asterisk"]},s=(0,c.Z)(o,Ll,t);return(0,a.Z)({},t,s)}(h);return(0,p.jsx)(zl,(0,a.Z)({"data-shrink":f,ownerState:h,ref:t},l,{classes:v}))})),Fl=Bl,$l=n(7816);function Wl(e){return(0,q.Z)("MuiFormControl",e)}(0,U.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var Hl=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Vl=(0,g.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return(0,a.Z)({},t.root,t["margin".concat((0,O.Z)(n.margin))],n.fullWidth&&t.fullWidth)}})((function(e){var t=e.ownerState;return(0,a.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),ql=e.forwardRef((function(t,n){var i=(0,w.Z)({props:t,name:"MuiFormControl"}),s=i.children,l=i.className,f=i.color,d=void 0===f?"primary":f,h=i.component,v=void 0===h?"div":h,m=i.disabled,g=void 0!==m&&m,y=i.error,b=void 0!==y&&y,x=i.focused,k=i.fullWidth,S=void 0!==k&&k,C=i.hiddenLabel,M=void 0!==C&&C,P=i.margin,T=void 0===P?"none":P,E=i.required,Z=void 0!==E&&E,A=i.size,R=void 0===A?"medium":A,D=i.variant,j=void 0===D?"outlined":D,_=(0,o.Z)(i,Hl),N=(0,a.Z)({},i,{color:d,component:v,disabled:g,error:b,fullWidth:S,hiddenLabel:M,margin:T,required:Z,size:R,variant:j}),L=function(e){var t=e.classes,n=e.margin,r=e.fullWidth,i={root:["root","none"!==n&&"margin".concat((0,O.Z)(n)),r&&"fullWidth"]};return(0,c.Z)(i,Wl,t)}(N),I=e.useState((function(){var t=!1;return s&&e.Children.forEach(s,(function(e){if((0,$l.Z)(e,["Input","Select"])){var n=(0,$l.Z)(e,["Select"])?e.props.input:e;n&&n.props.startAdornment&&(t=!0)}})),t})),z=(0,r.Z)(I,2),B=z[0],F=z[1],$=e.useState((function(){var t=!1;return s&&e.Children.forEach(s,(function(e){(0,$l.Z)(e,["Input","Select"])&&Qs(e.props,!0)&&(t=!0)})),t})),W=(0,r.Z)($,2),H=W[0],V=W[1],q=e.useState(!1),U=(0,r.Z)(q,2),Q=U[0],X=U[1];g&&Q&&X(!1);var Y=void 0===x||g?Q:x,G=e.useCallback((function(){V(!0)}),[]),K={adornedStart:B,setAdornedStart:F,color:d,disabled:g,error:b,filled:H,focused:Y,fullWidth:S,hiddenLabel:M,size:R,onBlur:function(){X(!1)},onEmpty:e.useCallback((function(){V(!1)}),[]),onFilled:G,onFocus:function(){X(!0)},registerEffect:undefined,required:Z,variant:j};return(0,p.jsx)(gs.Provider,{value:K,children:(0,p.jsx)(Vl,(0,a.Z)({as:v,ownerState:N,className:(0,u.default)(L.root,l),ref:n},_,{children:s}))})})),Ul=ql;function Ql(e){return(0,q.Z)("MuiFormHelperText",e)}var Xl=(0,U.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),Yl=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Gl=(0,g.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.size&&t["size".concat((0,O.Z)(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})((function(e){var t,n=e.theme,r=e.ownerState;return(0,a.Z)({color:n.palette.text.secondary},n.typography.caption,(t={textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0},(0,i.Z)(t,"&.".concat(Xl.disabled),{color:n.palette.text.disabled}),(0,i.Z)(t,"&.".concat(Xl.error),{color:n.palette.error.main}),t),"small"===r.size&&{marginTop:4},r.contained&&{marginLeft:14,marginRight:14})})),Kl=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiFormHelperText"}),r=n.children,i=n.className,s=n.component,l=void 0===s?"p":s,f=(0,o.Z)(n,Yl),d=Ws({props:n,muiFormControl:ys(),states:["variant","size","disabled","error","filled","focused","required"]}),h=(0,a.Z)({},n,{component:l,contained:"filled"===d.variant||"outlined"===d.variant,variant:d.variant,size:d.size,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),v=function(e){var t=e.classes,n=e.contained,r=e.size,i=e.disabled,o=e.error,a=e.filled,s=e.focused,l=e.required,u={root:["root",i&&"disabled",o&&"error",r&&"size".concat((0,O.Z)(r)),n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return(0,c.Z)(u,Ql,t)}(h);return(0,p.jsx)(Gl,(0,a.Z)({as:l,ownerState:h,className:(0,u.default)(v.root,i),ref:t},f,{children:" "===r?(0,p.jsx)("span",{className:"notranslate",dangerouslySetInnerHTML:{__html:"&#8203;"}}):r}))})),Jl=Kl,eu=(n(6214),n(6106));var tu=e.createContext({});function nu(e){return(0,q.Z)("MuiList",e)}(0,U.Z)("MuiList",["root","padding","dense","subheader"]);var ru=["children","className","component","dense","disablePadding","subheader"],iu=(0,g.ZP)("ul",{name:"MuiList",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((function(e){var t=e.ownerState;return(0,a.Z)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),ou=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiList"}),i=r.children,s=r.className,l=r.component,f=void 0===l?"ul":l,d=r.dense,h=void 0!==d&&d,v=r.disablePadding,m=void 0!==v&&v,g=r.subheader,y=(0,o.Z)(r,ru),b=e.useMemo((function(){return{dense:h}}),[h]),x=(0,a.Z)({},r,{component:f,dense:h,disablePadding:m}),k=function(e){var t=e.classes,n={root:["root",!e.disablePadding&&"padding",e.dense&&"dense",e.subheader&&"subheader"]};return(0,c.Z)(n,nu,t)}(x);return(0,p.jsx)(tu.Provider,{value:b,children:(0,p.jsxs)(iu,(0,a.Z)({as:f,className:(0,u.default)(k.root,s),ref:n,ownerState:x},y,{children:[g,i]}))})})),au=ou;function su(e){var t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}var lu=su,uu=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function cu(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function fu(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function du(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function hu(e,t,n,r,i,o){for(var a=!1,s=i(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return!1;a=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&du(s,o)&&!l)return s.focus(),!0;s=i(e,s,n)}return!1}var pu=e.forwardRef((function(t,n){var r=t.actions,i=t.autoFocus,s=void 0!==i&&i,l=t.autoFocusItem,u=void 0!==l&&l,c=t.children,f=t.className,d=t.disabledItemsFocusable,h=void 0!==d&&d,v=t.disableListWrap,m=void 0!==v&&v,g=t.onKeyDown,y=t.variant,b=void 0===y?"selectedMenu":y,x=(0,o.Z)(t,uu),w=e.useRef(null),k=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,Hs.Z)((function(){s&&w.current.focus()}),[s]),e.useImperativeHandle(r,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!w.current.style.width;if(e.clientHeight<w.current.clientHeight&&n){var r="".concat(lu((0,eu.Z)(e)),"px");w.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,w.current.style.width="calc(100% + ".concat(r,")")}return w.current}}}),[]);var S=(0,z.Z)(w,n),O=-1;e.Children.forEach(c,(function(t,n){e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===b&&t.props.selected||-1===O)&&(O=n))}));var C=e.Children.map(c,(function(t,n){if(n===O){var r={};return u&&(r.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===b&&(r.tabIndex=0),e.cloneElement(t,r)}return t}));return(0,p.jsx)(au,(0,a.Z)({role:"menu",ref:S,className:f,onKeyDown:function(e){var t=w.current,n=e.key,r=(0,eu.Z)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),hu(t,r,m,h,cu);else if("ArrowUp"===n)e.preventDefault(),hu(t,r,m,h,fu);else if("Home"===n)e.preventDefault(),hu(t,null,m,h,cu);else if("End"===n)e.preventDefault(),hu(t,null,m,h,fu);else if(1===n.length){var i=k.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);var s=r&&!i.repeating&&du(r,i);i.previousKeyMatched&&(s||hu(t,r,!1,h,cu,i))?e.preventDefault():i.previousKeyMatched=!1}g&&g(e)},tabIndex:s?0:-1},x,{children:C}))})),vu=pu,mu=n(8706),gu=n(3533),yu=n(4246),bu=n(9265);var xu=e.forwardRef((function(n,i){var o=n.children,a=n.container,s=n.disablePortal,l=void 0!==s&&s,u=e.useState(null),c=(0,r.Z)(u,2),d=c[0],h=c[1],p=(0,f.Z)(e.isValidElement(o)?o.ref:null,i);return(0,Ns.Z)((function(){l||h(function(e){return"function"===typeof e?e():e}(a)||document.body)}),[a,l]),(0,Ns.Z)((function(){if(d&&!l)return(0,bu.Z)(i,d),function(){(0,bu.Z)(i,null)}}),[i,d,l]),l?e.isValidElement(o)?e.cloneElement(o,{ref:p}):o:d?t.createPortal(o,d):d}));function wu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ku(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Su(e,t,n){return t&&ku(e.prototype,t),n&&ku(e,n),e}function Ou(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Cu(e){return parseInt((0,js.Z)(e).getComputedStyle(e).paddingRight,10)||0}function Mu(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=[t,n].concat((0,me.Z)(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){-1===o.indexOf(e)&&-1===a.indexOf(e.tagName)&&Ou(e,i)}))}function Pu(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Tu(e,t){var n=[],r=e.container;if(!t.disableScrollLock){if(function(e){var t=(0,h.Z)(e);return t.body===e?(0,js.Z)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){var i=su((0,h.Z)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(Cu(r)+i,"px");var o=(0,h.Z)(r).querySelectorAll(".mui-fixed");[].forEach.call(o,(function(e){n.push({value:e.style.paddingRight,property:"padding-right",el:e}),e.style.paddingRight="".concat(Cu(e)+i,"px")}))}var a=r.parentElement,s=(0,js.Z)(r),l="HTML"===(null==a?void 0:a.nodeName)&&"scroll"===s.getComputedStyle(a).overflowY?a:r;n.push({value:l.style.overflow,property:"overflow",el:l},{value:l.style.overflowX,property:"overflow-x",el:l},{value:l.style.overflowY,property:"overflow-y",el:l}),l.style.overflow="hidden"}return function(){n.forEach((function(e){var t=e.value,n=e.el,r=e.property;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var Eu=function(){function e(){wu(this,e),this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}return Su(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Ou(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Mu(t,e.mount,e.modalRef,r,!0);var i=Pu(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}},{key:"mount",value:function(e,t){var n=Pu(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Tu(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Pu(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&Ou(e.modalRef,!0),Mu(r.container,e.mount,e.modalRef,r.hiddenSiblings,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&Ou(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}(),Zu=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Au(e){var t=[],n=[];return Array.from(e.querySelectorAll(Zu)).forEach((function(e,r){var i=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;var t=function(t){return e.ownerDocument.querySelector('input[type="radio"]'.concat(t))},n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))})),n.sort((function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex})).map((function(e){return e.node})).concat(t)}function Ru(){return!0}var Du=function(t){var n=t.children,r=t.disableAutoFocus,i=void 0!==r&&r,o=t.disableEnforceFocus,a=void 0!==o&&o,s=t.disableRestoreFocus,l=void 0!==s&&s,u=t.getTabbable,c=void 0===u?Au:u,d=t.isEnabled,v=void 0===d?Ru:d,m=t.open,g=e.useRef(),y=e.useRef(null),b=e.useRef(null),x=e.useRef(null),w=e.useRef(null),k=e.useRef(!1),S=e.useRef(null),O=(0,f.Z)(n.ref,S),C=e.useRef(null);e.useEffect((function(){m&&S.current&&(k.current=!i)}),[i,m]),e.useEffect((function(){if(m&&S.current){var e=(0,h.Z)(S.current);return S.current.contains(e.activeElement)||(S.current.hasAttribute("tabIndex")||S.current.setAttribute("tabIndex",-1),k.current&&S.current.focus()),function(){l||(x.current&&x.current.focus&&(g.current=!0,x.current.focus()),x.current=null)}}}),[m]),e.useEffect((function(){if(m&&S.current){var e=(0,h.Z)(S.current),t=function(t){var n=S.current;if(null!==n)if(e.hasFocus()&&!a&&v()&&!g.current){if(!n.contains(e.activeElement)){if(t&&w.current!==t.target||e.activeElement!==w.current)w.current=null;else if(null!==w.current)return;if(!k.current)return;var r=[];if(e.activeElement!==y.current&&e.activeElement!==b.current||(r=c(S.current)),r.length>0){var i,o,s=Boolean((null==(i=C.current)?void 0:i.shiftKey)&&"Tab"===(null==(o=C.current)?void 0:o.key)),l=r[0],u=r[r.length-1];s?u.focus():l.focus()}else n.focus()}}else g.current=!1},n=function(t){C.current=t,!a&&v()&&"Tab"===t.key&&e.activeElement===S.current&&t.shiftKey&&(g.current=!0,b.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",n,!0);var r=setInterval((function(){"BODY"===e.activeElement.tagName&&t()}),50);return function(){clearInterval(r),e.removeEventListener("focusin",t),e.removeEventListener("keydown",n,!0)}}}),[i,a,l,v,m,c]);var M=function(e){null===x.current&&(x.current=e.relatedTarget),k.current=!0};return(0,p.jsxs)(e.Fragment,{children:[(0,p.jsx)("div",{tabIndex:0,onFocus:M,ref:y,"data-test":"sentinelStart"}),e.cloneElement(n,{ref:O,onFocus:function(e){null===x.current&&(x.current=e.relatedTarget),k.current=!0,w.current=e.target;var t=n.props.onFocus;t&&t(e)}}),(0,p.jsx)("div",{tabIndex:0,onFocus:M,ref:b,"data-test":"sentinelEnd"})]})};function ju(e){return(0,q.Z)("MuiModal",e)}(0,U.Z)("MuiModal",["root","hidden"]);var _u=["BackdropComponent","BackdropProps","children","classes","className","closeAfterTransition","component","components","componentsProps","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","theme","onTransitionEnter","onTransitionExited"];var Nu=new Eu,Lu=e.forwardRef((function(t,n){var i=t.BackdropComponent,s=t.BackdropProps,l=t.children,v=t.classes,m=t.className,g=t.closeAfterTransition,y=void 0!==g&&g,b=t.component,x=void 0===b?"div":b,w=t.components,k=void 0===w?{}:w,S=t.componentsProps,O=void 0===S?{}:S,C=t.container,M=t.disableAutoFocus,P=void 0!==M&&M,T=t.disableEnforceFocus,E=void 0!==T&&T,Z=t.disableEscapeKeyDown,A=void 0!==Z&&Z,R=t.disablePortal,D=void 0!==R&&R,j=t.disableRestoreFocus,_=void 0!==j&&j,N=t.disableScrollLock,L=void 0!==N&&N,I=t.hideBackdrop,z=void 0!==I&&I,B=t.keepMounted,F=void 0!==B&&B,$=t.manager,W=void 0===$?Nu:$,H=t.onBackdropClick,V=t.onClose,q=t.onKeyDown,U=t.open,Q=t.theme,X=t.onTransitionEnter,Y=t.onTransitionExited,G=(0,o.Z)(t,_u),K=e.useState(!0),J=(0,r.Z)(K,2),ee=J[0],te=J[1],ne=e.useRef({}),re=e.useRef(null),ie=e.useRef(null),oe=(0,f.Z)(ie,n),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(t),se=function(){return ne.current.modalRef=ie.current,ne.current.mountNode=re.current,ne.current},le=function(){W.mount(se(),{disableScrollLock:L}),ie.current.scrollTop=0},ue=(0,d.Z)((function(){var e=function(e){return"function"===typeof e?e():e}(C)||(0,h.Z)(re.current).body;W.add(se(),e),ie.current&&le()})),ce=e.useCallback((function(){return W.isTopModal(se())}),[W]),fe=(0,d.Z)((function(e){re.current=e,e&&(U&&ce()?le():Ou(ie.current,!0))})),de=e.useCallback((function(){W.remove(se())}),[W]);e.useEffect((function(){return function(){de()}}),[de]),e.useEffect((function(){U?ue():ae&&y||de()}),[U,de,ae,y,ue]);var he=(0,a.Z)({},t,{classes:v,closeAfterTransition:y,disableAutoFocus:P,disableEnforceFocus:E,disableEscapeKeyDown:A,disablePortal:D,disableRestoreFocus:_,disableScrollLock:L,exited:ee,hideBackdrop:z,keepMounted:F}),pe=function(e){var t=e.open,n=e.exited,r=e.classes,i={root:["root",!t&&n&&"hidden"]};return(0,c.Z)(i,ju,r)}(he);if(!F&&!U&&(!ae||ee))return null;var ve={};void 0===l.props.tabIndex&&(ve.tabIndex="-1"),ae&&(ve.onEnter=(0,yu.Z)((function(){te(!1),X&&X()}),l.props.onEnter),ve.onExited=(0,yu.Z)((function(){te(!0),Y&&Y(),y&&de()}),l.props.onExited));var me=k.Root||x,ge=O.root||{};return(0,p.jsx)(xu,{ref:fe,container:C,disablePortal:D,children:(0,p.jsxs)(me,(0,a.Z)({role:"presentation"},ge,!$s(me)&&{as:x,ownerState:(0,a.Z)({},he,ge.ownerState),theme:Q},G,{ref:oe,onKeyDown:function(e){q&&q(e),"Escape"===e.key&&ce()&&(A||(e.stopPropagation(),V&&V(e,"escapeKeyDown")))},className:(0,u.default)(pe.root,ge.className,m),children:[!z&&i?(0,p.jsx)(i,(0,a.Z)({open:U,onClick:function(e){e.target===e.currentTarget&&(H&&H(e),V&&V(e,"backdropClick"))}},s)):null,(0,p.jsx)(Du,{disableEnforceFocus:E,disableAutoFocus:P,disableRestoreFocus:_,isEnabled:ce,open:U,children:e.cloneElement(l,ve)})]}))})})),Iu=Lu;function zu(e){return(0,q.Z)("MuiBackdrop",e)}(0,U.Z)("MuiBackdrop",["root","invisible"]);var Bu=["classes","className","invisible","component","components","componentsProps","theme"],Fu=e.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.invisible,s=void 0!==i&&i,l=e.component,f=void 0===l?"div":l,d=e.components,h=void 0===d?{}:d,v=e.componentsProps,m=void 0===v?{}:v,g=e.theme,y=(0,o.Z)(e,Bu),b=(0,a.Z)({},e,{classes:n,invisible:s}),x=function(e){var t=e.classes,n={root:["root",e.invisible&&"invisible"]};return(0,c.Z)(n,zu,t)}(b),w=h.Root||f,k=m.root||{};return(0,p.jsx)(w,(0,a.Z)({"aria-hidden":!0},k,!$s(w)&&{as:f,ownerState:(0,a.Z)({},b,k.ownerState),theme:g},{ref:t},y,{className:(0,u.default)(x.root,k.className,r)}))})),$u=Fu,Wu=["children","components","componentsProps","className","invisible","open","transitionDuration","TransitionComponent"],Hu=(0,g.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.invisible&&t.invisible]}})((function(e){var t=e.ownerState;return(0,a.Z)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})})),Vu=e.forwardRef((function(e,t){var n,r=(0,w.Z)({props:e,name:"MuiBackdrop"}),i=r.children,s=r.components,l=void 0===s?{}:s,u=r.componentsProps,c=void 0===u?{}:u,f=r.className,d=r.invisible,h=void 0!==d&&d,v=r.open,m=r.transitionDuration,g=r.TransitionComponent,y=void 0===g?Ht:g,b=(0,o.Z)(r,Wu),x=function(e){return e.classes}((0,a.Z)({},r,{invisible:h}));return(0,p.jsx)(y,(0,a.Z)({in:v,timeout:m},b,{children:(0,p.jsx)($u,{className:f,invisible:h,components:(0,a.Z)({Root:Hu},l),componentsProps:{root:(0,a.Z)({},c.root,(!l.Root||!$s(l.Root))&&{ownerState:(0,a.Z)({},null==(n=c.root)?void 0:n.ownerState)})},classes:x,ref:t,children:i})}))})),qu=Vu,Uu=["BackdropComponent","closeAfterTransition","children","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted"],Qu=(0,g.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,!n.open&&n.exited&&t.hidden]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({position:"fixed",zIndex:t.zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),Xu=(0,g.ZP)(qu,{name:"MuiModal",slot:"Backdrop",overridesResolver:function(e,t){return t.backdrop}})({zIndex:-1}),Yu=e.forwardRef((function(t,n){var i,s=(0,w.Z)({name:"MuiModal",props:t}),l=s.BackdropComponent,u=void 0===l?Xu:l,c=s.closeAfterTransition,f=void 0!==c&&c,d=s.children,h=s.components,v=void 0===h?{}:h,m=s.componentsProps,g=void 0===m?{}:m,y=s.disableAutoFocus,b=void 0!==y&&y,x=s.disableEnforceFocus,k=void 0!==x&&x,S=s.disableEscapeKeyDown,O=void 0!==S&&S,C=s.disablePortal,M=void 0!==C&&C,P=s.disableRestoreFocus,T=void 0!==P&&P,E=s.disableScrollLock,Z=void 0!==E&&E,A=s.hideBackdrop,R=void 0!==A&&A,D=s.keepMounted,j=void 0!==D&&D,_=(0,o.Z)(s,Uu),N=e.useState(!0),L=(0,r.Z)(N,2),I=L[0],z=L[1],B={closeAfterTransition:f,disableAutoFocus:b,disableEnforceFocus:k,disableEscapeKeyDown:O,disablePortal:M,disableRestoreFocus:T,disableScrollLock:Z,hideBackdrop:R,keepMounted:j},F=function(e){return e.classes}((0,a.Z)({},s,B,{exited:I}));return(0,p.jsx)(Iu,(0,a.Z)({components:(0,a.Z)({Root:Qu},v),componentsProps:{root:(0,a.Z)({},g.root,(!v.Root||!$s(v.Root))&&{ownerState:(0,a.Z)({},null==(i=g.root)?void 0:i.ownerState)})},BackdropComponent:u,onTransitionEnter:function(){return z(!1)},onTransitionExited:function(){return z(!0)},ref:n},_,{classes:F},B,{children:d}))})),Gu=Yu;function Ku(e){return(0,q.Z)("MuiPopover",e)}(0,U.Z)("MuiPopover",["root","paper"]);var Ju=["onEntering"],ec=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function tc(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function nc(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function rc(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function ic(e){return"function"===typeof e?e():e}var oc=(0,g.ZP)(Gu,{name:"MuiPopover",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),ac=(0,g.ZP)(J,{name:"MuiPopover",slot:"Paper",overridesResolver:function(e,t){return t.paper}})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),sc=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiPopover"}),i=r.action,s=r.anchorEl,l=r.anchorOrigin,f=void 0===l?{vertical:"top",horizontal:"left"}:l,d=r.anchorPosition,h=r.anchorReference,v=void 0===h?"anchorEl":h,m=r.children,g=r.className,y=r.container,b=r.elevation,x=void 0===b?8:b,k=r.marginThreshold,S=void 0===k?16:k,O=r.open,C=r.PaperProps,M=void 0===C?{}:C,P=r.transformOrigin,T=void 0===P?{vertical:"top",horizontal:"left"}:P,E=r.TransitionComponent,Z=void 0===E?H:E,A=r.transitionDuration,R=void 0===A?"auto":A,D=r.TransitionProps,j=(D=void 0===D?{}:D).onEntering,_=(0,o.Z)(r.TransitionProps,Ju),N=(0,o.Z)(r,ec),L=e.useRef(),I=(0,z.Z)(L,M.ref),B=(0,a.Z)({},r,{anchorOrigin:f,anchorReference:v,elevation:x,marginThreshold:S,PaperProps:M,transformOrigin:T,TransitionComponent:Z,transitionDuration:R,TransitionProps:_}),F=function(e){var t=e.classes;return(0,c.Z)({root:["root"],paper:["paper"]},Ku,t)}(B),$=e.useCallback((function(){if("anchorPosition"===v)return d;var e=ic(s),t=(e&&1===e.nodeType?e:(0,eu.Z)(L.current).body).getBoundingClientRect();return{top:t.top+tc(t,f.vertical),left:t.left+nc(t,f.horizontal)}}),[s,f.horizontal,f.vertical,d,v]),W=e.useCallback((function(e){return{vertical:tc(e,T.vertical),horizontal:nc(e,T.horizontal)}}),[T.horizontal,T.vertical]),V=e.useCallback((function(e){var t={width:e.offsetWidth,height:e.offsetHeight},n=W(t);if("none"===v)return{top:null,left:null,transformOrigin:rc(n)};var r=$(),i=r.top-n.vertical,o=r.left-n.horizontal,a=i+t.height,l=o+t.width,u=(0,gu.Z)(ic(s)),c=u.innerHeight-S,f=u.innerWidth-S;if(i<S){var d=i-S;i-=d,n.vertical+=d}else if(a>c){var h=a-c;i-=h,n.vertical+=h}if(o<S){var p=o-S;o-=p,n.horizontal+=p}else if(l>f){var m=l-f;o-=m,n.horizontal+=m}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(o),"px"),transformOrigin:rc(n)}}),[s,v,$,W,S]),q=e.useCallback((function(){var e=L.current;if(e){var t=V(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[V]);e.useEffect((function(){O&&q()})),e.useImperativeHandle(i,(function(){return O?{updatePosition:function(){q()}}:null}),[O,q]),e.useEffect((function(){if(O){var e=(0,mu.Z)((function(){q()})),t=(0,gu.Z)(s);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}}),[s,O,q]);var U=R;"auto"!==R||Z.muiSupportAuto||(U=void 0);var Q=y||(s?(0,eu.Z)(ic(s)).body:void 0);return(0,p.jsx)(oc,(0,a.Z)({BackdropProps:{invisible:!0},className:(0,u.default)(F.root,g),container:Q,open:O,ref:n,ownerState:B},N,{children:(0,p.jsx)(Z,(0,a.Z)({appear:!0,in:O,onEntering:function(e,t){j&&j(e,t),q()},timeout:U},_,{children:(0,p.jsx)(ac,(0,a.Z)({elevation:x},M,{ref:I,className:(0,u.default)(F.paper,M.className),children:m}))}))}))})),lc=sc;function uc(e){return(0,q.Z)("MuiMenu",e)}(0,U.Z)("MuiMenu",["root","paper","list"]);var cc=["onEntering"],fc=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],dc={vertical:"top",horizontal:"right"},hc={vertical:"top",horizontal:"left"},pc=(0,g.ZP)(lc,{shouldForwardProp:function(e){return(0,g.FO)(e)||"classes"===e},name:"MuiMenu",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),vc=(0,g.ZP)(J,{name:"MuiMenu",slot:"Paper",overridesResolver:function(e,t){return t.paper}})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),mc=(0,g.ZP)(vu,{name:"MuiMenu",slot:"List",overridesResolver:function(e,t){return t.list}})({outline:0}),gc=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiMenu"}),i=r.autoFocus,s=void 0===i||i,l=r.children,f=r.disableAutoFocusItem,d=void 0!==f&&f,h=r.MenuListProps,v=void 0===h?{}:h,m=r.onClose,g=r.open,y=r.PaperProps,b=void 0===y?{}:y,k=r.PopoverClasses,S=r.transitionDuration,O=void 0===S?"auto":S,C=r.TransitionProps,M=(C=void 0===C?{}:C).onEntering,P=r.variant,T=void 0===P?"selectedMenu":P,E=(0,o.Z)(r.TransitionProps,cc),Z=(0,o.Z)(r,fc),A=x(),R="rtl"===A.direction,D=(0,a.Z)({},r,{autoFocus:s,disableAutoFocusItem:d,MenuListProps:v,onEntering:M,PaperProps:b,transitionDuration:O,TransitionProps:E,variant:T}),j=function(e){var t=e.classes;return(0,c.Z)({root:["root"],paper:["paper"],list:["list"]},uc,t)}(D),_=s&&!d&&g,N=e.useRef(null),L=-1;return e.Children.map(l,(function(t,n){e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===T&&t.props.selected||-1===L)&&(L=n))})),(0,p.jsx)(pc,(0,a.Z)({classes:k,onClose:m,anchorOrigin:{vertical:"bottom",horizontal:R?"right":"left"},transformOrigin:R?dc:hc,PaperProps:(0,a.Z)({component:vc},b,{classes:(0,a.Z)({},b.classes,{root:j.paper})}),className:j.root,open:g,ref:n,transitionDuration:O,TransitionProps:(0,a.Z)({onEntering:function(e,t){N.current&&N.current.adjustStyleForScrollbar(e,A),M&&M(e,t)}},E),ownerState:D},Z,{children:(0,p.jsx)(mc,(0,a.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),m&&m(e,"tabKeyDown"))},actions:N,autoFocus:s&&(-1===L||d),autoFocusItem:_,variant:T},v,{className:(0,u.default)(j.list,v.className),children:l}))}))})),yc=gc;function bc(e){return(0,q.Z)("MuiNativeSelect",e)}var xc=(0,U.Z)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),wc=["className","disabled","IconComponent","inputRef","variant"],kc=function(e){var t,n=e.ownerState,r=e.theme;return(0,a.Z)((t={MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{backgroundColor:"light"===r.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"}},(0,i.Z)(t,"&.".concat(xc.disabled),{cursor:"default"}),(0,i.Z)(t,"&[multiple]",{height:"auto"}),(0,i.Z)(t,"&:not([multiple]) option, &:not([multiple]) optgroup",{backgroundColor:r.palette.background.paper}),(0,i.Z)(t,"&&&",{paddingRight:24,minWidth:16}),t),"filled"===n.variant&&{"&&&":{paddingRight:32}},"outlined"===n.variant&&{borderRadius:r.shape.borderRadius,"&:focus":{borderRadius:r.shape.borderRadius},"&&&":{paddingRight:32}})},Sc=(0,g.ZP)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:g.FO,overridesResolver:function(e,t){var n=e.ownerState;return[t.select,t[n.variant],(0,i.Z)({},"&.".concat(xc.multiple),t.multiple)]}})(kc),Oc=function(e){var t=e.ownerState,n=e.theme;return(0,a.Z)((0,i.Z)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:n.palette.action.active},"&.".concat(xc.disabled),{color:n.palette.action.disabled}),t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},Cc=(0,g.ZP)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:function(e,t){var n=e.ownerState;return[t.icon,n.variant&&t["icon".concat((0,O.Z)(n.variant))],n.open&&t.iconOpen]}})(Oc),Mc=e.forwardRef((function(t,n){var r=t.className,i=t.disabled,s=t.IconComponent,l=t.inputRef,f=t.variant,d=void 0===f?"standard":f,h=(0,o.Z)(t,wc),v=(0,a.Z)({},t,{disabled:i,variant:d}),m=function(e){var t=e.classes,n=e.variant,r=e.disabled,i=e.multiple,o=e.open,a={select:["select",n,r&&"disabled",i&&"multiple"],icon:["icon","icon".concat((0,O.Z)(n)),o&&"iconOpen",r&&"disabled"]};return(0,c.Z)(a,bc,t)}(v);return(0,p.jsxs)(e.Fragment,{children:[(0,p.jsx)(Sc,(0,a.Z)({ownerState:v,className:(0,u.default)(m.select,r),disabled:i,ref:l||n},h)),t.multiple?null:(0,p.jsx)(Cc,{as:s,ownerState:v,className:m.icon})]})})),Pc=Mc,Tc=n(522);function Ec(e){return(0,q.Z)("MuiSelect",e)}var Zc=(0,U.Z)("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),Ac=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Rc=(0,g.ZP)("div",{name:"MuiSelect",slot:"Select",overridesResolver:function(e,t){var n=e.ownerState;return[(0,i.Z)({},"&.".concat(Zc.select),t.select),(0,i.Z)({},"&.".concat(Zc.select),t[n.variant]),(0,i.Z)({},"&.".concat(Zc.multiple),t.multiple)]}})(kc,(0,i.Z)({},"&.".concat(Zc.select),{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"})),Dc=(0,g.ZP)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:function(e,t){var n=e.ownerState;return[t.icon,n.variant&&t["icon".concat((0,O.Z)(n.variant))],n.open&&t.iconOpen]}})(Oc),jc=(0,g.ZP)("input",{shouldForwardProp:function(e){return(0,g.Dz)(e)&&"classes"!==e},name:"MuiSelect",slot:"NativeInput",overridesResolver:function(e,t){return t.nativeInput}})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function _c(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function Nc(e){return null==e||"string"===typeof e&&!e.trim()}var Lc,Ic,zc=e.forwardRef((function(t,n){var i=t["aria-describedby"],s=t["aria-label"],l=t.autoFocus,f=t.autoWidth,d=t.children,h=t.className,v=t.defaultValue,m=t.disabled,g=t.displayEmpty,y=t.IconComponent,b=t.inputRef,x=t.labelId,w=t.MenuProps,k=void 0===w?{}:w,S=t.multiple,C=t.name,M=t.onBlur,P=t.onChange,T=t.onClose,E=t.onFocus,Z=t.onOpen,A=t.open,R=t.readOnly,D=t.renderValue,j=t.SelectDisplayProps,_=void 0===j?{}:j,N=t.tabIndex,L=t.value,I=t.variant,B=void 0===I?"standard":I,F=(0,o.Z)(t,Ac),$=(0,Tc.Z)({controlled:L,default:v,name:"Select"}),W=(0,r.Z)($,2),H=W[0],V=W[1],q=e.useRef(null),U=e.useRef(null),Q=e.useState(null),X=(0,r.Z)(Q,2),Y=X[0],G=X[1],K=e.useRef(null!=A).current,J=e.useState(),ee=(0,r.Z)(J,2),te=ee[0],ne=ee[1],re=e.useState(!1),ie=(0,r.Z)(re,2),oe=ie[0],ae=ie[1],se=(0,z.Z)(n,b),le=e.useCallback((function(e){U.current=e,e&&G(e)}),[]);e.useImperativeHandle(se,(function(){return{focus:function(){U.current.focus()},node:q.current,value:H}}),[H]),e.useEffect((function(){l&&U.current.focus()}),[l]),e.useEffect((function(){var e=(0,eu.Z)(U.current).getElementById(x);if(e){var t=function(){getSelection().isCollapsed&&U.current.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}),[x]);var ue,ce,fe=function(e,t){e?Z&&Z(t):T&&T(t),K||(ne(f?null:Y.clientWidth),ae(e))},de=e.Children.toArray(d),he=function(e){return function(t){var n;if(t.currentTarget.hasAttribute("tabindex")){if(S){n=Array.isArray(H)?H.slice():[];var r=H.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),H!==n&&(V(n),P)){var i=t.nativeEvent||t,o=new i.constructor(i.type,i);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:C}}),P(o,e)}S||fe(!1,t)}}},pe=null!==Y&&(K?A:oe);delete F["aria-invalid"];var ve=[],me=!1;(Qs({value:H})||g)&&(D?ue=D(H):me=!0);var ge=de.map((function(t){if(!e.isValidElement(t))return null;var n;if(S){if(!Array.isArray(H))throw new Error((0,Ds.Z)(2));(n=H.some((function(e){return _c(e,t.props.value)})))&&me&&ve.push(t.props.children)}else(n=_c(H,t.props.value))&&me&&(ce=t.props.children);return n&&!0,e.cloneElement(t,{"aria-selected":n?"true":"false",onClick:he(t),onKeyUp:function(e){" "===e.key&&e.preventDefault(),t.props.onKeyUp&&t.props.onKeyUp(e)},role:"option",selected:n,value:void 0,"data-value":t.props.value})}));me&&(ue=S?0===ve.length?null:ve.reduce((function(e,t,n){return e.push(t),n<ve.length-1&&e.push(", "),e}),[]):ce);var ye,be=te;!f&&K&&Y&&(be=Y.clientWidth),ye="undefined"!==typeof N?N:m?null:0;var xe=_.id||(C?"mui-component-select-".concat(C):void 0),we=(0,a.Z)({},t,{variant:B,value:H,open:pe}),ke=function(e){var t=e.classes,n=e.variant,r=e.disabled,i=e.multiple,o=e.open,a={select:["select",n,r&&"disabled",i&&"multiple"],icon:["icon","icon".concat((0,O.Z)(n)),o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,c.Z)(a,Ec,t)}(we);return(0,p.jsxs)(e.Fragment,{children:[(0,p.jsx)(Rc,(0,a.Z)({ref:le,tabIndex:ye,role:"button","aria-disabled":m?"true":void 0,"aria-expanded":pe?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[x,xe].filter(Boolean).join(" ")||void 0,"aria-describedby":i,onKeyDown:function(e){if(!R){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),fe(!0,e))}},onMouseDown:m||R?null:function(e){0===e.button&&(e.preventDefault(),U.current.focus(),fe(!0,e))},onBlur:function(e){!pe&&M&&(Object.defineProperty(e,"target",{writable:!0,value:{value:H,name:C}}),M(e))},onFocus:E},_,{ownerState:we,className:(0,u.default)(ke.select,h,_.className),id:xe,children:Nc(ue)?(0,p.jsx)("span",{className:"notranslate",dangerouslySetInnerHTML:{__html:"&#8203;"}}):ue})),(0,p.jsx)(jc,(0,a.Z)({value:Array.isArray(H)?H.join(","):H,name:C,ref:q,"aria-hidden":!0,onChange:function(e){var t=de.map((function(e){return e.props.value})).indexOf(e.target.value);if(-1!==t){var n=de[t];V(n.props.value),P&&P(e,n)}},tabIndex:-1,disabled:m,className:ke.nativeInput,autoFocus:l,ownerState:we},F)),(0,p.jsx)(Dc,{as:y,className:ke.icon,ownerState:we}),(0,p.jsx)(yc,(0,a.Z)({id:"menu-".concat(C||""),anchorEl:Y,open:pe,onClose:function(e){fe(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},k,{MenuListProps:(0,a.Z)({"aria-labelledby":x,role:"listbox",disableListWrap:!0},k.MenuListProps),PaperProps:(0,a.Z)({},k.PaperProps,{style:(0,a.Z)({minWidth:be},null!=k.PaperProps?k.PaperProps.style:null)}),children:ge}))]})})),Bc=zc,Fc=(0,ht.Z)((0,p.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),$c=["autoWidth","children","classes","className","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Wc=e.forwardRef((function(t,n){var r=(0,w.Z)({name:"MuiSelect",props:t}),i=r.autoWidth,s=void 0!==i&&i,l=r.children,c=r.classes,f=void 0===c?{}:c,d=r.className,h=r.displayEmpty,v=void 0!==h&&h,m=r.IconComponent,g=void 0===m?Fc:m,y=r.id,b=r.input,x=r.inputProps,k=r.label,S=r.labelId,O=r.MenuProps,C=r.multiple,M=void 0!==C&&C,P=r.native,T=void 0!==P&&P,E=r.onClose,Z=r.onOpen,A=r.open,R=r.renderValue,D=r.SelectDisplayProps,j=r.variant,_=void 0===j?"outlined":j,N=(0,o.Z)(r,$c),L=T?Pc:Bc,I=Ws({props:r,muiFormControl:ys(),states:["variant"]}).variant||_,B=b||{standard:Lc||(Lc=(0,p.jsx)(fl,{})),outlined:(0,p.jsx)(El,{label:k}),filled:Ic||(Ic=(0,p.jsx)(yl,{}))}[I],F=function(e){return e.classes}((0,a.Z)({},r,{classes:f})),$=(0,z.Z)(n,B.ref);return e.cloneElement(B,(0,a.Z)({inputComponent:L,inputProps:(0,a.Z)({children:l,IconComponent:g,variant:I,type:void 0,multiple:M},T?{id:y}:{autoWidth:s,displayEmpty:v,labelId:S,MenuProps:O,onClose:E,onOpen:Z,open:A,renderValue:R,SelectDisplayProps:(0,a.Z)({id:y},D)},x,{classes:x?(0,At.Z)(F,x.classes):F},b?b.props.inputProps:{})},M&&T&&"outlined"===I?{notched:!0}:{},{ref:$,className:(0,u.default)(B.props.className,d)},N))}));Wc.muiName="Select";var Hc=Wc;function Vc(e){return(0,q.Z)("MuiTextField",e)}(0,U.Z)("MuiTextField",["root"]);var qc=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Uc={standard:fl,filled:yl,outlined:El},Qc=(0,g.ZP)(Ul,{name:"MuiTextField",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),Xc=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiTextField"}),r=n.autoComplete,i=n.autoFocus,s=void 0!==i&&i,l=n.children,f=n.className,d=n.color,h=void 0===d?"primary":d,v=n.defaultValue,m=n.disabled,g=void 0!==m&&m,y=n.error,b=void 0!==y&&y,x=n.FormHelperTextProps,k=n.fullWidth,S=void 0!==k&&k,O=n.helperText,C=n.id,M=n.InputLabelProps,P=n.inputProps,T=n.InputProps,E=n.inputRef,Z=n.label,A=n.maxRows,R=n.minRows,D=n.multiline,j=void 0!==D&&D,_=n.name,N=n.onBlur,L=n.onChange,I=n.onFocus,z=n.placeholder,B=n.required,F=void 0!==B&&B,$=n.rows,W=n.select,H=void 0!==W&&W,V=n.SelectProps,q=n.type,U=n.value,Q=n.variant,X=void 0===Q?"outlined":Q,Y=(0,o.Z)(n,qc),G=(0,a.Z)({},n,{autoFocus:s,color:h,disabled:g,error:b,fullWidth:S,multiline:j,required:F,select:H,variant:X}),K=function(e){var t=e.classes;return(0,c.Z)({root:["root"]},Vc,t)}(G);var J={};"outlined"===X&&(M&&"undefined"!==typeof M.shrink&&(J.notched=M.shrink),J.label=Z),H&&(V&&V.native||(J.id=void 0),J["aria-describedby"]=void 0);var ee=(0,Rs.Z)(C),te=O&&ee?"".concat(ee,"-helper-text"):void 0,ne=Z&&ee?"".concat(ee,"-label"):void 0,re=Uc[X],ie=(0,p.jsx)(re,(0,a.Z)({"aria-describedby":te,autoComplete:r,autoFocus:s,defaultValue:v,fullWidth:S,multiline:j,name:_,rows:$,maxRows:A,minRows:R,type:q,value:U,id:ee,inputRef:E,onBlur:N,onChange:L,onFocus:I,placeholder:z,inputProps:P},J,T));return(0,p.jsxs)(Qc,(0,a.Z)({className:(0,u.default)(K.root,f),disabled:g,error:b,fullWidth:S,ref:t,required:F,color:h,variant:X,ownerState:G},Y,{children:[Z&&(0,p.jsx)(Fl,(0,a.Z)({htmlFor:ee,id:ne},M,{children:Z})),H?(0,p.jsx)(Hc,(0,a.Z)({"aria-describedby":te,id:ee,labelId:ne,value:U,input:ie},V,{children:l})):ie,O&&(0,p.jsx)(Jl,(0,a.Z)({id:te},x,{children:O}))]}))})),Yc=Xc,Gc=n(936),Kc=n.n(Gc);function Jc(e){return(0,q.Z)("PrivateSwitchBase",e)}(0,U.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var ef=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],tf=(0,g.ZP)(ot,{skipSx:!0})((function(e){var t=e.ownerState;return(0,a.Z)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),nf=(0,g.ZP)("input",{skipSx:!0})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),rf=e.forwardRef((function(e,t){var n=e.autoFocus,i=e.checked,s=e.checkedIcon,l=e.className,f=e.defaultChecked,d=e.disabled,h=e.disableFocusRipple,v=void 0!==h&&h,m=e.edge,g=void 0!==m&&m,y=e.icon,b=e.id,x=e.inputProps,w=e.inputRef,k=e.name,S=e.onBlur,C=e.onChange,M=e.onFocus,P=e.readOnly,T=e.required,E=e.tabIndex,Z=e.type,A=e.value,R=(0,o.Z)(e,ef),D=(0,Tc.Z)({controlled:i,default:Boolean(f),name:"SwitchBase",state:"checked"}),j=(0,r.Z)(D,2),_=j[0],N=j[1],L=ys(),I=d;L&&"undefined"===typeof I&&(I=L.disabled);var z="checkbox"===Z||"radio"===Z,B=(0,a.Z)({},e,{checked:_,disabled:I,disableFocusRipple:v,edge:g}),F=function(e){var t=e.classes,n=e.checked,r=e.disabled,i=e.edge,o={root:["root",n&&"checked",r&&"disabled",i&&"edge".concat((0,O.Z)(i))],input:["input"]};return(0,c.Z)(o,Jc,t)}(B);return(0,p.jsxs)(tf,(0,a.Z)({component:"span",className:(0,u.default)(F.root,l),centerRipple:!0,focusRipple:!v,disabled:I,tabIndex:null,role:void 0,onFocus:function(e){M&&M(e),L&&L.onFocus&&L.onFocus(e)},onBlur:function(e){S&&S(e),L&&L.onBlur&&L.onBlur(e)},ownerState:B,ref:t},R,{children:[(0,p.jsx)(nf,(0,a.Z)({autoFocus:n,checked:i,defaultChecked:f,className:F.input,disabled:I,id:z&&b,name:k,onChange:function(e){if(!e.nativeEvent.defaultPrevented){var t=e.target.checked;N(t),C&&C(e,t)}},readOnly:P,ref:w,required:T,ownerState:B,tabIndex:E,type:Z},"checkbox"===Z&&void 0===A?{}:{value:A},x)),_?s:y]}))})),of=rf;function af(e){return(0,q.Z)("MuiSwitch",e)}var sf=(0,U.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),lf=["className","color","edge","size","sx"],uf=(0,g.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.edge&&t["edge".concat((0,O.Z)(n.edge))],t["size".concat((0,O.Z)(n.size))]]}})((function(e){var t,n=e.ownerState;return(0,a.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===n.edge&&{marginLeft:-8},"end"===n.edge&&{marginRight:-8},"small"===n.size&&(t={width:40,height:24,padding:7},(0,i.Z)(t,"& .".concat(sf.thumb),{width:16,height:16}),(0,i.Z)(t,"& .".concat(sf.switchBase),(0,i.Z)({padding:4},"&.".concat(sf.checked),{transform:"translateX(16px)"})),t))})),cf=(0,g.ZP)(of,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:function(e,t){var n=e.ownerState;return[t.switchBase,(0,i.Z)({},"& .".concat(sf.input),t.input),"default"!==n.color&&t["color".concat((0,O.Z)(n.color))]]}})((function(e){var t,n=e.theme;return t={position:"absolute",top:0,left:0,zIndex:1,color:"light"===n.palette.mode?n.palette.common.white:n.palette.grey[300],transition:n.transitions.create(["left","transform"],{duration:n.transitions.duration.shortest})},(0,i.Z)(t,"&.".concat(sf.checked),{transform:"translateX(20px)"}),(0,i.Z)(t,"&.".concat(sf.disabled),{color:"light"===n.palette.mode?n.palette.grey[100]:n.palette.grey[600]}),(0,i.Z)(t,"&.".concat(sf.checked," + .").concat(sf.track),{opacity:.5}),(0,i.Z)(t,"&.".concat(sf.disabled," + .").concat(sf.track),{opacity:"light"===n.palette.mode?.12:.2}),(0,i.Z)(t,"& .".concat(sf.input),{left:"-100%",width:"300%"}),t}),(function(e){var t,n=e.theme,r=e.ownerState;return(0,a.Z)({"&:hover":{backgroundColor:(0,V.Fq)(n.palette.action.active,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&(t={},(0,i.Z)(t,"&.".concat(sf.checked),(0,i.Z)({color:n.palette[r.color].main,"&:hover":{backgroundColor:(0,V.Fq)(n.palette[r.color].main,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&.".concat(sf.disabled),{color:"light"===n.palette.mode?(0,V.$n)(n.palette[r.color].main,.62):(0,V._j)(n.palette[r.color].main,.55)})),(0,i.Z)(t,"&.".concat(sf.checked," + .").concat(sf.track),{backgroundColor:n.palette[r.color].main}),t))})),ff=(0,g.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:function(e,t){return t.track}})((function(e){var t=e.theme;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:"light"===t.palette.mode?t.palette.common.black:t.palette.common.white,opacity:"light"===t.palette.mode?.38:.3}})),df=(0,g.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:function(e,t){return t.thumb}})((function(e){return{boxShadow:e.theme.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}})),hf=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiSwitch"}),r=n.className,i=n.color,s=void 0===i?"primary":i,l=n.edge,f=void 0!==l&&l,d=n.size,h=void 0===d?"medium":d,v=n.sx,m=(0,o.Z)(n,lf),g=(0,a.Z)({},n,{color:s,edge:f,size:h}),y=function(e){var t=e.classes,n=e.edge,r=e.size,i=e.color,o=e.checked,s=e.disabled,l={root:["root",n&&"edge".concat((0,O.Z)(n)),"size".concat((0,O.Z)(r))],switchBase:["switchBase","color".concat((0,O.Z)(i)),o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=(0,c.Z)(l,af,t);return(0,a.Z)({},t,u)}(g),b=(0,p.jsx)(df,{className:y.thumb,ownerState:g});return(0,p.jsxs)(uf,{className:(0,u.default)(y.root,r),sx:v,ownerState:g,children:[(0,p.jsx)(cf,(0,a.Z)({type:"checkbox",icon:b,checkedIcon:b,ref:t,ownerState:g},m,{classes:(0,a.Z)({},y,{root:y.switchBase})})),(0,p.jsx)(ff,{className:y.track,ownerState:g})]})})),pf=hf,vf=(0,g.ZP)(pf)((function(){return{padding:10,"& .MuiSwitch-track":{borderRadius:14,"&:before, &:after":{content:'""',position:"absolute",top:"50%",transform:"translateY(-50%)",width:14,height:14}},"& .MuiSwitch-thumb":{boxShadow:"none",width:12,height:12,margin:4}}})),mf=function(){var t=Qa().yaxis,n=Xa(),r=(0,e.useMemo)((function(){return Object.keys(t.limits.range)}),[t.limits.range]),i=(0,e.useCallback)(Kc()((function(e,r,i){var o=t.limits.range;o[r][i]=+e.target.value,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n({type:"SET_YAXIS_LIMITS",payload:o})}),500),[t.limits.range]);return(0,p.jsxs)(zt,{display:"grid",alignItems:"center",gap:2,children:[(0,p.jsx)(As,{control:(0,p.jsx)(vf,{checked:t.limits.enable,onChange:function(){n({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),label:"Fix the limits for y-axis"}),(0,p.jsx)(zt,{display:"grid",alignItems:"center",gap:2,children:r.map((function(e){return(0,p.jsxs)(zt,{display:"grid",gridTemplateColumns:"120px 120px",gap:1,children:[(0,p.jsx)(Yc,{label:"Min ".concat(e),type:"number",size:"small",variant:"outlined",disabled:!t.limits.enable,defaultValue:t.limits.range[e][0],onChange:function(t){return i(t,e,0)}}),(0,p.jsx)(Yc,{label:"Max ".concat(e),type:"number",size:"small",variant:"outlined",disabled:!t.limits.enable,defaultValue:t.limits.range[e][1],onChange:function(t){return i(t,e,1)}})]},e)}))})]})},gf=n(9023);function yf(e){return(0,q.Z)("MuiButton",e)}var bf=(0,U.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","contained","containedInherit","containedPrimary","containedSecondary","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var xf=e.createContext({}),wf=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],kf=function(e){return(0,a.Z)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}})},Sf=(0,g.ZP)(ot,{shouldForwardProp:function(e){return(0,g.FO)(e)||"classes"===e},name:"MuiButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,O.Z)(n.color))],t["size".concat((0,O.Z)(n.size))],t["".concat(n.variant,"Size").concat((0,O.Z)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((function(e){var t,n=e.theme,r=e.ownerState;return(0,a.Z)({},n.typography.button,(t={minWidth:64,padding:"6px 16px",borderRadius:n.shape.borderRadius,transition:n.transitions.create(["background-color","box-shadow","border-color","color"],{duration:n.transitions.duration.short}),"&:hover":(0,a.Z)({textDecoration:"none",backgroundColor:(0,V.Fq)(n.palette.text.primary,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===r.variant&&"inherit"!==r.color&&{backgroundColor:(0,V.Fq)(n.palette[r.color].main,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===r.variant&&"inherit"!==r.color&&{border:"1px solid ".concat(n.palette[r.color].main),backgroundColor:(0,V.Fq)(n.palette[r.color].main,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===r.variant&&{backgroundColor:n.palette.grey.A100,boxShadow:n.shadows[4],"@media (hover: none)":{boxShadow:n.shadows[2],backgroundColor:n.palette.grey[300]}},"contained"===r.variant&&"inherit"!==r.color&&{backgroundColor:n.palette[r.color].dark,"@media (hover: none)":{backgroundColor:n.palette[r.color].main}}),"&:active":(0,a.Z)({},"contained"===r.variant&&{boxShadow:n.shadows[8]})},(0,i.Z)(t,"&.".concat(bf.focusVisible),(0,a.Z)({},"contained"===r.variant&&{boxShadow:n.shadows[6]})),(0,i.Z)(t,"&.".concat(bf.disabled),(0,a.Z)({color:n.palette.action.disabled},"outlined"===r.variant&&{border:"1px solid ".concat(n.palette.action.disabledBackground)},"outlined"===r.variant&&"secondary"===r.color&&{border:"1px solid ".concat(n.palette.action.disabled)},"contained"===r.variant&&{color:n.palette.action.disabled,boxShadow:n.shadows[0],backgroundColor:n.palette.action.disabledBackground})),t),"text"===r.variant&&{padding:"6px 8px"},"text"===r.variant&&"inherit"!==r.color&&{color:n.palette[r.color].main},"outlined"===r.variant&&{padding:"5px 15px",border:"1px solid ".concat("light"===n.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")},"outlined"===r.variant&&"inherit"!==r.color&&{color:n.palette[r.color].main,border:"1px solid ".concat((0,V.Fq)(n.palette[r.color].main,.5))},"contained"===r.variant&&{color:n.palette.getContrastText(n.palette.grey[300]),backgroundColor:n.palette.grey[300],boxShadow:n.shadows[2]},"contained"===r.variant&&"inherit"!==r.color&&{color:n.palette[r.color].contrastText,backgroundColor:n.palette[r.color].main},"inherit"===r.color&&{color:"inherit",borderColor:"currentColor"},"small"===r.size&&"text"===r.variant&&{padding:"4px 5px",fontSize:n.typography.pxToRem(13)},"large"===r.size&&"text"===r.variant&&{padding:"8px 11px",fontSize:n.typography.pxToRem(15)},"small"===r.size&&"outlined"===r.variant&&{padding:"3px 9px",fontSize:n.typography.pxToRem(13)},"large"===r.size&&"outlined"===r.variant&&{padding:"7px 21px",fontSize:n.typography.pxToRem(15)},"small"===r.size&&"contained"===r.variant&&{padding:"4px 10px",fontSize:n.typography.pxToRem(13)},"large"===r.size&&"contained"===r.variant&&{padding:"8px 22px",fontSize:n.typography.pxToRem(15)},r.fullWidth&&{width:"100%"})}),(function(e){var t;return e.ownerState.disableElevation&&(t={boxShadow:"none","&:hover":{boxShadow:"none"}},(0,i.Z)(t,"&.".concat(bf.focusVisible),{boxShadow:"none"}),(0,i.Z)(t,"&:active",{boxShadow:"none"}),(0,i.Z)(t,"&.".concat(bf.disabled),{boxShadow:"none"}),t)})),Of=(0,g.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:function(e,t){var n=e.ownerState;return[t.startIcon,t["iconSize".concat((0,O.Z)(n.size))]]}})((function(e){var t=e.ownerState;return(0,a.Z)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},kf(t))})),Cf=(0,g.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:function(e,t){var n=e.ownerState;return[t.endIcon,t["iconSize".concat((0,O.Z)(n.size))]]}})((function(e){var t=e.ownerState;return(0,a.Z)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},kf(t))})),Mf=e.forwardRef((function(t,n){var r=e.useContext(xf),i=(0,gf.Z)(r,t),s=(0,w.Z)({props:i,name:"MuiButton"}),l=s.children,f=s.color,d=void 0===f?"primary":f,h=s.component,v=void 0===h?"button":h,m=s.className,g=s.disabled,y=void 0!==g&&g,b=s.disableElevation,x=void 0!==b&&b,k=s.disableFocusRipple,S=void 0!==k&&k,C=s.endIcon,M=s.focusVisibleClassName,P=s.fullWidth,T=void 0!==P&&P,E=s.size,Z=void 0===E?"medium":E,A=s.startIcon,R=s.type,D=s.variant,j=void 0===D?"text":D,_=(0,o.Z)(s,wf),N=(0,a.Z)({},s,{color:d,component:v,disabled:y,disableElevation:x,disableFocusRipple:S,fullWidth:T,size:Z,type:R,variant:j}),L=function(e){var t=e.color,n=e.disableElevation,r=e.fullWidth,i=e.size,o=e.variant,s=e.classes,l={root:["root",o,"".concat(o).concat((0,O.Z)(t)),"size".concat((0,O.Z)(i)),"".concat(o,"Size").concat((0,O.Z)(i)),"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon","iconSize".concat((0,O.Z)(i))],endIcon:["endIcon","iconSize".concat((0,O.Z)(i))]},u=(0,c.Z)(l,yf,s);return(0,a.Z)({},s,u)}(N),I=A&&(0,p.jsx)(Of,{className:L.startIcon,ownerState:N,children:A}),z=C&&(0,p.jsx)(Cf,{className:L.endIcon,ownerState:N,children:C});return(0,p.jsxs)(Sf,(0,a.Z)({ownerState:N,className:(0,u.default)(m,r.className),component:v,disabled:y,focusRipple:!S,focusVisibleClassName:(0,u.default)(L.focusVisible,M),ref:n,type:R},_,{classes:L,children:[I,l,z]}))})),Pf=Mf,Tf=n(9461),Ef=n.n(Tf),Zf="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Af="object"===("undefined"===typeof window?"undefined":Zf(window))&&"object"===("undefined"===typeof document?"undefined":Zf(document))&&9===document.nodeType,Rf={}.constructor;function Df(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(Df);if(e.constructor!==Rf)return e;var t={};for(var n in e)t[n]=Df(e[n]);return t}function jf(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=Df(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var _f=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},Nf=function(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=_f(e[r]," ");else n=_f(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n};function Lf(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function If(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function zf(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=Lf(n),l=s.linebreak,u=s.space;if(e&&o++,a)if(Array.isArray(a))for(var c=0;c<a.length;c++){var f=a[c];for(var d in f){var h=f[d];null!=h&&(r&&(r+=l),r+=If(d+":"+u+Nf(h)+";",o))}}else for(var p in a){var v=a[p];null!=v&&(r&&(r+=l),r+=If(p+":"+u+Nf(v)+";",o))}for(var m in t){var g=t[m];null!=g&&"fallbacks"!==m&&(r&&(r+=l),r+=If(m+":"+u+Nf(g)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),If(""+e+u+"{"+r,--o)+If("}",o)):r}var Bf=/([[\].#*$><+~=|^:(),"'`\s])/g,Ff="undefined"!==typeof CSS&&CSS.escape,$f=function(e){return Ff?Ff(e):e.replace(Bf,"\\$1")},Wf=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),Hf=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(ye(ye(i)),s),i.selectorText="."+$f(i.id)),i}M(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=Nf(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,a.Z)({},e,{allowEmpty:!0}):e;return zf(this.selectorText,this.style,n)},Su(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(Wf),Vf={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new Hf(e,t,n)}},qf={indent:1,children:!0},Uf=/@([\w-]+)/,Qf=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(Uf);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new yd((0,a.Z)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=qf);var t=Lf(e).linebreak;if(null==e.indent&&(e.indent=qf.indent),null==e.children&&(e.children=qf.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),Xf=/@media|@supports\s+/,Yf={onCreateRule:function(e,t,n){return Xf.test(e)?new Qf(e,t,n):null}},Gf={indent:1,children:!0},Kf=/@keyframes\s+([\w-]+)/,Jf=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(Kf);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,s=n.generateId;for(var l in this.id=!1===i?this.name:$f(s(this,o)),this.rules=new yd((0,a.Z)({},n,{parent:this})),t)this.rules.add(l,t[l],(0,a.Z)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=Gf);var t=Lf(e).linebreak;if(null==e.indent&&(e.indent=Gf.indent),null==e.children&&(e.children=Gf.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),ed=/@keyframes\s+/,td=/\$([\w-]+)/g,nd=function(e,t){return"string"===typeof e?e.replace(td,(function(e,n){return n in t?t[n]:e})):e},rd=function(e,t,n){var r=e[t],i=nd(r,n);i!==r&&(e[t]=i)},id={onCreateRule:function(e,t,n){return"string"===typeof e&&ed.test(e)?new Jf(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&rd(e,"animation-name",n.keyframes),"animation"in e&&rd(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return nd(e,r.keyframes);default:return e}}},od=function(e){function t(){return e.apply(this,arguments)||this}return M(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,a.Z)({},e,{allowEmpty:!0}):e;return zf(this.key,this.style,n)},t}(Wf),ad={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new od(e,t,n):null}},sd=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=Lf(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=zf(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return zf(this.at,this.style,e)},e}(),ld=/@font-face/,ud={onCreateRule:function(e,t,n){return ld.test(e)?new sd(e,t,n):null}},cd=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return zf(this.key,this.style,e)},e}(),fd={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new cd(e,t,n):null}},dd=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),hd={"@charset":!0,"@import":!0,"@namespace":!0},pd={onCreateRule:function(e,t,n){return e in hd?new dd(e,t,n):null}},vd=[Vf,Yf,id,ad,ud,fd,pd],md={process:!0},gd={force:!0,process:!0},yd=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,s=r.jss,l=r.Renderer,u=r.generateId,c=r.scoped,f=(0,a.Z)({classes:this.classes,parent:i,sheet:o,jss:s,Renderer:l,generateId:u,scoped:c,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(f.selector="."+$f(this.classes[d]));var h=jf(d,t,f);if(!h)return null;this.register(h);var p=void 0===f.index?this.index.length:f.index;return this.index.splice(p,0,h),h},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=(0,a.Z)({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof Hf?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof Jf&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof Hf?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof Jf&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=md);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var u=t.style[l];u!==s[l]&&t.prop(l,u,gd)}for(var c in s){var f=t.style[c],d=s[c];null==f&&f!==d&&t.prop(c,null,gd)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=Lf(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),bd=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=(0,a.Z)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new yd(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),xd=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),wd=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,o.Z)(t,["attached"]),i=Lf(r).linebreak,a="",s=0;s<this.registry.length;s++){var l=this.registry[s];null!=n&&l.attached!==n||(a&&(a+=i),a+=l.toString(r))}return a},Su(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),kd=new wd,Sd="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof self&&self.Math===Math?self:Function("return this")(),Od="2f1acc6c3a606b082e5eef5e54414ffb";null==Sd[Od]&&(Sd[Od]=0);var Cd=Sd[Od]++,Md=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+Cd+i+t:o+n.key+"-"+Cd+(i?"-"+i:"")+"-"+t}},Pd=function(e){var t;return function(){return t||(t=e()),t}},Td=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}},Ed=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=Nf(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(i){return!1}return!0},Zd=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}},Ad=function(e,t){return e.selectorText=t,e.selectorText===t},Rd=Pd((function(){return document.querySelector("head")}));function Dd(e){var t=kd.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=Rd(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var jd=Pd((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),_d=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(r){return!1}return e.cssRules[n]},Nd=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},Ld=function(){function e(e){this.getPropertyValue=Td,this.setProperty=Ed,this.removeProperty=Zd,this.setSelector=Ad,this.hasInsertedRules=!1,this.cssRules=[],e&&kd.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=jd();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Dd(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else Rd().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=Nd(n,t);if(!1===(i=_d(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=Nd(n,t),l=_d(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof bd&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Id=0,zd=function(){function e(e){this.id=Id++,this.version="10.9.0",this.plugins=new xd,this.options={id:{minify:!1},createGenerateId:Md,Renderer:Af?Ld:null,plugins:[]},this.generateId=Md({minify:!1});for(var t=0;t<vd.length;t++)this.plugins.use(vd[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=(0,a.Z)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===kd.index?0:kd.index+1);var r=new bd(e,(0,a.Z)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),kd.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var r=(0,a.Z)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=jf(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),Bd=function(e){return new zd(e)},Fd="object"===typeof CSS&&null!=CSS&&"number"in CSS;function $d(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=$d(r);o&&(t||(t={}),t[n]=o)}}return t}Bd();function Wd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=(0,a.Z)({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}var Hd={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Vd=Hd,qd=n(201),Ud="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Qd=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Xd=Date.now(),Yd="fnValues"+Xd,Gd="fnStyle"+ ++Xd,Kd=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=jf(e,{},n);return r[Gd]=t,r},onProcessStyle:function(e,t){if(Yd in t||Gd in t)return e;var n={};for(var r in e){var i=e[r];"function"===typeof i&&(delete e[r],n[r]=i)}return t[Yd]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Gd];o&&(i.style=o(e)||{});var a=i[Yd];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},Jd="@global",eh="@global ",th=function(){function e(e,t,n){for(var r in this.type="global",this.at=Jd,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new yd((0,a.Z)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),nh=function(){function e(e,t,n){this.type="global",this.at=Jd,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(eh.length);this.rule=n.jss.createRule(r,t,(0,a.Z)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),rh=/\s*,\s*/g;function ih(e,t){for(var n=e.split(rh),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}var oh=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Jd)return new th(e,t,n);if("@"===e[0]&&e.substr(0,eh.length)===eh)return new nh(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[Jd]:null;if(i){for(var o in i)t.addRule(o,i[o],(0,a.Z)({},n,{selector:ih(o,e.selector)}));delete r[Jd]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,Jd.length)===Jd){var o=ih(i.substr(Jd.length),e.selector);t.addRule(o,r[i],(0,a.Z)({},n,{selector:o})),delete r[i]}}(e,t))}}},ah=/\s*,\s*/g,sh=/&/g,lh=/\$([\w-]+)/g;var uh=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(ah),r=e.split(ah),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(sh,a):a+" "+l}return i}function n(e,t,n){if(n)return(0,a.Z)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=(0,a.Z)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var s,l,u=i,c=u.options.parent;for(var f in r){var d=-1!==f.indexOf("&"),h="@"===f[0];if(d||h){if(s=n(u,c,s),d){var p=t(f,u.selector);l||(l=e(c,o)),p=p.replace(lh,l);var v=u.key+"-"+f;"replaceRule"in c?c.replaceRule(v,r[f],(0,a.Z)({},s,{selector:p})):c.addRule(v,r[f],(0,a.Z)({},s,{selector:p}))}else h&&c.addRule(f,{},s).addRule(u.key,r[f],{selector:u.selector});delete r[f]}}return r}}},ch=/[A-Z]/g,fh=/^ms-/,dh={};function hh(e){return"-"+e.toLowerCase()}var ph=function(e){if(dh.hasOwnProperty(e))return dh[e];var t=e.replace(ch,hh);return dh[e]=fh.test(t)?"-"+t:t};function vh(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:ph(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(vh):t.fallbacks=vh(e.fallbacks)),t}var mh=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=vh(e[t]);return e}return vh(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=ph(t);return t===r?e:(n.prop(r,e),null)}}},gh=Fd&&CSS?CSS.px:"px",yh=Fd&&CSS?CSS.ms:"ms",bh=Fd&&CSS?CSS.percent:"%";function xh(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var wh=xh({"animation-delay":yh,"animation-duration":yh,"background-position":gh,"background-position-x":gh,"background-position-y":gh,"background-size":gh,border:gh,"border-bottom":gh,"border-bottom-left-radius":gh,"border-bottom-right-radius":gh,"border-bottom-width":gh,"border-left":gh,"border-left-width":gh,"border-radius":gh,"border-right":gh,"border-right-width":gh,"border-top":gh,"border-top-left-radius":gh,"border-top-right-radius":gh,"border-top-width":gh,"border-width":gh,"border-block":gh,"border-block-end":gh,"border-block-end-width":gh,"border-block-start":gh,"border-block-start-width":gh,"border-block-width":gh,"border-inline":gh,"border-inline-end":gh,"border-inline-end-width":gh,"border-inline-start":gh,"border-inline-start-width":gh,"border-inline-width":gh,"border-start-start-radius":gh,"border-start-end-radius":gh,"border-end-start-radius":gh,"border-end-end-radius":gh,margin:gh,"margin-bottom":gh,"margin-left":gh,"margin-right":gh,"margin-top":gh,"margin-block":gh,"margin-block-end":gh,"margin-block-start":gh,"margin-inline":gh,"margin-inline-end":gh,"margin-inline-start":gh,padding:gh,"padding-bottom":gh,"padding-left":gh,"padding-right":gh,"padding-top":gh,"padding-block":gh,"padding-block-end":gh,"padding-block-start":gh,"padding-inline":gh,"padding-inline-end":gh,"padding-inline-start":gh,"mask-position-x":gh,"mask-position-y":gh,"mask-size":gh,height:gh,width:gh,"min-height":gh,"max-height":gh,"min-width":gh,"max-width":gh,bottom:gh,left:gh,top:gh,right:gh,inset:gh,"inset-block":gh,"inset-block-end":gh,"inset-block-start":gh,"inset-inline":gh,"inset-inline-end":gh,"inset-inline-start":gh,"box-shadow":gh,"text-shadow":gh,"column-gap":gh,"column-rule":gh,"column-rule-width":gh,"column-width":gh,"font-size":gh,"font-size-delta":gh,"letter-spacing":gh,"text-decoration-thickness":gh,"text-indent":gh,"text-stroke":gh,"text-stroke-width":gh,"word-spacing":gh,motion:gh,"motion-offset":gh,outline:gh,"outline-offset":gh,"outline-width":gh,perspective:gh,"perspective-origin-x":bh,"perspective-origin-y":bh,"transform-origin":bh,"transform-origin-x":bh,"transform-origin-y":bh,"transform-origin-z":bh,"transition-delay":yh,"transition-duration":yh,"vertical-align":gh,"flex-basis":gh,"shape-margin":gh,size:gh,gap:gh,grid:gh,"grid-gap":gh,"row-gap":gh,"grid-row-gap":gh,"grid-column-gap":gh,"grid-template-rows":gh,"grid-template-columns":gh,"grid-auto-rows":gh,"grid-auto-columns":gh,"box-shadow-x":gh,"box-shadow-y":gh,"box-shadow-blur":gh,"box-shadow-spread":gh,"font-line-height":gh,"text-shadow-x":gh,"text-shadow-y":gh,"text-shadow-blur":gh});function kh(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=kh(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=kh(i,t[i],n);else for(var o in t)t[o]=kh(e+"-"+o,t[o],n);else if("number"===typeof t&&!1===isNaN(t)){var a=n[e]||wh[e];return!a||0===t&&a===gh?t.toString():"function"===typeof a?a(t).toString():""+t+a}return t}var Sh=function(e){void 0===e&&(e={});var t=xh(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=kh(r,e[r],t);return e},onChangeValue:function(e,n){return kh(n,e,t)}}},Oh="",Ch="",Mh="",Ph="",Th=Af&&"ontouchstart"in document.documentElement;if(Af){var Eh={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Zh=document.createElement("p").style;for(var Ah in Eh)if(Ah+"Transform"in Zh){Oh=Ah,Ch=Eh[Ah];break}"Webkit"===Oh&&"msHyphens"in Zh&&(Oh="ms",Ch=Eh.ms,Ph="edge"),"Webkit"===Oh&&"-apple-trailing-word"in Zh&&(Mh="apple")}var Rh=Oh,Dh=Ch,jh=Mh,_h=Ph,Nh=Th;var Lh={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Rh?"-webkit-"+e:Dh+e)}},Ih={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Rh?Dh+"print-"+e:e)}},zh=/[-\s]+(.)?/g;function Bh(e,t){return t?t.toUpperCase():""}function Fh(e){return e.replace(zh,Bh)}function $h(e){return Fh("-"+e)}var Wh,Hh={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Rh){var n="mask-image";if(Fh(n)in t)return e;if(Rh+$h(n)in t)return Dh+e}return e}},Vh={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==jh||Nh?e:Dh+e)}},qh={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Dh+e)}},Uh={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Dh+e)}},Qh={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Rh||"ms"===Rh&&"edge"!==_h?Dh+e:e)}},Xh={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Rh||"ms"===Rh||"apple"===jh?Dh+e:e)}},Yh={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Rh?"WebkitColumn"+$h(e)in t&&Dh+"column-"+e:"Moz"===Rh&&("page"+$h(e)in t&&"page-"+e))}},Gh={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Rh)return e;var n=e.replace("-inline","");return Rh+$h(n)in t&&Dh+n}},Kh={supportedProperty:function(e,t){return Fh(e)in t&&e}},Jh={supportedProperty:function(e,t){var n=$h(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Rh+n in t?Dh+e:"Webkit"!==Rh&&"Webkit"+n in t&&"-webkit-"+e}},ep={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Rh?""+Dh+e:e)}},tp={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Rh?Dh+"scroll-chaining":e)}},np={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},rp={supportedProperty:function(e,t){var n=np[e];return!!n&&(Rh+$h(n)in t&&Dh+n)}},ip={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},op=Object.keys(ip),ap=function(e){return Dh+e},sp={supportedProperty:function(e,t,n){var r=n.multiple;if(op.indexOf(e)>-1){var i=ip[e];if(!Array.isArray(i))return Rh+$h(i)in t&&Dh+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(Rh+$h(i[0])in t))return!1;return i.map(ap)}return!1}},lp=[Lh,Ih,Hh,Vh,qh,Uh,Qh,Xh,Yh,Gh,Kh,Jh,ep,tp,rp,sp],up=lp.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),cp=lp.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,(0,me.Z)(t.noPrefill)),e}),[]),fp={};if(Af){Wh=document.createElement("p");var dp=window.getComputedStyle(document.documentElement,"");for(var hp in dp)isNaN(hp)||(fp[dp[hp]]=dp[hp]);cp.forEach((function(e){return delete fp[e]}))}function pp(e,t){if(void 0===t&&(t={}),!Wh)return e;if(null!=fp[e])return fp[e];"transition"!==e&&"transform"!==e||(t[e]=e in Wh.style);for(var n=0;n<up.length&&(fp[e]=up[n](e,Wh.style,t),!fp[e]);n++);try{Wh.style[e]=""}catch(r){return!1}return fp[e]}var vp,mp={},gp={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},yp=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function bp(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?pp(t):", "+pp(n);return r||(t||n)}function xp(e,t){var n=t;if(!vp||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=mp[r])return mp[r];try{vp.style[e]=n}catch(i){return mp[r]=!1,!1}if(gp[e])n=n.replace(yp,bp);else if(""===vp.style[e]&&("-ms-flex"===(n=Dh+n)&&(vp.style[e]="-ms-flexbox"),vp.style[e]=n,""===vp.style[e]))return mp[r]=!1,!1;return vp.style[e]="",mp[r]=n,mp[r]}Af&&(vp=document.createElement("p"));var wp=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=pp(n);o&&o!==n&&(i=!0);var a=!1,s=xp(o,Nf(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Rh?e:"@"+Dh+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return xp(t,Nf(e))||e}}};var kp=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}};var Sp=Bd({plugins:[Kd(),oh(),uh(),mh(),Sh(),"undefined"===typeof window?null:wp(),kp()]}),Op=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),l=0,u=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Qd.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Ud]&&""===a?"".concat(o,"-").concat(u()):o}return"".concat(s).concat(i).concat(u())}}(),Cp={disableGeneration:!1,generateClassName:Op,jss:Sp,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Mp=e.createContext(Cp);var Pp=-1e9;function Tp(){return Pp+=1}var Ep=n(114),Zp=["variant"];function Ap(e){return 0===e.length}function Rp(e){var t="function"===typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(c){throw c}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return i;var s=n.components[r].styleOverrides||{},l=n.components[r].variants||[],u=(0,a.Z)({},i);return Object.keys(s).forEach((function(e){u[e]=(0,At.Z)(u[e]||{},s[e])})),l.forEach((function(e){var t=function(e){var t=e.variant,n=(0,o.Z)(e,Zp),r=t||"";return Object.keys(n).sort().forEach((function(t){r+="color"===t?Ap(r)?e[t]:(0,Ep.Z)(e[t]):"".concat(Ap(r)?t:(0,Ep.Z)(t)).concat((0,Ep.Z)(e[t].toString()))})),r}(e.props);u[t]=(0,At.Z)(u[t]||{},e.style)})),u},options:{}}}var Dp={},jp=["name","classNamePrefix","Component","defaultTheme"];function _p(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Wd({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function Np(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,s=e.name;if(!i.disableGeneration){var l=Vd.get(i.sheetsManager,o,r);l||(l={refs:0,staticSheet:null,dynamicStyles:null},Vd.set(i.sheetsManager,o,r,l));var u=(0,a.Z)({},o.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});u.generateId=u.serverGenerateClassName||u.generateClassName;var c=i.sheetsRegistry;if(0===l.refs){var f;i.sheetsCache&&(f=Vd.get(i.sheetsCache,o,r));var d=o.create(r,s);f||((f=i.jss.createStyleSheet(d,(0,a.Z)({link:!1},u))).attach(),i.sheetsCache&&Vd.set(i.sheetsCache,o,r,f)),c&&c.add(f),l.staticSheet=f,l.dynamicStyles=$d(d)}if(l.dynamicStyles){var h=i.jss.createStyleSheet(l.dynamicStyles,(0,a.Z)({link:!0},u));h.update(t),h.attach(),n.dynamicSheet=h,n.classes=Wd({baseClasses:l.staticSheet.classes,newClasses:h.classes}),c&&c.add(h)}else n.classes=l.staticSheet.classes;l.refs+=1}}function Lp(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function Ip(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=Vd.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(Vd.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function zp(t,n){var r,i=e.useRef([]),o=e.useMemo((function(){return{}}),n);i.current!==o&&(i.current=o,r=t()),e.useEffect((function(){return function(){r&&r()}}),[o])}function Bp(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.name,i=n.classNamePrefix,s=n.Component,l=n.defaultTheme,u=void 0===l?Dp:l,c=(0,o.Z)(n,jp),f=Rp(t),d=r||i||"makeStyles";f.options={index:Tp(),name:r,meta:d,classNamePrefix:d};var h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,qd.Z)()||u,i=(0,a.Z)({},e.useContext(Mp),c),o=e.useRef(),l=e.useRef();zp((function(){var e={name:r,state:{},stylesCreator:f,stylesOptions:i,theme:n};return Np(e,t),l.current=!1,o.current=e,function(){Ip(e)}}),[n,f]),e.useEffect((function(){l.current&&Lp(o.current,t),l.current=!0}));var d=_p(o.current,t.classes,s);return d};return h}var Fp=n(1198),$p=Bp({popover:{position:"absolute",display:"grid",gridGap:"16px",padding:"0 0 25px",zIndex:2},popoverHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#3F51B5",padding:"6px 6px 6px 12px",borderRadius:"4px 4px 0 0",color:"#FFF",cursor:"move"},popoverBody:{display:"grid",gridGap:"6px",padding:"0 14px"}}),Wp=function(){var t=(0,e.useState)(!1),n=(0,r.Z)(t,2),i=n[0],o=n[1],a=(0,e.useRef)(null),s=$p();return(0,p.jsxs)(zt,{display:"flex",px:2,children:[(0,p.jsxs)(Pf,{onClick:function(){return o((function(e){return!e}))},variant:"outlined",children:[(0,p.jsx)(ms.Z,{sx:{fontSize:16,marginRight:"4px"}}),(0,p.jsxs)("span",{style:{lineHeight:1,paddingTop:"1px"},children:[i?"Hide":"Show"," graph settings"]})]}),i&&(0,p.jsx)(Ef(),{nodeRef:a,defaultPosition:{x:173,y:0},handle:"#handle",children:(0,p.jsxs)(J,{elevation:3,className:s.popover,ref:a,children:[(0,p.jsxs)("div",{id:"handle",className:s.popoverHeader,children:[(0,p.jsx)(Cs,{variant:"body1",children:(0,p.jsx)("b",{children:"Graph Settings"})}),(0,p.jsx)(dt,{size:"small",onClick:function(){return o(!1)},children:(0,p.jsx)(Fp.Z,{style:{color:"white"}})})]}),(0,p.jsx)(zt,{className:s.popoverBody,children:(0,p.jsx)(mf,{})})]})})]})},Hp=function(t){var n=t.data,i=void 0===n?[]:n,o=Xa(),a=Gn().time.period,s=Qa().customStep,l=(0,e.useMemo)((function(){return s.enable?s.value:a.step||1}),[a.step,s]),u=(0,e.useState)([[]]),c=(0,r.Z)(u,2),f=c[0],d=c[1],h=(0,e.useState)([]),v=(0,r.Z)(h,2),m=v[0],g=v[1],y=(0,e.useState)([]),b=(0,r.Z)(y,2),x=b[0],w=b[1],k=(0,e.useState)([]),S=(0,r.Z)(k,2),O=S[0],C=S[1],M=function(e){var t=function(e){var t={};for(var n in e){var r=e[n],i=rs(r),o=ns(r);t[n]=i&&o?[i-.25*i,o+.25*o]:[-1,1]}return t}(e);o({type:"SET_YAXIS_LIMITS",payload:t})};return(0,e.useEffect)((function(){var e=[],t={},n=[],r=[];null===i||void 0===i||i.forEach((function(i){var o=hs(i,O);r.push(o),n.push(ps(o,i.group)),i.values.forEach((function(n){e.push(n[0]),t[i.group]?t[i.group].push(+n[1]):t[i.group]=[+n[1]]}))}));var o=function(e,t,n){var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=Math.ceil((n.end-n.start)/t),o=r[0]||0;return new Array(2*i).fill(o).map((function(e,n){return Pn(e+t*n)}))}(e,l,a);d([o].concat((0,me.Z)(i.map((function(e){return o.map((function(t){var n=e.values.find((function(e){return e[0]===t}));return n?+n[1]:null}))}))))),M(t);var s=[{}].concat(r);JSON.stringify(s)!==JSON.stringify(m)&&(g(s),w(n))}),[i]),(0,e.useEffect)((function(){var e=[],t=[];null===i||void 0===i||i.forEach((function(n){var r=hs(n,O);t.push(r),e.push(ps(r,n.group))})),g([{}].concat(t)),w(e)}),[O]),(0,p.jsx)(p.Fragment,{children:i.length>0?(0,p.jsxs)("div",{children:[(0,p.jsx)(Wp,{}),(0,p.jsx)(us,{data:f,series:m,metrics:i}),(0,p.jsx)(cs,{labels:x,onChange:function(e,t){C(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o="".concat(n.group,".").concat(n.label),a=vs(n.label,n.group,t),s=i.map((function(e){return"".concat(e.scale,".").concat(e.label)}));return r?a?t.filter((function(e){return e!==o})):[].concat((0,me.Z)(t),[o]):t.length?a?(0,me.Z)(s.filter((function(e){return e!==o}))):[]:(0,me.Z)(s.filter((function(e){return e!==o})))}({hideSeries:O,legend:e,metaKey:t,series:m}))}})]}):(0,p.jsx)("div",{style:{textAlign:"center"},children:"No data to show"})})};function Vp(e){return(0,q.Z)("MuiTableContainer",e)}(0,U.Z)("MuiTableContainer",["root"]);var qp=["className","component"],Up=(0,g.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:function(e,t){return t.root}})({width:"100%",overflowX:"auto"}),Qp=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiTableContainer"}),r=n.className,i=n.component,s=void 0===i?"div":i,l=(0,o.Z)(n,qp),f=(0,a.Z)({},n,{component:s}),d=function(e){var t=e.classes;return(0,c.Z)({root:["root"]},Vp,t)}(f);return(0,p.jsx)(Up,(0,a.Z)({ref:t,as:s,className:(0,u.default)(d.root,r),ownerState:f},l))})),Xp=Qp;var Yp=e.createContext();function Gp(e){return(0,q.Z)("MuiTable",e)}(0,U.Z)("MuiTable",["root","stickyHeader"]);var Kp=["className","component","padding","size","stickyHeader"],Jp=(0,g.ZP)("table",{name:"MuiTable",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.stickyHeader&&t.stickyHeader]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,a.Z)({},t.typography.body2,{padding:t.spacing(2),color:t.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})})),ev="table",tv=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiTable"}),i=r.className,s=r.component,l=void 0===s?ev:s,f=r.padding,d=void 0===f?"normal":f,h=r.size,v=void 0===h?"medium":h,m=r.stickyHeader,g=void 0!==m&&m,y=(0,o.Z)(r,Kp),b=(0,a.Z)({},r,{component:l,padding:d,size:v,stickyHeader:g}),x=function(e){var t=e.classes,n={root:["root",e.stickyHeader&&"stickyHeader"]};return(0,c.Z)(n,Gp,t)}(b),k=e.useMemo((function(){return{padding:d,size:v,stickyHeader:g}}),[d,v,g]);return(0,p.jsx)(Yp.Provider,{value:k,children:(0,p.jsx)(Jp,(0,a.Z)({as:l,role:l===ev?null:"table",ref:n,className:(0,u.default)(x.root,i),ownerState:b},y))})})),nv=tv;var rv=e.createContext();function iv(e){return(0,q.Z)("MuiTableHead",e)}(0,U.Z)("MuiTableHead",["root"]);var ov=["className","component"],av=(0,g.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:function(e,t){return t.root}})({display:"table-header-group"}),sv={variant:"head"},lv="thead",uv=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiTableHead"}),r=n.className,i=n.component,s=void 0===i?lv:i,l=(0,o.Z)(n,ov),f=(0,a.Z)({},n,{component:s}),d=function(e){var t=e.classes;return(0,c.Z)({root:["root"]},iv,t)}(f);return(0,p.jsx)(rv.Provider,{value:sv,children:(0,p.jsx)(av,(0,a.Z)({as:s,className:(0,u.default)(d.root,r),ref:t,role:s===lv?null:"rowgroup",ownerState:f},l))})})),cv=uv;function fv(e){return(0,q.Z)("MuiTableRow",e)}var dv=(0,U.Z)("MuiTableRow",["root","selected","hover","head","footer"]),hv=["className","component","hover","selected"],pv=(0,g.ZP)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((function(e){var t,n=e.theme;return t={color:"inherit",display:"table-row",verticalAlign:"middle",outline:0},(0,i.Z)(t,"&.".concat(dv.hover,":hover"),{backgroundColor:n.palette.action.hover}),(0,i.Z)(t,"&.".concat(dv.selected),{backgroundColor:(0,V.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity),"&:hover":{backgroundColor:(0,V.Fq)(n.palette.primary.main,n.palette.action.selectedOpacity+n.palette.action.hoverOpacity)}}),t})),vv=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiTableRow"}),i=r.className,s=r.component,l=void 0===s?"tr":s,f=r.hover,d=void 0!==f&&f,h=r.selected,v=void 0!==h&&h,m=(0,o.Z)(r,hv),g=e.useContext(rv),y=(0,a.Z)({},r,{component:l,hover:d,selected:v,head:g&&"head"===g.variant,footer:g&&"footer"===g.variant}),b=function(e){var t=e.classes,n={root:["root",e.selected&&"selected",e.hover&&"hover",e.head&&"head",e.footer&&"footer"]};return(0,c.Z)(n,fv,t)}(y);return(0,p.jsx)(pv,(0,a.Z)({as:l,ref:n,className:(0,u.default)(b.root,i),role:"tr"===l?null:"row",ownerState:y},m))})),mv=vv;function gv(e){return(0,q.Z)("MuiTableCell",e)}var yv=(0,U.Z)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),bv=["align","className","component","padding","scope","size","sortDirection","variant"],xv=(0,g.ZP)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],t["size".concat((0,O.Z)(n.size))],"normal"!==n.padding&&t["padding".concat((0,O.Z)(n.padding))],"inherit"!==n.align&&t["align".concat((0,O.Z)(n.align))],n.stickyHeader&&t.stickyHeader]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===t.palette.mode?(0,V.$n)((0,V.Fq)(t.palette.divider,1),.88):(0,V._j)((0,V.Fq)(t.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===n.variant&&{color:t.palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:t.palette.text.primary},"footer"===n.variant&&{color:t.palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&(0,i.Z)({padding:"6px 16px"},"&.".concat(yv.paddingCheckbox),{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}),"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:t.palette.background.default})})),wv=e.forwardRef((function(t,n){var r,i=(0,w.Z)({props:t,name:"MuiTableCell"}),s=i.align,l=void 0===s?"inherit":s,f=i.className,d=i.component,h=i.padding,v=i.scope,m=i.size,g=i.sortDirection,y=i.variant,b=(0,o.Z)(i,bv),x=e.useContext(Yp),k=e.useContext(rv),S=k&&"head"===k.variant;r=d||(S?"th":"td");var C=v;!C&&S&&(C="col");var M=y||k&&k.variant,P=(0,a.Z)({},i,{align:l,component:r,padding:h||(x&&x.padding?x.padding:"normal"),size:m||(x&&x.size?x.size:"medium"),sortDirection:g,stickyHeader:"head"===M&&x&&x.stickyHeader,variant:M}),T=function(e){var t=e.classes,n=e.variant,r=e.align,i=e.padding,o=e.size,a={root:["root",n,e.stickyHeader&&"stickyHeader","inherit"!==r&&"align".concat((0,O.Z)(r)),"normal"!==i&&"padding".concat((0,O.Z)(i)),"size".concat((0,O.Z)(o))]};return(0,c.Z)(a,gv,t)}(P),E=null;return g&&(E="asc"===g?"ascending":"descending"),(0,p.jsx)(xv,(0,a.Z)({as:r,ref:n,className:(0,u.default)(T.root,f),"aria-sort":E,scope:C,ownerState:P},b))})),kv=wv;function Sv(e){return(0,q.Z)("MuiTableBody",e)}(0,U.Z)("MuiTableBody",["root"]);var Ov=["className","component"],Cv=(0,g.ZP)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:function(e,t){return t.root}})({display:"table-row-group"}),Mv={variant:"body"},Pv="tbody",Tv=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiTableBody"}),r=n.className,i=n.component,s=void 0===i?Pv:i,l=(0,o.Z)(n,Ov),f=(0,a.Z)({},n,{component:s}),d=function(e){var t=e.classes;return(0,c.Z)({root:["root"]},Sv,t)}(f);return(0,p.jsx)(rv.Provider,{value:Mv,children:(0,p.jsx)(Cv,(0,a.Z)({className:(0,u.default)(d.root,r),as:s,ref:t,role:s===Pv?null:"rowgroup",ownerState:f},l))})})),Ev=Tv,Zv=Bp({deemphasized:{opacity:.4}}),Av=function(t){var n=t.data,r=Zv(),i=function(t){return(0,e.useMemo)((function(){var e={};return t.forEach((function(t){return Object.entries(t.metric).forEach((function(t){return e[t[0]]?e[t[0]].options.add(t[1]):e[t[0]]={options:new Set([t[1]])}}))})),Object.entries(e).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}))}),[t])}(n),o=(0,e.useMemo)((function(){return null===n||void 0===n?void 0:n.map((function(e){return{metadata:i.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-"}}))}),[i,n]);return(0,p.jsx)(p.Fragment,{children:o.length>0?(0,p.jsx)(Xp,{component:J,children:(0,p.jsxs)(nv,{"aria-label":"simple table",children:[(0,p.jsx)(cv,{children:(0,p.jsxs)(mv,{children:[i.map((function(e,t){return(0,p.jsx)(kv,{style:{textTransform:"capitalize"},children:e.key},t)})),(0,p.jsx)(kv,{align:"right",children:"Value"})]})}),(0,p.jsx)(Ev,{children:o.map((function(e,t){return(0,p.jsxs)(mv,{children:[e.metadata.map((function(e,n){var i=o[t-1]&&o[t-1].metadata[n];return(0,p.jsx)(kv,{className:i===e?r.deemphasized:void 0,children:e},n)})),(0,p.jsx)(kv,{align:"right",children:e.value})]},t)}))})]})}):(0,p.jsx)("div",{style:{textAlign:"center"},children:"No data to show"})})},Rv=n(3878),Dv=n(9199),jv=n(181),_v=n(5267);function Nv(e){return(0,q.Z)("MuiCollapse",e)}(0,U.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var Lv=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],Iv=(0,g.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,a.Z)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})})),zv=(0,g.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:function(e,t){return t.wrapper}})((function(e){var t=e.ownerState;return(0,a.Z)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),Bv=(0,g.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:function(e,t){return t.wrapperInner}})((function(e){var t=e.ownerState;return(0,a.Z)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),Fv=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiCollapse"}),s=r.addEndListener,l=r.children,f=r.className,d=r.collapsedSize,h=void 0===d?"0px":d,v=r.component,m=r.easing,g=r.in,y=r.onEnter,b=r.onEntered,S=r.onEntering,O=r.onExit,C=r.onExited,M=r.onExiting,P=r.orientation,T=void 0===P?"vertical":P,E=r.style,Z=r.timeout,A=void 0===Z?k.x9.standard:Z,R=r.TransitionComponent,D=void 0===R?N:R,j=(0,o.Z)(r,Lv),_=(0,a.Z)({},r,{orientation:T,collapsedSize:h}),L=function(e){var t=e.orientation,n=e.classes,r={root:["root","".concat(t)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(t)],wrapperInner:["wrapperInner","".concat(t)]};return(0,c.Z)(r,Nv,n)}(_),B=x(),F=e.useRef(),$=e.useRef(null),W=e.useRef(),H="number"===typeof h?"".concat(h,"px"):h,V="horizontal"===T,q=V?"width":"height";e.useEffect((function(){return function(){clearTimeout(F.current)}}),[]);var U=e.useRef(null),Q=(0,z.Z)(n,U),X=function(e){return function(t){if(e){var n=U.current;void 0===t?e(n):e(n,t)}}},Y=function(){return $.current?$.current[V?"clientWidth":"clientHeight"]:0},G=X((function(e,t){$.current&&V&&($.current.style.position="absolute"),e.style[q]=H,y&&y(e,t)})),K=X((function(e,t){var n=Y();$.current&&V&&($.current.style.position="");var r=I({style:E,timeout:A,easing:m},{mode:"enter"}),i=r.duration,o=r.easing;if("auto"===A){var a=B.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(a,"ms"),W.current=a}else e.style.transitionDuration="string"===typeof i?i:"".concat(i,"ms");e.style[q]="".concat(n,"px"),e.style.transitionTimingFunction=o,S&&S(e,t)})),J=X((function(e,t){e.style[q]="auto",b&&b(e,t)})),ee=X((function(e){e.style[q]="".concat(Y(),"px"),O&&O(e)})),te=X(C),ne=X((function(e){var t=Y(),n=I({style:E,timeout:A,easing:m},{mode:"exit"}),r=n.duration,i=n.easing;if("auto"===A){var o=B.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(o,"ms"),W.current=o}else e.style.transitionDuration="string"===typeof r?r:"".concat(r,"ms");e.style[q]=H,e.style.transitionTimingFunction=i,M&&M(e)}));return(0,p.jsx)(D,(0,a.Z)({in:g,onEnter:G,onEntered:J,onEntering:K,onExit:ee,onExited:te,onExiting:ne,addEndListener:function(e){"auto"===A&&(F.current=setTimeout(e,W.current||0)),s&&s(U.current,e)},nodeRef:U,timeout:"auto"===A?null:A},j,{children:function(e,t){return(0,p.jsx)(Iv,(0,a.Z)({as:v,className:(0,u.default)(L.root,f,{entered:L.entered,exited:!g&&"0px"===H&&L.hidden}[e]),style:(0,a.Z)((0,i.Z)({},V?"minWidth":"minHeight",H),E),ownerState:(0,a.Z)({},_,{state:e}),ref:Q},t,{children:(0,p.jsx)(zv,{ownerState:(0,a.Z)({},_,{state:e}),className:L.wrapper,ref:$,children:(0,p.jsx)(Bv,{ownerState:(0,a.Z)({},_,{state:e}),className:L.wrapperInner,children:l})})}))}}))}));Fv.muiSupportAuto=!0;var $v=Fv;var Wv=e.createContext({});function Hv(e){return(0,q.Z)("MuiAccordion",e)}var Vv=(0,U.Z)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),qv=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","TransitionComponent","TransitionProps"],Uv=(0,g.ZP)(J,{name:"MuiAccordion",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[(0,i.Z)({},"& .".concat(Vv.region),t.region),t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})((function(e){var t,n=e.theme,r={duration:n.transitions.duration.shortest};return t={position:"relative",transition:n.transitions.create(["margin"],r),overflowAnchor:"none","&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:n.palette.divider,transition:n.transitions.create(["opacity","background-color"],r)},"&:first-of-type":{"&:before":{display:"none"}}},(0,i.Z)(t,"&.".concat(Vv.expanded),{"&:before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&:before":{display:"none"}}}),(0,i.Z)(t,"&.".concat(Vv.disabled),{backgroundColor:n.palette.action.disabledBackground}),t}),(function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({},!n.square&&{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:t.shape.borderRadius,borderTopRightRadius:t.shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:t.shape.borderRadius,borderBottomRightRadius:t.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},!n.disableGutters&&(0,i.Z)({},"&.".concat(Vv.expanded),{margin:"16px 0"}))})),Qv=e.forwardRef((function(t,n){var i,s=(0,w.Z)({props:t,name:"MuiAccordion"}),l=s.children,f=s.className,d=s.defaultExpanded,h=void 0!==d&&d,v=s.disabled,m=void 0!==v&&v,g=s.disableGutters,y=void 0!==g&&g,b=s.expanded,x=s.onChange,k=s.square,S=void 0!==k&&k,O=s.TransitionComponent,C=void 0===O?$v:O,M=s.TransitionProps,P=(0,o.Z)(s,qv),T=(0,Tc.Z)({controlled:b,default:h,name:"Accordion",state:"expanded"}),E=(0,r.Z)(T,2),Z=E[0],A=E[1],R=e.useCallback((function(e){A(!Z),x&&x(e,!Z)}),[Z,x,A]),D=e.Children.toArray(l),j=(i=D,(0,Rv.Z)(i)||(0,Dv.Z)(i)||(0,jv.Z)(i)||(0,_v.Z)()),_=j[0],N=j.slice(1),L=e.useMemo((function(){return{expanded:Z,disabled:m,disableGutters:y,toggle:R}}),[Z,m,y,R]),I=(0,a.Z)({},s,{square:S,disabled:m,disableGutters:y,expanded:Z}),z=function(e){var t=e.classes,n={root:["root",!e.square&&"rounded",e.expanded&&"expanded",e.disabled&&"disabled",!e.disableGutters&&"gutters"],region:["region"]};return(0,c.Z)(n,Hv,t)}(I);return(0,p.jsxs)(Uv,(0,a.Z)({className:(0,u.default)(z.root,f),ref:n,ownerState:I,square:S},P,{children:[(0,p.jsx)(Wv.Provider,{value:L,children:_}),(0,p.jsx)(C,(0,a.Z)({in:Z,timeout:"auto"},M,{children:(0,p.jsx)("div",{"aria-labelledby":_.props.id,id:_.props["aria-controls"],role:"region",className:z.region,children:N})}))]}))})),Xv=Qv;function Yv(e){return(0,q.Z)("MuiAccordionSummary",e)}var Gv=(0,U.Z)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Kv=["children","className","expandIcon","focusVisibleClassName","onClick"],Jv=(0,g.ZP)(ot,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t,n=e.theme,r=e.ownerState,o={duration:n.transitions.duration.shortest};return(0,a.Z)((t={display:"flex",minHeight:48,padding:n.spacing(0,2),transition:n.transitions.create(["min-height","background-color"],o)},(0,i.Z)(t,"&.".concat(Gv.focusVisible),{backgroundColor:n.palette.action.focus}),(0,i.Z)(t,"&.".concat(Gv.disabled),{opacity:n.palette.action.disabledOpacity}),(0,i.Z)(t,"&:hover:not(.".concat(Gv.disabled,")"),{cursor:"pointer"}),t),!r.disableGutters&&(0,i.Z)({},"&.".concat(Gv.expanded),{minHeight:64}))})),em=(0,g.ZP)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:function(e,t){return t.content}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({display:"flex",flexGrow:1,margin:"12px 0"},!n.disableGutters&&(0,i.Z)({transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest})},"&.".concat(Gv.expanded),{margin:"20px 0"}))})),tm=(0,g.ZP)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:function(e,t){return t.expandIconWrapper}})((function(e){var t=e.theme;return(0,i.Z)({display:"flex",color:t.palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest})},"&.".concat(Gv.expanded),{transform:"rotate(180deg)"})})),nm=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiAccordionSummary"}),i=r.children,s=r.className,l=r.expandIcon,f=r.focusVisibleClassName,d=r.onClick,h=(0,o.Z)(r,Kv),v=e.useContext(Wv),m=v.disabled,g=void 0!==m&&m,y=v.disableGutters,b=v.expanded,x=v.toggle,k=(0,a.Z)({},r,{expanded:b,disabled:g,disableGutters:y}),S=function(e){var t=e.classes,n=e.expanded,r=e.disabled,i=e.disableGutters,o={root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,c.Z)(o,Yv,t)}(k);return(0,p.jsxs)(Jv,(0,a.Z)({focusRipple:!1,disableRipple:!0,disabled:g,component:"div","aria-expanded":b,className:(0,u.default)(S.root,s),focusVisibleClassName:(0,u.default)(S.focusVisible,f),onClick:function(e){x&&x(e),d&&d(e)},ref:n,ownerState:k},h,{children:[(0,p.jsx)(em,{className:S.content,ownerState:k,children:i}),l&&(0,p.jsx)(tm,{className:S.expandIconWrapper,ownerState:k,children:l})]}))})),rm=nm;function im(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return $s(e)?t:(0,a.Z)({},t,{ownerState:(0,a.Z)({},t.ownerState,n)})}function om(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function am(e){return e instanceof om(e).Element||e instanceof Element}function sm(e){return e instanceof om(e).HTMLElement||e instanceof HTMLElement}function lm(e){return"undefined"!==typeof ShadowRoot&&(e instanceof om(e).ShadowRoot||e instanceof ShadowRoot)}var um=Math.max,cm=Math.min,fm=Math.round;function dm(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(sm(e)&&t){var o=e.offsetHeight,a=e.offsetWidth;a>0&&(r=fm(n.width)/a||1),o>0&&(i=fm(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function hm(e){var t=om(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function pm(e){return e?(e.nodeName||"").toLowerCase():null}function vm(e){return((am(e)?e.ownerDocument:e.document)||window.document).documentElement}function mm(e){return dm(vm(e)).left+hm(e).scrollLeft}function gm(e){return om(e).getComputedStyle(e)}function ym(e){var t=gm(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function bm(e,t,n){void 0===n&&(n=!1);var r=sm(t),i=sm(t)&&function(e){var t=e.getBoundingClientRect(),n=fm(t.width)/e.offsetWidth||1,r=fm(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=vm(t),a=dm(e,i),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==pm(t)||ym(o))&&(s=function(e){return e!==om(e)&&sm(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:hm(e);var t}(t)),sm(t)?((l=dm(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=mm(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function xm(e){var t=dm(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function wm(e){return"html"===pm(e)?e:e.assignedSlot||e.parentNode||(lm(e)?e.host:null)||vm(e)}function km(e){return["html","body","#document"].indexOf(pm(e))>=0?e.ownerDocument.body:sm(e)&&ym(e)?e:km(wm(e))}function Sm(e,t){var n;void 0===t&&(t=[]);var r=km(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=om(r),a=i?[o].concat(o.visualViewport||[],ym(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Sm(wm(a)))}function Om(e){return["table","td","th"].indexOf(pm(e))>=0}function Cm(e){return sm(e)&&"fixed"!==gm(e).position?e.offsetParent:null}function Mm(e){for(var t=om(e),n=Cm(e);n&&Om(n)&&"static"===gm(n).position;)n=Cm(n);return n&&("html"===pm(n)||"body"===pm(n)&&"static"===gm(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&sm(e)&&"fixed"===gm(e).position)return null;for(var n=wm(e);sm(n)&&["html","body"].indexOf(pm(n))<0;){var r=gm(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Pm="top",Tm="bottom",Em="right",Zm="left",Am="auto",Rm=[Pm,Tm,Em,Zm],Dm="start",jm="end",_m="viewport",Nm="popper",Lm=Rm.reduce((function(e,t){return e.concat([t+"-"+Dm,t+"-"+jm])}),[]),Im=[].concat(Rm,[Am]).reduce((function(e,t){return e.concat([t,t+"-"+Dm,t+"-"+jm])}),[]),zm=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Bm(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}function Fm(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var $m={placement:"bottom",modifiers:[],strategy:"absolute"};function Wm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function Hm(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?$m:i;return function(e,t,n){void 0===n&&(n=o);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},$m,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:i,setOptions:function(n){var s="function"===typeof n?n(i.options):n;u(),i.options=Object.assign({},o,i.options,s),i.scrollParents={reference:am(e)?Sm(e):e.contextElement?Sm(e.contextElement):[],popper:Sm(t)};var c=function(e){var t=Bm(e);return zm.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,i.options.modifiers)));return i.orderedModifiers=c.filter((function(e){return e.enabled})),i.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"===typeof o){var s=o({state:i,name:t,instance:l,options:r}),u=function(){};a.push(s||u)}})),l.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(Wm(t,n)){i.rects={reference:bm(t,Mm(n),"fixed"===i.options.strategy),popper:xm(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach((function(e){return i.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var o=i.orderedModifiers[r],a=o.fn,u=o.options,c=void 0===u?{}:u,f=o.name;"function"===typeof a&&(i=a({state:i,options:c,name:f,instance:l})||i)}else i.reset=!1,r=-1}}},update:Fm((function(){return new Promise((function(e){l.forceUpdate(),e(i)}))})),destroy:function(){u(),s=!0}};if(!Wm(e,t))return l;function u(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var Vm={passive:!0};var qm={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,l=om(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,Vm)})),s&&l.addEventListener("resize",n.update,Vm),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,Vm)})),s&&l.removeEventListener("resize",n.update,Vm)}},data:{}};function Um(e){return e.split("-")[0]}function Qm(e){return e.split("-")[1]}function Xm(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ym(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?Um(i):null,a=i?Qm(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Pm:t={x:s,y:n.y-r.height};break;case Tm:t={x:s,y:n.y+n.height};break;case Em:t={x:n.x+n.width,y:l};break;case Zm:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=o?Xm(o):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case Dm:t[u]=t[u]-(n[c]/2-r[c]/2);break;case jm:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var Gm={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Ym({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Km={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Jm(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:fm(t*r)/r||0,y:fm(n*r)/r||0}}(a):"function"===typeof c?c(a):a,h=d.x,p=void 0===h?0:h,v=d.y,m=void 0===v?0:v,g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=Zm,x=Pm,w=window;if(u){var k=Mm(n),S="clientHeight",O="clientWidth";if(k===om(n)&&"static"!==gm(k=vm(n)).position&&"absolute"===s&&(S="scrollHeight",O="scrollWidth"),k=k,i===Pm||(i===Zm||i===Em)&&o===jm)x=Tm,m-=(f&&w.visualViewport?w.visualViewport.height:k[S])-r.height,m*=l?1:-1;if(i===Zm||(i===Pm||i===Tm)&&o===jm)b=Em,p-=(f&&w.visualViewport?w.visualViewport.width:k[O])-r.width,p*=l?1:-1}var C,M=Object.assign({position:s},u&&Km);return l?Object.assign({},M,((C={})[x]=y?"0":"",C[b]=g?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",C)):Object.assign({},M,((t={})[x]=y?m+"px":"",t[b]=g?p+"px":"",t.transform="",t))}var eg={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];sm(i)&&pm(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});sm(r)&&pm(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var tg={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=Im.reduce((function(e,n){return e[n]=function(e,t,n){var r=Um(e),i=[Zm,Pm].indexOf(r)>=0?-1:1,o="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Zm,Em].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},ng={left:"right",right:"left",bottom:"top",top:"bottom"};function rg(e){return e.replace(/left|right|bottom|top/g,(function(e){return ng[e]}))}var ig={start:"end",end:"start"};function og(e){return e.replace(/start|end/g,(function(e){return ig[e]}))}function ag(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&lm(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function sg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function lg(e,t){return t===_m?sg(function(e){var t=om(e),n=vm(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+mm(e),y:s}}(e)):am(t)?function(e){var t=dm(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):sg(function(e){var t,n=vm(e),r=hm(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=um(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=um(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+mm(e),l=-r.scrollTop;return"rtl"===gm(i||n).direction&&(s+=um(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(vm(e)))}function ug(e,t,n){var r="clippingParents"===t?function(e){var t=Sm(wm(e)),n=["absolute","fixed"].indexOf(gm(e).position)>=0,r=n&&sm(e)?Mm(e):e;return am(r)?t.filter((function(e){return am(e)&&ag(e,r)&&"body"!==pm(e)&&(!n||"static"!==gm(e).position)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],a=i.reduce((function(t,n){var r=lg(e,n);return t.top=um(r.top,t.top),t.right=cm(r.right,t.right),t.bottom=cm(r.bottom,t.bottom),t.left=um(r.left,t.left),t}),lg(e,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function cg(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function fg(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function dg(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.boundary,a=void 0===o?"clippingParents":o,s=n.rootBoundary,l=void 0===s?_m:s,u=n.elementContext,c=void 0===u?Nm:u,f=n.altBoundary,d=void 0!==f&&f,h=n.padding,p=void 0===h?0:h,v=cg("number"!==typeof p?p:fg(p,Rm)),m=c===Nm?"reference":Nm,g=e.rects.popper,y=e.elements[d?m:c],b=ug(am(y)?y:y.contextElement||vm(e.elements.popper),a,l),x=dm(e.elements.reference),w=Ym({reference:x,element:g,strategy:"absolute",placement:i}),k=sg(Object.assign({},g,w)),S=c===Nm?k:x,O={top:b.top-S.top+v.top,bottom:S.bottom-b.bottom+v.bottom,left:b.left-S.left+v.left,right:S.right-b.right+v.right},C=e.modifiersData.offset;if(c===Nm&&C){var M=C[i];Object.keys(O).forEach((function(e){var t=[Em,Tm].indexOf(e)>=0?1:-1,n=[Pm,Tm].indexOf(e)>=0?"y":"x";O[e]+=M[n]*t}))}return O}var hg={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=void 0===h||h,v=n.allowedAutoPlacements,m=t.options.placement,g=Um(m),y=l||(g===m||!p?[rg(m)]:function(e){if(Um(e)===Am)return[];var t=rg(e);return[og(e),t,og(t)]}(m)),b=[m].concat(y).reduce((function(e,n){return e.concat(Um(n)===Am?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?Im:l,c=Qm(r),f=c?s?Lm:Lm.filter((function(e){return Qm(e)===c})):Rm,d=f.filter((function(e){return u.indexOf(e)>=0}));0===d.length&&(d=f);var h=d.reduce((function(t,n){return t[n]=dg(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[Um(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:c,rootBoundary:f,padding:u,flipVariations:p,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,w=t.rects.popper,k=new Map,S=!0,O=b[0],C=0;C<b.length;C++){var M=b[C],P=Um(M),T=Qm(M)===Dm,E=[Pm,Tm].indexOf(P)>=0,Z=E?"width":"height",A=dg(t,{placement:M,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),R=E?T?Em:Zm:T?Tm:Pm;x[Z]>w[Z]&&(R=rg(R));var D=rg(R),j=[];if(o&&j.push(A[P]<=0),s&&j.push(A[R]<=0,A[D]<=0),j.every((function(e){return e}))){O=M,S=!1;break}k.set(M,j)}if(S)for(var _=function(e){var t=b.find((function(t){var n=k.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return O=t,"break"},N=p?3:1;N>0;N--){if("break"===_(N))break}t.placement!==O&&(t.modifiersData[r]._skip=!0,t.placement=O,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function pg(e,t,n){return um(e,cm(t,n))}var vg={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,f=n.padding,d=n.tether,h=void 0===d||d,p=n.tetherOffset,v=void 0===p?0:p,m=dg(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),g=Um(t.placement),y=Qm(t.placement),b=!y,x=Xm(g),w="x"===x?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,O=t.rects.popper,C="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,M="number"===typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(k){if(o){var E,Z="y"===x?Pm:Zm,A="y"===x?Tm:Em,R="y"===x?"height":"width",D=k[x],j=D+m[Z],_=D-m[A],N=h?-O[R]/2:0,L=y===Dm?S[R]:O[R],I=y===Dm?-O[R]:-S[R],z=t.elements.arrow,B=h&&z?xm(z):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},$=F[Z],W=F[A],H=pg(0,S[R],B[R]),V=b?S[R]/2-N-H-$-M.mainAxis:L-H-$-M.mainAxis,q=b?-S[R]/2+N+H+W+M.mainAxis:I+H+W+M.mainAxis,U=t.elements.arrow&&Mm(t.elements.arrow),Q=U?"y"===x?U.clientTop||0:U.clientLeft||0:0,X=null!=(E=null==P?void 0:P[x])?E:0,Y=D+q-X,G=pg(h?cm(j,D+V-X-Q):j,D,h?um(_,Y):_);k[x]=G,T[x]=G-D}if(s){var K,J="x"===x?Pm:Zm,ee="x"===x?Tm:Em,te=k[w],ne="y"===w?"height":"width",re=te+m[J],ie=te-m[ee],oe=-1!==[Pm,Zm].indexOf(g),ae=null!=(K=null==P?void 0:P[w])?K:0,se=oe?re:te-S[ne]-O[ne]-ae+M.altAxis,le=oe?te+S[ne]+O[ne]-ae-M.altAxis:ie,ue=h&&oe?function(e,t,n){var r=pg(e,t,n);return r>n?n:r}(se,te,le):pg(h?se:re,te,h?le:ie);k[w]=ue,T[w]=ue-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]};var mg={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Um(n.placement),l=Xm(s),u=[Zm,Em].indexOf(s)>=0?"height":"width";if(o&&a){var c=function(e,t){return cg("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:fg(e,Rm))}(i.padding,n),f=xm(o),d="y"===l?Pm:Zm,h="y"===l?Tm:Em,p=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],v=a[l]-n.rects.reference[l],m=Mm(o),g=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=p/2-v/2,b=c[d],x=g-f[u]-c[h],w=g/2-f[u]/2+y,k=pg(b,w,x),S=l;n.modifiersData[r]=((t={})[S]=k,t.centerOffset=k-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&ag(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gg(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function yg(e){return[Pm,Em,Tm,Zm].some((function(t){return e[t]>=0}))}var bg={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=dg(t,{elementContext:"reference"}),s=dg(t,{altBoundary:!0}),l=gg(a,r),u=gg(s,i,o),c=yg(l),f=yg(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}},xg=Hm({defaultModifiers:[qm,Gm,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,u={placement:Um(t.placement),variation:Qm(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Jm(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Jm(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},eg,tg,hg,vg,mg,bg]}),wg=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","TransitionProps"],kg=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"];function Sg(e){return"function"===typeof e?e():e}var Og={},Cg=e.forwardRef((function(t,n){var i=t.anchorEl,s=t.children,l=t.direction,u=t.disablePortal,c=t.modifiers,d=t.open,h=t.placement,v=t.popperOptions,m=t.popperRef,g=t.TransitionProps,y=(0,o.Z)(t,wg),b=e.useRef(null),x=(0,f.Z)(b,n),w=e.useRef(null),k=(0,f.Z)(w,m),S=e.useRef(k);(0,Ns.Z)((function(){S.current=k}),[k]),e.useImperativeHandle(m,(function(){return w.current}),[]);var O=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(h,l),C=e.useState(O),M=(0,r.Z)(C,2),P=M[0],T=M[1];e.useEffect((function(){w.current&&w.current.forceUpdate()})),(0,Ns.Z)((function(){if(i&&d){Sg(i);var e=[{name:"preventOverflow",options:{altBoundary:u}},{name:"flip",options:{altBoundary:u}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:function(e){var t=e.state;T(t.placement)}}];null!=c&&(e=e.concat(c)),v&&null!=v.modifiers&&(e=e.concat(v.modifiers));var t=xg(Sg(i),b.current,(0,a.Z)({placement:O},v,{modifiers:e}));return S.current(t),function(){t.destroy(),S.current(null)}}}),[i,u,c,d,v,O]);var E={placement:P};return null!==g&&(E.TransitionProps=g),(0,p.jsx)("div",(0,a.Z)({ref:x,role:"tooltip"},y,{children:"function"===typeof s?s(E):s}))})),Mg=e.forwardRef((function(t,n){var i=t.anchorEl,s=t.children,l=t.container,u=t.direction,c=void 0===u?"ltr":u,f=t.disablePortal,d=void 0!==f&&f,v=t.keepMounted,m=void 0!==v&&v,g=t.modifiers,y=t.open,b=t.placement,x=void 0===b?"bottom":b,w=t.popperOptions,k=void 0===w?Og:w,S=t.popperRef,O=t.style,C=t.transition,M=void 0!==C&&C,P=(0,o.Z)(t,kg),T=e.useState(!0),E=(0,r.Z)(T,2),Z=E[0],A=E[1];if(!m&&!y&&(!M||Z))return null;var R=l||(i?(0,h.Z)(Sg(i)).body:void 0);return(0,p.jsx)(xu,{disablePortal:d,container:R,children:(0,p.jsx)(Cg,(0,a.Z)({anchorEl:i,direction:c,disablePortal:d,modifiers:g,ref:n,open:M?!Z:y,placement:x,popperOptions:k,popperRef:S},P,{style:(0,a.Z)({position:"fixed",top:0,left:0,display:y||!m||M&&!Z?null:"none"},O),TransitionProps:M?{in:y,onEnter:function(){A(!1)},onExited:function(){A(!0)}}:null,children:s}))})})),Pg=Mg,Tg=n(4976),Eg=e.forwardRef((function(e,t){var n=(0,Tg.Z)();return(0,p.jsx)(Pg,(0,a.Z)({direction:null==n?void 0:n.direction},e,{ref:t}))})),Zg=Eg,Ag=n(7677);function Rg(e){return(0,q.Z)("MuiTooltip",e)}var Dg=(0,U.Z)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),jg=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"];var _g=(0,g.ZP)(Zg,{name:"MuiTooltip",slot:"Popper",overridesResolver:function(e,t){var n=e.ownerState;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((function(e){var t,n=e.theme,r=e.ownerState,o=e.open;return(0,a.Z)({zIndex:n.zIndex.tooltip,pointerEvents:"none"},!r.disableInteractive&&{pointerEvents:"auto"},!o&&{pointerEvents:"none"},r.arrow&&(t={},(0,i.Z)(t,'&[data-popper-placement*="bottom"] .'.concat(Dg.arrow),{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}}),(0,i.Z)(t,'&[data-popper-placement*="top"] .'.concat(Dg.arrow),{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}}),(0,i.Z)(t,'&[data-popper-placement*="right"] .'.concat(Dg.arrow),(0,a.Z)({},r.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}})),(0,i.Z)(t,'&[data-popper-placement*="left"] .'.concat(Dg.arrow),(0,a.Z)({},r.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})),t))})),Ng=(0,g.ZP)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:function(e,t){var n=e.ownerState;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t["tooltipPlacement".concat((0,O.Z)(n.placement.split("-")[0]))]]}})((function(e){var t,n,r=e.theme,o=e.ownerState;return(0,a.Z)({backgroundColor:(0,V.Fq)(r.palette.grey[700],.92),borderRadius:r.shape.borderRadius,color:r.palette.common.white,fontFamily:r.typography.fontFamily,padding:"4px 8px",fontSize:r.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:r.typography.fontWeightMedium},o.arrow&&{position:"relative",margin:0},o.touch&&{padding:"8px 16px",fontSize:r.typography.pxToRem(14),lineHeight:"".concat((n=16/14,Math.round(1e5*n)/1e5),"em"),fontWeight:r.typography.fontWeightRegular},(t={},(0,i.Z)(t,".".concat(Dg.popper,'[data-popper-placement*="left"] &'),(0,a.Z)({transformOrigin:"right center"},o.isRtl?(0,a.Z)({marginLeft:"14px"},o.touch&&{marginLeft:"24px"}):(0,a.Z)({marginRight:"14px"},o.touch&&{marginRight:"24px"}))),(0,i.Z)(t,".".concat(Dg.popper,'[data-popper-placement*="right"] &'),(0,a.Z)({transformOrigin:"left center"},o.isRtl?(0,a.Z)({marginRight:"14px"},o.touch&&{marginRight:"24px"}):(0,a.Z)({marginLeft:"14px"},o.touch&&{marginLeft:"24px"}))),(0,i.Z)(t,".".concat(Dg.popper,'[data-popper-placement*="top"] &'),(0,a.Z)({transformOrigin:"center bottom",marginBottom:"14px"},o.touch&&{marginBottom:"24px"})),(0,i.Z)(t,".".concat(Dg.popper,'[data-popper-placement*="bottom"] &'),(0,a.Z)({transformOrigin:"center top",marginTop:"14px"},o.touch&&{marginTop:"24px"})),t))})),Lg=(0,g.ZP)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:function(e,t){return t.arrow}})((function(e){var t=e.theme;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:(0,V.Fq)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}})),Ig=!1,zg=null;function Bg(e,t){return function(n){t&&t(n),e(n)}}var Fg=e.forwardRef((function(t,n){var i,s,l,f,d,h,v=(0,w.Z)({props:t,name:"MuiTooltip"}),m=v.arrow,g=void 0!==m&&m,y=v.children,b=v.components,k=void 0===b?{}:b,C=v.componentsProps,M=void 0===C?{}:C,P=v.describeChild,T=void 0!==P&&P,E=v.disableFocusListener,Z=void 0!==E&&E,A=v.disableHoverListener,R=void 0!==A&&A,D=v.disableInteractive,j=void 0!==D&&D,_=v.disableTouchListener,N=void 0!==_&&_,L=v.enterDelay,I=void 0===L?100:L,B=v.enterNextDelay,F=void 0===B?0:B,$=v.enterTouchDelay,W=void 0===$?700:$,V=v.followCursor,q=void 0!==V&&V,U=v.id,Q=v.leaveDelay,X=void 0===Q?0:Q,Y=v.leaveTouchDelay,G=void 0===Y?1500:Y,K=v.onClose,J=v.onOpen,ee=v.open,te=v.placement,ne=void 0===te?"bottom":te,re=v.PopperComponent,ie=v.PopperProps,oe=void 0===ie?{}:ie,ae=v.title,se=v.TransitionComponent,le=void 0===se?H:se,ue=v.TransitionProps,ce=(0,o.Z)(v,jg),fe=x(),de="rtl"===fe.direction,he=e.useState(),pe=(0,r.Z)(he,2),me=pe[0],ge=pe[1],ye=e.useState(null),be=(0,r.Z)(ye,2),xe=be[0],we=be[1],ke=e.useRef(!1),Se=j||q,Oe=e.useRef(),Ce=e.useRef(),Me=e.useRef(),Pe=e.useRef(),Te=(0,Tc.Z)({controlled:ee,default:!1,name:"Tooltip",state:"open"}),Ee=(0,r.Z)(Te,2),Ze=Ee[0],Ae=Ee[1],Re=Ze,De=(0,Ag.Z)(U),je=e.useRef(),_e=e.useCallback((function(){void 0!==je.current&&(document.body.style.WebkitUserSelect=je.current,je.current=void 0),clearTimeout(Pe.current)}),[]);e.useEffect((function(){return function(){clearTimeout(Oe.current),clearTimeout(Ce.current),clearTimeout(Me.current),_e()}}),[_e]);var Ne=function(e){clearTimeout(zg),Ig=!0,Ae(!0),J&&!Re&&J(e)},Le=(0,S.Z)((function(e){clearTimeout(zg),zg=setTimeout((function(){Ig=!1}),800+X),Ae(!1),K&&Re&&K(e),clearTimeout(Oe.current),Oe.current=setTimeout((function(){ke.current=!1}),fe.transitions.duration.shortest)})),Ie=function(e){ke.current&&"touchstart"!==e.type||(me&&me.removeAttribute("title"),clearTimeout(Ce.current),clearTimeout(Me.current),I||Ig&&F?Ce.current=setTimeout((function(){Ne(e)}),Ig?F:I):Ne(e))},ze=function(e){clearTimeout(Ce.current),clearTimeout(Me.current),Me.current=setTimeout((function(){Le(e)}),X)},Be=(0,ve.Z)(),Fe=Be.isFocusVisibleRef,$e=Be.onBlur,We=Be.onFocus,He=Be.ref,Ve=e.useState(!1),qe=(0,r.Z)(Ve,2)[1],Ue=function(e){$e(e),!1===Fe.current&&(qe(!1),ze(e))},Qe=function(e){me||ge(e.currentTarget),We(e),!0===Fe.current&&(qe(!0),Ie(e))},Xe=function(e){ke.current=!0;var t=y.props;t.onTouchStart&&t.onTouchStart(e)},Ye=Ie,Ge=ze;e.useEffect((function(){if(Re)return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Le(e)}}),[Le,Re]);var Ke=(0,z.Z)(ge,n),Je=(0,z.Z)(He,Ke),et=(0,z.Z)(y.ref,Je);""===ae&&(Re=!1);var tt=e.useRef({x:0,y:0}),nt=e.useRef(),rt={},it="string"===typeof ae;T?(rt.title=Re||!it||R?null:ae,rt["aria-describedby"]=Re?De:null):(rt["aria-label"]=it?ae:null,rt["aria-labelledby"]=Re&&!it?De:null);var ot=(0,a.Z)({},rt,ce,y.props,{className:(0,u.default)(ce.className,y.props.className),onTouchStart:Xe,ref:et},q?{onMouseMove:function(e){var t=y.props;t.onMouseMove&&t.onMouseMove(e),tt.current={x:e.clientX,y:e.clientY},nt.current&&nt.current.update()}}:{});var at={};N||(ot.onTouchStart=function(e){Xe(e),clearTimeout(Me.current),clearTimeout(Oe.current),_e(),je.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Pe.current=setTimeout((function(){document.body.style.WebkitUserSelect=je.current,Ie(e)}),W)},ot.onTouchEnd=function(e){y.props.onTouchEnd&&y.props.onTouchEnd(e),_e(),clearTimeout(Me.current),Me.current=setTimeout((function(){Le(e)}),G)}),R||(ot.onMouseOver=Bg(Ye,ot.onMouseOver),ot.onMouseLeave=Bg(Ge,ot.onMouseLeave),Se||(at.onMouseOver=Ye,at.onMouseLeave=Ge)),Z||(ot.onFocus=Bg(Qe,ot.onFocus),ot.onBlur=Bg(Ue,ot.onBlur),Se||(at.onFocus=Qe,at.onBlur=Ue));var st=e.useMemo((function(){var e,t=[{name:"arrow",enabled:Boolean(xe),options:{element:xe,padding:4}}];return null!=(e=oe.popperOptions)&&e.modifiers&&(t=t.concat(oe.popperOptions.modifiers)),(0,a.Z)({},oe.popperOptions,{modifiers:t})}),[xe,oe]),lt=(0,a.Z)({},v,{isRtl:de,arrow:g,disableInteractive:Se,placement:ne,PopperComponentProp:re,touch:ke.current}),ut=function(e){var t=e.classes,n=e.disableInteractive,r=e.arrow,i=e.touch,o=e.placement,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch","tooltipPlacement".concat((0,O.Z)(o.split("-")[0]))],arrow:["arrow"]};return(0,c.Z)(a,Rg,t)}(lt),ct=null!=(i=k.Popper)?i:_g,ft=null!=(s=null!=(l=k.Transition)?l:le)?s:H,dt=null!=(f=k.Tooltip)?f:Ng,ht=null!=(d=k.Arrow)?d:Lg,pt=im(ct,(0,a.Z)({},oe,M.popper),lt),vt=im(ft,(0,a.Z)({},ue,M.transition),lt),mt=im(dt,(0,a.Z)({},M.tooltip),lt),gt=im(ht,(0,a.Z)({},M.arrow),lt);return(0,p.jsxs)(e.Fragment,{children:[e.cloneElement(y,ot),(0,p.jsx)(ct,(0,a.Z)({as:null!=re?re:Zg,placement:ne,anchorEl:q?{getBoundingClientRect:function(){return{top:tt.current.y,left:tt.current.x,right:tt.current.x,bottom:tt.current.y,width:0,height:0}}}:me,popperRef:nt,open:!!me&&Re,id:De,transition:!0},at,pt,{className:(0,u.default)(ut.popper,null==oe?void 0:oe.className,null==(h=M.popper)?void 0:h.className),popperOptions:st,children:function(e){var t,n,r=e.TransitionProps;return(0,p.jsx)(ft,(0,a.Z)({timeout:fe.transitions.duration.shorter},r,vt,{children:(0,p.jsxs)(dt,(0,a.Z)({},mt,{className:(0,u.default)(ut.tooltip,null==(t=M.tooltip)?void 0:t.className),children:[ae,g?(0,p.jsx)(ht,(0,a.Z)({},gt,{className:(0,u.default)(ut.arrow,null==(n=M.arrow)?void 0:n.className),ref:we})):null]}))}))}}))]})})),$g=Fg;function Wg(e){return(0,q.Z)("MuiAccordionDetails",e)}(0,U.Z)("MuiAccordionDetails",["root"]);var Hg=["className"],Vg=(0,g.ZP)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){return{padding:e.theme.spacing(1,2,2)}})),qg=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiAccordionDetails"}),r=n.className,i=(0,o.Z)(n,Hg),s=n,l=function(e){var t=e.classes;return(0,c.Z)({root:["root"]},Wg,t)}(s);return(0,p.jsx)(Vg,(0,a.Z)({className:(0,u.default)(l.root,r),ref:t,ownerState:s},i))})),Ug=qg,Qg=n(4929);var Xg=e.createContext();function Yg(e){return(0,q.Z)("MuiGrid",e)}var Gg=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Kg=(0,U.Z)("MuiGrid",["root","container","item","zeroMinWidth"].concat((0,me.Z)([0,1,2,3,4,5,6,7,8,9,10].map((function(e){return"spacing-xs-".concat(e)}))),(0,me.Z)(["column-reverse","column","row-reverse","row"].map((function(e){return"direction-xs-".concat(e)}))),(0,me.Z)(["nowrap","wrap-reverse","wrap"].map((function(e){return"wrap-xs-".concat(e)}))),(0,me.Z)(Gg.map((function(e){return"grid-xs-".concat(e)}))),(0,me.Z)(Gg.map((function(e){return"grid-sm-".concat(e)}))),(0,me.Z)(Gg.map((function(e){return"grid-md-".concat(e)}))),(0,me.Z)(Gg.map((function(e){return"grid-lg-".concat(e)}))),(0,me.Z)(Gg.map((function(e){return"grid-xl-".concat(e)}))))),Jg=["className","columns","columnSpacing","component","container","direction","item","lg","md","rowSpacing","sm","spacing","wrap","xl","xs","zeroMinWidth"];function ey(e){var t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function ty(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n["spacing-xs-".concat(String(e))]||"spacing-xs-".concat(String(e))];var r=e.xs,i=e.sm,o=e.md,a=e.lg,s=e.xl;return[Number(r)>0&&(n["spacing-xs-".concat(String(r))]||"spacing-xs-".concat(String(r))),Number(i)>0&&(n["spacing-sm-".concat(String(i))]||"spacing-sm-".concat(String(i))),Number(o)>0&&(n["spacing-md-".concat(String(o))]||"spacing-md-".concat(String(o))),Number(a)>0&&(n["spacing-lg-".concat(String(a))]||"spacing-lg-".concat(String(a))),Number(s)>0&&(n["spacing-xl-".concat(String(s))]||"spacing-xl-".concat(String(s)))]}var ny=(0,g.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState,r=n.container,i=n.direction,o=n.item,a=n.lg,s=n.md,l=n.sm,u=n.spacing,c=n.wrap,f=n.xl,d=n.xs,h=n.zeroMinWidth;return[t.root,r&&t.container,o&&t.item,h&&t.zeroMinWidth].concat((0,me.Z)(ty(u,r,t)),["row"!==i&&t["direction-xs-".concat(String(i))],"wrap"!==c&&t["wrap-xs-".concat(String(c))],!1!==d&&t["grid-xs-".concat(String(d))],!1!==l&&t["grid-sm-".concat(String(l))],!1!==s&&t["grid-md-".concat(String(s))],!1!==a&&t["grid-lg-".concat(String(a))],!1!==f&&t["grid-xl-".concat(String(f))]])}})((function(e){var t=e.ownerState;return(0,a.Z)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"nowrap"===t.wrap&&{flexWrap:"nowrap"},"reverse"===t.wrap&&{flexWrap:"wrap-reverse"})}),(function(e){var t=e.theme,n=e.ownerState,r=(0,Qg.P$)({values:n.direction,breakpoints:t.breakpoints.values});return(0,Qg.k9)({theme:t},r,(function(e){var t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(Kg.item)]={maxWidth:"none"}),t}))}),(function(e){var t=e.theme,n=e.ownerState,r=n.container,o=n.rowSpacing,a={};if(r&&0!==o){var s=(0,Qg.P$)({values:o,breakpoints:t.breakpoints.values});a=(0,Qg.k9)({theme:t},s,(function(e){var n=t.spacing(e);return"0px"!==n?(0,i.Z)({marginTop:"-".concat(ey(n))},"& > .".concat(Kg.item),{paddingTop:ey(n)}):{}}))}return a}),(function(e){var t=e.theme,n=e.ownerState,r=n.container,o=n.columnSpacing,a={};if(r&&0!==o){var s=(0,Qg.P$)({values:o,breakpoints:t.breakpoints.values});a=(0,Qg.k9)({theme:t},s,(function(e){var n=t.spacing(e);return"0px"!==n?(0,i.Z)({width:"calc(100% + ".concat(ey(n),")"),marginLeft:"-".concat(ey(n))},"& > .".concat(Kg.item),{paddingLeft:ey(n)}):{}}))}return a}),(function(e){var t,n=e.theme,r=e.ownerState;return n.breakpoints.keys.reduce((function(e,i){var o={};if(r[i]&&(t=r[i]),!t)return e;if(!0===t)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{var s=(0,Qg.P$)({values:r.columns,breakpoints:n.breakpoints.values}),l="object"===typeof s?s[i]:s;if(void 0===l||null===l)return e;var u="".concat(Math.round(t/l*1e8)/1e6,"%"),c={};if(r.container&&r.item&&0!==r.columnSpacing){var f=n.spacing(r.columnSpacing);if("0px"!==f){var d="calc(".concat(u," + ").concat(ey(f),")");c={flexBasis:d,maxWidth:d}}}o=(0,a.Z)({flexBasis:u,flexGrow:0,maxWidth:u},c)}return 0===n.breakpoints.values[i]?Object.assign(e,o):e[n.breakpoints.up(i)]=o,e}),{})})),ry=e.forwardRef((function(t,n){var r,i=jt((0,w.Z)({props:t,name:"MuiGrid"})),s=i.className,l=i.columns,f=i.columnSpacing,d=i.component,h=void 0===d?"div":d,v=i.container,m=void 0!==v&&v,g=i.direction,y=void 0===g?"row":g,b=i.item,x=void 0!==b&&b,k=i.lg,S=void 0!==k&&k,O=i.md,C=void 0!==O&&O,M=i.rowSpacing,P=i.sm,T=void 0!==P&&P,E=i.spacing,Z=void 0===E?0:E,A=i.wrap,R=void 0===A?"wrap":A,D=i.xl,j=void 0!==D&&D,_=i.xs,N=void 0!==_&&_,L=i.zeroMinWidth,I=void 0!==L&&L,z=(0,o.Z)(i,Jg),B=M||Z,F=f||Z,$=e.useContext(Xg),W=l||$||12,H=(0,a.Z)({},i,{columns:W,container:m,direction:y,item:x,lg:S,md:C,sm:T,rowSpacing:B,columnSpacing:F,wrap:R,xl:j,xs:N,zeroMinWidth:I}),V=function(e){var t=e.classes,n=e.container,r=e.direction,i=e.item,o=e.lg,a=e.md,s=e.sm,l=e.spacing,u=e.wrap,f=e.xl,d=e.xs,h={root:["root",n&&"container",i&&"item",e.zeroMinWidth&&"zeroMinWidth"].concat((0,me.Z)(ty(l,n)),["row"!==r&&"direction-xs-".concat(String(r)),"wrap"!==u&&"wrap-xs-".concat(String(u)),!1!==d&&"grid-xs-".concat(String(d)),!1!==s&&"grid-sm-".concat(String(s)),!1!==a&&"grid-md-".concat(String(a)),!1!==o&&"grid-lg-".concat(String(o)),!1!==f&&"grid-xl-".concat(String(f))])};return(0,c.Z)(h,Yg,t)}(H);return r=(0,p.jsx)(ny,(0,a.Z)({ownerState:H,className:(0,u.default)(V.root,s),as:h,ref:n},z)),12!==W?(0,p.jsx)(Xg.Provider,{value:W,children:r}):r})),iy=ry;function oy(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,jv.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ay(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}function sy(e){return sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sy(e)}function ly(e){return ly="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ly(e)}function uy(e,t){if(t&&("object"===ly(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ye(e)}function cy(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sy(e);if(t){var i=sy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return uy(this,n)}}function fy(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=sy(e)););return e}function dy(){return dy="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=fy(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dy.apply(this,arguments)}for(var hy="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((function(e){return e?parseInt(e,36):1})),py=1;py<hy.length;py++)hy[py]+=hy[py-1];function vy(e){for(var t=1;t<hy.length;t+=2)if(hy[t]>e)return hy[t-1]<=e;return!1}function my(e){return e>=127462&&e<=127487}function gy(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(n?yy:by)(e,t)}function yy(e,t){if(t==e.length)return t;t&&xy(e.charCodeAt(t))&&wy(e.charCodeAt(t-1))&&t--;var n=ky(e,t);for(t+=Oy(n);t<e.length;){var r=ky(e,t);if(8205==n||8205==r||vy(r))t+=Oy(r),n=r;else{if(!my(r))break;for(var i=0,o=t-2;o>=0&&my(ky(e,o));)i++,o-=2;if(i%2==0)break;t+=2}}return t}function by(e,t){for(;t>0;){var n=yy(e,t-2);if(n<t)return n;t--}return 0}function xy(e){return e>=56320&&e<57344}function wy(e){return e>=55296&&e<56320}function ky(e,t){var n=e.charCodeAt(t);if(!wy(n)||t+1==e.length)return n;var r=e.charCodeAt(t+1);return xy(r)?r-56320+(n-55296<<10)+65536:n}function Sy(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function Oy(e){return e<65536?1:2}function Cy(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0;i<n;)9==e.charCodeAt(i)?(r+=t-r%t,i++):(r++,i=gy(e,i));return r}function My(e,t,n,r){for(var i=0,o=0;;){if(o>=t)return i;if(i==e.length)break;o+=9==e.charCodeAt(i)?n-o%n:1,i=gy(e,i)}return!0===r?-1:e.length}var Py=function(){function e(){wu(this,e)}return Su(e,[{key:"lineAt",value:function(e){if(e<0||e>this.length)throw new RangeError("Invalid position ".concat(e," in document of length ").concat(this.length));return this.lineInner(e,!1,1,0)}},{key:"line",value:function(e){if(e<1||e>this.lines)throw new RangeError("Invalid line number ".concat(e," in ").concat(this.lines,"-line document"));return this.lineInner(e,!0,1,0)}},{key:"replace",value:function(e,t,n){var r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Ey.from(r,this.length-(t-e)+n.length)}},{key:"append",value:function(e){return this.replace(this.length,this.length,e)}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=[];return this.decompose(e,t,n,0),Ey.from(n,t-e)}},{key:"eq",value:function(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;for(var t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Dy(this),i=new Dy(e),o=t,a=t;;){if(r.next(o),i.next(o),o=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}},{key:"iter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new Dy(this,e)}},{key:"iterRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return new jy(this,e,t)}},{key:"iterLines",value:function(e,t){var n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);var r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new _y(n)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var e=[];return this.flatten(e),e}}],[{key:"of",value:function(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new Ty(t):Ey.from(Ty.split(t,[])):e.empty}}]),e}(),Ty=function(e){ay(n,e);var t=cy(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zy(e);return wu(this,n),(r=t.call(this)).text=e,r.length=i,r}return Su(n,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(e,t,n,r){for(var i=0;;i++){var o=this.text[i],a=r+o.length;if((t?n:a)>=e)return new Ny(r,a,n,o);r=a+1,n++}}},{key:"decompose",value:function(e,t,r,i){var o=e<=0&&t>=this.length?this:new n(Ry(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&i){var a=r.pop(),s=Ay(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new n(s,a.length+o.length));else{var l=s.length>>1;r.push(new n(s.slice(0,l)),new n(s.slice(l)))}}else r.push(o)}},{key:"replace",value:function(e,t,r){if(!(r instanceof n))return dy(sy(n.prototype),"replace",this).call(this,e,t,r);var i=Ay(this.text,Ay(r.text,Ry(this.text,0,e)),t),o=this.length+r.length-(t-e);return i.length<=32?new n(i,o):Ey.from(n.split(i,[]),o)}},{key:"sliceString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;i<=t&&o<this.text.length;o++){var a=this.text[o],s=i+a.length;i>e&&o&&(r+=n),e<s&&t>i&&(r+=a.slice(Math.max(0,e-i),t-i)),i=s+1}return r}},{key:"flatten",value:function(e){var t,n=oy(this.text);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.push(r)}}catch(i){n.e(i)}finally{n.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(e,t){var r,i=[],o=-1,a=oy(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.push(s),o+=s.length+1,32==i.length&&(t.push(new n(i,o)),i=[],o=-1)}}catch(l){a.e(l)}finally{a.f()}return o>-1&&t.push(new n(i,o)),t}}]),n}(Py),Ey=function(e){ay(n,e);var t=cy(n);function n(e,r){var i;wu(this,n),(i=t.call(this)).children=e,i.length=r,i.lines=0;var o,a=oy(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;i.lines+=s.lines}}catch(l){a.e(l)}finally{a.f()}return i}return Su(n,[{key:"lineInner",value:function(e,t,n,r){for(var i=0;;i++){var o=this.children[i],a=r+o.length,s=n+o.lines-1;if((t?s:a)>=e)return o.lineInner(e,t,n,r);r=a+1,n=s+1}}},{key:"decompose",value:function(e,t,n,r){for(var i=0,o=0;o<=t&&i<this.children.length;i++){var a=this.children[i],s=o+a.length;if(e<=s&&t>=o){var l=r&((o<=e?1:0)|(s>=t?2:0));o>=e&&s<=t&&!l?n.push(a):a.decompose(e-o,t-o,n,l)}o=s+1}}},{key:"replace",value:function(e,t,r){if(r.lines<this.lines)for(var i=0,o=0;i<this.children.length;i++){var a=this.children[i],s=o+a.length;if(e>=o&&t<=s){var l=a.replace(e-o,t-o,r),u=this.lines-a.lines+l.lines;if(l.lines<u>>4&&l.lines>u>>6){var c=this.children.slice();return c[i]=l,new n(c,this.length-(t-e)+r.length)}return dy(sy(n.prototype),"replace",this).call(this,o,s,l)}o=s+1}return dy(sy(n.prototype),"replace",this).call(this,e,t,r)}},{key:"sliceString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;i<this.children.length&&o<=t;i++){var a=this.children[i],s=o+a.length;o>e&&i&&(r+=n),e<s&&t>o&&(r+=a.sliceString(e-o,t-o,n)),o=s+1}return r}},{key:"flatten",value:function(e){var t,n=oy(this.children);try{for(n.s();!(t=n.n()).done;){t.value.flatten(e)}}catch(r){n.e(r)}finally{n.f()}}},{key:"scanIdentical",value:function(e,t){if(!(e instanceof n))return 0;for(var i=0,o=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1],a=(0,r.Z)(o,4),s=a[0],l=a[1],u=a[2],c=a[3];;s+=t,l+=t){if(s==u||l==c)return i;var f=this.children[s],d=e.children[l];if(f!=d)return i+f.scanIdentical(d,t);i+=f.length+1}}}],[{key:"from",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.reduce((function(e,t){return e+t.length+1}),-1),i=0,o=oy(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;i+=a.lines}}catch(S){o.e(S)}finally{o.f()}if(i<32){var s,l=[],u=oy(e);try{for(u.s();!(s=u.n()).done;){var c=s.value;c.flatten(l)}}catch(S){u.e(S)}finally{u.f()}return new Ty(l,r)}var f=Math.max(32,i>>5),d=f<<1,h=f>>1,p=[],v=0,m=-1,g=[];function y(e){var t;if(e.lines>d&&e instanceof n){var r,i=oy(e.children);try{for(i.s();!(r=i.n()).done;){y(r.value)}}catch(S){i.e(S)}finally{i.f()}}else e.lines>h&&(v>h||!v)?(b(),p.push(e)):e instanceof Ty&&v&&(t=g[g.length-1])instanceof Ty&&e.lines+t.lines<=32?(v+=e.lines,m+=e.length+1,g[g.length-1]=new Ty(t.text.concat(e.text),t.length+1+e.length)):(v+e.lines>f&&b(),v+=e.lines,m+=e.length+1,g.push(e))}function b(){0!=v&&(p.push(1==g.length?g[0]:n.from(g,m)),m=-1,v=g.length=0)}var x,w=oy(e);try{for(w.s();!(x=w.n()).done;){var k=x.value;y(k)}}catch(S){w.e(S)}finally{w.f()}return b(),1==p.length?p[0]:new n(p,r)}}]),n}(Py);function Zy(e){var t,n=-1,r=oy(e);try{for(r.s();!(t=r.n()).done;){n+=t.value.length+1}}catch(i){r.e(i)}finally{r.f()}return n}function Ay(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,i=0,o=0,a=!0;o<e.length&&i<=r;o++){var s=e[o],l=i+s.length;l>=n&&(l>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),a?(t[t.length-1]+=s,a=!1):t.push(s)),i=l+1}return t}function Ry(e,t,n){return Ay(e,[""],t,n)}Py.empty=new Ty([""],0);var Dy=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;wu(this,e),this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[n>0?1:(t instanceof Ty?t.text.length:t.children.length)<<1]}return Su(e,[{key:"nextInner",value:function(e,t){for(this.done=this.lineBreak=!1;;){var n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,a=r instanceof Ty?r.text.length:r.children.length;if(o==(t>0?a:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof Ty){var s=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,s.length>Math.max(0,e))return this.value=0==e?s:t>0?s.slice(e):s.slice(0,s.length-e),this;e-=s.length}else{var l=r.children[o+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof Ty?l.text.length:l.children.length)<<1))}}}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}]),e}(),jy=function(){function e(t,n,r){wu(this,e),this.value="",this.done=!1,this.cursor=new Dy(t,n>r?-1:1),this.pos=n>r?t.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}return Su(e,[{key:"nextInner",value:function(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);var n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;var r=this.cursor.next(e).value;return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),e}(),_y=function(){function e(t){wu(this,e),this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}return Su(e,[{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.inner.next(e),n=t.done,r=t.lineBreak,i=t.value;return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),e}();"undefined"!=typeof Symbol&&(Py.prototype[Symbol.iterator]=function(){return this.iter()},Dy.prototype[Symbol.iterator]=jy.prototype[Symbol.iterator]=_y.prototype[Symbol.iterator]=function(){return this});var Ny=function(){function e(t,n,r,i){wu(this,e),this.from=t,this.to=n,this.number=r,this.text=i}return Su(e,[{key:"length",get:function(){return this.to-this.from}}]),e}(),Ly=/\r\n?|\n/,Iy=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(Iy||(Iy={})),zy=function(){function e(t){wu(this,e),this.sections=t}return Su(e,[{key:"length",get:function(){for(var e=0,t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}},{key:"newLength",get:function(){for(var e=0,t=0;t<this.sections.length;t+=2){var n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}},{key:"empty",get:function(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}},{key:"iterGaps",value:function(e){for(var t=0,n=0,r=0;t<this.sections.length;){var i=this.sections[t++],o=this.sections[t++];o<0?(e(n,r,i),r+=i):r+=o,n+=i}}},{key:"iterChangedRanges",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Wy(this,e,t)}},{key:"invertedDesc",get:function(){for(var t=[],n=0;n<this.sections.length;){var r=this.sections[n++],i=this.sections[n++];i<0?t.push(r,i):t.push(i,r)}return new e(t)}},{key:"composeDesc",value:function(e){return this.empty?e:e.empty?this:Vy(this,e)}},{key:"mapDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:Hy(this,e,t)}},{key:"mapPos",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Iy.Simple,r=0,i=0,o=0;o<this.sections.length;){var a=this.sections[o++],s=this.sections[o++],l=r+a;if(s<0){if(l>e)return i+(e-r);i+=a}else{if(n!=Iy.Simple&&l>=e&&(n==Iy.TrackDel&&r<e&&l>e||n==Iy.TrackBefore&&r<e||n==Iy.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!a)return e==r||t<0?i:i+s;i+=s}r=l}if(e>r)throw new RangeError("Position ".concat(e," is out of range for changeset of length ").concat(r));return i}},{key:"touchesRange",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=0,r=0;n<this.sections.length&&r<=t;){var i=this.sections[n++],o=this.sections[n++],a=r+i;if(o>=0&&r<=t&&a>=e)return!(r<e&&a>t)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var e="",t=0;t<this.sections.length;){var n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(t){if(!Array.isArray(t)||t.length%2||t.some((function(e){return"number"!=typeof e})))throw new RangeError("Invalid JSON representation of ChangeDesc");return new e(t)}}]),e}(),By=function(e){ay(n,e);var t=cy(n);function n(e,r){var i;return wu(this,n),(i=t.call(this,e)).inserted=r,i}return Su(n,[{key:"apply",value:function(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Wy(this,(function(t,n,r,i,o){return e=e.replace(r,r+(n-t),o)}),!1),e}},{key:"mapDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Hy(this,e,t,!0)}},{key:"invert",value:function(e){for(var t=this.sections.slice(),r=[],i=0,o=0;i<t.length;i+=2){var a=t[i],s=t[i+1];if(s>=0){t[i]=s,t[i+1]=a;for(var l=i>>1;r.length<l;)r.push(Py.empty);r.push(a?e.slice(o,o+a):Py.empty)}o+=a}return new n(t,r)}},{key:"compose",value:function(e){return this.empty?e:e.empty?this:Vy(this,e,!0)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:Hy(this,e,t,!0)}},{key:"iterChanges",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Wy(this,e,t)}},{key:"desc",get:function(){return new zy(this.sections)}},{key:"filter",value:function(e){var t=[],r=[],i=[],o=new qy(this);e:for(var a=0,s=0;;){for(var l=a==e.length?1e9:e[a++];s<l||s==l&&0==o.len;){if(o.done)break e;var u=Math.min(o.len,l-s);Fy(i,u,-1);var c=-1==o.ins?-1:0==o.off?o.ins:0;Fy(t,u,c),c>0&&$y(r,t,o.text),o.forward(u),s+=u}for(var f=e[a++];s<f;){if(o.done)break e;var d=Math.min(o.len,f-s);Fy(t,d,-1),Fy(i,d,-1==o.ins?-1:0==o.off?o.ins:0),o.forward(d),s+=d}}return{changes:new n(t,r),filtered:new zy(i)}}},{key:"toJSON",value:function(){for(var e=[],t=0;t<this.sections.length;t+=2){var n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}}],[{key:"of",value:function(e,t,r){var i=[],o=[],a=0,s=null;function l(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||i.length){a<t&&Fy(i,t-a,-1);var r=new n(i,o);s=s?s.compose(r.map(s)):r,i=[],o=[],a=0}}return function e(u){if(Array.isArray(u)){var c,f=oy(u);try{for(f.s();!(c=f.n()).done;){e(c.value)}}catch(y){f.e(y)}finally{f.f()}}else if(u instanceof n){if(u.length!=t)throw new RangeError("Mismatched change set length (got ".concat(u.length,", expected ").concat(t,")"));l(),s=s?s.compose(u.map(s)):u}else{var d=u.from,h=u.to,p=void 0===h?d:h,v=u.insert;if(d>p||d<0||p>t)throw new RangeError("Invalid change range ".concat(d," to ").concat(p," (in doc of length ").concat(t,")"));var m=v?"string"==typeof v?Py.of(v.split(r||Ly)):v:Py.empty,g=m.length;if(d==p&&0==g)return;d<a&&l(),d>a&&Fy(i,d-a,-1),Fy(i,p-d,g),$y(o,i,m),a=p}}(e),l(!s),s}},{key:"empty",value:function(e){return new n(e?[e,-1]:[],[])}},{key:"fromJSON",value:function(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");for(var t=[],r=[],i=0;i<e.length;i++){var o=e[i];if("number"==typeof o)t.push(o,-1);else{if(!Array.isArray(o)||"number"!=typeof o[0]||o.some((function(e,t){return t&&"string"!=typeof e})))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)t.push(o[0],0);else{for(;r.length<i;)r.push(Py.empty);r[i]=Py.of(o.slice(1)),t.push(o[0],r[i].length)}}}return new n(t,r)}}]),n}(zy);function Fy(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!(0==t&&n<=0)){var i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}}function $y(e,t,n){if(0!=n.length){var r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(Py.empty);e.push(n)}}}function Wy(e,t,n){for(var r=e.inserted,i=0,o=0,a=0;a<e.sections.length;){var s=e.sections[a++],l=e.sections[a++];if(l<0)i+=s,o+=s;else{for(var u=i,c=o,f=Py.empty;u+=s,c+=l,l&&r&&(f=f.append(r[a-2>>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],l=e.sections[a++];t(i,u,o,c,f),i=u,o=c}}}function Hy(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=[],o=r?[]:null,a=new qy(e),s=new qy(t),l=0,u=0;;)if(-1==a.ins)l+=a.len,a.next();else if(-1==s.ins&&u<l){var c=Math.min(s.len,l-u);s.forward(c),Fy(i,c,-1),u+=c}else if(s.ins>=0&&(a.done||u<l||u==l&&(s.len<a.len||s.len==a.len&&!n))){for(Fy(i,s.ins,-1);l>u&&!a.done&&l+a.len<u+s.len;)l+=a.len,a.next();u+=s.len,s.next()}else{if(!(a.ins>=0)){if(a.done&&s.done)return o?new By(i,o):new zy(i);throw new Error("Mismatched change set lengths")}for(var f=0,d=l+a.len;;)if(s.ins>=0&&u>l&&u+s.len<d)f+=s.ins,u+=s.len,s.next();else{if(!(-1==s.ins&&u<d))break;var h=Math.min(s.len,d-u);f+=h,s.forward(h),u+=h}Fy(i,f,a.ins),o&&$y(o,i,a.text),l=d,a.next()}}function Vy(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],i=n?[]:null,o=new qy(e),a=new qy(t),s=!1;;){if(o.done&&a.done)return i?new By(r,i):new zy(r);if(0==o.ins)Fy(r,o.len,0,s),o.next();else if(0!=a.len||a.done){if(o.done||a.done)throw new Error("Mismatched change set lengths");var l=Math.min(o.len2,a.len),u=r.length;if(-1==o.ins){var c=-1==a.ins?-1:a.off?0:a.ins;Fy(r,l,c,s),i&&c&&$y(i,r,a.text)}else-1==a.ins?(Fy(r,o.off?0:o.len,l,s),i&&$y(i,r,o.textBit(l))):(Fy(r,o.off?0:o.len,a.off?0:a.ins,s),i&&!a.off&&$y(i,r,a.text));s=(o.ins>l||a.ins>=0&&a.len>l)&&(s||r.length>u),o.forward2(l),a.forward(l)}else Fy(r,0,a.ins,s),i&&$y(i,r,a.text),a.next()}}var qy=function(){function e(t){wu(this,e),this.set=t,this.i=0,this.next()}return Su(e,[{key:"next",value:function(){var e=this.set.sections;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}},{key:"done",get:function(){return-2==this.ins}},{key:"len2",get:function(){return this.ins<0?this.len:this.ins}},{key:"text",get:function(){var e=this.set.inserted,t=this.i-2>>1;return t>=e.length?Py.empty:e[t]}},{key:"textBit",value:function(e){var t=this.set.inserted,n=this.i-2>>1;return n>=t.length&&!e?Py.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}},{key:"forward",value:function(e){e==this.len?this.next():(this.len-=e,this.off+=e)}},{key:"forward2",value:function(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}]),e}(),Uy=function(){function e(t,n,r){wu(this,e),this.from=t,this.to=n,this.flags=r}return Su(e,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var e=3&this.flags;return 3==e?null:e}},{key:"goalColumn",get:function(){var e=this.flags>>5;return 33554431==e?void 0:e}},{key:"map",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=t.mapPos(this.from,n),i=t.mapPos(this.to,n);return r==this.from&&i==this.to?this:new e(r,i,this.flags)}},{key:"extend",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e<=this.anchor&&t>=this.anchor)return Qy.range(e,t);var n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Qy.range(this.anchor,n)}},{key:"eq",value:function(e){return this.anchor==e.anchor&&this.head==e.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Qy.range(e.anchor,e.head)}}]),e}(),Qy=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;wu(this,e),this.ranges=t,this.mainIndex=n}return Su(e,[{key:"map",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t.empty?this:e.create(this.ranges.map((function(e){return e.map(t,n)})),this.mainIndex)}},{key:"eq",value:function(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}},{key:"main",get:function(){return this.ranges[this.mainIndex]}},{key:"asSingle",value:function(){return 1==this.ranges.length?this:new e([this.main])}},{key:"addRange",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}},{key:"replaceRange",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map((function(e){return e.toJSON()})),main:this.mainIndex}}}],[{key:"fromJSON",value:function(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new e(t.ranges.map((function(e){return Uy.fromJSON(e)})),t.main)}},{key:"single",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return new e([e.range(t,n)],0)}},{key:"create",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==t.length)throw new RangeError("A selection needs at least one range");for(var r=0,i=0;i<t.length;i++){var o=t[i];if(o.empty?o.from<=r:o.from<r)return Xy(t.slice(),n);r=o.to}return new e(t,n)}},{key:"cursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return new Uy(e,e,(0==t?0:t<0?4:8)|(null==n?3:Math.min(2,n))|(null!==r&&void 0!==r?r:33554431)<<5)}},{key:"range",value:function(e,t,n){var r=(null!==n&&void 0!==n?n:33554431)<<5;return t<e?new Uy(t,e,16|r):new Uy(e,t,r)}}]),e}();function Xy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e[t];e.sort((function(e,t){return e.from-t.from})),t=e.indexOf(n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(i.empty?i.from<=o.to:i.from<o.to){var a=o.from,s=Math.max(i.to,o.to);r<=t&&t--,e.splice(--r,2,i.anchor>i.head?Qy.range(s,a):Qy.range(a,s))}}return new Qy(e,t)}function Yy(e,t){var n,r=oy(e.ranges);try{for(r.s();!(n=r.n()).done;){if(n.value.to>t)throw new RangeError("Selection points outside of document")}}catch(i){r.e(i)}finally{r.f()}}var Gy=0,Ky=function(){function e(t,n,r,i,o){wu(this,e),this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=i,this.extensions=o,this.id=Gy++,this.default=t([])}return Su(e,[{key:"of",value:function(e){return new eb([],this,0,e)}},{key:"compute",value:function(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new eb(e,this,1,t)}},{key:"computeN",value:function(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new eb(e,this,2,t)}},{key:"from",value:function(e,t){return t||(t=function(e){return e}),this.compute([e],(function(n){return t(n.field(e))}))}}],[{key:"define",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t.combine||function(e){return e},t.compareInput||function(e,t){return e===t},t.compare||(t.combine?function(e,t){return e===t}:Jy),!!t.static,t.enables)}}]),e}();function Jy(e,t){return e==t||e.length==t.length&&e.every((function(e,n){return e===t[n]}))}var eb=function(){function e(t,n,r,i){wu(this,e),this.dependencies=t,this.facet=n,this.type=r,this.value=i,this.id=Gy++}return Su(e,[{key:"dynamicSlot",value:function(e){var t,n,r=this.value,i=this.facet.compareInput,o=e[this.id]>>1,a=2==this.type,s=!1,l=!1,u=[],c=oy(this.dependencies);try{for(c.s();!(n=c.n()).done;){var f=n.value;"doc"==f?s=!0:"selection"==f?l=!0:0==(1&(null!==(t=e[f.id])&&void 0!==t?t:1))&&u.push(e[f.id])}}catch(d){c.e(d)}finally{c.f()}return function(e,t){var n=e.values[o];if(n===pb)return e.values[o]=r(e),1;if(t&&(s&&t.docChanged||l&&(t.docChanged||t.selection)||u.some((function(t){return(1&vb(e,t))>0})))){var c=r(e);if(a?!function(e,t,n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}(c,n,i):!i(c,n))return e.values[o]=c,1}return 0}}}]),e}();var tb=Ky.define({static:!0}),nb=function(){function e(t,n,r,i,o){wu(this,e),this.id=t,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}return Su(e,[{key:"create",value:function(e){var t=this,n=e.facet(tb).find((function(e){return e.field==t}));return((null===n||void 0===n?void 0:n.create)||this.createF)(e)}},{key:"slot",value:function(e){var t=this,n=e[this.id]>>1;return function(e,r){var i=e.values[n];if(i===pb)return e.values[n]=t.create(e),1;if(r){var o=t.updateF(i,r);if(!t.compareF(i,o))return e.values[n]=o,1}return 0}}},{key:"init",value:function(e){return[this,tb.of({field:this,create:e})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(t){var n=new e(Gy++,t.create,t.update,t.compare||function(e,t){return e===t},t);return t.provide&&(n.provides=t.provide(n)),n}}]),e}(),rb=4,ib=3,ob=2,ab=1,sb=0;function lb(e){return function(t){return new cb(t,e)}}var ub={lowest:lb(rb),low:lb(ib),default:lb(ob),high:lb(ab),highest:lb(sb),fallback:lb(rb),extend:lb(ab),override:lb(sb)},cb=Su((function e(t,n){wu(this,e),this.inner=t,this.prec=n})),fb=function(){function e(){wu(this,e)}return Su(e,[{key:"of",value:function(e){return new db(this,e)}},{key:"reconfigure",value:function(t){return e.reconfigure.of({compartment:this,extension:t})}},{key:"get",value:function(e){return e.config.compartments.get(this)}}]),e}(),db=Su((function e(t,n){wu(this,e),this.compartment=t,this.inner=n})),hb=function(){function e(t,n,r,i,o){for(wu(this,e),this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}return Su(e,[{key:"staticFacet",value:function(e){var t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}}],[{key:"resolve",value:function(t,n,r){var i,o=[],a=Object.create(null),s=new Map,l=oy(function(e,t,n){var r=[[],[],[],[],[]],i=new Map;function o(e,a){var s=i.get(e);if(null!=s){if(s>=a)return;var l=r[s].indexOf(e);l>-1&&r[s].splice(l,1),e instanceof db&&n.delete(e.compartment)}if(i.set(e,a),Array.isArray(e)){var u,c=oy(e);try{for(c.s();!(u=c.n()).done;){o(u.value,a)}}catch(h){c.e(h)}finally{c.f()}}else if(e instanceof db){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");var f=t.get(e.compartment)||e.inner;n.set(e.compartment,f),o(f,a)}else if(e instanceof cb)o(e.inner,e.prec);else if(e instanceof nb)r[a].push(e),e.provides&&o(e.provides,a);else if(e instanceof eb)r[a].push(e),e.facet.extensions&&o(e.facet.extensions,a);else{var d=e.extension;if(!d)throw new Error("Unrecognized extension value in extension set (".concat(e,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));o(d,a)}}return o(e,ob),r.reduce((function(e,t){return e.concat(t)}))}(t,n,s));try{for(l.s();!(i=l.n()).done;){var u=i.value;u instanceof nb?o.push(u):(a[u.facet.id]||(a[u.facet.id]=[])).push(u)}}catch(O){l.e(O)}finally{l.f()}for(var c=Object.create(null),f=[],d=[],h=[],p=function(){var e=m[v];c[e.id]=d.length<<1,d.push((function(t){return e.slot(t)})),h.push([])},v=0,m=o;v<m.length;v++)p();var g=function(e){var t=a[e],n=t[0].facet;if(t.every((function(e){return 0==e.type}))){c[n.id]=f.length<<1|1;var i=n.combine(t.map((function(e){return e.value}))),o=r?r.config.address[n.id]:null;if(null!=o){var s=mb(r,o);n.compare(i,s)&&(i=s)}f.push(i)}else{var l,u=oy(t);try{var p=function(){var e=l.value;0==e.type?(c[e.id]=f.length<<1|1,f.push(e.value)):(c[e.id]=d.length<<1,d.push((function(t){return e.dynamicSlot(t)})),h.push(e.dependencies.filter((function(e){return"string"!=typeof e})).map((function(e){return e.id}))))};for(u.s();!(l=u.n()).done;)p()}catch(O){u.e(O)}finally{u.f()}c[n.id]=d.length<<1,d.push((function(e){return function(e,t,n){var r=n.map((function(t){return e[t.id]})),i=n.map((function(e){return e.type})),o=r.filter((function(e){return!(1&e)})),a=e[t.id]>>1;return function(e,n){var s,l=e.values[a],u=l===pb||!n,c=oy(o);try{for(c.s();!(s=c.n()).done;)1&vb(e,s.value)&&(u=!0)}catch(O){c.e(O)}finally{c.f()}if(!u)return 0;for(var f=[],d=0;d<r.length;d++){var h=mb(e,r[d]);if(2==i[d]){var p,v=oy(h);try{for(v.s();!(p=v.n()).done;){var m=p.value;f.push(m)}}catch(O){v.e(O)}finally{v.f()}}else f.push(h)}var g=t.combine(f);return l!==pb&&t.compare(g,l)?0:(e.values[a]=g,1)}}(e,n,t)})),h.push(t.filter((function(e){return 0!=e.type})).map((function(e){return e.id})))}};for(var y in a)g(y);var b=d.map((function(e){return pb}));if(r){var x=function e(t,n){if(n>7)return!1;var i=c[t];if(!(1&i))return h[i>>1].every((function(t){return e(t,n+1)}));var o=r.config.address[t];return null!=o&&mb(r,o)==f[i>>1]};for(var w in c){var k=c[w],S=r.config.address[w];null!=S&&0==(1&k)&&x(+w,0)&&(b[k>>1]=mb(r,S))}}return{configuration:new e(t,s,d.map((function(e){return e(c)})),c,f),values:b}}}]),e}();var pb={};function vb(e,t){if(1&t)return 2;var n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;var i=e.config.dynamicSlots[n](e,e.applying);return e.status[n]=2|i}function mb(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}var gb=Ky.define(),yb=Ky.define({combine:function(e){return e.some((function(e){return e}))},static:!0}),bb=Ky.define({combine:function(e){return e.length?e[0]:void 0},static:!0}),xb=Ky.define(),wb=Ky.define(),kb=Ky.define(),Sb=Ky.define({combine:function(e){return!!e.length&&e[0]}}),Ob=function(){function e(t,n){wu(this,e),this.type=t,this.value=n}return Su(e,null,[{key:"define",value:function(){return new Cb}}]),e}(),Cb=function(){function e(){wu(this,e)}return Su(e,[{key:"of",value:function(e){return new Ob(this,e)}}]),e}(),Mb=function(){function e(t){wu(this,e),this.map=t}return Su(e,[{key:"of",value:function(e){return new Pb(this,e)}}]),e}(),Pb=function(){function e(t,n){wu(this,e),this.type=t,this.value=n}return Su(e,[{key:"map",value:function(t){var n=this.type.map(this.value,t);return void 0===n?void 0:n==this.value?this:new e(this.type,n)}},{key:"is",value:function(e){return this.type==e}}],[{key:"define",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Mb(e.map||function(e){return e})}},{key:"mapEffects",value:function(e,t){if(!e.length)return e;var n,r=[],i=oy(e);try{for(i.s();!(n=i.n()).done;){var o=n.value.map(t);o&&r.push(o)}}catch(a){i.e(a)}finally{i.f()}return r}}]),e}();Pb.reconfigure=Pb.define(),Pb.appendConfig=Pb.define();var Tb=function(){function e(t,n,r,i,o,a){wu(this,e),this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&Yy(r,n.newLength),o.some((function(t){return t.type==e.time}))||(this.annotations=o.concat(e.time.of(Date.now())))}return Su(e,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(e){var t,n=oy(this.annotations);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.type==e)return r.value}}catch(i){n.e(i)}finally{n.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(t){var n=this.annotation(e.userEvent);return!(!n||!(n==t||n.length>t.length&&n.slice(0,t.length)==t&&"."==n[t.length]))}}]),e}();function Eb(e,t){for(var n=[],r=0,i=0;;){var o=void 0,a=void 0;if(r<e.length&&(i==t.length||t[i]>=e[r]))o=e[r++],a=e[r++];else{if(!(i<t.length))return n;o=t[i++],a=t[i++]}!n.length||n[n.length-1]<o?n.push(o,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function Zb(e,t,n){var r,i,o,a;return n?(i=t.changes,o=By.empty(t.changes.length),a=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(i)),{changes:a,selection:t.selection?t.selection.map(o):null===(r=e.selection)||void 0===r?void 0:r.map(i),effects:Pb.mapEffects(e.effects,i).concat(Pb.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function Ab(e,t,n){var r=t.selection,i=jb(t.annotations);return t.userEvent&&(i=i.concat(Tb.userEvent.of(t.userEvent))),{changes:t.changes instanceof By?t.changes:By.of(t.changes||[],n,e.facet(bb)),selection:r&&(r instanceof Qy?r:Qy.single(r.anchor,r.head)),effects:jb(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function Rb(e,t,n){var r=Ab(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(n=!1);for(var i=1;i<t.length;i++){!1===t[i].filter&&(n=!1);var o=!!t[i].sequential;r=Zb(r,Ab(e,t[i],o?r.changes.newLength:e.doc.length),o)}var a=new Tb(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){for(var t=e.startState,n=t.facet(kb),r=e,i=n.length-1;i>=0;i--){var o=n[i](e);o&&Object.keys(o).length&&(r=Zb(e,Ab(t,o,e.changes.newLength),!0))}return r==e?e:new Tb(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){var t,n=e.startState,r=!0,i=oy(n.facet(xb));try{for(i.s();!(t=i.n()).done;){var o=(0,t.value)(e);if(!1===o){r=!1;break}Array.isArray(o)&&(r=!0===r?o:Eb(r,o))}}catch(d){i.e(d)}finally{i.f()}if(!0!==r){var a,s;if(!1===r)s=e.changes.invertedDesc,a=By.empty(n.doc.length);else{var l=e.changes.filter(r);a=l.changes,s=l.filtered.invertedDesc}e=new Tb(n,a,e.selection&&e.selection.map(s),Pb.mapEffects(e.effects,s),e.annotations,e.scrollIntoView)}for(var u=n.facet(wb),c=u.length-1;c>=0;c--){var f=u[c](e);e=f instanceof Tb?f:Array.isArray(f)&&1==f.length&&f[0]instanceof Tb?f[0]:Rb(n,jb(f),!1)}return e}(a):a)}Tb.time=Ob.define(),Tb.userEvent=Ob.define(),Tb.addToHistory=Ob.define(),Tb.remote=Ob.define();var Db=[];function jb(e){return null==e?Db:Array.isArray(e)?e:[e]}var _b,Nb=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(Nb||(Nb={})),Lb=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{_b=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(lF){}function Ib(e){return function(t){if(!/\S/.test(t))return Nb.Space;if(function(e){if(_b)return _b.test(e);for(var t=0;t<e.length;t++){var n=e[t];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||Lb.test(n)))return!0}return!1}(t))return Nb.Word;for(var n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Nb.Word;return Nb.Other}}var zb=function(){function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;wu(this,e),this.config=t,this.doc=n,this.selection=r,this.values=i,this.applying=null,this.status=t.statusTemplate.slice(),this.applying=o,o&&(o._state=this);for(var a=0;a<this.config.dynamicSlots.length;a++)vb(this,a<<1);this.applying=null}return Su(e,[{key:"field",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.config.address[e.id];if(null!=n)return vb(this,n),mb(this,n);if(t)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Rb(this,t,!0)}},{key:"applyTransaction",value:function(t){var n,r,i=this.config,o=i,a=o.base,s=o.compartments,l=oy(t.effects);try{for(l.s();!(n=l.n()).done;){var u=n.value;u.is(fb.reconfigure)?(i&&(s=new Map,i.compartments.forEach((function(e,t){return s.set(t,e)})),i=null),s.set(u.value.compartment,u.value.extension)):u.is(Pb.reconfigure)?(i=null,a=u.value):u.is(Pb.appendConfig)&&(i=null,a=jb(a).concat(u.value))}}catch(f){l.e(f)}finally{l.f()}if(i)r=t.startState.values.slice();else{var c=hb.resolve(a,s,this);r=new e(i=c.configuration,this.doc,this.selection,c.values,null).values}new e(i,t.newDoc,t.newSelection,r,t)}},{key:"replaceSelection",value:function(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((function(t){return{changes:{from:t.from,to:t.to,insert:e},range:Qy.cursor(t.from+e.length)}}))}},{key:"changeByRange",value:function(e){for(var t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],o=jb(n.effects),a=1;a<t.ranges.length;a++){for(var s=e(t.ranges[a]),l=this.changes(s.changes),u=l.map(r),c=0;c<a;c++)i[c]=i[c].map(u);var f=r.mapDesc(l,!0);i.push(s.range.map(f)),r=r.compose(u),o=Pb.mapEffects(o,u).concat(Pb.mapEffects(jb(s.effects),f))}return{changes:r,selection:Qy.create(i,t.mainIndex),effects:o}}},{key:"changes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof By?t:By.of(t,this.doc.length,this.facet(e.lineSeparator))}},{key:"toText",value:function(t){return Py.of(t.split(this.facet(e.lineSeparator)||Ly))}},{key:"sliceDoc",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length;return this.doc.sliceString(e,t,this.lineBreak)}},{key:"facet",value:function(e){var t=this.config.address[e.id];return null==t?e.default:(vb(this,t),mb(this,t))}},{key:"toJSON",value:function(e){var t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(var n in e){var r=e[n];r instanceof nb&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}},{key:"tabSize",get:function(){return this.facet(e.tabSize)}},{key:"lineBreak",get:function(){return this.facet(e.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(Sb)}},{key:"phrase",value:function(t){var n,r=oy(this.facet(e.phrases));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(Object.prototype.hasOwnProperty.call(i,t))return i[t]}}catch(o){r.e(o)}finally{r.f()}return t}},{key:"languageDataAt",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],o=oy(this.facet(gb));try{for(o.s();!(n=o.n()).done;){var a,s=n.value,l=oy(s(this,t,r));try{for(l.s();!(a=l.n()).done;){var u=a.value;Object.prototype.hasOwnProperty.call(u,e)&&i.push(u[e])}}catch(c){l.e(c)}finally{l.f()}}}catch(c){o.e(c)}finally{o.f()}return i}},{key:"charCategorizer",value:function(e){return Ib(this.languageDataAt("wordChars",e).join(""))}},{key:"wordAt",value:function(e){for(var t=this.doc.lineAt(e),n=t.text,r=t.from,i=t.length,o=this.charCategorizer(e),a=e-r,s=e-r;a>0;){var l=gy(n,a,!1);if(o(n.slice(l,a))!=Nb.Word)break;a=l}for(;s<i;){var u=gy(n,s);if(o(n.slice(s,u))!=Nb.Word)break;s=u}return a==s?null:Qy.range(a+r,s+r)}}],[{key:"fromJSON",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");var i=[];if(r){var o=function(e){var n=r[e],o=t[e];i.push(n.init((function(e){return n.spec.fromJSON(o,e)})))};for(var a in r)o(a)}return e.create({doc:t.doc,selection:Qy.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}},{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=hb.resolve(t.extensions||[],new Map),r=n.configuration,i=n.values,o=t.doc instanceof Py?t.doc:Py.of((t.doc||"").split(r.staticFacet(e.lineSeparator)||Ly)),a=t.selection?t.selection instanceof Qy?t.selection:Qy.single(t.selection.anchor,t.selection.head):Qy.single(0);return Yy(a,o.length),r.staticFacet(yb)||(a=a.asSingle()),new e(r,o,a,i)}}]),e}();function Bb(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={},o=oy(e);try{for(o.s();!(n=o.n()).done;)for(var a=n.value,s=0,l=Object.keys(a);s<l.length;s++){var u=l[s],c=a[u],f=i[u];if(void 0===f)i[u]=c;else if(f===c||void 0===c);else{if(!Object.hasOwnProperty.call(r,u))throw new Error("Config merge conflict for field "+u);i[u]=r[u](f,c)}}}catch(h){o.e(h)}finally{o.f()}for(var d in t)void 0===i[d]&&(i[d]=t[d]);return i}zb.allowMultipleSelections=yb,zb.tabSize=Ky.define({combine:function(e){return e.length?e[0]:4}}),zb.lineSeparator=bb,zb.readOnly=Sb,zb.phrases=Ky.define(),zb.languageData=gb,zb.changeFilter=xb,zb.transactionFilter=wb,zb.transactionExtender=kb,fb.reconfigure=Pb.define();var Fb="undefined"==typeof Symbol?"__\u037c":Symbol.for("\u037c"),$b="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Wb="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},Hb=function(){function e(t,n){wu(this,e),this.rules=[];var r=(n||{}).finish;function i(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function o(e,t,n,a){var s=[],l=/^@(\w+)\b/.exec(e[0]),u=l&&"keyframes"==l[1];if(l&&null==t)return n.push(e[0]+";");for(var c in t){var f=t[c];if(/&/.test(c))o(c.split(/,\s*/).map((function(t){return e.map((function(e){return t.replace(/&/,e)}))})).reduce((function(e,t){return e.concat(t)})),f,n);else if(f&&"object"==typeof f){if(!l)throw new RangeError("The value of a property ("+c+") should be a primitive value.");o(i(c),f,s,u)}else null!=f&&s.push(c.replace(/_.*/,"").replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}))+": "+f+";")}(s.length||u)&&n.push((!r||l||a?e:e.map(r)).join(", ")+" {"+s.join(" ")+"}")}for(var a in t)o(i(a),t[a],this.rules)}return Su(e,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var e=Wb[Fb]||1;return Wb[Fb]=e+1,"\u037c"+e.toString(36)}},{key:"mount",value:function(e,t){(e[$b]||new qb(e)).mount(Array.isArray(t)?t:[t])}}]),e}(),Vb=null,qb=function(){function e(t){if(wu(this,e),!t.head&&t.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(Vb)return t.adoptedStyleSheets=[Vb.sheet].concat(t.adoptedStyleSheets),t[$b]=Vb;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),Vb=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");var n=t.head||t;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],t[$b]=this}return Su(e,[{key:"mount",value:function(e){for(var t=this.sheet,n=0,r=0,i=0;i<e.length;i++){var o=e[i],a=this.modules.indexOf(o);if(a<r&&a>-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,o),t)for(var s=0;s<o.rules.length;s++)t.insertRule(o.rules[s],n++)}else{for(;r<a;)n+=this.modules[r++].rules.length;n+=o.rules.length,r++}}if(!t){for(var l="",u=0;u<this.modules.length;u++)l+=this.modules[u].getRules()+"\n";this.styleTag.textContent=l}}}]),e}(),Ub=function(){function e(){wu(this,e)}return Su(e,[{key:"eq",value:function(e){return this==e}},{key:"range",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new Qb(e,t,this)}}]),e}();Ub.prototype.startSide=Ub.prototype.endSide=0,Ub.prototype.point=!1,Ub.prototype.mapMode=Iy.TrackDel;var Qb=Su((function e(t,n,r){wu(this,e),this.from=t,this.to=n,this.value=r}));function Xb(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var Yb=function(){function e(t,n,r,i){wu(this,e),this.from=t,this.to=n,this.value=r,this.maxPoint=i}return Su(e,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n?this.to:this.from,o=r,a=i.length;;){if(o==a)return o;var s=o+a>>1,l=i[s]-e||(n?this.value[s].endSide:this.value[s].startSide)-t;if(s==o)return l>=0?o:a;l>=0?a=s:o=s+1}}},{key:"between",value:function(e,t,n,r){for(var i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i<o;i++)if(!1===r(this.from[i]+e,this.to[i]+e,this.value[i]))return!1}},{key:"map",value:function(t,n){for(var r=[],i=[],o=[],a=-1,s=-1,l=0;l<this.value.length;l++){var u=this.value[l],c=this.from[l]+t,f=this.to[l]+t,d=void 0,h=void 0;if(c==f){var p=n.mapPos(c,u.startSide,u.mapMode);if(null==p)continue;d=h=p}else if((d=n.mapPos(c,u.startSide))>(h=n.mapPos(f,u.endSide))||d==h&&u.startSide>0&&u.endSide<=0)continue;(h-d||u.endSide-u.startSide)<0||(a<0&&(a=d),u.point&&(s=Math.max(s,h-d)),r.push(u),i.push(d-a),o.push(h-a))}return{mapped:r.length?new e(i,o,r,s):null,pos:a}}}]),e}(),Gb=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.empty,i=arguments.length>3?arguments[3]:void 0;wu(this,e),this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=i}return Su(e,[{key:"length",get:function(){var e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var e,t=this.nextLayer.size,n=oy(this.chunk);try{for(n.s();!(e=n.n()).done;){t+=e.value.value.length}}catch(r){n.e(r)}finally{n.f()}return t}},{key:"chunkEnd",value:function(e){return this.chunkPos[e]+this.chunk[e].length}},{key:"update",value:function(t){var n=t.add,r=void 0===n?[]:n,i=t.sort,o=void 0!==i&&i,a=t.filterFrom,s=void 0===a?0:a,l=t.filterTo,u=void 0===l?this.length:l,c=t.filter;if(0==r.length&&!c)return this;if(o&&r.slice().sort(Xb),this.isEmpty)return r.length?e.of(r):this;for(var f=new tx(this,null,-1).goto(0),d=0,h=[],p=new Jb;f.value||d<r.length;)if(d<r.length&&(f.from-r[d].from||f.startSide-r[d].value.startSide)>=0){var v=r[d++];p.addInner(v.from,v.to,v.value)||h.push(v)}else 1==f.rangeIndex&&f.chunkIndex<this.chunk.length&&(d==r.length||this.chunkEnd(f.chunkIndex)<r[d].from)&&(!c||s>this.chunkEnd(f.chunkIndex)||u<this.chunkPos[f.chunkIndex])&&p.addChunk(this.chunkPos[f.chunkIndex],this.chunk[f.chunkIndex])?f.nextChunk():((!c||s>f.to||u<f.from||c(f.from,f.to,f.value))&&(p.addInner(f.from,f.to,f.value)||h.push(new Qb(f.from,f.to,f.value))),f.next());return p.finishInner(this.nextLayer.isEmpty&&!h.length?e.empty:this.nextLayer.update({add:h,filter:c,filterFrom:s,filterTo:u}))}},{key:"map",value:function(t){if(0==t.length||this.isEmpty)return this;for(var n=[],r=[],i=-1,o=0;o<this.chunk.length;o++){var a=this.chunkPos[o],s=this.chunk[o],l=t.touchesRange(a,a+s.length);if(!1===l)i=Math.max(i,s.maxPoint),n.push(s),r.push(t.mapPos(a));else if(!0===l){var u=s.map(a,t),c=u.mapped,f=u.pos;c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(f))}}var d=this.nextLayer.map(t);return 0==n.length?d:new e(r,n,d,i)}},{key:"between",value:function(e,t,n){if(!this.isEmpty){for(var r=0;r<this.chunk.length;r++){var i=this.chunkPos[r],o=this.chunk[r];if(t>=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}},{key:"iter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return nx.from([this]).goto(e)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"iter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return nx.from(e).goto(t)}},{key:"compare",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=e.filter((function(e){return e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i})),a=t.filter((function(e){return e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i})),s=ex(o,a,n),l=new ix(o,s,i),u=new ix(a,s,i);n.iterGaps((function(e,t,n){return ox(l,e,u,t,n,r)})),n.empty&&0==n.length&&ox(l,0,u,0,0,r)}},{key:"eq",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=1e9);var i=e.filter((function(e){return!e.isEmpty&&t.indexOf(e)<0})),o=t.filter((function(t){return!t.isEmpty&&e.indexOf(t)<0}));if(i.length!=o.length)return!1;if(!i.length)return!0;for(var a=ex(i,o),s=new ix(i,a,0).goto(n),l=new ix(o,a,0).goto(n);;){if(s.to!=l.to||!ax(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>r)return!0;s.next(),l.next()}}},{key:"spans",value:function(e,t,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=new ix(e,null,i).goto(t),a=t,s=o.openStart;;){var l=Math.min(o.to,n);if(o.point?(r.point(a,l,o.point,o.activeForPoint(o.to),s),s=o.openEnd(l)+(o.to>l?1:0)):l>a&&(r.span(a,l,o.active,s),s=o.openEnd(l)),o.to>n)break;a=o.to,o.next()}return s}},{key:"of",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Jb,i=oy(e instanceof Qb?[e]:n?Kb(e):e);try{for(i.s();!(t=i.n()).done;){var o=t.value;r.add(o.from,o.to,o.value)}}catch(a){i.e(a)}finally{i.f()}return r.finish()}}]),e}();function Kb(e){if(e.length>1)for(var t=e[0],n=1;n<e.length;n++){var r=e[n];if(Xb(t,r)>0)return e.slice().sort(Xb);t=r}return e}Gb.empty=new Gb([],[],null,-1),Gb.empty.nextLayer=Gb.empty;var Jb=function(){function e(){wu(this,e),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}return Su(e,[{key:"finishChunk",value:function(e){this.chunks.push(new Yb(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=[])}},{key:"add",value:function(t,n,r){this.addInner(t,n,r)||(this.nextLayer||(this.nextLayer=new e)).add(t,n,r)}},{key:"addInner",value:function(e,t,n){var r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}},{key:"addChunk",value:function(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);var n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}},{key:"finish",value:function(){return this.finishInner(Gb.empty)}},{key:"finishInner",value:function(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;var t=new Gb(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}]),e}();function ex(e,t,n){var r,i=new Map,o=oy(e);try{for(o.s();!(r=o.n()).done;)for(var a=r.value,s=0;s<a.chunk.length;s++)a.chunk[s].maxPoint<=0&&i.set(a.chunk[s],a.chunkPos[s])}catch(p){o.e(p)}finally{o.f()}var l,u=new Set,c=oy(t);try{for(c.s();!(l=c.n()).done;)for(var f=l.value,d=0;d<f.chunk.length;d++){var h=i.get(f.chunk[d]);null!=h&&(n?n.mapPos(h):h)==f.chunkPos[d]&&u.add(f.chunk[d])}}catch(p){c.e(p)}finally{c.f()}return u}var tx=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;wu(this,e),this.layer=t,this.skip=n,this.minPoint=r,this.rank=i}return Su(e,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}},{key:"gotoInner",value:function(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){var r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){var i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}},{key:"forward",value:function(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}},{key:"next",value:function(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}var e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}},{key:"setRangeIndex",value:function(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}},{key:"nextChunk",value:function(){this.chunkIndex++,this.rangeIndex=0,this.next()}},{key:"compare",value:function(e){return this.from-e.from||this.startSide-e.startSide||this.to-e.to||this.endSide-e.endSide}}]),e}(),nx=function(){function e(t){wu(this,e),this.heap=t}return Su(e,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"goto",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9,r=oy(this.heap);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.goto(e,n)}}catch(a){r.e(a)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)rx(this.heap,o);return this.next(),this}},{key:"forward",value:function(e,t){var n,r=oy(this.heap);try{for(r.s();!(n=r.n()).done;){n.value.forward(e,t)}}catch(o){r.e(o)}finally{r.f()}for(var i=this.heap.length>>1;i>=0;i--)rx(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),rx(this.heap,0)}}}],[{key:"from",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],o=0;o<t.length;o++)for(var a=t[o];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new tx(a,n,r,o));return 1==i.length?i[0]:new e(i)}}]),e}();function rx(e,t){for(var n=e[t];;){var r=1+(t<<1);if(r>=e.length)break;var i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var ix=function(){function e(t,n,r){wu(this,e),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=nx.from(t,n,r)}return Su(e,[{key:"goto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}},{key:"forward",value:function(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}},{key:"removeActive",value:function(e){sx(this.active,e),sx(this.activeTo,e),sx(this.activeRank,e),this.minActive=ux(this.active,this.activeTo)}},{key:"addActive",value:function(e){for(var t=0,n=this.cursor,r=n.value,i=n.to,o=n.rank;t<this.activeRank.length&&this.activeRank[t]<=o;)t++;lx(this.active,t,r),lx(this.activeTo,t,i),lx(this.activeRank,t,o),e&&lx(e,t,this.cursor.from),this.minActive=ux(this.active,this.activeTo)}},{key:"next",value:function(){var e=this.to,t=this.point;this.point=null;for(var n=this.openStart<0?[]:null,r=0;;){var 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),n&&sx(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.from<e&&(r=1),this.cursor.next(),this.to>e&&this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}if(n){for(var a=0;a<n.length&&n[a]<e;)a++;this.openStart=a+r}}},{key:"activeForPoint",value:function(e){if(!this.active.length)return this.active;for(var t=[],n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}},{key:"openEnd",value:function(e){for(var t=0,n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}]),e}();function ox(e,t,n,r,i,o){e.goto(t),n.goto(r);for(var a=r+i,s=r,l=r-t;;){var u=e.to+l-n.to||e.endSide-n.endSide,c=u<0?e.to+l:n.to,f=Math.min(c,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&ax(e.activeForPoint(e.to+l),n.activeForPoint(n.to))||o.comparePoint(s,f,e.point,n.point):f>s&&!ax(e.active,n.active)&&o.compareRange(s,f,e.active,n.active),c>a)break;s=c,u<=0&&e.next(),u>=0&&n.next()}}function ax(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function sx(e,t){for(var n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function lx(e,t,n){for(var r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=n}function ux(e,t){for(var n=-1,r=1e9,i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}for(var cx={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:"'",229:"q"},fx={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},dx="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),hx="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),px="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),vx="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),mx="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),gx=dx&&(vx||+dx[1]<57)||px&&vx,yx=0;yx<10;yx++)cx[48+yx]=cx[96+yx]=String(yx);for(yx=1;yx<=24;yx++)cx[yx+111]="F"+yx;for(yx=65;yx<=90;yx++)cx[yx]=String.fromCharCode(yx+32),fx[yx]=String.fromCharCode(yx);for(var bx in cx)fx.hasOwnProperty(bx)||(fx[bx]=cx[bx]);function xx(e){return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function wx(e,t){return!!t&&e.contains(1!=t.nodeType?t.parentNode:t)}function kx(e,t){if(!t.anchorNode)return!1;try{return wx(e,t.anchorNode)}catch(lF){return!1}}function Sx(e){return 3==e.nodeType?_x(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Ox(e,t,n,r){return!!n&&(Mx(e,t,n,r,-1)||Mx(e,t,n,r,1))}function Cx(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Mx(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Px(e))){if("DIV"==e.nodeName)return!1;var o=e.parentNode;if(!o||1!=o.nodeType)return!1;t=Cx(e)+(i<0?0:1),e=o}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?Px(e):0}}}function Px(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}var Tx={left:0,right:0,top:0,bottom:0};function Ex(e,t){var n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Zx(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}var Ax,Rx=function(){function e(){wu(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Su(e,[{key:"eq",value:function(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}},{key:"setRange",value:function(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}},{key:"set",value:function(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}]),e}(),Dx=null;function jx(e){if(e.setActive)return e.setActive();if(Dx)return e.focus(Dx);for(var t=[],n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==Dx?{get preventScroll(){return Dx={preventScroll:!0},!0}}:void 0),!Dx){Dx=!1;for(var r=0;r<t.length;){var i=t[r++],o=t[r++],a=t[r++];i.scrollTop!=o&&(i.scrollTop=o),i.scrollLeft!=a&&(i.scrollLeft=a)}}}function _x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=Ax||(Ax=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function Nx(e,t,n){var r={key:t,code:t,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,e.dispatchEvent(i);var o=new KeyboardEvent("keyup",r);return o.synthetic=!0,e.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function Lx(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function Ix(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}var zx=function(){function e(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];wu(this,e),this.node=t,this.offset=n,this.precise=r}return Su(e,null,[{key:"before",value:function(t,n){return new e(t.parentNode,Cx(t),n)}},{key:"after",value:function(t,n){return new e(t.parentNode,Cx(t)+1,n)}}]),e}(),Bx=[],Fx=function(){function e(){wu(this,e),this.parent=null,this.dom=null,this.dirty=2}return Su(e,[{key:"editorView",get:function(){if(!this.parent)throw new Error("Accessing view in orphan content view");return this.parent.editorView}},{key:"overrideDOMText",get:function(){return null}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBefore(this):0}},{key:"posAtEnd",get:function(){return this.posAtStart+this.length}},{key:"posBefore",value:function(e){var t,n=this.posAtStart,r=oy(this.children);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i==e)return n;n+=i.length+i.breakAfter}}catch(o){r.e(o)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(e){return this.posBefore(e)+e.length}},{key:"coordsAt",value:function(e,t){return null}},{key:"sync",value:function(t){if(2&this.dirty){var n,r=this.dom,i=r.firstChild,o=oy(this.children);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.dirty){if(!a.dom&&i){var s=e.get(i);s&&(s.parent||s.constructor!=a.constructor)||a.reuseDOM(i)}a.sync(t),a.dirty=0}if(t&&!t.written&&t.node==r&&i!=a.dom&&(t.written=!0),a.dom.parentNode==r){for(;i&&i!=a.dom;)i=$x(i);i=a.dom.nextSibling}else r.insertBefore(a.dom,i)}}catch(f){o.e(f)}finally{o.f()}for(i&&t&&t.node==r&&(t.written=!0);i;)i=$x(i)}else if(1&this.dirty){var l,u=oy(this.children);try{for(u.s();!(l=u.n()).done;){var c=l.value;c.dirty&&(c.sync(t),c.dirty=0)}}catch(f){u.e(f)}finally{u.f()}}}},{key:"reuseDOM",value:function(e){}},{key:"localPosFromDOM",value:function(t,n){var r;if(t==this.dom)r=this.dom.childNodes[n];else{for(var i=0==Px(t)?0:0==n?-1:1;;){var o=t.parentNode;if(o==this.dom)break;0==i&&o.firstChild!=o.lastChild&&(i=t==o.firstChild?-1:1),t=o}r=i<0?t:t.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!e.get(r);)r=r.nextSibling;if(!r)return this.length;for(var a=0,s=0;;a++){var l=this.children[a];if(l.dom==r)return s;s+=l.length+l.breakAfter}}},{key:"domBoundsAround",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,i=-1,o=-1,a=-1,s=0,l=n,u=n;s<this.children.length;s++){var c=this.children[s],f=l+c.length;if(l<e&&f>t)return c.domBoundsAround(e,t,l);if(f>=e&&-1==r&&(r=s,i=l),l>t&&c.dom.parentNode==this.dom){o=s,a=u;break}u=f,l=f+c.breakAfter}return{from:i,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}},{key:"markDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(e)}},{key:"markParentsDirty",value:function(e){for(var t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),1&t.dirty)return;t.dirty|=1,e=!1}}},{key:"setParent",value:function(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}},{key:"rootView",get:function(){for(var e=this;;){var t=e.parent;if(!t)return e;e=t}}},{key:"replaceChildren",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Bx;this.markDirty();for(var i=e;i<t;i++){var o=this.children[i];o.parent==this&&o.destroy()}(n=this.children).splice.apply(n,[e,t-e].concat((0,me.Z)(r)));for(var a=0;a<r.length;a++)r[a].setParent(this)}},{key:"ignoreMutation",value:function(e){return!1}},{key:"ignoreEvent",value:function(e){return!1}},{key:"childCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length;return new Wx(this.children,e,this.children.length)}},{key:"childPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(e,t)}},{key:"toString",value:function(){var e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"merge",value:function(e,t,n,r,i,o){return!1}},{key:"become",value:function(e){return!1}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(e){return e.cmView}}]),e}();function $x(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}Fx.prototype.breakAfter=0;var Wx=function(){function e(t,n,r){wu(this,e),this.children=t,this.pos=n,this.i=r,this.off=0}return Su(e,[{key:"findPos",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;var n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}]),e}();function Hx(e,t,n,r,i,o,a,s,l){var u=e.children,c=u.length?u[t]:null,f=o.length?o[o.length-1]:null,d=f?f.breakAfter:a;if(!(t==r&&c&&!a&&!d&&o.length<2&&c.merge(n,i,o.length?f:null,0==n,s,l))){if(r<u.length){var h=u[r];h&&i<h.length?(t==r&&(h=h.split(i),i=0),!d&&f&&h.merge(0,i,f,!0,0,l)?o[o.length-1]=h:(i&&h.merge(0,i,null,!1,0,l),o.push(h))):(null===h||void 0===h?void 0:h.breakAfter)&&(f?f.breakAfter=1:a=1),r++}for(c&&(c.breakAfter=a,n>0&&(!a&&o.length&&c.merge(n,c.length,o[0],!1,s,0)?c.breakAfter=o.shift().breakAfter:(n<c.length||c.children.length&&0==c.children[c.children.length-1].length)&&c.merge(n,c.length,null,!1,s,0),t++));t<r&&o.length;)if(u[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:s;else{if(!u[t].become(o[0]))break;t++,o.shift(),s=o.length?0:l}!o.length&&t&&r<u.length&&!u[t-1].breakAfter&&u[r].merge(0,0,u[t-1],!1,s,l)&&t--,(t<r||o.length)&&e.replaceChildren(t,r,o)}}function Vx(e,t,n,r,i,o){var a,s=e.childCursor(),l=s.findPos(n,1),u=l.i,c=l.off,f=s.findPos(t,-1),d=f.i,h=f.off,p=t-n,v=oy(r);try{for(v.s();!(a=v.n()).done;){p+=a.value.length}}catch(m){v.e(m)}finally{v.f()}e.length+=p,Hx(e,d,h,u,c,r,0,i,o)}var qx="undefined"!=typeof navigator?[navigator,document]:[{userAgent:"",vendor:"",platform:""},{documentElement:{style:{}}}],Ux=(0,r.Z)(qx,2),Qx=Ux[0],Xx=Ux[1],Yx=/Edge\/(\d+)/.exec(Qx.userAgent),Gx=/MSIE \d/.test(Qx.userAgent),Kx=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Qx.userAgent),Jx=!!(Gx||Kx||Yx),ew=!Jx&&/gecko\/(\d+)/i.test(Qx.userAgent),tw=!Jx&&/Chrome\/(\d+)/.exec(Qx.userAgent),nw="webkitFontSmoothing"in Xx.documentElement.style,rw=!Jx&&/Apple Computer/.test(Qx.vendor),iw=rw&&(/Mobile\/\w+/.test(Qx.userAgent)||Qx.maxTouchPoints>2),ow={mac:iw||/Mac/.test(Qx.platform),windows:/Win/.test(Qx.platform),linux:/Linux|X11/.test(Qx.platform),ie:Jx,ie_version:Gx?Xx.documentMode||6:Kx?+Kx[1]:Yx?+Yx[1]:0,gecko:ew,gecko_version:ew?+(/Firefox\/(\d+)/.exec(Qx.userAgent)||[0,0])[1]:0,chrome:!!tw,chrome_version:tw?+tw[1]:0,ios:iw,android:/Android\b/.test(Qx.userAgent),webkit:nw,safari:rw,webkit_version:nw?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=Xx.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},aw=function(e){ay(n,e);var t=cy(n);function n(e){var r;return wu(this,n),(r=t.call(this)).text=e,r}return Su(n,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(e){this.setDOM(e||document.createTextNode(this.text))}},{key:"sync",value:function(e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(e){3==e.nodeType&&this.createDOM(e)}},{key:"merge",value:function(e,t,r){return(!r||r instanceof n&&!(this.length-(t-e)+r.length>256))&&(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}},{key:"split",value:function(e){var t=new n(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}},{key:"localPosFromDOM",value:function(e,t){return e==this.dom?t:t?this.text.length:0}},{key:"domAtPos",value:function(e){return new zx(this.dom,e)}},{key:"domBoundsAround",value:function(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(e,t){return lw(this.dom,e,t)}}]),n}(Fx),sw=function(e){ay(n,e);var t=cy(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;wu(this,n),(r=t.call(this)).mark=e,r.children=i,r.length=o;var a,s=oy(i);try{for(s.s();!(a=s.n()).done;){var l=a.value;l.setParent(ye(r))}}catch(u){s.e(u)}finally{s.f()}return r}return Su(n,[{key:"setAttrs",value:function(e){if(Ix(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(var t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}},{key:"reuseDOM",value:function(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}},{key:"sync",value:function(e){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),dy(sy(n.prototype),"sync",this).call(this,e)}},{key:"merge",value:function(e,t,r,i,o,a){return(!r||!(!(r instanceof n&&r.mark.eq(this.mark))||e&&o<=0||t<this.length&&a<=0))&&(Vx(this,e,t,r?r.children:[],o-1,a-1),this.markDirty(),!0)}},{key:"split",value:function(e){var t,r=[],i=0,o=-1,a=0,s=oy(this.children);try{for(s.s();!(t=s.n()).done;){var l=t.value,u=i+l.length;u>e&&r.push(i<e?l.split(e-i):l),o<0&&i>=e&&(o=a),i=u,a++}}catch(f){s.e(f)}finally{s.f()}var c=this.length-e;return this.length=e,o>-1&&(this.children.length=o,this.markDirty()),new n(this.mark,r,c)}},{key:"domAtPos",value:function(e){return hw(this.dom,this.children,e)}},{key:"coordsAt",value:function(e,t){return vw(this,e,t)}}]),n}(Fx);function lw(e,t,n){var r=e.nodeValue.length;t>r&&(t=r);var i=t,o=t,a=0;0==t&&n<0||t==r&&n>=0?ow.chrome||ow.gecko||(t?(i--,a=1):(o++,a=-1)):n<0?i--:o++;var s=_x(e,i,o).getClientRects();if(!s.length)return Tx;var l=s[(a?a<0:n>=0)?0:s.length-1];return ow.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,(function(e){return e.width}))||l),a?Ex(l,a<0):l||null}var uw=function(e){ay(n,e);var t=cy(n);function n(e,r,i){var o;return wu(this,n),(o=t.call(this)).widget=e,o.length=r,o.side=i,o}return Su(n,[{key:"split",value:function(e){var t=n.create(this.widget,this.length-e,this.side);return this.length-=e,t}},{key:"sync",value:function(){this.dom&&this.widget.updateDOM(this.dom)||(this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(e,t,r,i,o,a){return!(r&&(!(r instanceof n&&this.widget.compare(r.widget))||e>0&&o<=0||t<this.length&&a<=0))&&(this.length=e+(r?r.length:0)+(this.length-t),!0)}},{key:"become",value:function(e){return e.length==this.length&&e instanceof n&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.eq(e.widget)||this.markDirty(!0),this.widget=e.widget,!0)}},{key:"ignoreMutation",value:function(){return!0}},{key:"ignoreEvent",value:function(e){return this.widget.ignoreEvent(e)}},{key:"overrideDOMText",get:function(){if(0==this.length)return Py.empty;for(var e=this;e.parent;)e=e.parent;var t=e.editorView,n=t&&t.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):Py.empty}},{key:"domAtPos",value:function(e){return 0==e?zx.before(this.dom):zx.after(this.dom,e==this.length)}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(e,t){var n=this.dom.getClientRects(),r=null;if(!n.length)return Tx;for(var i=e>0?n.length-1:0;r=n[i],!(e>0?0==i:i==n.length-1||r.top<r.bottom);i+=e>0?-1:1);return 0==e&&t>0||e==this.length&&t<=0?r:Ex(r,0==e)}},{key:"isEditable",get:function(){return!1}},{key:"destroy",value:function(){dy(sy(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(e,t,r){return new(e.customView||n)(e,t,r)}}]),n}(Fx),cw=function(e){ay(n,e);var t=cy(n);function n(){return wu(this,n),t.apply(this,arguments)}return Su(n,[{key:"domAtPos",value:function(e){return new zx(this.widget.text,e)}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(e,t){return t?3==e.nodeType?Math.min(t,this.length):this.length:0}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(e,t){return lw(this.widget.text,e,t)}},{key:"isEditable",get:function(){return!0}}]),n}(uw),fw=ow.android?"\u200b\u200b":"\u200b",dw=function(e){ay(n,e);var t=cy(n);function n(e){var r;return wu(this,n),(r=t.call(this)).side=e,r}return Su(n,[{key:"length",get:function(){return 0}},{key:"merge",value:function(){return!1}},{key:"become",value:function(e){return e instanceof n&&e.side==this.side}},{key:"split",value:function(){return new n(this.side)}},{key:"sync",value:function(){this.dom?this.dirty&&this.dom.nodeValue!=fw&&(this.dom.nodeValue=fw):this.setDOM(document.createTextNode(fw))}},{key:"getSide",value:function(){return this.side}},{key:"domAtPos",value:function(e){return zx.before(this.dom)}},{key:"localPosFromDOM",value:function(){return 0}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(e){var t=Sx(this.dom);return t[t.length-1]||null}},{key:"overrideDOMText",get:function(){return Py.of([this.dom.nodeValue.replace(/\u200b/g,"")])}}]),n}(Fx);function hw(e,t,n){for(var r=0,i=0;r<t.length;r++){var o=t[r],a=i+o.length;if(!(a==i&&o.getSide()<=0)){if(n>i&&n<a&&o.dom.parentNode==e)return o.domAtPos(n-i);if(n<=i)break;i=a}}for(;r>0;r--){var s=t[r-1].dom;if(s.parentNode==e)return zx.after(s)}return new zx(e,0)}function pw(e,t,n){var r,i=e.children;n>0&&t instanceof sw&&i.length&&(r=i[i.length-1])instanceof sw&&r.mark.eq(t.mark)?pw(r,t.children[0],n-1):(i.push(t),t.setParent(e)),e.length+=t.length}function vw(e,t,n){for(var r=0,i=0;i<e.children.length;i++){var o=e.children[i],a=r+o.length,s=void 0;if((n<=0||a==e.length||o.getSide()>0?a>=t:a>t)&&(t<a||i+1==e.children.length||(s=e.children[i+1]).length||s.getSide()>0)){var l=0;if(a==r){if(o.getSide()<=0)continue;l=n=-o.getSide()}var u=o.coordsAt(t-r,n);return l&&u?Ex(u,n<0):u}r=a}var c=e.dom.lastChild;if(!c)return e.dom.getBoundingClientRect();var f=Sx(c);return f[f.length-1]||null}function mw(e,t){for(var n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}function gw(e,t){if(e==t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i=0,o=n;i<o.length;i++){var a=o[i];if(-1==r.indexOf(a)||e[a]!==t[a])return!1}return!0}function yw(e,t,n){if(t)for(var r in t)n&&r in n||e.removeAttribute(r);if(n)for(var i in n)t&&t[i]==n[i]||e.setAttribute(i,n[i])}aw.prototype.children=uw.prototype.children=dw.prototype.children=Bx;var bw=function(){function e(){wu(this,e)}return Su(e,[{key:"eq",value:function(e){return!1}},{key:"updateDOM",value:function(e){return!1}},{key:"compare",value:function(e){return this==e||this.constructor==e.constructor&&this.eq(e)}},{key:"estimatedHeight",get:function(){return-1}},{key:"ignoreEvent",value:function(e){return!0}},{key:"customView",get:function(){return null}},{key:"destroy",value:function(e){}}]),e}(),xw=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(xw||(xw={})),ww=function(e){ay(n,e);var t=cy(n);function n(e,r,i,o){var a;return wu(this,n),(a=t.call(this)).startSide=e,a.endSide=r,a.widget=i,a.spec=o,a}return Su(n,[{key:"heightRelevant",get:function(){return!1}},{key:"hasHeight",value:function(){return!!this.widget&&this.widget.estimatedHeight>-1}}],[{key:"mark",value:function(e){return new kw(e)}},{key:"widget",value:function(e){var t=e.side||0,n=!!e.block;return new Ow(e,t+=n?t>0?3e8:-4e8:t>0?1e8:-1e8,t,n,e.widget||null,!1)}},{key:"replace",value:function(e){var t=!!e.block,n=Cw(e,t),r=n.start,i=n.end;return new Ow(e,t?r?-3e8:-1:4e8,t?i?2e8:1:-5e8,t,e.widget||null,!0)}},{key:"line",value:function(e){return new Sw(e)}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Gb.of(e,t)}}]),n}(Ub);ww.none=Gb.empty;var kw=function(e){ay(n,e);var t=cy(n);function n(e){var r;wu(this,n);var i=Cw(e),o=i.start,a=i.end;return(r=t.call(this,o?-1:4e8,a?1:-5e8,null,e)).tagName=e.tagName||"span",r.class=e.class||"",r.attrs=e.attributes||null,r}return Su(n,[{key:"eq",value:function(e){return this==e||e instanceof n&&this.tagName==e.tagName&&this.class==e.class&&gw(this.attrs,e.attrs)}},{key:"range",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e>=t)throw new RangeError("Mark decorations may not be empty");return dy(sy(n.prototype),"range",this).call(this,e,t)}}]),n}(ww);kw.prototype.point=!1;var Sw=function(e){ay(n,e);var t=cy(n);function n(e){return wu(this,n),t.call(this,-2e8,-2e8,null,e)}return Su(n,[{key:"eq",value:function(e){return e instanceof n&&gw(this.spec.attributes,e.spec.attributes)}},{key:"range",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return dy(sy(n.prototype),"range",this).call(this,e,t)}}]),n}(ww);Sw.prototype.mapMode=Iy.TrackBefore,Sw.prototype.point=!0;var Ow=function(e){ay(n,e);var t=cy(n);function n(e,r,i,o,a,s){var l;return wu(this,n),(l=t.call(this,r,i,a,e)).block=o,l.isReplace=s,l.mapMode=o?r<=0?Iy.TrackBefore:Iy.TrackAfter:Iy.TrackDel,l}return Su(n,[{key:"type",get:function(){return this.startSide<this.endSide?xw.WidgetRange:this.startSide<=0?xw.WidgetBefore:xw.WidgetAfter}},{key:"heightRelevant",get:function(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}},{key:"eq",value:function(e){return e instanceof n&&(t=this.widget,r=e.widget,t==r||!!(t&&r&&t.compare(r)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,r}},{key:"range",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return dy(sy(n.prototype),"range",this).call(this,e,t)}}]),n}(ww);function Cw(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.inclusiveStart,r=e.inclusiveEnd;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!==n&&void 0!==n?n:t,end:null!==r&&void 0!==r?r:t}}function Mw(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n.length-1;i>=0&&n[i]+r>e?n[i]=Math.max(n[i],t):n.push(e,t)}Ow.prototype.point=!0;var Pw=function(e){ay(n,e);var t=cy(n);function n(){var e;return wu(this,n),(e=t.apply(this,arguments)).children=[],e.length=0,e.prevAttrs=void 0,e.attrs=null,e.breakAfter=0,e}return Su(n,[{key:"merge",value:function(e,t,r,i,o,a){if(r){if(!(r instanceof n))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),Vx(this,e,t,r?r.children:[],o,a),!0}},{key:"split",value:function(e){var t=new n;if(t.breakAfter=this.breakAfter,0==this.length)return t;var r=this.childPos(e),i=r.i,o=r.off;o&&(t.append(this.children[i].split(o),0),this.children[i].merge(o,this.children[i].length,null,!1,0,0),i++);for(var a=i;a<this.children.length;a++)t.append(this.children[a],0);for(;i>0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}},{key:"transferDOM",value:function(e){this.dom&&(e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(e){gw(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}},{key:"append",value:function(e,t){pw(this,e,t)}},{key:"addLineDeco",value:function(e){var t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=mw(t,this.attrs||{})),n&&(this.attrs=mw(t,{class:n}))}},{key:"domAtPos",value:function(e){return hw(this.dom,this.children,e)}},{key:"reuseDOM",value:function(e){"DIV"==e.nodeName&&(this.setDOM(e),this.dirty|=6)}},{key:"sync",value:function(e){var t;this.dom?4&this.dirty&&(Ix(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),void 0!==this.prevAttrs&&(yw(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),dy(sy(n.prototype),"sync",this).call(this,e);for(var r=this.dom.lastChild;r&&Fx.get(r)instanceof sw;)r=r.lastChild;if(!r||"BR"!=r.nodeName&&0==(null===(t=Fx.get(r))||void 0===t?void 0:t.isEditable)&&(!ow.ios||!this.children.some((function(e){return e instanceof aw})))){var i=document.createElement("BR");i.cmIgnore=!0,this.dom.appendChild(i)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var e,t=0,n=oy(this.children);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(!(r instanceof aw))return null;var i=Sx(r.dom);if(1!=i.length)return null;t+=i[0].width}}catch(o){n.e(o)}finally{n.f()}return{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length}}},{key:"coordsAt",value:function(e,t){return vw(this,e,t)}},{key:"become",value:function(e){return!1}},{key:"type",get:function(){return xw.Text}}],[{key:"find",value:function(e,t){for(var r=0,i=0;;r++){var o=e.children[r],a=i+o.length;if(a>=t){if(o instanceof n)return o;if(o.length)return null}i=a+o.breakAfter}}}]),n}(Fx),Tw=function(e){ay(n,e);var t=cy(n);function n(e,r,i){var o;return wu(this,n),(o=t.call(this)).widget=e,o.length=r,o.type=i,o.breakAfter=0,o}return Su(n,[{key:"merge",value:function(e,t,r,i,o,a){return!(r&&(!(r instanceof n&&this.widget.compare(r.widget))||e>0&&o<=0||t<this.length&&a<=0))&&(this.length=e+(r?r.length:0)+(this.length-t),!0)}},{key:"domAtPos",value:function(e){return 0==e?zx.before(this.dom):zx.after(this.dom,e==this.length)}},{key:"split",value:function(e){var t=this.length-e;this.length=e;var r=new n(this.widget,t,this.type);return r.breakAfter=this.breakAfter,r}},{key:"children",get:function(){return Bx}},{key:"sync",value:function(){this.dom&&this.widget.updateDOM(this.dom)||(this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}},{key:"overrideDOMText",get:function(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Py.empty}},{key:"domBoundsAround",value:function(){return null}},{key:"become",value:function(e){return e instanceof n&&e.type==this.type&&e.widget.constructor==this.widget.constructor&&(e.widget.eq(this.widget)||this.markDirty(!0),this.widget=e.widget,this.length=e.length,this.breakAfter=e.breakAfter,!0)}},{key:"ignoreMutation",value:function(){return!0}},{key:"ignoreEvent",value:function(e){return this.widget.ignoreEvent(e)}},{key:"destroy",value:function(){dy(sy(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}]),n}(Fx),Ew=function(){function e(t,n,r){wu(this,e),this.doc=t,this.pos=n,this.end=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=n}return Su(e,[{key:"posCovered",value:function(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;var e=this.content[this.content.length-1];return!e.breakAfter&&!(e instanceof Tw&&e.type==xw.WidgetBefore)}},{key:"getLine",value:function(){return this.curLine||(this.content.push(this.curLine=new Pw),this.atCursorPos=!0),this.curLine}},{key:"flushBuffer",value:function(e){this.pendingBuffer&&(this.curLine.append(Zw(new dw(-1),e),e.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(e){this.flushBuffer([]),this.curLine=null,this.content.push(e)}},{key:"finish",value:function(e){e?this.pendingBuffer=0:this.flushBuffer([]),this.posCovered()||this.getLine()}},{key:"buildText",value:function(e,t,n){for(;e>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),i=r.value,o=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,e--;continue}this.text=i,this.textOff=0}var s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t),this.getLine().append(Zw(new aw(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=0}}},{key:"span",value:function(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(e,t,n,r,i){var o=t-e;if(n instanceof Ow)if(n.block){var a=n.type;a!=xw.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new Tw(n.widget||new Aw("div"),o,a))}else{var s=uw.create(n.widget||new Aw("span"),o,n.startSide),l=this.atCursorPos&&!s.isEditable&&i<=r.length&&(e<t||n.startSide>0),u=!s.isEditable&&(e<t||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||l||(this.pendingBuffer=0),this.flushBuffer(r),l&&(c.append(Zw(new dw(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(Zw(s,r),i),this.atCursorPos=u,this.pendingBuffer=u?e<t?1:2:0}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}}],[{key:"build",value:function(t,n,r,i){var o=new e(t,n,r);return o.openEnd=Gb.spans(i,n,r,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}]),e}();function Zw(e,t){var n,r=oy(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;e=new sw(i,[e],e.length)}}catch(o){r.e(o)}finally{r.f()}return e}var Aw=function(e){ay(n,e);var t=cy(n);function n(e){var r;return wu(this,n),(r=t.call(this)).tag=e,r}return Su(n,[{key:"eq",value:function(e){return e.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(e){return e.nodeName.toLowerCase()==this.tag}}]),n}(bw),Rw=[],Dw=Ky.define(),jw=Ky.define(),_w=Ky.define(),Nw=Ky.define(),Lw=Ky.define(),Iw=Ky.define(),zw=Pb.define({map:function(e,t){return e.map(t)}}),Bw=Pb.define({map:function(e,t){return e.map(t)}}),Fw=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;wu(this,e),this.range=t,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o}return Su(e,[{key:"map",value:function(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin)}}]),e}(),$w=Pb.define({map:function(e,t){return e.map(t)}});function Ww(e,t,n){var r=e.facet(Nw);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}var Hw=Ky.define({combine:function(e){return!e.length||e[0]}}),Vw=Su((function e(t,n){wu(this,e),this.field=t,this.get=n})),qw=function(){function e(){wu(this,e)}return Su(e,[{key:"from",value:function(e){return new Vw(this,e)}}],[{key:"define",value:function(){return new e}}]),e}();qw.decorations=qw.define(),qw.atomicRanges=qw.define(),qw.scrollMargins=qw.define();var Uw=0,Qw=Ky.define(),Xw=function(){function e(t,n,r){wu(this,e),this.id=t,this.create=n,this.fields=r,this.extension=Qw.of(this)}return Su(e,null,[{key:"define",value:function(t,n){var r=n||{},i=r.eventHandlers,o=r.provide,a=r.decorations,s=[];if(o){var l,u=oy(Array.isArray(o)?o:[o]);try{for(u.s();!(l=u.n()).done;){var c=l.value;s.push(c)}}catch(f){u.e(f)}finally{u.f()}}return i&&s.push(Yw.from((function(e){return{plugin:e,handlers:i}}))),a&&s.push(qw.decorations.from(a)),new e(Uw++,t,s)}},{key:"fromClass",value:function(t,n){return e.define((function(e){return new t(e)}),n)}}]),e}(),Yw=qw.define(),Gw=function(){function e(t){wu(this,e),this.spec=t,this.mustUpdate=null,this.value=null}return Su(e,[{key:"takeField",value:function(e,t){if(this.spec){var n,r=oy(this.spec.fields);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.field,a=i.get;o==e&&t.push(a(this.value))}}catch(s){r.e(s)}finally{r.f()}}}},{key:"update",value:function(e){if(this.value){if(this.mustUpdate){var t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Ww(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(lF){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Ww(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(n){Ww(e.state,n,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),e}(),Kw=Ky.define(),Jw=Ky.define(),ek=Ky.define(),tk=Ky.define(),nk=function(){function e(t,n,r,i){wu(this,e),this.fromA=t,this.toA=n,this.fromB=r,this.toB=i}return Su(e,[{key:"join",value:function(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}},{key:"addToSet",value:function(e){for(var t=e.length,n=this;t>0;t--){var r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}}],[{key:"extendWithRanges",value:function(t,n){if(0==n.length)return t;for(var r=[],i=0,o=0,a=0,s=0;;i++){for(var l=i==t.length?null:t[i],u=a-s,c=l?l.fromB:1e9;o<n.length&&n[o]<c;){var f=n[o],d=n[o+1],h=Math.max(s,f),p=Math.min(c,d);if(h<=p&&new e(h+u,p+u,h,p).addToSet(r),d>c)break;o+=2}if(!l)return r;new e(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),a=l.toA,s=l.toB}}}]),e}(),rk=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Rw;wu(this,e),this.view=t,this.state=n,this.transactions=r,this.flags=0,this.startState=t.state,this.changes=By.empty(this.startState.doc.length);var i,o=oy(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.changes=this.changes.compose(a.changes)}}catch(u){o.e(u)}finally{o.f()}var s=[];this.changes.iterChangedRanges((function(e,t,n,r){return s.push(new nk(e,t,n,r))})),this.changedRanges=s;var l=t.hasFocus;l!=t.inputState.notifiedFocused&&(t.inputState.notifiedFocused=l,this.flags|=1),this.docChanged&&(this.flags|=2)}return Su(e,[{key:"viewportChanged",get:function(){return(4&this.flags)>0}},{key:"heightChanged",get:function(){return(2&this.flags)>0}},{key:"geometryChanged",get:function(){return this.docChanged||(10&this.flags)>0}},{key:"focusChanged",get:function(){return(1&this.flags)>0}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"selectionSet",get:function(){return this.transactions.some((function(e){return e.selection}))}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}]),e}(),ik=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(ik||(ik={})),ok=ik.LTR,ak=ik.RTL;function sk(e){for(var t=[],n=0;n<e.length;n++)t.push(1<<+e[n]);return t}for(var lk=sk("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),uk=sk("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),ck=Object.create(null),fk=[],dk=0,hk=["()","[]","{}"];dk<hk.length;dk++){var pk=hk[dk],vk=pk.charCodeAt(0),mk=pk.charCodeAt(1);ck[vk]=mk,ck[mk]=-vk}function gk(e){return e<=247?lk[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?uk[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8203||8204==e?256:1}var yk=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,bk=function(){function e(t,n,r){wu(this,e),this.from=t,this.to=n,this.level=r}return Su(e,[{key:"dir",get:function(){return this.level%2?ak:ok}},{key:"side",value:function(e,t){return this.dir==t==e?this.to:this.from}}],[{key:"find",value:function(e,t,n,r){for(var i=-1,o=0;o<e.length;o++){var a=e[o];if(a.from<=t&&a.to>=t){if(a.level==n)return o;(i<0||(0!=r?r<0?a.from<t:a.to>t:e[i].level>a.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}]),e}(),xk=[];function wk(e,t){var n=e.length,r=t==ok?1:2,i=t==ok?2:1;if(!e||1==r&&!yk.test(e))return kk(n);for(var o=0,a=r,s=r;o<n;o++){var l=gk(e.charCodeAt(o));512==l?l=a:8==l&&4==s&&(l=16),xk[o]=4==l?2:l,7&l&&(s=l),a=l}for(var u=0,c=r,f=r;u<n;u++){var d=xk[u];if(128==d)u<n-1&&c==xk[u+1]&&24&c?d=xk[u]=c:xk[u]=256;else if(64==d){for(var h=u+1;h<n&&64==xk[h];)h++;for(var p=u&&8==c||h<n&&8==xk[h]?1==f?1:8:256,v=u;v<h;v++)xk[v]=p;u=h-1}else 8==d&&1==f&&(xk[u]=1);c=d,7&d&&(f=d)}for(var m,g,y,b=0,x=0,w=0;b<n;b++)if(g=ck[m=e.charCodeAt(b)])if(g<0){for(var k=x-3;k>=0;k-=3)if(fk[k+1]==-g){var S=fk[k+2],O=2&S?r:4&S?1&S?i:r:0;O&&(xk[b]=xk[fk[k]]=O),x=k;break}}else{if(189==fk.length)break;fk[x++]=b,fk[x++]=m,fk[x++]=w}else if(2==(y=xk[b])||1==y){var C=y==r;w=C?0:1;for(var M=x-3;M>=0;M-=3){var P=fk[M+2];if(2&P)break;if(C)fk[M+2]|=2;else{if(4&P)break;fk[M+2]|=4}}}for(var T=0;T<n;T++)if(256==xk[T]){for(var E=T+1;E<n&&256==xk[E];)E++;for(var Z=1==(T?xk[T-1]:r),A=Z==(1==(E<n?xk[E]:r))?Z?1:2:r,R=T;R<E;R++)xk[R]=A;T=E-1}var D=[];if(1==r)for(var j=0;j<n;){for(var _=j,N=1!=xk[j++];j<n&&N==(1!=xk[j]);)j++;if(N)for(var L=j;L>_;){for(var I=L,z=2!=xk[--L];L>_&&z==(2!=xk[L-1]);)L--;D.push(new bk(L,I,z?2:1))}else D.push(new bk(_,j,0))}else for(var B=0;B<n;){for(var F=B,$=2==xk[B++];B<n&&$==(2==xk[B]);)B++;D.push(new bk(F,B,$?1:2))}return D}function kk(e){return[new bk(0,e,0)]}var Sk="";function Ok(e,t,n,r,i){var o,a=r.head-e.from,s=-1;if(0==a){if(!i||!e.length)return null;t[0].level!=n&&(a=t[0].side(!1,n),s=0)}else if(a==e.length){if(i)return null;var l=t[t.length-1];l.level!=n&&(a=l.side(!0,n),s=t.length-1)}s<0&&(s=bk.find(t,a,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc));var u=t[s];a==u.side(i,n)&&(a=(u=t[s+=i?1:-1]).side(!i,n));var c=i==(u.dir==n),f=gy(e.text,a,c);if(Sk=e.text.slice(Math.min(a,f),Math.max(a,f)),f!=u.side(i,n))return Qy.cursor(f+e.from,c?-1:1,u.level);var d=s==(i?t.length-1:0)?null:t[s+(i?1:-1)];return d||u.level==n?d&&d.level<u.level?Qy.cursor(d.side(!i,n)+e.from,i?1:-1,d.level):Qy.cursor(f+e.from,i?-1:1,u.level):Qy.cursor(i?e.to:e.from,i?-1:1,n)}var Ck=function(){function e(t,n){wu(this,e),this.points=t,this.view=n,this.text="",this.lineBreak=n.state.lineBreak}return Su(e,[{key:"readRange",value:function(e,t){if(!e)return this;for(var n=e.parentNode,r=e;;){this.findPointBefore(n,r),this.readNode(r);var i=r.nextSibling;if(i==t)break;var o=Fx.get(r),a=Fx.get(i);(o&&a?o.breakAfter:(o?o.breakAfter:Mk(r))||Mk(i)&&("BR"!=r.nodeName||r.cmIgnore))&&(this.text+=this.lineBreak),r=i}return this.findPointBefore(n,t),this}},{key:"readNode",value:function(e){if(!e.cmIgnore){var t,n=Fx.get(e),r=n&&n.overrideDOMText;null!=r?t=r.sliceString(0,void 0,this.lineBreak):3==e.nodeType?t=e.nodeValue:"BR"==e.nodeName?t=e.nextSibling?this.lineBreak:"":1==e.nodeType&&this.readRange(e.firstChild,null),null!=t&&(this.findPointIn(e,t.length),this.text+=t,ow.chrome&&13==this.view.inputState.lastKeyCode&&!e.nextSibling&&/\n\n$/.test(this.text)&&(this.text=this.text.slice(0,-1)))}}},{key:"findPointBefore",value:function(e,t){var n,r=oy(this.points);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}}catch(o){r.e(o)}finally{r.f()}}},{key:"findPointIn",value:function(e,t){var n,r=oy(this.points);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t))}}catch(o){r.e(o)}finally{r.f()}}}]),e}();function Mk(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}var Pk=Su((function e(t,n){wu(this,e),this.node=t,this.offset=n,this.pos=-1})),Tk=function(e){ay(n,e);var t=cy(n);function n(e){var r;return wu(this,n),(r=t.call(this)).view=e,r.compositionDeco=ww.none,r.decorations=[],r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(e.contentDOM),r.children=[new Pw],r.children[0].setParent(ye(r)),r.updateInner([new nk(0,0,0,e.state.doc.length)],r.updateDeco(),0),r}return Su(n,[{key:"root",get:function(){return this.view.root}},{key:"editorView",get:function(){return this.view}},{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(e){var t=this,n=e.changedRanges;this.minWidth>0&&n.length&&(n.every((function(e){var n=e.fromA;return e.toA<t.minWidthFrom||n>t.minWidthTo}))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=ww.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=function(e,t){var n=e.observer.selectionRange,r=n.focusNode&&Rk(n.focusNode,n.focusOffset,0);if(!r)return ww.none;var i=e.docView.nearest(r);if(!i)return ww.none;var o,a,s=r;if(i instanceof Pw){for(;s.parentNode!=i.dom;)s=s.parentNode;for(var l=s.previousSibling;l&&!Fx.get(l);)l=l.previousSibling;o=a=l?Fx.get(l).posAtEnd:i.posAtStart}else{for(;;){var u=i.parent;if(!u)return ww.none;if(u instanceof Pw)break;i=u}a=(o=i.posAtStart)+i.length,s=i.dom}var c=t.mapPos(o,1),f=Math.max(c,t.mapPos(a,-1)),d=e.state,h=3==s.nodeType?s.nodeValue:new Ck([],e).readRange(s.firstChild,null).text;if(f-c<h.length)if(d.sliceDoc(c,Math.min(d.doc.length,c+h.length))==h)f=c+h.length;else{if(d.sliceDoc(Math.max(0,f-h.length),f)!=h)return ww.none;c=f-h.length}else if(d.sliceDoc(c,f)!=h)return ww.none;return ww.set(ww.replace({widget:new Ak(s,r)}).range(c,f))}(this.view,e.changes)),(ow.ie||ow.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);var r=this.decorations,i=this.updateDeco(),o=function(e,t,n){var r=new jk;return Gb.compare(e,t,n,r),r.changes}(r,i,e.changes);return n=nk.extendWithRanges(n,o),(0!=this.dirty||0!=n.length)&&(this.updateInner(n,i,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}},{key:"updateInner",value:function(e,t,n){var r=this;this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);var i=this.view.observer;i.ignore((function(){r.dom.style.height=r.view.viewState.contentHeight+"px",r.dom.style.minWidth=r.minWidth?r.minWidth+"px":"";var e=ow.chrome||ow.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;r.sync(e),r.dirty=0,e&&(e.written||i.selectionRange.focusNode!=e.node)&&(r.forceSelection=!0),r.dom.style.height=""}));var o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length){var a,s=oy(this.children);try{for(s.s();!(a=s.n()).done;){var l=a.value;l instanceof Tw&&l.widget instanceof Zk&&o.push(l.dom)}}catch(u){s.e(u)}finally{s.f()}}i.updateGaps(o)}},{key:"updateChildren",value:function(e,t,n){for(var r=this.childCursor(n),i=e.length-1;;i--){var o=i>=0?e[i]:null;if(!o)break;var a=o.fromA,s=o.toA,l=o.fromB,u=o.toB,c=Ew.build(this.view.state.doc,l,u,t),f=c.content,d=c.breakAtStart,h=c.openStart,p=c.openEnd,v=r.findPos(s,1),m=v.i,g=v.off,y=r.findPos(a,-1);Hx(this,y.i,y.off,m,g,f,d,h,p)}}},{key:"updateSelection",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t&&this.view.observer.readSelectionRange(),!(!n&&!this.mayControlSelection()||ow.ios&&this.view.inputState.rapidCompositionStart)){var r=this.forceSelection;this.forceSelection=!1;var i=this.view.state.selection.main,o=this.domAtPos(i.anchor),a=i.empty?o:this.domAtPos(i.head);if(ow.gecko&&i.empty&&Ek(o)){var s=document.createTextNode("");this.view.observer.ignore((function(){return o.node.insertBefore(s,o.node.childNodes[o.offset]||null)})),o=a=new zx(s,0),r=!0}var l=this.view.observer.selectionRange;!r&&l.focusNode&&Ox(o.node,o.offset,l.anchorNode,l.anchorOffset)&&Ox(a.node,a.offset,l.focusNode,l.focusOffset)||(this.view.observer.ignore((function(){ow.android&&ow.chrome&&e.dom.contains(l.focusNode)&&_k(l.focusNode,e.dom)&&(e.dom.blur(),e.dom.focus({preventScroll:!0}));var t=xx(e.root);if(i.empty){if(ow.gecko){var n=Dk(o.node,o.offset);if(n&&3!=n){var r=Rk(o.node,o.offset,1==n?1:-1);r&&(o=new zx(r,1==n?0:r.nodeValue.length))}}t.collapse(o.node,o.offset),null!=i.bidiLevel&&null!=l.cursorBidiLevel&&(l.cursorBidiLevel=i.bidiLevel)}else if(t.extend)t.collapse(o.node,o.offset),t.extend(a.node,a.offset);else{var s=document.createRange();if(i.anchor>i.head){var u=[a,o];o=u[0],a=u[1]}s.setEnd(a.node,a.offset),s.setStart(o.node,o.offset),t.removeAllRanges(),t.addRange(s)}})),this.view.observer.setSelectionRange(o,a)),this.impreciseAnchor=o.precise?null:new zx(l.anchorNode,l.anchorOffset),this.impreciseHead=a.precise?null:new zx(l.focusNode,l.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var e=this.view.state.selection.main,t=xx(this.root);if(e.empty&&e.assoc&&t.modify){var n=Pw.find(this,e.head);if(n){var r=n.posAtStart;if(e.head!=r&&e.head!=r+n.length){var i=this.coordsAt(e.head,-1),o=this.coordsAt(e.head,1);if(i&&o&&!(i.bottom>o.top)){var a=this.domAtPos(e.head+e.assoc);t.collapse(a.node,a.offset),t.modify("move",e.assoc<0?"forward":"backward","lineboundary")}}}}}}},{key:"mayControlSelection",value:function(){return this.view.state.facet(Hw)?this.root.activeElement==this.dom:kx(this.dom,this.view.observer.selectionRange)}},{key:"nearest",value:function(e){for(var t=e;t;){var n=Fx.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}},{key:"posFromDOM",value:function(e,t){var n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}},{key:"domAtPos",value:function(e){for(var t=this.childCursor().findPos(e,-1),n=t.i,r=t.off;n<this.children.length-1;){var i=this.children[n];if(r<i.length||i instanceof Pw)break;n++,r=0}return this.children[n].domAtPos(r)}},{key:"coordsAt",value:function(e,t){for(var n=this.length,r=this.children.length-1;;r--){var i=this.children[r],o=n-i.breakAfter-i.length;if(e>o||e==o&&i.type!=xw.WidgetBefore&&i.type!=xw.WidgetAfter&&(!r||2==t||this.children[r-1].breakAfter||this.children[r-1].type==xw.WidgetBefore&&t>-2))return i.coordsAt(e-o,t);n=o}}},{key:"measureVisibleLineHeights",value:function(){for(var e=[],t=this.view.viewState.viewport,n=t.from,r=t.to,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=0,l=0;l<this.children.length;l++){var u=this.children[l],c=s+u.length;if(c>r)break;if(s>=n){var f=u.dom.getBoundingClientRect();if(e.push(f.height),o){var d=u.dom.lastChild,h=d?Sx(d):[];if(h.length){var p=h[h.length-1],v=this.view.textDirection==ik.LTR?p.right-f.left:f.right-p.left;v>a&&(a=v,this.minWidth=i,this.minWidthFrom=s,this.minWidthTo=c)}}}s=c+u.breakAfter}return e}},{key:"measureTextSize",value:function(){var e,t=this,n=oy(this.children);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r instanceof Pw){var i=r.measureTextSize();if(i)return i}}}catch(l){n.e(l)}finally{n.f()}var o,a,s=document.createElement("div");return s.className="cm-line",s.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((function(){t.dom.appendChild(s);var e=Sx(s.firstChild)[0];o=s.getBoundingClientRect().height,a=e?e.width/27:7,s.remove()})),{lineHeight:o,charWidth:a}}},{key:"childCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,t=this.children.length;return t&&(e-=this.children[--t].length),new Wx(this.children,e,t)}},{key:"computeBlockGapDeco",value:function(){for(var e=[],t=this.view.viewState,n=0,r=0;;r++){var i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){var a=t.lineBlockAt(o).bottom-t.lineBlockAt(n).top;e.push(ww.replace({widget:new Zk(a),block:!0,inclusive:!0}).range(n,o))}if(!i)break;n=i.to+1}return ww.set(e)}},{key:"updateDeco",value:function(){return this.decorations=[].concat((0,me.Z)(this.view.pluginField(qw.decorations)),(0,me.Z)(this.view.state.facet(ek)),[this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco])}},{key:"scrollIntoView",value:function(e){var t,n=e.range,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(r){!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});var i,o=0,a=0,s=0,l=0,u=oy(this.view.pluginField(qw.scrollMargins));try{for(u.s();!(i=u.n()).done;){var c=i.value;if(c){var f=c.left,d=c.right,h=c.top,p=c.bottom;null!=f&&(o=Math.max(o,f)),null!=d&&(a=Math.max(a,d)),null!=h&&(s=Math.max(s,h)),null!=p&&(l=Math.max(l,p))}}}catch(m){u.e(m)}finally{u.f()}var v={left:r.left-o,top:r.top-s,right:r.right+a,bottom:r.bottom+l};!function(e,t,n,r,i,o,a,s){for(var l=e.ownerDocument,u=l.defaultView,c=e;c;)if(1==c.nodeType){var f=void 0,d=c==l.body;if(d)f=Zx(u);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.parentNode;continue}var h=c.getBoundingClientRect();f={left:h.left,right:h.left+c.clientWidth,top:h.top,bottom:h.top+c.clientHeight}}var p=0,v=0;if("nearest"==i)t.top<f.top?(v=-(f.top-t.top+a),n>0&&t.bottom>f.bottom+v&&(v=t.bottom-f.bottom+v+a)):t.bottom>f.bottom&&(v=t.bottom-f.bottom+a,n<0&&t.top-v<f.top&&(v=-(f.top+v-t.top+a)));else{var m=t.bottom-t.top,g=f.bottom-f.top;v=("center"==i&&m<=g?t.top+m/2-g/2:"start"==i||"center"==i&&n<0?t.top-a:t.bottom-g+a)-f.top}if("nearest"==r?t.left<f.left?(p=-(f.left-t.left+o),n>0&&t.right>f.right+p&&(p=t.right-f.right+p+o)):t.right>f.right&&(p=t.right-f.right+o,n<0&&t.left<f.left+p&&(p=-(f.left+p-t.left+o))):p=("center"==r?t.left+(t.right-t.left)/2-(f.right-f.left)/2:"start"==r==s?t.left-o:t.right-(f.right-f.left)+o)-f.left,p||v)if(d)u.scrollBy(p,v);else{if(v){var y=c.scrollTop;c.scrollTop+=v,v=c.scrollTop-y}if(p){var b=c.scrollLeft;c.scrollLeft+=p,p=c.scrollLeft-b}t={left:t.left-p,top:t.top-v,right:t.right-p,bottom:t.bottom-v}}if(d)break;c=c.assignedSlot||c.parentNode,r=i="nearest"}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,v,n.head<n.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==ik.LTR)}}}]),n}(Fx);function Ek(e){return 1==e.node.nodeType&&e.node.firstChild&&(0==e.offset||"false"==e.node.childNodes[e.offset-1].contentEditable)&&(e.offset==e.node.childNodes.length||"false"==e.node.childNodes[e.offset].contentEditable)}var Zk=function(e){ay(n,e);var t=cy(n);function n(e){var r;return wu(this,n),(r=t.call(this)).height=e,r}return Su(n,[{key:"toDOM",value:function(){var e=document.createElement("div");return this.updateDOM(e),e}},{key:"eq",value:function(e){return e.height==this.height}},{key:"updateDOM",value:function(e){return e.style.height=this.height+"px",!0}},{key:"estimatedHeight",get:function(){return this.height}}]),n}(bw);var Ak=function(e){ay(n,e);var t=cy(n);function n(e,r){var i;return wu(this,n),(i=t.call(this)).top=e,i.text=r,i}return Su(n,[{key:"eq",value:function(e){return this.top==e.top&&this.text==e.text}},{key:"toDOM",value:function(){return this.top}},{key:"ignoreEvent",value:function(){return!1}},{key:"customView",get:function(){return cw}}]),n}(bw);function Rk(e,t,n){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0&&n<=0)t=Px(e=e.childNodes[t-1]);else{if(!(1==e.nodeType&&t<e.childNodes.length&&n>=0))return null;e=e.childNodes[t],t=0}}}function Dk(e,t){return 1!=e.nodeType?0:(t&&"false"==e.childNodes[t-1].contentEditable?1:0)|(t<e.childNodes.length&&"false"==e.childNodes[t].contentEditable?2:0)}var jk=function(){function e(){wu(this,e),this.changes=[]}return Su(e,[{key:"compareRange",value:function(e,t){Mw(e,t,this.changes)}},{key:"comparePoint",value:function(e,t){Mw(e,t,this.changes)}}]),e}();function _k(e,t){for(var n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}function Nk(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function Lk(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function Ik(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function zk(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function Bk(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function Fk(e,t,n){for(var r,i,o,a,s,l,u,c,f=e.firstChild;f;f=f.nextSibling)for(var d=Sx(f),h=0;h<d.length;h++){var p=d[h];i&&Ik(i,p)&&(p=zk(Bk(p,i.bottom),i.top));var v=Nk(t,p),m=Lk(n,p);if(0==v&&0==m)return 3==f.nodeType?$k(f,t,n):Fk(f,t,n);(!r||a>m||a==m&&o>v)&&(r=f,i=p,o=v,a=m),0==v?n>p.bottom&&(!u||u.bottom<p.bottom)?(s=f,u=p):n<p.top&&(!c||c.top>p.top)&&(l=f,c=p):u&&Ik(u,p)?u=Bk(u,p.bottom):c&&Ik(c,p)&&(c=zk(c,p.top))}if(u&&u.bottom>=n?(r=s,i=u):c&&c.top<=n&&(r=l,i=c),!r)return{node:e,offset:0};var g=Math.max(i.left,Math.min(i.right,t));return 3==r.nodeType?$k(r,g,n):o||"true"!=r.contentEditable?{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(i.left+i.right)/2?1:0)}:Fk(r,g,n)}function $k(e,t,n){for(var r=e.nodeValue.length,i=-1,o=1e9,a=0,s=0;s<r;s++)for(var l=_x(e,s,s+1).getClientRects(),u=0;u<l.length;u++){var c=l[u];if(c.top!=c.bottom){a||(a=t-c.left);var f=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&f<o){var d=t>=(c.left+c.right)/2,h=d;if(ow.chrome||ow.gecko)_x(e,s).getBoundingClientRect().left==c.right&&(h=!d);if(f<=0)return{node:e,offset:s+(h?1:0)};i=s+(h?1:0),o=f}}}return{node:e,offset:i>-1?i:a>0?e.nodeValue.length:0}}function Wk(e,t,n){for(var r,i,o=t.x,a=t.y,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,l=e.contentDOM.getBoundingClientRect(),u=l.top+e.viewState.paddingTop,c=e.viewState.docHeight,f=Math.max(0,Math.min(a-u,c)),d=e.defaultLineHeight/2,h=!1;(i=e.elementAtHeight(f)).type!=xw.Text;)for(;!((f=s>0?i.bottom+d:i.top-d)>=0&&f<=c);){if(h)return n?null:0;h=!0,s=-s}a=u+f;var p=i.from;if(p<e.viewport.from)return 0==e.viewport.from?0:n?Hk(e,l,i,o,a):null;if(p>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?Hk(e,l,i,o,a):null;var v=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:v,g=m.elementFromPoint(o,a);g&&!e.contentDOM.contains(g)&&(g=null),g||(o=Math.max(l.left+1,Math.min(l.right-1,o)),(g=m.elementFromPoint(o,a))&&!e.contentDOM.contains(g)&&(g=null));var y,b=-1;if(g&&0!=(null===(r=e.docView.nearest(g))||void 0===r?void 0:r.isEditable))if(v.caretPositionFromPoint){var x=v.caretPositionFromPoint(o,a);x&&(y=x.offsetNode,b=x.offset)}else if(v.caretRangeFromPoint){var w=v.caretRangeFromPoint(o,a);w&&(y=w.startContainer,b=w.startOffset,ow.safari&&Vk(y,b,o)&&(y=void 0))}if(!y||!e.docView.dom.contains(y)){var k=Pw.find(e.docView,p),S=Fk(k.dom,o,a);y=S.node,b=S.offset}return e.docView.posFromDOM(y,b)}function Hk(e,t,n,r,i){var o=Math.round((r-t.left)*e.defaultCharacterWidth);e.lineWrapping&&n.height>1.5*e.defaultLineHeight&&(o+=Math.floor((i-n.top)/e.defaultLineHeight)*e.viewState.heightOracle.lineLength);var a=e.state.sliceDoc(n.from,n.to);return n.from+My(a,o,e.state.tabSize)}function Vk(e,t,n){var r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(var i=e.nextSibling;i;i=i.nextSibling)if(1!=i.nodeType||"BR"!=i.nodeName)return!1;return _x(e,r-1,r).getBoundingClientRect().left>n}function qk(e,t,n,r){var i=e.state.doc.lineAt(t.head),o=r&&e.lineWrapping?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){var a=e.dom.getBoundingClientRect(),s=e.posAtCoords({x:n==(e.textDirection==ik.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(null!=s)return Qy.cursor(s,n?-1:1)}var l=Pw.find(e.docView,t.head),u=l?n?l.posAtEnd:l.posAtStart:n?i.to:i.from;return Qy.cursor(u,n?-1:1)}function Uk(e,t,n,r){for(var i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),a=t,s=null;;){var l=Ok(i,o,e.textDirection,a,n),u=Sk;if(!l){if(i.number==(n?e.state.doc.lines:1))return a;u="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),l=Qy.cursor(n?i.from:i.to)}if(s){if(!s(u))return a}else{if(!r)return l;s=r(u)}a=l}}function Qk(e,t,n){for(var r=e.pluginField(qw.atomicRanges);;){var i,o=!1,a=oy(r);try{for(a.s();!(i=a.n()).done;){i.value.between(n.from-1,n.from+1,(function(e,r,i){n.from>e&&n.from<r&&(n=t.from>n.from?Qy.cursor(e,1):Qy.cursor(r,-1),o=!0)}))}}catch(s){a.e(s)}finally{a.f()}if(!o)return n}}var Xk=function(){function e(t){var n=this;wu(this,e),this.lastKeyCode=0,this.lastKeyTime=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;var r=function(e){var r=eS[e];t.contentDOM.addEventListener(e,(function(i){"keydown"==e&&n.keydown(t,i)||Jk(t,i)&&!n.ignoreDuringComposition(i)&&(n.mustFlushObserver(i)&&t.observer.forceFlush(),n.runCustomHandlers(e,t,i)?i.preventDefault():r(t,i))})),n.registeredEvents.push(e)};for(var i in eS)r(i);this.notifiedFocused=t.hasFocus,this.ensureHandlers(t),ow.safari&&t.contentDOM.addEventListener("input",(function(){return null}))}return Su(e,[{key:"setSelectionOrigin",value:function(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(e){var t,n=this,r=oy(this.customHandlers=e.pluginField(Yw));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=function(t){n.registeredEvents.indexOf(t)<0&&"scroll"!=t&&(n.registeredEvents.push(t),e.contentDOM.addEventListener(t,(function(r){Jk(e,r)&&n.runCustomHandlers(t,e,r)&&r.preventDefault()})))};for(var a in i.handlers)o(a)}}catch(s){r.e(s)}finally{r.f()}}},{key:"runCustomHandlers",value:function(e,t,n){var r,i=oy(this.customHandlers);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=o.handlers[e];if(a)try{if(a.call(o.plugin,n,t)||n.defaultPrevented)return!0}catch(s){Ww(t.state,s)}}}catch(l){i.e(l)}finally{i.f()}return!1}},{key:"runScrollHandlers",value:function(e,t){var n,r=oy(this.customHandlers);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.handlers.scroll;if(o)try{o.call(i.plugin,t,e)}catch(a){Ww(e.state,a)}}}catch(s){r.e(s)}finally{r.f()}}},{key:"keydown",value:function(e,t){var n,r=this;return this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),!!this.screenKeyEvent(e,t)||(!ow.android||!ow.chrome||t.synthetic||13!=t.keyCode&&8!=t.keyCode?!(!ow.ios||!(n=Yk.find((function(e){return e.keyCode==t.keyCode})))||t.ctrlKey||t.altKey||t.metaKey||t.synthetic)&&(this.pendingIOSKey=n,setTimeout((function(){return r.flushIOSKey(e)}),250),!0):(e.observer.delayAndroidKey(t.key,t.keyCode),!0))}},{key:"flushIOSKey",value:function(e){var t=this.pendingIOSKey;return!!t&&(this.pendingIOSKey=void 0,Nx(e.contentDOM,t.key,t.keyCode))}},{key:"ignoreDuringComposition",value:function(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(ow.safari&&Date.now()-this.compositionEndedAt<500)&&(this.compositionEndedAt=0,!0))}},{key:"screenKeyEvent",value:function(e,t){var n=9==t.keyCode&&Date.now()<this.lastEscPress+2e3;return 27==t.keyCode?this.lastEscPress=Date.now():Gk.indexOf(t.keyCode)<0&&(this.lastEscPress=0),n}},{key:"mustFlushObserver",value:function(e){return"keydown"==e.type&&229!=e.keyCode||"compositionend"==e.type&&!ow.ios}},{key:"startMouseSelection",value:function(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}},{key:"update",value:function(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),e}(),Yk=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Gk=[16,17,18,20,91,92,224,225],Kk=function(){function e(t,n,r,i){wu(this,e),this.view=t,this.style=r,this.mustSelect=i,this.lastEvent=n;var o=t.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=t.state.facet(zb.allowMultipleSelections)&&function(e,t){var n=e.state.facet(Dw);return n.length?n[0](t):ow.mac?t.metaKey:t.ctrlKey}(t,n),this.dragMove=function(e,t){var n=e.state.facet(jw);return n.length?n[0](t):ow.mac?!t.altKey:!t.ctrlKey}(t,n),this.dragging=!(!function(e,t){if(e.state.selection.main.empty)return!1;var n=xx(e.root);if(0==n.rangeCount)return!0;for(var r=n.getRangeAt(0).getClientRects(),i=0;i<r.length;i++){var o=r[i];if(o.left<=t.clientX&&o.right>=t.clientX&&o.top<=t.clientY&&o.bottom>=t.clientY)return!0}return!1}(t,n)||1!=hS(n))&&null,!1===this.dragging&&(n.preventDefault(),this.select(n))}return Su(e,[{key:"move",value:function(e){if(0==e.buttons)return this.destroy();!1===this.dragging&&this.select(this.lastEvent=e)}},{key:"up",value:function(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}},{key:"destroy",value:function(){var e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"select",value:function(e){var t=this.style.get(e,this.extend,this.multiple);!this.mustSelect&&t.eq(this.view.state.selection)&&t.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:t,userEvent:"select.pointer",scrollIntoView:!0}),this.mustSelect=!1}},{key:"update",value:function(e){var t=this;e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout((function(){return t.select(t.lastEvent)}),20)}}]),e}();function Jk(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=Fx.get(r))&&n.ignoreEvent(t))return!1;return!0}var eS=Object.create(null),tS=ow.ie&&ow.ie_version<15||ow.ios&&ow.webkit_version<604;function nS(e,t){var n,r=e.state,i=1,o=r.toText(t),a=o.lines==r.selection.ranges.length,s=null!=vS&&r.selection.ranges.every((function(e){return e.empty}))&&vS==o.toString();if(s){var l=-1;n=r.changeByRange((function(e){var n=r.doc.lineAt(e.from);if(n.from==l)return{range:e};l=n.from;var s=r.toText((a?o.line(i++).text:t)+r.lineBreak);return{changes:{from:n.from,insert:s},range:Qy.cursor(e.from+s.length)}}))}else n=a?r.changeByRange((function(e){var t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:Qy.cursor(e.from+t.length)}})):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}eS.keydown=function(e,t){e.inputState.setSelectionOrigin("select")};var rS=0;function iS(e,t,n,r){if(1==r)return Qy.cursor(t,n);if(2==r)return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return Qy.cursor(t);0==o?n=1:o==i.length&&(n=-1);var a=o,s=o;n<0?a=gy(i.text,o,!1):s=gy(i.text,o);for(var l=r(i.text.slice(a,s));a>0;){var u=gy(i.text,a,!1);if(r(i.text.slice(u,a))!=l)break;a=u}for(;s<i.length;){var c=gy(i.text,s);if(r(i.text.slice(s,c))!=l)break;s=c}return Qy.range(a+i.from,s+i.from)}(e.state,t,n);var i=Pw.find(e.docView,t),o=e.state.doc.lineAt(i?i.posAtEnd:t),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return s<e.state.doc.length&&s==o.to&&s++,Qy.range(a,s)}eS.touchstart=function(e,t){rS=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},eS.touchmove=function(e){e.inputState.setSelectionOrigin("select.pointer")},eS.mousedown=function(e,t){if(e.observer.flush(),!(rS>Date.now()-2e3&&1==hS(t))){var n,r=null,i=oy(e.state.facet(_w));try{for(i.s();!(n=i.n()).done;){if(r=(0,n.value)(e,t))break}}catch(a){i.e(a)}finally{i.f()}if(r||0!=t.button||(r=function(e,t){var n=lS(e,t),r=hS(t),i=e.state.selection,o=n,a=t;return{update:function(e){e.docChanged&&(n&&(n.pos=e.changes.mapPos(n.pos)),i=i.map(e.changes),a=null)},get:function(t,s,l){var u;if(a&&t.clientX==a.clientX&&t.clientY==a.clientY?u=o:(u=o=lS(e,t),a=t),!u||!n)return i;var c=iS(e,u.pos,u.bias,r);if(n.pos!=u.pos&&!s){var f=iS(e,n.pos,n.bias,r),d=Math.min(f.from,c.from),h=Math.max(f.to,c.to);c=d<c.from?Qy.range(d,h):Qy.range(h,d)}return s?i.replaceRange(i.main.extend(c.from,c.to)):l?i.addRange(c):Qy.create([c])}}}(e,t)),r){var o=e.root.activeElement!=e.contentDOM;o&&e.observer.ignore((function(){return jx(e.contentDOM)})),e.inputState.startMouseSelection(new Kk(e,t,r,o))}}};var oS=function(e,t){return e>=t.top&&e<=t.bottom},aS=function(e,t,n){return oS(t,n)&&e>=n.left&&e<=n.right};function sS(e,t,n,r){var i=Pw.find(e.docView,t);if(!i)return 1;var o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;var a=i.coordsAt(o,-1);if(a&&aS(n,r,a))return-1;var s=i.coordsAt(o,1);return s&&aS(n,r,s)?1:a&&oS(r,a)?-1:1}function lS(e,t){var n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:sS(e,n,t.clientX,t.clientY)}}var uS=ow.ie&&ow.ie_version<=11,cS=null,fS=0,dS=0;function hS(e){if(!uS)return e.detail;var t=cS,n=dS;return cS=e,dS=Date.now(),fS=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(fS+1)%3:1}function pS(e,t,n,r){if(n){var i=e.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();var o=e.inputState.mouseSelection,a=r&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,s={from:i,insert:n},l=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"})}}eS.dragstart=function(e,t){var n=e.state.selection.main,r=e.inputState.mouseSelection;r&&(r.dragging=n),t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove")},eS.drop=function(e,t){if(t.dataTransfer){if(e.state.readOnly)return t.preventDefault();var n=t.dataTransfer.files;n&&n.length?function(){t.preventDefault();for(var r=Array(n.length),i=0,o=function(){++i==n.length&&pS(e,t,r.filter((function(e){return null!=e})).join(e.state.lineBreak),!1)},a=function(e){var t=new FileReader;t.onerror=o,t.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])},s=0;s<n.length;s++)a(s)}():pS(e,t,t.dataTransfer.getData("Text"),!0)}},eS.paste=function(e,t){if(e.state.readOnly)return t.preventDefault();e.observer.flush();var n=tS?null:t.clipboardData;n?(nS(e,n.getData("text/plain")),t.preventDefault()):function(e){var t=e.dom.parentNode;if(t){var n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((function(){e.focus(),n.remove(),nS(e,n.value)}),50)}}(e)};var vS=null;function mS(e,t){if(e.docView.compositionDeco.size){e.inputState.rapidCompositionStart=t;try{e.update([])}finally{e.inputState.rapidCompositionStart=!1}}}eS.copy=eS.cut=function(e,t){var n=function(e){var t,n=[],r=[],i=!1,o=oy(e.selection.ranges);try{for(o.s();!(t=o.n()).done;){var a=t.value;a.empty||(n.push(e.sliceDoc(a.from,a.to)),r.push(a))}}catch(d){o.e(d)}finally{o.f()}if(!n.length){var s,l=-1,u=oy(e.selection.ranges);try{for(u.s();!(s=u.n()).done;){var c=s.value.from,f=e.doc.lineAt(c);f.number>l&&(n.push(f.text),r.push({from:f.from,to:Math.min(e.doc.length,f.to+1)})),l=f.number}}catch(d){u.e(d)}finally{u.f()}i=!0}return{text:n.join(e.lineBreak),ranges:r,linewise:i}}(e.state),r=n.text,i=n.ranges,o=n.linewise;if(r||o){vS=o?r:null;var a=tS?null:t.clipboardData;a?(t.preventDefault(),a.clearData(),a.setData("text/plain",r)):function(e,t){var n=e.dom.parentNode;if(n){var r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout((function(){r.remove(),e.focus()}),50)}}(e,r),"cut"!=t.type||e.state.readOnly||e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})}},eS.focus=eS.blur=function(e){setTimeout((function(){e.hasFocus!=e.inputState.notifiedFocused&&e.update([])}),10)},eS.beforeprint=function(e){e.viewState.printing=!0,e.requestMeasure(),setTimeout((function(){e.viewState.printing=!1,e.requestMeasure()}),2e3)},eS.compositionstart=eS.compositionupdate=function(e){null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0,e.docView.compositionDeco.size&&(e.observer.flush(),mS(e,!0)))},eS.compositionend=function(e){e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionFirstChange=null,setTimeout((function(){e.inputState.composing<0&&mS(e,!1)}),50)},eS.contextmenu=function(e){e.inputState.lastContextMenu=Date.now()},eS.beforeinput=function(e,t){var n,r;if(ow.chrome&&ow.android&&(r=Yk.find((function(e){return e.inputType==t.inputType})))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){var i=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((function(){var t;((null===(t=window.visualViewport)||void 0===t?void 0:t.height)||0)>i+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}};var gS=["pre-wrap","normal","pre-line","break-spaces"],yS=function(){function e(){wu(this,e),this.doc=Py.empty,this.lineWrapping=!1,this.direction=ik.LTR,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return Su(e,[{key:"heightForGap",value:function(e,t){var n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength)),this.lineHeight*n}},{key:"heightForLine",value:function(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(e){return this.doc=e,this}},{key:"mustRefreshForStyle",value:function(e,t){return gS.indexOf(e)>-1!=this.lineWrapping||this.direction!=t}},{key:"mustRefreshForHeights",value:function(e){for(var t=!1,n=0;n<e.length;n++){var r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}},{key:"refresh",value:function(e,t,n,r,i,o){var a=gS.indexOf(e)>-1,s=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a||this.direction!=t;if(this.lineWrapping=a,this.direction=t,this.lineHeight=n,this.charWidth=r,this.lineLength=i,s){this.heightSamples={};for(var l=0;l<o.length;l++){var u=o[l];u<0?l++:this.heightSamples[Math.floor(10*u)]=!0}}return s}}]),e}(),bS=function(){function e(t,n){wu(this,e),this.from=t,this.heights=n,this.index=0}return Su(e,[{key:"more",get:function(){return this.index<this.heights.length}}]),e}(),xS=function(){function e(t,n,r,i,o){wu(this,e),this.from=t,this.length=n,this.top=r,this.height=i,this.type=o}return Su(e,[{key:"to",get:function(){return this.from+this.length}},{key:"bottom",get:function(){return this.top+this.height}},{key:"join",value:function(t){var n=(Array.isArray(this.type)?this.type:[this]).concat(Array.isArray(t.type)?t.type:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},{key:"moveY",value:function(t){return t?new e(this.from,this.length,this.top+t,this.height,Array.isArray(this.type)?this.type.map((function(e){return e.moveY(t)})):this.type):this}}]),e}(),wS=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(wS||(wS={})),kS=.001,SS=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;wu(this,e),this.length=t,this.height=n,this.flags=r}return Su(e,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(e){this.flags=(e?2:0)|-3&this.flags}},{key:"setHeight",value:function(e,t){this.height!=t&&(Math.abs(this.height-t)>kS&&(e.heightChanged=!0),this.height=t)}},{key:"replace",value:function(t,n,r){return e.of(r)}},{key:"decomposeLeft",value:function(e,t){t.push(this)}},{key:"decomposeRight",value:function(e,t){t.push(this)}},{key:"applyChanges",value:function(e,t,n,r){for(var i=this,o=r.length-1;o>=0;o--){var a=r[o],s=a.fromA,l=a.toA,u=a.fromB,c=a.toB,f=i.lineAt(s,wS.ByPosNoHeight,t,0,0),d=f.to>=l?f:i.lineAt(l,wS.ByPosNoHeight,t,0,0);for(c+=d.to-l,l=d.to;o>0&&f.from<=r[o-1].toA;)s=r[o-1].fromA,u=r[o-1].fromB,o--,s<f.from&&(f=i.lineAt(s,wS.ByPosNoHeight,t,0,0));u+=f.from-s,s=f.from;var h=ES.build(n,e,u,c);i=i.replace(s,l,h)}return i.updateHeight(n,0)}}],[{key:"empty",value:function(){return new CS(0,0)}},{key:"of",value:function(t){if(1==t.length)return t[0];for(var n=0,r=t.length,i=0,o=0;;)if(n==r)if(i>2*o){var a=t[n-1];a.break?t.splice(--n,1,a.left,null,a.right):t.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else{if(!(o>2*i))break;var s=t[r];s.break?t.splice(r,1,s.left,null,s.right):t.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else if(i<o){var l=t[n++];l&&(i+=l.size)}else{var u=t[--r];u&&(o+=u.size)}var c=0;return null==t[n-1]?(c=1,n--):null==t[n]&&(c=1,r++),new PS(e.of(t.slice(0,n)),c,e.of(t.slice(r)))}}]),e}();SS.prototype.size=1;var OS=function(e){ay(n,e);var t=cy(n);function n(e,r,i){var o;return wu(this,n),(o=t.call(this,e,r)).type=i,o}return Su(n,[{key:"blockAt",value:function(e,t,n,r){return new xS(r,this.length,n,this.height,this.type)}},{key:"lineAt",value:function(e,t,n,r,i){return this.blockAt(0,n,r,i)}},{key:"forEachLine",value:function(e,t,n,r,i,o){o(this.blockAt(0,n,r,i))}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>3?arguments[3]:void 0;return n&&n.from<=t&&n.more&&this.setHeight(e,n.heights[n.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),n}(SS),CS=function(e){ay(n,e);var t=cy(n);function n(e,r){var i;return wu(this,n),(i=t.call(this,e,r,xw.Text)).collapsed=0,i.widgetHeight=0,i}return Su(n,[{key:"replace",value:function(e,t,r){var i=r[0];return 1==r.length&&(i instanceof n||i instanceof MS&&4&i.flags)&&Math.abs(this.length-i.length)<10?(i instanceof MS?i=new n(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):SS.of(r)}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),n}(OS),MS=function(e){ay(n,e);var t=cy(n);function n(e){return wu(this,n),t.call(this,e,0)}return Su(n,[{key:"lines",value:function(e,t){var n=e.lineAt(t).number,r=e.lineAt(t+this.length).number;return{firstLine:n,lastLine:r,lineHeight:this.height/(r-n+1)}}},{key:"blockAt",value:function(e,t,n,r){var i=this.lines(t,r),o=i.firstLine,a=i.lastLine,s=i.lineHeight,l=Math.max(0,Math.min(a-o,Math.floor((e-n)/s))),u=t.line(o+l),c=u.from,f=u.length;return new xS(c,f,n+s*l,s,xw.Text)}},{key:"lineAt",value:function(e,t,n,r,i){if(t==wS.ByHeight)return this.blockAt(e,n,r,i);if(t==wS.ByPosNoHeight){var o=n.lineAt(e),a=o.from,s=o.to;return new xS(a,s-a,0,0,xw.Text)}var l=this.lines(n,i),u=l.firstLine,c=l.lineHeight,f=n.lineAt(e),d=f.from,h=f.length,p=f.number;return new xS(d,h,r+c*(p-u),c,xw.Text)}},{key:"forEachLine",value:function(e,t,n,r,i,o){for(var a=this.lines(n,i),s=a.firstLine,l=a.lineHeight,u=Math.max(e,i),c=Math.min(i+this.length,t);u<=c;){var f=n.lineAt(u);u==e&&(r+=l*(f.number-s)),o(new xS(f.from,f.length,r,l,xw.Text)),r+=l,u=f.to+1}}},{key:"replace",value:function(e,t,r){var i=this.length-t;if(i>0){var o=r[r.length-1];o instanceof n?r[r.length-1]=new n(o.length+i):r.push(null,new n(i-1))}if(e>0){var a=r[0];a instanceof n?r[0]=new n(e+a.length):r.unshift(new n(e-1),null)}return SS.of(r)}},{key:"decomposeLeft",value:function(e,t){t.push(new n(e-1),null)}},{key:"decomposeRight",value:function(e,t){t.push(null,new n(this.length-e-1))}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,o=t+this.length;if(i&&i.from<=t+this.length&&i.more){var a=[],s=Math.max(t,i.from),l=-1,u=e.heightChanged;for(i.from>t&&a.push(new n(i.from-t-1).updateHeight(e,t));s<=o&&i.more;){var c=e.doc.lineAt(s).length;a.length&&a.push(null);var f=i.heights[i.index++];-1==l?l=f:Math.abs(f-l)>=kS&&(l=-2);var d=new CS(c,f);d.outdated=!1,a.push(d),s+=c+1}s<=o&&a.push(null,new n(o-s).updateHeight(e,s));var h=SS.of(a);return e.heightChanged=u||l<0||Math.abs(h.height-this.height)>=kS||Math.abs(l-this.lines(e.doc,t).lineHeight)>=kS,h}return(r||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),n}(SS),PS=function(e){ay(n,e);var t=cy(n);function n(e,r,i){var o;return wu(this,n),(o=t.call(this,e.length+r+i.length,e.height+i.height,r|(e.outdated||i.outdated?2:0))).left=e,o.right=i,o.size=e.size+i.size,o}return Su(n,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(e,t,n,r){var i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}},{key:"lineAt",value:function(e,t,n,r,i){var o=r+this.left.height,a=i+this.left.length+this.break,s=t==wS.ByHeight?e<o:e<a,l=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,o,a);if(this.break||(s?l.to<a:l.from>a))return l;var u=t==wS.ByPosNoHeight?wS.ByPosNoHeight:wS.ByPos;return s?l.join(this.right.lineAt(a,u,n,o,a)):this.left.lineAt(a,u,n,r,i).join(l)}},{key:"forEachLine",value:function(e,t,n,r,i,o){var a=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,o),t>=s&&this.right.forEachLine(e,t,n,a,s,o);else{var l=this.lineAt(s,wS.ByPos,n,r,i);e<l.from&&this.left.forEachLine(e,l.from-1,n,r,i,o),l.to>=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,a,s,o)}}},{key:"replace",value:function(e,t,n){var r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));var i=[];e>0&&this.decomposeLeft(e,i);var o,a=i.length,s=oy(n);try{for(s.s();!(o=s.n()).done;){var l=o.value;i.push(l)}}catch(c){s.e(c)}finally{s.f()}if(e>0&&TS(i,a-1),t<this.length){var u=i.length;this.decomposeRight(t,i),TS(i,u)}return SS.of(i)}},{key:"decomposeLeft",value:function(e,t){var n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&e>=++n&&t.push(null),e>n&&this.right.decomposeLeft(e-n,t)}},{key:"decomposeRight",value:function(e,t){var n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}},{key:"balanced",value:function(e,t){return e.size>2*t.size||t.size>2*e.size?SS.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=this.left,o=this.right,a=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=a+o.length&&r.more?s=o=o.updateHeight(e,a,n,r):o.updateHeight(e,a,n),s?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),n}(SS);function TS(e,t){var n,r;null==e[t]&&(n=e[t-1])instanceof MS&&(r=e[t+1])instanceof MS&&e.splice(t-1,3,new MS(n.length+1+r.length))}var ES=function(){function e(t,n){wu(this,e),this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}return Su(e,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(e,t){if(this.lineStart>-1){var n=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof CS?r.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new CS(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}},{key:"point",value:function(e,t,n){if(e<t||n.heightRelevant){var r=n.widget?n.widget.estimatedHeight:0;r<0&&(r=this.oracle.lineHeight);var i=t-e;n.block?this.addBlock(new OS(i,r,n.type)):(i||r>=5)&&this.addLineDeco(r,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}},{key:"enterLine",value:function(){if(!(this.lineStart>-1)){var e=this.oracle.doc.lineAt(this.pos),t=e.from,n=e.to;this.lineStart=t,this.lineEnd=n,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new CS(this.pos-t,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(e,t){var n=new MS(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}},{key:"ensureLine",value:function(){this.enterLine();var e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof CS)return e;var t=new CS(0,-1);return this.nodes.push(t),t}},{key:"addBlock",value:function(e){this.enterLine(),e.type!=xw.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=xw.WidgetBefore&&(this.covering=e)}},{key:"addLineDeco",value:function(e,t){var n=this.ensureLine();n.length+=t,n.collapsed+=t,n.widgetHeight=Math.max(n.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}},{key:"finish",value:function(e){var t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof CS||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new CS(0,-1));var n,r=e,i=oy(this.nodes);try{for(i.s();!(n=i.n()).done;){var o=n.value;o instanceof CS&&o.updateHeight(this.oracle,r),r+=o?o.length:1}}catch(a){i.e(a)}finally{i.f()}return this.nodes}}],[{key:"build",value:function(t,n,r,i){var o=new e(r,t);return Gb.spans(n,r,i,o,0),o.finish(r)}}]),e}();function ZS(e,t,n){var r=new AS;return Gb.compare(e,t,n,r,0),r.changes}var AS=function(){function e(){wu(this,e),this.changes=[]}return Su(e,[{key:"compareRange",value:function(){}},{key:"comparePoint",value:function(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&Mw(e,t,this.changes,5)}}]),e}();var RS=function(){function e(t,n,r){wu(this,e),this.from=t,this.to=n,this.size=r}return Su(e,[{key:"draw",value:function(e){return ww.replace({widget:new DS(this.size,e)}).range(this.from,this.to)}}],[{key:"same",value:function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}}]),e}(),DS=function(e){ay(n,e);var t=cy(n);function n(e,r){var i;return wu(this,n),(i=t.call(this)).size=e,i.vertical=r,i}return Su(n,[{key:"eq",value:function(e){return e.size==this.size&&e.vertical==this.vertical}},{key:"toDOM",value:function(){var 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}},{key:"estimatedHeight",get:function(){return this.vertical?this.size:-1}}]),n}(bw),jS=function(){function e(t){wu(this,e),this.state=t,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.heightOracle=new yS,this.scaler=zS,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1,this.heightMap=SS.empty().applyChanges(t.facet(ek),Py.empty,this.heightOracle.setDoc(t.doc),[new nk(0,0,0,t.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ww.set(this.lineGaps.map((function(e){return e.draw(!1)}))),this.computeVisibleRanges()}return Su(e,[{key:"updateForViewport",value:function(){for(var e=this,t=[this.viewport],n=this.state.selection.main,r=function(r){var i=r?n.head:n.anchor;if(!t.some((function(e){var t=e.from,n=e.to;return i>=t&&i<=n}))){var o=e.lineBlockAt(i),a=o.from,s=o.to;t.push(new _S(a,s))}},i=0;i<=1;i++)r(i);this.viewports=t.sort((function(e,t){return e.from-t.from})),this.scaler=this.heightMap.height<=7e6?zS:new BS(this.heightOracle.doc,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var e=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,(function(t){e.viewportLines.push(1==e.scaler.scale?t:FS(t,e.scaler))}))}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.state;this.state=e.state;var r=this.state.facet(ek),i=e.changedRanges,o=nk.extendWithRanges(i,ZS(e.startState.facet(ek),r,e?e.changes:By.empty(this.state.doc.length))),a=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(r,n.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=a&&(e.flags|=2);var s=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));var l=!e.changes.empty||2&e.flags||s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,this.updateForViewport(),l&&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(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(e){var t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace,o="rtl"==n.direction?ik.RTL:ik.LTR,a=this.heightOracle.mustRefreshForStyle(i,o),s=a||this.mustMeasureContent||this.contentDOMHeight!=t.clientHeight,l=0,u=0;if(s){this.mustMeasureContent=!1,this.contentDOMHeight=t.clientHeight;var c=parseInt(n.paddingTop)||0,f=parseInt(n.paddingBottom)||0;this.paddingTop==c&&this.paddingBottom==f||(l|=8,this.paddingTop=c,this.paddingBottom=f)}var d=this.printing?{top:-1e8,bottom:1e8,left:-1e8,right:1e8}:function(e,t){for(var n=e.getBoundingClientRect(),r=Math.max(0,n.left),i=Math.min(innerWidth,n.right),o=Math.max(0,n.top),a=Math.min(innerHeight,n.bottom),s=e.ownerDocument.body,l=e.parentNode;l&&l!=s;)if(1==l.nodeType){var u=l,c=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=c.overflow){var f=u.getBoundingClientRect();r=Math.max(r,f.left),i=Math.min(i,f.right),o=Math.max(o,f.top),a=Math.min(a,f.bottom)}l="absolute"==c.position||"fixed"==c.position?u.offsetParent:u.parentNode}else{if(11!=l.nodeType)break;l=l.host}return{left:r-n.left,right:Math.max(r,i)-n.left,top:o-(n.top+t),bottom:Math.max(o,a)-(n.top+t)}}(t,this.paddingTop),h=d.top-this.pixelViewport.top,p=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;var v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(s=!0)),!this.inView)return 0;if(s){var m=e.docView.measureVisibleLineHeights();r.mustRefreshForHeights(m)&&(a=!0);var g=t.clientWidth;if(a||r.lineWrapping&&Math.abs(g-this.contentDOMWidth)>r.charWidth){var y=e.docView.measureTextSize(),b=y.lineHeight,x=y.charWidth;(a=r.refresh(i,o,b,x,g/x,m))&&(e.docView.minWidth=0,l|=8)}this.contentDOMWidth!=g&&(this.contentDOMWidth=g,l|=8),this.editorHeight!=e.scrollDOM.clientHeight&&(this.editorHeight=e.scrollDOM.clientHeight,l|=8),h>0&&p>0?u=Math.max(h,p):h<0&&p<0&&(u=Math.min(h,p)),r.heightChanged=!1,this.heightMap=this.heightMap.updateHeight(r,0,a,new bS(this.viewport.from,m)),r.heightChanged&&(l|=2)}var w=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&l||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}},{key:"visibleTop",get:function(){return this.scaler.fromDOM(this.pixelViewport.top)}},{key:"visibleBottom",get:function(){return this.scaler.fromDOM(this.pixelViewport.bottom)}},{key:"getViewport",value:function(e,t){var n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.state.doc,o=this.visibleTop,a=this.visibleBottom,s=new _S(r.lineAt(o-1e3*n,wS.ByHeight,i,0,0).from,r.lineAt(a+1e3*(1-n),wS.ByHeight,i,0,0).to);if(t){var l=t.range.head,u=this.editorHeight;if(l<s.from||l>s.to){var c,f=r.lineAt(l,wS.ByPos,i,0,0);c="center"==t.y?(f.top+f.bottom)/2-u/2:"start"==t.y||"nearest"==t.y&&l<s.from?f.top:f.bottom-u,s=new _S(r.lineAt(c-500,wS.ByHeight,i,0,0).from,r.lineAt(c+u+500,wS.ByHeight,i,0,0).to)}}return s}},{key:"mapViewport",value:function(e,t){var n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new _S(this.heightMap.lineAt(n,wS.ByPos,this.state.doc,0,0).from,this.heightMap.lineAt(r,wS.ByPos,this.state.doc,0,0).to)}},{key:"viewportIsAppropriate",value:function(e){var t=e.from,n=e.to,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var i=this.heightMap.lineAt(t,wS.ByPos,this.state.doc,0,0),o=i.top,a=this.heightMap.lineAt(n,wS.ByPos,this.state.doc,0,0),s=a.bottom,l=this.visibleTop,u=this.visibleBottom;return(0==t||o<=l-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=u+Math.max(10,Math.min(r,250)))&&o>l-2e3&&s<u+2e3}},{key:"mapLineGaps",value:function(e,t){if(!e.length||t.empty)return e;var n,r=[],i=oy(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.touchesRange(o.from,o.to)||r.push(new RS(t.mapPos(o.from),t.mapPos(o.to),o.size))}}catch(a){i.e(a)}finally{i.f()}return r}},{key:"ensureLineGaps",value:function(e){var t=this,n=[];if(this.heightOracle.direction!=ik.LTR)return n;var r,i=oy(this.viewportLines);try{var o=function(){var i=r.value;if(i.length<4e3)return"continue";var o=function(e,t,n){var r=[],i=e,o=0;Gb.spans(n.facet(ek),e,t,{span:function(){},point:function(e,t){e>i&&(r.push({from:i,to:e}),o+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),o+=t-i);return{total:o,ranges:r}}(i.from,i.to,t.state);if(o.total<4e3)return"continue";var a=void 0,s=void 0;if(t.heightOracle.lineWrapping){var l=2e3/t.heightOracle.lineLength*t.heightOracle.lineHeight;a=NS(o,(t.visibleTop-i.top-l)/i.height),s=NS(o,(t.visibleBottom-i.top+l)/i.height)}else{var u=o.total*t.heightOracle.charWidth,c=2e3*t.heightOracle.charWidth;a=NS(o,(t.pixelViewport.left-c)/u),s=NS(o,(t.pixelViewport.right+c)/u)}var f=[];a>i.from&&f.push({from:i.from,to:a}),s<i.to&&f.push({from:s,to:i.to});var d=t.state.selection.main;d.from>=i.from&&d.from<=i.to&&IS(f,d.from-10,d.from+10),!d.empty&&d.to>=i.from&&d.to<=i.to&&IS(f,d.to-10,d.to+10);for(var h=function(){var r=v[p],a=r.from,s=r.to;s-a>1e3&&n.push(function(e,t){var n,r=oy(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(t(i))return i}}catch(o){r.e(o)}finally{r.f()}return}(e,(function(e){return e.from>=i.from&&e.to<=i.to&&Math.abs(e.from-a)<1e3&&Math.abs(e.to-s)<1e3}))||new RS(a,s,t.gapSize(i,a,s,o)))},p=0,v=f;p<v.length;p++)h()};for(i.s();!(r=i.n()).done;)o()}catch(a){i.e(a)}finally{i.f()}return n}},{key:"gapSize",value:function(e,t,n,r){var i=LS(r,n)-LS(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}},{key:"updateLineGaps",value:function(e){var t=this;RS.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ww.set(e.map((function(e){return e.draw(t.heightOracle.lineWrapping)}))))}},{key:"computeVisibleRanges",value:function(){var e=this.state.facet(ek);this.lineGaps.length&&(e=e.concat(this.lineGapDeco));var t=[];Gb.spans(e,this.viewport.from,this.viewport.to,{span:function(e,n){t.push({from:e,to:n})},point:function(){}},20);var n=t.length!=this.visibleRanges.length||this.visibleRanges.some((function(e,n){return e.from!=t[n].from||e.to!=t[n].to}));return this.visibleRanges=t,n?4:0}},{key:"lineBlockAt",value:function(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((function(t){return t.from<=e&&t.to>=e}))||FS(this.heightMap.lineAt(e,wS.ByPos,this.state.doc,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(e){return FS(this.heightMap.lineAt(this.scaler.fromDOM(e),wS.ByHeight,this.state.doc,0,0),this.scaler)}},{key:"elementAtHeight",value:function(e){return FS(this.heightMap.blockAt(this.scaler.fromDOM(e),this.state.doc,0,0),this.scaler)}},{key:"docHeight",get:function(){return this.scaler.toDOM(this.heightMap.height)}},{key:"contentHeight",get:function(){return this.docHeight+this.paddingTop+this.paddingBottom}}]),e}(),_S=Su((function e(t,n){wu(this,e),this.from=t,this.to=n}));function NS(e,t){var n=e.total,r=e.ranges;if(t<=0)return r[0].from;if(t>=1)return r[r.length-1].to;for(var i=Math.floor(n*t),o=0;;o++){var a=r[o],s=a.from,l=a.to-s;if(i<=l)return s+i;i-=l}}function LS(e,t){var n,r=0,i=oy(e.ranges);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.from,s=o.to;if(t<=s){r+=t-a;break}r+=s-a}}catch(l){i.e(l)}finally{i.f()}return r/e.total}function IS(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(i.from<n&&i.to>t){var o=[];i.from<t&&o.push({from:i.from,to:t}),i.to>n&&o.push({from:n,to:i.to}),e.splice.apply(e,[r,1].concat(o)),r+=o.length-1}}}var zS={toDOM:function(e){return e},fromDOM:function(e){return e},scale:1},BS=function(){function e(t,n,r){wu(this,e);var i=0,o=0,a=0;this.viewports=r.map((function(e){var r=e.from,o=e.to,a=n.lineAt(r,wS.ByPos,t,0,0).top,s=n.lineAt(o,wS.ByPos,t,0,0).bottom;return i+=s-a,{from:r,to:o,top:a,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-i)/(n.height-i);var s,l=oy(this.viewports);try{for(l.s();!(s=l.n()).done;){var u=s.value;u.domTop=a+(u.top-o)*this.scale,a=u.domBottom=u.domTop+(u.bottom-u.top),o=u.bottom}}catch(c){l.e(c)}finally{l.f()}}return Su(e,[{key:"toDOM",value:function(e){for(var t=0,n=0,r=0;;t++){var i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}},{key:"fromDOM",value:function(e){for(var t=0,n=0,r=0;;t++){var i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}}]),e}();function FS(e,t){if(1==t.scale)return e;var n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new xS(e.from,e.length,n,r-n,Array.isArray(e.type)?e.type.map((function(e){return FS(e,t)})):e.type)}var $S=Ky.define({combine:function(e){return e.join(" ")}}),WS=Ky.define({combine:function(e){return e.indexOf(!0)>-1}}),HS=Hb.newName(),VS=Hb.newName(),qS=Hb.newName(),US={"&light":"."+VS,"&dark":"."+qS};function QS(e,t,n){return new Hb(t,{finish:function(t){return/&/.test(t)?t.replace(/&\w*/,(function(t){if("&"==t)return e;if(!n||!n[t])throw new RangeError("Unsupported selector: ".concat(t));return n[t]})):e+" "+t}})}var XS=QS("."+HS,{"&.cm-editor":{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,minHeight:"100%",display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",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"},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{position:"absolute"},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{zIndex:100,contain:"size style",pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},".cm-cursor, .cm-dropCursor":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".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"}},US),YS={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},GS=ow.ie&&ow.ie_version<=11,KS=function(){function e(t,n,r){var i=this;wu(this,e),this.view=t,this.onChange=n,this.onScrollChanged=r,this.active=!1,this.selectionRange=new Rx,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((function(e){var n,r=oy(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;i.queue.push(o)}}catch(a){r.e(a)}finally{r.f()}(ow.ie&&ow.ie_version<=11||ow.ios&&t.composing)&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?i.flushSoon():i.flush()})),GS&&(this.onCharData=function(e){i.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),i.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),"function"==typeof ResizeObserver&&(this.resize=new ResizeObserver((function(){i.view.docView.lastUpdate<Date.now()-75&&i.resizeTimeout<0&&(i.resizeTimeout=setTimeout((function(){i.resizeTimeout=-1,i.view.requestMeasure()}),50))})),this.resize.observe(t.scrollDOM)),this.start(),this.onScroll=this.onScroll.bind(this),window.addEventListener("scroll",this.onScroll),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((function(e){i.parentCheck<0&&(i.parentCheck=setTimeout(i.listenForScroll.bind(i),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=i.intersecting&&(i.intersecting=!i.intersecting,i.intersecting!=i.view.inView&&i.onScrollChanged(document.createEvent("Event")))}),{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((function(e){e.length>0&&e[e.length-1].intersectionRatio>0&&i.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange(),this.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}return Su(e,[{key:"onScroll",value:function(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}},{key:"updateGaps",value:function(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((function(t,n){return t!=e[n]})))){this.gapIntersection.disconnect();var t,n=oy(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.gapIntersection.observe(r)}}catch(i){n.e(i)}finally{n.f()}this.gaps=e}}},{key:"onSelectionChange",value:function(e){if(this.readSelectionRange()&&!this.delayedAndroidKey){var t=this.view,n=this.selectionRange;if(t.state.facet(Hw)?t.root.activeElement==this.dom:kx(t.dom,n)){var r=n.anchorNode&&t.docView.nearest(n.anchorNode);r&&r.ignoreEvent(e)||((ow.ie&&ow.ie_version<=11||ow.android&&ow.chrome)&&!t.state.selection.main.empty&&n.focusNode&&Ox(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1))}}}},{key:"readSelectionRange",value:function(){var e=this.view.root,t=xx(e),n=ow.safari&&11==e.nodeType&&function(){for(var e=document.activeElement;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}()==this.view.contentDOM&&function(e){var t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),document.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;var r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor);if(Ox(s.node,s.offset,o,a)){var l=[o,a,r,i];r=l[0],i=l[1],o=l[2],a=l[3]}return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:a}}(this.view)||t;return!this.selectionRange.eq(n)&&(this.selectionRange.setRange(n),this.selectionChanged=!0)}},{key:"setSelectionRange",value:function(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}},{key:"listenForScroll",value:function(){this.parentCheck=-1;for(var e=0,t=null,n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){var r,i=oy(this.scrollTargets);try{for(i.s();!(r=i.n()).done;){r.value.removeEventListener("scroll",this.onScroll)}}catch(s){i.e(s)}finally{i.f()}var o,a=oy(this.scrollTargets=t);try{for(a.s();!(o=a.n()).done;){o.value.addEventListener("scroll",this.onScroll)}}catch(s){a.e(s)}finally{a.f()}}}},{key:"ignore",value:function(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}},{key:"start",value:function(){this.active||(this.observer.observe(this.dom,YS),GS&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}},{key:"stop",value:function(){this.active&&(this.active=!1,this.observer.disconnect(),GS&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}},{key:"clear",value:function(){this.observer.takeRecords(),this.queue.length=0,this.selectionChanged=!1}},{key:"delayAndroidKey",value:function(e,t){var n=this;this.delayedAndroidKey||requestAnimationFrame((function(){var e=n.delayedAndroidKey;n.delayedAndroidKey=null;var t=n.view.state;Nx(n.view.contentDOM,e.key,e.keyCode)?n.processRecords():n.flush(),n.view.state==t&&n.view.update([])})),this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t})}},{key:"flushSoon",value:function(){var e=this;this.delayedFlush<0&&(this.delayedFlush=window.setTimeout((function(){e.delayedFlush=-1,e.flush()}),20))}},{key:"forceFlush",value:function(){this.delayedFlush>=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1,this.flush())}},{key:"processRecords",value:function(){var e,t=this.queue,n=oy(this.observer.takeRecords());try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push(r)}}catch(f){n.e(f)}finally{n.f()}t.length&&(this.queue=[]);var i,o=-1,a=-1,s=!1,l=oy(t);try{for(l.s();!(i=l.n()).done;){var u=i.value,c=this.readMutation(u);c&&(c.typeOver&&(s=!0),-1==o?(o=c.from,a=c.to):(o=Math.min(c.from,o),a=Math.max(c.to,a)))}}catch(f){l.e(f)}finally{l.f()}return{from:o,to:a,typeOver:s}}},{key:"flush",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!(this.delayedFlush>=0||this.delayedAndroidKey)){e&&this.readSelectionRange();var t=this.processRecords(),n=t.from,r=t.to,i=t.typeOver,o=this.selectionChanged&&kx(this.dom,this.selectionRange);if(!(n<0)||o){this.selectionChanged=!1;var a=this.view.state;this.onChange(n,r,i),this.view.state==a&&this.view.update([])}}}},{key:"readMutation",value:function(e){var t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.dirty|=4),"childList"==e.type){var n=JS(t,e.previousSibling||e.target.previousSibling,-1),r=JS(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}},{key:"destroy",value:function(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resize)||void 0===n||n.disconnect();var r,i=oy(this.scrollTargets);try{for(i.s();!(r=i.n()).done;){r.value.removeEventListener("scroll",this.onScroll)}}catch(o){i.e(o)}finally{i.f()}window.removeEventListener("scroll",this.onScroll),this.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}}]),e}();function JS(e,t,n){for(;t;){var r=Fx.get(t);if(r&&r.parent==e)return r;var i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function eO(e,t,n,r){var i,o,a=e.state.selection.main;if(t>-1){var s=e.docView.domBoundsAround(t,n,0);if(!s||e.state.readOnly)return;var l=s.from,u=s.to,c=e.docView.impreciseHead||e.docView.impreciseAnchor?[]:function(e){var t=[];if(e.root.activeElement!=e.contentDOM)return t;var n=e.observer.selectionRange,r=n.anchorNode,i=n.anchorOffset,o=n.focusNode,a=n.focusOffset;r&&(t.push(new Pk(r,i)),o==r&&a==i||t.push(new Pk(o,a)));return t}(e),f=new Ck(c,e);f.readRange(s.startDOM,s.endDOM),o=function(e,t){if(0==e.length)return null;var n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?Qy.single(n+t,r+t):null}(c,l);var d=a.from,h=null;(8===e.inputState.lastKeyCode&&e.inputState.lastKeyTime>Date.now()-100||ow.android&&f.text.length<u-l)&&(d=a.to,h="end");var p=function(e,t,n,r){var i=Math.min(e.length,t.length),o=0;for(;o<i&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==i&&e.length==t.length)return null;var a=e.length,s=t.length;for(;a>0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;if("end"==r){n-=a+Math.max(0,o-Math.min(a,s))-o}if(a<o&&e.length<t.length){s=(o-=n<=o&&n>=a?o-n:0)+(s-a),a=o}else if(s<o){a=(o-=n<=o&&n>=s?o-n:0)+(a-s),s=o}return{from:o,toA:a,toB:s}}(e.state.sliceDoc(l,u),f.text,d-l,h);p&&(i={from:l+p.from,to:l+p.toA,insert:e.state.toText(f.text.slice(p.from,p.toB))})}else if(e.hasFocus||!e.state.facet(Hw)){var v=e.observer.selectionRange,m=e.docView,g=m.impreciseHead,y=m.impreciseAnchor,b=g&&g.node==v.focusNode&&g.offset==v.focusOffset||!wx(e.contentDOM,v.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(v.focusNode,v.focusOffset),x=y&&y.node==v.anchorNode&&y.offset==v.anchorOffset||!wx(e.contentDOM,v.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(v.anchorNode,v.anchorOffset);b==a.head&&x==a.anchor||(o=Qy.single(x,b))}if(i||o)if(!i&&r&&!a.empty&&o&&o.main.empty?i={from:a.from,to:a.to,insert:e.state.doc.slice(a.from,a.to)}:i&&i.from>=a.from&&i.to<=a.to&&(i.from!=a.from||i.to!=a.to)&&a.to-a.from-(i.to-i.from)<=4&&(i={from:a.from,to:a.to,insert:e.state.doc.slice(a.from,i.from).append(i.insert).append(e.state.doc.slice(i.to,a.to))}),i){var w=e.state;if(ow.ios&&e.inputState.flushIOSKey(e))return;if(ow.android&&(i.from==a.from&&i.to==a.to&&1==i.insert.length&&2==i.insert.lines&&Nx(e.contentDOM,"Enter",13)||i.from==a.from-1&&i.to==a.to&&0==i.insert.length&&Nx(e.contentDOM,"Backspace",8)||i.from==a.from&&i.to==a.to+1&&0==i.insert.length&&Nx(e.contentDOM,"Delete",46)))return;var k,S=i.insert.toString();if(e.state.facet(Iw).some((function(t){return t(e,i.from,i.to,S)})))return;if(e.inputState.composing>=0&&e.inputState.composing++,i.from>=a.from&&i.to<=a.to&&i.to-i.from>=(a.to-a.from)/3&&(!o||o.main.empty&&o.main.from==i.from+i.insert.length)){var O=a.from<i.from?w.sliceDoc(a.from,i.from):"",C=a.to>i.to?w.sliceDoc(i.to,a.to):"";k=w.replaceSelection(e.state.toText(O+i.insert.sliceString(0,void 0,e.state.lineBreak)+C))}else{var M=w.changes(i);k={changes:M,selection:o&&!w.selection.main.eq(o.main)&&o.main.to<=M.newLength?w.selection.replaceRange(o.main):void 0}}var P="input.type";e.composing&&(P+=".compose",e.inputState.compositionFirstChange&&(P+=".start",e.inputState.compositionFirstChange=!1)),e.dispatch(k,{scrollIntoView:!0,userEvent:P})}else if(o&&!o.main.eq(a)){var T=!1,E="select";e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(T=!0),E=e.inputState.lastSelectionOrigin),e.dispatch({selection:o,scrollIntoView:T,userEvent:E})}}var tO=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};wu(this,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: absolute; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=n.dispatch||function(e){return t.update([e])},this.dispatch=this.dispatch.bind(this),this.root=n.root||Lx(n.parent)||document,this.viewState=new jS(n.state||zb.create()),this.plugins=this.state.facet(Qw).map((function(e){return new Gw(e)}));var r,i=oy(this.plugins);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.update(this)}}catch(a){i.e(a)}finally{i.f()}this.observer=new KS(this,(function(e,n,r){eO(t,e,n,r)}),(function(e){t.inputState.runScrollHandlers(t,e),t.observer.intersecting&&t.measure()})),this.inputState=new Xk(this),this.docView=new Tk(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,oO(),this.requestMeasure(),n.parent&&n.parent.appendChild(this.dom)}return Su(e,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"dispatch",value:function(){var e;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof Tb?arguments.length<=0?void 0:arguments[0]:(e=this.state).update.apply(e,arguments))}},{key:"update",value:function(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var t,n,r=!1,i=this.state,o=oy(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=a.state}}catch(g){o.e(g)}finally{o.f()}if(this.destroyed)this.viewState.state=i;else{if(i.facet(zb.phrases)!=this.state.facet(zb.phrases))return this.setState(i);t=new rk(this,i,e);var s=null;try{this.updateState=2;var l,u=oy(e);try{for(u.s();!(l=u.n()).done;){var c=l.value;if(s&&(s=s.map(c.changes)),c.scrollIntoView){var f=c.state.selection.main;s=new Fw(f.empty?f:Qy.cursor(f.head,f.head>f.anchor?-1:1))}var d,h=oy(c.effects);try{for(h.s();!(d=h.n()).done;){var p=d.value;p.is(zw)?s=new Fw(p.value):p.is(Bw)?s=new Fw(p.value,"center"):p.is($w)&&(s=p.value)}}catch(g){h.e(g)}finally{h.f()}}}catch(g){u.e(g)}finally{u.f()}this.viewState.update(t,s),this.bidiCache=lO.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),r=this.docView.update(t),this.state.facet(tk)!=this.styleModules&&this.mountStyles(),this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(r,e.some((function(e){return e.isUserEvent("select.pointer")})))}finally{this.updateState=0}if((r||s||this.viewState.mustEnforceCursorAssoc)&&this.requestMeasure(),!t.empty){var v,m=oy(this.state.facet(Lw));try{for(m.s();!(v=m.n()).done;){(0,v.value)(t)}}catch(g){m.e(g)}finally{m.f()}}}}},{key:"setState",value:function(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=e;else{this.updateState=2;try{var t,n=oy(this.plugins);try{for(n.s();!(t=n.n()).done;){t.value.destroy(this)}}catch(o){n.e(o)}finally{n.f()}this.viewState=new jS(e),this.plugins=e.facet(Qw).map((function(e){return new Gw(e)})),this.pluginMap.clear();var r,i=oy(this.plugins);try{for(i.s();!(r=i.n()).done;){r.value.update(this)}}catch(o){i.e(o)}finally{i.f()}this.docView=new Tk(this),this.inputState.ensureHandlers(this),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}this.requestMeasure()}}},{key:"updatePlugins",value:function(e){var t=e.startState.facet(Qw),n=e.state.facet(Qw);if(t!=n){var r,i=[],o=oy(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=t.indexOf(a);if(s<0)i.push(new Gw(a));else{var l=this.plugins[s];l.mustUpdate=e,i.push(l)}}}catch(v){o.e(v)}finally{o.f()}var u,c=oy(this.plugins);try{for(c.s();!(u=c.n()).done;){var f=u.value;f.mustUpdate!=e&&f.destroy(this)}}catch(v){c.e(v)}finally{c.f()}this.plugins=i,this.pluginMap.clear(),this.inputState.ensureHandlers(this)}else{var d,h=oy(this.plugins);try{for(h.s();!(d=h.n()).done;){d.value.mustUpdate=e}}catch(v){h.e(v)}finally{h.f()}}for(var p=0;p<this.plugins.length;p++)this.plugins[p].update(this)}},{key:"measure",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,t&&this.observer.flush();var n=null;try{for(var r=0;;r++){this.updateState=1;var i=this.viewport,o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(r>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var a=[];if(!(4&o)){var s=[a,this.measureRequests];this.measureRequests=s[0],a=s[1]}var l=a.map((function(t){try{return t.read(e)}catch(n){return Ww(e.state,n),sO}})),u=new rk(this,this.state),c=!1;u.flags|=o,n?n.flags|=o:n=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),c=this.docView.update(u));for(var f=0;f<a.length;f++)if(l[f]!=sO)try{var d=a[f];d.write&&d.write(l[f],this)}catch(m){Ww(this.state,m)}if(this.viewState.scrollTarget&&(this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null),c&&this.docView.updateSelection(!0),this.viewport.from==i.from&&this.viewport.to==i.to&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty){var h,p=oy(this.state.facet(Lw));try{for(p.s();!(h=p.n()).done;){var v=h.value;v(n)}}catch(g){p.e(g)}finally{p.f()}}}}},{key:"themeClasses",get:function(){return HS+" "+(this.state.facet(WS)?qS:VS)+" "+this.state.facet($S)}},{key:"updateAttrs",value:function(){var e=this,t=uO(this,Kw,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Hw)?"true":"false",class:"cm-content",style:"".concat(ow.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),uO(this,Jw,n),this.observer.ignore((function(){yw(e.contentDOM,e.contentAttrs,n),yw(e.dom,e.editorAttrs,t)})),this.editorAttrs=t,this.contentAttrs=n}},{key:"showAnnouncements",value:function(t){var n,r=!0,i=oy(t);try{for(i.s();!(n=i.n()).done;){var o,a=oy(n.value.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.is(e.announce))r&&(this.announceDOM.textContent=""),r=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=s.value}}catch(l){a.e(l)}finally{a.f()}}}catch(l){i.e(l)}finally{i.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(tk),Hb.mount(this.root,this.styleModules.concat(XS).reverse())}},{key:"readMeasured",value:function(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}},{key:"requestMeasure",value:function(e){var t=this;if(this.measureScheduled<0&&(this.measureScheduled=requestAnimationFrame((function(){return t.measure()}))),e){if(null!=e.key)for(var n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key)return void(this.measureRequests[n]=e);this.measureRequests.push(e)}}},{key:"pluginField",value:function(e){var t,n=[],r=oy(this.plugins);try{for(r.s();!(t=r.n()).done;){t.value.update(this).takeField(e,n)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"plugin",value:function(e){var t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find((function(t){return t.spec==e}))||null),t&&t.update(this).value}},{key:"documentTop",get:function(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}},{key:"documentPadding",get:function(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}},{key:"blockAtHeight",value:function(e,t){var n=rO(t,this);return this.elementAtHeight(e-n).moveY(n)}},{key:"elementAtHeight",value:function(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}},{key:"visualLineAtHeight",value:function(e,t){var n=rO(t,this);return this.lineBlockAtHeight(e-n).moveY(n)}},{key:"lineBlockAtHeight",value:function(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}},{key:"viewportLines",value:function(e,t){var n,r=rO(t,this),i=oy(this.viewportLineBlocks);try{for(i.s();!(n=i.n()).done;){e(n.value.moveY(r))}}catch(o){i.e(o)}finally{i.f()}}},{key:"viewportLineBlocks",get:function(){return this.viewState.viewportLines}},{key:"visualLineAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.lineBlockAt(e).moveY(t+this.viewState.paddingTop)}},{key:"lineBlockAt",value:function(e){return this.viewState.lineBlockAt(e)}},{key:"contentHeight",get:function(){return this.viewState.contentHeight}},{key:"moveByChar",value:function(e,t,n){return Qk(this,e,Uk(this,e,t,n))}},{key:"moveByGroup",value:function(e,t){var n=this;return Qk(this,e,Uk(this,e,t,(function(t){return function(e,t,n){var r=e.state.charCategorizer(t),i=r(n);return function(e){var t=r(e);return i==Nb.Space&&(i=t),i==t}}(n,e.head,t)})))}},{key:"moveToLineBoundary",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return qk(this,e,t,n)}},{key:"moveVertically",value:function(e,t,n){return Qk(this,e,function(e,t,n,r){var i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return Qy.cursor(i);var a,s=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(i),c=e.documentTop;if(u)null==s&&(s=u.left-l.left),a=o<0?u.top:u.bottom;else{var f=e.viewState.lineBlockAt(i-c);null==s&&(s=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-f.from))),a=(o<0?f.top:f.bottom)+c}for(var d=l.left+s,h=null!==r&&void 0!==r?r:e.defaultLineHeight>>1,p=0;;p+=10){var v=a+(h+p)*o,m=Wk(e,{x:d,y:v},!1,o);if(v<l.top||v>l.bottom||(o<0?m<i:m>i))return Qy.cursor(m,void 0,void 0,s)}}(this,e,t,n))}},{key:"scrollPosIntoView",value:function(e){this.dispatch({effects:zw.of(Qy.cursor(e))})}},{key:"domAtPos",value:function(e){return this.docView.domAtPos(e)}},{key:"posAtDOM",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.posFromDOM(e,t)}},{key:"posAtCoords",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),Wk(this,e,t)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;var r=this.state.doc.lineAt(e),i=this.bidiSpans(r),o=i[bk.find(i,e-r.from,-1,t)];return Ex(n,o.dir==ik.LTR==t>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.heightOracle.direction}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(e){if(e.length>nO)return kk(e.length);var t,n=this.textDirection,r=oy(this.bidiCache);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i.from==e.from&&i.dir==n)return i.order}}catch(a){r.e(a)}finally{r.f()}var o=wk(e.text,this.textDirection);return this.bidiCache.push(new lO(e.from,e.to,n,o)),o}},{key:"hasFocus",get:function(){var e;return(document.hasFocus()||ow.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var e=this;this.observer.ignore((function(){jx(e.contentDOM),e.docView.updateSelection()}))}},{key:"destroy",value:function(){var e,t=oy(this.plugins);try{for(t.s();!(e=t.n()).done;){e.value.destroy(this)}}catch(n){t.e(n)}finally{t.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return $w.of(new Fw("number"==typeof e?Qy.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}},{key:"domEventHandlers",value:function(e){return Xw.define((function(){return{}}),{eventHandlers:e})}},{key:"theme",value:function(e,t){var n=Hb.newName(),r=[$S.of(n),tk.of(QS(".".concat(n),e))];return t&&t.dark&&r.push(WS.of(!0)),r}},{key:"baseTheme",value:function(e){return ub.lowest(tk.of(QS("."+HS,e,US)))}}]),e}();tO.scrollTo=zw,tO.centerOn=Bw,tO.styleModule=tk,tO.inputHandler=Iw,tO.exceptionSink=Nw,tO.updateListener=Lw,tO.editable=Hw,tO.mouseSelectionStyle=_w,tO.dragMovesSelection=jw,tO.clickAddsSelectionRange=Dw,tO.decorations=ek,tO.contentAttributes=Jw,tO.editorAttributes=Kw,tO.lineWrapping=tO.contentAttributes.of({class:"cm-lineWrapping"}),tO.announce=Pb.define();var nO=4096;function rO(e,t){return(null==e?t.contentDOM.getBoundingClientRect().top:e)+t.viewState.paddingTop}var iO=-1;function oO(){window.addEventListener("resize",(function(){-1==iO&&(iO=setTimeout(aO,50))}))}function aO(){iO=-1;for(var e=document.querySelectorAll(".cm-content"),t=0;t<e.length;t++){var n=Fx.get(e[t]);n&&n.editorView.requestMeasure()}}var sO={},lO=function(){function e(t,n,r,i){wu(this,e),this.from=t,this.to=n,this.dir=r,this.order=i}return Su(e,null,[{key:"update",value:function(t,n){if(n.empty)return t;for(var r=[],i=t.length?t[t.length-1].dir:ik.LTR,o=Math.max(0,t.length-10);o<t.length;o++){var a=t[o];a.dir!=i||n.touchesRange(a.from,a.to)||r.push(new e(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.order))}return r}}]),e}();function uO(e,t,n){for(var r=e.state.facet(t),i=r.length-1;i>=0;i--){var o=r[i],a="function"==typeof o?o(e):o;a&&mw(a,n)}return n}var cO=ow.mac?"mac":ow.windows?"win":ow.linux?"linux":"key";function fO(e,t){var n,r,i,o,a=e.split(/-(?!$)/),s=a[a.length-1];"Space"==s&&(s=" ");for(var l=0;l<a.length-1;++l){var u=a[l];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))n=!0;else if(/^(c|ctrl|control)$/i.test(u))r=!0;else if(/^s(hift)?$/i.test(u))i=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: "+u);"mac"==t?o=!0:r=!0}}return n&&(s="Alt-"+s),r&&(s="Ctrl-"+s),o&&(s="Meta-"+s),i&&(s="Shift-"+s),s}function dO(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}var hO=tO.domEventHandlers({keydown:function(e,t){return bO(mO(t.state),e,t,"editor")}}),pO=Ky.define({enables:hO}),vO=new WeakMap;function mO(e){var t=e.facet(pO),n=vO.get(t);return n||vO.set(t,n=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cO,r=Object.create(null),i=Object.create(null),o=function(e,t){var n=i[e];if(null==n)i[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},a=function(e,t,i,a){for(var s=r[e]||(r[e]=Object.create(null)),l=t.split(/ (?!$)/).map((function(e){return fO(e,n)})),u=function(t){var n=l.slice(0,t).join(" ");o(n,!0),s[n]||(s[n]={preventDefault:!0,commands:[function(t){var r=gO={view:t,prefix:n,scope:e};return setTimeout((function(){gO==r&&(gO=null)}),yO),!0}]})},c=1;c<l.length;c++)u(c);var f=l.join(" ");o(f,!1);var d=s[f]||(s[f]={preventDefault:!1,commands:[]});d.commands.push(i),a&&(d.preventDefault=!0)},s=oy(e);try{for(s.s();!(t=s.n()).done;){var l=t.value,u=l[n]||l.key;if(u){var c,f=oy(l.scope?l.scope.split(" "):["editor"]);try{for(f.s();!(c=f.n()).done;){var d=c.value;a(d,u,l.run,l.preventDefault),l.shift&&a(d,"Shift-"+u,l.shift,l.preventDefault)}}catch(h){f.e(h)}finally{f.f()}}}}catch(h){s.e(h)}finally{s.f()}return r}(t.reduce((function(e,t){return e.concat(t)}),[]))),n}var gO=null,yO=4e3;function bO(e,t,n,r){var i=function(e){var t=!(gx&&(e.ctrlKey||e.altKey||e.metaKey)||(hx||mx)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?fx:cx)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),o=1==i.length&&" "!=i,a="",s=!1;gO&&gO.view==n&&gO.scope==r&&(a=gO.prefix+" ",(s=Gk.indexOf(t.keyCode)<0)&&(gO=null));var l,u=function(e){if(e){var t,r=oy(e.commands);try{for(r.s();!(t=r.n()).done;){if((0,t.value)(n))return!0}}catch(i){r.e(i)}finally{r.f()}e.preventDefault&&(s=!0)}return!1},c=e[r];if(c){if(u(c[a+dO(i,t,!o)]))return!0;if(o&&(t.shiftKey||t.altKey||t.metaKey)&&(l=cx[t.keyCode])&&l!=i){if(u(c[a+dO(l,t,!0)]))return!0}else if(o&&t.shiftKey&&u(c[a+dO(i,t,!0)]))return!0}return s}var xO=!ow.ios,wO=Ky.define({combine:function(e){return Bb(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:function(e,t){return Math.min(e,t)},drawRangeCursor:function(e,t){return e||t}})}});function kO(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[wO.of(e),OO,MO]}var SO=function(){function e(t,n,r,i,o){wu(this,e),this.left=t,this.top=n,this.width=r,this.height=i,this.className=o}return Su(e,[{key:"draw",value:function(){var e=document.createElement("div");return e.className=this.className,this.adjust(e),e}},{key:"adjust",value:function(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width>=0&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}},{key:"eq",value:function(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}}]),e}(),OO=Xw.fromClass(function(){function e(t){wu(this,e),this.view=t,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=t.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=t.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),t.requestMeasure(this.measureReq),this.setBlinkRate()}return Su(e,[{key:"setBlinkRate",value:function(){this.cursorLayer.style.animationDuration=this.view.state.facet(wO).cursorBlinkRate+"ms"}},{key:"update",value:function(e){var t=e.startState.facet(wO)!=e.state.facet(wO);(t||e.selectionSet||e.geometryChanged||e.viewportChanged)&&this.view.requestMeasure(this.measureReq),e.transactions.some((function(e){return e.scrollIntoView}))&&(this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),t&&this.setBlinkRate()}},{key:"readPos",value:function(){var e,t=this,n=this.view.state,r=n.facet(wO),i=n.selection.ranges.map((function(e){return e.empty?[]:function(e,t){if(t.to<=e.viewport.from||t.from>=e.viewport.to)return[];var n=Math.max(t.from,e.viewport.from),r=Math.min(t.to,e.viewport.to),i=e.textDirection==ik.LTR,o=e.contentDOM,a=o.getBoundingClientRect(),s=PO(e),l=window.getComputedStyle(o.firstChild),u=a.left+parseInt(l.paddingLeft)+Math.min(0,parseInt(l.textIndent)),c=a.right-parseInt(l.paddingRight),f=EO(e,n),d=EO(e,r),h=f.type==xw.Text?f:null,p=d.type==xw.Text?d:null;e.lineWrapping&&(h&&(h=TO(e,n,h)),p&&(p=TO(e,r,p)));if(h&&p&&h.from==p.from)return b(x(t.from,t.to,h));var v=h?x(t.from,null,h):w(f,!1),m=p?x(null,t.to,p):w(d,!0),g=[];return(h||f).to<(p||d).from-1?g.push(y(u,v.bottom,c,m.top)):v.bottom<m.top&&e.elementAtHeight((v.bottom+m.top)/2).type==xw.Text&&(v.bottom=m.top=(v.bottom+m.top)/2),b(v).concat(g).concat(b(m));function y(e,t,n,r){return new SO(e-s.left,t-s.top,n-e,r-t,"cm-selectionBackground")}function b(e){for(var t=e.top,n=e.bottom,r=e.horizontal,i=[],o=0;o<r.length;o+=2)i.push(y(r[o],t,r[o+1],n));return i}function x(t,n,r){var o=1e9,a=-1e9,s=[];function l(t,n,l,f,d){var h=e.coordsAtPos(t,t==r.to?-2:2),p=e.coordsAtPos(l,l==r.from?2:-2);o=Math.min(h.top,p.top,o),a=Math.max(h.bottom,p.bottom,a),d==ik.LTR?s.push(i&&n?u:h.left,i&&f?c:p.right):s.push(!i&&f?u:p.left,!i&&n?c:h.right)}var f,d=null!==t&&void 0!==t?t:r.from,h=null!==n&&void 0!==n?n:r.to,p=oy(e.visibleRanges);try{for(p.s();!(f=p.n()).done;){var v=f.value;if(v.to>d&&v.from<h)for(var m=Math.max(v.from,d),g=Math.min(v.to,h);;){var y,b=e.state.doc.lineAt(m),x=oy(e.bidiSpans(b));try{for(x.s();!(y=x.n()).done;){var w=y.value,k=w.from+b.from,S=w.to+b.from;if(k>=g)break;S>m&&l(Math.max(k,m),null==t&&k<=d,Math.min(S,g),null==n&&S>=h,w.dir)}}catch(O){x.e(O)}finally{x.f()}if((m=b.to+1)>=g)break}}}catch(O){p.e(O)}finally{p.f()}return 0==s.length&&l(d,null==t,h,null==n,e.textDirection),{top:o,bottom:a,horizontal:s}}function w(e,t){var n=a.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(t.view,e)})).reduce((function(e,t){return e.concat(t)})),o=[],a=oy(n.selection.ranges);try{for(a.s();!(e=a.n()).done;){var s=e.value,l=s==n.selection.main;if(s.empty?!l||xO:r.drawRangeCursor){var u=ZO(this.view,s,l);u&&o.push(u)}}}catch(c){a.e(c)}finally{a.f()}return{rangePieces:i,cursors:o}}},{key:"drawSel",value:function(e){var t=this,n=e.rangePieces,r=e.cursors;if(n.length!=this.rangePieces.length||n.some((function(e,n){return!e.eq(t.rangePieces[n])}))){this.selectionLayer.textContent="";var i,o=oy(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.selectionLayer.appendChild(a.draw())}}catch(f){o.e(f)}finally{o.f()}this.rangePieces=n}if(r.length!=this.cursors.length||r.some((function(e,n){return!e.eq(t.cursors[n])}))){var s=this.cursorLayer.children;if(s.length!==r.length){this.cursorLayer.textContent="";var l,u=oy(r);try{for(u.s();!(l=u.n()).done;){var c=l.value;this.cursorLayer.appendChild(c.draw())}}catch(f){u.e(f)}finally{u.f()}}else r.forEach((function(e,t){return e.adjust(s[t])}));this.cursors=r}}},{key:"destroy",value:function(){this.selectionLayer.remove(),this.cursorLayer.remove()}}]),e}()),CO={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};xO&&(CO[".cm-line"].caretColor="transparent !important");var MO=ub.highest(tO.theme(CO));function PO(e){var t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==ik.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function TO(e,t,n){var r=Qy.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(r,!0,!0).from),type:xw.Text}}function EO(e,t){var n=e.lineBlockAt(t);if(Array.isArray(n.type)){var r,i=oy(n.type);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.to>t||o.to==t&&(o.to==n.to||o.type==xw.Text))return o}}catch(a){i.e(a)}finally{i.f()}}return n}function ZO(e,t,n){var r=e.coordsAtPos(t.head,t.assoc||1);if(!r)return null;var i=PO(e);return new SO(r.left-i.left,r.top-i.top,-1,r.bottom-r.top,n?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}var AO=Pb.define({map:function(e,t){return null==e?null:t.mapPos(e)}}),RO=nb.define({create:function(){return null},update:function(e,t){return null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((function(e,t){return t.is(AO)?t.value:e}),e)}}),DO=Xw.fromClass(function(){function e(t){wu(this,e),this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Su(e,[{key:"update",value:function(e){var t,n=e.state.field(RO);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(RO)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var e=this.view.state.field(RO),t=null!=e&&this.view.coordsAtPos(e);if(!t)return null;var n=this.view.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+this.view.scrollDOM.scrollLeft,top:t.top-n.top+this.view.scrollDOM.scrollTop,height:t.bottom-t.top}}},{key:"drawCursor",value:function(e){this.cursor&&(e?(this.cursor.style.left=e.left+"px",this.cursor.style.top=e.top+"px",this.cursor.style.height=e.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(e){this.view.state.field(RO)!=e&&this.view.dispatch({effects:AO.of(e)})}}]),e}(),{eventHandlers:{dragover:function(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave:function(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function jO(){return[RO,DO]}function _O(e,t,n,r,i){t.lastIndex=0;for(var o,a=e.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;o=t.exec(a.value);)i(s+o.index,s+o.index+o[0].length,o)}var NO=function(){function e(t){wu(this,e);var n=t.regexp,r=t.decoration,i=t.boundary,o=t.maxLength,a=void 0===o?1e3:o;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");this.regexp=n,this.getDeco="function"==typeof r?r:function(){return r},this.boundary=i,this.maxLength=a}return Su(e,[{key:"createDeco",value:function(e){var t,n=this,r=new Jb,i=oy(function(e,t){var n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;var r,i=[],o=oy(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.from,l=a.to;s=Math.max(e.state.doc.lineAt(s).from,s-t),l=Math.min(e.state.doc.lineAt(l).to,l+t),i.length&&i[i.length-1].to>=s?i[i.length-1].to=l:i.push({from:s,to:l})}}catch(u){o.e(u)}finally{o.f()}return i}(e,this.maxLength));try{for(i.s();!(t=i.n()).done;){var o=t.value,a=o.from,s=o.to;_O(e.state.doc,this.regexp,a,s,(function(t,i,o){return r.add(t,i,n.getDeco(o,e,t))}))}}catch(l){i.e(l)}finally{i.f()}return r.finish()}},{key:"updateDeco",value:function(e,t){var n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((function(t,i,o,a){a>e.view.viewport.from&&o<e.view.viewport.to&&(n=Math.min(o,n),r=Math.max(a,r))})),e.viewportChanged||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}},{key:"updateRange",value:function(e,t,n,r){var i,o=this,a=oy(e.visibleRanges);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=Math.max(s.from,n),u=Math.min(s.to,r);u>l&&function(){var n=e.state.doc.lineAt(l),r=n.to<u?e.state.doc.lineAt(u):n,i=Math.max(s.from,n.from),a=Math.min(s.to,r.to);if(o.boundary){for(;l>n.from;l--)if(o.boundary.test(n.text[l-1-n.from])){i=l;break}for(;u<r.to;u++)if(o.boundary.test(r.text[u-r.from])){a=u;break}}var c=[],f=void 0;if(n==r)for(o.regexp.lastIndex=i-n.from;(f=o.regexp.exec(n.text))&&f.index<a-n.from;){var d=f.index+n.from;c.push(o.getDeco(f,e,d).range(d,d+f[0].length))}else _O(e.state.doc,o.regexp,i,a,(function(t,n,r){return c.push(o.getDeco(r,e,t).range(t,n))}));t=t.update({filterFrom:i,filterTo:a,filter:function(e,t){return e<i||t>a},add:c})}()}}catch(c){a.e(c)}finally{a.f()}return t}}]),e}(),LO=null!=/x/.unicode?"gu":"g",IO=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\ufeff\ufff9-\ufffc]",LO),zO={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",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},BO=null;var FO=Ky.define({combine:function(e){var t=Bb(e,{render:null,specialChars:IO,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==BO&&"undefined"!=typeof document&&document.body){var t=document.body.style;BO=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return BO||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,LO)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,LO)),t}});function $O(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[FO.of(e),HO()]}var WO=null;function HO(){return WO||(WO=Xw.fromClass(function(){function e(t){wu(this,e),this.view=t,this.decorations=ww.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(FO)),this.decorations=this.decorator.createDeco(t)}return Su(e,[{key:"makeDecorator",value:function(e){var t=this;return new NO({regexp:e.specialChars,decoration:function(n,r,i){var o=r.state.doc,a=ky(n[0],0);if(9==a){var s=o.lineAt(i),l=r.state.tabSize,u=Cy(s.text,l,i-s.from);return ww.replace({widget:new qO((l-u%l)*t.view.defaultCharacterWidth)})}return t.decorationCache[a]||(t.decorationCache[a]=ww.replace({widget:new VO(e,a)}))},boundary:e.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(e){var t=e.state.facet(FO);e.startState.facet(FO)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}}]),e}(),{decorations:function(e){return e.decorations}}))}var VO=function(e){ay(n,e);var t=cy(n);function n(e,r){var i;return wu(this,n),(i=t.call(this)).options=e,i.code=r,i}return Su(n,[{key:"eq",value:function(e){return e.code==this.code}},{key:"toDOM",value:function(e){var t=function(e){return e>=32?"\u2022":10==e?"\u2424":String.fromCharCode(9216+e)}(this.code),n=e.state.phrase("Control character")+" "+(zO[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;var i=document.createElement("span");return i.textContent=t,i.title=n,i.setAttribute("aria-label",n),i.className="cm-specialChar",i}},{key:"ignoreEvent",value:function(){return!1}}]),n}(bw),qO=function(e){ay(n,e);var t=cy(n);function n(e){var r;return wu(this,n),(r=t.call(this)).width=e,r}return Su(n,[{key:"eq",value:function(e){return e.width==this.width}},{key:"toDOM",value:function(){var e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}},{key:"ignoreEvent",value:function(){return!1}}]),n}(bw);function UO(){return XO}var QO=ww.line({class:"cm-activeLine"}),XO=Xw.fromClass(function(){function e(t){wu(this,e),this.decorations=this.getDeco(t)}return Su(e,[{key:"update",value:function(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}},{key:"getDeco",value:function(e){var t,n=-1,r=[],i=oy(e.state.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(!o.empty)return ww.none;var a=e.lineBlockAt(o.head);a.from>n&&(r.push(QO.range(a.from)),n=a.from)}}catch(s){i.e(s)}finally{i.f()}return ww.set(r)}}]),e}(),{decorations:function(e){return e.decorations}});var YO=0,GO=Su((function e(t,n){wu(this,e),this.from=t,this.to=n})),KO=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};wu(this,e),this.id=YO++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Su(e,[{key:"add",value:function(e){var t=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=eC.match(e)),function(n){var r=e(n);return void 0===r?null:[t,r]}}}]),e}();KO.closedBy=new KO({deserialize:function(e){return e.split(" ")}}),KO.openedBy=new KO({deserialize:function(e){return e.split(" ")}}),KO.group=new KO({deserialize:function(e){return e.split(" ")}}),KO.contextHash=new KO({perNode:!0}),KO.lookAhead=new KO({perNode:!0}),KO.mounted=new KO({perNode:!0});var JO=Object.create(null),eC=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;wu(this,e),this.name=t,this.props=n,this.id=r,this.flags=i}return Su(e,[{key:"prop",value:function(e){return this.props[e.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(e){if("string"==typeof e){if(this.name==e)return!0;var t=this.prop(KO.group);return!!t&&t.indexOf(e)>-1}return this.id==e}}],[{key:"define",value:function(t){var n=t.props&&t.props.length?Object.create(null):JO,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),i=new e(t.name||"",n,t.id,r);if(t.props){var o,a=oy(t.props);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}}catch(l){a.e(l)}finally{a.f()}}return i}},{key:"match",value:function(e){var t=Object.create(null);for(var n in e){var r,i=oy(n.split(" "));try{for(i.s();!(r=i.n()).done;){var o=r.value;t[o]=e[n]}}catch(a){i.e(a)}finally{i.f()}}return function(e){for(var n=e.prop(KO.group),r=-1;r<(n?n.length:0);r++){var i=t[r<0?e.name:n[r]];if(i)return i}}}}]),e}();eC.none=new eC("",Object.create(null),0,8);var tC=function(){function e(t){wu(this,e),this.types=t;for(var n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}return Su(e,[{key:"extend",value:function(){for(var t=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o,a=oy(this.types);try{for(a.s();!(o=a.n()).done;){var s,l=o.value,u=null,c=oy(r);try{for(c.s();!(s=c.n()).done;){var f=s.value,d=f(l);d&&(u||(u=Object.assign({},l.props)),u[d[0].id]=d[1])}}catch(h){c.e(h)}finally{c.f()}t.push(u?new eC(l.name,u,l.id,l.flags):l)}}catch(h){a.e(h)}finally{a.f()}return new e(t)}}]),e}(),nC=new WeakMap,rC=function(){function e(t,n,i,o,a){if(wu(this,e),this.type=t,this.children=n,this.positions=i,this.length=o,this.props=null,a&&a.length){this.props=Object.create(null);var s,l=oy(a);try{for(l.s();!(s=l.n()).done;){var u=(0,r.Z)(s.value,2),c=u[0],f=u[1];this.props["number"==typeof c?c:c.id]=f}}catch(d){l.e(d)}finally{l.f()}}}return Su(e,[{key:"toString",value:function(){var e=this.prop(KO.mounted);if(e&&!e.overlay)return e.tree.toString();var t,n="",r=oy(this.children);try{for(r.s();!(t=r.n()).done;){var i=t.value.toString();i&&(n&&(n+=","),n+=i)}}catch(o){r.e(o)}finally{r.f()}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}},{key:"cursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=null!=e&&nC.get(this)||this.topNode,r=new dC(n);return null!=e&&(r.moveTo(e,t),nC.set(this,r._tree)),r}},{key:"fullCursor",value:function(){return new dC(this.topNode,1)}},{key:"topNode",get:function(){return new lC(this,0,0,null)}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.cursor(e,t).node}},{key:"resolveInner",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.topNode;;){var r=n.enter(e,t);if(!r)return n;n=r}}},{key:"iterate",value:function(e){for(var t=e.enter,n=e.leave,r=e.from,i=void 0===r?0:r,o=e.to,a=void 0===o?this.length:o,s=this.cursor(),l=function(){return s.node};;){var u=!1;if(s.from<=a&&s.to>=i&&(s.type.isAnonymous||!1!==t(s.type,s.from,s.to,l))){if(s.firstChild())continue;s.type.isAnonymous||(u=!0)}for(;u&&n&&n(s.type,s.from,s.to,l),u=s.type.isAnonymous,!s.nextSibling();){if(!s.parent())return;u=!0}}}},{key:"prop",value:function(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}},{key:"propValues",get:function(){var e=[];if(this.props)for(var t in this.props)e.push([+t,this.props[t]]);return e}},{key:"balance",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.children.length<=8?this:gC(this.type,this.children,this.positions,0,this.children.length,0,this.length,(function(n,r,i){return new e(t.type,n,r,i,t.propValues)}),n.makeTree||function(t,n,r){return new e(eC.none,t,n,r)})}}],[{key:"build",value:function(e){return pC(e)}}]),e}();rC.empty=new rC(eC.none,[],[],0);var iC=function(){function e(t,n){wu(this,e),this.buffer=t,this.index=n}return Su(e,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new e(this.buffer,this.index)}}]),e}(),oC=function(){function e(t,n,r){wu(this,e),this.buffer=t,this.length=n,this.set=r}return Su(e,[{key:"type",get:function(){return eC.none}},{key:"toString",value:function(){for(var e=[],t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}},{key:"childString",value:function(e){var t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),n==(e+=4))return i;for(var o=[];e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return i+"("+o.join(",")+")"}},{key:"findChild",value:function(e,t,n,r,i){for(var o=this.buffer,a=-1,s=e;s!=t&&!(aC(i,r,o[s+1],o[s+2])&&(a=s,n>0));s=o[s+3]);return a}},{key:"slice",value:function(t,n,r,i){for(var o=this.buffer,a=new Uint16Array(n-t),s=t,l=0;s<n;)a[l++]=o[s++],a[l++]=o[s++]-r,a[l++]=o[s++]-r,a[l++]=o[s++]-t;return new e(a,i-r,this.set)}}]),e}();function aC(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function sC(e,t){for(var n=e.childBefore(t);n;){var r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(e=n,n=r.prevSibling):n=r}return e}var lC=function(){function e(t,n,r,i){wu(this,e),this.node=t,this._from=n,this.index=r,this._parent=i}return Su(e,[{key:"type",get:function(){return this.node.type}},{key:"name",get:function(){return this.node.type.name}},{key:"from",get:function(){return this._from}},{key:"to",get:function(){return this._from+this.node.length}},{key:"nextChild",value:function(t,n,r,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=this;;){for(var s=a.node,l=s.children,u=s.positions,c=n>0?l.length:-1;t!=c;t+=n){var f=l[t],d=u[t]+a._from;if(aC(i,r,d,d+f.length))if(f instanceof oC){if(2&o)continue;var h=f.findChild(0,f.buffer.length,n,r-d,i);if(h>-1)return new fC(new cC(a,f,t,d),null,h)}else if(1&o||!f.type.isAnonymous||hC(f)){var p=void 0;if(f.props&&(p=f.prop(KO.mounted))&&!p.overlay)return new e(p.tree,d,t,a);var v=new e(f,d,t,a);return 1&o||!v.type.isAnonymous?v:v.nextChild(n<0?f.children.length-1:0,n,r,i)}}if(1&o||!a.type.isAnonymous)return null;if(t=a.index>=0?a.index+n:n<0?-1:a._parent.node.children.length,!(a=a._parent))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this.node.children.length-1,-1,0,4)}},{key:"childAfter",value:function(e){return this.nextChild(0,1,e,2)}},{key:"childBefore",value:function(e){return this.nextChild(this.node.children.length-1,-1,e,-2)}},{key:"enter",value:function(t,n){var r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(i&&(r=this.node.prop(KO.mounted))&&r.overlay){var a,s=t-this.from,l=oy(r.overlay);try{for(l.s();!(a=l.n()).done;){var u=a.value,c=u.from,f=u.to;if((n>0?c<=s:c<s)&&(n<0?f>=s:f>s))return new e(r.tree,r.overlay[0].from+this.from,-1,this)}}catch(d){l.e(d)}finally{l.f()}}return this.nextChild(0,1,t,n,o?0:2)}},{key:"nextSignificantParent",value:function(){for(var e=this;e.type.isAnonymous&&e._parent;)e=e._parent;return e}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",get:function(){return new dC(this)}},{key:"tree",get:function(){return this.node}},{key:"toTree",value:function(){return this.node}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.cursor.moveTo(e,t).node}},{key:"enterUnfinishedNodesBefore",value:function(e){return sC(this,e)}},{key:"getChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=uC(this,e,t,n);return r.length?r[0]:null}},{key:"getChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return uC(this,e,t,n)}},{key:"toString",value:function(){return this.node.toString()}}]),e}();function uC(e,t,n,r){var i=e.cursor,o=[];if(!i.firstChild())return o;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}var cC=Su((function e(t,n,r,i){wu(this,e),this.parent=t,this.buffer=n,this.index=r,this.start=i})),fC=function(){function e(t,n,r){wu(this,e),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}return Su(e,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(t,n,r){var i=this.context.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return o<0?null:new e(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(e){return this.child(1,e,2)}},{key:"childBefore",value:function(e){return this.child(-1,e,-2)}},{key:"enter",value:function(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!i)return null;var o=this.context.buffer,a=o.findChild(this.index+4,o.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}},{key:"nextSibling",get:function(){var t=this.context.buffer,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}},{key:"prevSibling",get:function(){var t=this.context.buffer,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}},{key:"cursor",get:function(){return new dC(this)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var e=[],t=[],n=this.context.buffer,r=this.index+4,i=n.buffer[this.index+3];if(i>r){var o=n.buffer[this.index+1],a=n.buffer[this.index+2];e.push(n.slice(r,i,o,a)),t.push(0)}return new rC(this.type,e,t,this.to-this.from)}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.cursor.moveTo(e,t).node}},{key:"enterUnfinishedNodesBefore",value:function(e){return sC(this,e)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=uC(this,e,t,n);return r.length?r[0]:null}},{key:"getChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return uC(this,e,t,n)}}]),e}(),dC=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(wu(this,e),this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof lC)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(var r=t._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=t,this.yieldBuf(t.index)}}return Su(e,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}},{key:"yieldBuf",value:function(e,t){this.index=e;var n=this.buffer,r=n.start,i=n.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}},{key:"yield",value:function(e){return!!e&&(e instanceof lC?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree.node.children.length-1:0,e,t,n,this.mode));var r=this.buffer.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(e){return this.enterChild(1,e,2)}},{key:"childBefore",value:function(e){return this.enterChild(-1,e,-2)}},{key:"enter",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.buffer?!!r&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n,r))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(1&this.mode?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var e=1&this.mode?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}},{key:"sibling",value:function(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));var t=this.buffer.buffer,n=this.stack.length-1;if(e<0){var r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{var i=t.buffer[this.index+3];if(i<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(e){var t,n,r=this.buffer;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(var i=0;i<this.index;i++)if(r.buffer.buffer[i+3]<this.index)return!1;t=r.index,n=r.parent}else{var o=this._tree;t=o.index,n=o._parent}for(;n;t=(a=n).index,n=a._parent,a){var a;if(t>-1)for(var s=t+e,l=e<0?-1:n.node.children.length;s!=l;s+=e){var u=n.node.children[s];if(1&this.mode||u instanceof oC||!u.type.isAnonymous||hC(u))return!1}}return!0}},{key:"move",value:function(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}},{key:"next",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(1,e)}},{key:"prev",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(-1,e)}},{key:"moveTo",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}},{key:"node",get:function(){if(!this.buffer)return this._tree;var e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(var r=this.index,i=this.stack.length;i>=0;){for(var o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break e}r=this.stack[--i]}for(var a=n;a<this.stack.length;a++)t=new fC(this.buffer,t,this.stack[a]);return this.bufferNode=new fC(this.buffer,t,this.index)}},{key:"tree",get:function(){return this.buffer?null:this._tree.node}}]),e}();function hC(e){return e.children.some((function(e){return e instanceof oC||!e.type.isAnonymous||hC(e)}))}function pC(e){var t,n=e.buffer,r=e.nodeSet,i=e.maxBufferLength,o=void 0===i?1024:i,a=e.reused,s=void 0===a?[]:a,l=e.minRepeatType,u=void 0===l?r.types.length:l,c=Array.isArray(n)?new iC(n,n.length):n,f=r.types,d=0,h=0;function p(e,t,n,i,a){for(var l=c.id,y=c.start,b=c.end,x=c.size,w=h;x<0;){if(c.next(),-1==x){var k=s[l];return n.push(k),void i.push(y-e)}if(-3==x)return void(d=l);if(-4==x)return void(h=l);throw new RangeError("Unrecognized record size: ".concat(x))}var S,O,C=f[l],M=y-e;if(b-y<=o&&(O=function(e,t){var n=c.fork(),r=0,i=0,a=0,s=n.end-o,l={size:0,start:0,skip:0};e:for(var f=n.pos-e;n.pos>f;){var d=n.size;if(n.id==t&&d>=0)l.size=r,l.start=i,l.skip=a,a+=4,r+=4,n.next();else{var h=n.pos-d;if(d<0||h<f||n.start<s)break;var p=n.id>=u?4:0,v=n.start;for(n.next();n.pos>h;){if(n.size<0){if(-3!=n.size)break e;p+=4}else n.id>=u&&(p+=4);n.next()}i=v,r+=d,a+=p}}(t<0||r==e)&&(l.size=r,l.start=i,l.skip=a);return l.size>4?l:void 0}(c.pos-t,a))){for(var P=new Uint16Array(O.size-O.skip),T=c.pos-O.size,E=P.length;c.pos>T;)E=g(O.start,P,E);S=new oC(P,b-O.start,r),M=O.start-e}else{var Z=c.pos-x;c.next();for(var A=[],R=[],D=l>=u?l:-1,j=0,_=b;c.pos>Z;)D>=0&&c.id==D&&c.size>=0?(c.end<=_-o&&(v(A,R,y,j,c.end,_,D,w),j=A.length,_=c.end),c.next()):p(y,Z,A,R,D);if(D>=0&&j>0&&j<A.length&&v(A,R,y,j,y,_,D,w),A.reverse(),R.reverse(),D>-1&&j>0){var N=function(e){return function(t,n,r){var i,o,a=0,s=t.length-1;if(s>=0&&(i=t[s])instanceof rC){if(!s&&i.type==e&&i.length==r)return i;(o=i.prop(KO.lookAhead))&&(a=n[s]+i.length+o)}return m(e,t,n,r,a)}}(C);S=gC(C,A,R,0,A.length,0,b-y,N,N)}else S=m(C,A,R,b-y,w-b)}n.push(S),i.push(M)}function v(e,t,n,i,o,a,s,l){for(var u=[],c=[];e.length>i;)u.push(e.pop()),c.push(t.pop()+n-o);e.push(m(r.types[s],u,c,a-o,l-a)),t.push(o-n)}function m(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0;if(d){var a=[KO.contextHash,d];o=o?[a].concat(o):[a]}if(i>25){var s=[KO.lookAhead,i];o=o?[s].concat(o):[s]}return new rC(e,t,n,r,o)}function g(e,t,n){var r=c.id,i=c.start,o=c.end,a=c.size;if(c.next(),a>=0&&r<u){var s=n;if(a>4)for(var l=c.pos-(a-4);c.pos>l;)n=g(e,t,n);t[--n]=s,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else-3==a?d=r:-4==a&&(h=r);return n}for(var y=[],b=[];c.pos>0;)p(e.start||0,e.bufferStart||0,y,b,-1);var x=null!==(t=e.length)&&void 0!==t?t:y.length?b[0]+y[0].length:0;return new rC(f[e.topID],y.reverse(),b.reverse(),x)}var vC=new WeakMap;function mC(e,t){if(!e.isAnonymous||t instanceof oC||t.type!=e)return 1;var n=vC.get(t);return null==n&&(n=t.children.reduce((function(t,n){return t+mC(e,n)}),1),vC.set(t,n)),n}function gC(e,t,n,r,i,o,a,s,l){for(var u=0,c=r;c<i;c++)u+=mC(e,t[c]);var f=Math.ceil(1.5*u/8),d=[],h=[];return function t(n,r,i,a,s){for(var u=i;u<a;){var c=u,p=r[u],v=mC(e,n[u]);for(u++;u<a;u++){var m=mC(e,n[u]);if(v+m>=f)break;v+=m}if(u==c+1){if(v>f){var g=n[c];t(g.children,g.positions,0,g.children.length,r[c]+s);continue}d.push(n[c])}else{var y=r[u-1]+n[u-1].length-p;d.push(gC(e,n,r,c,u,p,y,null,l))}h.push(p+s-o)}}(t,n,r,i,0),(s||l)(d,h,a)}var yC=function(){function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];wu(this,e),this.from=t,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}return Su(e,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=[new e(0,t.length,t,0,!1,i)],a=oy(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;s.to>t.length&&o.push(s)}}catch(l){a.e(l)}finally{a.f()}return o}},{key:"applyChanges",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!n.length)return t;for(var i=[],o=1,a=t.length?t[0]:null,s=0,l=0,u=0;;s++){var c=s<n.length?n[s]:null,f=c?c.fromA:1e9;if(f-l>=r)for(;a&&a.from<f;){var d=a;if(l>=d.from||f<=d.to||u){var h=Math.max(d.from,l)-u,p=Math.min(d.to,f)-u;d=h>=p?null:new e(h,p,d.tree,d.offset+u,s>0,!!c)}if(d&&i.push(d),a.to>f)break;a=o<t.length?t[o++]:null}if(!c)break;l=c.toA,u=c.toA-c.toB}return i}}]),e}(),bC=function(){function e(){wu(this,e)}return Su(e,[{key:"startParse",value:function(e,t,n){return"string"==typeof e&&(e=new xC(e)),n=n?n.length?n.map((function(e){return new GO(e.from,e.to)})):[new GO(0,0)]:[new GO(0,e.length)],this.createParse(e,t||[],n)}},{key:"parse",value:function(e,t,n){for(var r=this.startParse(e,t,n);;){var i=r.advance();if(i)return i}}}]),e}(),xC=function(){function e(t){wu(this,e),this.string=t}return Su(e,[{key:"length",get:function(){return this.string.length}},{key:"chunk",value:function(e){return this.string.slice(e)}},{key:"lineChunks",get:function(){return!1}},{key:"read",value:function(e,t){return this.string.slice(e,t)}}]),e}();var wC=new KO;var kC=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];wu(this,e),this.data=t,this.topNode=r,zb.prototype.hasOwnProperty("tree")||Object.defineProperty(zb.prototype,"tree",{get:function(){return CC(this)}}),this.parser=n,this.extension=[jC.of(this),zb.languageData.of((function(e,t,n){return e.facet(SC(e,t,n))}))].concat(i)}return Su(e,[{key:"isActiveAt",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return SC(e,t,n)==this.data}},{key:"findRegions",value:function(e){var t=this,n=e.facet(jC);if((null===n||void 0===n?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];var r=[];return function e(n,i){if(n.prop(wC)!=t.data){var o=n.prop(KO.mounted);if(o){if(o.tree.prop(wC)==t.data){if(o.overlay){var a,s=oy(o.overlay);try{for(s.s();!(a=s.n()).done;){var l=a.value;r.push({from:l.from+i,to:l.to+i})}}catch(d){s.e(d)}finally{s.f()}}else r.push({from:i,to:i+n.length});return}if(o.overlay){var u=r.length;if(e(o.tree,o.overlay[0].from+i),r.length>u)return}}for(var c=0;c<n.children.length;c++){var f=n.children[c];f instanceof rC&&e(f,n.positions[c]+i)}}else r.push({from:i,to:i+n.length})}(CC(e),0),r}},{key:"allowsNesting",get:function(){return!0}}]),e}();function SC(e,t,n){var r=e.facet(jC);if(!r)return null;var i=r.data;if(r.allowsNesting)for(var o=CC(e).topNode;o;o=o.enter(t,n,!0,!1))i=o.type.prop(wC)||i;return i}kC.setState=Pb.define();var OC=function(e){ay(n,e);var t=cy(n);function n(e,r){var i;return wu(this,n),(i=t.call(this,e,r,r.topNode)).parser=r,i}return Su(n,[{key:"configure",value:function(e){return new n(this.data,this.parser.configure(e))}},{key:"allowsNesting",get:function(){return this.parser.wrappers.length>0}}],[{key:"define",value:function(e){var t,r=(t=e.languageData,Ky.define({combine:t?function(e){return e.concat(t)}:void 0}));return new n(r,e.parser.configure({props:[wC.add((function(e){return e.isTop?r:void 0}))]}))}}]),n}(kC);function CC(e){var t=e.field(kC.state,!1);return t?t.tree:rC.empty}var MC=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.length;wu(this,e),this.doc=t,this.length=n,this.cursorPos=0,this.string="",this.cursor=t.iter()}return Su(e,[{key:"syncTo",value:function(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}},{key:"chunk",value:function(e){return this.syncTo(e),this.string}},{key:"lineChunks",get:function(){return!0}},{key:"read",value:function(e,t){var n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}]),e}(),PC=null,TC=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;wu(this,e),this.parser=t,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}return Su(e,[{key:"startParse",value:function(){return this.parser.startParse(new MC(this.state.doc),this.fragments)}},{key:"work",value:function(e,t){var n=this;return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=rC.empty&&this.isDone(null!==t&&void 0!==t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((function(){var r;n.parse||(n.parse=n.startParse()),null!=t&&(null==n.parse.stoppedAt||n.parse.stoppedAt>t)&&t<n.state.doc.length&&n.parse.stopAt(t);for(var i=Date.now()+e;;){var o=n.parse.advance();if(o){if(n.fragments=n.withoutTempSkipped(yC.addTree(o,n.fragments,null!=n.parse.stoppedAt)),n.treeLen=null!==(r=n.parse.stoppedAt)&&void 0!==r?r:n.state.doc.length,n.tree=o,n.parse=null,!(n.treeLen<(null!==t&&void 0!==t?t:n.state.doc.length)))return!0;n.parse=n.startParse()}if(Date.now()>i)return!1}}))}},{key:"takeTree",value:function(){var e,t,n=this;this.parse&&(e=this.parse.parsedPos)>this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((function(){for(;!(t=n.parse.advance()););})),this.tree=t,this.fragments=this.withoutTempSkipped(yC.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(e){var t=PC;PC=this;try{return e()}finally{PC=t}}},{key:"withoutTempSkipped",value:function(e){for(var t;t=this.tempSkipped.pop();)e=EC(e,t.from,t.to);return e}},{key:"changes",value:function(t,n){var r=this.fragments,i=this.tree,o=this.treeLen,a=this.viewport,s=this.skipped;if(this.takeTree(),!t.empty){var l=[];if(t.iterChangedRanges((function(e,t,n,r){return l.push({fromA:e,toA:t,fromB:n,toB:r})})),r=yC.applyChanges(r,l),i=rC.empty,o=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length){s=[];var u,c=oy(this.skipped);try{for(c.s();!(u=c.n()).done;){var f=u.value,d=t.mapPos(f.from,1),h=t.mapPos(f.to,-1);d<h&&s.push({from:d,to:h})}}catch(p){c.e(p)}finally{c.f()}}}return new e(this.parser,n,r,i,o,a,s,this.scheduleOn)}},{key:"updateViewport",value:function(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;for(var t=this.skipped.length,n=0;n<this.skipped.length;n++){var r=this.skipped[n],i=r.from,o=r.to;i<e.to&&o>e.from&&(this.fragments=EC(this.fragments,i,o),this.skipped.splice(n--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(e,t){this.skipped.push({from:e,to:t})}},{key:"movedPast",value:function(e){return this.treeLen<e&&this.parse&&this.parse.parsedPos>=e}},{key:"isDone",value:function(e){var t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}}],[{key:"getSkippingParser",value:function(e){return new(function(t){ay(r,t);var n=cy(r);function r(){return wu(this,r),n.apply(this,arguments)}return Su(r,[{key:"createParse",value:function(t,n,r){var i=r[0].from,o=r[r.length-1].to,a={parsedPos:i,advance:function(){var t=PC;if(t){var n,a=oy(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;t.tempSkipped.push(s)}}catch(l){a.e(l)}finally{a.f()}e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new rC(eC.none,[],[],o-i)},stoppedAt:null,stopAt:function(){}};return a}}]),r}(bC))}},{key:"get",value:function(){return PC}}]),e}();function EC(e,t,n){return yC.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var ZC=function(){function e(t){wu(this,e),this.context=t,this.tree=t.tree}return Su(e,[{key:"apply",value:function(t){if(!t.docChanged)return this;var n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(25,r)||n.takeTree(),new e(n)}}],[{key:"init",value:function(t){var n=new TC(t.facet(jC).parser,t,[],rC.empty,0,{from:0,to:t.doc.length},[],null);return n.work(25)||n.takeTree(),new e(n)}}]),e}();kC.state=nb.define({create:ZC.init,update:function(e,t){var n,r=oy(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(kC.setState))return i.value}}catch(o){r.e(o)}finally{r.f()}return t.startState.facet(jC)!=t.state.facet(jC)?ZC.init(t.state):e.apply(t)}});var AC="undefined"!=typeof window&&window.requestIdleCallback||function(e,t){var n=t.timeout;return setTimeout(e,n)},RC="undefined"!=typeof window&&window.cancelIdleCallback||clearTimeout,DC=Xw.fromClass(function(){function e(t){wu(this,e),this.view=t,this.working=-1,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Su(e,[{key:"update",value:function(e){var t=this.view.state.field(kC.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}},{key:"scheduleWork",value:function(){if(!(this.working>-1)){var e=this.view.state,t=e.field(kC.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=AC(this.work,{timeout:500}))}}},{key:"work",value:function(e){this.working=-1;var t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),!(this.chunkBudget<=0)){var n=this.view,r=n.state,i=n.viewport.to,o=r.field(kC.state);if(!(o.tree==o.context.tree&&o.context.treeLen>=i+1e6)){var a=Math.min(this.chunkBudget,e?Math.max(25,e.timeRemaining()):100),s=o.context.work(a,i+1e6);this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0||o.context.movedPast(i))&&(o.context.takeTree(),this.view.dispatch({effects:kC.setState.of(new ZC(o.context))})),!s&&this.chunkBudget>0&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}}}},{key:"checkAsyncSchedule",value:function(e){var t=this;e.scheduleOn&&(e.scheduleOn.then((function(){return t.scheduleWork()})),e.scheduleOn=null)}},{key:"destroy",value:function(){this.working>=0&&RC(this.working)}}]),e}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),jC=Ky.define({combine:function(e){return e.length?e[0]:null},enables:[kC.state,DC]}),_C=Ky.define(),NC=Ky.define({combine:function(e){if(!e.length)return" ";if(!/^(?: +|\t+)$/.test(e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return e[0]}});function LC(e){var t=e.facet(NC);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function IC(e,t){var n="",r=e.tabSize;if(9==e.facet(NC).charCodeAt(0))for(;t>=r;)n+="\t",t-=r;for(var i=0;i<t;i++)n+=" ";return n}function zC(e,t){e instanceof zb&&(e=new BC(e));var n,r=oy(e.state.facet(_C));try{for(r.s();!(n=r.n()).done;){var i=(0,n.value)(e,t);if(null!=i)return i}}catch(a){r.e(a)}finally{r.f()}var o=CC(e.state);return o?function(e,t,n){return WC(t.resolveInner(n).enterUnfinishedNodesBefore(n),n,e)}(e,o,t):null}var BC=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};wu(this,e),this.state=t,this.options=n,this.unit=LC(t)}return Su(e,[{key:"lineAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.state.doc.lineAt(e),r=this.options.simulateBreak;return null!=r&&r>=n.from&&r<=n.to?(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}},{key:"textAfterPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";var n=this.lineAt(e,t),r=n.text,i=n.from;return r.slice(e-i,Math.min(r.length,e+100-i))}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(e,t),r=n.text,i=n.from,o=this.countColumn(r,e-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}},{key:"countColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return Cy(e,this.state.tabSize,t)}},{key:"lineIndent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(e,t),r=n.text,i=n.from,o=this.options.overrideIndentation;if(o){var a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),e}(),FC=new KO;function $C(e){var t=e.type.prop(FC);if(t)return t;var n,r=e.firstChild;if(r&&(n=r.type.prop(KO.closedBy))){var i=e.lastChild,o=i&&n.indexOf(i.name)>-1;return function(e){return UC(e,!0,1,void 0,o&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?i.from:void 0)}}return null==e.parent?HC:null}function WC(e,t,n){for(;e;e=e.parent){var r=$C(e);if(r)return r(new VC(n,t,e))}return null}function HC(){return 0}var VC=function(e){ay(n,e);var t=cy(n);function n(e,r,i){var o;return wu(this,n),(o=t.call(this,e.state,e.options)).base=e,o.pos=r,o.node=i,o}return Su(n,[{key:"textAfter",get:function(){return this.textAfterPos(this.pos)}},{key:"baseIndent",get:function(){for(var e=this.state.doc.lineAt(this.node.from);;){for(var t=this.node.resolve(e.from);t.parent&&t.parent.from==t.from;)t=t.parent;if(qC(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}},{key:"continue",value:function(){var e=this.node.parent;return e?WC(e,this.pos,this.base):0}}]),n}(BC);function qC(e,t){for(var n=t;n;n=n.parent)if(e==n)return!0;return!1}function UC(e,t,n,r,i){var o=e.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==e.pos+a,l=t?function(e){var t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;for(var i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),a=null==i||i<=o.from?o.to:Math.min(o.to,i),s=n.to;;){var l=t.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped)return l.from<a?n:null;s=l.to}}(e):null;return l?s?e.column(l.from):e.column(l.to):e.baseIndent+(s?0:e.unit*n)}function QC(){return zb.transactionFilter.of((function(e){if(!e.docChanged||!e.isUserEvent("input.type"))return e;var t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;var n=e.newDoc,r=e.newSelection.main.head,i=n.lineAt(r);if(r>i.from+200)return e;var o=n.sliceString(i.from,r);if(!t.some((function(e){return e.test(o)})))return e;var a,s=e.state,l=-1,u=[],c=oy(s.selection.ranges);try{for(c.s();!(a=c.n()).done;){var f=a.value.head,d=s.doc.lineAt(f);if(d.from!=l){l=d.from;var h=zC(s,d.from);if(null!=h){var p=/^\s*/.exec(d.text)[0],v=IC(s,h);p!=v&&u.push({from:d.from,to:d.from+p.length,insert:v})}}}}catch(m){c.e(m)}finally{c.f()}return u.length?[e,{changes:u,sequential:!0}]:e}))}var XC=Ky.define(),YC=new KO;function GC(e,t,n){var r,i=oy(e.facet(XC));try{for(i.s();!(r=i.n()).done;){var o=(0,r.value)(e,t,n);if(o)return o}}catch(a){i.e(a)}finally{i.f()}return function(e,t,n){var r=CC(e);if(0==r.length)return null;for(var i=null,o=r.resolveInner(n);o;o=o.parent)if(!(o.to<=n||o.from>n)){if(i&&o.from<t)break;var a=o.type.prop(YC);if(a){var s=a(o,e);s&&s.from<=n&&s.from>=t&&s.to>n&&(i=s)}}return i}(e,t,n)}var KC=tO.baseTheme({".cm-matchingBracket":{backgroundColor:"#328c8252"},".cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),JC=1e4,eM="()[]{}",tM=Ky.define({combine:function(e){return Bb(e,{afterCursor:!0,brackets:eM,maxScanDistance:JC})}}),nM=ww.mark({class:"cm-matchingBracket"}),rM=ww.mark({class:"cm-nonmatchingBracket"}),iM=nb.define({create:function(){return ww.none},update:function(e,t){if(!t.docChanged&&!t.selection)return e;var n,r=[],i=t.state.facet(tM),o=oy(t.state.selection.ranges);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.empty){var s=lM(t.state,a.head,-1,i)||a.head>0&&lM(t.state,a.head-1,1,i)||i.afterCursor&&(lM(t.state,a.head,1,i)||a.head<t.state.doc.length&&lM(t.state,a.head+1,-1,i));if(s){var l=s.matched?nM:rM;r.push(l.range(s.start.from,s.start.to)),s.end&&r.push(l.range(s.end.from,s.end.to))}}}}catch(u){o.e(u)}finally{o.f()}return ww.set(r,!0)},provide:function(e){return tO.decorations.from(e)}}),oM=[iM,KC];function aM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[tM.of(e),oM]}function sM(e,t,n){var r=e.prop(t<0?KO.openedBy:KO.closedBy);if(r)return r;if(1==e.name.length){var i=n.indexOf(e.name);if(i>-1&&i%2==(t<0?1:0))return[n[i+t]]}return null}function lM(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.maxScanDistance||JC,o=r.brackets||eM,a=CC(e),s=a.resolveInner(t,n),l=s;l;l=l.parent){var u=sM(l.type,n,o);if(u&&l.from<l.to)return uM(e,t,n,l,u,o)}return cM(e,t,n,a,s.type,i,o)}function uM(e,t,n,r,i,o){var a=r.parent,s={from:r.from,to:r.to},l=0,u=null===a||void 0===a?void 0:a.cursor;if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==l&&i.indexOf(u.type.name)>-1&&u.from<u.to)return{start:s,end:{from:u.from,to:u.to},matched:!0};if(sM(u.type,n,o))l++;else if(sM(u.type,-n,o)&&0==--l)return{start:s,end:u.from==u.to?void 0:{from:u.from,to:u.to},matched:!1}}}while(n<0?u.prevSibling():u.nextSibling());return{start:s,matched:!1}}function cM(e,t,n,r,i,o,a){var s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=a.indexOf(s);if(l<0||l%2==0!=n>0)return null;for(var u={from:n<0?t-1:t,to:n>0?t+1:t},c=e.doc.iterRange(t,n>0?e.doc.length:0),f=0,d=0;!c.next().done&&d<=o;){var h=c.value;n<0&&(d+=h.length);for(var p=t+d*n,v=n>0?0:h.length-1,m=n>0?h.length:-1;v!=m;v+=n){var g=a.indexOf(h[v]);if(!(g<0||r.resolve(p+v,1).type!=i))if(g%2==0==n>0)f++;else{if(1==f)return{start:u,end:{from:p+v,to:p+v+1},matched:g>>1==l>>1};f--}}n>0&&(d+=h.length)}return c.done?{start:u,matched:!1}:null}function fM(e,t){return Qy.create(e.ranges.map(t),e.mainIndex)}function dM(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function hM(e,t){var n=e.state,r=e.dispatch,i=fM(n.selection,t);return!i.eq(n.selection)&&(r(dM(n,i)),!0)}function pM(e,t){return Qy.cursor(t?e.to:e.from)}function vM(e,t){return hM(e,(function(n){return n.empty?e.moveByChar(n,t):pM(n,t)}))}var mM=function(e){return vM(e,e.textDirection!=ik.LTR)},gM=function(e){return vM(e,e.textDirection==ik.LTR)};function yM(e,t){return hM(e,(function(n){return n.empty?e.moveByGroup(n,t):pM(n,t)}))}function bM(e,t,n){if(t.type.prop(n))return!0;var r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function xM(e,t,n){for(var r=CC(e).resolveInner(t.head),i=n?KO.closedBy:KO.openedBy,o=t.head;;){var a=n?r.childAfter(o):r.childBefore(o);if(!a)break;bM(e,a,i)?r=a:o=n?a.to:a.from}var s,l;return l=r.type.prop(i)&&(s=n?lM(e,r.from,1):lM(e,r.to,-1))&&s.matched?n?s.end.to:s.end.from:n?r.to:r.from,Qy.cursor(l,n?-1:1)}function wM(e,t){return hM(e,(function(n){if(!n.empty)return pM(n,t);var r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}var kM=function(e){return wM(e,!1)},SM=function(e){return wM(e,!0)};function OM(e,t){return hM(e,(function(n){return n.empty?e.moveVertically(n,t,e.dom.clientHeight):pM(n,t)}))}var CM=function(e){return OM(e,!1)},MM=function(e){return OM(e,!0)};function PM(e,t,n){var r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){var o=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&t.head!=r.from+o&&(i=Qy.cursor(r.from+o))}return i}var TM=function(e){return hM(e,(function(t){return PM(e,t,!0)}))},EM=function(e){return hM(e,(function(t){return PM(e,t,!1)}))};function ZM(e,t,n){var r=!1,i=fM(e.selection,(function(t){var i=lM(e,t.head,-1)||lM(e,t.head,1)||t.head>0&&lM(e,t.head-1,1)||t.head<e.doc.length&&lM(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;var o=i.start.from==t.head?i.end.to:i.end.from;return n?Qy.range(t.anchor,o):Qy.cursor(o)}));return!!r&&(t(dM(e,i)),!0)}function AM(e,t){var n=fM(e.state.selection,(function(e){var n=t(e);return Qy.range(e.anchor,n.head,n.goalColumn)}));return!n.eq(e.state.selection)&&(e.dispatch(dM(e.state,n)),!0)}function RM(e,t){return AM(e,(function(n){return e.moveByChar(n,t)}))}var DM=function(e){return RM(e,e.textDirection!=ik.LTR)},jM=function(e){return RM(e,e.textDirection==ik.LTR)};function _M(e,t){return AM(e,(function(n){return e.moveByGroup(n,t)}))}function NM(e,t){return AM(e,(function(n){return e.moveVertically(n,t)}))}var LM=function(e){return NM(e,!1)},IM=function(e){return NM(e,!0)};function zM(e,t){return AM(e,(function(n){return e.moveVertically(n,t,e.dom.clientHeight)}))}var BM=function(e){return zM(e,!1)},FM=function(e){return zM(e,!0)},$M=function(e){return AM(e,(function(t){return PM(e,t,!0)}))},WM=function(e){return AM(e,(function(t){return PM(e,t,!1)}))},HM=function(e){var t=e.state;return(0,e.dispatch)(dM(t,{anchor:0})),!0},VM=function(e){var t=e.state;return(0,e.dispatch)(dM(t,{anchor:t.doc.length})),!0},qM=function(e){var t=e.state;return(0,e.dispatch)(dM(t,{anchor:t.selection.main.anchor,head:0})),!0},UM=function(e){var t=e.state;return(0,e.dispatch)(dM(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0};function QM(e,t){var n=e.state,r=e.dispatch;if(n.readOnly)return!1;var i="delete.selection",o=n.changeByRange((function(e){var n=e.from,r=e.to;if(n==r){var o=t(n);o<n?i="delete.backward":o>n&&(i="delete.forward"),n=Math.min(n,o),r=Math.max(r,o)}return n==r?{range:e}:{changes:{from:n,to:r},range:Qy.cursor(n)}}));return!o.changes.empty&&(r(n.update(o,{scrollIntoView:!0,userEvent:i})),!0)}function XM(e,t,n){if(e instanceof tO){var r,i=oy(e.pluginField(qw.atomicRanges));try{for(i.s();!(r=i.n()).done;){r.value.between(t,t,(function(e,r){e<t&&r>t&&(t=n?r:e)}))}}catch(o){i.e(o)}finally{i.f()}}return t}var YM=function(e,t){return QM(e,(function(n){var r,i,o=e.state,a=o.doc.lineAt(n);if(!t&&n>a.from&&n<a.from+200&&!/[^ \t]/.test(r=a.text.slice(0,n-a.from))){if("\t"==r[r.length-1])return n-1;for(var s=Cy(r,o.tabSize)%LC(o)||LC(o),l=0;l<s&&" "==r[r.length-1-l];l++)n--;i=n}else(i=gy(a.text,n-a.from,t)+a.from)==n&&a.number!=(t?o.doc.lines:1)&&(i+=t?1:-1);return XM(e,i,t)}))},GM=function(e){return YM(e,!1)},KM=function(e){return YM(e,!0)},JM=function(e,t){return QM(e,(function(n){for(var r=n,i=e.state,o=i.doc.lineAt(r),a=i.charCategorizer(r),s=null;;){if(r==(t?o.to:o.from)){r==n&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}var l=gy(o.text,r-o.from,t)+o.from,u=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),c=a(u);if(null!=s&&c!=s)break;" "==u&&r==n||(s=c),r=l}return XM(e,r,t)}))},eP=function(e){return JM(e,!1)},tP=function(e){return QM(e,(function(t){var n=e.lineBlockAt(t).to;return XM(e,t<n?n:Math.min(e.state.doc.length,t+1),!0)}))};function nP(e){var t,n=[],r=-1,i=oy(e.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=e.doc.lineAt(o.from),s=e.doc.lineAt(o.to);if(o.empty||o.to!=s.from||(s=e.doc.lineAt(o.to-1)),r>=a.number){var l=n[n.length-1];l.to=s.to,l.ranges.push(o)}else n.push({from:a.from,to:s.to,ranges:[o]});r=s.number+1}}catch(u){i.e(u)}finally{i.f()}return n}function rP(e,t,n){if(e.readOnly)return!1;var r,i=[],o=[],a=oy(nP(e));try{for(a.s();!(r=a.n()).done;){var s=r.value;if(n?s.to!=e.doc.length:0!=s.from){var l=e.doc.lineAt(n?s.to+1:s.from-1),u=l.length+1;if(n){i.push({from:s.to,to:l.to},{from:s.from,insert:l.text+e.lineBreak});var c,f=oy(s.ranges);try{for(f.s();!(c=f.n()).done;){var d=c.value;o.push(Qy.range(Math.min(e.doc.length,d.anchor+u),Math.min(e.doc.length,d.head+u)))}}catch(m){f.e(m)}finally{f.f()}}else{i.push({from:l.from,to:s.from},{from:s.to,insert:e.lineBreak+l.text});var h,p=oy(s.ranges);try{for(p.s();!(h=p.n()).done;){var v=h.value;o.push(Qy.range(v.anchor-u,v.head-u))}}catch(m){p.e(m)}finally{p.f()}}}}}catch(m){a.e(m)}finally{a.f()}return!!i.length&&(t(e.update({changes:i,scrollIntoView:!0,selection:Qy.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function iP(e,t,n){if(e.readOnly)return!1;var r,i=[],o=oy(nP(e));try{for(o.s();!(r=o.n()).done;){var a=r.value;n?i.push({from:a.from,insert:e.doc.slice(a.from,a.to)+e.lineBreak}):i.push({from:a.to,insert:e.lineBreak+e.doc.slice(a.from,a.to)})}}catch(s){o.e(s)}finally{o.f()}return t(e.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var oP=aP(!1);function aP(e){return function(t){var n=t.state,r=t.dispatch;if(n.readOnly)return!1;var i=n.changeByRange((function(t){var r=t.from,i=t.to,o=n.doc.lineAt(r),a=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};var n,r=CC(e).resolveInner(t),i=r.childBefore(t),o=r.childAfter(t);return i&&o&&i.to<=t&&o.from>=t&&(n=i.type.prop(KO.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(o.from).from?{from:i.to,to:o.from}:null}(n,r);e&&(r=i=(i<=o.to?o:n.doc.lineAt(i)).to);var s=new BC(n,{simulateBreak:r,simulateDoubleBreak:!!a}),l=zC(s,r);for(null==l&&(l=/^\s*/.exec(n.doc.lineAt(r).text)[0].length);i<o.to&&/\s/.test(o.text[i-o.from]);)i++;a?(r=a.from,i=a.to):r>o.from&&r<o.from+100&&!/\S/.test(o.text.slice(0,r))&&(r=o.from);var u=["",IC(n,l)];return a&&u.push(IC(n,s.lineIndent(o.from,-1))),{changes:{from:r,to:i,insert:Py.of(u)},range:Qy.cursor(r+1+u[1].length)}}));return r(n.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function sP(e,t){var n=-1;return e.changeByRange((function(r){for(var i=[],o=r.from;o<=r.to;){var a=e.doc.lineAt(o);a.number>n&&(r.empty||r.to>a.from)&&(t(a,i,r),n=a.number),o=a.to+1}var s=e.changes(i);return{changes:i,range:Qy.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}}))}var lP,uP=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(sP(t,(function(e,n){n.push({from:e.from,insert:t.facet(NC)})})),{userEvent:"input.indent"})),!0)},cP=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(sP(t,(function(e,n){var r=/^\s*/.exec(e.text)[0];if(r){for(var i=Cy(r,t.tabSize),o=0,a=IC(t,Math.max(0,i-LC(t)));o<r.length&&o<a.length&&r.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:e.from+o,to:e.from+r.length,insert:a.slice(o)})}})),{userEvent:"delete.dedent"})),!0)},fP=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(e){return hM(e,(function(t){return xM(e.state,t,e.textDirection!=ik.LTR)}))},shift:function(e){return AM(e,(function(t){return xM(e.state,t,e.textDirection!=ik.LTR)}))}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(e){return hM(e,(function(t){return xM(e.state,t,e.textDirection==ik.LTR)}))},shift:function(e){return AM(e,(function(t){return xM(e.state,t,e.textDirection==ik.LTR)}))}},{key:"Alt-ArrowUp",run:function(e){return rP(e.state,e.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(e){return iP(e.state,e.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(e){return rP(e.state,e.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(e){return iP(e.state,e.dispatch,!0)}},{key:"Escape",run:function(e){var t=e.state,n=e.dispatch,r=t.selection,i=null;return r.ranges.length>1?i=Qy.create([r.main]):r.main.empty||(i=Qy.create([Qy.cursor(r.main.head)])),!!i&&(n(dM(t,i)),!0)}},{key:"Mod-Enter",run:aP(!0)},{key:"Alt-l",mac:"Ctrl-l",run:function(e){var t=e.state,n=e.dispatch,r=nP(t).map((function(e){var n=e.from,r=e.to;return Qy.range(n,Math.min(r+1,t.doc.length))}));return n(t.update({selection:Qy.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:function(e){var t=e.state,n=e.dispatch,r=fM(t.selection,(function(e){for(var n,r=CC(t).resolveInner(e.head,1);!(r.from<e.from&&r.to>=e.to||r.to>e.to&&r.from<=e.from)&&(null===(n=r.parent)||void 0===n?void 0:n.parent);)r=r.parent;return Qy.range(r.to,r.from)}));return n(dM(t,r)),!0},preventDefault:!0},{key:"Mod-[",run:cP},{key:"Mod-]",run:uP},{key:"Mod-Alt-\\",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=Object.create(null),i=new BC(t,{overrideIndentation:function(e){var t=r[e];return null==t?-1:t}}),o=sP(t,(function(e,n,o){var a=zC(i,e.from);if(null!=a){/\S/.test(e.text)||(a=0);var s=/^\s*/.exec(e.text)[0],l=IC(t,a);(s!=l||o.from<e.from+s.length)&&(r[e.from]=a,n.push({from:e.from,to:e.from+s.length,insert:l}))}}));return o.changes.empty||n(t.update(o,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:function(e){if(e.state.readOnly)return!1;var t=e.state,n=t.changes(nP(t).map((function(e){var n=e.from,r=e.to;return n>0?n--:r<t.doc.length&&r++,{from:n,to:r}}))),r=fM(t.selection,(function(t){return e.moveVertically(t,!0)})).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:function(e){return ZM(e.state,e.dispatch,!1)}}].concat([{key:"ArrowLeft",run:mM,shift:DM,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:function(e){return yM(e,e.textDirection!=ik.LTR)},shift:function(e){return _M(e,e.textDirection!=ik.LTR)}},{mac:"Cmd-ArrowLeft",run:EM,shift:WM},{key:"ArrowRight",run:gM,shift:jM,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:function(e){return yM(e,e.textDirection==ik.LTR)},shift:function(e){return _M(e,e.textDirection==ik.LTR)}},{mac:"Cmd-ArrowRight",run:TM,shift:$M},{key:"ArrowUp",run:kM,shift:LM,preventDefault:!0},{mac:"Cmd-ArrowUp",run:HM,shift:qM},{mac:"Ctrl-ArrowUp",run:CM,shift:BM},{key:"ArrowDown",run:SM,shift:IM,preventDefault:!0},{mac:"Cmd-ArrowDown",run:VM,shift:UM},{mac:"Ctrl-ArrowDown",run:MM,shift:FM},{key:"PageUp",run:CM,shift:BM},{key:"PageDown",run:MM,shift:FM},{key:"Home",run:EM,shift:WM},{key:"Mod-Home",run:HM,shift:qM},{key:"End",run:TM,shift:$M},{key:"Mod-End",run:VM,shift:UM},{key:"Enter",run:oP},{key:"Mod-a",run:function(e){var t=e.state;return(0,e.dispatch)(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0}},{key:"Backspace",run:GM,shift:GM},{key:"Delete",run:KM},{key:"Mod-Backspace",mac:"Alt-Backspace",run:eP},{key:"Mod-Delete",mac:"Alt-Delete",run:function(e){return JM(e,!0)}},{mac:"Mod-Backspace",run:function(e){return QM(e,(function(t){var n=e.lineBlockAt(t).from;return XM(e,t>n?n:Math.max(0,t-1),!1)}))}},{mac:"Mod-Delete",run:tP}].concat([{key:"Ctrl-b",run:mM,shift:DM,preventDefault:!0},{key:"Ctrl-f",run:gM,shift:jM},{key:"Ctrl-p",run:kM,shift:LM},{key:"Ctrl-n",run:SM,shift:IM},{key:"Ctrl-a",run:function(e){return hM(e,(function(t){return Qy.cursor(e.lineBlockAt(t.head).from,1)}))},shift:function(e){return AM(e,(function(t){return Qy.cursor(e.lineBlockAt(t.head).from)}))}},{key:"Ctrl-e",run:function(e){return hM(e,(function(t){return Qy.cursor(e.lineBlockAt(t.head).to,-1)}))},shift:function(e){return AM(e,(function(t){return Qy.cursor(e.lineBlockAt(t.head).to)}))}},{key:"Ctrl-d",run:KM},{key:"Ctrl-h",run:GM},{key:"Ctrl-k",run:tP},{key:"Ctrl-Alt-h",run:eP},{key:"Ctrl-o",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=t.changeByRange((function(e){return{changes:{from:e.from,to:e.to,insert:Py.of(["",""])},range:Qy.cursor(e.from)}}));return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=t.changeByRange((function(e){if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};var n=e.from,r=t.doc.lineAt(n),i=n==r.from?n-1:gy(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:gy(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:t.doc.slice(n,o).append(t.doc.slice(i,n))},range:Qy.cursor(o)}}));return!r.changes.empty&&(n(t.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Alt-<",run:HM},{key:"Alt->",run:VM},{key:"Ctrl-v",run:MM},{key:"Alt-v",run:CM}].map((function(e){return{mac:e.key,run:e.run,shift:e.shift}})))),dP=function(){function e(t,n,r,i,o,a,s,l,u){var c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,f=arguments.length>10?arguments[10]:void 0;wu(this,e),this.p=t,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=f}return Su(e,[{key:"toString",value:function(){return"[".concat(this.stack.filter((function(e,t){return t%3==0})).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}},{key:"context",get:function(){return this.curContext?this.curContext.context:null}},{key:"pushState",value:function(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}},{key:"reduce",value:function(e){var t=e>>19,n=65535&e,r=this.p.parser,i=r.dynamicPrecedence(n);if(i&&(this.score+=i),0==t)return n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,4,!0),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),void this.reduceContext(n,this.reducePos);var o=this.stack.length-3*(t-1)-(262144&e?6:0),a=this.stack[o-2],s=this.stack[o-1],l=this.bufferBase+this.buffer.length-s;if(n<r.minRepeatTerm||131072&e){var u=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,a,u,l+4,!0)}if(262144&e)this.state=this.stack[o];else{var c=this.stack[o-3];this.state=r.getGoto(c,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,a)}},{key:"storeNode",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==e){var o=this,a=this.buffer.length;if(0==a&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&0==o.buffer[a-4]&&o.buffer[a-1]>-1){if(t==n)return;if(o.buffer[a-2]>=t)return void(o.buffer[a-2]=n)}}if(i&&this.pos!=n){var s=this.buffer.length;if(s>0&&0!=this.buffer[s-4])for(;s>0&&this.buffer[s-2]>n;)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,r>4&&(r-=4);this.buffer[s]=e,this.buffer[s+1]=t,this.buffer[s+2]=n,this.buffer[s+3]=r}else this.buffer.push(e,t,n,r)}},{key:"shift",value:function(e,t,n){var r=this.pos;if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){var i=e,o=this.p.parser;(n>this.pos||t<=o.maxNode)&&(this.pos=n,o.stateFlag(i,1)||(this.reducePos=n)),this.pushState(i,r),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,n,4)}else this.pos=n,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,n,4)}},{key:"apply",value:function(e,t,n){65536&e?this.reduce(e):this.shift(e,t,n)}},{key:"useNode",value:function(e,t){var n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);var r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}},{key:"split",value:function(){for(var t=this,n=t.buffer.length;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;for(var r=t.buffer.slice(n),i=t.bufferBase+n;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}},{key:"recoverByDelete",value:function(e,t){var n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}},{key:"canShift",value:function(e){for(var t=new pP(this);;){var n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==(65536&n))return!0;if(0==n)return!1;t.reduce(n)}}},{key:"recoverByInsert",value:function(e){if(this.stack.length>=300)return[];var t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){for(var n,r=[],i=0;i<t.length;i+=2)(n=t[i+1])!=this.state&&this.p.parser.hasAction(n,e)&&r.push(t[i],n);if(this.stack.length<120)for(var o=function(e){var n=t[e+1];r.some((function(e,t){return 1&t&&e==n}))||r.push(t[e],n)},a=0;r.length<8&&a<t.length;a+=2)o(a);t=r}for(var s=[],l=0;l<t.length&&s.length<4;l+=2){var u=t[l+1];if(u!=this.state){var c=this.split();c.storeNode(0,c.pos,c.pos,4,!0),c.pushState(u,this.pos),c.shiftContext(t[l],this.pos),c.score-=200,s.push(c)}}return s}},{key:"forceReduce",value:function(){var e=this.p.parser.stateSlot(this.state,5);if(0==(65536&e))return!1;var t=this.p.parser;if(!t.validAction(this.state,e)){var n=e>>19,r=65535&e,i=this.stack.length-3*n;if(i<0||t.getGoto(this.stack[i],r,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reduce(e),!0}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2)&&this.forceReduce(););return this}},{key:"deadEnd",get:function(){if(3!=this.stack.length)return!1;var e=this.p.parser;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(var t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}},{key:"parser",get:function(){return this.p.parser}},{key:"dialectEnabled",value:function(e){return this.p.parser.dialect.flags[e]}},{key:"shiftContext",value:function(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}},{key:"reduceContext",value:function(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}},{key:"emitContext",value:function(){var e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.reducePos,this.reducePos,-3)}},{key:"emitLookAhead",value:function(){var e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.reducePos,this.reducePos,-4)}},{key:"updateContext",value:function(e){if(e!=this.curContext.context){var t=new hP(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}},{key:"setLookAhead",value:function(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new hP(i,i.start):null,0,null)}}]),e}(),hP=Su((function e(t,n){wu(this,e),this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0}));!function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(lP||(lP={}));var pP=function(){function e(t){wu(this,e),this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}return Su(e,[{key:"reduce",value:function(e){var t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}]),e}(),vP=function(){function e(t,n,r){wu(this,e),this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,0==this.index&&this.maybeNext()}return Su(e,[{key:"maybeNext",value:function(){var e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}},{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"next",value:function(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}},{key:"fork",value:function(){return new e(this.stack,this.pos,this.index)}}],[{key:"create",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.bufferBase+t.buffer.length;return new e(t,n,n-t.bufferBase)}}]),e}(),mP=Su((function e(){wu(this,e),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0})),gP=new mP,yP=function(){function e(t,n){wu(this,e),this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=gP,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}return Su(e,[{key:"resolveOffset",value:function(e,t){for(var n=this.range,r=this.rangeIndex,i=this.pos+e;i<n.from;){if(!r)return null;var o=this.ranges[--r];i-=n.from-o.to,n=o}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];i+=a.from-n.to,n=a}return i}},{key:"peek",value:function(e){var t,n,r=this.chunkOff+e;if(r>=0&&r<this.chunk.length)t=this.pos+e,n=this.chunk.charCodeAt(r);else{var i=this.resolveOffset(e,1);if(null==i)return-1;if((t=i)>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(t-this.chunk2Pos);else{for(var o=this.rangeIndex,a=this.range;a.to<=t;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-t)),n=this.chunk2.charCodeAt(0)}}return t>this.token.lookAhead&&(this.token.lookAhead=t),n}},{key:"acceptToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}},{key:"getChunk",value:function(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){var e=this.chunk,t=this.chunkPos;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;var n=this.input.chunk(this.pos),r=this.pos+n.length;this.chunk=r>this.range.to?n.slice(0,this.range.to-this.pos):n,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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),this.readNext()}},{key:"setDone",value:function(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}},{key:"reset",value:function(e,t){if(t?(this.token=t,t.start=t.lookAhead=e,t.value=t.extended=-1):this.token=gP,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}},{key:"read",value:function(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);var n,r="",i=oy(this.ranges);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.from>=t)break;o.to>e&&(r+=this.input.read(Math.max(o.from,e),Math.min(o.to,t)))}}catch(a){i.e(a)}finally{i.f()}return r}}]),e}(),bP=function(){function e(t,n){wu(this,e),this.data=t,this.id=n}return Su(e,[{key:"token",value:function(e,t){!function(e,t,n,r){var i=0,o=1<<r,a=n.p.parser,s=a.dialect;e:for(;0!=(o&e[i]);){for(var l=e[i+1],u=i+3;u<l;u+=2)if((e[u+1]&o)>0){var c=e[u];if(s.allows(c)&&(-1==t.token.value||t.token.value==c||a.overrides(c,t.token.value))){t.acceptToken(c);break}}for(var f=t.next,d=0,h=e[i+2];d<h;){var p=d+h>>1,v=l+p+(p<<1),m=e[v],g=e[v+1];if(f<m)h=p;else{if(!(f>=g)){i=e[v+2],t.advance();continue e}d=p+1}}break}}(this.data,e,t,this.id)}}]),e}();bP.prototype.contextual=bP.prototype.fallback=bP.prototype.extend=!1;function xP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof e)return e;for(var n=null,r=0,i=0;r<e.length;){for(var o=0;;){var a=e.charCodeAt(r++),s=!1;if(126==a){o=65535;break}a>=92&&a--,a>=34&&a--;var l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new t(o)}return n}var wP,kP="undefined"!=typeof process&&/\bparse\b/.test({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.LOG),SP=null;function OP(e,t,n){var r=e.fullCursor();for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}!function(e){e[e.Margin=25]="Margin"}(wP||(wP={}));var CP,MP=function(){function e(t,n){wu(this,e),this.fragments=t,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return Su(e,[{key:"nextFragment",value:function(){var e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?OP(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?OP(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}},{key:"nodeAt",value:function(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){var t=this.trees.length-1;if(t<0)return this.nextFragment(),null;var n=this.trees[t],r=this.index[t];if(r!=n.children.length){var i=n.children[r],o=this.start[t]+n.positions[r];if(o>e)return this.nextStart=o,null;if(i instanceof rC){if(o==e){if(o<this.safeFrom)return null;var a=o+i.length;if(a<=this.safeTo){var s=i.prop(KO.lookAhead);if(!s||a+s<this.fragment.to)return i}}this.index[t]++,o+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+i.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),e}(),PP=function(){function e(t,n){wu(this,e),this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((function(e){return new mP}))}return Su(e,[{key:"getActions",value:function(e){for(var t=0,n=null,r=e.p.parser,i=r.tokenizers,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0,l=0;l<i.length;l++)if(0!=(1<<l&o)){var u=i[l],c=this.tokens[l];if((!n||u.fallback)&&((u.contextual||c.start!=e.pos||c.mask!=o||c.context!=a)&&(this.updateCachedToken(c,u,e),c.mask=o,c.context=a),c.lookAhead>c.end+25&&(s=Math.max(c.lookAhead,s)),0!=c.value)){var f=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!u.extend&&(n=c,t>f))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||((n=new mP).value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}},{key:"getMainToken",value:function(e){if(this.mainToken)return this.mainToken;var t=new mP,n=e.pos,r=e.p;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}},{key:"updateCachedToken",value:function(e,t,n){if(t.token(this.stream.reset(n.pos,e),n),e.value>-1){for(var r=n.p.parser,i=0;i<r.specialized.length;i++)if(r.specialized[i]==e.value){var o=r.specializers[i](this.stream.read(e.start,e.end),n);if(o>=0&&n.p.parser.dialect.allows(o>>1)){0==(1&o)?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=Math.min(n.p.stream.end,n.pos+1)}},{key:"putAction",value:function(e,t,n,r){for(var i=0;i<r;i+=3)if(this.actions[i]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}},{key:"addActions",value:function(e,t,n,r){for(var i=e.state,o=e.p.parser,a=o.data,s=0;s<2;s++)for(var l=o.stateSlot(i,s?2:1);;l+=3){if(65535==a[l]){if(1!=a[l+1]){0==r&&2==a[l+1]&&(r=this.putAction(RP(a,l+1),t,n,r));break}l=RP(a,l+2)}a[l]==t&&(r=this.putAction(RP(a,l+1),t,n,r))}return r}}]),e}();!function(e){e[e.Distance=5]="Distance",e[e.MaxRemainingPerStep=3]="MaxRemainingPerStep",e[e.MinBufferLengthPrune=200]="MinBufferLengthPrune",e[e.ForceReduceLimit=10]="ForceReduceLimit"}(CP||(CP={}));var TP=function(){function e(t,n,r,i){wu(this,e),this.parser=t,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.stream=new yP(n,i),this.tokens=new PP(t,this.stream),this.topTerm=t.top[1];var o=i[0].from;this.stacks=[dP.start(this,t.top[0],o)],this.fragments=r.length&&this.stream.end-o>4*t.bufferLength?new MP(r,t.nodeSet):null}return Su(e,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[],o=0;o<n.length;o++)for(var a=n[o];;){if(this.tokens.mainToken=null,a.pos>r)i.push(a);else{if(this.advanceStack(a,i,n))continue;e||(e=[],t=[]),e.push(a);var s=this.tokens.getMainToken(a);t.push(s.value,s.end)}break}if(!i.length){var l=e&&function(e){var t,n=null,r=oy(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=o&&i.pos>o)&&i.p.parser.stateFlag(i.state,2)&&(!n||n.score<i.score)&&(n=i)}}catch(a){r.e(a)}finally{r.f()}return n}(e);if(l)return this.stackToTree(l);if(this.parser.strict)throw kP&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&e){var u=this.runRecovery(e,t,i);if(u)return this.stackToTree(u.forceAll())}if(this.recovering){var c=1==this.recovering?1:3*this.recovering;if(i.length>c)for(i.sort((function(e,t){return t.score-e.score}));i.length>c;)i.pop();i.some((function(e){return e.reducePos>r}))&&this.recovering--}else if(i.length>1)e:for(var f=0;f<i.length-1;f++)for(var d=i[f],h=f+1;h<i.length;h++){var p=i[h];if(d.sameState(p)||d.buffer.length>200&&p.buffer.length>200){if(!((d.score-p.score||d.buffer.length-p.buffer.length)>0)){i.splice(f--,1);continue e}i.splice(h--,1)}}this.minStackPos=i[0].pos;for(var v=1;v<i.length;v++)i[v].pos<this.minStackPos&&(this.minStackPos=i[v].pos);return null}},{key:"stopAt",value:function(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}},{key:"advanceStack",value:function(e,t,n){var r=e.pos,i=this.parser,o=kP?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments)for(var a=e.curContext&&e.curContext.tracker.strict,s=a?e.curContext.hash:0,l=this.fragments.nodeAt(r);l;){var u=this.parser.nodeSet.types[l.type.id]==l.type?i.getGoto(e.state,l.type.id):-1;if(u>-1&&l.length&&(!a||(l.prop(KO.contextHash)||0)==s))return e.useNode(l,u),kP&&console.log(o+this.stackID(e)+" (via reuse of ".concat(i.getName(l.type.id),")")),!0;if(!(l instanceof rC)||0==l.children.length||l.positions[0]>0)break;var c=l.children[0];if(!(c instanceof rC&&0==l.positions[0]))break;l=c}var f=i.stateSlot(e.state,4);if(f>0)return e.reduce(f),kP&&console.log(o+this.stackID(e)+" (via always-reduce ".concat(i.getName(65535&f),")")),!0;for(var d=this.tokens.getActions(e),h=0;h<d.length;){var p=d[h++],v=d[h++],m=d[h++],g=h==d.length||!n,y=g?e:e.split();if(y.apply(p,v,m),kP&&console.log(o+this.stackID(y)+" (via ".concat(0==(65536&p)?"shift":"reduce of ".concat(i.getName(65535&p))," for ").concat(i.getName(v)," @ ").concat(r).concat(y==e?"":", split",")")),g)return!0;y.pos>r?t.push(y):n.push(y)}return!1}},{key:"advanceFully",value:function(e,t){for(var n=e.pos;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return EP(e,t),!0}}},{key:"runRecovery",value:function(e,t,n){for(var r=null,i=!1,o=0;o<e.length;o++){var a=e[o],s=t[o<<1],l=t[1+(o<<1)],u=kP?this.stackID(a)+" -> ":"";if(a.deadEnd){if(i)continue;if(i=!0,a.restart(),kP&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}for(var c=a.split(),f=u,d=0;c.forceReduce()&&d<10;d++){if(kP&&console.log(f+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,n))break;kP&&(f=this.stackID(c)+" -> ")}var h,p=oy(a.recoverByInsert(s));try{for(p.s();!(h=p.n()).done;){var v=h.value;kP&&console.log(u+this.stackID(v)+" (via recover-insert)"),this.advanceFully(v,n)}}catch(m){p.e(m)}finally{p.f()}this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),kP&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(s),")")),EP(a,n)):(!r||r.score<a.score)&&(r=a)}return r}},{key:"stackToTree",value:function(e){return e.close(),rC.build({buffer:vP.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})}},{key:"stackID",value:function(e){var t=(SP||(SP=new WeakMap)).get(e);return t||SP.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}]),e}();function EP(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.pos==e.pos&&r.sameState(e))return void(t[n].score<e.score&&(t[n]=e))}t.push(e)}var ZP=function(){function e(t,n,r){wu(this,e),this.source=t,this.flags=n,this.disabled=r}return Su(e,[{key:"allows",value:function(e){return!this.disabled||0==this.disabled[e]}}]),e}(),AP=function(e){ay(n,e);var t=cy(n);function n(e){var r;if(wu(this,n),(r=t.call(this)).wrappers=[],13!=e.version)throw new RangeError("Parser version (".concat(e.version,") doesn't match runtime version (",13,")"));var i=e.nodeNames.split(" ");r.minRepeatTerm=i.length;for(var o=0;o<e.repeatNodeCount;o++)i.push("");for(var a=Object.keys(e.topRules).map((function(t){return e.topRules[t][1]})),s=[],l=0;l<i.length;l++)s.push([]);function u(e,t,n){s[e].push([t,t.deserialize(String(n))])}if(e.nodeProps){var c,f=oy(e.nodeProps);try{for(f.s();!(c=f.n()).done;)for(var d=c.value,h=d[0],p=1;p<d.length;){var v=d[p++];if(v>=0)u(v,h,d[p++]);else{for(var m=d[p+-v],g=-v;g>0;g--)u(d[p++],h,m);p++}}}catch(x){f.e(x)}finally{f.f()}}r.nodeSet=new tC(i.map((function(t,n){return eC.define({name:n>=r.minRepeatTerm?void 0:t,id:n,props:s[n],top:a.indexOf(n)>-1,error:0==n,skipped:e.skippedNodes&&e.skippedNodes.indexOf(n)>-1})}))),r.strict=!1,r.bufferLength=1024;var y=xP(e.tokenData);if(r.context=e.context,r.specialized=new Uint16Array(e.specialized?e.specialized.length:0),r.specializers=[],e.specialized)for(var b=0;b<e.specialized.length;b++)r.specialized[b]=e.specialized[b].term,r.specializers[b]=e.specialized[b].get;return r.states=xP(e.states,Uint32Array),r.data=xP(e.stateData),r.goto=xP(e.goto),r.maxTerm=e.maxTerm,r.tokenizers=e.tokenizers.map((function(e){return"number"==typeof e?new bP(y,e):e})),r.topRules=e.topRules,r.dialects=e.dialects||{},r.dynamicPrecedences=e.dynamicPrecedences||null,r.tokenPrecTable=e.tokenPrec,r.termNames=e.termNames||null,r.maxNode=r.nodeSet.types.length-1,r.dialect=r.parseDialect(),r.top=r.topRules[Object.keys(r.topRules)[0]],r}return Su(n,[{key:"createParse",value:function(e,t,n){var r,i=new TP(this,e,t,n),o=oy(this.wrappers);try{for(o.s();!(r=o.n()).done;){i=(0,r.value)(i,e,t,n)}}catch(a){o.e(a)}finally{o.f()}return i}},{key:"getGoto",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.goto;if(t>=r[0])return-1;for(var i=r[t+1];;){var o=r[i++],a=1&o,s=r[i++];if(a&&n)return s;for(var l=i+(o>>1);i<l;i++)if(r[i]==e)return s;if(a)return-1}}},{key:"hasAction",value:function(e,t){for(var n=this.data,r=0;r<2;r++)for(var i,o=this.stateSlot(e,r?2:1);;o+=3){if(65535==(i=n[o])){if(1!=n[o+1]){if(2==n[o+1])return RP(n,o+2);break}i=n[o=RP(n,o+2)]}if(i==t||0==i)return RP(n,o+1)}return 0}},{key:"stateSlot",value:function(e,t){return this.states[6*e+t]}},{key:"stateFlag",value:function(e,t){return(this.stateSlot(e,0)&t)>0}},{key:"validAction",value:function(e,t){if(t==this.stateSlot(e,4))return!0;for(var n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])return!1;n=RP(this.data,n+2)}if(t==RP(this.data,n+1))return!0}}},{key:"nextStates",value:function(e){for(var t=this,n=[],r=this.stateSlot(e,1);;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=RP(this.data,r+2)}0==(1&this.data[r+2])&&function(){var e=t.data[r+1];n.some((function(t,n){return 1&n&&t==e}))||n.push(t.data[r],e)}()}return n}},{key:"overrides",value:function(e,t){var n=DP(this.data,this.tokenPrecTable,t);return n<0||DP(this.data,this.tokenPrecTable,e)<n}},{key:"configure",value:function(e){var t,r=Object.assign(Object.create(n.prototype),this);if(e.props&&(r.nodeSet=(t=this.nodeSet).extend.apply(t,(0,me.Z)(e.props))),e.top){var i=this.topRules[e.top];if(!i)throw new RangeError("Invalid top rule name ".concat(e.top));r.top=i}return e.tokenizers&&(r.tokenizers=this.tokenizers.map((function(t){var n=e.tokenizers.find((function(e){return e.from==t}));return n?n.to:t}))),e.contextTracker&&(r.context=e.contextTracker),e.dialect&&(r.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(r.strict=e.strict),e.wrap&&(r.wrappers=r.wrappers.concat(e.wrap)),null!=e.bufferLength&&(r.bufferLength=e.bufferLength),r}},{key:"getName",value:function(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(e){var t=this.dynamicPrecedences;return null==t?0:t[e]||0}},{key:"parseDialect",value:function(e){var t=Object.keys(this.dialects),n=t.map((function(){return!1}));if(e){var r,i=oy(e.split(" "));try{for(i.s();!(r=i.n()).done;){var o=r.value,a=t.indexOf(o);a>=0&&(n[a]=!0)}}catch(f){i.e(f)}finally{i.f()}}for(var s=null,l=0;l<t.length;l++)if(!n[l])for(var u,c=this.dialects[t[l]];65535!=(u=this.data[c++]);)(s||(s=new Uint8Array(this.maxTerm+1)))[u]=1;return new ZP(e,n,s)}}],[{key:"deserialize",value:function(e){return new n(e)}}]),n}(bC);function RP(e,t){return e[t]|e[t+1]<<16}function DP(e,t,n){for(var r,i=t;65535!=(r=e[i]);i++)if(r==n)return i-t;return-1}var jP=29,_P=39,NP=123,LP=126,IP=128,zP=129,BP=132,FP=135,$P=136,WP=138,HP={inf:146,nan:147,bool:1,ignoring:2,on:3,group_left:4,group_right:5,offset:6},VP={avg:8,atan2:7,bottomk:9,count:10,count_values:11,group:12,max:13,min:14,quantile:15,stddev:16,stdvar:17,sum:18,topk:19,by:20,without:21,and:22,or:23,unless:24,start:25,end:26},qP={__proto__:null,absent_over_time:307,absent:309,abs:311,acos:313,acosh:315,asin:317,asinh:319,atan:321,atanh:323,avg_over_time:325,ceil:327,changes:329,clamp:331,clamp_max:333,clamp_min:335,cos:337,cosh:339,count_over_time:341,days_in_month:343,day_of_month:345,day_of_week:347,deg:349,delta:351,deriv:353,exp:355,floor:357,histogram_quantile:359,holt_winters:361,hour:363,idelta:365,increase:367,irate:369,label_replace:371,label_join:373,last_over_time:375,ln:377,log10:379,log2:381,max_over_time:383,min_over_time:385,minute:387,month:389,pi:391,predict_linear:393,present_over_time:395,quantile_over_time:397,rad:399,rate:401,resets:403,round:405,scalar:407,sgn:409,sin:411,sinh:413,sort:415,sort_desc:417,sqrt:419,stddev_over_time:421,stdvar_over_time:423,sum_over_time:425,tan:427,tanh:429,timestamp:431,time:433,vector:435,year:437},UP=AP.deserialize({version:13,states:"6[OYQPOOO&{QPOOOOQO'#C{'#C{O'QQPO'#CzQ']QQOOOOQO'#De'#DeO'WQPO'#DdOOQO'#E}'#E}O(jQPO'#FTOYQPO'#FPOYQPO'#FSOOQO'#FV'#FVO.fQSO'#FWO.nQQO'#FUOOQO'#FU'#FUOOQO'#Cy'#CyOOQO'#Df'#DfOOQO'#Dh'#DhOOQO'#Di'#DiOOQO'#Dj'#DjOOQO'#Dk'#DkOOQO'#Dl'#DlOOQO'#Dm'#DmOOQO'#Dn'#DnOOQO'#Do'#DoOOQO'#Dp'#DpOOQO'#Dq'#DqOOQO'#Dr'#DrOOQO'#Ds'#DsOOQO'#Dt'#DtOOQO'#Du'#DuOOQO'#Dv'#DvOOQO'#Dw'#DwOOQO'#Dx'#DxOOQO'#Dy'#DyOOQO'#Dz'#DzOOQO'#D{'#D{OOQO'#D|'#D|OOQO'#D}'#D}OOQO'#EO'#EOOOQO'#EP'#EPOOQO'#EQ'#EQOOQO'#ER'#EROOQO'#ES'#ESOOQO'#ET'#ETOOQO'#EU'#EUOOQO'#EV'#EVOOQO'#EW'#EWOOQO'#EX'#EXOOQO'#EY'#EYOOQO'#EZ'#EZOOQO'#E['#E[OOQO'#E]'#E]OOQO'#E^'#E^OOQO'#E_'#E_OOQO'#E`'#E`OOQO'#Ea'#EaOOQO'#Eb'#EbOOQO'#Ec'#EcOOQO'#Ed'#EdOOQO'#Ee'#EeOOQO'#Ef'#EfOOQO'#Eg'#EgOOQO'#Eh'#EhOOQO'#Ei'#EiOOQO'#Ej'#EjOOQO'#Ek'#EkOOQO'#El'#ElOOQO'#Em'#EmOOQO'#En'#EnOOQO'#Eo'#EoOOQO'#Ep'#EpOOQO'#Eq'#EqOOQO'#Er'#ErOOQO'#Es'#EsOOQO'#Et'#EtOOQO'#Eu'#EuOOQO'#Ev'#EvOOQO'#Ew'#EwOOQO'#Ex'#ExOOQO'#Ey'#EyOOQO'#Ez'#EzQOQPOOO0XQPO'#C|O0^QPO'#DRO'WQPO,59fO0eQQO,59fO2RQPO,59oO2RQPO,59oO2RQPO,59oO2RQPO,59oO2RQPO,59oO7}QQO,5;gO8SQQO,5;jO8[QPO,5;yOOQO,5:O,5:OOOQO,5;i,5;iO8sQQO,5;kO8zQQO,5;nO:bQPO'#FYO:pQPO,5;rOOQO'#FX'#FXOOQO,5;r,5;rOOQO,5;p,5;pO:xQSO'#C}OOQO,59h,59hO;QQPO,59mO;YQQO'#DSOOQO,59m,59mOOQO1G/Q1G/QO0XQPO'#DWOAVQPO'#DVOAaQPO'#DVOYQPO1G/ZOYQPO1G/ZOYQPO1G/ZOYQPO1G/ZOYQPO1G/ZOAkQSO1G1ROOQO1G1U1G1UOAsQQO1G1UOAxQPO'#E}OOQO'#Fa'#FaOOQO1G1e1G1eOBTQPO1G1eOOQO1G1V1G1VOOQO'#FZ'#FZOBYQPO,5;tOB_QSO1G1^OOQO1G1^1G1^OOQO'#DP'#DPOBgQPO,59iOOQO'#DO'#DOOOQO,59i,59iOYQPO,59nOOQO1G/X1G/XOOQO,59r,59rOH_QPO,59qOHfQPO,59qOI}QQO7+$uOJ_QQO7+$uOKsQQO7+$uOLZQQO7+$uOMrQQO7+$uOOQO7+&m7+&mON]QQO7+&sOOQO7+&p7+&pONeQPO7+'POOQO1G1`1G1`OOQO1G1_1G1_OOQO7+&x7+&xONjQSO1G/TOOQO1G/T1G/TONrQQO1G/YOOQO1G/]1G/]ON|QPO1G/]OOQO<<J_<<J_O!&oQPO<<J_OOQO<<Jk<<JkOOQO1G/U1G/UOOQO7+$o7+$oOOQO7+$w7+$wOOQOAN?yAN?y",stateData:"!&t~O$ZOSkOS~OWQOXQOYQOZQO[QO]QO^QO_QO`QOaQObQOcQO!ZZO#t_O$WVO$XVO$[XO$_`O$`aO$abO$bcO$cdO$deO$efO$fgO$ghO$hiO$ijO$jkO$klO$lmO$mnO$noO$opO$pqO$qrO$rsO$stO$tuO$uvO$vwO$wxO$xyO$yzO$z{O${|O$|}O$}!OO%O!PO%P!QO%Q!RO%R!SO%S!TO%T!UO%U!VO%V!WO%W!XO%X!YO%Y!ZO%Z![O%[!]O%]!^O%^!_O%_!`O%`!aO%a!bO%b!cO%c!dO%d!eO%e!fO%f!gO%g!hO%h!iO%i!jO%j!kO%k!lO%l!mO%m!nO%n!oO%o!pO%p!qO%q!rO%r!sO%uWO%vWO%wVO%y[O~O!ZZO~Od!uOe!uO$[!vO~OU#POV!yOf!|Og!}Oh!|Ox!yO{!yO|!yO}!yO!O!zO!P!zO!Q!{O!R!{O!S!{O!T!{O!U!{O!V!{O$S#QO%s#OO~O$W#SO$X#SO%w#SOW#wXX#wXY#wXZ#wX[#wX]#wX^#wX_#wX`#wXa#wXb#wXc#wX!Z#wX#t#wX$W#wX$X#wX$[#wX$_#wX$`#wX$a#wX$b#wX$c#wX$d#wX$e#wX$f#wX$g#wX$h#wX$i#wX$j#wX$k#wX$l#wX$m#wX$n#wX$o#wX$p#wX$q#wX$r#wX$s#wX$t#wX$u#wX$v#wX$w#wX$x#wX$y#wX$z#wX${#wX$|#wX$}#wX%O#wX%P#wX%Q#wX%R#wX%S#wX%T#wX%U#wX%V#wX%W#wX%X#wX%Y#wX%Z#wX%[#wX%]#wX%^#wX%_#wX%`#wX%a#wX%b#wX%c#wX%d#wX%e#wX%f#wX%g#wX%h#wX%i#wX%j#wX%k#wX%l#wX%m#wX%n#wX%o#wX%p#wX%q#wX%r#wX%u#wX%v#wX%w#wX%y#wX~Ot#VO%z#YO~O%y[OU#xXV#xXf#xXg#xXh#xXx#xX{#xX|#xX}#xX!O#xX!P#xX!Q#xX!R#xX!S#xX!T#xX!U#xX!V#xX$S#xX$V#xX%s#xX$^#xX$]#xX~O$[#[O~O$^#`O~PYOd!uOe!uOUnaVnafnagnahnaxna{na|na}na!Ona!Pna!Qna!Rna!Sna!Tna!Una!Vna$Sna$Vna%sna$^na$]na~OP#dOQ#bOR#bOWyPXyPYyPZyP[yP]yP^yP_yP`yPayPbyPcyP!ZyP#tyP$WyP$XyP$[yP$_yP$`yP$ayP$byP$cyP$dyP$eyP$fyP$gyP$hyP$iyP$jyP$kyP$lyP$myP$nyP$oyP$pyP$qyP$ryP$syP$tyP$uyP$vyP$wyP$xyP$yyP$zyP${yP$|yP$}yP%OyP%PyP%QyP%RyP%SyP%TyP%UyP%VyP%WyP%XyP%YyP%ZyP%[yP%]yP%^yP%_yP%`yP%ayP%byP%cyP%dyP%eyP%fyP%gyP%hyP%iyP%jyP%kyP%lyP%myP%nyP%oyP%pyP%qyP%ryP%uyP%vyP%wyP%yyP~O#p#jO~O!P#lO#p#kO~Oi#nOj#nO$WVO$XVO%u#mO%v#mO%wVO~O$^#qO~P']Ox!yOU#vaV#vaf#vag#vah#va{#va|#va}#va!O#va!P#va!Q#va!R#va!S#va!T#va!U#va!V#va$S#va$V#va%s#va$^#va$]#va~O!V#rO$O#rO$P#rO$Q#rO~O$]#tO%z#uO~Ot#vO$^#yO~O$]#zO$^#{O~O$]vX$^vX~P']OWyXXyXYyXZyX[yX]yX^yX_yX`yXayXbyXcyX!ZyX#tyX$WyX$XyX$[yX$_yX$`yX$ayX$byX$cyX$dyX$eyX$fyX$gyX$hyX$iyX$jyX$kyX$lyX$myX$nyX$oyX$pyX$qyX$ryX$syX$tyX$uyX$vyX$wyX$xyX$yyX$zyX${yX$|yX$}yX%OyX%PyX%QyX%RyX%SyX%TyX%UyX%VyX%WyX%XyX%YyX%ZyX%[yX%]yX%^yX%_yX%`yX%ayX%byX%cyX%dyX%eyX%fyX%gyX%hyX%iyX%jyX%kyX%lyX%myX%nyX%oyX%pyX%qyX%ryX%uyX%vyX%wyX%yyX~OS#}OT#}O~P;dOQ#bOR#bO~P;dO%t$UO%x$VO~O#p$WO~O$W#SO$X#SO%w#SO~O$[$XO~O#t$YO~Ot#VO%z$[O~O$]$]O$^$^O~OWyaXyaYyaZya[ya]ya^ya_ya`yaayabyacya!Zya#tya$Wya$Xya$_ya$`ya$aya$bya$cya$dya$eya$fya$gya$hya$iya$jya$kya$lya$mya$nya$oya$pya$qya$rya$sya$tya$uya$vya$wya$xya$yya$zya${ya$|ya$}ya%Oya%Pya%Qya%Rya%Sya%Tya%Uya%Vya%Wya%Xya%Yya%Zya%[ya%]ya%^ya%_ya%`ya%aya%bya%cya%dya%eya%fya%gya%hya%iya%jya%kya%lya%mya%nya%oya%pya%qya%rya%uya%vya%wya%yya~O$[#[O~PBoOS$aOT$aO$[ya~PBoOx!yOUwqfwqgwqhwq!Owq!Pwq!Qwq!Rwq!Swq!Twq!Uwq!Vwq$Swq$Vwq%swq$^wq$]wq~OVwq{wq|wq}wq~PHsOV!yO{!yO|!yO}!yO~PHsOV!yOx!yO{!yO|!yO}!yO!O!zO!P!zOUwqfwqgwqhwq$Swq$Vwq%swq$^wq$]wq~O!Qwq!Rwq!Swq!Twq!Uwq!Vwq~PJoO!Q!{O!R!{O!S!{O!T!{O!U!{O!V!{O~PJoOV!yOf!|Oh!|Ox!yO{!yO|!yO}!yO!O!zO!P!zO!Q!{O!R!{O!S!{O!T!{O!U!{O!V!{O~OUwqgwq$Swq$Vwq%swq$^wq$]wq~PLqO#p$cO%t$bO~O$^$dO~Ot#vO$^$fO~O$]vi$^vi~P']O$[#[OWyiXyiYyiZyi[yi]yi^yi_yi`yiayibyicyi!Zyi#tyi$Wyi$Xyi$_yi$`yi$ayi$byi$cyi$dyi$eyi$fyi$gyi$hyi$iyi$jyi$kyi$lyi$myi$nyi$oyi$pyi$qyi$ryi$syi$tyi$uyi$vyi$wyi$xyi$yyi$zyi${yi$|yi$}yi%Oyi%Pyi%Qyi%Ryi%Syi%Tyi%Uyi%Vyi%Wyi%Xyi%Yyi%Zyi%[yi%]yi%^yi%_yi%`yi%ayi%byi%cyi%dyi%eyi%fyi%gyi%hyi%iyi%jyi%kyi%lyi%myi%nyi%oyi%pyi%qyi%ryi%uyi%vyi%wyi%yyi~O%t$hO~O",goto:"(u$UPPPPPPPPPPPPPPPPPPPPPPPPPPPPP$V$u%R%_%e%q%tP%z&T$uP&W&gPPPPPPPPPPP$u&q&}P&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}&}$uP'Z$u$uP$u$u'j$u'v(V(f(i(oPPP$uP(rQSOQ#TXQ#UYQ#_!vQ$P#eQ$Q#fQ$R#gQ$S#hQ$T#iR$_#ze_OXY!v#e#f#g#h#i#zeROXY!v#e#f#g#h#i#zQ!wRR#a!xQ#]!uQ#|#bQ$`#}R$g$aR#w#[Q#x#[R$e$]Q!xRQ#RUR#a!wR#^!vQ#e!yQ#f!zQ#g!{Q#h!|R#i!}Y#c!y!z!{!|!}R$O#deUOXY!v#e#f#g#h#i#zeTOXY!v#e#f#g#h#i#zd_OXY!v#e#f#g#h#i#zR#o#QeYOXY!v#e#f#g#h#i#zd]OXY!v#e#f#g#h#i#zR!tPd^OXY!v#e#f#g#h#i#zR#Z]R#W[Q#X[R$Z#tR#s#VR#p#Q",nodeNames:"\u26a0 Bool Ignoring On GroupLeft GroupRight Offset Atan2 Avg Bottomk Count CountValues Group Max Min Quantile Stddev Stdvar Sum Topk By Without And Or Unless Start End LineComment PromQL Expr AggregateExpr AggregateOp AggregateModifier GroupingLabels GroupingLabelList GroupingLabel LabelName FunctionCallBody FunctionCallArgs BinaryExpr Pow BinModifiers OnOrIgnoring Mul Div Mod Add Sub Eql Gte Gtr Lte Lss Neq FunctionCall FunctionIdentifier AbsentOverTime Identifier Absent Abs Acos Acosh Asin Asinh Atan Atanh AvgOverTime Ceil Changes Clamp ClampMax ClampMin Cos Cosh CountOverTime DaysInMonth DayOfMonth DayOfWeek Deg Delta Deriv Exp Floor HistogramQuantile HoltWinters Hour Idelta Increase Irate LabelReplace LabelJoin LastOverTime Ln Log10 Log2 MaxOverTime MinOverTime Minute Month Pi PredictLinear PresentOverTime QuantileOverTime Rad Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc Sqrt StddevOverTime StdvarOverTime SumOverTime Tan Tanh Timestamp Time Vector Year MatrixSelector Duration NumberLiteral OffsetExpr ParenExpr StringLiteral SubqueryExpr UnaryExpr UnaryOp VectorSelector MetricIdentifier LabelMatchers LabelMatchList LabelMatcher MatchOp EqlSingle EqlRegex NeqRegex StepInvariantExpr At AtModifierPreprocessors MetricName",maxTerm:226,skippedNodes:[0,27],repeatNodeCount:0,tokenData:"1R~RwX^#lpq#lqr$ars$tst%huv%swx%xxy&gyz&lz{&q{|&v|}&}}!O'S!O!P'Z!P!Q(Z!Q!R(`!R![)W![!]-r!^!_.n!_!`.{!`!a/b!b!c/o!c!}/t!}#O0[#P#Q0a#Q#R0f#R#S/t#S#T0k#T#o/t#o#p0w#q#r0|#y#z#l$f$g#l#BY#BZ#l$IS$I_#l$I|$JO#l$JT$JU#l$KV$KW#l&FU&FV#l~#qY$Z~X^#lpq#l#y#z#l$f$g#l#BY#BZ#l$IS$I_#l$I|$JO#l$JT$JU#l$KV$KW#l&FU&FV#l~$dQ!_!`$j#r#s$o~$oO!V~~$tO$Q~~$yU#t~OY$tZr$trs%]s#O$t#O#P%b#P~$t~%bO#t~~%ePO~$t~%mQk~OY%hZ~%h~%xO}~~%}U#t~OY%xZw%xwx%]x#O%x#O#P&a#P~%x~&dPO~%x~&lO$[~~&qO$^~~&vO{~R&}O%vP!OQ~'SO$]~R'ZO%uP!PQP'^P!Q!['aP'fR%wP!Q!['a!g!h'o#X#Y'oP'rR{|'{}!O'{!Q![(RP(OP!Q![(RP(WP%wP!Q![(R~(`O|~R(eZ%wP!O!P'a!Q![)W!g!h'o#W#X){#X#Y'o#[#]*d#a#b*x#g#h+l#k#l+}#l#m-W#m#n,iR)]Y%wP!O!P'a!Q![)W!g!h'o#W#X){#X#Y'o#[#]*d#a#b*x#g#h+l#k#l+}#m#n,iQ*QP#pQ!Q![*TQ*WS!Q![*T#[#]*d#a#b*x#g#h+lQ*iP#pQ!Q![*lQ*oR!Q![*l#a#b*x#g#h+lQ*}Q#pQ!Q![+T#g#h+gQ+WR!Q![+T#a#b+a#g#h+lQ+dP#g#h+gQ+lO#pQQ+qP#pQ!Q![+tQ+wQ!Q![+t#a#b+aQ,SP#pQ!Q![,VQ,YT!Q![,V#W#X){#[#]*d#a#b*x#g#h+lQ,nP#pQ!Q![,qQ,tU!Q![,q#W#X){#[#]*d#a#b*x#g#h+l#k#l+}P-ZR!Q![-d!c!i-d#T#Z-dP-iR%wP!Q![-d!c!i-d#T#Z-dV-yT%xS!ZR!Q![.Y![!].Y!c!}.Y#R#S.Y#T#o.YR._T!ZR!Q![.Y![!].Y!c!}.Y#R#S.Y#T#o.Y~.sP!U~!_!`.v~.{O!T~~/QQ$OP!_!`/W#r#s/]Q/]O!QQ~/bO$P~~/gP!S~!_!`/j~/oO!R~~/tO$S~V/{T!ZRtS!Q![/t![!].Y!c!}/t#R#S/t#T#o/t~0aO%s~~0fO%t~~0kOx~~0nRO#S0k#S#T%]#T~0k~0|O%y~~1RO%z~",tokenizers:[0,1,2],topRules:{PromQL:[0,28],MetricName:[1,144]},specialized:[{term:57,get:function(e,t){return function(e,t){return HP[e.toLowerCase()]||-1}(e)<<1}},{term:57,get:function(e,t){return function(e,t){return VP[e.toLowerCase()]||-1}(e)<<1|1}},{term:57,get:function(e){return qP[e]||-1}}],tokenPrec:0}),QP=0,XP=function(){function e(t,n,r){wu(this,e),this.set=t,this.base=n,this.modified=r,this.id=QP++}return Su(e,null,[{key:"define",value:function(t){if(null===t||void 0===t?void 0:t.base)throw new Error("Can not derive from a modified tag");var n=new e([],null,[]);if(n.set.push(n),t){var r,i=oy(t.set);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.set.push(o)}}catch(a){i.e(a)}finally{i.f()}}return n}},{key:"defineModifier",value:function(){var e=new GP;return function(t){return t.modified.indexOf(e)>-1?t:GP.get(t.base||t,t.modified.concat(e).sort((function(e,t){return e.id-t.id})))}}}]),e}(),YP=0,GP=function(){function e(){wu(this,e),this.instances=[],this.id=YP++}return Su(e,null,[{key:"get",value:function(t,n){if(!n.length)return t;var r=n[0].instances.find((function(e){return e.base==t&&(r=n,i=e.modified,r.length==i.length&&r.every((function(e,t){return e==i[t]})));var r,i}));if(r)return r;var i,o=[],a=new XP(o,t,n),s=oy(n);try{for(s.s();!(i=s.n()).done;){i.value.instances.push(a)}}catch(v){s.e(v)}finally{s.f()}var l,u=KP(n),c=oy(t.set);try{for(c.s();!(l=c.n()).done;){var f,d=l.value,h=oy(u);try{for(h.s();!(f=h.n()).done;){var p=f.value;o.push(e.get(d,p))}}catch(v){h.e(v)}finally{h.f()}}}catch(v){c.e(v)}finally{c.f()}return a}}]),e}();function KP(e){for(var t=[e],n=0;n<e.length;n++){var r,i=oy(KP(e.slice(0,n).concat(e.slice(n+1))));try{for(i.s();!(r=i.n()).done;){var o=r.value;t.push(o)}}catch(a){i.e(a)}finally{i.f()}}return t}function JP(e){var t=Object.create(null);for(var n in e){var r=e[n];Array.isArray(r)||(r=[r]);var i,o=oy(n.split(" "));try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a){for(var s=[],l=2,u=a,c=0;;){if("..."==u&&c>0&&c+3==a.length){l=1;break}var f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(u);if(!f)throw new RangeError("Invalid path: "+a);if(s.push("*"==f[0]?null:'"'==f[0][0]?JSON.parse(f[0]):f[0]),(c+=f[0].length)==a.length)break;var d=a[c++];if(c==a.length&&"!"==d){l=0;break}if("/"!=d)throw new RangeError("Invalid path: "+a);u=a.slice(c)}var h=s.length-1,p=s[h];if(!p)throw new RangeError("Invalid path: "+a);var v=new iT(r,l,h>0?s.slice(0,h):null);t[p]=v.sort(t[p])}}}catch(m){o.e(m)}finally{o.f()}}return eT.add(t)}var eT=new KO,tT=Ky.define({combine:function(e){return e.length?oT.combinedMatch(e):null}}),nT=Ky.define({combine:function(e){return e.length?e[0].match:null}});function rT(e){return e.facet(tT)||e.facet(nT)}var iT=function(){function e(t,n,r,i){wu(this,e),this.tags=t,this.mode=n,this.context=r,this.next=i}return Su(e,[{key:"sort",value:function(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}},{key:"depth",get:function(){return this.context?this.context.length:0}}]),e}(),oT=function(){function e(t,n){var r;function i(e){var t=Hb.newName();return(r||(r=Object.create(null)))["."+t]=e,t}wu(this,e),this.map=Object.create(null),this.all="string"==typeof n.all?n.all:n.all?i(n.all):null;var o,a=oy(t);try{for(a.s();!(o=a.n()).done;){var s=o.value,l=(s.class||i(Object.assign({},s,{tag:null})))+(this.all?" "+this.all:""),u=s.tag;if(Array.isArray(u)){var c,f=oy(u);try{for(f.s();!(c=f.n()).done;){var d=c.value;this.map[d.id]=l}}catch(p){f.e(p)}finally{f.f()}}else this.map[u.id]=l}}catch(p){a.e(p)}finally{a.f()}this.module=r?new Hb(r):null,this.scope=n.scope||null,this.match=this.match.bind(this);var h=[sT];this.module&&h.push(tO.styleModule.of(this.module)),this.extension=h.concat(tT.of(this)),this.fallback=h.concat(nT.of(this))}return Su(e,[{key:"match",value:function(e,t){if(this.scope&&t!=this.scope)return null;var n,r=oy(e.set);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=this.map[i.id];if(void 0!==o)return i!=e&&(this.map[e.id]=o),o}}catch(a){r.e(a)}finally{r.f()}return this.map[e.id]=this.all}}],[{key:"combinedMatch",value:function(e){if(1==e.length)return e[0].match;var t=e.some((function(e){return e.scope}))?void 0:Object.create(null);return function(n,r){var i=t&&t[n.id];if(void 0!==i)return i;var o,a=null,s=oy(e);try{for(s.s();!(o=s.n()).done;){var l=o.value.match(n,r);l&&(a=a?a+" "+l:l)}}catch(u){s.e(u)}finally{s.f()}return t&&(t[n.id]=a),a}}},{key:"define",value:function(t,n){return new e(t,n||{})}},{key:"get",value:function(e,t,n){var r=rT(e);return r&&r(t,n||eC.none)}}]),e}();var aT=function(){function e(t){wu(this,e),this.markCache=Object.create(null),this.tree=CC(t.state),this.decorations=this.buildDeco(t,rT(t.state))}return Su(e,[{key:"update",value:function(e){var t=CC(e.state),n=rT(e.state),r=n!=e.startState.facet(tT);t.length<e.view.viewport.to&&!r&&t.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n))}},{key:"buildDeco",value:function(e,t){var n=this;if(!t||!this.tree.length)return ww.none;var r,i=new Jb,o=oy(e.visibleRanges);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.from,l=a.to;cT(this.tree,s,l,t,(function(e,t,r){i.add(e,t,n.markCache[r]||(n.markCache[r]=ww.mark({class:r})))}))}}catch(u){o.e(u)}finally{o.f()}return i.finish()}}]),e}(),sT=ub.extend(Xw.fromClass(aT,{decorations:function(e){return e.decorations}})),lT=[""],uT=function(){function e(t,n,r){wu(this,e),this.at=t,this.style=n,this.span=r,this.class=""}return Su(e,[{key:"startSpan",value:function(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}},{key:"flush",value:function(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}},{key:"highlightRange",value:function(e,t,n,r,i,o){var a=e.type,s=e.from,l=e.to;if(!(s>=n||l<=t)){lT[i]=a.name,a.isTop&&(o=a);for(var u=r,c=a.prop(eT),f=!1;c;){if(!c.context||fT(c.context,lT,i)){var d,h=oy(c.tags);try{for(h.s();!(d=h.n()).done;){var p=d.value,v=this.style(p,o);v&&(u&&(u+=" "),u+=v,1==c.mode?r+=(r?" ":"")+v:0==c.mode&&(f=!0))}}catch(C){h.e(C)}finally{h.f()}break}c=c.next}if(this.startSpan(e.from,u),!f){var m=e.tree&&e.tree.prop(KO.mounted);if(m&&m.overlay){for(var g=e.node.enter(m.overlay[0].from+s,1),y=e.firstChild(),b=0,x=s;;b++){var w=b<m.overlay.length?m.overlay[b]:null,k=w?w.from+s:l,S=Math.max(t,x),O=Math.min(n,k);if(S<O&&y)for(;e.from<O&&(this.highlightRange(e,S,O,r,i+1,o),this.startSpan(Math.min(n,e.to),u),!(e.to>=k)&&e.nextSibling()););if(!w||k>n)break;(x=w.to+s)>t&&(this.highlightRange(g.cursor,Math.max(t,w.from+s),Math.min(n,x),r,i,m.tree.type),this.startSpan(x,u))}y&&e.parent()}else if(e.firstChild()){do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i+1,o),this.startSpan(Math.min(n,e.to),u)}}while(e.nextSibling());e.parent()}}}}}]),e}();function cT(e,t,n,r,i){var o=new uT(t,r,i);o.highlightRange(e.cursor(),t,n,"",0,e.type),o.flush(n)}function fT(e,t,n){if(e.length>n-1)return!1;for(var r=n-1,i=e.length-1;i>=0;i--,r--){var o=e[i];if(o&&o!=t[r])return!1}return!0}var dT,hT,pT=XP.define,vT=pT(),mT=pT(),gT=pT(mT),yT=pT(mT),bT=pT(),xT=pT(bT),wT=pT(bT),kT=pT(),ST=pT(kT),OT=pT(),CT=pT(),MT=pT(),PT=pT(MT),TT=pT(),ET={comment:vT,lineComment:pT(vT),blockComment:pT(vT),docComment:pT(vT),name:mT,variableName:pT(mT),typeName:gT,tagName:pT(gT),propertyName:yT,attributeName:pT(yT),className:pT(mT),labelName:pT(mT),namespace:pT(mT),macroName:pT(mT),literal:bT,string:xT,docString:pT(xT),character:pT(xT),attributeValue:pT(xT),number:wT,integer:pT(wT),float:pT(wT),bool:pT(bT),regexp:pT(bT),escape:pT(bT),color:pT(bT),url:pT(bT),keyword:OT,self:pT(OT),null:pT(OT),atom:pT(OT),unit:pT(OT),modifier:pT(OT),operatorKeyword:pT(OT),controlKeyword:pT(OT),definitionKeyword:pT(OT),operator:CT,derefOperator:pT(CT),arithmeticOperator:pT(CT),logicOperator:pT(CT),bitwiseOperator:pT(CT),compareOperator:pT(CT),updateOperator:pT(CT),definitionOperator:pT(CT),typeOperator:pT(CT),controlOperator:pT(CT),punctuation:MT,separator:pT(MT),bracket:PT,angleBracket:pT(PT),squareBracket:pT(PT),paren:pT(PT),brace:pT(PT),content:kT,heading:ST,heading1:pT(ST),heading2:pT(ST),heading3:pT(ST),heading4:pT(ST),heading5:pT(ST),heading6:pT(ST),contentSeparator:pT(kT),list:pT(kT),quote:pT(kT),emphasis:pT(kT),strong:pT(kT),link:pT(kT),monospace:pT(kT),strikethrough:pT(kT),inserted:pT(),deleted:pT(),changed:pT(),invalid:pT(),meta:TT,documentMeta:pT(TT),annotation:pT(TT),processingInstruction:pT(TT),definition:XP.defineModifier(),constant:XP.defineModifier(),function:XP.defineModifier(),standard:XP.defineModifier(),local:XP.defineModifier(),special:XP.defineModifier()},ZT=oT.define([{tag:ET.link,textDecoration:"underline"},{tag:ET.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ET.emphasis,fontStyle:"italic"},{tag:ET.strong,fontWeight:"bold"},{tag:ET.strikethrough,textDecoration:"line-through"},{tag:ET.keyword,color:"#708"},{tag:[ET.atom,ET.bool,ET.url,ET.contentSeparator,ET.labelName],color:"#219"},{tag:[ET.literal,ET.inserted],color:"#164"},{tag:[ET.string,ET.deleted],color:"#a11"},{tag:[ET.regexp,ET.escape,ET.special(ET.string)],color:"#e40"},{tag:ET.definition(ET.variableName),color:"#00f"},{tag:ET.local(ET.variableName),color:"#30a"},{tag:[ET.typeName,ET.namespace],color:"#085"},{tag:ET.className,color:"#167"},{tag:[ET.special(ET.variableName),ET.macroName],color:"#256"},{tag:ET.definition(ET.propertyName),color:"#00c"},{tag:ET.comment,color:"#940"},{tag:ET.meta,color:"#7a757a"},{tag:ET.invalid,color:"#f00"}]);ET.link,ET.heading,ET.emphasis,ET.strong,ET.keyword,ET.atom,ET.bool,ET.url,ET.labelName,ET.inserted,ET.deleted,ET.literal,ET.string,ET.number,ET.regexp,ET.escape,ET.string,ET.variableName,ET.variableName,ET.variableName,ET.variableName,ET.typeName,ET.namespace,ET.macroName,ET.propertyName,ET.operator,ET.comment,ET.meta,ET.invalid,ET.punctuation;!function(e){e.none="none",e.vector="vector",e.scalar="scalar",e.matrix="matrix",e.string="string"}(hT||(hT={}));var AT=(dT={},(0,i.Z)(dT,59,{name:"abs",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,58,{name:"absent",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,56,{name:"absent_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,60,{name:"acos",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,61,{name:"acosh",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,62,{name:"asin",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,63,{name:"asinh",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,64,{name:"atan",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,65,{name:"atanh",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,66,{name:"avg_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,67,{name:"ceil",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,68,{name:"changes",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,69,{name:"clamp",argTypes:[hT.vector,hT.scalar,hT.scalar],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,70,{name:"clamp_max",argTypes:[hT.vector,hT.scalar],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,71,{name:"clamp_min",argTypes:[hT.vector,hT.scalar],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,72,{name:"cos",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,73,{name:"Cosh",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,74,{name:"count_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,75,{name:"days_in_month",argTypes:[hT.vector],variadic:1,returnType:hT.vector}),(0,i.Z)(dT,76,{name:"day_of_month",argTypes:[hT.vector],variadic:1,returnType:hT.vector}),(0,i.Z)(dT,77,{name:"day_of_week",argTypes:[hT.vector],variadic:1,returnType:hT.vector}),(0,i.Z)(dT,78,{name:"deg",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,79,{name:"delta",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,80,{name:"deriv",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,81,{name:"exp",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,82,{name:"floor",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,83,{name:"histogram_quantile",argTypes:[hT.scalar,hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,84,{name:"holt_winters",argTypes:[hT.matrix,hT.scalar,hT.scalar],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,85,{name:"hour",argTypes:[hT.vector],variadic:1,returnType:hT.vector}),(0,i.Z)(dT,86,{name:"idelta",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,87,{name:"increase",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,88,{name:"irate",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,89,{name:"label_replace",argTypes:[hT.vector,hT.string,hT.string,hT.string,hT.string],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,90,{name:"label_join",argTypes:[hT.vector,hT.string,hT.string,hT.string],variadic:-1,returnType:hT.vector}),(0,i.Z)(dT,91,{name:"last_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,92,{name:"ln",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,93,{name:"log10",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,94,{name:"log2",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,95,{name:"max_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,96,{name:"min_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,97,{name:"minute",argTypes:[hT.vector],variadic:1,returnType:hT.vector}),(0,i.Z)(dT,98,{name:"month",argTypes:[hT.vector],variadic:1,returnType:hT.vector}),(0,i.Z)(dT,99,{name:"pi",argTypes:[],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,100,{name:"predict_linear",argTypes:[hT.matrix,hT.scalar],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,101,{name:"present_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,102,{name:"quantile_over_time",argTypes:[hT.scalar,hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,103,{name:"rad",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,104,{name:"rate",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,105,{name:"resets",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,106,{name:"round",argTypes:[hT.vector,hT.scalar],variadic:1,returnType:hT.vector}),(0,i.Z)(dT,107,{name:"scalar",argTypes:[hT.vector],variadic:0,returnType:hT.scalar}),(0,i.Z)(dT,108,{name:"sgn",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,109,{name:"sin",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,110,{name:"Sinh",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,111,{name:"sort",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,112,{name:"sort_desc",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,113,{name:"sqrt",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,114,{name:"stddev_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,115,{name:"stdvar_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,116,{name:"sum_over_time",argTypes:[hT.matrix],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,117,{name:"tan",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,118,{name:"tanh",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,120,{name:"time",argTypes:[],variadic:0,returnType:hT.scalar}),(0,i.Z)(dT,119,{name:"timestamp",argTypes:[hT.vector],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,121,{name:"vector",argTypes:[hT.scalar],variadic:0,returnType:hT.vector}),(0,i.Z)(dT,122,{name:"year",argTypes:[hT.vector],variadic:1,returnType:hT.vector}),dT);function RT(e){return AT[e]}var DT,jT=function(){function e(t,n,r){wu(this,e),this.type=t,this.name=n,this.value=r}return Su(e,[{key:"matchesEmpty",value:function(){switch(this.type){case WP:return""===this.value;case 53:return""!==this.value;default:return!1}}}]),e}();function _T(e,t){var n=[];return e.forEach((function(e){n.push(function(e,t){var n=new jT(0,"",""),r=e.cursor;if(!r.next())return n;do{switch(r.type.id){case 36:n.name=t.sliceDoc(r.from,r.to);break;case 137:var i=r.node.firstChild;i&&(n.type=i.type.id);break;case IP:n.value=t.sliceDoc(r.from,r.to).slice(1,-1)}}while(r.nextSibling());return n}(e,t))})),n}function NT(e,t,n){if(!t||0===t.length)return e;var r,i="",o=oy(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.name!==n&&""!==a.value){var s="";switch(a.type){case WP:s="=";break;case 53:s="!=";break;case 140:s="!~";break;case 139:s="=~";break;default:s="="}var l="".concat(a.name).concat(s,'"').concat(a.value,'"');i=""===i?l:"".concat(i,",").concat(l)}}}catch(u){o.e(u)}finally{o.f()}return"".concat(e,"{").concat(i,"}")}function LT(e,t){for(var n=e.cursor,r=!0;r&&n.type.id!==t;)r=n.parent();return n.type.id===t?n.node:null}function IT(e){for(var t=e.cursor,n=0,r=!0,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];for(o.unshift(t.type.id);n<o.length&&r;)t.type.id===o[n]||t.type.name===o[n]?++n<o.length&&(r=t.next()):r=t.nextSibling();return n>=o.length?t.node:null}function zT(e){var t=e.cursor;if(!t.next())return!1;for(var n=!1,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];do{n=i.some((function(e){return t.type.id===e||t.type.name===e}))}while(!n&&t.nextSibling());return n}function BT(e){var t=e.cursor;if(!t.next())return!1;for(var n=0,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];do{t.type.id!==i[n]&&t.type.name!==i[n]||n++}while(n<i.length&&t.nextSibling());return n>=i.length}function FT(e,t,n){var r=[];return function e(r,i){var o=null===r||void 0===r?void 0:r.getChild(t),a=null===r||void 0===r?void 0:r.lastChild;o&&o.type.id===t&&e(o,i),a&&a.type.id===n&&i.push(a)}(e,r),r}function $T(e){var t;if(!e)return hT.none;switch(e.type.id){case jP:return $T(e.firstChild);case 30:case BP:return hT.vector;case LP:return $T(e.firstChild);case IP:return hT.string;case 125:return hT.scalar;case NP:case zP:return hT.matrix;case 127:case 130:return $T(IT(e,jP));case _P:var n=$T(e.firstChild),r=$T(e.lastChild);return n===hT.scalar&&r===hT.scalar?hT.scalar:hT.vector;case 54:var i=null===(t=e.firstChild)||void 0===t?void 0:t.firstChild;return i?RT(i.type.id).returnType:hT.none;case 141:return $T(IT(e,jP));default:return hT.none}}!function(e){e.CardOneToOne="one-to-one",e.CardManyToOne="many-to-one",e.CardOneToMany="one-to-many",e.CardManyToMany="many-to-many"}(DT||(DT={}));var WT,HT,VT=function(){function e(t){wu(this,e),this.tree=CC(t),this.state=t,this.diagnostics=[]}return Su(e,[{key:"getDiagnostics",value:function(){return this.diagnostics.sort((function(e,t){return e.from-t.from}))}},{key:"analyze",value:function(){this.checkAST(this.tree.topNode.firstChild),this.diagnoseAllErrorNodes()}},{key:"diagnoseAllErrorNodes",value:function(){for(var e=this.tree.cursor();e.next();)if(0===e.type.id&&e.to!==this.tree.topNode.to){var t=e.node.parent;this.diagnostics.push({severity:"error",message:"unexpected expression",from:t?t.from:e.from,to:t?t.to:e.to})}}},{key:"checkAST",value:function(e){if(!e)return hT.none;switch(e.type.id){case jP:return this.checkAST(e.firstChild);case 30:this.checkAggregationExpr(e);break;case _P:this.checkBinaryExpr(e);break;case 54:this.checkCallFunction(e);break;case 127:this.checkAST(IT(e,jP));break;case 130:var t=this.checkAST(IT(e,jP));t!==hT.scalar&&t!==hT.vector&&this.addDiagnostic(e,"unary expression only allowed on expressions of type scalar or instant vector, got ".concat(t));break;case zP:var n=this.checkAST(IT(e,jP));n!==hT.vector&&this.addDiagnostic(e,"subquery is only allowed on instant vector, got ".concat(n," in ").concat(e.name," instead"));break;case NP:this.checkAST(IT(e,jP));break;case BP:this.checkVectorSelector(e);break;case 141:var r=this.checkAST(IT(e,jP));r!==hT.vector&&r!==hT.matrix&&this.addDiagnostic(e,"@ modifier must be preceded by an instant selector vector or range vector selector or a subquery")}return $T(e)}},{key:"checkAggregationExpr",value:function(e){var t,n=null===(t=e.firstChild)||void 0===t?void 0:t.firstChild;if(n){var r=IT(e,37,38,jP);if(r){this.expectType(r,hT.vector,"aggregation expression");var i=IT(e,37,38,38,jP);if(19===n.type.id||9===n.type.id||15===n.type.id){if(!i)return void this.addDiagnostic(e,"no parameter found");this.expectType(i,hT.scalar,"aggregation parameter")}if(11===n.type.id){if(!i)return void this.addDiagnostic(e,"no parameter found");this.expectType(i,hT.string,"aggregation parameter")}}else this.addDiagnostic(e,"unable to find the parameter for the expression")}else this.addDiagnostic(e,"aggregation operator expected in aggregation expression but got nothing")}},{key:"checkBinaryExpr",value:function(e){var t=e.firstChild,n=e.lastChild;if(t&&n){var r=this.checkAST(t),i=this.checkAST(n),o=IT(e,41,1),a=zT(e,48,53,51,52,49,50),s=zT(e,22,23,24);o?a||this.addDiagnostic(e,"bool modifier can only be used on comparison operators"):a&&r===hT.scalar&&i===hT.scalar&&this.addDiagnostic(e,"comparisons between scalars must use BOOL modifier");var l=function(e,t){if(!t||t.type.id!==_P)return null;var n={card:DT.CardOneToOne,matchingLabels:[],on:!1,include:[]},r=t.getChild(41);if(r){var i=r.getChild(42);if(i){n.on=null!==i.getChild(3);var o=FT(i.getChild(33),34,35);if(o.length>0){var a,s=oy(o);try{for(s.s();!(a=s.n()).done;){var l=a.value;n.matchingLabels.push(e.sliceDoc(l.from,l.to))}}catch(v){s.e(v)}finally{s.f()}}}var u=r.getChild(4),c=r.getChild(5);if(u||c){n.card=u?DT.CardManyToOne:DT.CardOneToMany;var f=FT(r.getChild(33),34,35);if(f.length>0){var d,h=oy(f);try{for(h.s();!(d=h.n()).done;){var p=d.value;n.include.push(e.sliceDoc(p.from,p.to))}}catch(v){h.e(v)}finally{h.f()}}}}return zT(t,22,23,24)&&n.card===DT.CardOneToOne&&(n.card=DT.CardManyToMany),n}(this.state,e);if(null!==l&&l.on){var u,c=oy(l.matchingLabels);try{for(c.s();!(u=c.n()).done;){var f,d=u.value,h=oy(l.include);try{for(h.s();!(f=h.n()).done;){d===f.value&&this.addDiagnostic(e,'label "'.concat(d,'" must not occur in ON and GROUP clause at once'))}}catch(p){h.e(p)}finally{h.f()}}}catch(p){c.e(p)}finally{c.f()}}r!==hT.scalar&&r!==hT.vector&&this.addDiagnostic(t,"binary expression must contain only scalar and instant vector types"),i!==hT.scalar&&i!==hT.vector&&this.addDiagnostic(n,"binary expression must contain only scalar and instant vector types"),r===hT.vector&&i===hT.vector||null===l?s&&((null===l||void 0===l?void 0:l.card)!==DT.CardOneToMany&&(null===l||void 0===l?void 0:l.card)!==DT.CardManyToOne||this.addDiagnostic(e,"no grouping allowed for set operations"),(null===l||void 0===l?void 0:l.card)!==DT.CardManyToMany&&this.addDiagnostic(e,"set operations must always be many-to-many")):l.matchingLabels.length>0&&this.addDiagnostic(e,"vector matching only allowed between instant vectors"),r!==hT.scalar&&i!==hT.scalar||!s||this.addDiagnostic(e,"set operator not allowed in binary scalar expression")}else this.addDiagnostic(e,"left or right expression is missing in binary expression")}},{key:"checkCallFunction",value:function(e){var t,n=null===(t=e.firstChild)||void 0===t?void 0:t.firstChild;if(n){var r=FT(IT(e,37),38,jP),i=RT(n.type.id),o=i.argTypes.length;if(0===i.variadic)r.length!==o&&this.addDiagnostic(e,"expected ".concat(o,' argument(s) in call to "').concat(i.name,'", got ').concat(r.length));else{var a=o-1;if(a>r.length)this.addDiagnostic(e,"expected at least ".concat(a,' argument(s) in call to "').concat(i.name,'", got ').concat(r.length));else{var s=a+i.variadic;i.variadic>0&&s<r.length&&this.addDiagnostic(e,"expected at most ".concat(s,' argument(s) in call to "').concat(i.name,'", got ').concat(r.length))}}for(var l=0,u=0;u<r.length;u++){if((l=u)>=i.argTypes.length){if(0===i.variadic)break;l=i.argTypes.length-1}this.expectType(r[u],i.argTypes[l],'call to function "'.concat(i.name,'"'))}}else this.addDiagnostic(e,"function not defined")}},{key:"checkVectorSelector",value:function(e){var t=_T(FT(IT(e,134,FP),FP,$P),this.state),n="",r=IT(e,133,57);if(r&&(n=this.state.sliceDoc(r.from,r.to)),""!==n){var i=t.find((function(e){return"__name__"===e.name}));i&&this.addDiagnostic(e,"metric name must not be set twice: ".concat(n," or ").concat(i.value)),t.push(new jT(WP,"__name__",n))}t.every((function(e){return e.matchesEmpty()}))&&this.addDiagnostic(e,"vector selector must contain at least one non-empty matcher")}},{key:"expectType",value:function(e,t,n){var r=this.checkAST(e);r!==t&&this.addDiagnostic(e,"expected type ".concat(t," in ").concat(n,", got ").concat(r))}},{key:"addDiagnostic",value:function(e,t){this.diagnostics.push({severity:"error",message:t,from:e.from,to:e.to})}}]),e}(),qT="undefined"!=typeof navigator&&!/Edge\/(\d+)/.exec(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),UT="-10000px",QT=function(){function e(t,n,r){wu(this,e),this.facet=n,this.createTooltipView=r,this.input=t.state.facet(n),this.tooltips=this.input.filter((function(e){return e})),this.tooltipViews=this.tooltips.map(r)}return Su(e,[{key:"update",value:function(e){var t=e.state.facet(this.facet),n=t.filter((function(e){return e}));if(t===this.input){var r,i=oy(this.tooltipViews);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.update&&o.update(e)}}catch(m){i.e(m)}finally{i.f()}return{shouldMeasure:!1}}for(var a=[],s=0;s<n.length;s++){var l=n[s],u=-1;if(l){for(var c=0;c<this.tooltips.length;c++){var f=this.tooltips[c];f&&f.create==l.create&&(u=c)}if(u<0)a[s]=this.createTooltipView(l);else{var d=a[s]=this.tooltipViews[u];d.update&&d.update(e)}}}var h,p=oy(this.tooltipViews);try{for(p.s();!(h=p.n()).done;){var v=h.value;a.indexOf(v)<0&&v.dom.remove()}}catch(m){p.e(m)}finally{p.f()}return this.input=t,this.tooltips=n,this.tooltipViews=a,{shouldMeasure:!0}}}]),e}();var XT=Ky.define({combine:function(e){var t,n;return{position:qT?"absolute":(null===(t=e.find((function(e){return e.position})))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find((function(e){return e.parent})))||void 0===n?void 0:n.parent)||null}}}),YT=Xw.fromClass(function(){function e(t){var n=this;wu(this,e),this.view=t,this.inView=!0;var r=t.state.facet(XT);this.position=r.position,this.parent=r.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new QT(t,JT,(function(e){return n.createTooltip(e)})),this.maybeMeasure()}return Su(e,[{key:"createContainer",value:function(){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}},{key:"update",value:function(e){var t=this.manager.update(e).shouldMeasure,n=e.state.facet(XT);if(n.position!=this.position){this.position=n.position;var r,i=oy(this.manager.tooltipViews);try{for(i.s();!(r=i.n()).done;){r.value.dom.style.position=this.position}}catch(l){i.e(l)}finally{i.f()}t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();var o,a=oy(this.manager.tooltipViews);try{for(a.s();!(o=a.n()).done;){var s=o.value;this.container.appendChild(s.dom)}}catch(l){a.e(l)}finally{a.f()}t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}},{key:"createTooltip",value:function(e){var t=e.create(this.view);return t.dom.classList.add("cm-tooltip"),e.arrow&&t.dom.classList.add("cm-tooltip-arrow"),t.dom.style.position=this.position,t.dom.style.top=UT,this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}},{key:"destroy",value:function(){var e,t=oy(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){e.value.dom.remove()}}catch(n){t.e(n)}finally{t.f()}}},{key:"readMeasure",value:function(){var e=this,t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((function(t){return e.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((function(e){return e.dom.getBoundingClientRect()})),innerWidth:window.innerWidth,innerHeight:window.innerHeight}}},{key:"writeMeasure",value:function(e){for(var t=e.editor,n=[],r=0;r<this.manager.tooltips.length;r++){var i=this.manager.tooltips[r],o=this.manager.tooltipViews[r],a=o.dom,s=e.pos[r],l=e.size[r];if(!s||s.bottom<=t.top||s.top>=t.bottom||s.right<=t.left||s.left>=t.right)a.style.top=UT;else{var u=!!i.arrow,c=!!i.above,f=l.right-l.left,d=l.bottom-l.top+(u?7:0),h=this.view.textDirection==ik.LTR?Math.min(s.left-(u?14:0),e.innerWidth-f):Math.max(0,s.left-f+(u?14:0));!i.strictSide&&(c?s.top-(l.bottom-l.top)<0:s.bottom+(l.bottom-l.top)>e.innerHeight)&&(c=!c);var p,v=c?s.top-d:s.bottom+(u?7:0),m=h+f,g=oy(n);try{for(g.s();!(p=g.n()).done;){var y=p.value;y.left<m&&y.right>h&&y.top<v+d&&y.bottom>v&&(v=c?y.top-d:y.bottom)}}catch(b){g.e(b)}finally{g.f()}"absolute"==this.position?(a.style.top=v-e.parent.top+"px",a.style.left=h-e.parent.left+"px"):(a.style.top=v+"px",a.style.left=h+"px"),n.push({left:h,top:v,right:m,bottom:v+d}),a.classList.toggle("cm-tooltip-above",c),a.classList.toggle("cm-tooltip-below",!c),o.positioned&&o.positioned()}}}},{key:"maybeMeasure",value:function(){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))){var e,t=oy(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){e.value.dom.style.top=UT}}catch(n){t.e(n)}finally{t.f()}}}}]),e}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),GT="undefined"==typeof document||null!=(null===(HT=document.body)||void 0===HT?void 0:HT.style.insetInlineStart)?"insetInlineStart":"left",KT=tO.baseTheme({".cm-tooltip":{zIndex:100},"&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.cm-tooltip-arrow:before, .cm-tooltip.cm-tooltip-arrow:after":(WT={position:"absolute",content:"''"},(0,i.Z)(WT,GT,"".concat(7,"px")),(0,i.Z)(WT,"width",0),(0,i.Z)(WT,"height",0),(0,i.Z)(WT,"borderLeft","".concat(7,"px solid transparent")),(0,i.Z)(WT,"borderRight","".concat(7,"px solid transparent")),(0,i.Z)(WT,"zIndex",-1),WT),".cm-tooltip-above.cm-tooltip-arrow:before":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"-".concat(6,"px")},".cm-tooltip-below.cm-tooltip-arrow:before":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"-".concat(6,"px")},".cm-tooltip-above.cm-tooltip-arrow:after":{borderTop:"".concat(7,"px solid #bbb"),bottom:"-".concat(7,"px"),zIndex:-2},".cm-tooltip-below.cm-tooltip-arrow:after":{borderBottom:"".concat(7,"px solid #bbb"),top:"-".concat(7,"px"),zIndex:-2},"&dark .cm-tooltip.cm-tooltip-arrow:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&dark .cm-tooltip.cm-tooltip-arrow:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}),JT=Ky.define({enables:[YT,KT]}),eE=Ky.define(),tE=function(){function e(t){var n=this;wu(this,e),this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new QT(t,eE,(function(e){return n.createHostedView(e)}))}return Su(e,[{key:"createHostedView",value:function(e){var t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}},{key:"mount",value:function(e){var t,n=oy(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.mount&&r.mount(e)}}catch(i){n.e(i)}finally{n.f()}this.mounted=!0}},{key:"positioned",value:function(){var e,t=oy(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.positioned&&n.positioned()}}catch(r){t.e(r)}finally{t.f()}}},{key:"update",value:function(e){this.manager.update(e)}}],[{key:"create",value:function(t){return new e(t)}}]),e}(),nE=JT.compute([eE],(function(e){var t=e.facet(eE).filter((function(e){return e}));return 0===t.length?null:{pos:Math.min.apply(Math,(0,me.Z)(t.map((function(e){return e.pos})))),end:Math.max.apply(Math,(0,me.Z)(t.filter((function(e){return null!=e.end})).map((function(e){return e.end})))),create:tE.create,above:t[0].above,arrow:t.some((function(e){return e.arrow}))}})),rE=function(){function e(t,n,r,i,o){wu(this,e),this.view=t,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.lastMouseMove=null,this.lastMoveTime=0,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Su(e,[{key:"update",value:function(){var e=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((function(){return e.startHover()}),20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var e=Date.now()-this.lastMoveTime;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}}},{key:"startHover",value:function(){var e,t=this;clearTimeout(this.restartTimeout);var n=this.lastMouseMove,r={x:n.clientX,y:n.clientY},i=this.view.contentDOM.contains(n.target)?this.view.posAtCoords(r):null;if(null!=i){var o=this.view.coordsAtPos(i);if(!(null==o||r.y<o.top||r.y>o.bottom||r.x<o.left-this.view.defaultCharacterWidth||r.x>o.right+this.view.defaultCharacterWidth)){var a=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find((function(e){return e.from<=i&&e.to>=i})),s=a&&a.dir==ik.RTL?-1:1,l=this.source(this.view,i,r.x<o.left?-s:s);if(null===(e=l)||void 0===e?void 0:e.then){var u=this.pending={pos:i};l.then((function(e){t.pending==u&&(t.pending=null,e&&t.view.dispatch({effects:t.setHover.of(e)}))}),(function(e){return Ww(t.view.state,e,"hover tooltip")}))}else l&&this.view.dispatch({effects:this.setHover.of(l)})}}}},{key:"mousemove",value:function(e){var t;this.lastMouseMove=e,this.lastMoveTime=Date.now(),this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));var n=this.active;if(n&&!function(e){for(var t=e;t;t=t.parentNode)if(1==t.nodeType&&t.classList.contains("cm-tooltip"))return!0;return!1}(e.target)||this.pending){var r=(n||this.pending).pos,i=null!==(t=null===n||void 0===n?void 0:n.end)&&void 0!==t?t:r;(r==i?this.view.posAtCoords({x:e.clientX,y:e.clientY})==r:function(e,t,n,r,i,o){var a=document.createRange(),s=e.domAtPos(t),l=e.domAtPos(n);a.setEnd(l.node,l.offset),a.setStart(s.node,s.offset);var u=a.getClientRects();a.detach();for(var c=0;c<u.length;c++){var f=u[c];if(Math.max(f.top-i,i-f.bottom,f.left-r,r-f.right)<=o)return!0}return!1}(this.view,r,i,e.clientX,e.clientY,6))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}},{key:"mouseleave",value:function(){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&this.view.dispatch({effects:this.setHover.of(null)})}},{key:"destroy",value:function(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}]),e}();function iE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Pb.define(),r=nb.define({create:function(){return null},update:function(e,r){if(e&&t.hideOnChange&&(r.docChanged||r.selection))return null;var i,o=oy(r.effects);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a.is(n))return a.value}}catch(u){o.e(u)}finally{o.f()}if(e&&r.docChanged){var s=r.changes.mapPos(e.pos,-1,Iy.TrackDel);if(null==s)return null;var l=Object.assign(Object.create(null),e);return l.pos=s,null!=e.end&&(l.end=r.changes.mapPos(e.end)),l}return e},provide:function(e){return eE.from(e)}}),i=t.hoverTime||750;return[r,Xw.define((function(t){return new rE(t,e,r,n,i)})),nE]}var oE=function(){function e(t,n,r){wu(this,e),this.state=t,this.pos=n,this.explicit=r,this.abortListeners=[]}return Su(e,[{key:"tokenBefore",value:function(e){for(var t=CC(this.state).resolveInner(this.pos,-1);t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}},{key:"matchBefore",value:function(e){var t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(cE(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}]),e}();function aE(e){var t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),"[".concat(n?"\\w":"").concat(t.replace(/[^\w\s]/g,"\\$&"),"]")}function sE(e){var t=e.map((function(e){return"string"==typeof e?{label:e}:e})),n=t.every((function(e){return/^\w+$/.test(e.label)}))?[/\w*$/,/\w+$/]:function(e){var t,n=Object.create(null),r=Object.create(null),i=oy(e);try{for(i.s();!(t=i.n()).done;){var o=t.value.label;n[o[0]]=!0;for(var a=1;a<o.length;a++)r[o[a]]=!0}}catch(l){i.e(l)}finally{i.f()}var s=aE(n)+aE(r)+"*$";return[new RegExp("^"+s),new RegExp(s)]}(t),i=(0,r.Z)(n,2),o=i[0],a=i[1];return function(e){var n=e.matchBefore(a);return n||e.explicit?{from:n?n.from:e.pos,options:t,span:o}:null}}var lE=Su((function e(t,n,r){wu(this,e),this.completion=t,this.source=n,this.match=r}));function uE(e){return e.selection.main.head}function cE(e,t){var n,r=e.source,i=t&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?new RegExp("".concat(i?"^":"","(?:").concat(r,")").concat(o?"$":""),null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}var fE=Ob.define();function dE(e,t){var n=t.completion.apply||t.completion.label,r=t.source;"string"==typeof n?e.dispatch({changes:{from:r.from,to:r.to,insert:n},selection:{anchor:r.from+n.length},userEvent:"input.complete",annotations:fE.of(t.completion)}):n(e,t.completion,r.from,r.to)}var hE=new WeakMap;function pE(e){if(!Array.isArray(e))return e;var t=hE.get(e);return t||hE.set(e,t=sE(e)),t}var vE=function(){function e(t){wu(this,e),this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(var n=0;n<t.length;){var r=ky(t,n),i=Oy(r);this.chars.push(r);var o=t.slice(n,n+i),a=o.toUpperCase();this.folded.push(ky(a==o?o.toLowerCase():a,0)),n+=i}this.astral=t.length!=this.chars.length}return Su(e,[{key:"match",value:function(e){if(0==this.pattern.length)return[0];if(e.length<this.pattern.length)return null;var t=this.chars,n=this.folded,r=this.any,i=this.precise,o=this.byWord;if(1==t.length){var a=ky(e,0);return a==t[0]?[0,0,Oy(a)]:a==n[0]?[-200,0,Oy(a)]:null}var s=e.indexOf(this.pattern);if(0==s)return[0,0,this.pattern.length];var l=t.length,u=0;if(s<0){for(var c=0,f=Math.min(e.length,200);c<f&&u<l;){var d=ky(e,c);d!=t[u]&&d!=n[u]||(r[u++]=c),c+=Oy(d)}if(u<l)return null}for(var h=0,p=0,v=!1,m=0,g=-1,y=-1,b=/[a-z]/.test(e),x=0,w=Math.min(e.length,200),k=0;x<w&&p<l;){var S=ky(e,x);s<0&&(h<l&&S==t[h]&&(i[h++]=x),m<l&&(S==t[m]||S==n[m]?(0==m&&(g=x),y=x+1,m++):m=0));var O=void 0,C=S<255?S>=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(O=Sy(S))!=O.toLowerCase()?1:O!=O.toUpperCase()?2:0;(1==C&&b||0==k&&0!=C)&&(t[p]==S||n[p]==S&&(v=!0))&&(o[p++]=x),k=C,x+=Oy(S)}return p==l&&0==o[0]?this.result((v?-200:0)-100,o,e):m==l&&0==g?[-200,0,y]:s>-1?[-700,s,s+this.pattern.length]:m==l?[-900,g,y]:p==l?this.result((v?-200:0)-100-700,o,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}},{key:"result",value:function(e,t,n){var r,i=[e],o=1,a=oy(t);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=s+(this.astral?Oy(ky(n,s)):1);o>1&&i[o-1]==s?i[o-1]=l:(i[o++]=s,i[o++]=l)}}catch(u){a.e(u)}finally{a.f()}return i}}]),e}(),mE=Ky.define({combine:function(e){return Bb(e,{activateOnTyping:!0,override:null,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[]},{defaultKeymap:function(e,t){return e&&t},icons:function(e,t){return e&&t},optionClass:function(e,t){return function(n){return function(e,t){return e?t?e+" "+t:e:t}(e(n),t(n))}},addToOptions:function(e,t){return e.concat(t)}})}});function gE(e,t,n){if(e<=n)return{from:0,to:e};if(t<=e>>1){var r=Math.floor(t/n);return{from:r*n,to:(r+1)*n}}var i=Math.floor((e-t)/n);return{from:e-(i+1)*n,to:e-i*n}}var yE=function(){function e(t,n){var r=this;wu(this,e),this.view=t,this.stateField=n,this.info=null,this.placeInfo={read:function(){return r.measureInfo()},write:function(e){return r.positionInfo(e)},key:this};var i=t.state.field(n),o=i.open,a=o.options,s=o.selected,l=t.state.facet(mE);this.optionContent=function(e){var t=e.addToOptions.slice();return e.icons&&t.push({render:function(e){var t,n=document.createElement("div");return n.classList.add("cm-completionIcon"),e.type&&(t=n.classList).add.apply(t,(0,me.Z)(e.type.split(/\s+/g).map((function(e){return"cm-completionIcon-"+e})))),n.setAttribute("aria-hidden","true"),n},position:20}),t.push({render:function(e,t,n){var r=document.createElement("span");r.className="cm-completionLabel";for(var i=e.label,o=0,a=1;a<n.length;){var s=n[a++],l=n[a++];s>o&&r.appendChild(document.createTextNode(i.slice(o,s)));var u=r.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(i.slice(s,l))),u.className="cm-completionMatchedText",o=l}return o<i.length&&r.appendChild(document.createTextNode(i.slice(o))),r},position:50},{render:function(e){if(!e.detail)return null;var t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort((function(e,t){return e.position-t.position})).map((function(e){return e.render}))}(l),this.optionClass=l.optionClass,this.range=gE(a.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.dom.addEventListener("mousedown",(function(e){for(var n,i=e.target;i&&i!=r.dom;i=i.parentNode)if("LI"==i.nodeName&&(n=/-(\d+)$/.exec(i.id))&&+n[1]<a.length)return dE(t,a[+n[1]]),void e.preventDefault()})),this.list=this.dom.appendChild(this.createListBox(a,i.id,this.range)),this.list.addEventListener("scroll",(function(){r.info&&r.view.requestMeasure(r.placeInfo)}))}return Su(e,[{key:"mount",value:function(){this.updateSel()}},{key:"update",value:function(e){e.state.field(this.stateField)!=e.startState.field(this.stateField)&&this.updateSel()}},{key:"positioned",value:function(){this.info&&this.view.requestMeasure(this.placeInfo)}},{key:"updateSel",value:function(){var e=this,t=this.view.state.field(this.stateField),n=t.open;if((n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=gE(n.options.length,n.selected,this.view.state.facet(mE).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,t.id,this.range)),this.list.addEventListener("scroll",(function(){e.info&&e.view.requestMeasure(e.placeInfo)}))),this.updateSelectedOption(n.selected)){this.info&&(this.info.remove(),this.info=null);var r=n.options[n.selected];r.completion.info&&(this.info=this.dom.appendChild(function(e,t){var n=document.createElement("div");n.className="cm-tooltip cm-completionInfo";var r=e.completion.info;if("string"==typeof r)n.textContent=r;else{var i=r(e.completion);i.then?i.then((function(e){return n.appendChild(e)}),(function(e){return Ww(t.state,e,"completion info")})):n.appendChild(i)}return n}(r,this.view)),this.view.requestMeasure(this.placeInfo))}}},{key:"updateSelectedOption",value:function(e){for(var t=null,n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.top<n.top?e.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(e.scrollTop+=r.bottom-n.bottom)}(this.list,t),t}},{key:"measureInfo",value:function(){var e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;var t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect();if(t.top>innerHeight-10||t.bottom<10)return null;var r=Math.max(0,Math.min(e.getBoundingClientRect().top,innerHeight-n.height))-t.top,i=this.view.textDirection==ik.RTL,o=t.left,a=innerWidth-t.right;return i&&o<Math.min(n.width,a)?i=!1:!i&&a<Math.min(n.width,o)&&(i=!0),{top:r,left:i}}},{key:"positionInfo",value:function(e){this.info&&(this.info.style.top=(e?e.top:-1e6)+"px",e&&(this.info.classList.toggle("cm-completionInfo-left",e.left),this.info.classList.toggle("cm-completionInfo-right",!e.left)))}},{key:"createListBox",value:function(e,t,n){var r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox");for(var i=n.from;i<n.to;i++){var o=e[i],a=o.completion,s=o.match,l=r.appendChild(document.createElement("li"));l.id=t+"-"+i,l.setAttribute("role","option");var u=this.optionClass(a);u&&(l.className=u);var c,f=oy(this.optionContent);try{for(f.s();!(c=f.n()).done;){var d=(0,c.value)(a,this.view.state,s);d&&l.appendChild(d)}}catch(h){f.e(h)}finally{f.f()}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}}]),e}();function bE(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}var xE=function(){function e(t,n,r,i,o){wu(this,e),this.options=t,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o}return Su(e,[{key:"setSelected",value:function(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,SE(n,t),this.tooltip,this.timestamp,t)}},{key:"map",value:function(t){return new e(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(t,n,r,i,o){var a=function(e,t){var n,r=[],i=0,o=oy(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.hasResult())if(!1===a.result.filter){var s,l=oy(a.result.options);try{for(l.s();!(s=l.n()).done;){var u=s.value;r.push(new lE(u,a,[1e9-i++]))}}catch(x){l.e(x)}finally{l.f()}}else{var c,f=new vE(t.sliceDoc(a.from,a.to)),d=void 0,h=oy(a.result.options);try{for(h.s();!(c=h.n()).done;){var p=c.value;(d=f.match(p.label))&&(null!=p.boost&&(d[0]+=p.boost),r.push(new lE(p,a,d)))}}catch(x){h.e(x)}finally{h.f()}}}}catch(x){o.e(x)}finally{o.f()}r.sort(CE);var v,m=[],g=null,y=oy(r.sort(CE));try{for(y.s();!(v=y.n()).done;){var b=v.value;if(300==m.length)break;g&&g.label==b.completion.label&&g.detail==b.completion.detail&&g.type==b.completion.type&&g.apply==b.completion.apply?bE(b.completion)>bE(g)&&(m[m.length-1]=b):m.push(b),g=b.completion}}catch(x){y.e(x)}finally{y.f()}return m}(t,n);if(!a.length)return null;var s,l=0;if(i&&i.selected)for(var u=i.options[i.selected].completion,c=0;c<a.length&&!l;c++)a[c].completion==u&&(l=c);return new e(a,SE(r,l),{pos:t.reduce((function(e,t){return t.hasResult()?Math.min(e,t.from):e}),1e8),create:(s=DE,function(e){return new yE(e,s)}),above:o.aboveCursor},i?i.timestamp:Date.now(),l)}}]),e}(),wE=function(){function e(t,n,r){wu(this,e),this.active=t,this.id=n,this.open=r}return Su(e,[{key:"update",value:function(t){var n=this,r=t.state,i=r.facet(mE),o=(i.override||r.languageDataAt("autocomplete",uE(r)).map(pE)).map((function(e){return(n.active.find((function(t){return t.source==e}))||new PE(e,n.active.some((function(e){return 0!=e.state}))?1:0)).update(t,i)}));o.length==this.active.length&&o.every((function(e,t){return e==n.active[t]}))&&(o=this.active);var a=t.selection||o.some((function(e){return e.hasResult()&&t.changes.touchesRange(e.from,e.to)}))||!function(e,t){if(e==t)return!0;for(var n=0,r=0;;){for(;n<e.length&&!e[n].hasResult;)n++;for(;r<t.length&&!t[r].hasResult;)r++;var i=n==e.length,o=r==t.length;if(i||o)return i==o;if(e[n++].result!=t[r++].result)return!1}}(o,this.active)?xE.build(o,r,this.id,this.open,i):this.open&&t.docChanged?this.open.map(t.changes):this.open;!a&&o.every((function(e){return 1!=e.state}))&&o.some((function(e){return e.hasResult()}))&&(o=o.map((function(e){return e.hasResult()?new PE(e.source,0):e})));var s,l=oy(t.effects);try{for(l.s();!(s=l.n()).done;){var u=s.value;u.is(RE)&&(a=a&&a.setSelected(u.value,this.id))}}catch(c){l.e(c)}finally{l.f()}return o==this.active&&a==this.open?this:new e(o,this.id,a)}},{key:"tooltip",get:function(){return this.open?this.open.tooltip:null}},{key:"attrs",get:function(){return this.open?this.open.attrs:kE}}],[{key:"start",value:function(){return new e(OE,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}}]),e}();var kE={"aria-autocomplete":"list","aria-expanded":"false"};function SE(e,t){return{"aria-autocomplete":"list","aria-expanded":"true","aria-activedescendant":e+"-"+t,"aria-controls":e}}var OE=[];function CE(e,t){var n=t.match[0]-e.match[0];return n||e.completion.label.localeCompare(t.completion.label)}function ME(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}var PE=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;wu(this,e),this.source=t,this.state=n,this.explicitPos=r}return Su(e,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(t,n){var r=ME(t),i=this;r?i=i.handleUserEvent(t,r,n):t.docChanged?i=i.handleChange(t):t.selection&&0!=i.state&&(i=new e(i.source,0));var o,a=oy(t.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.is(EE))i=new e(i.source,1,s.value?uE(t.state):-1);else if(s.is(ZE))i=new e(i.source,0);else if(s.is(AE)){var l,u=oy(s.value);try{for(u.s();!(l=u.n()).done;){var c=l.value;c.source==i.source&&(i=c)}}catch(f){u.e(f)}finally{u.f()}}}}catch(f){a.e(f)}finally{a.f()}return i}},{key:"handleUserEvent",value:function(t,n,r){return"delete"!=n&&r.activateOnTyping?new e(this.source,1):this.map(t.changes)}},{key:"handleChange",value:function(t){return t.changes.touchesRange(uE(t.startState))?new e(this.source,0):this.map(t.changes)}},{key:"map",value:function(t){return t.empty||this.explicitPos<0?this:new e(this.source,this.state,t.mapPos(this.explicitPos))}}]),e}(),TE=function(e){ay(n,e);var t=cy(n);function n(e,r,i,o,a,s){var l;return wu(this,n),(l=t.call(this,e,2,r)).result=i,l.from=o,l.to=a,l.span=s,l}return Su(n,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(e,t,r){var i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=uE(e.state);if((this.explicitPos>-1?a<i:a<=i)||a>o)return new PE(this.source,"input"==t&&r.activateOnTyping?1:0);var s=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return this.span&&(i==o||this.span.test(e.state.sliceDoc(i,o)))?new n(this.source,s,this.result,i,o,this.span):new PE(this.source,1,s)}},{key:"handleChange",value:function(e){return e.changes.touchesRange(this.from,this.to)?new PE(this.source,0):this.map(e.changes)}},{key:"map",value:function(e){return e.empty?this:new n(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1),this.span)}}]),n}(PE),EE=Pb.define(),ZE=Pb.define(),AE=Pb.define({map:function(e,t){return e.map((function(e){return e.map(t)}))}}),RE=Pb.define(),DE=nb.define({create:function(){return wE.start()},update:function(e,t){return e.update(t)},provide:function(e){return[JT.from(e,(function(e){return e.tooltip})),tO.contentAttributes.from(e,(function(e){return e.attrs}))]}});function jE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(n){var r=n.state.field(DE,!1);if(!r||!r.open||Date.now()-r.open.timestamp<75)return!1;var i,o=1;"page"==t&&(i=n.dom.querySelector(".cm-tooltip-autocomplete"))&&(o=Math.max(2,Math.floor(i.offsetHeight/i.firstChild.offsetHeight)));var a=r.open.selected+o*(e?1:-1),s=r.open.options.length;return a<0?a="page"==t?0:s-1:a>=s&&(a="page"==t?s-1:0),n.dispatch({effects:RE.of(a)}),!0}}var _E=Su((function e(t,n){wu(this,e),this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0})),NE=Xw.fromClass(function(){function e(t){wu(this,e),this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var n,r=oy(t.state.field(DE).active);try{for(r.s();!(n=r.n()).done;){var i=n.value;1==i.state&&this.startQuery(i)}}catch(o){r.e(o)}finally{r.f()}}return Su(e,[{key:"update",value:function(e){var t=this,n=e.state.field(DE);if(e.selectionSet||e.docChanged||e.startState.field(DE)!=n){for(var r=e.transactions.some((function(e){return(e.selection||e.docChanged)&&!ME(e)})),i=0;i<this.running.length;i++){var o=this.running[i];if(r||o.updates.length+e.transactions.length>50&&o.time-Date.now()>1e3){var a,s=oy(o.context.abortListeners);try{for(s.s();!(a=s.n()).done;){var l=a.value;try{l()}catch(h){Ww(this.view.state,h)}}}catch(p){s.e(p)}finally{s.f()}o.context.abortListeners=null,this.running.splice(i--,1)}else{var u;(u=o.updates).push.apply(u,(0,me.Z)(e.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=n.active.some((function(e){return 1==e.state&&!t.running.some((function(t){return t.active.source==e.source}))}))?setTimeout((function(){return t.startUpdate()}),50):-1,0!=this.composing){var c,f=oy(e.transactions);try{for(f.s();!(c=f.n()).done;){var d=c.value;"input"==ME(d)?this.composing=2:2==this.composing&&d.selection&&(this.composing=3)}}catch(p){f.e(p)}finally{f.f()}}}}},{key:"startUpdate",value:function(){var e=this;this.debounceUpdate=-1;var t,n=oy(this.view.state.field(DE).active);try{var r=function(){var n=t.value;1!=n.state||e.running.some((function(e){return e.active.source==n.source}))||e.startQuery(n)};for(n.s();!(t=n.n()).done;)r()}catch(i){n.e(i)}finally{n.f()}}},{key:"startQuery",value:function(e){var t=this,n=this.view.state,r=uE(n),i=new oE(n,r,e.explicitPos==r),o=new _E(e,i);this.running.push(o),Promise.resolve(e.source(i)).then((function(e){o.context.aborted||(o.done=e||null,t.scheduleAccept())}),(function(e){t.view.dispatch({effects:ZE.of(null)}),Ww(t.view.state,e)}))}},{key:"scheduleAccept",value:function(){var e=this;this.running.every((function(e){return void 0!==e.done}))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((function(){return e.accept()}),50))}},{key:"accept",value:function(){var e,t=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var n=[],r=this.view.state.facet(mE),i=function(i){var a=t.running[i];if(void 0===a.done)return o=i,"continue";if(t.running.splice(i--,1),a.done){var s,l=new TE(a.active.source,a.active.explicitPos,a.done,a.done.from,null!==(e=a.done.to)&&void 0!==e?e:uE(a.updates.length?a.updates[0].startState:t.view.state),a.done.span&&!1!==a.done.filter?cE(a.done.span,!0):null),u=oy(a.updates);try{for(u.s();!(s=u.n()).done;){var c=s.value;l=l.update(c,r)}}catch(m){u.e(m)}finally{u.f()}if(l.hasResult())return n.push(l),o=i,"continue"}var f=t.view.state.field(DE).active.find((function(e){return e.source==a.active.source}));if(f&&1==f.state)if(null==a.done){var d,h=new PE(a.active.source,0),p=oy(a.updates);try{for(p.s();!(d=p.n()).done;){var v=d.value;h=h.update(v,r)}}catch(m){p.e(m)}finally{p.f()}1!=h.state&&n.push(h)}else t.startQuery(f);o=i},o=0;o<this.running.length;o++)i(o);n.length&&this.view.dispatch({effects:AE.of(n)})}}]),e}(),{eventHandlers:{compositionstart:function(){this.composing=1},compositionend:function(){var e=this;3==this.composing&&setTimeout((function(){return e.view.dispatch({effects:EE.of(!1)})}),20),this.composing=0}}}),LE=tO.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",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#39e",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",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"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\ud835\udc65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\ud835\udc36'"}},".cm-completionIcon-type":{"&:after":{content:"'\ud835\udc61'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\ud83d\udd11\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),IE=Su((function e(t,n,r,i){wu(this,e),this.field=t,this.line=n,this.from=r,this.to=i})),zE=function(){function e(t,n,r){wu(this,e),this.field=t,this.from=n,this.to=r}return Su(e,[{key:"map",value:function(t){return new e(this.field,t.mapPos(this.from,-1),t.mapPos(this.to,1))}}]),e}(),BE=function(){function e(t,n){wu(this,e),this.lines=t,this.fieldPositions=n}return Su(e,[{key:"instantiate",value:function(e,t){var n,r=[],i=[t],o=e.doc.lineAt(t),a=/^\s*/.exec(o.text)[0],s=oy(this.lines);try{for(s.s();!(n=s.n()).done;){var l=n.value;if(r.length){for(var u=a,c=/^\t*/.exec(l)[0].length,f=0;f<c;f++)u+=e.facet(NC);i.push(t+u.length-c),l=u+l.slice(c)}r.push(l),t+=l.length+1}}catch(h){s.e(h)}finally{s.f()}var d=this.fieldPositions.map((function(e){return new zE(e.field,i[e.line]+e.from,i[e.line]+e.to)}));return{text:r,ranges:d}}}],[{key:"parse",value:function(t){var n,r,i=[],o=[],a=[],s=oy(t.split(/\r\n?|\n/));try{for(s.s();!(r=s.n()).done;){for(var l=r.value;n=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(l);){for(var u=n[1]?+n[1]:null,c=n[2]||n[3]||"",f=-1,d=0;d<i.length;d++)(null!=u?i[d].seq==u:c&&i[d].name==c)&&(f=d);if(f<0){for(var h=0;h<i.length&&(null==u||null!=i[h].seq&&i[h].seq<u);)h++;i.splice(h,0,{seq:u,name:c}),f=h;var p,v=oy(a);try{for(v.s();!(p=v.n()).done;){var m=p.value;m.field>=f&&m.field++}}catch(g){v.e(g)}finally{v.f()}}a.push(new IE(f,o.length,n.index,n.index+c.length)),l=l.slice(0,n.index)+c+l.slice(n.index+n[0].length)}o.push(l)}}catch(g){s.e(g)}finally{s.f()}return new e(o,a)}}]),e}(),FE=ww.widget({widget:new(function(e){ay(n,e);var t=cy(n);function n(){return wu(this,n),t.apply(this,arguments)}return Su(n,[{key:"toDOM",value:function(){var e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}},{key:"ignoreEvent",value:function(){return!1}}]),n}(bw))}),$E=ww.mark({class:"cm-snippetField"}),WE=function(){function e(t,n){wu(this,e),this.ranges=t,this.active=n,this.deco=ww.set(t.map((function(e){return(e.from==e.to?FE:$E).range(e.from,e.to)})))}return Su(e,[{key:"map",value:function(t){return new e(this.ranges.map((function(e){return e.map(t)})),this.active)}},{key:"selectionInsideField",value:function(e){var t=this;return e.ranges.every((function(e){return t.ranges.some((function(n){return n.field==t.active&&n.from<=e.from&&n.to>=e.to}))}))}}]),e}(),HE=Pb.define({map:function(e,t){return e&&e.map(t)}}),VE=Pb.define(),qE=nb.define({create:function(){return null},update:function(e,t){var n,r=oy(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(HE))return i.value;if(i.is(VE)&&e)return new WE(e.ranges,i.value)}}catch(o){r.e(o)}finally{r.f()}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:function(e){return tO.decorations.from(e,(function(e){return e?e.deco:ww.none}))}});function UE(e,t){return Qy.create(e.filter((function(e){return e.field==t})).map((function(e){return Qy.range(e.from,e.to)})))}function QE(e){var t=BE.parse(e);return function(e,n,r,i){var o=t.instantiate(e.state,r),a=o.text,s=o.ranges,l={changes:{from:r,to:i,insert:Py.of(a)}};if(s.length&&(l.selection=UE(s,0)),s.length>1){var u=new WE(s,0),c=l.effects=[HE.of(u)];void 0===e.state.field(qE,!1)&&c.push(Pb.appendConfig.of([qE,KE,JE,LE]))}e.dispatch(e.state.update(l))}}function XE(e){return function(t){var n=t.state,r=t.dispatch,i=n.field(qE,!1);if(!i||e<0&&0==i.active)return!1;var o=i.active+e,a=e>0&&!i.ranges.some((function(t){return t.field==o+e}));return r(n.update({selection:UE(i.ranges,o),effects:HE.of(a?null:new WE(i.ranges,o))})),!0}}var YE=[{key:"Tab",run:XE(1),shift:XE(-1)},{key:"Escape",run:function(e){var t=e.state,n=e.dispatch;return!!t.field(qE,!1)&&(n(t.update({effects:HE.of(null)})),!0)}}],GE=Ky.define({combine:function(e){return e.length?e[0]:YE}}),KE=ub.highest(pO.compute([GE],(function(e){return e.facet(GE)})));var JE=tO.domEventHandlers({mousedown:function(e,t){var n,r=t.state.field(qE,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;var i=r.ranges.find((function(e){return e.from<=n&&e.to>=n}));return!(!i||i.field==r.active)&&(t.dispatch({selection:UE(r.ranges,i.field),effects:HE.of(r.ranges.some((function(e){return e.field>i.field}))?new WE(r.ranges,i.field):null)}),!0)}});function eZ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[DE,mE.of(e),NE,nZ,LE]}var tZ=[{key:"Ctrl-Space",run:function(e){return!!e.state.field(DE,!1)&&(e.dispatch({effects:EE.of(!0)}),!0)}},{key:"Escape",run:function(e){var t=e.state.field(DE,!1);return!(!t||!t.active.some((function(e){return 0!=e.state})))&&(e.dispatch({effects:ZE.of(null)}),!0)}},{key:"ArrowDown",run:jE(!0)},{key:"ArrowUp",run:jE(!1)},{key:"PageDown",run:jE(!0,"page")},{key:"PageUp",run:jE(!1,"page")},{key:"Enter",run:function(e){var t=e.state.field(DE,!1);return!(e.state.readOnly||!t||!t.open||Date.now()-t.open.timestamp<75)&&(dE(e,t.open.options[t.open.selected]),!0)}}],nZ=ub.highest(pO.computeN([mE],(function(e){return e.facet(mE).defaultKeymap?[tZ]:[]})));var rZ,iZ=[{label:"^"},{label:"*"},{label:"/"},{label:"%"},{label:"+"},{label:"-"},{label:"=="},{label:">="},{label:">"},{label:"<"},{label:"<="},{label:"!="},{label:"atan2"},{label:"and"},{label:"or"},{label:"unless"}],oZ=[{label:"avg",detail:"aggregation",info:"Calculate the average over dimensions",type:"keyword"},{label:"bottomk",detail:"aggregation",info:"Smallest k elements by sample value",type:"keyword"},{label:"count",detail:"aggregation",info:"Count number of elements in the vector",type:"keyword"},{label:"count_values",detail:"aggregation",info:"Count number of elements with the same value",type:"keyword"},{label:"group",detail:"aggregation",info:"Group series, while setting the sample value to 1",type:"keyword"},{label:"max",detail:"aggregation",info:"Select maximum over dimensions",type:"keyword"},{label:"min",detail:"aggregation",info:"Select minimum over dimensions",type:"keyword"},{label:"quantile",detail:"aggregation",info:"Calculate \u03c6-quantile (0 \u2264 \u03c6 \u2264 1) over dimensions",type:"keyword"},{label:"stddev",detail:"aggregation",info:"Calculate population standard deviation over dimensions",type:"keyword"},{label:"stdvar",detail:"aggregation",info:"Calculate population standard variance over dimensions",type:"keyword"},{label:"sum",detail:"aggregation",info:"Calculate sum over dimensions",type:"keyword"},{label:"topk",detail:"aggregation",info:"Largest k elements by sample value",type:"keyword"}],aZ=[{label:"sum(rate(__input_vector__[5m]))",type:"function",detail:"snippet",info:"Sum over rates of increase",apply:QE("sum(rate(${__input_vector__}[5m]))")},{label:"histogram_quantile(__quantile__, sum by(le) (rate(__histogram_metric__[5m])))",type:"function",detail:"snippet",info:"Approximate a quantile value from an aggregated histogram",apply:QE("histogram_quantile(${__quantile__}, sum by(le) (rate(${__histogram_metric__}[5m])))")},{label:'label_replace(__input_vector__, "__dst__", "__replacement__", "__src__", "__regex__")',type:"function",detail:"snippet",info:"Set or replace a label value in an input vector",apply:QE('label_replace(${__input_vector__}, "${__dst__}", "${__replacement__}", "${__src__}", "${__regex__}")')},{label:"topk(__rank_number__, __input_vector__)",type:"function",detail:"snippet",info:"Largest k elements by sample value",apply:QE("topk(${__rank_number__}, ${__input_vector__})")},{label:"bottomk(__rank_number__, __input_vector__)",type:"function",detail:"snippet",info:"Smallest k elements by sample value",apply:QE("bottomk(${__rank_number__}, ${__input_vector__})")},{label:'count_values("__label_name__", __input_vector__)',type:"function",detail:"snippet",info:"Count the number of series per distinct sample value",apply:QE('count_values("${__label_name__}", ${__metric__})')}],sZ={matchOp:[{label:"="},{label:"!="},{label:"=~"},{label:"!~"}],binOp:iZ,duration:[{label:"y"},{label:"w"},{label:"d"},{label:"h"},{label:"m"},{label:"s"},{label:"ms"}],binOpModifier:[{label:"on",info:"Match only on specified labels",type:"keyword"},{label:"ignoring",info:"Ignore specified labels for matching",type:"keyword"},{label:"group_left",info:"Allow many-to-one matching",type:"keyword"},{label:"group_right",info:"Allow one-to-many matching",type:"keyword"}],atModifier:[{label:"start()",info:"resolve to the start of the query",type:"keyword"},{label:"end()",info:"resolve to the end of the query",type:"keyword"}],functionIdentifier:[{label:"abs",detail:"function",info:"Return absolute values of input series",type:"function"},{label:"absent",detail:"function",info:"Determine whether input vector is empty",type:"function"},{label:"absent_over_time",detail:"function",info:"Determine whether input range vector is empty",type:"function"},{label:"acos",detail:"function",info:"Calculate the arccosine, in radians, for input series",type:"function"},{label:"acosh",detail:"function",info:"Calculate the inverse hyperbolic cosine, in radians, for input series",type:"function"},{label:"asin",detail:"function",info:"Calculate the arcsine, in radians, for input series",type:"function"},{label:"asinh",detail:"function",info:"Calculate the inverse hyperbolic sine, in radians, for input series",type:"function"},{label:"atan",detail:"function",info:"Calculate the arctangent, in radians, for input series",type:"function"},{label:"atanh",detail:"function",info:"Calculate the inverse hyperbolic tangent, in radians, for input series",type:"function"},{label:"avg_over_time",detail:"function",info:"Average series values over time",type:"function"},{label:"ceil",detail:"function",info:"Round up values of input series to nearest integer",type:"function"},{label:"changes",detail:"function",info:"Return number of value changes in input series over time",type:"function"},{label:"clamp",detail:"function",info:"Limit the value of input series between a minimum and a maximum",type:"function"},{label:"clamp_max",detail:"function",info:"Limit the value of input series to a maximum",type:"function"},{label:"clamp_min",detail:"function",info:"Limit the value of input series to a minimum",type:"function"},{label:"cos",detail:"function",info:"Calculate the cosine, in radians, for input series",type:"function"},{label:"cosh",detail:"function",info:"Calculate the hyperbolic cosine, in radians, for input series",type:"function"},{label:"count_over_time",detail:"function",info:"Count the number of values for each input series",type:"function"},{label:"days_in_month",detail:"function",info:"Return the number of days in current month for provided timestamps",type:"function"},{label:"day_of_month",detail:"function",info:"Return the day of the month for provided timestamps",type:"function"},{label:"day_of_week",detail:"function",info:"Return the day of the week for provided timestamps",type:"function"},{label:"deg",detail:"function",info:"Convert radians to degrees for input series",type:"function"},{label:"delta",detail:"function",info:"Calculate the difference between beginning and end of a range vector (for gauges)",type:"function"},{label:"deriv",detail:"function",info:"Calculate the per-second derivative over series in a range vector (for gauges)",type:"function"},{label:"exp",detail:"function",info:"Calculate exponential function for input vector values",type:"function"},{label:"floor",detail:"function",info:"Round down values of input series to nearest integer",type:"function"},{label:"histogram_quantile",detail:"function",info:"Calculate quantiles from histogram buckets",type:"function"},{label:"holt_winters",detail:"function",info:"Calculate smoothed value of input series",type:"function"},{label:"hour",detail:"function",info:"Return the hour of the day for provided timestamps",type:"function"},{label:"idelta",detail:"function",info:"Calculate the difference between the last two samples of a range vector (for counters)",type:"function"},{label:"increase",detail:"function",info:"Calculate the increase in value over a range of time (for counters)",type:"function"},{label:"irate",detail:"function",info:"Calculate the per-second increase over the last two samples of a range vector (for counters)",type:"function"},{label:"label_replace",detail:"function",info:"Set or replace label values",type:"function"},{label:"label_join",detail:"function",info:"Join together label values into new label",type:"function"},{label:"last_over_time",detail:"function",info:"The most recent point value in specified interval.",type:"function"},{label:"ln",detail:"function",info:"Calculate natural logarithm of input series",type:"function"},{label:"log10",detail:"function",info:"Calulcate base-10 logarithm of input series",type:"function"},{label:"log2",detail:"function",info:"Calculate base-2 logarithm of input series",type:"function"},{label:"max_over_time",detail:"function",info:"Return the maximum value over time for input series",type:"function"},{label:"min_over_time",detail:"function",info:"Return the minimum value over time for input series",type:"function"},{label:"minute",detail:"function",info:"Return the minute of the hour for provided timestamps",type:"function"},{label:"month",detail:"function",info:"Return the month for provided timestamps",type:"function"},{label:"pi",detail:"function",info:"Return pi",type:"function"},{label:"predict_linear",detail:"function",info:"Predict the value of a gauge into the future",type:"function"},{label:"present_over_time",detail:"function",info:"the value 1 for any series in the specified interval",type:"function"},{label:"quantile_over_time",detail:"function",info:"Calculate value quantiles over time for input series",type:"function"},{label:"rad",detail:"function",info:"Convert degrees to radians for input series",type:"function"},{label:"rate",detail:"function",info:"Calculate per-second increase over a range vector (for counters)",type:"function"},{label:"resets",detail:"function",info:"Return number of value decreases (resets) in input series of time",type:"function"},{label:"round",detail:"function",info:"Round values of input series to nearest integer",type:"function"},{label:"scalar",detail:"function",info:"Convert single-element series vector into scalar value",type:"function"},{label:"sgn",detail:"function",info:"Returns the sign of the instant vector",type:"function"},{label:"sin",detail:"function",info:"Calculate the sine, in radians, for input series",type:"function"},{label:"sinh",detail:"function",info:"Calculate the hyperbolic sine, in radians, for input series",type:"function"},{label:"sort",detail:"function",info:"Sort input series ascendingly by value",type:"function"},{label:"sort_desc",detail:"function",info:"Sort input series descendingly by value",type:"function"},{label:"sqrt",detail:"function",info:"Return the square root for input series",type:"function"},{label:"stddev_over_time",detail:"function",info:"Calculate the standard deviation within input series over time",type:"function"},{label:"stdvar_over_time",detail:"function",info:"Calculate the standard variation within input series over time",type:"function"},{label:"sum_over_time",detail:"function",info:"Calculate the sum over the values of input series over time",type:"function"},{label:"tan",detail:"function",info:"Calculate the tangent, in radians, for input series",type:"function"},{label:"tanh",detail:"function",info:"Calculate the hyperbolic tangent, in radians, for input series",type:"function"},{label:"time",detail:"function",info:"Return the Unix timestamp at the current evaluation time",type:"function"},{label:"timestamp",detail:"function",info:"Return the Unix timestamp for the samples in the input vector",type:"function"},{label:"vector",detail:"function",info:"Convert a scalar value into a single-element series vector",type:"function"},{label:"year",detail:"function",info:"Return the year for provided timestamps",type:"function"}],aggregateOp:oZ,aggregateOpModifier:[{label:"by",info:"Keep the listed labels, remove all others.",type:"keyword"},{label:"without",info:"Remove the listed labels, preserve all others.",type:"keyword"}],number:[{label:"nan",info:"Floating-point NaN value",type:"constant"},{label:"inf",info:"Floating-point infinity",type:"constant"}]};function lZ(e,t){var n=LT(e,BP);return n&&(n=IT(n,133,57))?t.sliceDoc(n.from,n.to):""}!function(e){e[e.MetricName=0]="MetricName",e[e.LabelName=1]="LabelName",e[e.LabelValue=2]="LabelValue",e[e.Function=3]="Function",e[e.Aggregation=4]="Aggregation",e[e.BinOpModifier=5]="BinOpModifier",e[e.BinOp=6]="BinOp",e[e.MatchOp=7]="MatchOp",e[e.AggregateOpModifier=8]="AggregateOpModifier",e[e.Duration=9]="Duration",e[e.Offset=10]="Offset",e[e.Bool=11]="Bool",e[e.AtModifiers=12]="AtModifiers",e[e.Number=13]="Number"}(rZ||(rZ={}));var uZ=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4;wu(this,e),this.prometheusClient=t,this.maxMetricsMetadata=n}return Su(e,[{key:"getPrometheusClient",value:function(){return this.prometheusClient}},{key:"promQL",value:function(e){var t,n=this,r=e.state,i=e.pos,o=CC(r).resolve(i,-1),a=function(e,t){var n,r,i,o,a,s,l,u,c,f,d,h,p,v,m,g,y=[];switch(t.type.id){case 0:if((null===(n=t.parent)||void 0===n?void 0:n.type.id)===LP){y.push({kind:rZ.Duration});break}if((null===(r=t.parent)||void 0===r?void 0:r.type.id)===$P){y.push({kind:rZ.MatchOp});break}if((null===(i=t.parent)||void 0===i?void 0:i.type.id)===NP){y.push({kind:rZ.Duration});break}if((null===(o=t.parent)||void 0===o?void 0:o.type.id)===zP&&zT(t.parent,124)){y.push({kind:rZ.Duration});break}var b=e.sliceDoc(t.from,t.to);iZ.filter((function(e){return e.label.includes(b)})).length>0&&y.push({kind:rZ.BinOp});break;case 57:if(0===(null===(a=t.parent)||void 0===a?void 0:a.type.id)){var x=t.parent.parent;if(141===(null===x||void 0===x?void 0:x.type.id)){y.push({kind:rZ.AtModifiers});break}if(30===(null===x||void 0===x?void 0:x.type.id)){y.push({kind:rZ.AggregateOpModifier},{kind:rZ.BinOp});break}if((null===x||void 0===x?void 0:x.type.id)===BP){var w=lZ(t,e);oZ.filter((function(e){return e.label===w})).length>0&&y.push({kind:rZ.AggregateOpModifier}),y.push({kind:rZ.BinOp},{kind:rZ.Offset});break}if(x&&BT(x,jP)){y.push({kind:rZ.BinOp},{kind:rZ.Offset});break}}var k=null===(u=null===(l=null===(s=t.parent)||void 0===s?void 0:s.parent)||void 0===l?void 0:l.parent)||void 0===u?void 0:u.parent;if(!k){y.push({kind:rZ.MetricName,metricName:e.sliceDoc(t.from,t.to)});break}BT(k,jP,jP)?k.type.id!==_P||zT(k,0)||(y.push({kind:rZ.MetricName,metricName:e.sliceDoc(t.from,t.to)},{kind:rZ.Function},{kind:rZ.Aggregation},{kind:rZ.BinOpModifier},{kind:rZ.Number}),zT(k,48,49,50,51,52,53)&&!IT(k,41,1)&&y.push({kind:rZ.Bool})):(y.push({kind:rZ.MetricName,metricName:e.sliceDoc(t.from,t.to)},{kind:rZ.Function},{kind:rZ.Aggregation}),38!==k.type.id&&k.type.id!==NP&&y.push({kind:rZ.Number}));break;case 28:t.firstChild||y.push({kind:rZ.MetricName,metricName:""},{kind:rZ.Function},{kind:rZ.Aggregation},{kind:rZ.Number});break;case 33:y.push({kind:rZ.LabelName});break;case 134:y.push({kind:rZ.LabelName,metricName:lZ(t,e)});break;case 36:35===(null===(c=t.parent)||void 0===c?void 0:c.type.id)?y.push({kind:rZ.LabelName}):(null===(f=t.parent)||void 0===f?void 0:f.type.id)===$P&&y.push({kind:rZ.LabelName,metricName:lZ(t,e)});break;case IP:if((null===(d=t.parent)||void 0===d?void 0:d.type.id)===$P){var S="";36===(null===(h=t.parent.firstChild)||void 0===h?void 0:h.type.id)&&(S=e.sliceDoc(t.parent.firstChild.from,t.parent.firstChild.to));var O=lZ(t,e),C=_T(FT(LT(t,FP),FP,$P),e);y.push({kind:rZ.LabelValue,metricName:O,labelName:S,matchers:C})}break;case 125:0===(null===(p=t.parent)||void 0===p?void 0:p.type.id)&&(null===(v=t.parent.parent)||void 0===v?void 0:v.type.id)===zP?y.push({kind:rZ.Duration}):y.push({kind:rZ.Number});break;case 124:case LP:y.push({kind:rZ.Duration});break;case 37:y.push({kind:rZ.MetricName,metricName:""},{kind:rZ.Function},{kind:rZ.Aggregation});break;case 53:137===(null===(m=t.parent)||void 0===m?void 0:m.type.id)?y.push({kind:rZ.MatchOp}):(null===(g=t.parent)||void 0===g?void 0:g.type.id)===_P&&y.push({kind:rZ.BinOp});break;case WP:case 139:case 140:case 137:y.push({kind:rZ.MatchOp});break;case 40:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 22:case 24:case 23:case _P:y.push({kind:rZ.BinOp})}return y}(r,o),s=Promise.resolve([]),l=!1,u=!0,c=oy(a);try{var f=function(){var e=t.value;switch(e.kind){case rZ.Aggregation:l=!0,s=s.then((function(e){return e.concat(sZ.aggregateOp)}));break;case rZ.Function:l=!0,s=s.then((function(e){return e.concat(sZ.functionIdentifier)}));break;case rZ.BinOpModifier:s=s.then((function(e){return e.concat(sZ.binOpModifier)}));break;case rZ.BinOp:s=s.then((function(e){return e.concat(sZ.binOp)}));break;case rZ.MatchOp:s=s.then((function(e){return e.concat(sZ.matchOp)}));break;case rZ.AggregateOpModifier:s=s.then((function(e){return e.concat(sZ.aggregateOpModifier)}));break;case rZ.Duration:u=!1,s=s.then((function(e){return e.concat(sZ.duration)}));break;case rZ.Offset:s=s.then((function(e){return e.concat([{label:"offset"}])}));break;case rZ.Bool:s=s.then((function(e){return e.concat([{label:"bool"}])}));break;case rZ.AtModifiers:s=s.then((function(e){return e.concat(sZ.atModifier)}));break;case rZ.Number:s=s.then((function(e){return e.concat(sZ.number)}));break;case rZ.MetricName:s=s.then((function(t){return n.autocompleteMetricName(t,e)}));break;case rZ.LabelName:s=s.then((function(t){return n.autocompleteLabelName(t,e)}));break;case rZ.LabelValue:s=s.then((function(t){return n.autocompleteLabelValue(t,e)}))}};for(c.s();!(t=c.n()).done;)f()}catch(d){c.e(d)}finally{c.f()}return s.then((function(e){return function(e,t,n){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=e;return arguments.length>3&&void 0!==arguments[3]&&arguments[3]&&i.push.apply(i,(0,me.Z)(aZ)),{from:t,to:n,options:i,span:r?/^[a-zA-Z0-9_:]+$/:void 0}}(e,function(e,t){var n,r,i,o,a,s,l=e.from;return 134===e.type.id||33===e.type.id?l=function(e,t){var n=e.from+1;return null!==e.firstChild&&(n=t),n}(e,t):37===e.type.id||e.type.id===IP&&(null===(n=e.parent)||void 0===n?void 0:n.type.id)===$P?l++:(e.type.id===LP||125===e.type.id&&0===(null===(r=e.parent)||void 0===r?void 0:r.type.id)&&(null===(i=e.parent.parent)||void 0===i?void 0:i.type.id)===zP||0===e.type.id&&((null===(o=e.parent)||void 0===o?void 0:o.type.id)===LP||(null===(a=e.parent)||void 0===a?void 0:a.type.id)===NP||(null===(s=e.parent)||void 0===s?void 0:s.type.id)===zP&&zT(e.parent,124)))&&(l=t),l}(o,i),i,l,u)}))}},{key:"autocompleteMetricName",value:function(e,t){var n=this;if(!this.prometheusClient)return e;var i=new Map;return this.prometheusClient.metricNames(t.metricName).then((function(e){var t,r,o=oy(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;i.set(a,{label:a,type:"constant"})}}catch(s){o.e(s)}finally{o.f()}if(e.length<=n.maxMetricsMetadata)return null===(t=n.prometheusClient)||void 0===t?void 0:t.metricMetadata()})).then((function(t){if(t){var n,o=oy(i);try{for(o.s();!(n=o.n()).done;){var a=(0,r.Z)(n.value,2),s=a[0],l=a[1],u=t[s.replace(/(_count|_sum|_bucket)$/,"")];if(u)if(u.length>1){var c,f=oy(u);try{for(f.s();!(c=f.n()).done;){var d=c.value;""===l.detail?l.detail=d.type:l.detail!==d.type&&(l.detail="unknown",l.info="multiple different definitions for this metric"),""===l.info?l.info=d.help:l.info!==d.help&&(l.info="multiple different definitions for this metric")}}catch(m){f.e(m)}finally{f.f()}}else if(1===u.length){var h=u[0],p=h.type,v=h.help;"histogram"!==p&&"summary"!==p||(s.endsWith("_count")&&(p="counter",v="The total number of observations for: ".concat(v)),s.endsWith("_sum")&&(p="counter",v="The total sum of observations for: ".concat(v)),s.endsWith("_bucket")&&(p="counter",v="The total count of observations for a bucket in the histogram: ".concat(v))),l.detail=p,l.info=v}}}catch(m){o.e(m)}finally{o.f()}}return e.concat(Array.from(i.values()))}))}},{key:"autocompleteLabelName",value:function(e,t){return this.prometheusClient?this.prometheusClient.labelNames(t.metricName).then((function(t){return e.concat(t.map((function(e){return{label:e,type:"constant"}})))})):e}},{key:"autocompleteLabelValue",value:function(e,t){return this.prometheusClient&&t.labelName?this.prometheusClient.labelValues(t.labelName,t.metricName,t.matchers).then((function(t){return e.concat(t.map((function(e){return{label:e,type:"text"}})))})):e}}]),e}(),cZ=n(2985),fZ=n.n(cZ),dZ=400,hZ=422,pZ=503,vZ=function(){function e(t){wu(this,e),this.lookbackInterval=432e5,this.httpMethod="POST",this.apiPrefix="/api/v1",this.fetchFn=function(e,t){return fetch(e,t)},this.url=t.url,this.errorHandler=t.httpErrorHandler,t.lookbackInterval&&(this.lookbackInterval=t.lookbackInterval),t.fetchFn&&(this.fetchFn=t.fetchFn),t.httpMethod&&(this.httpMethod=t.httpMethod),t.apiPrefix&&(this.apiPrefix=t.apiPrefix)}return Su(e,[{key:"labelNames",value:function(e){var t=this,n=new Date,i=new Date(n.getTime()-this.lookbackInterval);if(void 0===e||""===e){var o=this.buildRequest(this.labelsEndpoint(),new URLSearchParams({start:i.toISOString(),end:n.toISOString()}));return this.fetchAPI(o.uri,{method:this.httpMethod,body:o.body}).catch((function(e){return t.errorHandler&&t.errorHandler(e),[]}))}return this.series(e).then((function(e){var t,n=new Set,i=oy(e);try{for(i.s();!(t=i.n()).done;)for(var o=t.value,a=0,s=Object.entries(o);a<s.length;a++){var l=(0,r.Z)(s[a],1)[0];"__name__"!==l&&n.add(l)}}catch(u){i.e(u)}finally{i.f()}return Array.from(n)}))}},{key:"labelValues",value:function(e,t,n){var i=this,o=new Date,a=new Date(o.getTime()-this.lookbackInterval);if(!t||0===t.length){var s=new URLSearchParams({start:a.toISOString(),end:o.toISOString()});return this.fetchAPI("".concat(this.labelValuesEndpoint().replace(/:name/gi,e),"?").concat(s)).catch((function(e){return i.errorHandler&&i.errorHandler(e),[]}))}return this.series(t,n,e).then((function(t){var n,i=new Set,o=oy(t);try{for(o.s();!(n=o.n()).done;)for(var a=n.value,s=0,l=Object.entries(a);s<l.length;s++){var u=(0,r.Z)(l[s],2),c=u[0],f=u[1];"__name__"!==c&&(c===e&&i.add(f))}}catch(d){o.e(d)}finally{o.f()}return Array.from(i)}))}},{key:"metricMetadata",value:function(){var e=this;return this.fetchAPI(this.metricMetadataEndpoint()).catch((function(t){return e.errorHandler&&e.errorHandler(t),{}}))}},{key:"series",value:function(e,t,n){var r=this,i=new Date,o=new Date(i.getTime()-this.lookbackInterval),a=this.buildRequest(this.seriesEndpoint(),new URLSearchParams({start:o.toISOString(),end:i.toISOString(),"match[]":NT(e,t,n)}));return this.fetchAPI(a.uri,{method:this.httpMethod,body:a.body}).catch((function(e){return r.errorHandler&&r.errorHandler(e),[]}))}},{key:"metricNames",value:function(){return this.labelValues("__name__")}},{key:"fetchAPI",value:function(e,t){return this.fetchFn(this.url+e,t).then((function(e){if(!e.ok&&![dZ,hZ,pZ].includes(e.status))throw new Error(e.statusText);return e})).then((function(e){return e.json()})).then((function(e){if("error"===e.status)throw new Error(void 0!==e.error?e.error:'missing "error" field in response JSON');if(void 0===e.data)throw new Error('missing "data" field in response JSON');return e.data}))}},{key:"buildRequest",value:function(e,t){var n=e,r=t;return"GET"===this.httpMethod&&(n="".concat(n,"?").concat(t),r=null),{uri:n,body:r}}},{key:"labelsEndpoint",value:function(){return"".concat(this.apiPrefix,"/labels")}},{key:"labelValuesEndpoint",value:function(){return"".concat(this.apiPrefix,"/label/:name/values")}},{key:"seriesEndpoint",value:function(){return"".concat(this.apiPrefix,"/series")}},{key:"metricMetadataEndpoint",value:function(){return"".concat(this.apiPrefix,"/metadata")}}]),e}(),mZ=function(){function e(t){wu(this,e);var n=t&&t.maxAge?t.maxAge:3e5;this.completeAssociation=new(fZ())(n),this.metricMetadata={},this.labelValues=new(fZ())(n),this.labelNames=[],(null===t||void 0===t?void 0:t.initialMetricList)&&this.setLabelValues("__name__",t.initialMetricList)}return Su(e,[{key:"setAssociations",value:function(e,t){var n=this;t.forEach((function(t){var i=n.completeAssociation.get(e);i||(i=new Map,n.completeAssociation.set(e,i));for(var o=0,a=Object.entries(t);o<a.length;o++){var s=(0,r.Z)(a[o],2),l=s[0],u=s[1];if("__name__"!==l){var c=i.get(l);void 0===c?i.set(l,new Set([u])):c.add(u)}}}))}},{key:"setMetricMetadata",value:function(e){this.metricMetadata=e}},{key:"getMetricMetadata",value:function(){return this.metricMetadata}},{key:"setLabelNames",value:function(e){this.labelNames=e}},{key:"getLabelNames",value:function(e){if(!e||0===e.length)return this.labelNames;var t=this.completeAssociation.get(e);return t?Array.from(t.keys()):[]}},{key:"setLabelValues",value:function(e,t){this.labelValues.set(e,t)}},{key:"getLabelValues",value:function(e,t){if(!t||0===t.length){var n=this.labelValues.get(e);return n||[]}var r=this.completeAssociation.get(t);if(r){var i=r.get(e);return i?Array.from(i):[]}return[]}}]),e}(),gZ=function(){function e(t,n){wu(this,e),this.client=t,this.cache=new mZ(n)}return Su(e,[{key:"labelNames",value:function(e){var t=this,n=this.cache.getLabelNames(e);return n&&n.length>0?Promise.resolve(n):void 0===e||""===e?this.client.labelNames().then((function(e){return t.cache.setLabelNames(e),e})):this.series(e).then((function(){return t.cache.getLabelNames(e)}))}},{key:"labelValues",value:function(e,t){var n=this,r=this.cache.getLabelValues(e,t);return r&&r.length>0?Promise.resolve(r):void 0===t||""===t?this.client.labelValues(e).then((function(t){return n.cache.setLabelValues(e,t),t})):this.series(t).then((function(){return n.cache.getLabelValues(e,t)}))}},{key:"metricMetadata",value:function(){var e=this,t=this.cache.getMetricMetadata();return t&&Object.keys(t).length>0?Promise.resolve(t):this.client.metricMetadata().then((function(t){return e.cache.setMetricMetadata(t),e.cache.getMetricMetadata()}))}},{key:"series",value:function(e){var t=this;return this.client.series(e).then((function(n){return t.cache.setAssociations(e,n),n}))}},{key:"metricNames",value:function(){return this.labelValues("__name__")}}]),e}();function yZ(e){return(null===e||void 0===e?void 0:e.completeStrategy)?e.completeStrategy:(null===e||void 0===e?void 0:e.remote)?void 0===e.remote.url?new uZ(e.remote,e.maxMetricsMetadata):new uZ(new gZ(new vZ(e.remote),e.remote.cache),e.maxMetricsMetadata):new uZ}var bZ=Ky.define({combine:function(e){var t,n,r,i=oy(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;t=t||o.topContainer,n=n||o.bottomContainer}}catch(a){i.e(a)}finally{i.f()}return{topContainer:t,bottomContainer:n}}});function xZ(e,t){var n=e.plugin(wZ),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}var wZ=Xw.fromClass(function(){function e(t){wu(this,e),this.input=t.state.facet(CZ),this.specs=this.input.filter((function(e){return e})),this.panels=this.specs.map((function(e){return e(t)}));var n=t.state.facet(bZ);this.top=new kZ(t,!0,n.topContainer),this.bottom=new kZ(t,!1,n.bottomContainer),this.top.sync(this.panels.filter((function(e){return e.top}))),this.bottom.sync(this.panels.filter((function(e){return!e.top})));var r,i=oy(this.panels);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(a){i.e(a)}finally{i.f()}}return Su(e,[{key:"update",value:function(e){var t=e.state.facet(bZ);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new kZ(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new kZ(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var n=e.state.facet(CZ);if(n!=this.input){var r,i=n.filter((function(e){return e})),o=[],a=[],s=[],l=[],u=oy(i);try{for(u.s();!(r=u.n()).done;){var c=r.value,f=this.specs.indexOf(c),d=void 0;f<0?(d=c(e.view),l.push(d)):(d=this.panels[f]).update&&d.update(e),o.push(d),(d.top?a:s).push(d)}}catch(b){u.e(b)}finally{u.f()}this.specs=i,this.panels=o,this.top.sync(a),this.bottom.sync(s);for(var h=0,p=l;h<p.length;h++){var v=p[h];v.dom.classList.add("cm-panel"),v.mount&&v.mount()}}else{var m,g=oy(this.panels);try{for(g.s();!(m=g.n()).done;){var y=m.value;y.update&&y.update(e)}}catch(b){g.e(b)}finally{g.f()}}}},{key:"destroy",value:function(){this.top.sync([]),this.bottom.sync([])}}]),e}(),{provide:qw.scrollMargins.from((function(e){return{top:e.top.scrollMargin(),bottom:e.bottom.scrollMargin()}}))}),kZ=function(){function e(t,n,r){wu(this,e),this.view=t,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}return Su(e,[{key:"sync",value:function(e){this.panels=e,this.syncDOM()}},{key:"syncDOM",value:function(){if(0!=this.panels.length){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";var e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}var t,n=this.dom.firstChild,r=oy(this.panels);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i.dom.parentNode==this.dom){for(;n!=i.dom;)n=SZ(n);n=n.nextSibling}else this.dom.insertBefore(i.dom,n)}}catch(o){r.e(o)}finally{r.f()}for(;n;)n=SZ(n)}else this.dom&&(this.dom.remove(),this.dom=void 0)}},{key:"scrollMargin",value:function(){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)}},{key:"syncClasses",value:function(){if(this.container&&this.classes!=this.view.themeClasses){var e,t=oy(this.classes.split(" "));try{for(t.s();!(e=t.n()).done;){var n=e.value;n&&this.container.classList.remove(n)}}catch(a){t.e(a)}finally{t.f()}var r,i=oy((this.classes=this.view.themeClasses).split(" "));try{for(i.s();!(r=i.n()).done;){var o=r.value;o&&this.container.classList.add(o)}}catch(a){i.e(a)}finally{i.f()}}}}]),e}();function SZ(e){var t=e.nextSibling;return e.remove(),t}var OZ=tO.baseTheme({".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"}}),CZ=Ky.define({enables:[wZ,OZ]});function MZ(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;t<arguments.length;t++)PZ(e,arguments[t]);return e}function PZ(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var n=0;n<t.length;n++)PZ(e,t[n])}}var TZ=Su((function e(t,n,r){wu(this,e),this.from=t,this.to=n,this.diagnostic=r})),EZ=function(){function e(t,n,r){wu(this,e),this.diagnostics=t,this.panel=n,this.selected=r}return Su(e,null,[{key:"init",value:function(t,n,r){var i=ww.set(t.map((function(e){return e.from==e.to||e.from==e.to-1&&r.doc.lineAt(e.from).to==e.from?ww.widget({widget:new HZ(e),diagnostic:e}).range(e.from):ww.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity},diagnostic:e}).range(e.from,e.to)})),!0);return new e(i,n,ZZ(i))}}]),e}();function ZZ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=null;return e.between(n,1e9,(function(e,n,i){var o=i.spec;if(!t||o.diagnostic==t)return r=new TZ(e,n,o.diagnostic),!1})),r}function AZ(e,t,n){return e.field(_Z,!1)?t:t.concat(Pb.appendConfig.of([_Z.init(n),tO.decorations.compute([_Z],(function(e){var t=e.field(_Z),n=t.selected,r=t.panel;return n&&r&&n.from!=n.to?ww.set([NZ.range(n.from,n.to)]):ww.none})),iE(LZ),XZ]))}var RZ=Pb.define(),DZ=Pb.define(),jZ=Pb.define(),_Z=nb.define({create:function(){return new EZ(ww.none,null,null)},update:function(e,t){if(t.docChanged){var n=e.diagnostics.map(t.changes),r=null;if(e.selected){var i=t.changes.mapPos(e.selected.from,1);r=ZZ(n,e.selected.diagnostic,i)||ZZ(n,null,i)}e=new EZ(n,e.panel,r)}var o,a=oy(t.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.is(RZ)?e=EZ.init(s.value,e.panel,t.state):s.is(DZ)?e=new EZ(e.diagnostics,s.value?qZ.open:null,e.selected):s.is(jZ)&&(e=new EZ(e.diagnostics,e.panel,s.value))}}catch(l){a.e(l)}finally{a.f()}return e},provide:function(e){return[CZ.from(e,(function(e){return e.panel})),tO.decorations.from(e,(function(e){return e.diagnostics}))]}});var NZ=ww.mark({class:"cm-lintRange cm-lintRange-active"});function LZ(e,t,n){var r=e.state.field(_Z).diagnostics,i=[],o=2e8,a=0;return r.between(t-(n<0?1:0),t+(n>0?1:0),(function(e,r,s){var l=s.spec;t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0))&&(i.push(l.diagnostic),o=Math.min(e,o),a=Math.max(r,a))})),i.length?{pos:o,end:a,above:e.state.doc.lineAt(o).to<a,create:function(){return{dom:MZ("ul",{class:"cm-tooltip-lint"},i.map((function(t){return WZ(e,t,!1)})))}}}:null}var IZ=function(e){var t=e.state.field(_Z,!1);return!(!t||!t.panel)&&(e.dispatch({effects:DZ.of(!1)}),!0)},zZ=[{key:"Mod-Shift-m",run:function(e){var t=e.state.field(_Z,!1);t&&t.panel||e.dispatch({effects:AZ(e.state,[DZ.of(!0)],(function(){return EZ.init([],qZ.open,e.state)}))});var n=xZ(e,qZ.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0}},{key:"F8",run:function(e){var t=e.state.field(_Z,!1);if(!t)return!1;var n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(!(r=t.diagnostics.iter(0)).value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],BZ=Xw.fromClass(function(){function e(t){wu(this,e),this.view=t,this.timeout=-1,this.set=!0;var n=t.state.facet(FZ).delay;this.lintTime=Date.now()+n,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,n)}return Su(e,[{key:"run",value:function(){var e=this,t=Date.now();if(t<this.lintTime-10)setTimeout(this.run,this.lintTime-t);else{this.set=!1;var n=this.view.state,r=n.facet(FZ).sources;Promise.all(r.map((function(t){return Promise.resolve(t(e.view))}))).then((function(t){var r,i,o=t.reduce((function(e,t){return e.concat(t)}));e.view.state.doc==n.doc&&(o.length||(null===(i=null===(r=e.view.state.field(_Z,!1))||void 0===r?void 0:r.diagnostics)||void 0===i?void 0:i.size))&&e.view.dispatch(function(e,t){return{effects:AZ(e,[RZ.of(t)],(function(){return EZ.init(t,null,e)}))}}(e.view.state,o))}),(function(t){Ww(e.view.state,t)}))}}},{key:"update",value:function(e){var t=e.state.facet(FZ);(e.docChanged||t!=e.startState.facet(FZ))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}},{key:"force",value:function(){this.set&&(this.lintTime=Date.now(),this.run())}},{key:"destroy",value:function(){clearTimeout(this.timeout)}}]),e}()),FZ=Ky.define({combine:function(e){return{sources:e.map((function(e){return e.source})),delay:e.length?Math.max.apply(Math,(0,me.Z)(e.map((function(e){return e.delay})))):750}},enables:BZ});function $Z(e){var t=[];if(e){var n,r=oy(e);try{e:for(r.s();!(n=r.n()).done;){for(var i=n.value.name,o=function(e){var n=i[e];if(/[a-zA-Z]/.test(n)&&!t.some((function(e){return e.toLowerCase()==n.toLowerCase()})))return t.push(n),"continue|actions"},a=0;a<i.length;a++){if("continue|actions"===o(a))continue e}t.push("")}}catch(s){r.e(s)}finally{r.f()}}return t}function WZ(e,t,n){var r,i=n?$Z(t.actions):[];return MZ("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},MZ("span",{class:"cm-diagnosticText"},t.message),null===(r=t.actions)||void 0===r?void 0:r.map((function(n,r){var o=function(r){r.preventDefault();var i=ZZ(e.state.field(_Z).diagnostics,t);i&&n.apply(e,i.from,i.to)},a=n.name,s=i[r]?a.indexOf(i[r]):-1,l=s<0?a:[a.slice(0,s),MZ("u",a.slice(s,s+1)),a.slice(s+1)];return MZ("button",{type:"button",class:"cm-diagnosticAction",onclick:o,onmousedown:o,"aria-label":" Action: ".concat(a).concat(s<0?"":' (access key "'.concat(i[r],')"'),".")},l)})),t.source&&MZ("div",{class:"cm-diagnosticSource"},t.source))}var HZ=function(e){ay(n,e);var t=cy(n);function n(e){var r;return wu(this,n),(r=t.call(this)).diagnostic=e,r}return Su(n,[{key:"eq",value:function(e){return e.diagnostic==this.diagnostic}},{key:"toDOM",value:function(){return MZ("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}]),n}(bw),VZ=Su((function e(t,n){wu(this,e),this.diagnostic=n,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=WZ(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")})),qZ=function(){function e(t){var n=this;wu(this,e),this.view=t,this.items=[];this.list=MZ("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:function(e){if(27==e.keyCode)IZ(n.view),n.view.focus();else if(38==e.keyCode||33==e.keyCode)n.moveSelection((n.selectedIndex-1+n.items.length)%n.items.length);else if(40==e.keyCode||34==e.keyCode)n.moveSelection((n.selectedIndex+1)%n.items.length);else if(36==e.keyCode)n.moveSelection(0);else if(35==e.keyCode)n.moveSelection(n.items.length-1);else if(13==e.keyCode)n.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&n.selectedIndex>=0))return;for(var r=n.items[n.selectedIndex].diagnostic,i=$Z(r.actions),o=0;o<i.length;o++)if(i[o].toUpperCase().charCodeAt(0)==e.keyCode){var a=ZZ(n.view.state.field(_Z).diagnostics,r);a&&r.actions[o].apply(t,a.from,a.to)}}e.preventDefault()},onclick:function(e){for(var t=0;t<n.items.length;t++)n.items[t].dom.contains(e.target)&&n.moveSelection(t)}}),this.dom=MZ("div",{class:"cm-panel-lint"},this.list,MZ("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:function(){return IZ(n.view)}},"\xd7")),this.update()}return Su(e,[{key:"selectedIndex",get:function(){var e=this.view.state.field(_Z).selected;if(!e)return-1;for(var t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}},{key:"update",value:function(){var e=this,t=this.view.state.field(_Z),n=t.diagnostics,r=t.selected,i=0,o=!1,a=null;for(n.between(0,this.view.state.doc.length,(function(t,n,s){for(var l,u=s.spec,c=-1,f=i;f<e.items.length;f++)if(e.items[f].diagnostic==u.diagnostic){c=f;break}c<0?(l=new VZ(e.view,u.diagnostic),e.items.splice(i,0,l),o=!0):(l=e.items[c],c>i&&(e.items.splice(i,c-i),o=!0)),r&&l.diagnostic==r.diagnostic?l.dom.hasAttribute("aria-selected")||(l.dom.setAttribute("aria-selected","true"),a=l):l.dom.hasAttribute("aria-selected")&&l.dom.removeAttribute("aria-selected"),i++}));i<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)o=!0,this.items.pop();0==this.items.length&&(this.items.push(new VZ(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),o=!0),a?(this.list.setAttribute("aria-activedescendant",a.id),this.view.requestMeasure({key:this,read:function(){return{sel:a.dom.getBoundingClientRect(),panel:e.list.getBoundingClientRect()}},write:function(t){var n=t.sel,r=t.panel;n.top<r.top?e.list.scrollTop-=r.top-n.top:n.bottom>r.bottom&&(e.list.scrollTop+=n.bottom-r.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}},{key:"sync",value:function(){var e=this.list.firstChild;function t(){var t=e;e=t.nextSibling,t.remove()}var n,r=oy(this.items);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e)}}catch(o){r.e(o)}finally{r.f()}for(;e;)t()}},{key:"moveSelection",value:function(e){if(!(this.selectedIndex<0)){var t=ZZ(this.view.state.field(_Z).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:jZ.of(t)})}}}],[{key:"open",value:function(t){return new e(t)}}]),e}();function UZ(e){if("function"!=typeof btoa)return"none";var t='<svg xmlns="http://www.w3.org/2000/svg" width="6" height="3">\n <path d="m0 3 l2 -2 l1 0 l2 2 l1 0" stroke="'.concat(e,'" fill="none" stroke-width=".7"/>\n </svg>');return"url('data:image/svg+xml;base64,".concat(btoa(t),"')")}var QZ,XZ=tO.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-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x"},".cm-lintRange-error":{backgroundImage:UZ("#d11")},".cm-lintRange-warning":{backgroundImage:UZ("orange")},".cm-lintRange-info":{backgroundImage:UZ("#999")},".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-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}}}),YZ=function(){function e(){wu(this,e)}return Su(e,[{key:"promQL",value:function(){return function(e){var t=new VT(e.state);return t.analyze(),t.getDiagnostics()}}}]),e}();function GZ(e,t){return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return FZ.of({source:e,delay:null!==(t=n.delay)&&void 0!==t?t:750})}(e.call(t))}function KZ(e){return OC.define({parser:UP.configure({top:e,props:[JP({LineComment:ET.comment,LabelName:ET.labelName,StringLiteral:ET.string,NumberLiteral:ET.number,Duration:ET.number,"Abs Absent AbsentOverTime Acos Acosh Asin Asinh Atan Atanh AvgOverTime Ceil Changes Clamp ClampMax ClampMin Cos Cosh CountOverTime DaysInMonth DayOfMonth DayOfWeek Deg Delta Deriv Exp Floor HistogramQuantile HoltWinters Hour Idelta Increase Irate LabelReplace LabelJoin LastOverTime Ln Log10 Log2 MaxOverTime MinOverTime Minute Month Pi PredictLinear PresentOverTime QuantileOverTime Rad Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc Sqrt StddevOverTime StdvarOverTime SumOverTime Tan Tanh Time Timestamp Vector Year":ET.function(ET.variableName),"Avg Bottomk Count Count_values Group Max Min Quantile Stddev Stdvar Sum Topk":ET.operatorKeyword,"By Without Bool On Ignoring GroupLeft GroupRight Offset Start End":ET.modifier,"And Unless Or":ET.logicOperator,"Sub Add Mul Mod Div Atan2 Eql Neq Lte Lss Gte Gtr EqlRegex EqlSingle NeqRegex Pow At":ET.operator,UnaryOp:ET.arithmeticOperator,"( )":ET.paren,"[ ]":ET.squareBracket,"{ }":ET.brace,"\u26a0":ET.invalid})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}})}!function(e){e.PromQL="PromQL",e.MetricName="MetricName"}(QZ||(QZ={}));var JZ=function(){function e(){wu(this,e),this.complete=yZ(),this.lint=new YZ,this.enableLinter=!0,this.enableCompletion=!0}return Su(e,[{key:"setComplete",value:function(e){return this.complete=yZ(e),this}},{key:"getComplete",value:function(){return this.complete}},{key:"activateCompletion",value:function(e){return this.enableCompletion=e,this}},{key:"setLinter",value:function(e){return this.lint=e,this}},{key:"getLinter",value:function(){return this.lint}},{key:"activateLinter",value:function(e){return this.enableLinter=e,this}},{key:"asExtension",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:QZ.PromQL,n=KZ(t),r=[n];if(this.enableCompletion){var i=n.data.of({autocomplete:function(t){return e.complete.promQL(t)}});r=r.concat(i)}return this.enableLinter&&(r=r.concat(GZ(this.lint.promQL,this.lint))),r}}]),e}(),eA=Ob.define(),tA=Ob.define(),nA=Ky.define(),rA=Ky.define({combine:function(e){return Bb(e,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}}),iA=nb.define({create:function(){return bA.empty},update:function(e,t){var n=t.state.facet(rA),r=t.annotation(eA);if(r){var i=fA.fromTransaction(t),o=r.side,a=0==o?e.undone:e.done;return a=i?dA(a,a.length,n.minDepth,i):vA(a,t.startState.selection),new bA(0==o?r.rest:a,0==o?a:r.rest)}var s=t.annotation(tA);if("full"!=s&&"before"!=s||(e=e.isolate()),!1===t.annotation(Tb.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);var l=fA.fromTransaction(t),u=t.annotation(Tb.time),c=t.annotation(Tb.userEvent);return l?e=e.addChanges(l,u,c,n.newGroupDelay,n.minDepth):t.selection&&(e=e.addSelection(t.startState.selection,u,c,n.newGroupDelay)),"full"!=s&&"after"!=s||(e=e.isolate()),e},toJSON:function(e){return{done:e.done.map((function(e){return e.toJSON()})),undone:e.undone.map((function(e){return e.toJSON()}))}},fromJSON:function(e){return new bA(e.done.map(fA.fromJSON),e.undone.map(fA.fromJSON))}});function oA(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[iA,rA.of(e),tO.domEventHandlers({beforeinput:function(e,t){return"historyUndo"==e.inputType?sA(t):"historyRedo"==e.inputType&&lA(t)}})]}function aA(e,t){return function(n){var r=n.state,i=n.dispatch,o=r.field(iA,!1);if(!o)return!1;var a=o.pop(e,r,t);return!!a&&(i(a),!0)}}var sA=aA(0,!1),lA=aA(1,!1),uA=aA(0,!0),cA=aA(1,!0);var fA=function(){function e(t,n,r,i,o){wu(this,e),this.changes=t,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}return Su(e,[{key:"setSelAfter",value:function(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}},{key:"toJSON",value:function(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((function(e){return e.toJSON()}))}}}],[{key:"fromJSON",value:function(t){return new e(t.changes&&By.fromJSON(t.changes),[],t.mapped&&zy.fromJSON(t.mapped),t.startSelection&&Qy.fromJSON(t.startSelection),t.selectionsAfter.map(Qy.fromJSON))}},{key:"fromTransaction",value:function(t){var n,r=pA,i=oy(t.startState.facet(nA));try{for(i.s();!(n=i.n()).done;){var o=(0,n.value)(t);o.length&&(r=r.concat(o))}}catch(a){i.e(a)}finally{i.f()}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,t.startState.selection,pA)}},{key:"selection",value:function(t){return new e(void 0,pA,void 0,void 0,t)}}]),e}();function dA(e,t,n,r){var i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}function hA(e,t){return e.length?t.length?e.concat(t):e:t}var pA=[];function vA(e,t){if(e.length){var n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),dA(e,e.length-1,1e9,n.setSelAfter(r)))}return[fA.selection([t])]}function mA(e){var t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function gA(e,t){if(!e.length)return e;for(var n=e.length,r=pA;n;){var i=yA(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){var o=e.slice(0,n);return o[n-1]=i,o}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[fA.selection(r)]:pA}function yA(e,t,n){var r=hA(e.selectionsAfter.length?e.selectionsAfter.map((function(e){return e.map(t)})):pA,n);if(!e.changes)return fA.selection(r);var i=e.changes.map(t),o=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(o):o;return new fA(i,Pb.mapEffects(e.effects,t),a,e.startSelection.map(o),r)}var bA=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;wu(this,e),this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=i}return Su(e,[{key:"isolate",value:function(){return this.prevTime?new e(this.done,this.undone):this}},{key:"addChanges",value:function(t,n,r,i,o){var a=this.done,s=a[a.length-1];return a=s&&s.changes&&!s.changes.empty&&t.changes&&(!s.selectionsAfter.length&&n-this.prevTime<i&&function(e,t){var n=[],r=!1;return e.iterChangedRanges((function(e,t){return n.push(e,t)})),t.iterChangedRanges((function(e,t,i,o){for(var a=0;a<n.length;){var s=n[a++],l=n[a++];o>=s&&i<=l&&(r=!0)}})),r}(s.changes,t.changes)||"input.type.compose"==r)?dA(a,a.length-1,o,new fA(t.changes.compose(s.changes),hA(t.effects,s.effects),s.mapped,s.startSelection,pA)):dA(a,a.length,o,t),new e(a,pA,n,r)}},{key:"addSelection",value:function(t,n,r,i){var o,a,s=this.done.length?this.done[this.done.length-1].selectionsAfter:pA;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&(o=s[s.length-1],a=t,o.ranges.length==a.ranges.length&&0===o.ranges.filter((function(e,t){return e.empty!=a.ranges[t].empty})).length)?this:new e(vA(this.done,t),this.undone,n,r)}},{key:"addMapping",value:function(t){return new e(gA(this.done,t),gA(this.undone,t),this.prevTime,this.prevUserEvent)}},{key:"pop",value:function(e,t,n){var r=0==e?this.done:this.undone;if(0==r.length)return null;var i=r[r.length-1];if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:eA.of({side:e,rest:mA(r)}),userEvent:0==e?"select.undo":"select.redo"});if(i.changes){var o=1==r.length?pA:r.slice(0,r.length-1);return i.mapped&&(o=gA(o,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:eA.of({side:e,rest:o}),filter:!1,userEvent:0==e?"undo":"redo"})}return null}}]),e}();bA.empty=new bA(pA,pA);var xA=[{key:"Mod-z",run:sA,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:lA,preventDefault:!0},{key:"Mod-u",run:uA,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:cA,preventDefault:!0}],wA=function(e){ay(n,e);var t=cy(n);function n(){return wu(this,n),t.apply(this,arguments)}return Su(n,[{key:"compare",value:function(e){return this==e||this.constructor==e.constructor&&this.eq(e)}},{key:"eq",value:function(e){return!1}}]),n}(Ub);wA.prototype.elementClass="",wA.prototype.toDOM=void 0,wA.prototype.mapMode=Iy.TrackBefore,wA.prototype.startSide=wA.prototype.endSide=-1,wA.prototype.point=!0;var kA=Ky.define(),SA={class:"",renderEmptyElements:!1,elementStyle:"",markers:function(){return Gb.empty},lineMarker:function(){return null},initialSpacer:null,updateSpacer:null,domEventHandlers:{}},OA=Ky.define();function CA(e){return[TA(),OA.of(Object.assign(Object.assign({},SA),e))]}var MA=tO.baseTheme({".cm-gutters":{display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#999",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"}}),PA=Ky.define({combine:function(e){return e.some((function(e){return e}))}});function TA(e){var t=[EA,MA];return e&&!1===e.fixed&&t.push(PA.of(!0)),t}var EA=Xw.fromClass(function(){function e(t){wu(this,e),this.view=t,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.gutters=t.state.facet(OA).map((function(e){return new DA(t,e)}));var n,r=oy(this.gutters);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.dom.appendChild(i.dom)}}catch(o){r.e(o)}finally{r.f()}this.fixed=!t.state.facet(PA),this.fixed&&(this.dom.style.position="sticky"),t.scrollDOM.insertBefore(this.dom,t.contentDOM),this.syncGutters()}return Su(e,[{key:"update",value:function(e){this.updateGutters(e)&&this.syncGutters()}},{key:"syncGutters",value:function(){var e=this,t=Gb.iter(this.view.state.facet(kA),this.view.viewport.from),n=[],r=this.gutters.map((function(t){return new RA(t,e.view.viewport)}));this.view.viewportLines((function(i){var o;if(Array.isArray(i.type)){var a,s=oy(i.type);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(l.type==xw.Text){o=l;break}}}catch(f){s.e(f)}finally{s.f()}}else o=i.type==xw.Text?i:void 0;if(o){n.length&&(n=[]),AA(t,n,i.from);var u,c=oy(r);try{for(c.s();!(u=c.n()).done;){u.value.line(e.view,o,n)}}catch(f){c.e(f)}finally{c.f()}}}),0);var i,o=oy(r);try{for(o.s();!(i=o.n()).done;){i.value.finish()}}catch(a){o.e(a)}finally{o.f()}this.dom.style.minHeight=this.view.contentHeight+"px",this.view.state.facet(PA)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"")}},{key:"updateGutters",value:function(e){var t=e.startState.facet(OA),n=e.state.facet(OA),r=e.docChanged||e.heightChanged||e.viewportChanged||!Gb.eq(e.startState.facet(kA),e.state.facet(kA),e.view.viewport.from,e.view.viewport.to);if(t==n){var i,o=oy(this.gutters);try{for(o.s();!(i=o.n()).done;){i.value.update(e)&&(r=!0)}}catch(m){o.e(m)}finally{o.f()}}else{r=!0;var a,s=[],l=oy(n);try{for(l.s();!(a=l.n()).done;){var u=a.value,c=t.indexOf(u);c<0?s.push(new DA(this.view,u)):(this.gutters[c].update(e),s.push(this.gutters[c]))}}catch(m){l.e(m)}finally{l.f()}var f,d=oy(this.gutters);try{for(d.s();!(f=d.n()).done;){f.value.dom.remove()}}catch(m){d.e(m)}finally{d.f()}for(var h=0,p=s;h<p.length;h++){var v=p[h];this.dom.appendChild(v.dom)}this.gutters=s}return r}},{key:"destroy",value:function(){this.dom.remove()}}]),e}(),{provide:qw.scrollMargins.from((function(e){return 0!=e.gutters.length&&e.fixed?e.view.textDirection==ik.LTR?{left:e.dom.offsetWidth}:{right:e.dom.offsetWidth}:null}))});function ZA(e){return Array.isArray(e)?e:[e]}function AA(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var RA=function(){function e(t,n){wu(this,e),this.gutter=t,this.localMarkers=[],this.i=0,this.height=0,this.cursor=Gb.iter(t.markers,n.from)}return Su(e,[{key:"line",value:function(e,t,n){this.localMarkers.length&&(this.localMarkers=[]),AA(this.cursor,this.localMarkers,t.from);var r=n.length?this.localMarkers.concat(n):this.localMarkers,i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);var o=this.gutter;if(0!=r.length||o.config.renderEmptyElements){var a=t.top-this.height;if(this.i==o.elements.length){var s=new jA(e,t.height,a,r);o.elements.push(s),o.dom.appendChild(s.dom)}else{var l=o.elements[this.i];(function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0})(r,l.markers)&&(r=l.markers),l.update(e,t.height,a,r)}this.height=t.bottom,this.i++}}},{key:"finish",value:function(){for(var e=this.gutter;e.elements.length>this.i;)e.dom.removeChild(e.elements.pop().dom)}}]),e}(),DA=function(){function e(t,n){var r=this;wu(this,e),this.view=t,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var i=function(e){r.dom.addEventListener(e,(function(r){var i=t.visualLineAtHeight(r.clientY,t.contentDOM.getBoundingClientRect().top);n.domEventHandlers[e](t,i,r)&&r.preventDefault()}))};for(var o in n.domEventHandlers)i(o);this.markers=ZA(n.markers(t)),n.initialSpacer&&(this.spacer=new jA(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Su(e,[{key:"update",value:function(e){var t=this.markers;if(this.markers=ZA(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){var n=this.config.updateSpacer(this.spacer.markers[0],e);n!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[n])}var r=e.view.viewport;return!Gb.eq(this.markers,t,r.from,r.to)}}]),e}(),jA=function(){function e(t,n,r,i){wu(this,e),this.height=-1,this.above=0,this.dom=document.createElement("div"),this.update(t,n,r,i)}return Su(e,[{key:"update",value:function(e,t,n,r){if(this.height!=t&&(this.dom.style.height=(this.height=t)+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),this.markers!=r){this.markers=r;for(var i;i=this.dom.lastChild;)i.remove();var o,a="cm-gutterElement",s=oy(r);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.toDOM&&this.dom.appendChild(l.toDOM(e));var u=l.elementClass;u&&(a+=" "+u)}}catch(c){s.e(c)}finally{s.f()}this.dom.className=a}}}]),e}();var _A=Ky.define(),NA=Ky.define({combine:function(e){return Bb(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers:function(e,t){var n=Object.assign({},e),r=function(e){var r=n[e],i=t[e];n[e]=r?function(e,t,n){return r(e,t,n)||i(e,t,n)}:i};for(var i in t)r(i);return n}})}}),LA=function(e){ay(n,e);var t=cy(n);function n(e){var r;return wu(this,n),(r=t.call(this)).number=e,r}return Su(n,[{key:"eq",value:function(e){return this.number==e.number}},{key:"toDOM",value:function(e){return document.createTextNode(this.number)}}]),n}(wA);function IA(e,t){return e.state.facet(NA).formatNumber(t,e.state)}var zA=OA.compute([NA],(function(e){return{class:"cm-lineNumbers",renderEmptyElements:!1,markers:function(e){return e.state.facet(_A)},lineMarker:function(e,t,n){return n.some((function(e){return e.toDOM}))?null:new LA(IA(e,e.state.doc.lineAt(t.from).number))},initialSpacer:function(e){return new LA(IA(e,FA(e.state.doc.lines)))},updateSpacer:function(e,t){var n=IA(t.view,FA(t.view.state.doc.lines));return n==e.number?e:new LA(n)},domEventHandlers:e.facet(NA).domEventHandlers}}));function BA(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[NA.of(e),TA(),zA]}function FA(e){for(var t=9;t<e;)t=10*t+9;return t}var $A=new(function(e){ay(n,e);var t=cy(n);function n(){var e;return wu(this,n),(e=t.apply(this,arguments)).elementClass="cm-activeLineGutter",e}return Su(n)}(wA)),WA=kA.compute(["selection"],(function(e){var t,n=[],r=-1,i=oy(e.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(o.empty){var a=e.doc.lineAt(o.head).from;a>r&&(r=a,n.push($A.range(a)))}}}catch(s){i.e(s)}finally{i.f()}return Gb.of(n)}));function HA(){return WA}function VA(e,t){var n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var qA=Pb.define({map:VA}),UA=Pb.define({map:VA});function QA(e){var t,n=[],r=oy(e.state.selection.ranges);try{var i=function(){var r=t.value.head;if(n.some((function(e){return e.from<=r&&e.to>=r})))return"continue";n.push(e.visualLineAt(r))};for(r.s();!(t=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}return n}var XA=nb.define({create:function(){return ww.none},update:function(e,t){e=e.map(t.changes);var n,r=oy(t.effects);try{var i=function(){var t=n.value;t.is(qA)&&!function(e,t,n){var r=!1;return e.between(t,t,(function(e,i){e==t&&i==n&&(r=!0)})),r}(e,t.value.from,t.value.to)?e=e.update({add:[rR.range(t.value.from,t.value.to)]}):t.is(UA)&&(e=e.update({filter:function(e,n){return t.value.from!=e||t.value.to!=n},filterFrom:t.value.from,filterTo:t.value.to}))};for(r.s();!(n=r.n()).done;)i()}catch(s){r.e(s)}finally{r.f()}if(t.selection){var o=!1,a=t.selection.main.head;e.between(a,a,(function(e,t){e<a&&t>a&&(o=!0)})),o&&(e=e.update({filterFrom:a,filterTo:a,filter:function(e,t){return t<=a||e>=a}}))}return e},provide:function(e){return tO.decorations.from(e)}});function YA(e,t,n){var r,i=null;return null===(r=e.field(XA,!1))||void 0===r||r.between(t,n,(function(e,t){(!i||i.from>e)&&(i={from:e,to:t})})),i}function GA(e,t){return e.field(XA,!1)?t:t.concat(Pb.appendConfig.of(nR()))}function KA(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return tO.announce.of("".concat(e.state.phrase(n?"Folded lines":"Unfolded lines")," ").concat(r," ").concat(e.state.phrase("to")," ").concat(i,"."))}var JA=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(e){var t,n=oy(QA(e));try{for(n.s();!(t=n.n()).done;){var r=t.value,i=GC(e.state,r.from,r.to);if(i)return e.dispatch({effects:GA(e.state,[qA.of(i),KA(e,i)])}),!0}}catch(o){n.e(o)}finally{n.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(e){if(!e.state.field(XA,!1))return!1;var t,n=[],r=oy(QA(e));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=YA(e.state,i.from,i.to);o&&n.push(UA.of(o),KA(e,o,!1))}}catch(a){r.e(a)}finally{r.f()}return n.length&&e.dispatch({effects:n}),n.length>0}},{key:"Ctrl-Alt-[",run:function(e){for(var t=e.state,n=[],r=0;r<t.doc.length;){var i=e.visualLineAt(r),o=GC(t,i.from,i.to);o&&n.push(qA.of(o)),r=(o?e.visualLineAt(o.to):i).to+1}return n.length&&e.dispatch({effects:GA(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:function(e){var t=e.state.field(XA,!1);if(!t||!t.size)return!1;var n=[];return t.between(0,e.state.doc.length,(function(e,t){n.push(UA.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],eR={placeholderDOM:null,placeholderText:"\u2026"},tR=Ky.define({combine:function(e){return Bb(e,eR)}});function nR(e){var t=[XA,sR];return e&&t.push(tR.of(e)),t}var rR=ww.replace({widget:new(function(e){ay(n,e);var t=cy(n);function n(){return wu(this,n),t.apply(this,arguments)}return Su(n,[{key:"ignoreEvents",value:function(){return!1}},{key:"toDOM",value:function(e){var t=e.state,n=t.facet(tR),r=function(t){var n=e.visualLineAt(e.posAtDOM(t.target)),r=YA(e.state,n.from,n.to);r&&e.dispatch({effects:UA.of(r)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,r);var i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",t.phrase("folded code")),i.title=t.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=r,i}}]),n}(bw))}),iR={openText:"\u2304",closedText:"\u203a",markerDOM:null},oR=function(e){ay(n,e);var t=cy(n);function n(e,r){var i;return wu(this,n),(i=t.call(this)).config=e,i.open=r,i}return Su(n,[{key:"eq",value:function(e){return this.config==e.config&&this.open==e.open}},{key:"toDOM",value:function(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);var t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}]),n}(wA);function aR(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign(Object.assign({},iR),e),n=new oR(t,!0),r=new oR(t,!1),i=Xw.fromClass(function(){function e(t){wu(this,e),this.from=t.viewport.from,this.markers=this.buildMarkers(t)}return Su(e,[{key:"update",value:function(e){(e.docChanged||e.viewportChanged||e.startState.facet(jC)!=e.state.facet(jC)||e.startState.field(XA,!1)!=e.state.field(XA,!1))&&(this.markers=this.buildMarkers(e.view))}},{key:"buildMarkers",value:function(e){var t=new Jb;return e.viewportLines((function(i){var o=YA(e.state,i.from,i.to)?r:GC(e.state,i.from,i.to)?n:null;o&&t.add(i.from,i.from,o)})),t.finish()}}]),e}());return[i,CA({class:"cm-foldGutter",markers:function(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||Gb.empty},initialSpacer:function(){return new oR(t,!1)},domEventHandlers:{click:function(e,t){var n=YA(e.state,t.from,t.to);if(n)return e.dispatch({effects:UA.of(n)}),!0;var r=GC(e.state,t.from,t.to);return!!r&&(e.dispatch({effects:qA.of(r)}),!0)}}}),nR()]}var sR=tO.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"}}),lR={brackets:["(","[","{","'",'"'],before:")]}'\":;>"},uR=Pb.define({map:function(e,t){var n=t.mapPos(e,-1,Iy.TrackAfter);return null==n?void 0:n}}),cR=Pb.define({map:function(e,t){return t.mapPos(e)}}),fR=new(function(e){ay(n,e);var t=cy(n);function n(){return wu(this,n),t.apply(this,arguments)}return Su(n)}(Ub));fR.startSide=1,fR.endSide=-1;var dR=nb.define({create:function(){return Gb.empty},update:function(e,t){if(t.selection){var n=t.state.doc.lineAt(t.selection.main.head).from,r=t.startState.doc.lineAt(t.startState.selection.main.head).from;n!=t.changes.mapPos(r,-1)&&(e=Gb.empty)}e=e.map(t.changes);var i,o=oy(t.effects);try{var a=function(){var t=i.value;t.is(uR)?e=e.update({add:[fR.range(t.value,t.value+1)]}):t.is(cR)&&(e=e.update({filter:function(e){return e!=t.value}}))};for(o.s();!(i=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}return e}});function hR(){return[tO.inputHandler.of(gR),dR]}var pR="()[]{}<>";function vR(e){for(var t=0;t<pR.length;t+=2)if(pR.charCodeAt(t)==e)return pR.charAt(t+1);return Sy(e<128?e:e+1)}function mR(e,t){return e.languageDataAt("closeBrackets",t)[0]||lR}function gR(e,t,n,r){if(e.composing)return!1;var i=e.state.selection.main;if(r.length>2||2==r.length&&1==Oy(ky(r,0))||t!=i.from||n!=i.to)return!1;var o=function(e,t){var n,r=mR(e,e.selection.main.head),i=r.brackets||lR.brackets,o=oy(i);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=vR(ky(a,0));if(t==a)return s==a?SR(e,a,i.indexOf(a+a+a)>-1):wR(e,a,s,r.before||lR.before);if(t==s&&bR(e,e.selection.main.from))return kR(e,a,s)}}catch(l){o.e(l)}finally{o.f()}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)}var yR=[{key:"Backspace",run:function(e){var t=e.state,n=e.dispatch,r=mR(t,t.selection.main.head).brackets||lR.brackets,i=null,o=t.changeByRange((function(e){if(e.empty){var n,o=function(e,t){var n=e.sliceString(t-2,t);return Oy(ky(n,0))==n.length?n:n.slice(1)}(t.doc,e.head),a=oy(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s==o&&xR(t.doc,e.head)==vR(ky(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:Qy.cursor(e.head-s.length),userEvent:"delete.backward"}}}catch(l){a.e(l)}finally{a.f()}}return{range:i=e}}));return i||n(t.update(o,{scrollIntoView:!0})),!i}}];function bR(e,t){var n=!1;return e.field(dR).between(0,e.doc.length,(function(e){e==t&&(n=!0)})),n}function xR(e,t){var n=e.sliceString(t,t+2);return n.slice(0,Oy(ky(n,0)))}function wR(e,t,n,r){var i=null,o=e.changeByRange((function(o){if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:uR.of(o.to+t.length),range:Qy.range(o.anchor+t.length,o.head+t.length)};var a=xR(e.doc,o.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:o.head},effects:uR.of(o.head+t.length),range:Qy.cursor(o.head+t.length)}:{range:i=o}}));return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function kR(e,t,n){var r=null,i=e.selection.ranges.map((function(t){return t.empty&&xR(e.doc,t.head)==n?Qy.cursor(t.head+n.length):r=t}));return r?null:e.update({selection:Qy.create(i,e.selection.mainIndex),scrollIntoView:!0,effects:e.selection.ranges.map((function(e){var t=e.from;return cR.of(t)}))})}function SR(e,t,n){var r=null,i=e.changeByRange((function(i){if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:uR.of(i.to+t.length),range:Qy.range(i.anchor+t.length,i.head+t.length)};var o=i.head,a=xR(e.doc,o);if(a==t){if(OR(e,o))return{changes:{insert:t+t,from:o},effects:uR.of(o+t.length),range:Qy.cursor(o+t.length)};if(bR(e,o)){var s=n&&e.sliceDoc(o,o+3*t.length)==t+t+t;return{range:Qy.cursor(o+t.length*(s?3:1)),effects:cR.of(o)}}}else{if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&OR(e,o-2*t.length))return{changes:{insert:t+t+t+t,from:o},effects:uR.of(o+t.length),range:Qy.cursor(o+t.length)};if(e.charCategorizer(o)(a)!=Nb.Word){var l=e.sliceDoc(o-1,o);if(l!=t&&e.charCategorizer(o)(l)!=Nb.Word)return{changes:{insert:t+t,from:o},effects:uR.of(o+t.length),range:Qy.cursor(o+t.length)}}}return{range:r=i}}));return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function OR(e,t){var n=CC(e).resolveInner(t+1);return n.parent&&n.from==t}var CR="function"==typeof String.prototype.normalize?function(e){return e.normalize("NFKD")}:function(e){return e},MR=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,o=arguments.length>4?arguments[4]:void 0;wu(this,e),this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(r,i),this.bufferStart=r,this.normalize=o?function(e){return o(CR(e))}:CR,this.query=this.normalize(n)}return Su(e,[{key:"peek",value:function(){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 ky(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var e=this.peek();if(e<0)return this.done=!0,this;var t=Sy(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=Oy(e);for(var r=this.normalize(t),i=0,o=n;;i++){var a=r.charCodeAt(i),s=this.match(a,o);if(s)return this.value=s,this;if(i==r.length-1)break;o==n&&i<t.length&&t.charCodeAt(i)==a&&o++}}}},{key:"match",value:function(e,t){for(var n=null,r=0;r<this.matches.length;r+=2){var i=this.matches[r],o=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?n={from:this.matches[r+1],to:t+1}:(this.matches[r]++,o=!0)),o||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?n={from:t,to:t+1}:this.matches.push(1,t)),n}}]),e}(),PR={from:-1,to:-1,match:/.*/.exec("")},TR="gm"+(null==/x/.unicode?"":"u"),ER=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length;if(wu(this,e),this.to=o,this.curLine="",this.done=!1,this.value=PR,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new RR(t,n,r,i,o);this.re=new RegExp(n,TR+((null===r||void 0===r?void 0:r.ignoreCase)?"i":"")),this.iter=t.iter();var a=t.lineAt(i);this.curLineStart=a.from,this.matchPos=i,this.getLine(this.curLineStart)}return Su(e,[{key:"getLine",value:function(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())}},{key:"nextLine",value:function(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}},{key:"next",value:function(){for(var e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;var t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){var n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=r+(n==r?1:0),n==this.curLine.length&&this.nextLine(),n<r||n>this.value.to)return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}]),e}(),ZR=new WeakMap,AR=function(){function e(t,n){wu(this,e),this.from=t,this.text=n}return Su(e,[{key:"to",get:function(){return this.from+this.text.length}}],[{key:"get",value:function(t,n,r){var i=ZR.get(t);if(!i||i.from>=r||i.to<=n){var o=new e(n,t.sliceString(n,r));return ZR.set(t,o),o}if(i.from==n&&i.to==r)return i;var a=i.text,s=i.from;return s>n&&(a=t.sliceString(n,s)+a,s=n),i.to<r&&(a+=t.sliceString(i.to,r)),ZR.set(t,new e(s,a)),new e(n,a.slice(n-s,r-s))}}]),e}(),RR=function(){function e(t,n,r,i,o){wu(this,e),this.text=t,this.to=o,this.done=!1,this.value=PR,this.matchPos=i,this.re=new RegExp(n,TR+((null===r||void 0===r?void 0:r.ignoreCase)?"i":"")),this.flat=AR.get(t,i,this.chunkEnd(i+5e3))}return Su(e,[{key:"chunkEnd",value:function(e){return e>=this.to?this.to:this.text.lineAt(e).to}},{key:"next",value:function(){for(;;){var e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t&&this.flat.to<this.to&&t.index+t[0].length>this.flat.text.length-10&&(t=null),t){var n=this.flat.from+t.index,r=n+t[0].length;return this.value={from:n,to:r,match:t},this.matchPos=r+(n==r?1:0),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=AR.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),e}();function DR(e){var t=MZ("input",{class:"cm-textfield",name:"line"});function n(){var n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(n){var i=e.state,o=i.doc.lineAt(i.selection.main.head),a=(0,r.Z)(n,5),s=a[1],l=a[2],u=a[3],c=a[4],f=u?+u.slice(1):0,d=l?+l:o.number;if(l&&c){var h=d/100;s&&(h=h*("-"==s?-1:1)+o.number/i.doc.lines),d=Math.round(i.doc.lines*h)}else l&&s&&(d=d*("-"==s?-1:1)+o.number);var p=i.doc.line(Math.max(1,Math.min(i.doc.lines,d)));e.dispatch({effects:jR.of(!1),selection:Qy.cursor(p.from+Math.max(0,Math.min(f,p.length))),scrollIntoView:!0}),e.focus()}}return{dom:MZ("form",{class:"cm-gotoLine",onkeydown:function(t){27==t.keyCode?(t.preventDefault(),e.dispatch({effects:jR.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:function(e){e.preventDefault(),n()}},MZ("label",e.state.phrase("Go to line"),": ",t)," ",MZ("button",{class:"cm-button",type:"submit"},e.state.phrase("go"))),pos:-10}}var jR=Pb.define(),_R=nb.define({create:function(){return!0},update:function(e,t){var n,r=oy(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(jR)&&(e=i.value)}}catch(o){r.e(o)}finally{r.f()}return e},provide:function(e){return CZ.from(e,(function(e){return e?DR:null}))}}),NR=tO.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),LR={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100},IR=Ky.define({combine:function(e){return Bb(e,LR,{highlightWordAroundCursor:function(e,t){return e||t},minSelectionLength:Math.min,maxMatches:Math.min})}});function zR(e){var t=[WR,$R];return e&&t.push(IR.of(e)),t}var BR=ww.mark({class:"cm-selectionMatch"}),FR=ww.mark({class:"cm-selectionMatch cm-selectionMatch-main"}),$R=Xw.fromClass(function(){function e(t){wu(this,e),this.decorations=this.getDeco(t)}return Su(e,[{key:"update",value:function(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}},{key:"getDeco",value:function(e){var t=e.state.facet(IR),n=e.state,r=n.selection;if(r.ranges.length>1)return ww.none;var i,o=r.main,a=null;if(o.empty){if(!t.highlightWordAroundCursor)return ww.none;var s=n.wordAt(o.head);if(!s)return ww.none;a=n.charCategorizer(o.head),i=n.sliceDoc(s.from,s.to)}else{var l=o.to-o.from;if(l<t.minSelectionLength||l>200)return ww.none;if(!(i=n.sliceDoc(o.from,o.to).trim()))return ww.none}var u,c=[],f=oy(e.visibleRanges);try{for(f.s();!(u=f.n()).done;)for(var d=u.value,h=new MR(n.doc,i,d.from,d.to);!h.next().done;){var p=h.value,v=p.from,m=p.to;if((!a||(0==v||a(n.sliceDoc(v-1,v))!=Nb.Word)&&(m==n.doc.length||a(n.sliceDoc(m,m+1))!=Nb.Word))&&(a&&v<=o.from&&m>=o.to?c.push(FR.range(v,m)):(v>=o.to||m<=o.from)&&c.push(BR.range(v,m)),c.length>t.maxMatches))return ww.none}}catch(g){f.e(g)}finally{f.f()}return ww.set(c)}}]),e}(),{decorations:function(e){return e.decorations}}),WR=tO.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});var HR=Ky.define({combine:function(e){var t=e.some((function(e){return e.matchCase}));return{top:e.some((function(e){return e.top})),matchCase:void 0===t||t}}});var VR=function(){function e(t,n,r){wu(this,e),this.search=t,this.replace=n,this.caseInsensitive=r}return Su(e,[{key:"eq",value:function(e){return this.search==e.search&&this.replace==e.replace&&this.caseInsensitive==e.caseInsensitive&&this.constructor==e.constructor}}]),e}(),qR=function(e){ay(n,e);var t=cy(n);function n(e,r,i){var o;return wu(this,n),(o=t.call(this,e,r,i)).unquoted=e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"})),o}return Su(n,[{key:"cursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;return new MR(e,this.unquoted,t,n,this.caseInsensitive?function(e){return e.toLowerCase()}:void 0)}},{key:"nextMatch",value:function(e,t,n){var r=this.cursor(e,n).nextOverlapping();return r.done&&(r=this.cursor(e,0,t).nextOverlapping()),r.done?null:r.value}},{key:"prevMatchInRange",value:function(e,t,n){for(var r=n;;){for(var i=Math.max(t,r-1e4-this.unquoted.length),o=this.cursor(e,i,r),a=null;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(i==t)return null;r-=1e4}}},{key:"prevMatch",value:function(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.length)}},{key:"getReplacement",value:function(e){return this.replace}},{key:"matchAll",value:function(e,t){for(var n=this.cursor(e),r=[];!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}},{key:"highlight",value:function(e,t,n,r){for(var i=this.cursor(e,Math.max(0,t-this.unquoted.length),Math.min(n+this.unquoted.length,e.length));!i.next().done;)r(i.value.from,i.value.to)}},{key:"valid",get:function(){return!!this.search}}]),n}(VR),UR=function(e){ay(n,e);var t=cy(n);function n(e,r,i){var o;return wu(this,n),(o=t.call(this,e,r,i)).valid=!!e&&function(e){try{return new RegExp(e,TR),!0}catch(HT){return!1}}(e),o}return Su(n,[{key:"cursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;return new ER(e,this.search,this.caseInsensitive?{ignoreCase:!0}:void 0,t,n)}},{key:"nextMatch",value:function(e,t,n){var r=this.cursor(e,n).next();return r.done&&(r=this.cursor(e,0,t).next()),r.done?null:r.value}},{key:"prevMatchInRange",value:function(e,t,n){for(var r=1;;r++){for(var i=Math.max(t,n-1e4*r),o=this.cursor(e,i,n),a=null;!o.next().done;)a=o.value;if(a&&(i==t||a.from>i+10))return a;if(i==t)return null}}},{key:"prevMatch",value:function(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.length)}},{key:"getReplacement",value:function(e){return this.replace.replace(/\$([$&\d+])/g,(function(t,n){return"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n<e.match.length?e.match[n]:t}))}},{key:"matchAll",value:function(e,t){for(var n=this.cursor(e),r=[];!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}},{key:"highlight",value:function(e,t,n,r){for(var i=this.cursor(e,Math.max(0,t-250),Math.min(n+250,e.length));!i.next().done;)r(i.value.from,i.value.to)}}]),n}(VR),QR=Pb.define(),XR=Pb.define(),YR=nb.define({create:function(e){return new GR(lD(e),sD)},update:function(e,t){var n,r=oy(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(QR)?e=new GR(i.value,e.panel):i.is(XR)&&(e=new GR(e.query,i.value?sD:null))}}catch(o){r.e(o)}finally{r.f()}return e},provide:function(e){return CZ.from(e,(function(e){return e.panel}))}}),GR=Su((function e(t,n){wu(this,e),this.query=t,this.panel=n})),KR=ww.mark({class:"cm-searchMatch"}),JR=ww.mark({class:"cm-searchMatch cm-searchMatch-selected"}),eD=Xw.fromClass(function(){function e(t){wu(this,e),this.view=t,this.decorations=this.highlight(t.state.field(YR))}return Su(e,[{key:"update",value:function(e){var t=e.state.field(YR);(t!=e.startState.field(YR)||e.docChanged||e.selectionSet)&&(this.decorations=this.highlight(t))}},{key:"highlight",value:function(e){var t=e.query;if(!e.panel||!t.valid)return ww.none;for(var n=this.view,r=new Jb,i=0,o=n.visibleRanges,a=o.length;i<a;i++){for(var s=o[i],l=s.from,u=s.to;i<a-1&&u>o[i+1].from-500;)u=o[++i].to;t.highlight(n.state.doc,l,u,(function(e,t){var i=n.state.selection.ranges.some((function(n){return n.from==e&&n.to==t}));r.add(e,t,i?JR:KR)}))}return r.finish()}}]),e}(),{decorations:function(e){return e.decorations}});function tD(e){return function(t){var n=t.state.field(YR,!1);return n&&n.query.valid?e(t,n):uD(t)}}var nD=tD((function(e,t){var n=t.query,r=e.state.selection.main,i=r.from,o=r.to,a=n.nextMatch(e.state.doc,i,o);return!(!a||a.from==i&&a.to==o)&&(e.dispatch({selection:{anchor:a.from,head:a.to},scrollIntoView:!0,effects:pD(e,a)}),!0)})),rD=tD((function(e,t){var n=t.query,r=e.state,i=r.selection.main,o=i.from,a=i.to,s=n.prevMatch(r.doc,o,a);return!!s&&(e.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:pD(e,s)}),!0)})),iD=tD((function(e,t){var n=t.query.matchAll(e.state.doc,1e3);return!(!n||!n.length)&&(e.dispatch({selection:Qy.create(n.map((function(e){return Qy.range(e.from,e.to)})))}),!0)})),oD=tD((function(e,t){var n=t.query,r=e.state,i=r.selection.main,o=i.from,a=i.to;if(r.readOnly)return!1;var s=n.nextMatch(r.doc,o,o);if(!s)return!1;var l,u,c=[];if(s.from==o&&s.to==a&&(u=r.toText(n.getReplacement(s)),c.push({from:s.from,to:s.to,insert:u}),s=n.nextMatch(r.doc,s.from,s.to)),s){var f=0==c.length||c[0].from>=s.to?0:s.to-s.from-u.length;l={anchor:s.from-f,head:s.to-f}}return e.dispatch({changes:c,selection:l,scrollIntoView:!!l,effects:s?pD(e,s):void 0}),!0})),aD=tD((function(e,t){var n=t.query;if(e.state.readOnly)return!1;var r=n.matchAll(e.state.doc,1e9).map((function(e){return{from:e.from,to:e.to,insert:n.getReplacement(e)}}));return!!r.length&&(e.dispatch({changes:r}),!0)}));function sD(e){var t=e.state.field(YR).query;return{dom:dD({view:e,query:t,updateQuery:function(n){t.eq(n)||(t=n,e.dispatch({effects:QR.of(t)}))}}),mount:function(){this.dom.querySelector("[name=search]").select()},pos:80,top:e.state.facet(HR).top}}function lD(e,t){var n,r=e.selection.main,i=r.empty||r.to>r.from+100?"":e.sliceDoc(r.from,r.to),o=null!==(n=null===t||void 0===t?void 0:t.caseInsensitive)&&void 0!==n?n:!e.facet(HR).matchCase;return t&&!i?t:new qR(i.replace(/\n/g,"\\n"),"",o)}var uD=function(e){var t=e.state.field(YR,!1);if(t&&t.panel){var n=xZ(e,sD);if(!n)return!1;var r=n.dom.querySelector("[name=search]");r.focus(),r.select()}else e.dispatch({effects:[XR.of(!0),t?QR.of(lD(e.state,t.query)):Pb.appendConfig.of(mD)]});return!0},cD=function(e){var t=e.state.field(YR,!1);if(!t||!t.panel)return!1;var n=xZ(e,sD);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:XR.of(!1)}),!0},fD=[{key:"Mod-f",run:uD,scope:"editor search-panel"},{key:"F3",run:nD,shift:rD,scope:"editor search-panel"},{key:"Mod-g",run:nD,shift:rD,scope:"editor search-panel"},{key:"Escape",run:cD,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(e){var t=e.state,n=e.dispatch,r=t.selection;if(r.ranges.length>1||r.main.empty)return!1;for(var i=r.main,o=i.from,a=i.to,s=[],l=0,u=new MR(t.doc,t.sliceDoc(o,a));!u.next().done;){if(s.length>1e3)return!1;u.value.from==o&&(l=s.length),s.push(Qy.range(u.value.from,u.value.to))}return n(t.update({selection:Qy.create(s,l)})),!0}},{key:"Alt-g",run:function(e){var t=xZ(e,DR);if(!t){var n=[jR.of(!0)];null==e.state.field(_R,!1)&&n.push(Pb.appendConfig.of([_R,NR])),e.dispatch({effects:n}),t=xZ(e,DR)}return t&&t.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(e){var t=e.state,n=e.dispatch,r=t.selection.ranges;if(r.some((function(e){return e.from===e.to})))return function(e){var t=e.state,n=e.dispatch,r=t.selection,i=Qy.create(r.ranges.map((function(e){return t.wordAt(e.head)||Qy.cursor(e.head)})),r.mainIndex);return!i.eq(r)&&(n(t.update({selection:i})),!0)}({state:t,dispatch:n});var i=t.sliceDoc(r[0].from,r[0].to);if(t.selection.ranges.some((function(e){return t.sliceDoc(e.from,e.to)!=i})))return!1;var o=function(e,t){for(var n=e.selection,r=n.main,i=n.ranges,o=e.wordAt(r.head),a=o&&o.from==r.from&&o.to==r.to,s=function(n,r){if(r.next(),!r.done){if(n&&i.some((function(e){return e.from==r.value.from})))return u=r,l=n,"continue";if(a){var o=e.wordAt(r.value.from);if(!o||o.from!=r.value.from||o.to!=r.value.to)return u=r,l=n,"continue"}return l=n,u=r,{v:r.value}}if(n)return u=r,l=n,{v:null};r=new MR(e.doc,t,0,Math.max(0,i[i.length-1].from-1)),l=n=!0,u=r},l=!1,u=new MR(e.doc,t,i[i.length-1].to);;){var c=s(l,u);if("continue"!==c&&"object"===typeof c)return c.v}}(t,i);return!!o&&(n(t.update({selection:t.selection.addRange(Qy.range(o.from,o.to),!1),scrollIntoView:!0})),!0)},preventDefault:!0}];function dD(e){function t(t){return e.view.state.phrase(t)}var n=MZ("input",{value:e.query.search,placeholder:t("Find"),"aria-label":t("Find"),class:"cm-textfield",name:"search",onchange:a,onkeyup:a}),r=MZ("input",{value:e.query.replace,placeholder:t("Replace"),"aria-label":t("Replace"),class:"cm-textfield",name:"replace",onchange:a,onkeyup:a}),i=MZ("input",{type:"checkbox",name:"case",checked:!e.query.caseInsensitive,onchange:a}),o=MZ("input",{type:"checkbox",name:"re",checked:e.query instanceof UR,onchange:a});function a(){e.updateQuery(new(o.checked?UR:qR)(n.value,r.value,!i.checked))}function s(e,t,n){return MZ("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}return MZ("div",{onkeydown:function(t){var i,o,a;i=e.view,o=t,a="search-panel",bO(mO(i.state),o,i,a)?t.preventDefault():13==t.keyCode&&t.target==n?(t.preventDefault(),(t.shiftKey?rD:nD)(e.view)):13==t.keyCode&&t.target==r&&(t.preventDefault(),oD(e.view))},class:"cm-search"},[n,s("next",(function(){return nD(e.view)}),[t("next")]),s("prev",(function(){return rD(e.view)}),[t("previous")]),s("select",(function(){return iD(e.view)}),[t("all")]),MZ("label",null,[i,t("match case")]),MZ("label",null,[o,t("regexp")]),MZ("br"),r,s("replace",(function(){return oD(e.view)}),[t("replace")]),s("replaceAll",(function(){return aD(e.view)}),[t("replace all")]),MZ("button",{name:"close",onclick:function(){return cD(e.view)},"aria-label":t("close"),type:"button"},["\xd7"])])}var hD=/[\s\.,:;?!]/;function pD(e,t){var n=t.from,r=t.to,i=e.state.doc.lineAt(n).from,o=e.state.doc.lineAt(r).to,a=Math.max(i,n-30),s=Math.min(o,r+30),l=e.state.sliceDoc(a,s);if(a!=i)for(var u=0;u<30;u++)if(!hD.test(l[u+1])&&hD.test(l[u])){l=l.slice(u);break}if(s!=o)for(var c=l.length-1;c>l.length-30;c--)if(!hD.test(l[c-1])&&hD.test(l[c])){l=l.slice(0,c);break}return tO.announce.of("".concat(e.state.phrase("current match"),". ").concat(l," ").concat(e.state.phrase("on line")," ").concat(e.state.doc.lineAt(n).number))}var vD=tO.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"}}),mD=[YR,ub.fallback(eD),vD];function gD(e,t){return function(n){var r=n.state,i=n.dispatch,o=e(t,r.selection.ranges,r);return!!o&&(i(r.update(o)),!0)}}var yD=gD(SD,0),bD=gD(kD,0),xD=[{key:"Mod-/",run:function(e){var t=wD(e.state);return t.line?yD(e):!!t.block&&bD(e)}},{key:"Alt-A",run:bD}];function wD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.selection.main.head,n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}function kD(e,t,n){var r=t.map((function(e){return wD(n,e.from).block}));if(!r.every((function(e){return e})))return null;var i=t.map((function(e,t){return function(e,t,n,r){var i,o,a=t.open,s=t.close,l=e.sliceDoc(n-50,n),u=e.sliceDoc(r,r+50),c=/\s*$/.exec(l)[0].length,f=/^\s*/.exec(u)[0].length,d=l.length-c;if(l.slice(d-a.length,d)==a&&u.slice(f,f+s.length)==s)return{open:{pos:n-c,margin:c&&1},close:{pos:r+f,margin:f&&1}};r-n<=100?i=o=e.sliceDoc(n,r):(i=e.sliceDoc(n,n+50),o=e.sliceDoc(r-50,r));var h=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(o)[0].length,v=o.length-p-s.length;return i.slice(h,h+a.length)==a&&o.slice(v,v+s.length)==s?{open:{pos:n+h+a.length,margin:/\s/.test(i.charAt(h+a.length))?1:0},close:{pos:r-p-s.length,margin:/\s/.test(o.charAt(v-1))?1:0}}:null}(n,r[t],e.from,e.to)}));if(2!=e&&!i.every((function(e){return e}))){var o=0;return n.changeByRange((function(e){var t=r[o++],n=t.open,a=t.close;if(i[o])return{range:e};var s=n.length+1;return{changes:[{from:e.from,insert:n+" "},{from:e.to,insert:" "+a}],range:Qy.range(e.anchor+s,e.head+s)}}))}if(1!=e&&i.some((function(e){return e}))){for(var a,s=[],l=0;l<i.length;l++)if(a=i[l]){var u=r[l],c=a,f=c.open,d=c.close;s.push({from:f.pos-u.open.length,to:f.pos+f.margin},{from:d.pos-d.margin,to:d.pos+u.close.length})}return{changes:s}}return null}function SD(e,t,n){var r,i=[],o=-1,a=oy(t);try{for(a.s();!(r=a.n()).done;){for(var s=r.value,l=s.from,u=s.to,c=i.length,f=1e9,d=l;d<=u;){var h=n.doc.lineAt(d);if(h.from>o&&(l==u||u>h.from)){o=h.from;var p=wD(n,d).line;if(!p)continue;var v=/^\s*/.exec(h.text)[0].length,m=v==h.length,g=h.text.slice(v,v+p.length)==p?v:-1;v<h.text.length&&v<f&&(f=v),i.push({line:h,comment:g,token:p,indent:v,empty:m,single:!1})}d=h.to+1}if(f<1e9)for(var y=c;y<i.length;y++)i[y].indent<i[y].line.text.length&&(i[y].indent=f);i.length==c+1&&(i[c].single=!0)}}catch(L){a.e(L)}finally{a.f()}if(2!=e&&i.some((function(e){return e.comment<0&&(!e.empty||e.single)}))){var b,x=[],w=oy(i);try{for(w.s();!(b=w.n()).done;){var k=b.value,S=k.line,O=k.token,C=k.indent,M=k.empty;!k.single&&M||x.push({from:S.from+C,insert:O+" "})}}catch(L){w.e(L)}finally{w.f()}var P=n.changes(x);return{changes:P,selection:n.selection.map(P,1)}}if(1!=e&&i.some((function(e){return e.comment>=0}))){var T,E=[],Z=oy(i);try{for(Z.s();!(T=Z.n()).done;){var A=T.value,R=A.line,D=A.comment,j=A.token;if(D>=0){var _=R.from+D,N=_+j.length;" "==R.text[N-R.from]&&N++,E.push({from:_,to:N})}}}catch(L){Z.e(L)}finally{Z.f()}return{changes:E}}return null}var OD=2e3;function CD(e,t){var n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,o=i>OD?-1:i==r.length?function(e,t){var n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):Cy(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function MD(e,t){var n=CD(e,t),r=e.state.selection;return n?{update:function(e){if(e.docChanged){var t=e.changes.mapPos(e.startState.doc.line(n.line).from),i=e.state.doc.lineAt(t);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(e.changes)}},get:function(t,i,o){var a=CD(e,t);if(!a)return r;var s=function(e,t,n){var r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),o=[];if(t.off>OD||n.off>OD||t.col<0||n.col<0)for(var a=Math.min(t.off,n.off),s=Math.max(t.off,n.off),l=r;l<=i;l++){var u=e.doc.line(l);u.length<=s&&o.push(Qy.range(u.from+a,u.to+s))}else for(var c=Math.min(t.col,n.col),f=Math.max(t.col,n.col),d=r;d<=i;d++){var h=e.doc.line(d),p=My(h.text,c,e.tabSize,!0);if(p>-1){var v=My(h.text,f,e.tabSize);o.push(Qy.range(h.from+p,h.from+v))}}return o}(e.state,n,a);return s.length?o?Qy.create(s.concat(r.ranges)):Qy.create(s):r}}:null}function PD(e){var t=(null===e||void 0===e?void 0:e.eventFilter)||function(e){return e.altKey&&0==e.button};return tO.mouseSelectionStyle.of((function(e,n){return t(n)?MD(e,n):null}))}var TD,ED=[BA(),HA(),$O(),oA(),aR(),kO(),jO(),zb.allowMultipleSelections.of(!0),QC(),ZT.fallback,aM(),hR(),eZ(),PD(),UO(),zR(),pO.of([].concat((0,me.Z)(yR),(0,me.Z)(fP),(0,me.Z)(fD),(0,me.Z)(xA),(0,me.Z)(JA),(0,me.Z)(xD),(0,me.Z)(tZ),(0,me.Z)(zZ)))];!function(e){e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it"}(TD||(TD={}));var ZD=function(t){var n=t.index,i=t.query,o=t.queryHistory,a=t.setHistoryIndex,s=t.setQuery,l=t.runQuery,u=t.server,c=t.oneLiner,f=void 0!==c&&c,d=t.autocomplete,h=t.error,v=(0,e.useRef)(null),m=(0,e.useState)(),g=(0,r.Z)(m,2),y=g[0],b=g[1],x=(0,e.useState)(!1),w=(0,r.Z)(x,2),k=w[0],S=w[1];(0,e.useEffect)((function(){return v.current&&b(new tO({parent:v.current})),function(){return null===y||void 0===y?void 0:y.destroy()}}),[]),(0,e.useEffect)((function(){var e=new JZ;e.activateCompletion(d),e.setComplete({remote:{url:u}});var t=tO.updateListener.of((function(e){e.focusChanged&&S((null===y||void 0===y?void 0:y.hasFocus)||!1),e.docChanged&&s(e.state.doc.toJSON().map((function(e){return e.trim()})).join(""),n)}));null===y||void 0===y||y.setState(zb.create({doc:i,extensions:[ED,pO.of(fP),t,e.asExtension()]}))}),[u,y,d,o]);return(0,p.jsxs)("div",{className:"query-editor-container \n ".concat(k?"query-editor-container_focus":"","\n query-editor-container-").concat(f?"one-line":"multi-line","\n ").concat(h===TD.validQuery?"query-editor-container_error":""),children:[(0,p.jsxs)("label",{className:"query-editor-label",children:["Query ",n+1]}),(0,p.jsx)("div",{className:"query-editor",ref:v,onKeyUp:function(e){var t=e.key,r=e.ctrlKey,i=e.metaKey,o=r||i;"Enter"===t&&o?l():"ArrowUp"===t&&o?a(-1,n):"ArrowDown"===t&&o&&a(1,n)}})]})},AD=n(4290);var RD=e.createContext(null);var DD=function(t){var n=t.children,r=t.dateAdapter,i=t.dateFormats,o=t.dateLibInstance,a=t.locale,s=e.useMemo((function(){return new r({locale:a,formats:i,instance:o})}),[r,a,i,o]),l=e.useMemo((function(){return{minDate:s.date("1900-01-01T00:00:00.000"),maxDate:s.date("2099-12-31T00:00:00.000")}}),[s]),u=e.useMemo((function(){return{utils:s,defaultDates:l}}),[l,s]);return(0,p.jsx)(RD.Provider,{value:u,children:n})};function jD(){var t=e.useContext(RD);if(null===t)throw new Error((0,Ds.Z)(13));return t}function _D(){return jD().utils}function ND(){return jD().defaultDates}function LD(){var t=_D();return e.useRef(t.date()).current}function ID(e,t){return e&&t.isValid(t.date(e))?"Choose date, selected date is ".concat(t.format(t.date(e),"fullDate")):"Choose date"}var zD=function(e,t,n){var r=e.date(t);return null===t?"":e.isValid(r)?e.formatByString(r,n):""};function BD(e,t,n){return e||("undefined"===typeof t?n.localized:t?n["12h"]:n["24h"])}var FD=["ampm","inputFormat","maxDate","maxDateTime","maxTime","minDate","minDateTime","minTime","openTo","orientation","views"];function $D(e,t){var n=e.ampm,r=e.inputFormat,i=e.maxDate,s=e.maxDateTime,l=e.maxTime,u=e.minDate,c=e.minDateTime,f=e.minTime,d=e.openTo,h=void 0===d?"day":d,p=e.orientation,v=void 0===p?"portrait":p,m=e.views,g=void 0===m?["year","day","hours","minutes"]:m,y=(0,o.Z)(e,FD),b=_D(),x=ND(),k=null!=u?u:x.minDate,S=null!=i?i:x.maxDate,O=null!=n?n:b.is12HourCycleInCurrentLocale();if("portrait"!==v)throw new Error("We are not supporting custom orientation for DateTimePicker yet :(");return(0,w.Z)({props:(0,a.Z)({openTo:h,views:g,ampm:O,ampmInClock:!0,orientation:v,showToolbar:!0,allowSameDateSelection:!0,minDate:null!=c?c:k,minTime:null!=c?c:f,maxDate:null!=s?s:S,maxTime:null!=s?s:l,disableIgnoringDatePartForTimeValidation:Boolean(c||s),acceptRegex:O?/[\dap]/gi:/\d/gi,mask:"__/__/____ __:__",disableMaskedInput:O,inputFormat:BD(r,O,{localized:b.formats.keyboardDateTime,"12h":b.formats.keyboardDateTime12h,"24h":b.formats.keyboardDateTime24h})},y),name:t})}var WD,HD,VD,qD=["className","selected","value"],UD=(0,U.Z)("PrivatePickersToolbarText",["selected"]),QD=(0,g.ZP)(Cs,{skipSx:!0})((function(e){var t=e.theme;return(0,i.Z)({transition:t.transitions.create("color"),color:t.palette.text.secondary},"&.".concat(UD.selected),{color:t.palette.text.primary})})),XD=e.forwardRef((function(e,t){var n=e.className,r=e.selected,i=e.value,s=(0,o.Z)(e,qD);return(0,p.jsx)(QD,(0,a.Z)({ref:t,className:(0,u.default)(n,r&&UD.selected),component:"span"},s,{children:i}))})),YD=(0,ht.Z)((0,p.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Pen"),GD=(0,ht.Z)((0,p.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),KD=(0,ht.Z)((0,p.jsxs)(e.Fragment,{children:[(0,p.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,p.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),JD=(0,U.Z)("PrivatePickersToolbar",["root","dateTitleContainer"]),ej=(0,g.ZP)("div",{skipSx:!0})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3)},n.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})})),tj=(0,g.ZP)(iy,{skipSx:!0})({flex:1}),nj=function(e){return"clock"===e?WD||(WD=(0,p.jsx)(KD,{color:"inherit"})):HD||(HD=(0,p.jsx)(GD,{color:"inherit"}))};function rj(e,t){return e?"text input view is open, go to ".concat(t," view"):"".concat(t," view is open, go to text input view")}var ij=e.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.getMobileKeyboardInputViewButtonText,o=void 0===i?rj:i,a=e.isLandscape,s=e.isMobileKeyboardViewOpen,l=e.landscapeDirection,c=void 0===l?"column":l,f=e.penIconClassName,d=e.toggleMobileKeyboardView,h=e.toolbarTitle,v=e.viewType,m=void 0===v?"calendar":v,g=e;return(0,p.jsxs)(ej,{ref:t,className:(0,u.default)(JD.root,r),ownerState:g,children:[(0,p.jsx)(Cs,{color:"text.secondary",variant:"overline",children:h}),(0,p.jsxs)(tj,{container:!0,justifyContent:"space-between",className:JD.dateTitleContainer,direction:a?c:"row",alignItems:a?"flex-start":"flex-end",children:[n,(0,p.jsx)(dt,{onClick:d,className:f,color:"inherit","aria-label":o(s,m),children:s?nj(m):VD||(VD=(0,p.jsx)(YD,{color:"inherit"}))})]})]})})),oj=["align","className","selected","typographyClassName","value","variant"],aj=(0,g.ZP)(Pf,{skipSx:!0})({padding:0,minWidth:16,textTransform:"none"}),sj=e.forwardRef((function(e,t){var n=e.align,r=e.className,i=e.selected,s=e.typographyClassName,l=e.value,u=e.variant,c=(0,o.Z)(e,oj);return(0,p.jsx)(aj,(0,a.Z)({variant:"text",ref:t,className:r},c,{children:(0,p.jsx)(XD,{align:n,className:s,variant:u,value:l,selected:i})}))}));function lj(e){return(0,q.Z)("MuiTab",e)}var uj,cj=(0,U.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),fj=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],dj=(0,g.ZP)(ot,{name:"MuiTab",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor".concat((0,O.Z)(n.textColor))],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})((function(e){var t,n,r,o=e.theme,s=e.ownerState;return(0,a.Z)({},o.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},s.label&&{flexDirection:"top"===s.iconPosition||"bottom"===s.iconPosition?"column":"row"},{lineHeight:1.25},s.icon&&s.label&&(0,i.Z)({minHeight:72,paddingTop:9,paddingBottom:9},"& > .".concat(cj.iconWrapper),(0,a.Z)({},"top"===s.iconPosition&&{marginBottom:6},"bottom"===s.iconPosition&&{marginTop:6},"start"===s.iconPosition&&{marginRight:o.spacing(1)},"end"===s.iconPosition&&{marginLeft:o.spacing(1)})),"inherit"===s.textColor&&(t={color:"inherit",opacity:.6},(0,i.Z)(t,"&.".concat(cj.selected),{opacity:1}),(0,i.Z)(t,"&.".concat(cj.disabled),{opacity:o.palette.action.disabledOpacity}),t),"primary"===s.textColor&&(n={color:o.palette.text.secondary},(0,i.Z)(n,"&.".concat(cj.selected),{color:o.palette.primary.main}),(0,i.Z)(n,"&.".concat(cj.disabled),{color:o.palette.text.disabled}),n),"secondary"===s.textColor&&(r={color:o.palette.text.secondary},(0,i.Z)(r,"&.".concat(cj.selected),{color:o.palette.secondary.main}),(0,i.Z)(r,"&.".concat(cj.disabled),{color:o.palette.text.disabled}),r),s.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},s.wrapped&&{fontSize:o.typography.pxToRem(12)})})),hj=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiTab"}),i=r.className,s=r.disabled,l=void 0!==s&&s,f=r.disableFocusRipple,d=void 0!==f&&f,h=r.fullWidth,v=r.icon,m=r.iconPosition,g=void 0===m?"top":m,y=r.indicator,b=r.label,x=r.onChange,k=r.onClick,S=r.onFocus,C=r.selected,M=r.selectionFollowsFocus,P=r.textColor,T=void 0===P?"inherit":P,E=r.value,Z=r.wrapped,A=void 0!==Z&&Z,R=(0,o.Z)(r,fj),D=(0,a.Z)({},r,{disabled:l,disableFocusRipple:d,selected:C,icon:!!v,iconPosition:g,label:!!b,fullWidth:h,textColor:T,wrapped:A}),j=function(e){var t=e.classes,n=e.textColor,r=e.fullWidth,i=e.wrapped,o=e.icon,a=e.label,s=e.selected,l=e.disabled,u={root:["root",o&&a&&"labelIcon","textColor".concat((0,O.Z)(n)),r&&"fullWidth",i&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return(0,c.Z)(u,lj,t)}(D),_=v&&b&&e.isValidElement(v)?e.cloneElement(v,{className:(0,u.default)(j.iconWrapper,v.props.className)}):v;return(0,p.jsxs)(dj,(0,a.Z)({focusRipple:!d,className:(0,u.default)(j.root,i),ref:n,role:"tab","aria-selected":C,disabled:l,onClick:function(e){!C&&x&&x(e,E),k&&k(e)},onFocus:function(e){M&&!C&&x&&x(e,E),S&&S(e)},ownerState:D,tabIndex:C?0:-1},R,{children:["top"===g||"start"===g?(0,p.jsxs)(e.Fragment,{children:[_,b]}):(0,p.jsxs)(e.Fragment,{children:[b,_]}),y]}))})),pj=hj;function vj(){if(uj)return uj;var e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),uj="reverse",e.scrollLeft>0?uj="default":(e.scrollLeft=1,0===e.scrollLeft&&(uj="negative")),document.body.removeChild(e),uj}function mj(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;switch(vj()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function gj(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function yj(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=r.ease,a=void 0===o?gj:o,s=r.duration,l=void 0===s?300:s,u=null,c=t[e],f=!1,d=function(){f=!0},h=function r(o){if(f)i(new Error("Animation cancelled"));else{null===u&&(u=o);var s=Math.min(1,(o-u)/l);t[e]=a(s)*(n-c)+c,s>=1?requestAnimationFrame((function(){i(null)})):requestAnimationFrame(r)}};return c===n?(i(new Error("Element already at target position")),d):(requestAnimationFrame(h),d)}var bj=["onChange"],xj={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var wj=(0,ht.Z)((0,p.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),kj=(0,ht.Z)((0,p.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Sj(e){return(0,q.Z)("MuiTabScrollButton",e)}var Oj,Cj,Mj=(0,U.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Pj=["className","direction","orientation","disabled"],Tj=(0,g.ZP)(ot,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.orientation&&t[n.orientation]]}})((function(e){var t=e.ownerState;return(0,a.Z)((0,i.Z)({width:40,flexShrink:0,opacity:.8},"&.".concat(Mj.disabled),{opacity:0}),"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})})),Ej=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiTabScrollButton"}),r=n.className,i=n.direction,s=(0,o.Z)(n,Pj),l="rtl"===x().direction,f=(0,a.Z)({isRtl:l},n),d=function(e){var t=e.classes,n={root:["root",e.orientation,e.disabled&&"disabled"]};return(0,c.Z)(n,Sj,t)}(f);return(0,p.jsx)(Tj,(0,a.Z)({component:"div",className:(0,u.default)(d.root,r),ref:t,role:null,ownerState:f,tabIndex:null},s,{children:"left"===i?Oj||(Oj=(0,p.jsx)(wj,{fontSize:"small"})):Cj||(Cj=(0,p.jsx)(kj,{fontSize:"small"}))}))})),Zj=Ej;function Aj(e){return(0,q.Z)("MuiTabs",e)}var Rj,Dj,jj,_j,Nj=(0,U.Z)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Lj=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Ij=function(e,t){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild},zj=function(e,t){return e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild},Bj=function(e,t,n){for(var r=!1,i=n(e,t);i;){if(i===e.firstChild){if(r)return;r=!0}var o=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!o)return void i.focus();i=n(e,i)}},Fj=(0,g.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[(0,i.Z)({},"& .".concat(Nj.scrollButtons),t.scrollButtons),(0,i.Z)({},"& .".concat(Nj.scrollButtons),n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile),t.root,n.vertical&&t.vertical]}})((function(e){var t=e.ownerState,n=e.theme;return(0,a.Z)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&(0,i.Z)({},"& .".concat(Nj.scrollButtons),(0,i.Z)({},n.breakpoints.down("sm"),{display:"none"})))})),$j=(0,g.ZP)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:function(e,t){var n=e.ownerState;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((function(e){var t=e.ownerState;return(0,a.Z)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})})),Wj=(0,g.ZP)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:function(e,t){var n=e.ownerState;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((function(e){var t=e.ownerState;return(0,a.Z)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})})),Hj=(0,g.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:function(e,t){return t.indicator}})((function(e){var t=e.ownerState,n=e.theme;return(0,a.Z)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:n.palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:n.palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})})),Vj=(0,g.ZP)((function(t){var n=t.onChange,r=(0,o.Z)(t,bj),i=e.useRef(),s=e.useRef(null),l=function(){i.current=s.current.offsetHeight-s.current.clientHeight};return e.useEffect((function(){var e=(0,mu.Z)((function(){var e=i.current;l(),e!==i.current&&n(i.current)})),t=(0,gu.Z)(s.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[n]),e.useEffect((function(){l(),n(i.current)}),[n]),(0,p.jsx)("div",(0,a.Z)({style:xj,ref:s},r))}),{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),qj={},Uj=e.forwardRef((function(t,n){var s=(0,w.Z)({props:t,name:"MuiTabs"}),l=x(),f="rtl"===l.direction,d=s["aria-label"],h=s["aria-labelledby"],v=s.action,m=s.centered,g=void 0!==m&&m,y=s.children,b=s.className,k=s.component,O=void 0===k?"div":k,C=s.allowScrollButtonsMobile,M=void 0!==C&&C,P=s.indicatorColor,T=void 0===P?"primary":P,E=s.onChange,Z=s.orientation,A=void 0===Z?"horizontal":Z,R=s.ScrollButtonComponent,D=void 0===R?Zj:R,j=s.scrollButtons,_=void 0===j?"auto":j,N=s.selectionFollowsFocus,L=s.TabIndicatorProps,I=void 0===L?{}:L,z=s.TabScrollButtonProps,B=void 0===z?{}:z,F=s.textColor,$=void 0===F?"primary":F,W=s.value,H=s.variant,V=void 0===H?"standard":H,q=s.visibleScrollbar,U=void 0!==q&&q,Q=(0,o.Z)(s,Lj),X="scrollable"===V,Y="vertical"===A,G=Y?"scrollTop":"scrollLeft",K=Y?"top":"left",J=Y?"bottom":"right",ee=Y?"clientHeight":"clientWidth",te=Y?"height":"width",ne=(0,a.Z)({},s,{component:O,allowScrollButtonsMobile:M,indicatorColor:T,orientation:A,vertical:Y,scrollButtons:_,textColor:$,variant:V,visibleScrollbar:U,fixed:!X,hideScrollbar:X&&!U,scrollableX:X&&!Y,scrollableY:X&&Y,centered:g&&!X,scrollButtonsHideMobile:!M}),re=function(e){var t=e.vertical,n=e.fixed,r=e.hideScrollbar,i=e.scrollableX,o=e.scrollableY,a=e.centered,s=e.scrollButtonsHideMobile,l=e.classes,u={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,c.Z)(u,Aj,l)}(ne);var ie=e.useState(!1),oe=(0,r.Z)(ie,2),ae=oe[0],se=oe[1],le=e.useState(qj),ue=(0,r.Z)(le,2),ce=ue[0],fe=ue[1],de=e.useState({start:!1,end:!1}),he=(0,r.Z)(de,2),pe=he[0],ve=he[1],me=e.useState({overflow:"hidden",scrollbarWidth:0}),ge=(0,r.Z)(me,2),ye=ge[0],be=ge[1],xe=new Map,we=e.useRef(null),ke=e.useRef(null),Se=function(){var e,t,n=we.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:mj(n,l.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==W){var i=ke.current.children;if(i.length>0){var o=i[xe.get(W)];0,t=o?o.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},Oe=(0,S.Z)((function(){var e,t,n=Se(),r=n.tabsMeta,o=n.tabMeta,a=0;if(Y)t="top",o&&r&&(a=o.top-r.top+r.scrollTop);else if(t=f?"right":"left",o&&r){var s=f?r.scrollLeftNormalized+r.clientWidth-r.scrollWidth:r.scrollLeft;a=(f?-1:1)*(o[t]-r[t]+s)}var l=(e={},(0,i.Z)(e,t,a),(0,i.Z)(e,te,o?o[te]:0),e);if(isNaN(ce[t])||isNaN(ce[te]))fe(l);else{var u=Math.abs(ce[t]-l[t]),c=Math.abs(ce[te]-l[te]);(u>=1||c>=1)&&fe(l)}})),Ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.animation,r=void 0===n||n;r?yj(G,we.current,e,{duration:l.transitions.duration.standard}):we.current[G]=e},Me=function(e){var t=we.current[G];Y?t+=e:(t+=e*(f?-1:1),t*=f&&"reverse"===vj()?-1:1),Ce(t)},Pe=function(){for(var e=we.current[ee],t=0,n=Array.from(ke.current.children),r=0;r<n.length;r+=1){var i=n[r];if(t+i[ee]>e)break;t+=i[ee]}return t},Te=function(){Me(-1*Pe())},Ee=function(){Me(Pe())},Ze=e.useCallback((function(e){be({overflow:null,scrollbarWidth:e})}),[]),Ae=(0,S.Z)((function(e){var t=Se(),n=t.tabsMeta,r=t.tabMeta;if(r&&n)if(r[K]<n[K]){var i=n[G]+(r[K]-n[K]);Ce(i,{animation:e})}else if(r[J]>n[J]){var o=n[G]+(r[J]-n[J]);Ce(o,{animation:e})}})),Re=(0,S.Z)((function(){if(X&&!1!==_){var e,t,n=we.current,r=n.scrollTop,i=n.scrollHeight,o=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(Y)e=r>1,t=r<i-o-1;else{var u=mj(we.current,l.direction);e=f?u<a-s-1:u>1,t=f?u>1:u<a-s-1}e===pe.start&&t===pe.end||ve({start:e,end:t})}}));e.useEffect((function(){var e,t=(0,mu.Z)((function(){Oe(),Re()})),n=(0,gu.Z)(we.current);return n.addEventListener("resize",t),"undefined"!==typeof ResizeObserver&&(e=new ResizeObserver(t),Array.from(ke.current.children).forEach((function(t){e.observe(t)}))),function(){t.clear(),n.removeEventListener("resize",t),e&&e.disconnect()}}),[Oe,Re]);var De=e.useMemo((function(){return(0,mu.Z)((function(){Re()}))}),[Re]);e.useEffect((function(){return function(){De.clear()}}),[De]),e.useEffect((function(){se(!0)}),[]),e.useEffect((function(){Oe(),Re()})),e.useEffect((function(){Ae(qj!==ce)}),[Ae,ce]),e.useImperativeHandle(v,(function(){return{updateIndicator:Oe,updateScrollButtons:Re}}),[Oe,Re]);var je=(0,p.jsx)(Hj,(0,a.Z)({},I,{className:(0,u.default)(re.indicator,I.className),ownerState:ne,style:(0,a.Z)({},ce,I.style)})),_e=0,Ne=e.Children.map(y,(function(t){if(!e.isValidElement(t))return null;var n=void 0===t.props.value?_e:t.props.value;xe.set(n,_e);var r=n===W;return _e+=1,e.cloneElement(t,(0,a.Z)({fullWidth:"fullWidth"===V,indicator:r&&!ae&&je,selected:r,selectionFollowsFocus:N,onChange:E,textColor:$,value:n},1!==_e||!1!==W||t.props.tabIndex?{}:{tabIndex:0}))})),Le=function(){var e={};e.scrollbarSizeListener=X?(0,p.jsx)(Vj,{onChange:Ze,className:(0,u.default)(re.scrollableX,re.hideScrollbar)}):null;var t=pe.start||pe.end,n=X&&("auto"===_&&t||!0===_);return e.scrollButtonStart=n?(0,p.jsx)(D,(0,a.Z)({orientation:A,direction:f?"right":"left",onClick:Te,disabled:!pe.start},B,{className:(0,u.default)(re.scrollButtons,B.className)})):null,e.scrollButtonEnd=n?(0,p.jsx)(D,(0,a.Z)({orientation:A,direction:f?"left":"right",onClick:Ee,disabled:!pe.end},B,{className:(0,u.default)(re.scrollButtons,B.className)})):null,e}();return(0,p.jsxs)(Fj,(0,a.Z)({className:(0,u.default)(re.root,b),ownerState:ne,ref:n,as:O},Q,{children:[Le.scrollButtonStart,Le.scrollbarSizeListener,(0,p.jsxs)($j,{className:re.scroller,ownerState:ne,style:(0,i.Z)({overflow:ye.overflow},Y?"margin".concat(f?"Left":"Right"):"marginBottom",U?void 0:-ye.scrollbarWidth),ref:we,onScroll:De,children:[(0,p.jsx)(Wj,{"aria-label":d,"aria-labelledby":h,"aria-orientation":"vertical"===A?"vertical":null,className:re.flexContainer,ownerState:ne,onKeyDown:function(e){var t=ke.current,n=(0,eu.Z)(t).activeElement;if("tab"===n.getAttribute("role")){var r="horizontal"===A?"ArrowLeft":"ArrowUp",i="horizontal"===A?"ArrowRight":"ArrowDown";switch("horizontal"===A&&f&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),Bj(t,n,zj);break;case i:e.preventDefault(),Bj(t,n,Ij);break;case"Home":e.preventDefault(),Bj(t,null,Ij);break;case"End":e.preventDefault(),Bj(t,null,zj)}}},ref:ke,role:"tablist",children:Ne}),ae&&je]}),Le.scrollButtonEnd]}))})),Qj=Uj,Xj=(0,ht.Z)((0,p.jsxs)(e.Fragment,{children:[(0,p.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,p.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),Yj=(0,ht.Z)((0,p.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),Gj=e.createContext(null),Kj=(0,g.ZP)(Qj,{skipSx:!0})((function(e){var t=e.ownerState,n=e.theme;return(0,a.Z)({boxShadow:"0 -1px 0 0 inset ".concat(n.palette.divider)},"desktop"===t.wrapperVariant&&(0,i.Z)({order:1,boxShadow:"0 1px 0 0 inset ".concat(n.palette.divider)},"& .".concat(Nj.indicator),{bottom:"auto",top:0}))})),Jj=function(t){var n,r=t.dateRangeIcon,i=void 0===r?Rj||(Rj=(0,p.jsx)(Yj,{})):r,o=t.onChange,s=t.timeIcon,l=void 0===s?Dj||(Dj=(0,p.jsx)(Xj,{})):s,u=t.view,c=e.useContext(Gj),f=(0,a.Z)({},t,{wrapperVariant:c});return(0,p.jsxs)(Kj,{ownerState:f,variant:"fullWidth",value:(n=u,"day"===n||"year"===n?"date":"time"),onChange:function(e,t){o("date"===t?"day":"hours")},children:[(0,p.jsx)(pj,{value:"date","aria-label":"pick date",icon:(0,p.jsx)(e.Fragment,{children:i})}),(0,p.jsx)(pj,{value:"time","aria-label":"pick time",icon:(0,p.jsx)(e.Fragment,{children:l})})]})},e_=["ampm","date","dateRangeIcon","hideTabs","isMobileKeyboardViewOpen","onChange","openView","setOpenView","timeIcon","toggleMobileKeyboardView","toolbarFormat","toolbarPlaceholder","toolbarTitle","views"],t_=(0,U.Z)("PrivateDateTimePickerToolbar",["penIcon"]),n_=(0,g.ZP)(ij,{skipSx:!0})((0,i.Z)({paddingLeft:16,paddingRight:16,justifyContent:"space-around"},"& .".concat(t_.penIcon),{position:"absolute",top:8,right:8})),r_=(0,g.ZP)("div",{skipSx:!0})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),i_=(0,g.ZP)("div",{skipSx:!0})({display:"flex"}),o_=(0,g.ZP)(XD,{skipSx:!0})({margin:"0 4px 0 2px",cursor:"default"}),a_=function(t){var n,r=t.ampm,i=t.date,s=t.dateRangeIcon,l=t.hideTabs,u=t.isMobileKeyboardViewOpen,c=t.openView,f=t.setOpenView,d=t.timeIcon,h=t.toggleMobileKeyboardView,v=t.toolbarFormat,m=t.toolbarPlaceholder,g=void 0===m?"\u2013\u2013":m,y=t.toolbarTitle,b=void 0===y?"Select date & time":y,x=t.views,w=(0,o.Z)(t,e_),k=_D(),S=e.useContext(Gj),O="desktop"===S||!l&&"undefined"!==typeof window&&window.innerHeight>667,C=e.useMemo((function(){return i?v?k.formatByString(i,v):k.format(i,"shortDate"):g}),[i,v,g,k]);return(0,p.jsxs)(e.Fragment,{children:["desktop"!==S&&(0,p.jsxs)(n_,(0,a.Z)({toolbarTitle:b,penIconClassName:t_.penIcon,isMobileKeyboardViewOpen:u,toggleMobileKeyboardView:h},w,{isLandscape:!1,children:[(0,p.jsxs)(r_,{children:[x.includes("year")&&(0,p.jsx)(sj,{tabIndex:-1,variant:"subtitle1",onClick:function(){return f("year")},selected:"year"===c,value:i?k.format(i,"year"):"\u2013"}),x.includes("day")&&(0,p.jsx)(sj,{tabIndex:-1,variant:"h4",onClick:function(){return f("day")},selected:"day"===c,value:C})]}),(0,p.jsxs)(i_,{children:[x.includes("hours")&&(0,p.jsx)(sj,{variant:"h3",onClick:function(){return f("hours")},selected:"hours"===c,value:i?(n=i,r?k.format(n,"hours12h"):k.format(n,"hours24h")):"--"}),x.includes("minutes")&&(0,p.jsxs)(e.Fragment,{children:[jj||(jj=(0,p.jsx)(o_,{variant:"h3",value:":"})),(0,p.jsx)(sj,{variant:"h3",onClick:function(){return f("minutes")},selected:"minutes"===c,value:i?k.format(i,"minutes"):"--"})]}),x.includes("seconds")&&(0,p.jsxs)(e.Fragment,{children:[_j||(_j=(0,p.jsx)(o_,{variant:"h3",value:":"})),(0,p.jsx)(sj,{variant:"h3",onClick:function(){return f("seconds")},selected:"seconds"===c,value:i?k.format(i,"seconds"):"--"})]})]})]})),O&&(0,p.jsx)(Jj,{dateRangeIcon:s,timeIcon:d,view:c,onChange:f})]})},s_=["onClick","onTouchStart"],l_=(0,g.ZP)(Zg,{skipSx:!0})((function(e){return{zIndex:e.theme.zIndex.modal}})),u_=(0,g.ZP)(J,{skipSx:!0})((function(e){var t=e.ownerState;return(0,a.Z)({transformOrigin:"top center",outline:0},"top"===t.placement&&{transformOrigin:"bottom center"})}));var c_=function(t){var n=t.anchorEl,i=t.children,s=t.containerRef,l=void 0===s?null:s,u=t.onClose,c=t.open,f=t.PopperProps,d=t.role,h=t.TransitionComponent,v=void 0===h?H:h,m=t.TrapFocusProps,g=t.PaperProps,y=void 0===g?{}:g;e.useEffect((function(){function e(e){"Escape"!==e.key&&"Esc"!==e.key||u()}return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[u]);var b=e.useRef(null);e.useEffect((function(){"tooltip"!==d&&(c?b.current=document.activeElement:b.current&&b.current instanceof HTMLElement&&b.current.focus())}),[c,d]);var x=function(t,n){var r=e.useRef(!1),i=e.useRef(!1),o=e.useRef(null),a=e.useRef(!1);e.useEffect((function(){if(t)return document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,!0),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("touchstart",e,!0),a.current=!1};function e(){a.current=!0}}),[t]);var s=(0,S.Z)((function(e){if(a.current){var t=i.current;i.current=!1;var s=(0,eu.Z)(o.current);!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s)||(r.current?r.current=!1:(e.composedPath?e.composedPath().indexOf(o.current)>-1:!s.documentElement.contains(e.target)||o.current.contains(e.target))||t||n(e))}})),l=function(){i.current=!0};return e.useEffect((function(){if(t){var e=(0,eu.Z)(o.current),n=function(){r.current=!0};return e.addEventListener("touchstart",s),e.addEventListener("touchmove",n),function(){e.removeEventListener("touchstart",s),e.removeEventListener("touchmove",n)}}}),[t,s]),e.useEffect((function(){if(t){var e=(0,eu.Z)(o.current);return e.addEventListener("click",s),function(){e.removeEventListener("click",s),i.current=!1}}}),[t,s]),[o,l,l]}(c,u),w=(0,r.Z)(x,3),k=w[0],O=w[1],C=w[2],M=e.useRef(null),P=(0,z.Z)(M,l),T=(0,z.Z)(P,k),E=t,Z=y.onClick,A=y.onTouchStart,R=(0,o.Z)(y,s_);return(0,p.jsx)(l_,(0,a.Z)({transition:!0,role:d,open:c,anchorEl:n,ownerState:E},f,{children:function(e){var t=e.TransitionProps,n=e.placement;return(0,p.jsx)(Du,(0,a.Z)({open:c,disableAutoFocus:!0,disableEnforceFocus:"tooltip"===d,isEnabled:function(){return!0}},m,{children:(0,p.jsx)(v,(0,a.Z)({},t,{children:(0,p.jsx)(u_,(0,a.Z)({tabIndex:-1,elevation:8,ref:T,onClick:function(e){O(e),Z&&Z(e)},onTouchStart:function(e){C(e),A&&A(e)},ownerState:(0,a.Z)({},E,{placement:n})},R,{children:i}))}))}))}}))};var f_=function(t){var n=t.children,r=t.DateInputProps,i=t.KeyboardDateInputComponent,o=t.onDismiss,s=t.open,l=t.PopperProps,u=t.PaperProps,c=t.TransitionComponent,f=e.useRef(null),d=(0,z.Z)(r.inputRef,f);return(0,p.jsxs)(Gj.Provider,{value:"desktop",children:[(0,p.jsx)(i,(0,a.Z)({},r,{inputRef:d})),(0,p.jsx)(c_,{role:"dialog",open:s,anchorEl:f.current,TransitionComponent:c,PopperProps:l,PaperProps:u,onClose:o,children:n})]})};function d_(e,t){return Array.isArray(t)?t.every((function(t){return-1!==e.indexOf(t)})):-1!==e.indexOf(t)}var h_=function(e,t){return function(n){"Enter"!==n.key&&" "!==n.key||(e(),n.preventDefault(),n.stopPropagation()),t&&t(n)}},p_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduceRight((function(e,t){return function(){return t(e.apply(void 0,arguments))}}),(function(e){return e}))};function v_(e,t){return function(n){e(n),t&&t(n)}}function m_(t){var n,i,o=t.onChange,a=t.onViewChange,s=t.openTo,l=t.view,u=t.views,c=(0,Tc.Z)({name:"Picker",state:"view",controlled:l,default:s&&d_(u,s)?s:u[0]}),f=(0,r.Z)(c,2),d=f[0],h=f[1],p=null!=(n=u[u.indexOf(d)-1])?n:null,v=null!=(i=u[u.indexOf(d)+1])?i:null,m=e.useCallback((function(e){h(e),a&&a(e)}),[h,a]),g=e.useCallback((function(){v&&m(v)}),[v,m]),y=e.useCallback((function(e,t){var n="finish"===t,r=n&&Boolean(v)?"partial":t;o(e,r),n&&g()}),[v,o,g]);return{handleChangeAndOpenNext:y,nextView:v,previousView:p,openNext:g,openView:d,setOpenView:m}}var g_=220,y_=36,b_={x:110,y:110},x_=b_.x-b_.x,w_=0-b_.y,k_=function(e,t,n){var r=t-b_.x,i=n-b_.y,o=Math.atan2(x_,w_)-Math.atan2(r,i),a=o*(180/Math.PI);a=Math.round(a/e)*e,a%=360;var s=Math.floor(a/e)||0,l=Math.pow(r,2)+Math.pow(i,2);return{value:s,distance:Math.sqrt(l)}},S_=["className","hasSelected","isInner","type","value"],O_=(0,g.ZP)("div",{skipSx:!0})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({width:2,backgroundColor:t.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},n.toAnimateTransform&&{transition:t.transitions.create(["transform","height"])})})),C_=(0,g.ZP)("div",{skipSx:!0})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({width:4,height:4,backgroundColor:t.palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - ".concat(18,"px)"),border:"".concat(16,"px solid ").concat(t.palette.primary.main),boxSizing:"content-box"},n.hasSelected&&{backgroundColor:t.palette.primary.main})})),M_=function(e){ay(n,e);var t=cy(n);function n(){var e;wu(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={toAnimateTransform:!1,previousType:void 0},e}return Su(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.isInner,r=e.type,i=e.value,s=(0,o.Z)(e,S_),l=(0,a.Z)({},this.props,this.state);return(0,p.jsx)(O_,(0,a.Z)({style:function(){var e=360/("hours"===r?12:60)*i;return"hours"===r&&i>12&&(e-=360),{height:Math.round((n?.26:.4)*g_),transform:"rotateZ(".concat(e,"deg)")}}(),className:t,ownerState:l},s,{children:(0,p.jsx)(C_,{ownerState:l})}))}}]),n}(e.Component);M_.getDerivedStateFromProps=function(e,t){return e.type!==t.previousType?{toAnimateTransform:!0,previousType:e.type}:{toAnimateTransform:!1,previousType:e.type}};var P_,T_,E_,Z_=M_,A_=(0,g.ZP)("div",{skipSx:!0})((function(e){return{display:"flex",justifyContent:"center",alignItems:"center",margin:e.theme.spacing(2)}})),R_=(0,g.ZP)("div",{skipSx:!0})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),D_=(0,g.ZP)("div",{skipSx:!0})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none","@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}),j_=(0,g.ZP)("div",{skipSx:!0})((function(e){return{width:6,height:6,borderRadius:"50%",backgroundColor:e.theme.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})),__=(0,g.ZP)(dt,{skipSx:!0})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({zIndex:1,position:"absolute",bottom:n.ampmInClock?64:8,left:8},"am"===n.meridiemMode&&{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:t.palette.primary.light}})})),N_=(0,g.ZP)(dt,{skipSx:!0})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({zIndex:1,position:"absolute",bottom:n.ampmInClock?64:8,right:8},"pm"===n.meridiemMode&&{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:t.palette.primary.light}})}));var L_=function(t){var n=t.ampm,r=t.ampmInClock,i=t.autoFocus,o=t.children,a=t.date,s=t.getClockLabelText,l=t.handleMeridiemChange,u=t.isTimeDisabled,c=t.meridiemMode,f=t.minutesStep,d=void 0===f?1:f,h=t.onChange,v=t.selectedId,m=t.type,g=t.value,y=t,b=_D(),x=e.useContext(Gj),w=e.useRef(!1),k=u(g,m),S=!n&&"hours"===m&&(g<1||g>12),O=function(e,t){u(e,m)||h(e,t)},C=function(e,t){var r=e.offsetX,i=e.offsetY;if(void 0===r){var o=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-o.left,i=e.changedTouches[0].clientY-o.top}var a="seconds"===m||"minutes"===m?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=k_(6*n,e,t).value;return r*n%60}(r,i,d):function(e,t,n){var r=k_(30,e,t),i=r.value,o=r.distance,a=i||12;return n?a%=12:o<74&&(a+=12,a%=24),a}(r,i,Boolean(n));O(a,t)},M=e.useMemo((function(){return"hours"===m||g%5===0}),[m,g]),P="minutes"===m?d:1,T=e.useRef(null);return(0,Ns.Z)((function(){i&&T.current.focus()}),[i]),(0,p.jsxs)(A_,{children:[(0,p.jsxs)(R_,{children:[(0,p.jsx)(D_,{onTouchMove:function(e){w.current=!0,C(e,"shallow")},onTouchEnd:function(e){w.current&&(C(e,"finish"),w.current=!1)},onMouseUp:function(e){w.current&&(w.current=!1),C(e.nativeEvent,"finish")},onMouseMove:function(e){e.buttons>0&&C(e.nativeEvent,"shallow")}}),!k&&(0,p.jsxs)(e.Fragment,{children:[P_||(P_=(0,p.jsx)(j_,{})),a&&(0,p.jsx)(Z_,{type:m,value:g,isInner:S,hasSelected:M})]}),(0,p.jsx)("div",{"aria-activedescendant":v,"aria-label":s(m,a,b),ref:T,role:"listbox",onKeyDown:function(e){if(!w.current)switch(e.key){case"Home":O(0,"partial"),e.preventDefault();break;case"End":O("minutes"===m?59:23,"partial"),e.preventDefault();break;case"ArrowUp":O(g+P,"partial"),e.preventDefault();break;case"ArrowDown":O(g-P,"partial"),e.preventDefault()}},tabIndex:0,children:o})]}),n&&("desktop"===x||r)&&(0,p.jsxs)(e.Fragment,{children:[(0,p.jsx)(__,{onClick:function(){return l("am")},disabled:null===c,ownerState:y,children:T_||(T_=(0,p.jsx)(Cs,{variant:"caption",children:"AM"}))}),(0,p.jsx)(N_,{disabled:null===c,onClick:function(){return l("pm")},ownerState:y,children:E_||(E_=(0,p.jsx)(Cs,{variant:"caption",children:"PM"}))})]})]})},I_=["className","disabled","index","inner","label","selected"],z_=(0,U.Z)("PrivateClockNumber",["selected","disabled"]),B_=(0,g.ZP)("span",{skipSx:!0})((function(e){var t,n=e.theme,r=e.ownerState;return(0,a.Z)((t={height:y_,width:y_,position:"absolute",left:"calc((100% - ".concat(y_,"px) / 2)"),display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:n.palette.text.primary,"&:focused":{backgroundColor:n.palette.background.paper}},(0,i.Z)(t,"&.".concat(z_.selected),{color:n.palette.primary.contrastText}),(0,i.Z)(t,"&.".concat(z_.disabled),{pointerEvents:"none",color:n.palette.text.disabled}),t),r.inner&&(0,a.Z)({},n.typography.body2,{color:n.palette.text.secondary}))}));var F_=function(e){var t=e.className,n=e.disabled,r=e.index,i=e.inner,s=e.label,l=e.selected,c=(0,o.Z)(e,I_),f=e,d=r%12/12*Math.PI*2-Math.PI/2,h=91*(i?.65:1),v=Math.round(Math.cos(d)*h),m=Math.round(Math.sin(d)*h);return(0,p.jsx)(B_,(0,a.Z)({className:(0,u.default)(t,l&&z_.selected,n&&z_.disabled),"aria-disabled":!!n||void 0,"aria-selected":!!l||void 0,role:"option",style:{transform:"translate(".concat(v,"px, ").concat(m+92,"px")},ownerState:f},c,{children:s}))},$_=function(e){for(var t=e.ampm,n=e.date,r=e.getClockNumberText,i=e.isDisabled,o=e.selectedId,a=e.utils,s=n?a.getHours(n):null,l=[],u=t?12:23,c=function(e){return null!==s&&(t?12===e?12===s||0===s:s===e||s-12===e:s===e)},f=t?1:0;f<=u;f+=1){var d=f.toString();0===f&&(d="00");var h=!t&&(0===f||f>12);d=a.formatNumber(d);var v=c(f);l.push((0,p.jsx)(F_,{id:v?o:void 0,index:f,inner:h,selected:v,disabled:i(f),label:d,"aria-label":r(d)},f))}return l},W_=function(e){var t=e.utils,n=e.value,i=e.isDisabled,o=e.getClockNumberText,a=e.selectedId,s=t.formatNumber;return[[5,s("05")],[10,s("10")],[15,s("15")],[20,s("20")],[25,s("25")],[30,s("30")],[35,s("35")],[40,s("40")],[45,s("45")],[50,s("50")],[55,s("55")],[0,s("00")]].map((function(e,t){var s=(0,r.Z)(e,2),l=s[0],u=s[1],c=l===n;return(0,p.jsx)(F_,{label:u,id:c?a:void 0,index:t+1,inner:!1,disabled:i(l),selected:c,"aria-label":o(u)},l)}))},H_=(0,ht.Z)((0,p.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),V_=(0,ht.Z)((0,p.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),q_=["children","className","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText"],U_=(0,g.ZP)("div")({display:"flex"}),Q_=(0,g.ZP)("div",{skipSx:!0})((function(e){return{width:e.theme.spacing(3)}})),X_=(0,g.ZP)(dt,{skipSx:!0})((function(e){var t=e.ownerState;return(0,a.Z)({},t.hidden&&{visibility:"hidden"})})),Y_=e.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.components,s=void 0===i?{}:i,l=e.componentsProps,u=void 0===l?{}:l,c=e.isLeftDisabled,f=e.isLeftHidden,d=e.isRightDisabled,h=e.isRightHidden,v=e.leftArrowButtonText,m=e.onLeftClick,g=e.onRightClick,y=e.rightArrowButtonText,b=(0,o.Z)(e,q_),w="rtl"===x().direction,k=u.leftArrowButton||{},S=s.LeftArrowIcon||H_,O=u.rightArrowButton||{},C=s.RightArrowIcon||V_,M=e;return(0,p.jsxs)(U_,(0,a.Z)({ref:t,className:r,ownerState:M},b,{children:[(0,p.jsx)(X_,(0,a.Z)({as:s.LeftArrowButton,size:"small","aria-label":v,title:v,disabled:c,edge:"end",onClick:m},k,{className:k.className,ownerState:(0,a.Z)({},M,k,{hidden:f}),children:w?(0,p.jsx)(C,{}):(0,p.jsx)(S,{})})),n?(0,p.jsx)(Cs,{variant:"subtitle1",component:"span",children:n}):(0,p.jsx)(Q_,{ownerState:M}),(0,p.jsx)(X_,(0,a.Z)({as:s.RightArrowButton,size:"small","aria-label":y,title:y,edge:"start",disabled:d,onClick:g},O,{className:O.className,ownerState:(0,a.Z)({},M,O,{hidden:h}),children:w?(0,p.jsx)(S,{}):(0,p.jsx)(C,{})}))]}))})),G_=function(e,t,n){if(n&&(e>=12?"pm":"am")!==t)return"am"===t?e-12:e+12;return e};function K_(e,t){return 3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e)}var J_=function(e,t){return function(n,r){return e?t.isAfter(n,r):K_(n,t)>K_(r,t)}};function eN(t,n,r){var i=_D(),o=function(e,t){return e?t.getHours(e)>=12?"pm":"am":null}(t,i),a=e.useCallback((function(e){var o=function(e,t,n,r){var i=G_(r.getHours(e),t,n);return r.setHours(e,i)}(t,e,Boolean(n),i);r(o,"partial")}),[n,t,r,i]);return{meridiemMode:o,handleMeridiemChange:a}}function tN(e){return(0,q.Z)("MuiClockPicker",e)}(0,U.Z)("MuiClockPicker",["arrowSwitcher"]);var nN=(0,g.ZP)(Y_,{name:"MuiClockPicker",slot:"ArrowSwticher",overridesResolver:function(e,t){return t.arrowSwitcher}})({position:"absolute",right:12,top:15}),rN=function(e,t,n){return"Select ".concat(e,". ").concat(null===t?"No time selected":"Selected time is ".concat(n.format(t,"fullTime")))},iN=function(e){return"".concat(e," minutes")},oN=function(e){return"".concat(e," hours")},aN=function(e){return"".concat(e," seconds")};var sN=function(t){var n=(0,w.Z)({props:t,name:"MuiClockPicker"}),r=n.ampm,i=void 0!==r&&r,o=n.ampmInClock,s=void 0!==o&&o,l=n.autoFocus,u=n.components,f=n.componentsProps,d=n.date,h=n.disableIgnoringDatePartForTimeValidation,v=void 0!==h&&h,m=n.getClockLabelText,g=void 0===m?rN:m,y=n.getHoursClockNumberText,b=void 0===y?oN:y,x=n.getMinutesClockNumberText,k=void 0===x?iN:x,S=n.getSecondsClockNumberText,O=void 0===S?aN:S,C=n.leftArrowButtonText,M=void 0===C?"open previous view":C,P=n.maxTime,T=n.minTime,E=n.minutesStep,Z=void 0===E?1:E,A=n.nextViewAvailable,R=n.onChange,D=n.openNextView,j=n.openPreviousView,_=n.previousViewAvailable,N=n.rightArrowButtonText,L=void 0===N?"open next view":N,I=n.shouldDisableTime,z=n.showViewSwitcher,B=n.view,F=LD(),$=_D(),W=$.setSeconds($.setMinutes($.setHours(F,0),0),0),H=d||W,V=eN(H,i,R),q=V.meridiemMode,U=V.handleMeridiemChange,Q=e.useCallback((function(e,t){if(null===d)return!1;var n=function(n){var r=J_(v,$);return Boolean(T&&r(T,n("end"))||P&&r(n("start"),P)||I&&I(e,t))};switch(t){case"hours":var r=G_(e,q,i);return n((function(e){return p_((function(e){return $.setHours(e,r)}),(function(t){return $.setMinutes(t,"start"===e?0:59)}),(function(t){return $.setSeconds(t,"start"===e?0:59)}))(d)}));case"minutes":return n((function(t){return p_((function(t){return $.setMinutes(t,e)}),(function(e){return $.setSeconds(e,"start"===t?0:59)}))(d)}));case"seconds":return n((function(){return $.setSeconds(d,e)}));default:throw new Error("not supported")}}),[i,d,v,P,q,T,I,$]),X=(0,Rs.Z)(),Y=e.useMemo((function(){switch(B){case"hours":var e=function(e,t){var n=G_(e,q,i);R($.setHours(H,n),t)};return{onChange:e,value:$.getHours(H),children:$_({date:d,utils:$,ampm:i,onChange:e,getClockNumberText:b,isDisabled:function(e){return Q(e,"hours")},selectedId:X})};case"minutes":var t=$.getMinutes(H),n=function(e,t){R($.setMinutes(H,e),t)};return{value:t,onChange:n,children:W_({utils:$,value:t,onChange:n,getClockNumberText:k,isDisabled:function(e){return Q(e,"minutes")},selectedId:X})};case"seconds":var r=$.getSeconds(H),o=function(e,t){R($.setSeconds(H,e),t)};return{value:r,onChange:o,children:W_({utils:$,value:r,onChange:o,getClockNumberText:O,isDisabled:function(e){return Q(e,"seconds")},selectedId:X})};default:throw new Error("You must provide the type for ClockView")}}),[B,$,d,i,b,k,O,q,R,H,Q,X]),G=n,K=function(e){var t=e.classes;return(0,c.Z)({arrowSwitcher:["arrowSwitcher"]},tN,t)}(G);return(0,p.jsxs)(e.Fragment,{children:[z&&(0,p.jsx)(nN,{className:K.arrowSwitcher,leftArrowButtonText:M,rightArrowButtonText:L,components:u,componentsProps:f,onLeftClick:j,onRightClick:D,isLeftDisabled:_,isRightDisabled:A,ownerState:G}),(0,p.jsx)(L_,(0,a.Z)({autoFocus:l,date:d,ampmInClock:s,type:B,ampm:i,getClockLabelText:g,minutesStep:Z,isTimeDisabled:Q,meridiemMode:q,handleMeridiemChange:U,selectedId:X},Y))]})},lN=["disabled","onSelect","selected","value"],uN=(0,U.Z)("PrivatePickersMonth",["root","selected"]),cN=(0,g.ZP)(Cs,{skipSx:!0})((function(e){var t=e.theme;return(0,a.Z)({flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,(0,i.Z)({margin:"8px 0",height:36,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:(0,V.Fq)(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{pointerEvents:"none",color:t.palette.text.secondary}},"&.".concat(uN.selected),{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:focus, &:hover":{backgroundColor:t.palette.primary.dark}}))})),fN=function(e){var t=e.disabled,n=e.onSelect,r=e.selected,i=e.value,s=(0,o.Z)(e,lN),l=function(){n(i)};return(0,p.jsx)(cN,(0,a.Z)({component:"button",className:(0,u.default)(uN.root,r&&uN.selected),tabIndex:t?-1:0,onClick:l,onKeyDown:h_(l),color:r?"primary":void 0,variant:r?"h5":"subtitle1",disabled:t},s))},dN=["className","date","disabled","disableFuture","disablePast","maxDate","minDate","onChange","onMonthChange","readOnly"];function hN(e){return(0,q.Z)("MuiMonthPicker",e)}(0,U.Z)("MuiMonthPicker",["root"]);var pN=(0,g.ZP)("div",{name:"MuiMonthPicker",slot:"Root",overridesResolver:function(e,t){return t.root}})({width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch",margin:"0 4px"}),vN=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiMonthPicker"}),r=n.className,i=n.date,s=n.disabled,l=n.disableFuture,f=n.disablePast,d=n.maxDate,h=n.minDate,v=n.onChange,m=n.onMonthChange,g=n.readOnly,y=(0,o.Z)(n,dN),b=n,x=function(e){var t=e.classes;return(0,c.Z)({root:["root"]},hN,t)}(b),k=_D(),S=LD(),O=k.getMonth(i||S),C=function(e){var t=k.startOfMonth(f&&k.isAfter(S,h)?S:h),n=k.startOfMonth(l&&k.isBefore(S,d)?S:d),r=k.isBefore(e,t),i=k.isAfter(e,n);return r||i},M=function(e){if(!g){var t=k.setMonth(i||S,e);v(t,"finish"),m&&m(t)}};return(0,p.jsx)(pN,(0,a.Z)({ref:t,className:(0,u.default)(x.root,r),ownerState:b},y,{children:k.getMonthArray(i||S).map((function(e){var t=k.getMonth(e),n=k.format(e,"monthShort");return(0,p.jsx)(fN,{value:t,selected:t===O,onSelect:M,disabled:s||C(e),children:n},n)}))}))})),mN=vN,gN=function(e){var t=e.date,n=e.disableFuture,r=e.disablePast,i=e.maxDate,o=e.minDate,a=e.shouldDisableDate,s=e.utils,l=s.startOfDay(s.date());r&&s.isBefore(o,l)&&(o=l),n&&s.isAfter(i,l)&&(i=l);var u=t,c=t;for(s.isBefore(t,o)&&(u=s.date(o),c=null),s.isAfter(t,i)&&(c&&(c=s.date(i)),u=null);u||c;){if(u&&s.isAfter(u,i)&&(u=null),c&&s.isBefore(c,o)&&(c=null),u){if(!a(u))return u;u=s.addDays(u,1)}if(c){if(!a(c))return c;c=s.addDays(c,-1)}}return l};function yN(e,t){var n=e.date(t);return e.isValid(n)?n:null}var bN=function(e,t,n){var r=n.disablePast,i=n.disableFuture,o=n.minDate,a=n.maxDate,s=n.shouldDisableDate,l=e.date(),u=e.date(t);if(null===u)return null;switch(!0){case!e.isValid(t):return"invalidDate";case Boolean(s&&s(u)):return"shouldDisableDate";case Boolean(i&&e.isAfterDay(u,l)):return"disableFuture";case Boolean(r&&e.isBeforeDay(u,l)):return"disablePast";case Boolean(o&&e.isBeforeDay(u,o)):return"minDate";case Boolean(a&&e.isAfterDay(u,a)):return"maxDate";default:return null}};function xN(t){var n,i=t.date,o=t.defaultCalendarMonth,s=t.disableFuture,l=t.disablePast,u=t.disableSwitchToMonthOnDayFocus,c=void 0!==u&&u,f=t.maxDate,d=t.minDate,h=t.onMonthChange,p=t.reduceAnimations,v=t.shouldDisableDate,m=LD(),g=_D(),y=e.useRef(function(e,t,n){return function(r,i){switch(i.type){case"changeMonth":return(0,a.Z)({},r,{slideDirection:i.direction,currentMonth:i.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return(0,a.Z)({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":if(null!==r.focusedDay&&n.isSameDay(i.focusedDay,r.focusedDay))return r;var o=Boolean(i.focusedDay)&&!t&&!n.isSameMonth(r.currentMonth,i.focusedDay);return(0,a.Z)({},r,{focusedDay:i.focusedDay,isMonthSwitchingAnimating:o&&!e,currentMonth:o?n.startOfMonth(i.focusedDay):r.currentMonth,slideDirection:n.isAfterDay(i.focusedDay,r.currentMonth)?"left":"right"});default:throw new Error("missing support")}}}(Boolean(p),c,g)).current,b=e.useReducer(y,{isMonthSwitchingAnimating:!1,focusedDay:i||m,currentMonth:g.startOfMonth(null!=(n=null!=i?i:o)?n:m),slideDirection:"left"}),x=(0,r.Z)(b,2),w=x[0],k=x[1],S=e.useCallback((function(e){k((0,a.Z)({type:"changeMonth"},e)),h&&h(e.newMonth)}),[h]),O=e.useCallback((function(e){var t=null!=e?e:m;g.isSameMonth(t,w.currentMonth)||S({newMonth:g.startOfMonth(t),direction:g.isAfterDay(t,w.currentMonth)?"left":"right"})}),[w.currentMonth,S,m,g]),C=e.useCallback((function(e){return null!==bN(g,e,{disablePast:l,disableFuture:s,minDate:d,maxDate:f,shouldDisableDate:v})}),[s,l,f,d,v,g]),M=e.useCallback((function(){k({type:"finishMonthSwitchingAnimation"})}),[]),P=e.useCallback((function(e){C(e)||k({type:"changeFocusedDay",focusedDay:e})}),[C]);return{calendarState:w,changeMonth:O,changeFocusedDay:P,isDateDisabled:C,onMonthSwitchingAnimationEnd:M,handleChangeMonth:S}}var wN=(0,U.Z)("PrivatePickersFadeTransitionGroup",["root"]),kN=(0,g.ZP)(Oe,{skipSx:!0})({display:"block",position:"relative"}),SN=function(e){var t=e.children,n=e.className,r=e.reduceAnimations,i=e.transKey;return r?t:(0,p.jsx)(kN,{className:(0,u.default)(wN.root,n),children:(0,p.jsx)(Ht,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:500,enter:250,exit:0},children:t},i)})},ON=["allowSameDateSelection","autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDayFocus","onDaySelect","onFocus","onKeyDown","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today"];function CN(e){return(0,q.Z)("MuiPickersDay",e)}var MN=(0,U.Z)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),PN=function(e){var t,n=e.theme,r=e.ownerState;return(0,a.Z)({},n.typography.caption,(t={width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:n.palette.background.paper,color:n.palette.text.primary,"&:hover":{backgroundColor:(0,V.Fq)(n.palette.action.active,n.palette.action.hoverOpacity)},"&:focus":(0,i.Z)({backgroundColor:(0,V.Fq)(n.palette.action.active,n.palette.action.hoverOpacity)},"&.".concat(MN.selected),{willChange:"background-color",backgroundColor:n.palette.primary.dark})},(0,i.Z)(t,"&.".concat(MN.selected),{color:n.palette.primary.contrastText,backgroundColor:n.palette.primary.main,fontWeight:n.typography.fontWeightMedium,transition:n.transitions.create("background-color",{duration:n.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:n.palette.primary.dark}}),(0,i.Z)(t,"&.".concat(MN.disabled),{color:n.palette.text.disabled}),t),!r.disableMargin&&{margin:"0 ".concat(2,"px")},r.outsideCurrentMonth&&r.showDaysOutsideCurrentMonth&&{color:n.palette.text.secondary},!r.disableHighlightToday&&r.today&&(0,i.Z)({},"&:not(.".concat(MN.selected,")"),{border:"1px solid ".concat(n.palette.text.secondary)}))},TN=function(e,t){var n=e.ownerState;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},EN=(0,g.ZP)(ot,{name:"MuiPickersDay",slot:"Root",overridesResolver:TN})(PN),ZN=(0,g.ZP)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:TN})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({},PN({theme:t,ownerState:n}),{visibility:"hidden"})})),AN=function(){},RN=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiPickersDay"}),i=r.allowSameDateSelection,s=void 0!==i&&i,l=r.autoFocus,f=void 0!==l&&l,d=r.className,h=r.day,v=r.disabled,m=void 0!==v&&v,g=r.disableHighlightToday,y=void 0!==g&&g,b=r.disableMargin,k=void 0!==b&&b,S=r.isAnimating,O=r.onClick,C=r.onDayFocus,M=void 0===C?AN:C,P=r.onDaySelect,T=r.onFocus,E=r.onKeyDown,Z=r.outsideCurrentMonth,A=r.selected,R=void 0!==A&&A,D=r.showDaysOutsideCurrentMonth,j=void 0!==D&&D,_=r.children,N=r.today,L=void 0!==N&&N,I=(0,o.Z)(r,ON),B=(0,a.Z)({},r,{allowSameDateSelection:s,autoFocus:f,disabled:m,disableHighlightToday:y,disableMargin:k,selected:R,showDaysOutsideCurrentMonth:j,today:L}),F=function(e){var t=e.selected,n=e.disableMargin,r=e.disableHighlightToday,i=e.today,o=e.outsideCurrentMonth,a=e.showDaysOutsideCurrentMonth,s=e.classes,l={root:["root",t&&"selected",!n&&"dayWithMargin",!r&&i&&"today",o&&a&&"dayOutsideMonth"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]};return(0,c.Z)(l,CN,s)}(B),$=_D(),W=e.useRef(null),H=(0,z.Z)(W,n);(0,Ns.Z)((function(){!f||m||S||Z||W.current.focus()}),[f,m,S,Z]);var V=x();return Z&&!j?(0,p.jsx)(ZN,{className:(0,u.default)(F.root,F.hiddenDaySpacingFiller,d),ownerState:B}):(0,p.jsx)(EN,(0,a.Z)({className:(0,u.default)(F.root,d),ownerState:B,ref:H,centerRipple:!0,disabled:m,"aria-label":_?void 0:$.format(h,"fullDate"),tabIndex:R?0:-1,onFocus:function(e){M&&M(h),T&&T(e)},onKeyDown:function(e){switch(void 0!==E&&E(e),e.key){case"ArrowUp":M($.addDays(h,-7)),e.preventDefault();break;case"ArrowDown":M($.addDays(h,7)),e.preventDefault();break;case"ArrowLeft":M($.addDays(h,"ltr"===V.direction?-1:1)),e.preventDefault();break;case"ArrowRight":M($.addDays(h,"ltr"===V.direction?1:-1)),e.preventDefault();break;case"Home":M($.startOfWeek(h)),e.preventDefault();break;case"End":M($.endOfWeek(h)),e.preventDefault();break;case"PageUp":M($.getNextMonth(h)),e.preventDefault();break;case"PageDown":M($.getPreviousMonth(h)),e.preventDefault()}},onClick:function(e){!s&&R||(m||P(h,"finish"),O&&O(e))}},I,{children:_||$.format(h,"dayOfMonth")}))})),DN=function(e,t){return e.autoFocus===t.autoFocus&&e.isAnimating===t.isAnimating&&e.today===t.today&&e.disabled===t.disabled&&e.selected===t.selected&&e.disableMargin===t.disableMargin&&e.showDaysOutsideCurrentMonth===t.showDaysOutsideCurrentMonth&&e.disableHighlightToday===t.disableHighlightToday&&e.className===t.className&&e.outsideCurrentMonth===t.outsideCurrentMonth&&e.onDayFocus===t.onDayFocus&&e.onDaySelect===t.onDaySelect},jN=e.memo(RN,DN);function _N(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var NN=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"===typeof n.className?n.className=_N(n.className,r):n.setAttribute("class",_N(n.className&&n.className.baseVal||"",r)));var n,r}))},LN=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1];e.removeClasses(i,"exit"),e.addClass(i,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1]?"appear":"enter";e.addClass(i,o,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1]?"appear":"enter";e.removeClasses(i,o),e.addClass(i,o,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,r="string"===typeof n,i=r?""+(r&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:r?i+"-active":n[t+"Active"],doneClassName:r?i+"-done":n[t+"Done"]}},e}M(n,t);var r=n.prototype;return r.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"===typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},r.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&NN(e,r),i&&NN(e,i),o&&NN(e,o)},r.render=function(){var t=this.props,n=(t.classNames,(0,o.Z)(t,["classNames"]));return e.createElement(N,(0,a.Z)({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(e.Component);LN.defaultProps={classNames:""},LN.propTypes={};var IN,zN=LN,BN=["children","className","reduceAnimations","slideDirection","transKey"],FN=(0,U.Z)("PrivatePickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),$N=(0,g.ZP)(Oe,{skipSx:!0})((function(e){var t,n=e.theme.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return t={display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0}},(0,i.Z)(t,"& .".concat(FN["slideEnter-left"]),{willChange:"transform",transform:"translate(100%)",zIndex:1}),(0,i.Z)(t,"& .".concat(FN["slideEnter-right"]),{willChange:"transform",transform:"translate(-100%)",zIndex:1}),(0,i.Z)(t,"& .".concat(FN.slideEnterActive),{transform:"translate(0%)",transition:n}),(0,i.Z)(t,"& .".concat(FN.slideExit),{transform:"translate(0%)"}),(0,i.Z)(t,"& .".concat(FN["slideExitActiveLeft-left"]),{willChange:"transform",transform:"translate(-100%)",transition:n,zIndex:0}),(0,i.Z)(t,"& .".concat(FN["slideExitActiveLeft-right"]),{willChange:"transform",transform:"translate(100%)",transition:n,zIndex:0}),t})),WN=function(t){var n=t.children,r=t.className,i=t.reduceAnimations,s=t.slideDirection,l=t.transKey,c=(0,o.Z)(t,BN);if(i)return(0,p.jsx)("div",{className:(0,u.default)(FN.root,r),children:n});var f={exit:FN.slideExit,enterActive:FN.slideEnterActive,enter:FN["slideEnter-".concat(s)],exitActive:FN["slideExitActiveLeft-".concat(s)]};return(0,p.jsx)($N,{className:(0,u.default)(FN.root,r),childFactory:function(t){return e.cloneElement(t,{classNames:f})},children:(0,p.jsx)(zN,(0,a.Z)({mountOnEnter:!0,unmountOnExit:!0,timeout:350,classNames:f},c,{children:n}),l)})},HN=(0,g.ZP)("div",{skipSx:!0})({display:"flex",justifyContent:"center",alignItems:"center"}),VN=(0,g.ZP)(Cs,{skipSx:!0})((function(e){return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.theme.palette.text.secondary}})),qN=(0,g.ZP)("div",{skipSx:!0})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:264}),UN=(0,g.ZP)(WN,{skipSx:!0})({minHeight:264}),QN=(0,g.ZP)("div",{skipSx:!0})({overflow:"hidden"}),XN=(0,g.ZP)("div",{skipSx:!0})({margin:"".concat(2,"px 0"),display:"flex",justifyContent:"center"});var YN=function(t){var n=t.allowSameDateSelection,r=t.autoFocus,i=t.onFocusedDayChange,o=t.className,s=t.currentMonth,l=t.date,u=t.disabled,c=t.disableHighlightToday,f=t.focusedDay,d=t.isDateDisabled,h=t.isMonthSwitchingAnimating,v=t.loading,m=t.onChange,g=t.onMonthSwitchingAnimationEnd,y=t.readOnly,b=t.reduceAnimations,x=t.renderDay,w=t.renderLoading,k=void 0===w?function(){return IN||(IN=(0,p.jsx)("span",{children:"..."}))}:w,S=t.showDaysOutsideCurrentMonth,O=t.slideDirection,C=t.TransitionProps,M=LD(),P=_D(),T=e.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"finish";if(!y){var n=Array.isArray(l)?e:P.mergeDateAndTime(e,l||M);m(n,t)}}),[l,M,m,y,P]),E=P.getMonth(s),Z=(Array.isArray(l)?l:[l]).filter(Boolean).map((function(e){return e&&P.startOfDay(e)})),A=E,R=e.useMemo((function(){return e.createRef()}),[A]);return(0,p.jsxs)(e.Fragment,{children:[(0,p.jsx)(HN,{children:P.getWeekdays().map((function(e,t){return(0,p.jsx)(VN,{"aria-hidden":!0,variant:"caption",children:e.charAt(0).toUpperCase()},e+t.toString())}))}),v?(0,p.jsx)(qN,{children:k()}):(0,p.jsx)(UN,(0,a.Z)({transKey:A,onExited:g,reduceAnimations:b,slideDirection:O,className:o},C,{nodeRef:R,children:(0,p.jsx)(QN,{ref:R,role:"grid",children:P.getWeekArray(s).map((function(e){return(0,p.jsx)(XN,{role:"row",children:e.map((function(e){var t={key:null==e?void 0:e.toString(),day:e,isAnimating:h,disabled:u||d(e),allowSameDateSelection:n,autoFocus:r&&null!==f&&P.isSameDay(e,f),today:P.isSameDay(e,M),outsideCurrentMonth:P.getMonth(e)!==E,selected:Z.some((function(t){return t&&P.isSameDay(t,e)})),disableHighlightToday:c,showDaysOutsideCurrentMonth:S,onDayFocus:i,onDaySelect:T};return x?x(e,Z,t):(0,p.jsx)("div",{role:"cell",children:(0,p.jsx)(jN,(0,a.Z)({},t))},t.key)}))},"week-".concat(e[0]))}))})}))]})},GN=(0,ht.Z)((0,p.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),KN=(0,g.ZP)("div",{skipSx:!0})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),JN=(0,g.ZP)("div",{skipSx:!0})((function(e){var t=e.theme;return(0,a.Z)({display:"flex",maxHeight:30,overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})})),eL=(0,g.ZP)("div",{skipSx:!0})({marginRight:6}),tL=(0,g.ZP)(dt,{skipSx:!0})({marginRight:"auto"}),nL=(0,g.ZP)(GN,{skipSx:!0})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"},"year"===n.openView&&{transform:"rotate(180deg)"})}));function rL(e){return"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view"}var iL=function(t){var n=t.components,r=void 0===n?{}:n,i=t.componentsProps,o=void 0===i?{}:i,s=t.currentMonth,l=t.disabled,u=t.disableFuture,c=t.disablePast,f=t.getViewSwitchingButtonText,d=void 0===f?rL:f,h=t.leftArrowButtonText,v=void 0===h?"Previous month":h,m=t.maxDate,g=t.minDate,y=t.onMonthChange,b=t.onViewChange,x=t.openView,w=t.reduceAnimations,k=t.rightArrowButtonText,S=void 0===k?"Next month":k,O=t.views,C=_D(),M=o.switchViewButton||{},P=function(t,n){var r=n.disableFuture,i=n.maxDate,o=_D();return e.useMemo((function(){var e=o.date(),n=o.startOfMonth(r&&o.isBefore(e,i)?e:i);return!o.isAfter(n,t)}),[r,i,t,o])}(s,{disableFuture:u||l,maxDate:m}),T=function(t,n){var r=n.disablePast,i=n.minDate,o=_D();return e.useMemo((function(){var e=o.date(),n=o.startOfMonth(r&&o.isAfter(e,i)?e:i);return!o.isBefore(n,t)}),[r,i,t,o])}(s,{disablePast:c||l,minDate:g});if(1===O.length&&"year"===O[0])return null;var E=t;return(0,p.jsxs)(KN,{ownerState:E,children:[(0,p.jsxs)(JN,{role:"presentation",onClick:function(){if(1!==O.length&&b&&!l)if(2===O.length)b(O.find((function(e){return e!==x}))||O[0]);else{var e=0!==O.indexOf(x)?0:1;b(O[e])}},ownerState:E,children:[(0,p.jsx)(SN,{reduceAnimations:w,transKey:C.format(s,"month"),children:(0,p.jsx)(eL,{"aria-live":"polite",ownerState:E,children:C.format(s,"month")})}),(0,p.jsx)(SN,{reduceAnimations:w,transKey:C.format(s,"year"),children:(0,p.jsx)(eL,{"aria-live":"polite",ownerState:E,children:C.format(s,"year")})}),O.length>1&&!l&&(0,p.jsx)(tL,(0,a.Z)({size:"small",as:r.SwitchViewButton,"aria-label":d(x)},M,{children:(0,p.jsx)(nL,{as:r.SwitchViewIcon,ownerState:E})}))]}),(0,p.jsx)(Ht,{in:"day"===x,children:(0,p.jsx)(Y_,{leftArrowButtonText:v,rightArrowButtonText:S,components:r,componentsProps:o,onLeftClick:function(){return y(C.getPreviousMonth(s),"right")},onRightClick:function(){return y(C.getNextMonth(s),"left")},isLeftDisabled:T,isRightDisabled:P})})]})};function oL(e){return(0,q.Z)("PrivatePickersYear",e)}var aL=(0,U.Z)("PrivatePickersYear",["root","modeMobile","modeDesktop","yearButton","disabled","selected"]),sL=(0,g.ZP)("div",{skipSx:!0})((function(e){var t=e.ownerState;return(0,a.Z)({flexBasis:"33.3%",display:"flex",alignItems:"center",justifyContent:"center"},"desktop"===(null==t?void 0:t.wrapperVariant)&&{flexBasis:"25%"})})),lL=(0,g.ZP)("button",{skipSx:!0})((function(e){var t,n=e.theme;return(0,a.Z)({color:"unset",backgroundColor:"transparent",border:0,outline:0},n.typography.subtitle1,(t={margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:(0,V.Fq)(n.palette.action.active,n.palette.action.hoverOpacity)}},(0,i.Z)(t,"&.".concat(aL.disabled),{color:n.palette.text.secondary}),(0,i.Z)(t,"&.".concat(aL.selected),{color:n.palette.primary.contrastText,backgroundColor:n.palette.primary.main,"&:focus, &:hover":{backgroundColor:n.palette.primary.dark}}),t))})),uL=e.forwardRef((function(t,n){var r=t.autoFocus,i=t.className,o=t.children,s=t.disabled,l=t.onClick,f=t.onKeyDown,d=t.selected,h=t.value,v=e.useRef(null),m=(0,z.Z)(v,n),g=e.useContext(Gj),y=(0,a.Z)({},t,{wrapperVariant:g}),b=function(e){var t=e.wrapperVariant,n=e.disabled,r=e.selected,i=e.classes,o={root:["root",t&&"mode".concat((0,O.Z)(t))],yearButton:["yearButton",n&&"disabled",r&&"selected"]};return(0,c.Z)(o,oL,i)}(y);return e.useEffect((function(){r&&v.current.focus()}),[r]),(0,p.jsx)(sL,{className:(0,u.default)(b.root,i),ownerState:y,children:(0,p.jsx)(lL,{ref:m,disabled:s,type:"button",tabIndex:d?0:-1,onClick:function(e){return l(e,h)},onKeyDown:function(e){return f(e,h)},className:b.yearButton,ownerState:y,children:o})})})),cL=uL;function fL(e){return(0,q.Z)("MuiYearPicker",e)}(0,U.Z)("MuiYearPicker",["root"]);var dL,hL=(0,g.ZP)("div",{name:"MuiYearPicker",slot:"Root",overridesResolver:function(e,t){return t.root}})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",margin:"0 4px"}),pL=e.forwardRef((function(t,n){var i=(0,w.Z)({props:t,name:"MuiYearPicker"}),o=i.autoFocus,a=i.className,s=i.date,l=i.disabled,f=i.disableFuture,d=i.disablePast,h=i.isDateDisabled,v=i.maxDate,m=i.minDate,g=i.onChange,y=i.onFocusedDayChange,b=i.onYearChange,k=i.readOnly,S=i.shouldDisableYear,O=i,C=function(e){var t=e.classes;return(0,c.Z)({root:["root"]},fL,t)}(O),M=LD(),P=x(),T=_D(),E=s||M,Z=T.getYear(E),A=e.useContext(Gj),R=e.useRef(null),D=e.useState(Z),j=(0,r.Z)(D,2),_=j[0],N=j[1],L=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"finish";if(!k){var r=function(e){g(e,n),y&&y(e||M),b&&b(e)},i=T.setYear(E,t);if(h(i)){var o=gN({utils:T,date:i,minDate:m,maxDate:v,disablePast:Boolean(d),disableFuture:Boolean(f),shouldDisableDate:h});r(o||M)}else r(i)}},I=e.useCallback((function(e){h(T.setYear(E,e))||N(e)}),[E,h,T]),z="desktop"===A?4:3,B=function(e,t){switch(e.key){case"ArrowUp":I(t-z),e.preventDefault();break;case"ArrowDown":I(t+z),e.preventDefault();break;case"ArrowLeft":I(t+("ltr"===P.direction?-1:1)),e.preventDefault();break;case"ArrowRight":I(t+("ltr"===P.direction?1:-1)),e.preventDefault()}};return(0,p.jsx)(hL,{ref:n,className:(0,u.default)(C.root,a),ownerState:O,children:T.getYearRange(m,v).map((function(e){var t=T.getYear(e),n=t===Z;return(0,p.jsx)(cL,{selected:n,value:t,onClick:L,onKeyDown:B,autoFocus:o&&t===_,ref:n?R:void 0,disabled:l||d&&T.isBeforeYear(e,M)||f&&T.isAfterYear(e,M)||S&&S(e),children:T.format(e,"year")},T.format(e,"year"))}))})})),vL=pL,mL=(0,g.ZP)("div")({overflowX:"hidden",width:320,maxHeight:358,display:"flex",flexDirection:"column",margin:"0 auto"}),gL=["autoFocus","onViewChange","date","disableFuture","disablePast","defaultCalendarMonth","loading","maxDate","minDate","onChange","onMonthChange","reduceAnimations","renderLoading","shouldDisableDate","shouldDisableYear","view","views","openTo","className"];function yL(e){return(0,q.Z)("MuiCalendarPicker",e)}(0,U.Z)("MuiCalendarPicker",["root","viewTransitionContainer"]);var bL=(0,g.ZP)(mL,{name:"MuiCalendarPicker",slot:"Root",overridesResolver:function(e,t){return t.root}})({display:"flex",flexDirection:"column"}),xL=(0,g.ZP)(SN,{name:"MuiCalendarPicker",slot:"ViewTransitionContainer",overridesResolver:function(e,t){return t.viewTransitionContainer}})({overflowY:"auto"}),wL="undefined"!==typeof navigator&&/(android)/i.test(navigator.userAgent),kL=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiCalendarPicker"}),i=r.autoFocus,s=r.onViewChange,l=r.date,f=r.disableFuture,d=void 0!==f&&f,h=r.disablePast,v=void 0!==h&&h,m=r.defaultCalendarMonth,g=r.loading,y=void 0!==g&&g,b=r.maxDate,x=r.minDate,k=r.onChange,S=r.onMonthChange,O=r.reduceAnimations,C=void 0===O?wL:O,M=r.renderLoading,P=void 0===M?function(){return dL||(dL=(0,p.jsx)("span",{children:"..."}))}:M,T=r.shouldDisableDate,E=r.shouldDisableYear,Z=r.view,A=r.views,R=void 0===A?["year","day"]:A,D=r.openTo,j=void 0===D?"day":D,_=r.className,N=(0,o.Z)(r,gL),L=_D(),I=ND(),z=null!=x?x:I.minDate,B=null!=b?b:I.maxDate,F=m_({view:Z,views:R,openTo:j,onChange:k,onViewChange:s}),$=F.openView,W=F.setOpenView,H=xN({date:l,defaultCalendarMonth:m,reduceAnimations:C,onMonthChange:S,minDate:z,maxDate:B,shouldDisableDate:T,disablePast:v,disableFuture:d}),V=H.calendarState,q=H.changeFocusedDay,U=H.changeMonth,Q=H.isDateDisabled,X=H.handleChangeMonth,Y=H.onMonthSwitchingAnimationEnd;e.useEffect((function(){if(l&&Q(l)){var e=gN({utils:L,date:l,minDate:z,maxDate:B,disablePast:v,disableFuture:d,shouldDisableDate:Q});k(e,"partial")}}),[]),e.useEffect((function(){l&&U(l)}),[l]);var G=r,K=function(e){var t=e.classes;return(0,c.Z)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},yL,t)}(G),J={className:_,date:l,disabled:N.disabled,disablePast:v,disableFuture:d,onChange:k,minDate:z,maxDate:B,onMonthChange:S,readOnly:N.readOnly};return(0,p.jsxs)(bL,{ref:n,className:(0,u.default)(K.root,_),ownerState:G,children:[(0,p.jsx)(iL,(0,a.Z)({},N,{views:R,openView:$,currentMonth:V.currentMonth,onViewChange:W,onMonthChange:function(e,t){return X({newMonth:e,direction:t})},minDate:z,maxDate:B,disablePast:v,disableFuture:d,reduceAnimations:C})),(0,p.jsx)(xL,{reduceAnimations:C,className:K.viewTransitionContainer,transKey:$,ownerState:G,children:(0,p.jsxs)("div",{children:["year"===$&&(0,p.jsx)(vL,(0,a.Z)({},N,{autoFocus:i,date:l,onChange:k,minDate:z,maxDate:B,disableFuture:d,disablePast:v,isDateDisabled:Q,shouldDisableYear:E,onFocusedDayChange:q})),"month"===$&&(0,p.jsx)(mN,(0,a.Z)({},J)),"day"===$&&(0,p.jsx)(YN,(0,a.Z)({},N,V,{autoFocus:i,onMonthSwitchingAnimationEnd:Y,onFocusedDayChange:q,reduceAnimations:C,date:l,onChange:k,isDateDisabled:Q,loading:y,renderLoading:P}))]})})]})})),SL=kL;function OL(e){return(0,q.Z)("MuiInputAdornment",e)}var CL=(0,U.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),ML=["children","className","component","disablePointerEvents","disableTypography","position","variant"],PL=(0,g.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["position".concat((0,O.Z)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:t.palette.action.active},"filled"===n.variant&&(0,i.Z)({},"&.".concat(CL.positionStart,"&:not(.").concat(CL.hiddenLabel,")"),{marginTop:16}),"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),TL=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiInputAdornment"}),i=r.children,s=r.className,l=r.component,f=void 0===l?"div":l,d=r.disablePointerEvents,h=void 0!==d&&d,v=r.disableTypography,m=void 0!==v&&v,g=r.position,y=r.variant,b=(0,o.Z)(r,ML),x=ys()||{},k=y;y&&x.variant,x&&!k&&(k=x.variant);var S=(0,a.Z)({},r,{hiddenLabel:x.hiddenLabel,size:x.size,disablePointerEvents:h,position:g,variant:k}),C=function(e){var t=e.classes,n=e.disablePointerEvents,r=e.hiddenLabel,i=e.position,o=e.size,a=e.variant,s={root:["root",n&&"disablePointerEvents",i&&"position".concat((0,O.Z)(i)),a,r&&"hiddenLabel",o&&"size".concat((0,O.Z)(o))]};return(0,c.Z)(s,OL,t)}(S);return(0,p.jsx)(gs.Provider,{value:null,children:(0,p.jsx)(PL,(0,a.Z)({as:f,ownerState:S,className:(0,u.default)(C.root,s),ref:n},b,{children:"string"!==typeof i||m?(0,p.jsxs)(e.Fragment,{children:["start"===g?(0,p.jsx)("span",{className:"notranslate",dangerouslySetInnerHTML:{__html:"&#8203;"}}):null,i]}):(0,p.jsx)(Cs,{color:"text.secondary",children:i})}))})})),EL=TL,ZL=function(t){var n=(0,e.useReducer)((function(e){return e+1}),0),i=(0,r.Z)(n,2)[1],o=(0,e.useRef)(null),a=t.replace,s=t.append,l=a?a(t.format(t.value)):t.format(t.value),u=(0,e.useRef)(!1);return(0,e.useLayoutEffect)((function(){if(null!=o.current){var e=(0,r.Z)(o.current,5),n=e[0],u=e[1],c=e[2],f=e[3],d=e[4];o.current=null;var h=f&&d,p=n.slice(u.selectionStart).search(t.accept||/\d/g),v=-1!==p?p:0,m=function(e){return(e.match(t.accept||/\d/g)||[]).join("")},g=m(n.substr(0,u.selectionStart)),y=function(e){for(var t=0,n=0,r=0;r!==g.length;++r){var i=e.indexOf(g[r],t)+1,o=m(e).indexOf(g[r],n)+1;o-n>1&&(i=t,o=n),n=Math.max(o,n),t=Math.max(t,i)}return t};if(!0===t.mask&&c&&!d){var b=y(n),x=m(n.substr(b))[0];b=n.indexOf(x,b),n="".concat(n.substr(0,b)).concat(n.substr(b+1))}var w=t.format(n);null==s||u.selectionStart!==n.length||d||(c?w=s(w):""===m(w.slice(-1))&&(w=w.slice(0,-1)));var k=a?a(w):w;return l===k?i():t.onChange(k),function(){var e=y(w);if(null!=t.mask&&(c||f&&!h))for(;w[e]&&""===m(w[e]);)e+=1;u.selectionStart=u.selectionEnd=e+(h?1+v:0)}}})),(0,e.useEffect)((function(){var e=function(e){"Delete"===e.code&&(u.current=!0)},t=function(e){"Delete"===e.code&&(u.current=!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),function(){document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),{value:null!=o.current?o.current[0]:l,onChange:function(e){var n=e.target.value;o.current=[n,e.target,n.length>l.length,u.current,l===t.format(n)],i()}}};function AL(t){var n=t.acceptRegex,i=void 0===n?/[\d]/gi:n,o=t.disabled,s=t.disableMaskedInput,l=t.ignoreInvalidInputs,u=t.inputFormat,c=t.inputProps,f=t.label,d=t.mask,h=t.onChange,p=t.rawValue,v=t.readOnly,m=t.rifmFormatter,g=t.TextFieldProps,y=t.validationError,b=_D(),x=e.useState(!1),w=(0,r.Z)(x,2),k=w[0],S=w[1],O=b.getFormatHelperText(u),C=e.useMemo((function(){return!(!d||s)&&function(e,t,n,r){var i=r.formatByString(r.date("2019-01-01T09:00:00.000"),t).replace(n,"_"),o=r.formatByString(r.date("2019-11-21T22:30:00.000"),t).replace(n,"_")===e&&i===e;return!o&&r.lib,o}(d,u,i,b)}),[i,s,u,d,b]),M=e.useMemo((function(){return C&&d?function(e,t){return function(n){return n.split("").map((function(r,i){if(t.lastIndex=0,i>e.length-1)return"";var o=e[i],a=e[i+1],s=t.test(r)?r:"",l="_"===o?s:o+s;return i===n.length-1&&a&&"_"!==a?l?l+a:"":l})).join("")}}(d,i):function(e){return e}}),[i,d,C]),P=zD(b,p,u),T=e.useState(P),E=(0,r.Z)(T,2),Z=E[0],A=E[1],R=e.useRef(P);e.useEffect((function(){R.current=P}),[P]);var D=!k,j=R.current!==P;D&&j&&(null===p||b.isValid(p))&&P!==Z&&A(P);var _=function(e){var t=""===e||e===d?"":e;A(t);var n=null===t?null:b.parse(t,u);l&&!b.isValid(n)||h(n,t||void 0)},N=ZL({value:Z,onChange:_,format:m||M}),L=C?N:{value:Z,onChange:function(e){_(e.currentTarget.value)}};return(0,a.Z)({label:f,disabled:o,error:y,inputProps:(0,a.Z)({},L,{disabled:o,placeholder:O,readOnly:v,type:C?"tel":"text"},c,{onFocus:v_((function(){S(!0)}),null==c?void 0:c.onFocus),onBlur:v_((function(){S(!1)}),null==c?void 0:c.onBlur)})},g)}var RL=["components","disableOpenPicker","getOpenDialogAriaText","InputAdornmentProps","InputProps","inputRef","openPicker","OpenPickerButtonProps","renderInput"],DL=e.forwardRef((function(e,t){var n=e.components,r=void 0===n?{}:n,s=e.disableOpenPicker,l=e.getOpenDialogAriaText,u=void 0===l?ID:l,c=e.InputAdornmentProps,f=e.InputProps,d=e.inputRef,h=e.openPicker,v=e.OpenPickerButtonProps,m=e.renderInput,g=(0,o.Z)(e,RL),y=_D(),b=AL(g),x=(null==c?void 0:c.position)||"end",w=r.OpenPickerIcon||GD;return m((0,a.Z)({ref:t,inputRef:d},b,{InputProps:(0,a.Z)({},f,(0,i.Z)({},"".concat(x,"Adornment"),s?void 0:(0,p.jsx)(EL,(0,a.Z)({position:x},c,{children:(0,p.jsx)(dt,(0,a.Z)({edge:x,disabled:g.disabled||g.readOnly,"aria-label":u(g.rawValue,y)},v,{onClick:h,children:(0,p.jsx)(w,{})}))}))))}))}));function jL(){return"undefined"===typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}function _L(t,n){var i=e.useState(jL),o=(0,r.Z)(i,2),a=o[0],s=o[1];return(0,Ns.Z)((function(){var e=function(){s(jL())};return window.addEventListener("orientationchange",e),function(){window.removeEventListener("orientationchange",e)}}),[]),!d_(t,["hours","minutes","seconds"])&&"landscape"===(n||a)}var NL=["autoFocus","className","date","DateInputProps","isMobileKeyboardViewOpen","onDateChange","onViewChange","openTo","orientation","showToolbar","toggleMobileKeyboardView","ToolbarComponent","toolbarFormat","toolbarPlaceholder","toolbarTitle","views"],LL=(0,g.ZP)("div")({padding:"16px 24px"}),IL=(0,g.ZP)("div",{skipSx:!0})((function(e){var t=e.ownerState;return(0,a.Z)({display:"flex",flexDirection:"column"},t.isLandscape&&{flexDirection:"row"})})),zL={fullWidth:!0},BL=function(e){return"year"===e||"month"===e||"day"===e};var FL=function(t){var n,r=t.autoFocus,i=t.date,s=t.DateInputProps,l=t.isMobileKeyboardViewOpen,u=t.onDateChange,c=t.onViewChange,f=t.openTo,d=t.orientation,h=t.showToolbar,v=t.toggleMobileKeyboardView,m=t.ToolbarComponent,g=void 0===m?function(){return null}:m,y=t.toolbarFormat,b=t.toolbarPlaceholder,x=t.toolbarTitle,w=t.views,k=(0,o.Z)(t,NL),S=_L(w,d),O=e.useContext(Gj),C="undefined"===typeof h?"desktop"!==O:h,M=e.useCallback((function(e,t){u(e,O,t)}),[u,O]),P=m_({view:void 0,views:w,openTo:f,onChange:M,onViewChange:e.useCallback((function(e){l&&v(),c&&c(e)}),[l,c,v])}),T=P.openView,E=P.nextView,Z=P.previousView,A=P.setOpenView,R=P.handleChangeAndOpenNext;return(0,p.jsxs)(IL,{ownerState:{isLandscape:S},children:[C&&(0,p.jsx)(g,(0,a.Z)({},k,{views:w,isLandscape:S,date:i,onChange:M,setOpenView:A,openView:T,toolbarTitle:x,toolbarFormat:y,toolbarPlaceholder:b,isMobileKeyboardViewOpen:l,toggleMobileKeyboardView:v})),(0,p.jsx)(mL,{children:l?(0,p.jsx)(LL,{children:(0,p.jsx)(DL,(0,a.Z)({},s,{ignoreInvalidInputs:!0,disableOpenPicker:!0,TextFieldProps:zL}))}):(0,p.jsxs)(e.Fragment,{children:[BL(T)&&(0,p.jsx)(SL,(0,a.Z)({autoFocus:r,date:i,onViewChange:A,onChange:R,view:T,views:w.filter(BL)},k)),(n=T,("hours"===n||"minutes"===n||"seconds"===n)&&(0,p.jsx)(sN,(0,a.Z)({},k,{autoFocus:r,date:i,view:T,onChange:R,openNextView:function(){return A(E)},openPreviousView:function(){return A(Z)},nextViewAvailable:!E,previousViewAvailable:!Z||BL(Z),showViewSwitcher:"desktop"===O})))]})})]})},$L=["minDate","maxDate","disableFuture","shouldDisableDate","disablePast"];function WL(e,t,n){var r=n.minDate,i=n.maxDate,a=n.disableFuture,s=n.shouldDisableDate,l=n.disablePast,u=(0,o.Z)(n,$L),c=bN(e,t,{minDate:r,maxDate:i,disableFuture:a,shouldDisableDate:s,disablePast:l});return null!==c?c:function(e,t,n){var r=n.minTime,i=n.maxTime,o=n.shouldDisableTime,a=n.disableIgnoringDatePartForTimeValidation,s=e.date(t),l=J_(Boolean(a),e);if(null===t)return null;switch(!0){case!e.isValid(t):return"invalidDate";case Boolean(r&&l(r,s)):return"minTime";case Boolean(i&&l(s,i)):return"maxTime";case Boolean(o&&o(e.getHours(s),"hours")):return"shouldDisableTime-hours";case Boolean(o&&o(e.getMinutes(s),"minutes")):return"shouldDisableTime-minutes";case Boolean(o&&o(e.getSeconds(s),"seconds")):return"shouldDisableTime-seconds";default:return null}}(e,t,u)}function HL(e,t){return e===t}function VL(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:HL,i=t.value,o=t.onError,a=_D(),s=e.useRef(null),l=n(a,i,t);return e.useEffect((function(){o&&!r(l,s.current)&&o(l,i),s.current=l}),[r,o,s,l,i]),l}function qL(e){return VL(e,WL,HL)}function UL(t){var n=t.open,i=t.onOpen,o=t.onClose,a=e.useRef("boolean"===typeof n).current,s=e.useState(!1),l=(0,r.Z)(s,2),u=l[0],c=l[1];return e.useEffect((function(){if(a){if("boolean"!==typeof n)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");c(n)}}),[a,n]),{isOpen:u,setIsOpen:e.useCallback((function(e){a||c(e),e&&i&&i(),!e&&o&&o()}),[a,i,o])}}function QL(t,n){var i=t.disableCloseOnSelect,o=t.onAccept,s=t.onChange,l=t.value,u=_D(),c=UL(t),f=c.isOpen,d=c.setIsOpen;function h(e){return{committed:e,draft:e}}var p=n.parseInput(u,l),v=e.useReducer((function(e,t){switch(t.type){case"reset":return h(t.payload);case"update":return(0,a.Z)({},e,{draft:t.payload});default:return e}}),p,h),m=(0,r.Z)(v,2),g=m[0],y=m[1];n.areValuesEqual(u,g.committed,p)||y({type:"reset",payload:p});var b=e.useState(!1),x=(0,r.Z)(b,2),w=x[0],k=x[1],S=e.useCallback((function(e,t){s(e),t&&(d(!1),o&&o(e))}),[o,s,d]),O=e.useMemo((function(){return{open:f,onClear:function(){return S(n.emptyValue,!0)},onAccept:function(){return S(g.draft,!0)},onDismiss:function(){return d(!1)},onSetToday:function(){var e=u.date();y({type:"update",payload:e}),S(e,!i)}}}),[S,i,f,u,g.draft,d,n.emptyValue]),C=e.useMemo((function(){return{date:g.draft,isMobileKeyboardViewOpen:w,toggleMobileKeyboardView:function(){return k(!w)},onDateChange:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"partial";if(y({type:"update",payload:e}),"partial"===n&&S(e,!1),"finish"===n){var r=!(null!=i?i:"mobile"===t);S(e,r)}}}}),[S,i,w,g.draft]),M={pickerProps:C,inputProps:e.useMemo((function(){return{onChange:s,open:f,rawValue:l,openPicker:function(){return d(!0)}}}),[s,f,l,d]),wrapperProps:O};return e.useDebugValue(M,(function(){return{MuiPickerState:{pickerDraft:g,other:M}}})),M}var XL=["onChange","PopperProps","ToolbarComponent","TransitionComponent","value"],YL={emptyValue:null,parseInput:yN,areValuesEqual:function(e,t,n){return e.isEqual(t,n)}},GL=e.forwardRef((function(e,t){var n=$D(e,"MuiDesktopDateTimePicker"),r=null!==qL(n),i=QL(n,YL),s=i.pickerProps,l=i.inputProps,u=i.wrapperProps,c=n.PopperProps,f=n.ToolbarComponent,d=void 0===f?a_:f,h=n.TransitionComponent,v=(0,o.Z)(n,XL),m=(0,a.Z)({},l,v,{ref:t,validationError:r});return(0,p.jsx)(f_,(0,a.Z)({},u,{DateInputProps:m,KeyboardDateInputComponent:DL,PopperProps:c,TransitionComponent:h,children:(0,p.jsx)(FL,(0,a.Z)({},s,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:d,DateInputProps:m},v))}))}));function KL(e){return(0,q.Z)("MuiDialogActions",e)}(0,U.Z)("MuiDialogActions",["root","spacing"]);var JL=["className","disableSpacing"],eI=(0,g.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,!n.disableSpacing&&t.spacing]}})((function(e){var t=e.ownerState;return(0,a.Z)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})})),tI=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiDialogActions"}),r=n.className,i=n.disableSpacing,s=void 0!==i&&i,l=(0,o.Z)(n,JL),f=(0,a.Z)({},n,{disableSpacing:s}),d=function(e){var t=e.classes,n={root:["root",!e.disableSpacing&&"spacing"]};return(0,c.Z)(n,KL,t)}(f);return(0,p.jsx)(eI,(0,a.Z)({className:(0,u.default)(d.root,r),ownerState:f,ref:t},l))})),nI=tI;function rI(e){return(0,q.Z)("MuiDialogContent",e)}(0,U.Z)("MuiDialogContent",["root","dividers"]);function iI(e){return(0,q.Z)("MuiDialogTitle",e)}var oI=(0,U.Z)("MuiDialogTitle",["root"]),aI=["className","dividers"],sI=(0,g.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.dividers&&t.dividers]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat(t.palette.divider),borderBottom:"1px solid ".concat(t.palette.divider)}:(0,i.Z)({},".".concat(oI.root," + &"),{paddingTop:0}))})),lI=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiDialogContent"}),r=n.className,i=n.dividers,s=void 0!==i&&i,l=(0,o.Z)(n,aI),f=(0,a.Z)({},n,{dividers:s}),d=function(e){var t=e.classes,n={root:["root",e.dividers&&"dividers"]};return(0,c.Z)(n,rI,t)}(f);return(0,p.jsx)(sI,(0,a.Z)({className:(0,u.default)(d.root,r),ownerState:f,ref:t},l))})),uI=lI;function cI(e){return(0,q.Z)("MuiDialog",e)}var fI=(0,U.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var dI,hI=(0,e.createContext)({}),pI=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],vI=(0,g.ZP)(qu,{name:"MuiDialog",slot:"Backdrop",overrides:function(e,t){return t.backdrop}})({zIndex:-1}),mI=(0,g.ZP)(Gu,{name:"MuiDialog",slot:"Root",overridesResolver:function(e,t){return t.root}})({"@media print":{position:"absolute !important"}}),gI=(0,g.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:function(e,t){var n=e.ownerState;return[t.container,t["scroll".concat((0,O.Z)(n.scroll))]]}})((function(e){var t=e.ownerState;return(0,a.Z)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})})),yI=(0,g.ZP)(J,{name:"MuiDialog",slot:"Paper",overridesResolver:function(e,t){var n=e.ownerState;return[t.paper,t["scrollPaper".concat((0,O.Z)(n.scroll))],t["paperWidth".concat((0,O.Z)(String(n.maxWidth)))],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&(0,i.Z)({maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):"".concat(t.breakpoints.values.xs).concat(t.breakpoints.unit)},"&.".concat(fI.paperScrollBody),(0,i.Z)({},t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})),"xs"!==n.maxWidth&&(0,i.Z)({maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit)},"&.".concat(fI.paperScrollBody),(0,i.Z)({},t.breakpoints.down(t.breakpoints.values[n.maxWidth]+64),{maxWidth:"calc(100% - 64px)"})),n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&(0,i.Z)({margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0},"&.".concat(fI.paperScrollBody),{margin:0,maxWidth:"100%"}))})),bI={enter:k.x9.enteringScreen,exit:k.x9.leavingScreen},xI=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiDialog"}),i=r["aria-describedby"],s=r["aria-labelledby"],l=r.BackdropComponent,f=r.BackdropProps,d=r.children,h=r.className,v=r.disableEscapeKeyDown,m=void 0!==v&&v,g=r.fullScreen,y=void 0!==g&&g,b=r.fullWidth,x=void 0!==b&&b,k=r.maxWidth,S=void 0===k?"sm":k,C=r.onBackdropClick,M=r.onClose,P=r.open,T=r.PaperComponent,E=void 0===T?J:T,Z=r.PaperProps,A=void 0===Z?{}:Z,R=r.scroll,D=void 0===R?"paper":R,j=r.TransitionComponent,_=void 0===j?Ht:j,N=r.transitionDuration,L=void 0===N?bI:N,I=r.TransitionProps,z=(0,o.Z)(r,pI),B=(0,a.Z)({},r,{disableEscapeKeyDown:m,fullScreen:y,fullWidth:x,maxWidth:S,scroll:D}),F=function(e){var t=e.classes,n=e.scroll,r=e.maxWidth,i=e.fullWidth,o=e.fullScreen,a={root:["root"],container:["container","scroll".concat((0,O.Z)(n))],paper:["paper","paperScroll".concat((0,O.Z)(n)),"paperWidth".concat((0,O.Z)(String(r))),i&&"paperFullWidth",o&&"paperFullScreen"]};return(0,c.Z)(a,cI,t)}(B),$=e.useRef(),W=(0,Rs.Z)(s),H=e.useMemo((function(){return{titleId:W}}),[W]);return(0,p.jsx)(mI,(0,a.Z)({className:(0,u.default)(F.root,h),BackdropProps:(0,a.Z)({transitionDuration:L,as:l},f),closeAfterTransition:!0,BackdropComponent:vI,disableEscapeKeyDown:m,onClose:M,open:P,ref:n,onClick:function(e){$.current&&($.current=null,C&&C(e),M&&M(e,"backdropClick"))},ownerState:B},z,{children:(0,p.jsx)(_,(0,a.Z)({appear:!0,in:P,timeout:L,role:"presentation"},I,{children:(0,p.jsx)(gI,{className:(0,u.default)(F.container),onMouseDown:function(e){$.current=e.target===e.currentTarget},ownerState:B,children:(0,p.jsx)(yI,(0,a.Z)({as:E,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":W},A,{className:(0,u.default)(F.paper,A.className),ownerState:B,children:(0,p.jsx)(hI.Provider,{value:H,children:d})}))})}))}))})),wI=xI,kI=(0,g.ZP)(wI,{skipSx:!0})((dI={},(0,i.Z)(dI,"& .".concat(fI.container),{outline:0}),(0,i.Z)(dI,"& .".concat(fI.paper),{outline:0,minWidth:320}),dI)),SI=(0,g.ZP)(uI,{skipSx:!0})({"&:first-of-type":{padding:0}}),OI=(0,g.ZP)(nI,{skipSx:!0})((function(e){var t=e.ownerState;return(0,a.Z)({},(t.clearable||t.showTodayButton)&&{justifyContent:"flex-start","& > *:first-of-type":{marginRight:"auto"}})})),CI=function(e){var t=e.cancelText,n=void 0===t?"Cancel":t,r=e.children,i=e.clearable,o=void 0!==i&&i,s=e.clearText,l=void 0===s?"Clear":s,u=e.DialogProps,c=void 0===u?{}:u,f=e.okText,d=void 0===f?"OK":f,h=e.onAccept,v=e.onClear,m=e.onDismiss,g=e.onSetToday,y=e.open,b=e.showTodayButton,x=void 0!==b&&b,w=e.todayText,k=void 0===w?"Today":w,S=e;return(0,p.jsxs)(kI,(0,a.Z)({open:y,onClose:m},c,{children:[(0,p.jsx)(SI,{children:r}),(0,p.jsxs)(OI,{ownerState:S,children:[o&&(0,p.jsx)(Pf,{onClick:v,children:l}),x&&(0,p.jsx)(Pf,{onClick:g,children:k}),n&&(0,p.jsx)(Pf,{onClick:m,children:n}),d&&(0,p.jsx)(Pf,{onClick:h,children:d})]})]}))},MI=["cancelText","children","clearable","clearText","DateInputProps","DialogProps","okText","onAccept","onClear","onDismiss","onSetToday","open","PureDateInputComponent","showTodayButton","todayText"];var PI=function(e){var t=e.cancelText,n=e.children,r=e.clearable,i=e.clearText,s=e.DateInputProps,l=e.DialogProps,u=e.okText,c=e.onAccept,f=e.onClear,d=e.onDismiss,h=e.onSetToday,v=e.open,m=e.PureDateInputComponent,g=e.showTodayButton,y=e.todayText,b=(0,o.Z)(e,MI);return(0,p.jsxs)(Gj.Provider,{value:"mobile",children:[(0,p.jsx)(m,(0,a.Z)({},b,s)),(0,p.jsx)(CI,{cancelText:t,clearable:r,clearText:i,DialogProps:l,okText:u,onAccept:c,onClear:f,onDismiss:d,onSetToday:h,open:v,showTodayButton:g,todayText:y,children:n})]})},TI=e.forwardRef((function(t,n){var r=t.disabled,i=t.getOpenDialogAriaText,o=void 0===i?ID:i,s=t.inputFormat,l=t.InputProps,u=t.inputRef,c=t.label,f=t.openPicker,d=t.rawValue,h=t.renderInput,p=t.TextFieldProps,v=void 0===p?{}:p,m=t.validationError,g=_D(),y=e.useMemo((function(){return(0,a.Z)({},l,{readOnly:!0})}),[l]),b=zD(g,d,s);return h((0,a.Z)({label:c,disabled:r,ref:n,inputRef:u,error:m,InputProps:y,inputProps:{disabled:r,readOnly:!0,"aria-readonly":!0,"aria-label":o(d,g),value:b,onClick:f,onKeyDown:h_(f)}},v))}));TI.propTypes={getOpenDialogAriaText:l().func,renderInput:l().func.isRequired};var EI=["ToolbarComponent","value","onChange"],ZI={emptyValue:null,parseInput:yN,areValuesEqual:function(e,t,n){return e.isEqual(t,n)}},AI=e.forwardRef((function(e,t){var n=$D(e,"MuiMobileDateTimePicker"),r=null!==qL(n),i=QL(n,ZI),s=i.pickerProps,l=i.inputProps,u=i.wrapperProps,c=n.ToolbarComponent,f=void 0===c?a_:c,d=(0,o.Z)(n,EI),h=(0,a.Z)({},l,d,{ref:t,validationError:r});return(0,p.jsx)(PI,(0,a.Z)({},d,u,{DateInputProps:h,PureDateInputComponent:TI,children:(0,p.jsx)(FL,(0,a.Z)({},s,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:f,DateInputProps:h},d))}))})),RI=["cancelText","clearable","clearText","desktopModeMediaQuery","DialogProps","okText","PopperProps","showTodayButton","todayText","TransitionComponent"],DI=e.forwardRef((function(t,n){var i=(0,w.Z)({props:t,name:"MuiDateTimePicker"}),s=i.cancelText,l=i.clearable,u=i.clearText,c=i.desktopModeMediaQuery,f=void 0===c?"@media (pointer: fine)":c,d=i.DialogProps,h=i.okText,v=i.PopperProps,m=i.showTodayButton,g=i.todayText,y=i.TransitionComponent,b=(0,o.Z)(i,RI),x=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,Tg.Z)(),o="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,a=(0,AD.Z)({name:"MuiUseMediaQuery",props:n,theme:i}),s=a.defaultMatches,l=void 0!==s&&s,u=a.matchMedia,c=void 0===u?o?window.matchMedia:null:u,f=a.noSsr,d=void 0!==f&&f,h=a.ssrMatchMedia,p=void 0===h?null:h,v="function"===typeof t?t(i):t;v=v.replace(/^@media( ?)/m,"");var m=e.useState((function(){return d&&o?c(v).matches:p?p(v).matches:l})),g=(0,r.Z)(m,2),y=g[0],b=g[1];return(0,Hs.Z)((function(){var e=!0;if(o){var t=c(v),n=function(){e&&b(t.matches)};return n(),t.addListener(n),function(){e=!1,t.removeListener(n)}}}),[v,c,o]),y}(f);return x?(0,p.jsx)(GL,(0,a.Z)({ref:n,PopperProps:v,TransitionComponent:y},b)):(0,p.jsx)(AI,(0,a.Z)({ref:n,cancelText:s,clearable:l,clearText:u,DialogProps:d,okText:h,showTodayButton:m,todayText:g},b))})),jI=DI,_I=n(6428);function NI(e){return(0,q.Z)("MuiLink",e)}var LI=(0,U.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),II=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"],zI={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},BI=(0,g.ZP)(Cs,{name:"MuiLink",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["underline".concat((0,O.Z)(n.underline))],"button"===n.component&&t.button]}})((function(e){var t=e.theme,n=e.ownerState,r=(0,_I.D)(t,"palette.".concat(function(e){return zI[e]||e}(n.color)))||n.color;return(0,a.Z)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&{textDecoration:"underline",textDecorationColor:"inherit"!==r?(0,V.Fq)(r,.4):void 0,"&:hover":{textDecorationColor:"inherit"}},"button"===n.component&&(0,i.Z)({position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"}},"&.".concat(LI.focusVisible),{outline:"auto"}))})),FI=e.forwardRef((function(t,n){var i=(0,w.Z)({props:t,name:"MuiLink"}),s=i.className,l=i.color,f=void 0===l?"primary":l,d=i.component,h=void 0===d?"a":d,v=i.onBlur,m=i.onFocus,g=i.TypographyClasses,y=i.underline,b=void 0===y?"always":y,x=i.variant,k=void 0===x?"inherit":x,S=(0,o.Z)(i,II),C=(0,ve.Z)(),M=C.isFocusVisibleRef,P=C.onBlur,T=C.onFocus,E=C.ref,Z=e.useState(!1),A=(0,r.Z)(Z,2),R=A[0],D=A[1],j=(0,z.Z)(n,E),_=(0,a.Z)({},i,{color:f,component:h,focusVisible:R,underline:b,variant:k}),N=function(e){var t=e.classes,n=e.component,r=e.focusVisible,i=e.underline,o={root:["root","underline".concat((0,O.Z)(i)),"button"===n&&"button",r&&"focusVisible"]};return(0,c.Z)(o,NI,t)}(_);return(0,p.jsx)(BI,(0,a.Z)({className:(0,u.default)(N.root,s),classes:g,color:f,component:h,onBlur:function(e){P(e),!1===M.current&&D(!1),v&&v(e)},onFocus:function(e){T(e),!0===M.current&&D(!0),m&&m(e)},ref:j,ownerState:_,variant:k},S))})),$I=FI,WI=Bp({inlineBtn:{"&:hover":{cursor:"pointer"}}}),HI=function(e){var t=e.handler,n=e.text,r=WI();return(0,p.jsx)($I,{component:"span",className:r.inlineBtn,onClick:t,children:n})},VI=function(){return(0,p.jsx)(Xp,{component:J,children:(0,p.jsxs)(nv,{"aria-label":"simple table",size:"small",children:[(0,p.jsx)(cv,{children:(0,p.jsxs)(mv,{children:[(0,p.jsx)(kv,{children:"Long"}),(0,p.jsx)(kv,{children:"Short"})]})}),(0,p.jsx)(Ev,{children:Cn.map((function(e,t){return(0,p.jsxs)(mv,{children:[(0,p.jsx)(kv,{component:"th",scope:"row",children:e.long}),(0,p.jsx)(kv,{children:e.short})]},t)}))})]})})},qI=function(t){var n=t.setDuration,i=Gn().time.duration,o=e.useState(null),a=(0,r.Z)(o,2),s=a[0],l=a[1],u=(0,e.useState)(i),c=(0,r.Z)(u,2),f=c[0],d=c[1],h=(0,e.useState)(!1),v=(0,r.Z)(h,2),m=v[0],g=v[1],y=Boolean(s),b=function(){l(null)};return(0,e.useEffect)((function(){d(i)}),[i]),(0,e.useEffect)((function(){if(!m){var e=function(e){var t=e.trim().split(" ").reduce((function(e,t){var n=Tn(t);return n?fn(fn({},e),n):fn({},e)}),{}),n=hn().duration(t).asMilliseconds();return n<kn?Rn(kn):n>Sn?Rn(Sn):e}(f);d(e),n(e)}}),[f,m]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(zt,{children:(0,p.jsx)(Yc,{label:"Duration",value:f,onChange:function(e){d(e.target.value)},variant:"standard",fullWidth:!0,onKeyUp:function(e){if("Enter"===e.key){var t=e.target;t.blur(),d(t.value)}},onBlur:function(){g(!1)},onFocus:function(){g(!0)}})}),(0,p.jsx)(zt,{mt:2,children:(0,p.jsxs)(Cs,{variant:"body2",children:[(0,p.jsx)("span",{"aria-owns":y?"mouse-over-popover":void 0,"aria-haspopup":"true",style:{cursor:"pointer"},onMouseEnter:function(e){l(e.currentTarget)},onMouseLeave:b,children:"Possible options:\xa0"}),(0,p.jsx)(lc,{open:y,anchorEl:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},style:{pointerEvents:"none"},onClose:b,disableRestoreFocus:!0,children:(0,p.jsx)(VI,{})}),(0,p.jsx)(HI,{handler:function(){return d("5m")},text:"5m"}),",\xa0",(0,p.jsx)(HI,{handler:function(){return d("1h")},text:"1h"}),",\xa0",(0,p.jsx)(HI,{handler:function(){return d("1h 30m")},text:"1h 30m"})]})})]})},UI=Bp({container:{display:"grid",gridTemplateColumns:"200px 1fr",gridGap:"20px",height:"100%",padding:"20px",borderRadius:"4px",borderColor:"#b9b9b9",borderStyle:"solid",borderWidth:"1px"},timeControls:{display:"grid",gridTemplateColumns:"1fr",gridTemplateRows:"auto 1fr",gridGap:"16px 0"},datePickers:{display:"grid",gridTemplateColumns:"repeat(auto-fit, 200px)",gridGap:"16px 0"},datePickerItem:{minWidth:"200px"}}),QI=function(t){var n=t.setDuration,i=UI(),o=(0,e.useState)(),a=(0,r.Z)(o,2),s=a[0],l=a[1],u=(0,e.useState)(),c=(0,r.Z)(u,2),f=c[0],d=c[1],h=Gn().time.period,v=h.end,m=h.start,g=Kn();return(0,e.useEffect)((function(){l(An(Dn(v)))}),[v]),(0,e.useEffect)((function(){d(An(Dn(m)))}),[m]),(0,p.jsxs)(zt,{className:i.container,children:[(0,p.jsx)(zt,{children:(0,p.jsx)(qI,{setDuration:n})}),(0,p.jsxs)(zt,{className:i.timeControls,children:[(0,p.jsxs)(zt,{className:i.datePickers,children:[(0,p.jsx)(zt,{className:i.datePickerItem,children:(0,p.jsx)(jI,{label:"From",ampm:!1,value:f,onChange:function(e){return g({type:"SET_FROM",payload:e})},onError:console.log,inputFormat:"DD/MM/YYYY HH:mm:ss",mask:"__/__/____ __:__:__",renderInput:function(e){return(0,p.jsx)(Yc,fn(fn({},e),{},{variant:"standard"}))},maxDate:hn()(s)})}),(0,p.jsx)(zt,{className:i.datePickerItem,children:(0,p.jsx)(jI,{label:"Until",ampm:!1,value:s,onChange:function(e){return g({type:"SET_UNTIL",payload:e})},onError:console.log,inputFormat:"DD/MM/YYYY HH:mm:ss",mask:"__/__/____ __:__:__",renderInput:function(e){return(0,p.jsx)(Yc,fn(fn({},e),{},{variant:"standard"}))}})})]}),(0,p.jsx)(zt,{children:(0,p.jsxs)(Cs,{variant:"body2",children:["Will be changed to current time for auto-refresh mode.\xa0",(0,p.jsx)(HI,{handler:function(){return g({type:"RUN_QUERY_TO_NOW"})},text:"Switch to now"})]})})]})]})},XI=n(6306),YI=n(3745),GI=n(5211),KI=n(3451),JI=n(1864),ez=["className","id"],tz=(0,g.ZP)(Cs,{name:"MuiDialogTitle",slot:"Root",overridesResolver:function(e,t){return t.root}})({padding:"16px 24px",flex:"0 0 auto"}),nz=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiDialogTitle"}),i=r.className,s=r.id,l=(0,o.Z)(r,ez),f=r,d=function(e){var t=e.classes;return(0,c.Z)({root:["root"]},iI,t)}(f),h=e.useContext(hI).titleId,v=void 0===h?s:h;return(0,p.jsx)(tz,(0,a.Z)({component:"h2",className:(0,u.default)(d.root,i),ownerState:f,ref:n,variant:"h6",id:v},l))})),rz=nz;function iz(e){return(0,q.Z)("MuiDialogContentText",e)}(0,U.Z)("MuiDialogContentText",["root"]);var oz=["children"],az=(0,g.ZP)(Cs,{shouldForwardProp:function(e){return(0,g.FO)(e)||"classes"===e},name:"MuiDialogContentText",slot:"Root",overridesResolver:function(e,t){return t.root}})({}),sz=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiDialogContentText"}),r=(0,o.Z)(n,oz),i=function(e){var t=e.classes,n=(0,c.Z)({root:["root"]},iz,t);return(0,a.Z)({},t,n)}(r);return(0,p.jsx)(az,(0,a.Z)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:r},n,{classes:i}))})),lz=sz,uz=(0,ht.Z)((0,p.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),cz=(0,ht.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),fz=(0,ht.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function dz(e){return(0,q.Z)("MuiCheckbox",e)}var hz=(0,U.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),pz=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size"],vz=(0,g.ZP)(of,{shouldForwardProp:function(e){return(0,g.FO)(e)||"classes"===e},name:"MuiCheckbox",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t["color".concat((0,O.Z)(n.color))]]}})((function(e){var t,n=e.theme,r=e.ownerState;return(0,a.Z)({color:n.palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:(0,V.Fq)("default"===r.color?n.palette.action.active:n.palette[r.color].main,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&(t={},(0,i.Z)(t,"&.".concat(hz.checked,", &.").concat(hz.indeterminate),{color:n.palette[r.color].main}),(0,i.Z)(t,"&.".concat(hz.disabled),{color:n.palette.action.disabled}),t))})),mz=(0,p.jsx)(cz,{}),gz=(0,p.jsx)(uz,{}),yz=(0,p.jsx)(fz,{}),bz=e.forwardRef((function(t,n){var r,i,s=(0,w.Z)({props:t,name:"MuiCheckbox"}),l=s.checkedIcon,u=void 0===l?mz:l,f=s.color,d=void 0===f?"primary":f,h=s.icon,v=void 0===h?gz:h,m=s.indeterminate,g=void 0!==m&&m,y=s.indeterminateIcon,b=void 0===y?yz:y,x=s.inputProps,k=s.size,S=void 0===k?"medium":k,C=(0,o.Z)(s,pz),M=g?b:v,P=g?b:u,T=(0,a.Z)({},s,{color:d,indeterminate:g,size:S}),E=function(e){var t=e.classes,n=e.indeterminate,r=e.color,i={root:["root",n&&"indeterminate","color".concat((0,O.Z)(r))]},o=(0,c.Z)(i,dz,t);return(0,a.Z)({},t,o)}(T);return(0,p.jsx)(vz,(0,a.Z)({type:"checkbox",inputProps:(0,a.Z)({"data-indeterminate":g},x),icon:e.cloneElement(M,{fontSize:null!=(r=M.props.fontSize)?r:S}),checkedIcon:e.cloneElement(P,{fontSize:null!=(i=P.props.fontSize)?i:S}),ownerState:T,ref:n},C,{classes:E}))})),xz=bz;var wz=["children","value","index"],kz=function(e){var t=e.children,n=e.value,r=e.index,i=fs(e,wz);return(0,p.jsx)("div",fn(fn({role:"tabpanel",hidden:n!==r,id:"auth-config-tabpanel-".concat(r),"aria-labelledby":"auth-config-tab-".concat(r)},i),{},{children:n===r&&(0,p.jsx)(zt,{py:2,children:t})}))},Sz=n(1163),Oz=n(8711),Cz={authMethod:"NO_AUTH",saveAuthLocally:!1},Mz=_n("AUTH_TYPE"),Pz=_n("BASIC_AUTH_DATA"),Tz=_n("BEARER_AUTH_DATA"),Ez=fn(fn({},Cz),{},{authMethod:Mz||Cz.authMethod,basicData:Pz,bearerData:Tz,saveAuthLocally:!(!Pz&&!Tz)}),Zz=function(){Nn(Ln)};function Az(e,t){switch(t.type){case"SET_BASIC_AUTH":return t.payload.checkbox?jn("BASIC_AUTH_DATA",t.payload.value):Zz(),jn("AUTH_TYPE","BASIC_AUTH"),fn(fn({},e),{},{authMethod:"BASIC_AUTH",basicData:t.payload.value});case"SET_BEARER_AUTH":return t.payload.checkbox?jn("BEARER_AUTH_DATA",t.payload.value):Zz(),jn("AUTH_TYPE","BEARER_AUTH"),fn(fn({},e),{},{authMethod:"BEARER_AUTH",bearerData:t.payload.value});case"SET_NO_AUTH":return!t.payload.checkbox&&Zz(),jn("AUTH_TYPE","NO_AUTH"),fn(fn({},e),{},{authMethod:"NO_AUTH"});default:throw new Error}}var Rz=(0,e.createContext)({}),Dz=function(){return(0,e.useContext)(Rz).state},jz=function(t){var n=t.children,i=(0,e.useReducer)(Az,Ez),o=(0,r.Z)(i,2),a=o[0],s=o[1],l=(0,e.useMemo)((function(){return{state:a,dispatch:s}}),[a,s]);return(0,p.jsx)(Rz.Provider,{value:l,children:n})},_z=Bp((function(){return{tabsContent:{height:"200px"}}})),Nz="Bearer ",Lz=[{title:"No auth",id:"NO_AUTH"},{title:"Basic Auth",id:"BASIC_AUTH"},{title:"Bearer Token",id:"BEARER_AUTH"}],Iz=function(t){var n=_z(),i=t.onClose,o=t.open,a=Dz(),s=a.saveAuthLocally,l=a.basicData,u=a.bearerData,c=a.authMethod,f=(0,e.useContext)(Rz).dispatch,d=(0,e.useState)(s),h=(0,r.Z)(d,2),v=h[0],m=h[1],g=(0,e.useState)(l||{password:"",login:""}),y=(0,r.Z)(g,2),b=y[0],x=y[1],w=(0,e.useState)((null===u||void 0===u?void 0:u.token)||Nz),k=(0,r.Z)(w,2),S=k[0],O=k[1],C=(0,e.useState)(Lz.findIndex((function(e){return e.id===c}))||0),M=(0,r.Z)(C,2),P=M[0],T=M[1],E=function(){i()};return(0,p.jsxs)(wI,{onClose:E,"aria-labelledby":"simple-dialog-title",open:o,children:[(0,p.jsx)(rz,{id:"simple-dialog-title",children:"Request Auth Settings"}),(0,p.jsxs)(uI,{children:[(0,p.jsx)(lz,{children:"This affects Authorization header sent to the server you specify. Not shown in URL and can be optionally stored on a client side"}),(0,p.jsx)(Qj,{value:P,onChange:function(e,t){T(t)},indicatorColor:"primary",textColor:"primary",children:Lz.map((function(e){return(0,p.jsx)(pj,{label:e.title},e.id)}))}),(0,p.jsxs)(zt,{p:0,display:"flex",flexDirection:"column",className:n.tabsContent,children:[(0,p.jsxs)(zt,{flexGrow:1,children:[(0,p.jsx)(kz,{value:P,index:0,children:(0,p.jsx)(Cs,{style:{fontStyle:"italic"},children:"No Authorization Header"})}),(0,p.jsxs)(kz,{value:P,index:1,children:[(0,p.jsxs)(Ul,{margin:"dense",fullWidth:!0,children:[(0,p.jsx)(Fl,{htmlFor:"basic-login",children:"User"}),(0,p.jsx)(fl,{id:"basic-login",startAdornment:(0,p.jsx)(EL,{position:"start",children:(0,p.jsx)(Sz.Z,{})}),required:!0,onChange:function(e){return x((function(t){return fn(fn({},t),{},{login:e.target.value||""})}))},value:(null===b||void 0===b?void 0:b.login)||""})]}),(0,p.jsxs)(Ul,{margin:"dense",fullWidth:!0,children:[(0,p.jsx)(Fl,{htmlFor:"basic-pass",children:"Password"}),(0,p.jsx)(fl,{id:"basic-pass",startAdornment:(0,p.jsx)(EL,{position:"start",children:(0,p.jsx)(Oz.Z,{})}),onChange:function(e){return x((function(t){return fn(fn({},t),{},{password:e.target.value||""})}))},value:(null===b||void 0===b?void 0:b.password)||""})]})]}),(0,p.jsx)(kz,{value:P,index:2,children:(0,p.jsx)(Yc,{id:"bearer-auth",label:"Bearer token",multiline:!0,fullWidth:!0,value:S,onChange:function(e){var t=e.target.value;t.startsWith(Nz)?O(t):O(Nz)},InputProps:{onPaste:function(e){var t=e.clipboardData.getData("text/plain");t.startsWith(Nz)?O(t):O(Nz+t),e.preventDefault()}},maxRows:6})})]}),(0,p.jsxs)(Ul,{children:[(0,p.jsx)(As,{control:(0,p.jsx)(xz,{checked:v,onChange:function(){return m((function(e){return!e}))},name:"checkedB",color:"primary"}),label:"Persist Auth Data Locally"}),(0,p.jsx)(Jl,{children:v?"Auth Data and the Selected method will be saved to LocalStorage":"Auth Data won't be saved. All previously saved Auth Data will be removed"})]})]})]}),(0,p.jsx)(nI,{children:(0,p.jsx)(Pf,{onClick:function(){switch(P){case 0:f({type:"SET_NO_AUTH",payload:{checkbox:v}});break;case 1:f({type:"SET_BASIC_AUTH",payload:{checkbox:v,value:b}});break;case 2:f({type:"SET_BEARER_AUTH",payload:{checkbox:v,value:{token:S}}})}E()},color:"primary",children:"Apply"})})]})},zz=function(){var e,t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";return JSON.parse(t)},Bz=function(){return!!Object.keys(zz()).length},Fz=function(t){var n=t.error,i=Bz(),o=zz().serverURL,a=Gn().serverUrl,s=Kn(),l=(0,e.useState)(!1),u=(0,r.Z)(l,2),c=u[0],f=u[1];return(0,e.useEffect)((function(){i&&s({type:"SET_SERVER",payload:o})}),[o]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(zt,{display:"grid",gridTemplateColumns:"1fr auto",gap:"4px",alignItems:"center",width:"100%",mb:2,minHeight:50,children:[(0,p.jsx)(Yc,{variant:"outlined",fullWidth:!0,label:"Server URL",value:a||"",disabled:i,error:n===TD.validServer||n===TD.emptyServer,inputProps:{style:{fontFamily:"Monospace"}},onChange:function(e){var t=e.target.value;s({type:"SET_SERVER",payload:t})}}),(0,p.jsx)(zt,{children:(0,p.jsx)($g,{title:"Request Auth Settings",children:(0,p.jsx)(dt,{onClick:function(){return f(!0)},children:(0,p.jsx)(JI.Z,{})})})})]}),(0,p.jsx)(Iz,{open:c,onClose:function(){return f(!1)}})]})},$z=function(){var t=Qa().customStep,n=Xa(),i=(0,e.useState)(!1),o=(0,r.Z)(i,2),a=o[0],s=o[1],l=Gn().time.period.step,u=(0,e.useCallback)(Kc()((function(e){var t=+e.target.value;t>0?(n({type:"SET_CUSTOM_STEP",payload:t}),s(!1)):s(!0)}),500),[t.value]);return(0,e.useEffect)((function(){t.enable||n({type:"SET_CUSTOM_STEP",payload:l||1})}),[l]),(0,p.jsxs)(zt,{display:"grid",gridTemplateColumns:"auto 120px",alignItems:"center",children:[(0,p.jsx)(As,{control:(0,p.jsx)(vf,{checked:t.enable,onChange:function(){s(!1),n({type:"TOGGLE_CUSTOM_STEP"})}}),label:"Override step value"}),t.enable&&(0,p.jsx)(Yc,{label:"Step value",type:"number",size:"small",variant:"outlined",defaultValue:t.value,error:a,helperText:a?"step is out of allowed range":" ",onChange:u})]})},Wz=function(){var e=Gn().queryControls,t=e.autocomplete,n=e.nocache,r=Kn();return(0,p.jsxs)(zt,{display:"flex",alignItems:"center",children:[(0,p.jsx)(zt,{children:(0,p.jsx)(As,{label:"Enable autocomplete",control:(0,p.jsx)(vf,{checked:t,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"}),jn("AUTOCOMPLETE",!t)}})})}),(0,p.jsx)(zt,{ml:2,children:(0,p.jsx)(As,{label:"Enable cache",control:(0,p.jsx)(vf,{checked:!n,onChange:function(){r({type:"NO_CACHE"}),jn("NO_CACHE",!n)}})})}),(0,p.jsx)(zt,{ml:2,children:(0,p.jsx)($z,{})})]})},Hz=function(t){var n=t.error,i=Gn(),o=i.serverUrl,a=i.query,s=i.queryHistory,l=i.queryControls.autocomplete,u=Kn(),c=(0,e.useState)(!0),f=(0,r.Z)(c,2),d=f[0],h=f[1],v=(0,e.useRef)(null),m=(0,e.useRef)(a);(0,e.useEffect)((function(){m.current=a}),[a]);var g=function(){u({type:"SET_QUERY_HISTORY",payload:a.map((function(e,t){var n=s[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat((0,me.Z)(n.values),[e]):n.values}}))}),u({type:"SET_QUERY",payload:a}),u({type:"RUN_QUERY"})},y=function(e,t){var n=(0,me.Z)(m.current);n[t]=e,u({type:"SET_QUERY",payload:n})},b=function(e,t){var n=s[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(y(i[o]||"",t),u({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))};return(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(Xv,{expanded:d,onChange:function(){return h((function(e){return!e}))},children:[(0,p.jsxs)(rm,{expandIcon:(0,p.jsx)(dt,{children:(0,p.jsx)(XI.Z,{})}),"aria-controls":"panel1a-content",id:"panel1a-header",sx:{alignItems:"flex-start",padding:"15px"},children:[(0,p.jsx)(zt,{mr:2,children:(0,p.jsx)(Cs,{variant:"h6",component:"h2",children:"Query Configuration"})}),(0,p.jsx)(zt,{flexGrow:1,onClick:function(e){return e.stopPropagation()},onFocusCapture:function(e){return e.stopPropagation()},children:(0,p.jsx)(xu,{disablePortal:!d,container:v.current,children:a.map((function(e,t){return(0,p.jsxs)(zt,{display:"grid",gridTemplateColumns:"1fr auto",gap:"4px",width:"100%",mb:t===a.length-1?0:2,children:[(0,p.jsx)(ZD,{server:o,query:a[t],index:t,oneLiner:!d,autocomplete:l,queryHistory:s[t],error:n,setHistoryIndex:b,runQuery:g,setQuery:y}),0===t&&(0,p.jsx)($g,{title:"Execute Query",children:(0,p.jsx)(dt,{onClick:g,children:(0,p.jsx)(KI.Z,{})})}),t>0&&(0,p.jsx)($g,{title:"Remove Query",children:(0,p.jsx)(dt,{onClick:function(){return function(e){var t=(0,me.Z)(m.current);t.splice(e,1),u({type:"SET_QUERY",payload:t})}(t)},children:(0,p.jsx)(YI.Z,{})})})]},t)}))})})]}),(0,p.jsx)(Ug,{children:(0,p.jsxs)(iy,{container:!0,columnSpacing:2,children:[(0,p.jsxs)(iy,{item:!0,xs:6,minWidth:400,children:[(0,p.jsx)(Fz,{error:n}),(0,p.jsx)("div",{ref:v}),a.length<2&&(0,p.jsx)(zt,{display:"inline-block",minHeight:"40px",mt:2,children:(0,p.jsxs)(Pf,{onClick:function(){return u({type:"SET_QUERY",payload:[].concat((0,me.Z)(m.current),[""])})},variant:"outlined",children:[(0,p.jsx)(GI.Z,{sx:{fontSize:16,marginRight:"4px"}}),(0,p.jsx)("span",{style:{lineHeight:1,paddingTop:"1px"},children:"Query"})]})})]}),(0,p.jsx)(iy,{item:!0,xs:!0,children:(0,p.jsx)(QI,{setDuration:function(e){return u({type:"SET_DURATION",payload:e})}})}),(0,p.jsx)(iy,{item:!0,xs:12,pt:1,children:(0,p.jsx)(Wz,{})})]})})]})})};function Vz(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,i)}function qz(e){var t,n,r,i=2;for("undefined"!==typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Uz(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Uz(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return Uz=function(e){this.s=e,this.n=e.next},Uz.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Uz(e)}var Qz=n(7757),Xz=n.n(Qz),Yz=Bz(),Gz=zz().serverURL,Kz=function(){var t=Gn(),n=t.query,i=t.displayType,o=t.serverUrl,a=t.time.period,s=t.queryControls,l=s.nocache,u=s.autoRefresh,c=Dz(),f=c.basicData,d=c.bearerData,h=c.authMethod,p=Qa().customStep,v=(0,e.useState)(!1),m=(0,r.Z)(v,2),g=m[0],y=m[1],b=(0,e.useState)(),x=(0,r.Z)(b,2),w=x[0],k=x[1],S=(0,e.useState)(),O=(0,r.Z)(S,2),C=O[0],M=O[1],P=(0,e.useState)(),T=(0,r.Z)(P,2),E=T[0],Z=T[1],A=(0,e.useState)(),R=(0,r.Z)(A,2),D=R[0],j=R[1];(0,e.useEffect)((function(){E&&(k(void 0),M(void 0))}),[E]);var _=(0,e.useMemo)((function(){if(!D||u)return!0;var e=(D.end-D.start)/3,t=e/(a.end-a.start)>=.7,n=a.end>D.end+e,r=a.start<D.start-e;return t||n||r}),[a]),N=function(){var e,t=(e=Xz().mark((function e(){var t,n,r,o,s,l;return Xz().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==L&&void 0!==L&&L.length){e.next=2;break}return e.abrupt("return");case 2:return y(!0),j(a),t=new Headers,"BASIC_AUTH"===h&&t.set("Authorization","Basic "+btoa("".concat((null===f||void 0===f?void 0:f.login)||"",":").concat((null===f||void 0===f?void 0:f.password)||""))),"BEARER_AUTH"===h&&t.set("Authorization",(null===d||void 0===d?void 0:d.token)||""),e.prev=7,e.delegateYield(Xz().mark((function e(){var a,u,c,f,d;return Xz().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(L.map((function(e){return fetch(e,{headers:t})})));case 2:a=e.sent,u=[],c=1,n=!1,r=!1,e.prev=7,s=qz(a);case 9:return e.next=11,s.next();case 11:if(!(n=!(l=e.sent).done)){e.next=20;break}return f=l.value,e.next=15,f.json();case 15:d=e.sent,f.ok?(Z(void 0),u.push.apply(u,(0,me.Z)(d.data.result.map((function(e){return e.group=c,e})))),c++):Z("".concat(d.errorType,"\r\n").concat(null===d||void 0===d?void 0:d.error));case 17:n=!1,e.next=9;break;case 20:e.next=26;break;case 22:e.prev=22,e.t0=e.catch(7),r=!0,o=e.t0;case 26:if(e.prev=26,e.prev=27,!n||null==s.return){e.next=31;break}return e.next=31,s.return();case 31:if(e.prev=31,!r){e.next=34;break}throw o;case 34:return e.finish(31);case 35:return e.finish(26);case 36:"chart"===i?k(u):M(u);case 37:case"end":return e.stop()}}),e,null,[[7,22,26,36],[27,,31,35]])}))(),"t0",9);case 9:e.next=14;break;case 11:e.prev=11,e.t1=e.catch(7),e.t1 instanceof Error&&Z("".concat(e.t1.name,": ").concat(e.t1.message));case 14:y(!1);case 15:case"end":return e.stop()}}),e,null,[[7,11]])})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Vz(o,r,i,a,s,"next",e)}function s(e){Vz(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}(),L=(0,e.useMemo)((function(){var e=Yz?Gz:o;if(a)if(e)if(n.every((function(e){return!e.trim()})))Z(TD.validQuery);else{if(function(e){var t;try{t=new URL(e)}catch(lF){return!1}return"http:"===t.protocol||"https:"===t.protocol}(e)){var t=(a.end-a.start)/2,r=fn(fn({},a),{},{start:a.start-t,end:a.end+t});return p.enable&&(r.step=p.value),n.filter((function(e){return e.trim()})).map((function(t){return"chart"===i?function(e,t,n,r){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"")}(e,t,r,l):function(e,t,n){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step)}(e,t,a)}))}Z(TD.validServer)}else Z(TD.emptyServer)}),[o,a,i,p]);return(0,e.useEffect)((function(){j(void 0)}),[n]),(0,e.useEffect)((function(){N()}),[o,i,p]),(0,e.useEffect)((function(){_&&N()}),[a]),{fetchUrl:L,isLoading:g,graphData:w,liveData:C,error:E}},Jz=function(t){var n=t.data,r=(0,e.useContext)(Pt).showInfoMessage,i=(0,e.useMemo)((function(){return JSON.stringify(n,null,2)}),[n]);return(0,p.jsxs)(zt,{position:"relative",children:[(0,p.jsx)(zt,{flexDirection:"column",justifyContent:"flex-end",display:"flex",style:{position:"fixed",right:"16px"},children:(0,p.jsx)(Pf,{variant:"outlined",onClick:function(e){navigator.clipboard.writeText(i),r("Formatted JSON has been copied"),e.preventDefault()},children:"Copy JSON"})}),(0,p.jsx)("pre",{children:i})]})};function eB(e){return(0,q.Z)("MuiAppBar",e)}(0,U.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);var tB=["className","color","enableColorOnDark","position"],nB=(0,g.ZP)(J,{name:"MuiAppBar",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["position".concat((0,O.Z)(n.position))],t["color".concat((0,O.Z)(n.color))]]}})((function(e){var t=e.theme,n=e.ownerState,r="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return(0,a.Z)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===n.position&&{position:"fixed",zIndex:t.zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===n.position&&{position:"absolute",zIndex:t.zIndex.appBar,top:0,left:"auto",right:0},"sticky"===n.position&&{position:"sticky",zIndex:t.zIndex.appBar,top:0,left:"auto",right:0},"static"===n.position&&{position:"static"},"relative"===n.position&&{position:"relative"},"default"===n.color&&{backgroundColor:r,color:t.palette.getContrastText(r)},n.color&&"default"!==n.color&&"inherit"!==n.color&&"transparent"!==n.color&&{backgroundColor:t.palette[n.color].main,color:t.palette[n.color].contrastText},"inherit"===n.color&&{color:"inherit"},"dark"===t.palette.mode&&!n.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===n.color&&(0,a.Z)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"}))})),rB=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiAppBar"}),r=n.className,i=n.color,s=void 0===i?"primary":i,l=n.enableColorOnDark,f=void 0!==l&&l,d=n.position,h=void 0===d?"fixed":d,v=(0,o.Z)(n,tB),m=(0,a.Z)({},n,{color:s,position:h,enableColorOnDark:f}),g=function(e){var t=e.color,n=e.position,r=e.classes,i={root:["root","color".concat((0,O.Z)(t)),"position".concat((0,O.Z)(n))]};return(0,c.Z)(i,eB,r)}(m);return(0,p.jsx)(nB,(0,a.Z)({square:!0,component:"header",ownerState:m,elevation:4,className:(0,u.default)(g.root,r,"fixed"===h&&"mui-fixed"),ref:t},v))})),iB=rB;function oB(e){return(0,q.Z)("MuiToolbar",e)}(0,U.Z)("MuiToolbar",["root","gutters","regular","dense"]);var aB=["className","component","disableGutters","variant"],sB=(0,g.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,a.Z)({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&(0,i.Z)({paddingLeft:t.spacing(2),paddingRight:t.spacing(2)},t.breakpoints.up("sm"),{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}),"dense"===n.variant&&{minHeight:48})}),(function(e){var t=e.theme;return"regular"===e.ownerState.variant&&t.mixins.toolbar})),lB=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiToolbar"}),r=n.className,i=n.component,s=void 0===i?"div":i,l=n.disableGutters,f=void 0!==l&&l,d=n.variant,h=void 0===d?"regular":d,v=(0,o.Z)(n,aB),m=(0,a.Z)({},n,{component:s,disableGutters:f,variant:h}),g=function(e){var t=e.classes,n={root:["root",!e.disableGutters&&"gutters",e.variant]};return(0,c.Z)(n,oB,t)}(m);return(0,p.jsx)(sB,(0,a.Z)({as:s,className:(0,u.default)(g.root,r),ref:t,ownerState:m},v))})),uB=lB,cB=n(2314),fB=function(e){return(0,p.jsxs)(zt,{position:"relative",display:"inline-flex",children:[(0,p.jsx)(un,fn({variant:"determinate"},e)),(0,p.jsx)(zt,{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",children:(0,p.jsx)(Cs,{variant:"caption",component:"div",children:"".concat(e.label,"s")})})]})},dB=Bp({colorizing:{color:"white"}}),hB=function(){var t=dB(),n=Kn(),i=Gn().queryControls.autoRefresh,o=(0,e.useState)(5),a=(0,r.Z)(o,2),s=a[0],l=a[1],u=(0,e.useState)(),c=(0,r.Z)(u,2),f=c[0],d=c[1],h=e.useState(100),v=(0,r.Z)(h,2),m=v[0],g=v[1];(0,e.useEffect)((function(){var e;return i&&(d((new Date).valueOf()),e=setInterval((function(){d((new Date).valueOf()),n({type:"RUN_QUERY_TO_NOW"})}),1e3*s)),function(){e&&clearInterval(e)}}),[s,i]),(0,e.useEffect)((function(){var e=setInterval((function(){if(i&&f){var e=((new Date).valueOf()-f)/1e3,t=Math.floor(e/s*100);g(t)}}),16);return function(){clearInterval(e)}}),[i,f,s]);var y=function(){l((function(e){switch(e){case 1:return 2;case 2:default:return 5;case 5:return 1}}))};return(0,p.jsxs)(zt,{display:"flex",alignItems:"center",children:[(0,p.jsx)(As,{control:(0,p.jsx)(vf,{className:t.colorizing,checked:i,onChange:function(){n({type:"TOGGLE_AUTOREFRESH"})}}),label:"Auto-refresh"}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(fB,{className:t.colorizing,label:s,value:m,onClick:function(){y()}}),(0,p.jsx)($g,{title:"Change delay refresh",children:(0,p.jsx)(zt,{ml:1,children:(0,p.jsx)(dt,{onClick:function(){y()},children:(0,p.jsx)(cB.Z,{style:{color:"white"}})})})})]})]})},pB=n(9344),vB=n(3657),mB=n(4839);function gB(e){return(0,q.Z)("MuiToggleButton",e)}var yB=(0,U.Z)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge"]),bB=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],xB=(0,g.ZP)(ot,{name:"MuiToggleButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["size".concat((0,O.Z)(n.size))]]}})((function(e){var t,n=e.theme,r=e.ownerState,o="standard"===r.color?n.palette.text.primary:n.palette[r.color].main;return(0,a.Z)({},n.typography.button,{borderRadius:n.shape.borderRadius,padding:11,border:"1px solid ".concat(n.palette.divider),color:n.palette.action.active},r.fullWidth&&{width:"100%"},(t={},(0,i.Z)(t,"&.".concat(yB.disabled),{color:n.palette.action.disabled,border:"1px solid ".concat(n.palette.action.disabledBackground)}),(0,i.Z)(t,"&:hover",{textDecoration:"none",backgroundColor:(0,V.Fq)(n.palette.text.primary,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}),(0,i.Z)(t,"&.".concat(yB.selected),{color:o,backgroundColor:(0,V.Fq)(o,n.palette.action.selectedOpacity),"&:hover":{backgroundColor:(0,V.Fq)(o,n.palette.action.selectedOpacity+n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(0,V.Fq)(o,n.palette.action.selectedOpacity)}}}),t),"small"===r.size&&{padding:7,fontSize:n.typography.pxToRem(13)},"large"===r.size&&{padding:15,fontSize:n.typography.pxToRem(15)})})),wB=e.forwardRef((function(e,t){var n=(0,w.Z)({props:e,name:"MuiToggleButton"}),r=n.children,i=n.className,s=n.color,l=void 0===s?"standard":s,f=n.disabled,d=void 0!==f&&f,h=n.disableFocusRipple,v=void 0!==h&&h,m=n.fullWidth,g=void 0!==m&&m,y=n.onChange,b=n.onClick,x=n.selected,k=n.size,S=void 0===k?"medium":k,C=n.value,M=(0,o.Z)(n,bB),P=(0,a.Z)({},n,{color:l,disabled:d,disableFocusRipple:v,fullWidth:g,size:S}),T=function(e){var t=e.classes,n=e.fullWidth,r=e.selected,i=e.disabled,o=e.size,a=e.color,s={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth","size".concat((0,O.Z)(o)),a]};return(0,c.Z)(s,gB,t)}(P);return(0,p.jsx)(xB,(0,a.Z)({className:(0,u.default)(T.root,i),disabled:d,focusRipple:!v,ref:t,onClick:function(e){b&&(b(e,C),e.defaultPrevented)||y&&y(e,C)},onChange:y,value:C,ownerState:P,"aria-pressed":x},M,{children:r}))})),kB=wB;function SB(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}function OB(e){return(0,q.Z)("MuiToggleButtonGroup",e)}var CB=(0,U.Z)("MuiToggleButtonGroup",["root","selected","vertical","disabled","grouped","groupedHorizontal","groupedVertical"]),MB=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],PB=(0,g.ZP)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[(0,i.Z)({},"& .".concat(CB.grouped),t.grouped),(0,i.Z)({},"& .".concat(CB.grouped),t["grouped".concat((0,O.Z)(n.orientation))]),t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((function(e){var t=e.ownerState,n=e.theme;return(0,a.Z)({display:"inline-flex",borderRadius:n.shape.borderRadius},"vertical"===t.orientation&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},(0,i.Z)({},"& .".concat(CB.grouped),(0,a.Z)({},"horizontal"===t.orientation?(0,i.Z)({"&:not(:first-of-type)":{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0}},"&.".concat(CB.selected," + .").concat(CB.grouped,".").concat(CB.selected),{borderLeft:0,marginLeft:0}):(0,i.Z)({"&:not(:first-of-type)":{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},"&:not(:last-of-type)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}},"&.".concat(CB.selected," + .").concat(CB.grouped,".").concat(CB.selected),{borderTop:0,marginTop:0}))))})),TB=e.forwardRef((function(t,n){var r=(0,w.Z)({props:t,name:"MuiToggleButtonGroup"}),i=r.children,s=r.className,l=r.color,f=void 0===l?"standard":l,d=r.disabled,h=void 0!==d&&d,v=r.exclusive,m=void 0!==v&&v,g=r.fullWidth,y=void 0!==g&&g,b=r.onChange,x=r.orientation,k=void 0===x?"horizontal":x,S=r.size,C=void 0===S?"medium":S,M=r.value,P=(0,o.Z)(r,MB),T=(0,a.Z)({},r,{disabled:h,fullWidth:y,orientation:k,size:C}),E=function(e){var t=e.classes,n=e.orientation,r=e.fullWidth,i=e.disabled,o={root:["root","vertical"===n&&"vertical",r&&"fullWidth"],grouped:["grouped","grouped".concat((0,O.Z)(n)),i&&"disabled"]};return(0,c.Z)(o,OB,t)}(T),Z=function(e,t){if(b){var n,r=M&&M.indexOf(t);M&&r>=0?(n=M.slice()).splice(r,1):n=M?M.concat(t):[t],b(e,n)}},A=function(e,t){b&&b(e,M===t?null:t)};return(0,p.jsx)(PB,(0,a.Z)({role:"group",className:(0,u.default)(E.root,s),ref:n,ownerState:T},P,{children:e.Children.map(i,(function(t){return e.isValidElement(t)?e.cloneElement(t,{className:(0,u.default)(E.grouped,t.props.className),onChange:m?A:Z,selected:void 0===t.props.selected?SB(t.props.value,M):t.props.selected,size:t.props.size||C,fullWidth:y,color:t.props.color||f,disabled:t.props.disabled||h}):null}))}))})),EB=TB;function ZB(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.components||!t.components[n]||!t.components[n].defaultProps)return r;var i,o=(0,a.Z)({},r),s=t.components[n].defaultProps;for(i in s)void 0===o[i]&&(o[i]=s[i]);return o}var AB=["defaultTheme","withTheme","name"],RB=["classes"],DB=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){var i=n.defaultTheme,s=n.withTheme,l=void 0!==s&&s,u=n.name,c=(0,o.Z)(n,AB);var f=u,d=Bp(t,(0,a.Z)({defaultTheme:i,Component:r,name:u||r.displayName,classNamePrefix:f},c)),h=e.forwardRef((function(e,t){var n,s=(0,o.Z)(e,RB),c=d((0,a.Z)({},r.defaultProps,e)),f=s;return("string"===typeof u||l)&&(n=(0,qd.Z)()||i,u&&(f=ZB({theme:n,name:u,props:s})),l&&!f.theme&&(f.theme=n)),(0,p.jsx)(r,(0,a.Z)({ref:t,classes:c},f))}));return Te()(h,r),h}},jB=DB({root:{display:"grid",gridTemplateColumns:"18px auto",gridGap:6,padding:"8px 12px",color:"white",lineHeight:"19px","&.Mui-selected":{color:"white"}}})(kB),_B=function(){var e=Gn().displayType,t=Kn();return(0,p.jsxs)(EB,{value:e,exclusive:!0,onChange:function(n,r){return t({type:"SET_DISPLAY_TYPE",payload:null!==r&&void 0!==r?r:e})},children:[(0,p.jsxs)(jB,{value:"chart","aria-label":"display as chart",children:[(0,p.jsx)(vB.Z,{}),(0,p.jsx)("span",{children:"Query Range as Chart"})]}),(0,p.jsxs)(jB,{value:"code","aria-label":"display as code",children:[(0,p.jsx)(mB.Z,{}),(0,p.jsx)("span",{children:"Instant Query as JSON"})]}),(0,p.jsxs)(jB,{value:"table","aria-label":"display as table",children:[(0,p.jsx)(pB.Z,{}),(0,p.jsx)("span",{children:"Instant Query as Table"})]})]})},NB=n(210),LB=function(e){var t=e.style;return(0,p.jsxs)(NB.Z,{style:t,viewBox:"0 0 20 24",children:[(0,p.jsx)("path",{d:"M8.27 10.58a2.8 2.8 0 0 0 1.7.59h.07c.65-.01 1.3-.26 1.69-.6 2.04-1.73 7.95-7.15 7.95-7.15C21.26 1.95 16.85.48 10.04.47h-.08C3.15.48-1.26 1.95.32 3.42c0 0 5.91 5.42 7.95 7.16"}),(0,p.jsx)("path",{d:"M11.73 13.51a2.8 2.8 0 0 1-1.7.6h-.06a2.8 2.8 0 0 1-1.7-.6C6.87 12.31 1.87 7.8 0 6.08v2.61c0 .29.11.67.3.85 1.28 1.17 6.2 5.67 7.97 7.18a2.8 2.8 0 0 0 1.7.6h.06c.66-.02 1.3-.27 1.7-.6 1.77-1.5 6.69-6.01 7.96-7.18.2-.18.3-.56.3-.85V6.08a615.27 615.27 0 0 1-8.26 7.43"}),(0,p.jsx)("path",{d:"M11.73 19.66a2.8 2.8 0 0 1-1.7.59h-.06a2.8 2.8 0 0 1-1.7-.6c-1.4-1.2-6.4-5.72-8.27-7.43v2.62c0 .28.11.66.3.84 1.28 1.17 6.2 5.68 7.97 7.19a2.8 2.8 0 0 0 1.7.59h.06c.66-.01 1.3-.26 1.7-.6 1.77-1.5 6.69-6 7.96-7.18.2-.18.3-.56.3-.84v-2.62a614.96 614.96 0 0 1-8.26 7.44"})]})},IB=Bp({logo:{position:"relative",display:"flex",alignItems:"center",color:"#fff",transition:".2s textDecoration"},issueLink:{position:"absolute",bottom:"6px",textAlign:"center",fontSize:"10px",opacity:".4",color:"inherit",textDecoration:"underline",transition:".2s opacity","&:hover":{opacity:".8"}}}),zB=function(){var e=IB();return(0,p.jsx)(iB,{position:"static",children:(0,p.jsxs)(uB,{children:[(0,p.jsxs)(zt,{display:"grid",alignItems:"center",justifyContent:"center",children:[(0,p.jsxs)($I,{href:"/",className:e.logo,children:[(0,p.jsx)(LB,{style:{color:"inherit",marginRight:"6px"}}),(0,p.jsxs)(Cs,{variant:"h5",children:[(0,p.jsx)("span",{style:{fontWeight:"bolder"},children:"VM"}),(0,p.jsx)("span",{style:{fontWeight:"lighter"},children:"UI"})]})]}),(0,p.jsx)($I,{className:e.issueLink,target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",children:"create an issue"})]}),(0,p.jsx)(zt,{ml:4,flexGrow:1,children:(0,p.jsx)(hB,{})}),(0,p.jsx)(_B,{})]})})},BB=function(){var e=Gn(),t=e.displayType,n=e.time.period,r=Kz(),i=r.isLoading,o=r.liveData,a=r.graphData,s=r.error;return(0,p.jsxs)(zt,{id:"homeLayout",children:[(0,p.jsx)(zB,{}),(0,p.jsxs)(zt,{p:4,display:"grid",gridTemplateRows:"auto 1fr",gap:"20px",style:{minHeight:"calc(100vh - 64px)"},children:[(0,p.jsx)(zt,{children:(0,p.jsx)(Hz,{error:s})}),(0,p.jsxs)(zt,{height:"100%",children:[i&&(0,p.jsx)(Ht,{in:i,style:{transitionDelay:i?"300ms":"0ms"},children:(0,p.jsx)(zt,{alignItems:"center",justifyContent:"center",flexDirection:"column",display:"flex",style:{width:"100%",maxWidth:"calc(100vw - 32px)",position:"absolute",height:"50%",background:"linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.7), rgba(255,255,255,0))"},children:(0,p.jsx)(un,{})})}),(0,p.jsxs)(zt,{height:"100%",bgcolor:"#fff",children:[s&&(0,p.jsx)(Mt,{color:"error",severity:"error",style:{fontSize:"14px",whiteSpace:"pre-wrap"},children:s}),a&&n&&"chart"===t&&(0,p.jsx)(Hp,{data:a}),o&&"code"===t&&(0,p.jsx)(Jz,{data:o}),o&&"table"===t&&(0,p.jsx)(Av,{data:o})]})]})]})]})},FB=(0,Ce.Z)({key:"css",prepend:!0});function $B(e){var t=e.injectFirst,n=e.children;return t?(0,p.jsx)(Me.C,{value:FB,children:n}):n}var WB=n(5693);var HB=function(t){var n=t.children,r=t.theme,i=(0,qd.Z)(),o=e.useMemo((function(){var e=null===i?r:function(e,t){return"function"===typeof t?t(e):(0,a.Z)({},e,t)}(i,r);return null!=e&&(e[Ud]=null!==i),e}),[r,i]);return(0,p.jsx)(WB.Z.Provider,{value:o,children:n})};function VB(e){var t=(0,y.Z)();return(0,p.jsx)(Me.T.Provider,{value:"object"===typeof t?t:{},children:e.children})}var qB=function(e){var t=e.children,n=e.theme;return(0,p.jsx)(HB,{theme:n,children:(0,p.jsx)(VB,{children:t})})},UB=(0,Lt.Z)({palette:{primary:{main:"#3F51B5"},secondary:{main:"#F50057"},error:{main:"#FF4141"}},components:{MuiFormHelperText:{styleOverrides:{root:{position:"absolute",top:"36px",left:"2px",margin:0}}},MuiInputLabel:{styleOverrides:{root:{fontSize:"12px",letterSpacing:"normal",lineHeight:"1"}}},MuiInputBase:{styleOverrides:{root:{"&.Mui-focused fieldset":{borderWidth:"1px !important"}}}},MuiSwitch:{defaultProps:{color:"secondary"}},MuiAccordion:{styleOverrides:{root:{boxShadow:"rgba(0, 0, 0, 0.16) 0px 1px 4px;"}}},MuiPaper:{styleOverrides:{elevation3:{boxShadow:"rgba(0, 0, 0, 0.2) 0px 3px 8px;"}}},MuiIconButton:{defaultProps:{size:"large"},styleOverrides:{sizeLarge:{borderRadius:"20%",height:"40px",width:"41px"},sizeMedium:{borderRadius:"20%"},sizeSmall:{borderRadius:"20%"}}}},typography:{fontSize:10}}),QB=function(e,t){return(0,a.Z)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&{colorScheme:e.palette.mode})},XB=function(e){return(0,a.Z)({color:e.palette.text.primary},e.typography.body1,{backgroundColor:e.palette.background.default,"@media print":{backgroundColor:e.palette.common.white}})};var YB=function(t){var n=(0,w.Z)({props:t,name:"MuiCssBaseline"}),r=n.children,i=n.enableColorScheme,o=void 0!==i&&i;return(0,p.jsxs)(e.Fragment,{children:[(0,p.jsx)(qs,{styles:function(e){return function(e){var t,n,r={html:QB(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,a.Z)({margin:0},XB(e),{"&::backdrop":{backgroundColor:e.palette.background.default}})},i=null==(t=e.components)||null==(n=t.MuiCssBaseline)?void 0:n.styleOverrides;return i&&(r=[r,i]),r}(e,o)}}),r]})},GB=n(7798),KB=n.n(GB),JB=n(3825),eF=n.n(JB),tF=n(8743),nF=n.n(tF);hn().extend(KB()),hn().extend(eF()),hn().extend(nF());var rF={normalDateWithWeekday:"ddd, MMM D",normalDate:"D MMMM",shortDate:"MMM D",monthAndDate:"MMMM D",dayOfMonth:"D",year:"YYYY",month:"MMMM",monthShort:"MMM",monthAndYear:"MMMM YYYY",weekday:"dddd",weekdayShort:"ddd",minutes:"mm",hours12h:"hh",hours24h:"HH",seconds:"ss",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDate:"ll",fullDateWithWeekday:"dddd, LL",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDate:"L",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},iF=function(e){var t=this,n=void 0===e?{}:e,r=n.locale,i=n.formats,o=n.instance;this.lib="dayjs",this.is12HourCycleInCurrentLocale=function(){var e,n;return/A|a/.test(null===(n=null===(e=t.rawDayJsInstance.Ls[t.locale||"en"])||void 0===e?void 0:e.formats)||void 0===n?void 0:n.LT)},this.getCurrentLocaleCode=function(){return t.locale||"en"},this.getFormatHelperText=function(e){return e.match(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?)|./g).map((function(e){var n,r;return"L"===e[0]&&null!==(r=null===(n=t.rawDayJsInstance.Ls[t.locale||"en"])||void 0===n?void 0:n.formats[e])&&void 0!==r?r:e})).join("").replace(/a/gi,"(a|p)m").toLocaleLowerCase()},this.parseISO=function(e){return t.dayjs(e)},this.toISO=function(e){return e.toISOString()},this.parse=function(e,n){return""===e?null:t.dayjs(e,n,t.locale)},this.date=function(e){return null===e?null:t.dayjs(e)},this.toJsDate=function(e){return e.toDate()},this.isValid=function(e){return t.dayjs(e).isValid()},this.isNull=function(e){return null===e},this.getDiff=function(e,t,n){return e.diff(t,n)},this.isAfter=function(e,t){return e.isAfter(t)},this.isBefore=function(e,t){return e.isBefore(t)},this.isAfterDay=function(e,t){return e.isAfter(t,"day")},this.isBeforeDay=function(e,t){return e.isBefore(t,"day")},this.isBeforeYear=function(e,t){return e.isBefore(t,"year")},this.isAfterYear=function(e,t){return e.isAfter(t,"year")},this.startOfDay=function(e){return e.clone().startOf("day")},this.endOfDay=function(e){return e.clone().endOf("day")},this.format=function(e,n){return t.formatByString(e,t.formats[n])},this.formatByString=function(e,n){return t.dayjs(e).format(n)},this.formatNumber=function(e){return e},this.getHours=function(e){return e.hour()},this.addSeconds=function(e,t){return t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")},this.addMinutes=function(e,t){return t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")},this.addHours=function(e,t){return t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")},this.addDays=function(e,t){return t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")},this.addWeeks=function(e,t){return t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")},this.addMonths=function(e,t){return t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")},this.setMonth=function(e,t){return e.set("month",t)},this.setHours=function(e,t){return e.set("hour",t)},this.getMinutes=function(e){return e.minute()},this.setMinutes=function(e,t){return e.clone().set("minute",t)},this.getSeconds=function(e){return e.second()},this.setSeconds=function(e,t){return e.clone().set("second",t)},this.getMonth=function(e){return e.month()},this.getDaysInMonth=function(e){return e.daysInMonth()},this.isSameDay=function(e,t){return e.isSame(t,"day")},this.isSameMonth=function(e,t){return e.isSame(t,"month")},this.isSameYear=function(e,t){return e.isSame(t,"year")},this.isSameHour=function(e,t){return e.isSame(t,"hour")},this.getMeridiemText=function(e){return"am"===e?"AM":"PM"},this.startOfMonth=function(e){return e.clone().startOf("month")},this.endOfMonth=function(e){return e.clone().endOf("month")},this.startOfWeek=function(e){return e.clone().startOf("week")},this.endOfWeek=function(e){return e.clone().endOf("week")},this.getNextMonth=function(e){return e.clone().add(1,"month")},this.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},this.getMonthArray=function(e){for(var n=[e.clone().startOf("year")];n.length<12;){var r=n[n.length-1];n.push(t.getNextMonth(r))}return n},this.getYear=function(e){return e.year()},this.setYear=function(e,t){return e.clone().set("year",t)},this.mergeDateAndTime=function(e,t){return e.hour(t.hour()).minute(t.minute()).second(t.second())},this.getWeekdays=function(){var e=t.dayjs().startOf("week");return[0,1,2,3,4,5,6].map((function(n){return t.formatByString(e.add(n,"day"),"dd")}))},this.isEqual=function(e,n){return null===e&&null===n||t.dayjs(e).isSame(n)},this.getWeekArray=function(e){for(var n=t.dayjs(e).clone().startOf("month").startOf("week"),r=t.dayjs(e).clone().endOf("month").endOf("week"),i=0,o=n,a=[];o.isBefore(r);){var s=Math.floor(i/7);a[s]=a[s]||[],a[s].push(o),o=o.clone().add(1,"day"),i+=1}return a},this.getYearRange=function(e,n){for(var r=t.dayjs(e).startOf("year"),i=t.dayjs(n).endOf("year"),o=[],a=r;a.isBefore(i);)o.push(a),a=a.clone().add(1,"year");return o},this.isWithinRange=function(e,t){var n=t[0],r=t[1];return e.isBetween(n,r,null,"[]")},this.rawDayJsInstance=o||hn(),this.dayjs=function(e,t){return t?function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.apply(void 0,n).locale(t)}:e}(this.rawDayJsInstance,r),this.locale=r,this.formats=Object.assign({},rF,i)},oF=iF,aF=function(){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(YB,{})," ",(0,p.jsxs)(DD,{dateAdapter:oF,children:[" ",(0,p.jsx)($B,{injectFirst:!0,children:(0,p.jsxs)(qB,{theme:UB,children:[" ",(0,p.jsxs)(er,{children:[" ",(0,p.jsxs)(jz,{children:[" ",(0,p.jsxs)(Ya,{children:[" ",(0,p.jsxs)(Tt,{children:[" ",(0,p.jsx)(BB,{})]})]})]})]})]})})]})]})},sF=function(e){e&&e instanceof Function&&n.e(27).then(n.bind(n,4027)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))};t.render((0,p.jsx)(e.StrictMode,{children:(0,p.jsx)(aF,{})}),document.getElementById("root")),sF()}()}();