Files
gemini-viewer-examples/static/js/main.abd1e4ad.js
pattern-x f8f89d5e41 Merge pull request #115 from pattern-x/feature/dat.gui
Add dat.gui, and enable to update dxf elevation for bim_2_overlay_wit…
2023-09-04 04:03:43 +00:00

2 lines
1022 KiB
JavaScript

!function(){var e={694:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},197:function(e,t,n){var r=n(9).Symbol;e.exports=r},950:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},95:function(e){e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},622:function(e){e.exports=function(e){return e.split("")}},240:function(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},66:function(e,t,n){var r=n(197),i=n(587),o=n(581),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},632:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},646:function(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},446:function(e,t,n){var r=n(197),i=n(950),o=n(629),a=n(152),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},737:function(e,t,n){var r=n(646);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},322:function(e,t,n){var r=n(737),i=n(302),o=n(580),a=n(518);e.exports=function(e){return function(t){t=a(t);var n=i(t)?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return s[e]()+l}}},810:function(e,t,n){var r=n(95),i=n(857),o=n(660),a=RegExp("['\u2019]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},868:function(e,t,n){var r=n(632)({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"});e.exports=r},32:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},587:function(e,t,n){var r=n(197),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},302:function(e){var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},137:function(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},581:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9:function(e,t,n){var r=n(32),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},580:function(e,t,n){var r=n(622),i=n(302),o=n(110);e.exports=function(e){return i(e)?o(e):r(e)}},110:function(e){var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+r+"|"+i+")"+"?",u="[\\ufe0e\\ufe0f]?",c=u+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")"+u+l+")*"),f="(?:"+[o+r+"?",r,a,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+f+c,"g");e.exports=function(e){return e.match(h)||[]}},29:function(e){var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+o+"]",s="\\d+",l="["+n+"]",u="["+r+"]",c="[^"+t+o+s+n+r+i+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",d="["+i+"]",p="(?:"+u+"|"+c+")",v="(?:"+d+"|"+c+")",m="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",g="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",O="[\\ufe0e\\ufe0f]?",b=O+y+("(?:\\u200d(?:"+["[^"+t+"]",f,h].join("|")+")"+O+y+")*"),w="(?:"+[l,f,h].join("|")+")"+b,k=RegExp([d+"?"+u+"+"+m+"(?="+[a,d,"$"].join("|")+")",v+"+"+g+"(?="+[a,d+p,"$"].join("|")+")",d+"?"+p+"+"+m,d+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",s,w].join("|"),"g");e.exports=function(e){return e.match(k)||[]}},567:function(e,t,n){var r=n(131),i=n(810)((function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)}));e.exports=i},131:function(e,t,n){var r=n(518),i=n(85);e.exports=function(e){return i(r(e).toLowerCase())}},857:function(e,t,n){var r=n(868),i=n(518),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},629:function(e){var t=Array.isArray;e.exports=t},141:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},152:function(e,t,n){var r=n(66),i=n(141);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},518:function(e,t,n){var r=n(446);e.exports=function(e){return null==e?"":r(e)}},85:function(e,t,n){var r=n(322)("toUpperCase");e.exports=r},660:function(e,t,n){var r=n(240),i=n(137),o=n(518),a=n(29);e.exports=function(e,t,n){return e=o(e),void 0===(t=n?void 0:t)?i(e)?a(e):r(e):e.match(t)||[]}},463:function(e,t,n){"use strict";var r=n(791),i=n(296);function o(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 a=new Set,s={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,d={},p={};function v(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 m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new v(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){m[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function O(e,t,n,r){var i=m.hasOwnProperty(t)?m[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!!f.call(p,e)||!f.call(d,e)&&(h.test(e)?p[e]=!0:(d[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(g,y);m[t]=new v(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(g,y);m[t]=new v(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(g,y);m[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),k=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),E=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var A=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function N(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var Z,D=Object.assign;function L(e){if(void 0===Z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Z=t&&t[1]||""}return"\n"+Z+e}var I=!1;function Y(e,t){if(!e||I)return"";I=!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(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var i=u.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]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{I=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function V(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=Y(e.type,!1);case 11:return e=Y(e.type.render,!1);case 1:return e=Y(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 S:return"Fragment";case k:return"Portal";case C:return"Profiler";case x:return"StrictMode";case T:return"Suspense";case $:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case Q:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case _:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return U(e(t))}catch(n){}}return null}function j(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===x?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function X(e){e._valueTracker||(e._valueTracker=function(e){var t=z(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 F(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=z(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function B(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 q(e,t){var n=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function H(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(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 G(e,t){null!=(t=t.checked)&&O(e,"checked",t,!1)}function K(e,t){G(e,t);var n=W(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")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(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 ee(e,t,n){"number"===t&&B(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(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=""+W(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 re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function oe(e,t){var n=W(t.value),r=W(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 ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(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 le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,fe=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.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 ce(e,t)}))}:ce);function he(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 de={animationIterationCount:!0,aspectRatio:!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},pe=["Webkit","ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ve(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(de).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),de[t]=de[e]}))}));var ge=D({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 ye(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function Oe(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}}var be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ke=null,Se=null,xe=null;function Ce(e){if(e=Oi(e)){if("function"!==typeof ke)throw Error(o(280));var t=e.stateNode;t&&(t=wi(t),ke(e.stateNode,e.type,t))}}function Pe(e){Se?xe?xe.push(e):xe=[e]:Se=e}function Ee(){if(Se){var e=Se,t=xe;if(xe=Se=null,Ce(e),t)for(e=0;e<t.length;e++)Ce(t[e])}}function Qe(e,t){return e(t)}function Te(){}var $e=!1;function _e(e,t,n){if($e)return e(t,n);$e=!0;try{return Qe(e,t,n)}finally{$e=!1,(null!==Se||null!==xe)&&(Te(),Ee())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=wi(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(o(231,t,typeof n));return n}var Ae=!1;if(c)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Ae=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ce){Ae=!1}function Ne(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 Ze=!1,De=null,Le=!1,Ie=null,Ye={onError:function(e){Ze=!0,De=e}};function Ve(e,t,n,r,i,o,a,s,l){Ze=!1,De=null,Ne.apply(Ye,arguments)}function Ue(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function je(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 We(e){if(Ue(e)!==e)throw Error(o(188))}function ze(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ue(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return We(i),e;if(a===r)return We(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?Xe(e):null}function Xe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Xe(e);if(null!==t)return t;e=e.sibling}return null}var Fe=i.unstable_scheduleCallback,Be=i.unstable_cancelCallback,qe=i.unstable_shouldYield,He=i.unstable_requestPaint,Ge=i.unstable_now,Ke=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=ft(s):0!==(o&=a)&&(r=ft(o))}else 0!==(a=n&~i)?r=ft(a):0!==o&&(r=ft(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function dt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function vt(){var e=ut;return 0===(4194240&(ut<<=1))&&(ut=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ot=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,kt,St,xt,Ct,Pt=!1,Et=[],Qt=null,Tt=null,$t=null,_t=new Map,Rt=new Map,At=[],Mt="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 Nt(e,t){switch(e){case"focusin":case"focusout":Qt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":$t=null;break;case"pointerover":case"pointerout":_t.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function Zt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=Oi(t))&&kt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Dt(e){var t=yi(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=je(n)))return e.blockedOn=t,void Ct(e.priority,(function(){St(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Lt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Oi(n))&&kt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function It(e,t,n){Lt(e)&&n.delete(t)}function Yt(){Pt=!1,null!==Qt&&Lt(Qt)&&(Qt=null),null!==Tt&&Lt(Tt)&&(Tt=null),null!==$t&&Lt($t)&&($t=null),_t.forEach(It),Rt.forEach(It)}function Vt(e,t){e.blockedOn===t&&(e.blockedOn=null,Pt||(Pt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Yt)))}function Ut(e){function t(t){return Vt(t,e)}if(0<Et.length){Vt(Et[0],e);for(var n=1;n<Et.length;n++){var r=Et[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Qt&&Vt(Qt,e),null!==Tt&&Vt(Tt,e),null!==$t&&Vt($t,e),_t.forEach(t),Rt.forEach(t),n=0;n<At.length;n++)(r=At[n]).blockedOn===e&&(r.blockedOn=null);for(;0<At.length&&null===(n=At[0]).blockedOn;)Dt(n),null===n.blockedOn&&At.shift()}var jt=b.ReactCurrentBatchConfig,Wt=!0;function zt(e,t,n,r){var i=Ot,o=jt.transition;jt.transition=null;try{Ot=1,Ft(e,t,n,r)}finally{Ot=i,jt.transition=o}}function Xt(e,t,n,r){var i=Ot,o=jt.transition;jt.transition=null;try{Ot=4,Ft(e,t,n,r)}finally{Ot=i,jt.transition=o}}function Ft(e,t,n,r){if(Wt){var i=qt(e,t,n,r);if(null===i)Wr(e,t,r,Bt,n),Nt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Qt=Zt(Qt,e,t,n,r,i),!0;case"dragenter":return Tt=Zt(Tt,e,t,n,r,i),!0;case"mouseover":return $t=Zt($t,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return _t.set(o,Zt(_t.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Rt.set(o,Zt(Rt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Nt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==i;){var o=Oi(i);if(null!==o&&wt(o),null===(o=qt(e,t,n,r))&&Wr(e,t,r,Bt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Bt=null;function qt(e,t,n,r){if(Bt=null,null!==(e=yi(e=we(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=je(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Bt=e,null}function Ht(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ke()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Gt=null,Kt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Kt,r=n.length,i="value"in Gt?Gt.value:Gt.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 Jt=i.slice(e,1<t?1-t:void 0)}function tn(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 nn(){return!0}function rn(){return!1}function on(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)?nn:rn,this.isPropagationStopped=rn,this}return D(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=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(un),fn=D({},un,{view:0,detail:0}),hn=on(fn),dn=D({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,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!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=on(dn),vn=on(D({},dn,{dataTransfer:0})),mn=on(D({},fn,{relatedTarget:0})),gn=on(D({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=D({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),On=on(yn),bn=on(D({},un,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kn={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"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function Cn(){return xn}var Pn=D({},fn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?kn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),En=on(Pn),Qn=on(D({},dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=on(D({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),$n=on(D({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),_n=D({},dn,{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}),Rn=on(_n),An=[9,13,27,32],Mn=c&&"CompositionEvent"in window,Nn=null;c&&"documentMode"in document&&(Nn=document.documentMode);var Zn=c&&"TextEvent"in window&&!Nn,Dn=c&&(!Mn||Nn&&8<Nn&&11>=Nn),Ln=String.fromCharCode(32),In=!1;function Yn(e,t){switch(e){case"keyup":return-1!==An.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var jn={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 Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!jn[e.type]:"textarea"===t}function zn(e,t,n,r){Pe(r),0<(t=Xr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xn=null,Fn=null;function Bn(e){Lr(e,0)}function qn(e){if(F(bi(e)))return e}function Hn(e,t){if("change"===e)return t}var Gn=!1;if(c){var Kn;if(c){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"===typeof er.oninput}Kn=Jn}else Kn=!1;Gn=Kn&&(!document.documentMode||9<document.documentMode)}function tr(){Xn&&(Xn.detachEvent("onpropertychange",nr),Fn=Xn=null)}function nr(e){if("value"===e.propertyName&&qn(Fn)){var t=[];zn(t,Fn,e,we(e)),_e(Bn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Fn=n,(Xn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qn(Fn)}function or(e,t){if("click"===e)return qn(t)}function ar(e,t){if("input"===e||"change"===e)return qn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(sr(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++){var i=n[r];if(!f.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(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=ur(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=B();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=B((e=t.contentWindow).document)}return t}function dr(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)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fr(n.ownerDocument.documentElement,n)){if(null!==r&&dr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=cr(n,o);var a=cr(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vr=c&&"documentMode"in document&&11>=document.documentMode,mr=null,gr=null,yr=null,Or=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Or||null==mr||mr!==B(r)||("selectionStart"in(r=mr)&&dr(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},yr&&lr(yr,r)||(yr=r,0<(r=Xr(gr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Sr={},xr={};function Cr(e){if(Sr[e])return Sr[e];if(!kr[e])return e;var t,n=kr[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return Sr[e]=n[t];return e}c&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);var Pr=Cr("animationend"),Er=Cr("animationiteration"),Qr=Cr("animationstart"),Tr=Cr("transitionend"),$r=new Map,_r="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){$r.set(e,t),l(t,[e])}for(var Ar=0;Ar<_r.length;Ar++){var Mr=_r[Ar];Rr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Rr(Pr,"onAnimationEnd"),Rr(Er,"onAnimationIteration"),Rr(Qr,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(Tr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Zr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Nr));function Dr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,u){if(Ve.apply(this,arguments),Ze){if(!Ze)throw Error(o(198));var c=De;Ze=!1,De=null,Le||(Le=!0,Ie=c)}}(r,t,void 0,e),e.currentTarget=null}function Lr(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;Dr(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;Dr(i,s,u),o=l}}}if(Le)throw e=Ie,Le=!1,Ie=null,e}function Ir(e,t){var n=t[vi];void 0===n&&(n=t[vi]=new Set);var r=e+"__bubble";n.has(r)||(jr(t,e,2,!1),n.add(r))}function Yr(e,t,n){var r=0;t&&(r|=4),jr(n,e,r,t)}var Vr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Vr]){e[Vr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Zr.has(t)||Yr(t,!1,e),Yr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Vr]||(t[Vr]=!0,Yr("selectionchange",!1,t))}}function jr(e,t,n,r){switch(Ht(t)){case 1:var i=zt;break;case 4:i=Xt;break;default:i=Ft}n=i.bind(null,t,n,e),i=void 0,!Ae||"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 Wr(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=yi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}_e((function(){var r=o,i=we(n),a=[];e:{var s=$r.get(e);if(void 0!==s){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":u="focus",l=mn;break;case"focusout":u="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;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=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case Pr:case Er:case Qr:l=gn;break;case Tr:l=$n;break;case"scroll":l=hn;break;case"wheel":l=Rn;break;case"copy":case"cut":case"paste":l=On;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Qn}var c=0!==(4&t),f=!c&&"scroll"===e,h=c?null!==s?s+"Capture":null:s;c=[];for(var d,p=r;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Re(p,h))&&c.push(zr(p,v,d)))),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)||n===be||!(u=n.relatedTarget||n.fromElement)||!yi(u)&&!u[pi])&&(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)?yi(u):null)&&(u!==(f=Ue(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=pn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=Qn,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==l?s:bi(l),d=null==u?s:bi(u),(s=new c(v,p+"leave",l,n,i)).target=f,s.relatedTarget=d,v=null,yi(i)===r&&((c=new c(h,p+"enter",u,n,i)).target=d,c.relatedTarget=f,v=c),f=v,l&&u)e:{for(h=u,p=0,d=c=l;d;d=Fr(d))p++;for(d=0,v=h;v;v=Fr(v))d++;for(;0<p-d;)c=Fr(c),p--;for(;0<d-p;)h=Fr(h),d--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break e;c=Fr(c),h=Fr(h)}c=null}else c=null;null!==l&&Br(a,s,l,c,!1),null!==u&&null!==f&&Br(a,f,u,c,!0)}if("select"===(l=(s=r?bi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=Hn;else if(Wn(s))if(Gn)m=ar;else{m=ir;var g=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=or);switch(m&&(m=m(e,r))?zn(a,m,n,i):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&ee(s,"number",s.value)),g=r?bi(r):window,e){case"focusin":(Wn(g)||"true"===g.contentEditable)&&(mr=g,gr=r,yr=null);break;case"focusout":yr=gr=mr=null;break;case"mousedown":Or=!0;break;case"contextmenu":case"mouseup":case"dragend":Or=!1,br(a,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":br(a,n,i)}var y;if(Mn)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else Un?Yn(e,n)&&(O="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(O="onCompositionStart");O&&(Dn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==O?"onCompositionEnd"===O&&Un&&(y=en()):(Kt="value"in(Gt=i)?Gt.value:Gt.textContent,Un=!0)),0<(g=Xr(r,O)).length&&(O=new bn(O,e,null,n,i),a.push({event:O,listeners:g}),y?O.data=y:null!==(y=Vn(n))&&(O.data=y))),(y=Zn?function(e,t){switch(e){case"compositionend":return Vn(t);case"keypress":return 32!==t.which?null:(In=!0,Ln);case"textInput":return(e=t.data)===Ln&&In?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Mn&&Yn(e,t)?(e=en(),Jt=Kt=Gt=null,Un=!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 Dn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Xr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Lr(a,t)}))}function zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xr(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=Re(e,n))&&r.unshift(zr(e,o,i)),null!=(o=Re(e,t))&&r.push(zr(e,o,i))),e=e.return}return r}function Fr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Br(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=Re(n,o))&&a.unshift(zr(n,l,s)):i||null!=(l=Re(n,o))&&a.push(zr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var qr=/\r\n?/g,Hr=/\u0000|\uFFFD/g;function Gr(e){return("string"===typeof e?e:""+e).replace(qr,"\n").replace(Hr,"")}function Kr(e,t,n){if(t=Gr(t),Gr(e)!==t&&n)throw Error(o(425))}function Jr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,oi="function"===typeof Promise?Promise:void 0,ai="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof oi?function(e){return oi.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ut(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ut(t)}function ui(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ci(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 fi=Math.random().toString(36).slice(2),hi="__reactFiber$"+fi,di="__reactProps$"+fi,pi="__reactContainer$"+fi,vi="__reactEvents$"+fi,mi="__reactListeners$"+fi,gi="__reactHandles$"+fi;function yi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[hi])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function Oi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function wi(e){return e[di]||null}var ki=[],Si=-1;function xi(e){return{current:e}}function Ci(e){0>Si||(e.current=ki[Si],ki[Si]=null,Si--)}function Pi(e,t){Si++,ki[Si]=e.current,e.current=t}var Ei={},Qi=xi(Ei),Ti=xi(!1),$i=Ei;function _i(e,t){var n=e.type.contextTypes;if(!n)return Ei;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 Ri(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ai(){Ci(Ti),Ci(Qi)}function Mi(e,t,n){if(Qi.current!==Ei)throw Error(o(168));Pi(Qi,t),Pi(Ti,n)}function Ni(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,j(e)||"Unknown",i));return D({},n,r)}function Zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ei,$i=Qi.current,Pi(Qi,e),Pi(Ti,Ti.current),!0}function Di(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ni(e,t,$i),r.__reactInternalMemoizedMergedChildContext=e,Ci(Ti),Ci(Qi),Pi(Qi,e)):Ci(Ti),Pi(Ti,n)}var Li=null,Ii=!1,Yi=!1;function Vi(e){null===Li?Li=[e]:Li.push(e)}function Ui(){if(!Yi&&null!==Li){Yi=!0;var e=0,t=Ot;try{var n=Li;for(Ot=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Li=null,Ii=!1}catch(i){throw null!==Li&&(Li=Li.slice(e+1)),Fe(Je,Ui),i}finally{Ot=t,Yi=!1}}return null}var ji=[],Wi=0,zi=null,Xi=0,Fi=[],Bi=0,qi=null,Hi=1,Gi="";function Ki(e,t){ji[Wi++]=Xi,ji[Wi++]=zi,zi=e,Xi=t}function Ji(e,t,n){Fi[Bi++]=Hi,Fi[Bi++]=Gi,Fi[Bi++]=qi,qi=e;var r=Hi;e=Gi;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Hi=1<<32-at(t)+i|n<<i|r,Gi=o+e}else Hi=1<<o|n<<i|r,Gi=e}function eo(e){null!==e.return&&(Ki(e,1),Ji(e,1,0))}function to(e){for(;e===zi;)zi=ji[--Wi],ji[Wi]=null,Xi=ji[--Wi],ji[Wi]=null;for(;e===qi;)qi=Fi[--Bi],Fi[Bi]=null,Gi=Fi[--Bi],Fi[Bi]=null,Hi=Fi[--Bi],Fi[Bi]=null}var no=null,ro=null,io=!1,oo=null;function ao(e,t){var n=Ru(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(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,no=e,ro=ui(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==qi?{id:Hi,overflow:Gi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ru(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function uo(e){if(io){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ui(n.nextSibling);var r=no;t&&so(e,t)?ao(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function co(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function fo(e){if(e!==no)return!1;if(!io)return co(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw ho(),Error(o(418));for(;t;)ao(e,t),t=ui(t.nextSibling)}if(co(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ui(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ui(e.stateNode.nextSibling):null;return!0}function ho(){for(var e=ro;e;)e=ui(e.nextSibling)}function po(){ro=no=null,io=!1}function vo(e){null===oo?oo=[e]:oo.push(e)}var mo=b.ReactCurrentBatchConfig;function go(e,t){if(e&&e.defaultProps){for(var n in t=D({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var yo=xi(null),Oo=null,bo=null,wo=null;function ko(){wo=bo=Oo=null}function So(e){var t=yo.current;Ci(yo),e._currentValue=t}function xo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Co(e,t){Oo=e,wo=bo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Po(e){var t=e._currentValue;if(wo!==e)if(e={context:e,memoizedValue:t,next:null},null===bo){if(null===Oo)throw Error(o(308));bo=e,Oo.dependencies={lanes:0,firstContext:e}}else bo=bo.next=e;return t}var Eo=null;function Qo(e){null===Eo?Eo=[e]:Eo.push(e)}function To(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Qo(t)):(n.next=i.next,i.next=n),t.interleaved=n,$o(e,r)}function $o(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}var _o=!1;function Ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ao(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 Mo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function No(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Tl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,$o(e,n)}return null===(i=r.interleaved)?(t.next=t,Qo(r)):(t.next=i.next,i.next=t),r.interleaved=t,$o(e,n)}function Zo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Do(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 Lo(e,t,n,r){var i=e.updateQueue;_o=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?o=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==o){var f=i.baseState;for(a=0,c=u=l=null,s=o;;){var h=s.lane,d=s.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,v=s;switch(h=t,d=n,v.tag){case 1:if("function"===typeof(p=v.payload)){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(h="function"===typeof(p=v.payload)?p.call(d,f,h):p)||void 0===h)break e;f=D({},f,h);break e;case 2:_o=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=d,l=f):c=c.next=d,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===c&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Dl|=a,e.lanes=a,e.memoizedState=f}}function Io(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(o(191,i));i.call(r)}}}var Yo=(new r.Component).refs;function Vo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:D({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Uo={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tu(),i=nu(e),o=Mo(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=No(e,o,i))&&(ru(t,e,i,r),Zo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tu(),i=nu(e),o=Mo(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=No(e,o,i))&&(ru(t,e,i,r),Zo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tu(),r=nu(e),i=Mo(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=No(e,i,r))&&(ru(t,e,r,n),Zo(t,e,r))}};function jo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function Wo(e,t,n){var r=!1,i=Ei,o=t.contextType;return"object"===typeof o&&null!==o?o=Po(o):(i=Ri(t)?$i:Qi.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?_i(e,i):Ei),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Uo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function zo(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&&Uo.enqueueReplaceState(t,t.state,null)}function Xo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Yo,Ro(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Po(o):(o=Ri(t)?$i:Qi.current,i.context=_i(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(Vo(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&&Uo.enqueueReplaceState(i,i.state,null),Lo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function Fo(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(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;t===Yo&&(t=i.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Bo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qo(e){return(0,e._init)(e._payload)}function Ho(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}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=Mu(e,t)).index=0,e.sibling=null,e}function a(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):(t.flags|=1048576,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=Lu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var o=n.type;return o===S?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===R&&qo(o)===t.type)?((r=i(t,n.props)).ref=Fo(e,t,n),r.return=e,r):((r=Nu(n.type,n.key,n.props,null,e.mode,r)).ref=Fo(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=Iu(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=Zu(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Lu(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Nu(t.type,t.key,t.props,null,e.mode,n)).ref=Fo(e,null,t),n.return=e,n;case k:return(t=Iu(t,e.mode,n)).return=e,t;case R:return h(e,(0,t._init)(t._payload),n)}if(te(t)||N(t))return(t=Zu(t,e.mode,n,null)).return=e,t;Bo(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?u(e,t,n,r):null;case k:return n.key===i?c(e,t,n,r):null;case R:return d(e,t,(i=n._init)(n._payload),r)}if(te(n)||N(n))return null!==i?null:f(e,t,n,r,null);Bo(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case k:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case R:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||N(r))return f(t,e=e.get(n)||null,r,i,null);Bo(t,r)}return null}function v(i,o,s,l){for(var u=null,c=null,f=o,v=o=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var g=d(i,f,s[v],l);if(null===g){null===f&&(f=m);break}e&&f&&null===g.alternate&&t(i,f),o=a(g,o,v),null===c?u=g:c.sibling=g,c=g,f=m}if(v===s.length)return n(i,f),io&&Ki(i,v),u;if(null===f){for(;v<s.length;v++)null!==(f=h(i,s[v],l))&&(o=a(f,o,v),null===c?u=f:c.sibling=f,c=f);return io&&Ki(i,v),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),o=a(m,o,v),null===c?u=m:c.sibling=m,c=m);return e&&f.forEach((function(e){return t(i,e)})),io&&Ki(i,v),u}function m(i,s,l,u){var c=N(l);if("function"!==typeof c)throw Error(o(150));if(null==(l=c.call(l)))throw Error(o(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 O=d(i,v,y.value,u);if(null===O){null===v&&(v=g);break}e&&v&&null===O.alternate&&t(i,v),s=a(O,s,m),null===f?c=O:f.sibling=O,f=O,v=g}if(y.done)return n(i,v),io&&Ki(i,m),c;if(null===v){for(;!y.done;m++,y=l.next())null!==(y=h(i,y.value,u))&&(s=a(y,s,m),null===f?c=y:f.sibling=y,f=y);return io&&Ki(i,m),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=a(y,s,m),null===f?c=y:f.sibling=y,f=y);return e&&v.forEach((function(e){return t(i,e)})),io&&Ki(i,m),c}return function e(r,o,a,l){if("object"===typeof a&&null!==a&&a.type===S&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case w:e:{for(var u=a.key,c=o;null!==c;){if(c.key===u){if((u=a.type)===S){if(7===c.tag){n(r,c.sibling),(o=i(c,a.props.children)).return=r,r=o;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===R&&qo(u)===c.type){n(r,c.sibling),(o=i(c,a.props)).ref=Fo(r,c,a),o.return=r,r=o;break e}n(r,c);break}t(r,c),c=c.sibling}a.type===S?((o=Zu(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=Nu(a.type,a.key,a.props,null,r.mode,l)).ref=Fo(r,o,a),l.return=r,r=l)}return s(r);case k:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Iu(a,r.mode,l)).return=r,r=o}return s(r);case R:return e(r,o,(c=a._init)(a._payload),l)}if(te(a))return v(r,o,a,l);if(N(a))return m(r,o,a,l);Bo(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=Lu(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var Go=Ho(!0),Ko=Ho(!1),Jo={},ea=xi(Jo),ta=xi(Jo),na=xi(Jo);function ra(e){if(e===Jo)throw Error(o(174));return e}function ia(e,t){switch(Pi(na,t),Pi(ta,e),Pi(ea,Jo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ci(ea),Pi(ea,t)}function oa(){Ci(ea),Ci(ta),Ci(na)}function aa(e){ra(na.current);var t=ra(ea.current),n=le(t,e.type);t!==n&&(Pi(ta,e),Pi(ea,n))}function sa(e){ta.current===e&&(Ci(ea),Ci(ta))}var la=xi(0);function ua(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!==(128&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 ca=[];function fa(){for(var e=0;e<ca.length;e++)ca[e]._workInProgressVersionPrimary=null;ca.length=0}var ha=b.ReactCurrentDispatcher,da=b.ReactCurrentBatchConfig,pa=0,va=null,ma=null,ga=null,ya=!1,Oa=!1,ba=0,wa=0;function ka(){throw Error(o(321))}function Sa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function xa(e,t,n,r,i,a){if(pa=a,va=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ha.current=null===e||null===e.memoizedState?ss:ls,e=n(r,i),Oa){a=0;do{if(Oa=!1,ba=0,25<=a)throw Error(o(301));a+=1,ga=ma=null,t.updateQueue=null,ha.current=us,e=n(r,i)}while(Oa)}if(ha.current=as,t=null!==ma&&null!==ma.next,pa=0,ga=ma=va=null,ya=!1,t)throw Error(o(300));return e}function Ca(){var e=0!==ba;return ba=0,e}function Pa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ga?va.memoizedState=ga=e:ga=ga.next=e,ga}function Ea(){if(null===ma){var e=va.alternate;e=null!==e?e.memoizedState:null}else e=ma.next;var t=null===ga?va.memoizedState:ga.next;if(null!==t)ga=t,ma=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ma=e).memoizedState,baseState:ma.baseState,baseQueue:ma.baseQueue,queue:ma.queue,next:null},null===ga?va.memoizedState=ga=e:ga=ga.next=e}return ga}function Qa(e,t){return"function"===typeof t?t(e):t}function Ta(e){var t=Ea(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=ma,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,u=null,c=a;do{var f=c.lane;if((pa&f)===f)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=h,s=r):u=u.next=h,va.lanes|=f,Dl|=f}c=c.next}while(null!==c&&c!==a);null===u?s=r:u.next=l,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,va.lanes|=a,Dl|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function $a(e){var t=Ea(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);sr(a,t.memoizedState)||(bs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function _a(){}function Ra(e,t){var n=va,r=Ea(),i=t(),a=!sr(r.memoizedState,i);if(a&&(r.memoizedState=i,bs=!0),r=r.queue,Wa(Na.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ga&&1&ga.memoizedState.tag){if(n.flags|=2048,Ia(9,Ma.bind(null,n,r,i,t),void 0,null),null===$l)throw Error(o(349));0!==(30&pa)||Aa(n,t,i)}return i}function Aa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=va.updateQueue)?(t={lastEffect:null,stores:null},va.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ma(e,t,n,r){t.value=n,t.getSnapshot=r,Za(t)&&Da(e)}function Na(e,t,n){return n((function(){Za(t)&&Da(e)}))}function Za(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Da(e){var t=$o(e,1);null!==t&&ru(t,e,1,-1)}function La(e){var t=Pa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.bind(null,va,e),[t.memoizedState,e]}function Ia(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=va.updateQueue)?(t={lastEffect:null,stores:null},va.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(){return Ea().memoizedState}function Va(e,t,n,r){var i=Pa();va.flags|=e,i.memoizedState=Ia(1|t,n,void 0,void 0===r?null:r)}function Ua(e,t,n,r){var i=Ea();r=void 0===r?null:r;var o=void 0;if(null!==ma){var a=ma.memoizedState;if(o=a.destroy,null!==r&&Sa(r,a.deps))return void(i.memoizedState=Ia(t,n,o,r))}va.flags|=e,i.memoizedState=Ia(1|t,n,o,r)}function ja(e,t){return Va(8390656,8,e,t)}function Wa(e,t){return Ua(2048,8,e,t)}function za(e,t){return Ua(4,2,e,t)}function Xa(e,t){return Ua(4,4,e,t)}function Fa(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 Ba(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ua(4,4,Fa.bind(null,t,e),n)}function qa(){}function Ha(e,t){var n=Ea();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Sa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ga(e,t){var n=Ea();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Sa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ka(e,t,n){return 0===(21&pa)?(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n):(sr(n,t)||(n=vt(),va.lanes|=n,Dl|=n,e.baseState=!0),t)}function Ja(e,t){var n=Ot;Ot=0!==n&&4>n?n:4,e(!0);var r=da.transition;da.transition={};try{e(!1),t()}finally{Ot=n,da.transition=r}}function es(){return Ea().memoizedState}function ts(e,t,n){var r=nu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e))is(t,n);else if(null!==(n=To(e,t,n,r))){ru(n,e,r,tu()),os(n,t,r)}}function ns(e,t,n){var r=nu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))is(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(i.next=i,Qo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(u){}null!==(n=To(e,t,i,r))&&(ru(n,e,r,i=tu()),os(n,t,r))}}function rs(e){var t=e.alternate;return e===va||null!==t&&t===va}function is(e,t){Oa=ya=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function os(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var as={readContext:Po,useCallback:ka,useContext:ka,useEffect:ka,useImperativeHandle:ka,useInsertionEffect:ka,useLayoutEffect:ka,useMemo:ka,useReducer:ka,useRef:ka,useState:ka,useDebugValue:ka,useDeferredValue:ka,useTransition:ka,useMutableSource:ka,useSyncExternalStore:ka,useId:ka,unstable_isNewReconciler:!1},ss={readContext:Po,useCallback:function(e,t){return Pa().memoizedState=[e,void 0===t?null:t],e},useContext:Po,useEffect:ja,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Va(4194308,4,Fa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Va(4194308,4,e,t)},useInsertionEffect:function(e,t){return Va(4,2,e,t)},useMemo:function(e,t){var n=Pa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,va,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Pa().memoizedState=e},useState:La,useDebugValue:qa,useDeferredValue:function(e){return Pa().memoizedState=e},useTransition:function(){var e=La(!1),t=e[0];return e=Ja.bind(null,e[1]),Pa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=va,i=Pa();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===$l)throw Error(o(349));0!==(30&pa)||Aa(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ja(Na.bind(null,r,a,e),[e]),r.flags|=2048,Ia(9,Ma.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Pa(),t=$l.identifierPrefix;if(io){var n=Gi;t=":"+t+"R"+(n=(Hi&~(1<<32-at(Hi)-1)).toString(32)+n),0<(n=ba++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ls={readContext:Po,useCallback:Ha,useContext:Po,useEffect:Wa,useImperativeHandle:Ba,useInsertionEffect:za,useLayoutEffect:Xa,useMemo:Ga,useReducer:Ta,useRef:Ya,useState:function(){return Ta(Qa)},useDebugValue:qa,useDeferredValue:function(e){return Ka(Ea(),ma.memoizedState,e)},useTransition:function(){return[Ta(Qa)[0],Ea().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ra,useId:es,unstable_isNewReconciler:!1},us={readContext:Po,useCallback:Ha,useContext:Po,useEffect:Wa,useImperativeHandle:Ba,useInsertionEffect:za,useLayoutEffect:Xa,useMemo:Ga,useReducer:$a,useRef:Ya,useState:function(){return $a(Qa)},useDebugValue:qa,useDeferredValue:function(e){var t=Ea();return null===ma?t.memoizedState=e:Ka(t,ma.memoizedState,e)},useTransition:function(){return[$a(Qa)[0],Ea().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ra,useId:es,unstable_isNewReconciler:!1};function cs(e,t){try{var n="",r=t;do{n+=V(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,digest:null}}function fs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ds="function"===typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Mo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zl||(zl=!0,Xl=r),hs(0,t)},n}function vs(e,t,n){(n=Mo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hs(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!==typeof r&&(null===Fl?Fl=new Set([this]):Fl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ds;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Pu.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mo(-1,1)).tag=2,No(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var Os=b.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?Ko(t,null,n,r):Go(t,e.child,n,r)}function ks(e,t,n,r,i){n=n.render;var o=t.ref;return Co(t,i),r=xa(e,t,n,r,o,i),n=Ca(),null===e||bs?(io&&n&&eo(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zs(e,t,i))}function Ss(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Au(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,xs(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return zs(e,t,i)}return t.flags|=1,(e=Mu(o,r)).ref=t.ref,e.return=t,t.child=e}function xs(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,zs(e,t,i);0!==(131072&e.flags)&&(bs=!0)}}return Es(e,t,n,r,i)}function Cs(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pi(Ml,Al),Al|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Pi(Ml,Al),Al|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Pi(Ml,Al),Al|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Pi(Ml,Al),Al|=r;return ws(e,t,i,n),t.child}function Ps(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Es(e,t,n,r,i){var o=Ri(n)?$i:Qi.current;return o=_i(t,o),Co(t,i),n=xa(e,t,n,r,o,i),r=Ca(),null===e||bs?(io&&r&&eo(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zs(e,t,i))}function Qs(e,t,n,r,i){if(Ri(n)){var o=!0;Zi(t)}else o=!1;if(Co(t,i),null===t.stateNode)Ws(e,t),Wo(t,n,r),Xo(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=Po(u):u=_i(t,u=Ri(n)?$i:Qi.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)&&zo(t,a,r,u),_o=!1;var h=t.memoizedState;a.state=h,Lo(t,r,a,i),l=t.memoizedState,s!==r||h!==l||Ti.current||_o?("function"===typeof c&&(Vo(t,n,c,r),l=t.memoizedState),(s=_o||jo(t,n,s,r,h,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|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ao(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:go(t.type,s),a.props=u,f=t.pendingProps,h=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Po(l):l=_i(t,l=Ri(n)?$i:Qi.current);var d=n.getDerivedStateFromProps;(c="function"===typeof d||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||h!==l)&&zo(t,a,r,l),_o=!1,h=t.memoizedState,a.state=h,Lo(t,r,a,i);var p=t.memoizedState;s!==f||h!==p||Ti.current||_o?("function"===typeof d&&(Vo(t,n,d,r),p=t.memoizedState),(u=_o||jo(t,n,u,r,h,p,l)||!1)?(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|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ts(e,t,n,r,o,i)}function Ts(e,t,n,r,i,o){Ps(e,t);var a=0!==(128&t.flags);if(!r&&!a)return i&&Di(t,n,!1),zs(e,t,o);r=t.stateNode,Os.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Go(t,e.child,null,o),t.child=Go(t,null,s,o)):ws(e,t,s,o),t.memoizedState=r.state,i&&Di(t,n,!0),t.child}function $s(e){var t=e.stateNode;t.pendingContext?Mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Mi(0,t.context,!1),ia(e,t.containerInfo)}function _s(e,t,n,r,i){return po(),vo(i),t.flags|=256,ws(e,t,n,r),t.child}var Rs,As,Ms,Ns,Zs={dehydrated:null,treeContext:null,retryLane:0};function Ds(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ls(e,t,n){var r,i=t.pendingProps,a=la.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Pi(la,1&a),null===e)return uo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Du(l,i,0,null),e=Zu(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ds(n),t.memoizedState=Zs,e):Is(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,Ys(e,t,s,r=fs(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Du({mode:"visible",children:r.children},i,0,null),(a=Zu(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&Go(t,e.child,null,s),t.child.memoizedState=Ds(s),t.memoizedState=Zs,a);if(0===(1&t.mode))return Ys(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Ys(e,t,s,r=fs(a=Error(o(419)),r,void 0))}if(l=0!==(s&e.childLanes),bs||l){if(null!==(r=$l)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,$o(e,i),ru(r,e,i,-1))}return mu(),Ys(e,t,s,r=fs(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Qu.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ui(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Fi[Bi++]=Hi,Fi[Bi++]=Gi,Fi[Bi++]=qi,Hi=e.id,Gi=e.overflow,qi=t),t=Is(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var u={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null):(i=Mu(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Mu(r,s):(s=Zu(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Ds(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Zs,i}return e=(s=e.child).sibling,i=Mu(s,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Is(e,t){return(t=Du({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ys(e,t,n,r){return null!==r&&vo(r),Go(t,e.child,null,n),(e=Is(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Vs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),xo(e.return,t,n)}function Us(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function js(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ws(e,t,r.children,n),0!==(2&(r=la.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Vs(e,n,t);else if(19===e.tag)Vs(e,n,t);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(Pi(la,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ua(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Us(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ua(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Us(t,!0,n,null,o);break;case"together":Us(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ws(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Dl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Mu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Mu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Xs(e,t){if(!io)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 Fs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fs(t),null;case 1:case 17:return Ri(t.type)&&Ai(),Fs(t),null;case 3:return r=t.stateNode,oa(),Ci(Ti),Ci(Qi),fa(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(su(oo),oo=null))),As(e,t),Fs(t),null;case 5:sa(t);var i=ra(na.current);if(n=t.type,null!==e&&null!=t.stateNode)Ms(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Fs(t),null}if(e=ra(ea.current),fo(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[hi]=t,r[di]=a,e=0!==(1&t.mode),n){case"dialog":Ir("cancel",r),Ir("close",r);break;case"iframe":case"object":case"embed":Ir("load",r);break;case"video":case"audio":for(i=0;i<Nr.length;i++)Ir(Nr[i],r);break;case"source":Ir("error",r);break;case"img":case"image":case"link":Ir("error",r),Ir("load",r);break;case"details":Ir("toggle",r);break;case"input":H(r,a),Ir("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Ir("invalid",r);break;case"textarea":ie(r,a),Ir("invalid",r)}for(var l in ye(n,a),i=null,a)if(a.hasOwnProperty(l)){var u=a[l];"children"===l?"string"===typeof u?r.textContent!==u&&(!0!==a.suppressHydrationWarning&&Kr(r.textContent,u,e),i=["children",u]):"number"===typeof u&&r.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Kr(r.textContent,u,e),i=["children",""+u]):s.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Ir("scroll",r)}switch(n){case"input":X(r),J(r,a,!0);break;case"textarea":X(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Jr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[di]=r,Rs(e,t,!1,!1),t.stateNode=e;e:{switch(l=Oe(n,r),n){case"dialog":Ir("cancel",e),Ir("close",e),i=r;break;case"iframe":case"object":case"embed":Ir("load",e),i=r;break;case"video":case"audio":for(i=0;i<Nr.length;i++)Ir(Nr[i],e);i=r;break;case"source":Ir("error",e),i=r;break;case"img":case"image":case"link":Ir("error",e),Ir("load",e),i=r;break;case"details":Ir("toggle",e),i=r;break;case"input":H(e,r),i=q(e,r),Ir("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=D({},r,{value:void 0}),Ir("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Ir("invalid",e)}for(a in ye(n,i),u=i)if(u.hasOwnProperty(a)){var c=u[a];"style"===a?me(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&fe(e,c):"children"===a?"string"===typeof c?("textarea"!==n||""!==c)&&he(e,c):"number"===typeof c&&he(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=c&&"onScroll"===a&&Ir("scroll",e):null!=c&&O(e,a,c,l))}switch(n){case"input":X(e),J(e,r,!1);break;case"textarea":X(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Fs(t),null;case 6:if(e&&null!=t.stateNode)Ns(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));if(n=ra(na.current),ra(ea.current),fo(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(a=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Kr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Kr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Fs(t),null;case 13:if(Ci(la),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&0!==(1&t.mode)&&0===(128&t.flags))ho(),po(),t.flags|=98560,a=!1;else if(a=fo(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[hi]=t}else po(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Fs(t),a=!1}else null!==oo&&(su(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&la.current)?0===Nl&&(Nl=3):mu())),null!==t.updateQueue&&(t.flags|=4),Fs(t),null);case 4:return oa(),As(e,t),null===e&&Ur(t.stateNode.containerInfo),Fs(t),null;case 10:return So(t.type._context),Fs(t),null;case 19:if(Ci(la),null===(a=t.memoizedState))return Fs(t),null;if(r=0!==(128&t.flags),null===(l=a.rendering))if(r)Xs(a,!1);else{if(0!==Nl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ua(e))){for(t.flags|=128,Xs(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Pi(la,1&la.current|2),t.child}e=e.sibling}null!==a.tail&&Ge()>jl&&(t.flags|=128,r=!0,Xs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ua(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Xs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!io)return Fs(t),null}else 2*Ge()-a.renderingStartTime>jl&&1073741824!==n&&(t.flags|=128,r=!0,Xs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ge(),t.sibling=null,n=la.current,Pi(la,r?1&n|2:1&n),t):(Fs(t),null);case 22:case 23:return hu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Al)&&(Fs(t),6&t.subtreeFlags&&(t.flags|=8192)):Fs(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function qs(e,t){switch(to(t),t.tag){case 1:return Ri(t.type)&&Ai(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return oa(),Ci(Ti),Ci(Qi),fa(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return sa(t),null;case 13:if(Ci(la),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ci(la),null;case 4:return oa(),null;case 10:return So(t.type._context),null;case 22:case 23:return hu(),null;default:return null}}Rs=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}},As=function(){},Ms=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ra(ea.current);var o,a=null;switch(n){case"input":i=q(e,i),r=q(e,r),a=[];break;case"select":i=D({},i,{value:void 0}),r=D({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Jr)}for(c in ye(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Ir("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Ns=function(e,t,n,r){n!==r&&(t.flags|=4)};var Hs=!1,Gs=!1,Ks="function"===typeof WeakSet?WeakSet:Set,Js=null;function el(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Cu(e,t,r)}else n.current=null}function tl(e,t,n){try{n()}catch(r){Cu(e,t,r)}}var nl=!1;function rl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&tl(t,n,o)}i=i.next}while(i!==r)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ol(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[di],delete t[vi],delete t[mi],delete t[gi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,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=Jr));else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var fl=null,hl=!1;function dl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Gs||el(n,t);case 6:var r=fl,i=hl;fl=null,dl(e,t,n),hl=i,null!==(fl=r)&&(hl?(e=fl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):fl.removeChild(n.stateNode));break;case 18:null!==fl&&(hl?(e=fl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ut(e)):li(fl,n.stateNode));break;case 4:r=fl,i=hl,fl=n.stateNode.containerInfo,hl=!0,dl(e,t,n),fl=r,hl=i;break;case 0:case 11:case 14:case 15:if(!Gs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!==(2&o)||0!==(4&o))&&tl(n,t,a),i=i.next}while(i!==r)}dl(e,t,n);break;case 1:if(!Gs&&(el(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Cu(n,t,s)}dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:1&n.mode?(Gs=(r=Gs)||null!==n.memoizedState,dl(e,t,n),Gs=r):dl(e,t,n);break;default:dl(e,t,n)}}function vl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ks),t.forEach((function(t){var r=Tu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:fl=l.stateNode,hl=!1;break e;case 3:case 4:fl=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===fl)throw Error(o(160));pl(a,s,i),fl=null,hl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(c){Cu(i,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),yl(e),4&r){try{rl(3,e,e.return),il(3,e)}catch(m){Cu(e,e.return,m)}try{rl(5,e,e.return)}catch(m){Cu(e,e.return,m)}}break;case 1:ml(t,e),yl(e),512&r&&null!==n&&el(n,n.return);break;case 5:if(ml(t,e),yl(e),512&r&&null!==n&&el(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(m){Cu(e,e.return,m)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&G(i,a),Oe(l,s);var c=Oe(l,a);for(s=0;s<u.length;s+=2){var f=u[s],h=u[s+1];"style"===f?me(i,h):"dangerouslySetInnerHTML"===f?fe(i,h):"children"===f?he(i,h):O(i,f,h,c)}switch(l){case"input":K(i,a);break;case"textarea":oe(i,a);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ne(i,!!a.multiple,p,!1):d!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[di]=a}catch(m){Cu(e,e.return,m)}}break;case 6:if(ml(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(m){Cu(e,e.return,m)}}break;case 3:if(ml(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(m){Cu(e,e.return,m)}break;case 4:default:ml(t,e),yl(e);break;case 13:ml(t,e),yl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(Ul=Ge())),4&r&&vl(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Gs=(c=Gs)||f,ml(t,e),Gs=c):ml(t,e),yl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!f&&0!==(1&e.mode))for(Js=e,f=e.child;null!==f;){for(h=Js=f;null!==Js;){switch(p=(d=Js).child,d.tag){case 0:case 11:case 14:case 15:rl(4,d,d.return);break;case 1:el(d,d.return);var v=d.stateNode;if("function"===typeof v.componentWillUnmount){r=d,n=d.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(m){Cu(r,n,m)}}break;case 5:el(d,d.return);break;case 22:if(null!==d.memoizedState){kl(h);continue}}null!==p?(p.return=d,Js=p):kl(h)}f=f.sibling}e:for(f=null,h=e;;){if(5===h.tag){if(null===f){f=h;try{i=h.stateNode,c?"function"===typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=void 0!==(u=h.memoizedProps.style)&&null!==u&&u.hasOwnProperty("display")?u.display:null,l.style.display=ve("display",s))}catch(m){Cu(e,e.return,m)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(m){Cu(e,e.return,m)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ml(t,e),yl(e),4&r&&vl(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sl(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),cl(e,ll(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;ul(e,ll(e),a);break;default:throw Error(o(161))}}catch(s){Cu(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Ol(e,t,n){Js=e,bl(e,t,n)}function bl(e,t,n){for(var r=0!==(1&e.mode);null!==Js;){var i=Js,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Hs;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Gs;s=Hs;var u=Gs;if(Hs=a,(Gs=l)&&!u)for(Js=i;null!==Js;)l=(a=Js).child,22===a.tag&&null!==a.memoizedState?Sl(i):null!==l?(l.return=a,Js=l):Sl(i);for(;null!==o;)Js=o,bl(o,t,n),o=o.sibling;Js=i,Hs=s,Gs=u}wl(e)}else 0!==(8772&i.subtreeFlags)&&null!==o?(o.return=i,Js=o):wl(e)}}function wl(e){for(;null!==Js;){var t=Js;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Gs||il(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Gs)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:go(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Io(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Io(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&Ut(h)}}}break;default:throw Error(o(163))}Gs||512&t.flags&&ol(t)}catch(d){Cu(t,t.return,d)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function kl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function Sl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(l){Cu(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){Cu(t,i,l)}}var o=t.return;try{ol(t)}catch(l){Cu(t,o,l)}break;case 5:var a=t.return;try{ol(t)}catch(l){Cu(t,a,l)}}}catch(l){Cu(t,t.return,l)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var xl,Cl=Math.ceil,Pl=b.ReactCurrentDispatcher,El=b.ReactCurrentOwner,Ql=b.ReactCurrentBatchConfig,Tl=0,$l=null,_l=null,Rl=0,Al=0,Ml=xi(0),Nl=0,Zl=null,Dl=0,Ll=0,Il=0,Yl=null,Vl=null,Ul=0,jl=1/0,Wl=null,zl=!1,Xl=null,Fl=null,Bl=!1,ql=null,Hl=0,Gl=0,Kl=null,Jl=-1,eu=0;function tu(){return 0!==(6&Tl)?Ge():-1!==Jl?Jl:Jl=Ge()}function nu(e){return 0===(1&e.mode)?1:0!==(2&Tl)&&0!==Rl?Rl&-Rl:null!==mo.transition?(0===eu&&(eu=vt()),eu):0!==(e=Ot)?e:e=void 0===(e=window.event)?16:Ht(e.type)}function ru(e,t,n,r){if(50<Gl)throw Gl=0,Kl=null,Error(o(185));gt(e,n,r),0!==(2&Tl)&&e===$l||(e===$l&&(0===(2&Tl)&&(Ll|=n),4===Nl&&lu(e,Rl)),iu(e,r),1===n&&0===Tl&&0===(1&t.mode)&&(jl=Ge()+500,Ii&&Ui()))}function iu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=dt(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=ht(e,e===$l?Rl:0);if(0===r)null!==n&&Be(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Be(n),1===t)0===e.tag?function(e){Ii=!0,Vi(e)}(uu.bind(null,e)):Vi(uu.bind(null,e)),ai((function(){0===(6&Tl)&&Ui()})),n=null;else{switch(bt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=$u(n,ou.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ou(e,t){if(Jl=-1,eu=0,0!==(6&Tl))throw Error(o(327));var n=e.callbackNode;if(Su()&&e.callbackNode!==n)return null;var r=ht(e,e===$l?Rl:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=gu(e,r);else{t=r;var i=Tl;Tl|=2;var a=vu();for($l===e&&Rl===t||(Wl=null,jl=Ge()+500,du(e,t));;)try{Ou();break}catch(l){pu(e,l)}ko(),Pl.current=a,Tl=i,null!==_l?t=0:($l=null,Rl=0,t=Nl)}if(0!==t){if(2===t&&(0!==(i=pt(e))&&(r=i,t=au(e,i))),1===t)throw n=Zl,du(e,0),lu(e,r),iu(e,Ge()),n;if(6===t)lu(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!sr(o(),i))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=gu(e,r))&&(0!==(a=pt(e))&&(r=a,t=au(e,a))),1===t))throw n=Zl,du(e,0),lu(e,r),iu(e,Ge()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:ku(e,Vl,Wl);break;case 3:if(lu(e,r),(130023424&r)===r&&10<(t=Ul+500-Ge())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){tu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(ku.bind(null,e,Vl,Wl),t);break}ku(e,Vl,Wl);break;case 4:if(lu(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Ge()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cl(r/1960))-r)){e.timeoutHandle=ri(ku.bind(null,e,Vl,Wl),r);break}ku(e,Vl,Wl);break;default:throw Error(o(329))}}}return iu(e,Ge()),e.callbackNode===n?ou.bind(null,e):null}function au(e,t){var n=Yl;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=gu(e,t))&&(t=Vl,Vl=n,null!==t&&su(t)),e}function su(e){null===Vl?Vl=e:Vl.push.apply(Vl,e)}function lu(e,t){for(t&=~Il,t&=~Ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function uu(e){if(0!==(6&Tl))throw Error(o(327));Su();var t=ht(e,0);if(0===(1&t))return iu(e,Ge()),null;var n=gu(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=au(e,r))}if(1===n)throw n=Zl,du(e,0),lu(e,t),iu(e,Ge()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ku(e,Vl,Wl),iu(e,Ge()),null}function cu(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(jl=Ge()+500,Ii&&Ui())}}function fu(e){null!==ql&&0===ql.tag&&0===(6&Tl)&&Su();var t=Tl;Tl|=1;var n=Ql.transition,r=Ot;try{if(Ql.transition=null,Ot=1,e)return e()}finally{Ot=r,Ql.transition=n,0===(6&(Tl=t))&&Ui()}}function hu(){Al=Ml.current,Ci(Ml)}function du(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==_l)for(n=_l.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Ai();break;case 3:oa(),Ci(Ti),Ci(Qi),fa();break;case 5:sa(r);break;case 4:oa();break;case 13:case 19:Ci(la);break;case 10:So(r.type._context);break;case 22:case 23:hu()}n=n.return}if($l=e,_l=e=Mu(e.current,null),Rl=Al=t,Nl=0,Zl=null,Il=Ll=Dl=0,Vl=Yl=null,null!==Eo){for(t=0;t<Eo.length;t++)if(null!==(r=(n=Eo[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Eo=null}return e}function pu(e,t){for(;;){var n=_l;try{if(ko(),ha.current=as,ya){for(var r=va.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ya=!1}if(pa=0,ga=ma=va=null,Oa=!1,ba=0,El.current=null,null===n||null===n.return){Nl=1,Zl=t,_l=null;break}e:{var a=e,s=n.return,l=n,u=t;if(t=Rl,l.flags|=32768,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u,f=l,h=f.tag;if(0===(1&f.mode)&&(0===h||11===h||15===h)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=gs(s);if(null!==p){p.flags&=-257,ys(p,s,l,0,t),1&p.mode&&ms(a,c,t),u=c;var v=(t=p).updateQueue;if(null===v){var m=new Set;m.add(u),t.updateQueue=m}else v.add(u);break e}if(0===(1&t)){ms(a,c,t),mu();break e}u=Error(o(426))}else if(io&&1&l.mode){var g=gs(s);if(null!==g){0===(65536&g.flags)&&(g.flags|=256),ys(g,s,l,0,t),vo(cs(u,l));break e}}a=u=cs(u,l),4!==Nl&&(Nl=2),null===Yl?Yl=[a]:Yl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Do(a,ps(0,u,t));break e;case 1:l=u;var y=a.type,O=a.stateNode;if(0===(128&a.flags)&&("function"===typeof y.getDerivedStateFromError||null!==O&&"function"===typeof O.componentDidCatch&&(null===Fl||!Fl.has(O)))){a.flags|=65536,t&=-t,a.lanes|=t,Do(a,vs(a,l,t));break e}}a=a.return}while(null!==a)}wu(n)}catch(b){t=b,_l===n&&null!==n&&(_l=n=n.return);continue}break}}function vu(){var e=Pl.current;return Pl.current=as,null===e?as:e}function mu(){0!==Nl&&3!==Nl&&2!==Nl||(Nl=4),null===$l||0===(268435455&Dl)&&0===(268435455&Ll)||lu($l,Rl)}function gu(e,t){var n=Tl;Tl|=2;var r=vu();for($l===e&&Rl===t||(Wl=null,du(e,t));;)try{yu();break}catch(i){pu(e,i)}if(ko(),Tl=n,Pl.current=r,null!==_l)throw Error(o(261));return $l=null,Rl=0,Nl}function yu(){for(;null!==_l;)bu(_l)}function Ou(){for(;null!==_l&&!qe();)bu(_l)}function bu(e){var t=xl(e.alternate,e,Al);e.memoizedProps=e.pendingProps,null===t?wu(e):_l=t,El.current=null}function wu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Bs(n,t,Al)))return void(_l=n)}else{if(null!==(n=qs(n,t)))return n.flags&=32767,void(_l=n);if(null===e)return Nl=6,void(_l=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(_l=t);_l=t=e}while(null!==t);0===Nl&&(Nl=5)}function ku(e,t,n){var r=Ot,i=Ql.transition;try{Ql.transition=null,Ot=1,function(e,t,n,r){do{Su()}while(null!==ql);if(0!==(6&Tl))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===$l&&(_l=$l=null,Rl=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Bl||(Bl=!0,$u(tt,(function(){return Su(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Ql.transition,Ql.transition=null;var s=Ot;Ot=1;var l=Tl;Tl|=4,El.current=null,function(e,t){if(ei=Wt,dr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(w){n=null;break e}var s=0,l=-1,u=-1,c=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==a||0!==r&&3!==h.nodeType||(u=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===n&&++c===i&&(l=s),d===a&&++f===r&&(u=s),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Wt=!1,Js=t;null!==Js;)if(e=(t=Js).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var v=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==v){var m=v.memoizedProps,g=v.memoizedState,y=t.stateNode,O=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:go(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(o(163))}}catch(w){Cu(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}v=nl,nl=!1}(e,n),gl(n,e),pr(ti),Wt=!!ei,ti=ei=null,e.current=n,Ol(n,e,i),He(),Tl=l,Ot=s,Ql.transition=a}else e.current=n;if(Bl&&(Bl=!1,ql=e,Hl=i),a=e.pendingLanes,0===a&&(Fl=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),iu(e,Ge()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(zl)throw zl=!1,e=Xl,Xl=null,e;0!==(1&Hl)&&0!==e.tag&&Su(),a=e.pendingLanes,0!==(1&a)?e===Kl?Gl++:(Gl=0,Kl=e):Gl=0,Ui()}(e,t,n,r)}finally{Ql.transition=i,Ot=r}return null}function Su(){if(null!==ql){var e=bt(Hl),t=Ql.transition,n=Ot;try{if(Ql.transition=null,Ot=16>e?16:e,null===ql)var r=!1;else{if(e=ql,ql=null,Hl=0,0!==(6&Tl))throw Error(o(331));var i=Tl;for(Tl|=4,Js=e.current;null!==Js;){var a=Js,s=a.child;if(0!==(16&Js.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Js=c;null!==Js;){var f=Js;switch(f.tag){case 0:case 11:case 15:rl(8,f,a)}var h=f.child;if(null!==h)h.return=f,Js=h;else for(;null!==Js;){var d=(f=Js).sibling,p=f.return;if(al(f),f===c){Js=null;break}if(null!==d){d.return=p,Js=d;break}Js=p}}}var v=a.alternate;if(null!==v){var m=v.child;if(null!==m){v.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}Js=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Js=s;else e:for(;null!==Js;){if(0!==(2048&(a=Js).flags))switch(a.tag){case 0:case 11:case 15:rl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Js=y;break e}Js=a.return}}var O=e.current;for(Js=O;null!==Js;){var b=(s=Js).child;if(0!==(2064&s.subtreeFlags)&&null!==b)b.return=s,Js=b;else e:for(s=O;null!==Js;){if(0!==(2048&(l=Js).flags))try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(k){Cu(l,l.return,k)}if(l===s){Js=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Js=w;break e}Js=l.return}}if(Tl=i,Ui(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(k){}r=!0}return r}finally{Ot=n,Ql.transition=t}}return!1}function xu(e,t,n){e=No(e,t=ps(0,t=cs(n,t),1),1),t=tu(),null!==e&&(gt(e,1,t),iu(e,t))}function Cu(e,t,n){if(3===e.tag)xu(e,e,n);else for(;null!==t;){if(3===t.tag){xu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Fl||!Fl.has(r))){t=No(t,e=vs(t,e=cs(n,e),1),1),e=tu(),null!==t&&(gt(t,1,e),iu(t,e));break}}t=t.return}}function Pu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tu(),e.pingedLanes|=e.suspendedLanes&n,$l===e&&(Rl&n)===n&&(4===Nl||3===Nl&&(130023424&Rl)===Rl&&500>Ge()-Ul?du(e,0):Il|=n),iu(e,t)}function Eu(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=tu();null!==(e=$o(e,t))&&(gt(e,t,n),iu(e,n))}function Qu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Eu(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Eu(e,n)}function $u(e,t){return Fe(e,t)}function _u(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.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ru(e,t,n,r){return new _u(e,t,n,r)}function Au(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Mu(e,t){var n=e.alternate;return null===n?((n=Ru(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.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,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 Nu(e,t,n,r,i,a){var s=2;if(r=e,"function"===typeof e)Au(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return Zu(n.children,i,a,t);case x:s=8,i|=8;break;case C:return(e=Ru(12,n,t,2|i)).elementType=C,e.lanes=a,e;case T:return(e=Ru(13,n,t,i)).elementType=T,e.lanes=a,e;case $:return(e=Ru(19,n,t,i)).elementType=$,e.lanes=a,e;case A:return Du(n,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case P:s=10;break e;case E:s=9;break e;case Q:s=11;break e;case _:s=14;break e;case R:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Ru(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Zu(e,t,n,r){return(e=Ru(7,e,r,t)).lanes=n,e}function Du(e,t,n,r){return(e=Ru(22,e,r,t)).elementType=A,e.lanes=n,e.stateNode={isHidden:!1},e}function Lu(e,t,n){return(e=Ru(6,e,null,t)).lanes=n,e}function Iu(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Yu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vu(e,t,n,r,i,o,a,s,l){return e=new Yu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ru(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ro(o),e}function Uu(e){if(!e)return Ei;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ri(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ri(n))return Ni(e,n,t)}return t}function ju(e,t,n,r,i,o,a,s,l){return(e=Vu(n,r,!0,e,0,o,0,s,l)).context=Uu(null),n=e.current,(o=Mo(r=tu(),i=nu(n))).callback=void 0!==t&&null!==t?t:null,No(n,o,i),e.current.lanes=i,gt(e,i,r),iu(e,r),e}function Wu(e,t,n,r){var i=t.current,o=tu(),a=nu(i);return n=Uu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=No(i,t,a))&&(ru(e,i,a,o),Zo(e,i,a)),a}function zu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Xu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Fu(e,t){Xu(e,t),(e=e.alternate)&&Xu(e,t)}xl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ti.current)bs=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:$s(t),po();break;case 5:aa(t);break;case 1:Ri(t.type)&&Zi(t);break;case 4:ia(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Pi(yo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Pi(la,1&la.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ls(e,t,n):(Pi(la,1&la.current),null!==(e=zs(e,t,n))?e.sibling:null);Pi(la,1&la.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return js(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Pi(la,la.current),r)break;return null;case 22:case 23:return t.lanes=0,Cs(e,t,n)}return zs(e,t,n)}(e,t,n);bs=0!==(131072&e.flags)}else bs=!1,io&&0!==(1048576&t.flags)&&Ji(t,Xi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ws(e,t),e=t.pendingProps;var i=_i(t,Qi.current);Co(t,n),i=xa(null,t,r,e,i,n);var a=Ca();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ri(r)?(a=!0,Zi(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ro(t),i.updater=Uo,t.stateNode=i,i._reactInternals=t,Xo(t,r,e,n),t=Ts(null,t,r,!0,a,n)):(t.tag=0,io&&a&&eo(t),ws(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ws(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Au(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===Q)return 11;if(e===_)return 14}return 2}(r),e=go(r,e),i){case 0:t=Es(null,t,r,e,n);break e;case 1:t=Qs(null,t,r,e,n);break e;case 11:t=ks(null,t,r,e,n);break e;case 14:t=Ss(null,t,r,go(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Es(e,t,r,i=t.elementType===r?i:go(r,i),n);case 1:return r=t.type,i=t.pendingProps,Qs(e,t,r,i=t.elementType===r?i:go(r,i),n);case 3:e:{if($s(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,Ao(e,t),Lo(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=_s(e,t,r,n,i=cs(Error(o(423)),t));break e}if(r!==i){t=_s(e,t,r,n,i=cs(Error(o(424)),t));break e}for(ro=ui(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=Ko(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(po(),r===i){t=zs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return aa(t),null===e&&uo(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==a&&ni(r,a)&&(t.flags|=32),Ps(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&uo(t),null;case 13:return Ls(e,t,n);case 4:return ia(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Go(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,ks(e,t,r,i=t.elementType===r?i:go(r,i),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Pi(yo,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===i.children&&!Ti.current){t=zs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=Mo(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var f=(c=c.shared).pending;null===f?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),xo(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),xo(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Co(t,n),r=r(i=Po(i)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return i=go(r=t.type,t.pendingProps),Ss(e,t,r,i=go(r.type,i),n);case 15:return xs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:go(r,i),Ws(e,t),t.tag=1,Ri(r)?(e=!0,Zi(t)):e=!1,Co(t,n),Wo(t,r,i),Xo(t,r,i,n),Ts(null,t,r,!0,e,n);case 19:return js(e,t,n);case 22:return Cs(e,t,n)}throw Error(o(156,t.tag))};var Bu="function"===typeof reportError?reportError:function(e){console.error(e)};function qu(e){this._internalRoot=e}function Hu(e){this._internalRoot=e}function Gu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Ku(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ju(){}function ec(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"===typeof i){var s=i;i=function(){var e=zu(a);s.call(e)}}Wu(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"===typeof r){var o=r;r=function(){var e=zu(a);o.call(e)}}var a=ju(t,r,e,0,null,!1,0,"",Ju);return e._reactRootContainer=a,e[pi]=a.current,Ur(8===e.nodeType?e.parentNode:e),fu(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var s=r;r=function(){var e=zu(l);s.call(e)}}var l=Vu(e,0,!1,null,0,!1,0,"",Ju);return e._reactRootContainer=l,e[pi]=l.current,Ur(8===e.nodeType?e.parentNode:e),fu((function(){Wu(t,l,n,r)})),l}(n,t,e,i,r);return zu(a)}Hu.prototype.render=qu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Wu(e,t,null,null)},Hu.prototype.unmount=qu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;fu((function(){Wu(null,e,null,null)})),t[pi]=null}},Hu.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<At.length&&0!==t&&t<At[n].priority;n++);At.splice(n,0,e),0===n&&Dt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(yt(t,1|n),iu(t,Ge()),0===(6&Tl)&&(jl=Ge()+500,Ui()))}break;case 13:fu((function(){var t=$o(e,1);if(null!==t){var n=tu();ru(t,e,1,n)}})),Fu(e,1)}},kt=function(e){if(13===e.tag){var t=$o(e,134217728);if(null!==t)ru(t,e,134217728,tu());Fu(e,134217728)}},St=function(e){if(13===e.tag){var t=nu(e),n=$o(e,t);if(null!==n)ru(n,e,t,tu());Fu(e,t)}},xt=function(){return Ot},Ct=function(e,t){var n=Ot;try{return Ot=e,t()}finally{Ot=n}},ke=function(e,t,n){switch(t){case"input":if(K(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=wi(r);if(!i)throw Error(o(90));F(r),K(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Qe=cu,Te=fu;var tc={usingClientEntryPoint:!1,Events:[Oi,bi,wi,Pe,Ee,cu]},nc={findFiberByHostInstance:yi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=ze(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{it=ic.inject(rc),ot=ic}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Gu(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Gu(e))throw Error(o(299));var n=!1,r="",i=Bu;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Vu(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Ur(8===e.nodeType?e.parentNode:e),new qu(t)},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(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=ze(t))?null:e.stateNode},t.flushSync=function(e){return fu(e)},t.hydrate=function(e,t,n){if(!Ku(t))throw Error(o(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Gu(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=Bu;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=ju(t,null,e,1,null!=n?n:null,i,0,a,s),e[pi]=t.current,Ur(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Hu(t)},t.render=function(e,t,n){if(!Ku(t))throw Error(o(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ku(e))throw Error(o(40));return!!e._reactRootContainer&&(fu((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=cu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ku(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return ec(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},250:function(e,t,n){"use strict";var r=n(164);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},164: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(463)},372: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,h=n?Symbol.for("react.forward_ref"):60112,d=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,O=n?Symbol.for("react.responder"):60118,b=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 d:return e;default:switch(e=e&&e.$$typeof){case u:case h:case m:case v:case l:return e;default:return t}}case i:return t}}}function k(e){return w(e)===f}t.isFragment=function(e){return w(e)===o},t.isMemo=function(e){return w(e)===v}},441:function(e,t,n){"use strict";e.exports=n(372)},374:function(e,t,n){"use strict";var r=n(791),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,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)a.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:s.current}}t.jsx=u,t.jsxs=u},117:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function y(){}function O(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=g.prototype;var b=O.prototype=new y;b.constructor=O,v(b,g.prototype),b.isPureReactComponent=!0;var w=Array.isArray,k=Object.prototype.hasOwnProperty,S={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,i)&&!x.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;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(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:S.current}}function P(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function Q(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 T(e,t,i,o,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 n:case r:l=!0}}if(l)return a=a(l=e),e=""===o?"."+Q(l,0):o,w(a)?(i="",null!=e&&(i=e.replace(E,"$&/")+"/"),T(a,t,i,"",(function(e){return e}))):null!=a&&(P(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",w(e))for(var u=0;u<e.length;u++){var c=o+Q(s=e[u],u);l+=T(s,t,i,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+=T(s=s.value,t,i,c=o+Q(s,u++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function $(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function _(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},A={transition:null},M={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:A,ReactCurrentOwner:S};t.Children={map:$,forEach:function(e,t,n){$(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return $(e,(function(){t++})),t},toArray:function(e){return $(e,(function(e){return e}))||[]},only:function(e){if(!P(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=g,t.Fragment=i,t.Profiler=a,t.PureComponent=O,t.StrictMode=o,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=v({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=S.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)k.call(t,u)&&!x.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=P,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:_}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=A.transition;A.transition={};try{e()}finally{A.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.2.0"},791:function(e,t,n){"use strict";e.exports=n(117)},184:function(e,t,n){"use strict";e.exports=n(374)},813:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}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}}var u=[],c=[],f=1,h=null,d=3,p=!1,v=!1,m=!1,g="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,O="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function w(e){if(m=!1,b(e),!v)if(null!==r(u))v=!0,A(k);else{var t=r(c);null!==t&&M(w,t.startTime-e)}}function k(e,n){v=!1,m&&(m=!1,y(P),P=-1),p=!0;var o=d;try{for(b(n),h=r(u);null!==h&&(!(h.expirationTime>n)||e&&!T());){var a=h.callback;if("function"===typeof a){h.callback=null,d=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===r(u)&&i(u),b(n)}else i(u);h=r(u)}if(null!==h)var l=!0;else{var f=r(c);null!==f&&M(w,f.startTime-n),l=!1}return l}finally{h=null,d=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,x=!1,C=null,P=-1,E=5,Q=-1;function T(){return!(t.unstable_now()-Q<E)}function $(){if(null!==C){var e=t.unstable_now();Q=e;var n=!0;try{n=C(!0,e)}finally{n?S():(x=!1,C=null)}}else x=!1}if("function"===typeof O)S=function(){O($)};else if("undefined"!==typeof MessageChannel){var _=new MessageChannel,R=_.port2;_.port1.onmessage=$,S=function(){R.postMessage(null)}}else S=function(){g($,0)};function A(e){C=e,x||(x=!0,S())}function M(e,n){P=g((function(){e(t.unstable_now())}),n)}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(){v||p||(v=!0,A(k))},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"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(m?(y(P),P=-1):m=!0,M(w,o-a))):(e.sortIndex=s,n(u,e),v||p||(v=!0,A(k))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}},296:function(e,t,n){"use strict";e.exports=n(813)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](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},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&i&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},n.d(o,a),o}}(),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+".cf5efa72.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="gemini-viewer-examples:";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 h=function(t,n){s.onerror=s.onload=null,clearTimeout(d);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)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.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[o]=0},r=self.webpackChunkgemini_viewer_examples=self.webpackChunkgemini_viewer_examples||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e,t=n(791),r=n.t(t,2),i=n(250);function o(e){if(Array.isArray(e))return e}function a(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 s(e,t){if(e){if("string"===typeof e)return a(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)?a(e,t):void 0}}function l(){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 u(e,t){return o(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,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||s(e,t)||l()}function c(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e){return function(e){if(Array.isArray(e))return a(e)}(e)||c(e)||s(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.")}()}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e){return d="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},d(e)}function p(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===d(t)?t:String(t)}function v(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,p(r.key),r)}}function m(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function y(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function b(){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}}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){var t=b();return function(){var n,r=O(e);if(t){var i=O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}(this,n)}}function S(e,t,n){return S=b()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&g(i,n.prototype),i},S.apply(null,arguments)}function x(e){var t="function"===typeof Map?new Map:void 0;return x=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return S(e,arguments,O(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)},x(e)}function C(e){return o(e)||c(e)||s(e)||l()}function P(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(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,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function E(){return E=Object.assign?Object.assign.bind():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},E.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(e||(e={}));var Q,T="popstate";function $(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function _(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function R(e,t){return{usr:e.state,key:e.key,idx:t}}function A(e,t,n,r){return void 0===n&&(n=null),E({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?N(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function M(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,o=e.hash,a=void 0===o?"":o;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function N(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Z(t,n,r,i){void 0===i&&(i={});var o=i,a=o.window,s=void 0===a?document.defaultView:a,l=o.v5Compat,u=void 0!==l&&l,c=s.history,f=e.Pop,h=null,d=p();function p(){return(c.state||{idx:null}).idx}function v(){f=e.Pop;var t=p(),n=null==t?null:t-d;d=t,h&&h({action:f,location:g.location,delta:n})}function m(e){var t="null"!==s.location.origin?s.location.origin:s.location.href,n="string"===typeof e?e:M(e);return $(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==d&&(d=0,c.replaceState(E({},c.state,{idx:d}),""));var g={get action(){return f},get location(){return t(s,c)},listen:function(e){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(T,v),h=e,function(){s.removeEventListener(T,v),h=null}},createHref:function(e){return n(s,e)},createURL:m,encodeLocation:function(e){var t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){f=e.Push;var i=A(g.location,t,n);r&&r(i,t);var o=R(i,d=p()+1),a=g.createHref(i);try{c.pushState(o,"",a)}catch(l){if(l instanceof DOMException&&"DataCloneError"===l.name)throw l;s.location.assign(a)}u&&h&&h({action:f,location:g.location,delta:1})},replace:function(t,n){f=e.Replace;var i=A(g.location,t,n);r&&r(i,t);var o=R(i,d=p()),a=g.createHref(i);c.replaceState(o,"",a),u&&h&&h({action:f,location:g.location,delta:0})},go:function(e){return c.go(e)}};return g}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Q||(Q={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function D(e,t,n){void 0===n&&(n="/");var r=G(("string"===typeof t?N(t):t).pathname||"/",n);if(null==r)return null;var i=L(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a<i.length;++a)o=B(i[a],H(r));return o}function L(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");var i=function(e,i,o){var a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&($(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));var s=te([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&($(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),L(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:F(s,e.index),routesMeta:l})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,o=P(I(e.path));try{for(o.s();!(r=o.n()).done;){var a=r.value;i(e,t,a)}}catch(s){o.e(s)}finally{o.f()}}else i(e,t)})),t}function I(e){var t=e.split("/");if(0===t.length)return[];var n=C(t),r=n[0],i=n.slice(1),o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===i.length)return o?[a,""]:[a];var s=I(i.join("/")),l=[];return l.push.apply(l,f(s.map((function(e){return""===e?a:[a,e].join("/")})))),o&&l.push.apply(l,f(s)),l.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var Y=/^:\w+$/,V=3,U=2,j=1,W=10,z=-2,X=function(e){return"*"===e};function F(e,t){var n=e.split("/"),r=n.length;return n.some(X)&&(r+=z),t&&(r+=U),n.filter((function(e){return!X(e)})).reduce((function(e,t){return e+(Y.test(t)?V:""===t?j:W)}),r)}function B(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a<n.length;++a){var s=n[a],l=a===n.length-1,u="/"===i?t:t.slice(i.length)||"/",c=q({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},u);if(!c)return null;Object.assign(r,c.params);var f=s.route;o.push({params:r,pathname:te([i,c.pathname]),pathnameBase:ne(te([i,c.pathnameBase])),route:f}),"/"!==c.pathnameBase&&(i=te([i,c.pathnameBase]))}return o}function q(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);_("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');var r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(function(e,t){return r.push(t),"/([^\\/]+)"}));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");var o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),r=u(n,2),i=r[0],o=r[1],a=t.match(i);if(!a)return null;var s=a[0],l=s.replace(/(.)\/+$/,"$1"),c=a.slice(1),f=o.reduce((function(e,t,n){if("*"===t){var r=c[n]||"";l=s.slice(0,s.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return _(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(c[n]||"",t),e}),{});return{params:f,pathname:s,pathnameBase:l,pattern:e}}function H(e){try{return decodeURI(e)}catch(t){return _(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function G(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function K(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function J(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function ee(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=N(e):($(!(i=E({},e)).pathname||!i.pathname.includes("?"),K("?","pathname","search",i)),$(!i.pathname||!i.pathname.includes("#"),K("#","pathname","hash",i)),$(!i.search||!i.search.includes("#"),K("#","search","hash",i)));var o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(r||null==s)o=n;else{var l=t.length-1;if(s.startsWith("..")){for(var u=s.split("/");".."===u[0];)u.shift(),l-=1;i.pathname=u.join("/")}o=l>=0?t[l]:"/"}var c=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?N(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,s=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:re(o),hash:ie(s)}}(i,o),f=s&&"/"!==s&&s.endsWith("/"),h=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!f&&!h||(c.pathname+="/"),c}var te=function(e){return e.join("/").replace(/\/\/+/g,"/")},ne=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},re=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},ie=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},oe=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n)}(x(Error));function ae(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var se=["post","put","patch","delete"],le=(new Set(se),["get"].concat(se));new Set(le),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function ue(){return ue=Object.assign?Object.assign.bind():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},ue.apply(this,arguments)}var ce=t.createContext(null);var fe=t.createContext(null);var he=t.createContext(null);var de=t.createContext(null);var pe=t.createContext(null);var ve=t.createContext({outlet:null,matches:[],isDataRoute:!1});var me=t.createContext(null);function ge(){return null!=t.useContext(pe)}function ye(){return ge()||$(!1),t.useContext(pe).location}function Oe(e){t.useContext(de).static||t.useLayoutEffect(e)}function be(){return t.useContext(ve).isDataRoute?function(){var e=$e(Qe.UseNavigateStable).router,n=Re(Te.UseNavigateStable),r=t.useRef(!1);Oe((function(){r.current=!0}));var i=t.useCallback((function(t,i){void 0===i&&(i={}),r.current&&("number"===typeof t?e.navigate(t):e.navigate(t,ue({fromRouteId:n},i)))}),[e,n]);return i}():function(){ge()||$(!1);var e=t.useContext(ce),n=t.useContext(de),r=n.basename,i=n.navigator,o=t.useContext(ve).matches,a=ye().pathname,s=JSON.stringify(J(o).map((function(e){return e.pathnameBase}))),l=t.useRef(!1);return Oe((function(){l.current=!0})),t.useCallback((function(t,n){if(void 0===n&&(n={}),l.current)if("number"!==typeof t){var o=ee(t,JSON.parse(s),a,"path"===n.relative);null==e&&"/"!==r&&(o.pathname="/"===o.pathname?r:te([r,o.pathname])),(n.replace?i.replace:i.push)(o,n.state,n)}else i.go(t)}),[r,i,s,a,e])}()}function we(e,n){var r=(void 0===n?{}:n).relative,i=t.useContext(ve).matches,o=ye().pathname,a=JSON.stringify(J(i).map((function(e){return e.pathnameBase})));return t.useMemo((function(){return ee(e,JSON.parse(a),o,"path"===r)}),[e,a,o,r])}function ke(n,r,i){ge()||$(!1);var o,a=t.useContext(de).navigator,s=t.useContext(ve).matches,l=s[s.length-1],u=l?l.params:{},c=(l&&l.pathname,l?l.pathnameBase:"/"),f=(l&&l.route,ye());if(r){var h,d="string"===typeof r?N(r):r;"/"===c||(null==(h=d.pathname)?void 0:h.startsWith(c))||$(!1),o=d}else o=f;var p=o.pathname||"/",v=D(n,{pathname:"/"===c?p:p.slice(c.length)||"/"});var m=Ee(v&&v.map((function(e){return Object.assign({},e,{params:Object.assign({},u,e.params),pathname:te([c,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:te([c,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),s,i);return r&&m?t.createElement(pe.Provider,{value:{location:ue({pathname:"/",search:"",hash:"",state:null,key:"default"},o),navigationType:e.Pop}},m):m}function Se(){var e=function(){var e,n=t.useContext(me),r=_e(Te.UseRouteError),i=Re(Te.UseRouteError);if(n)return n;return null==(e=r.errors)?void 0:e[i]}(),n=ae(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:o},r):null,null)}var xe=t.createElement(Se,null),Ce=function(e){y(r,e);var n=k(r);function r(e){var t;return h(this,r),(t=n.call(this,e)).state={location:e.location,revalidation:e.revalidation,error:e.error},t}return m(r,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?t.createElement(ve.Provider,{value:this.props.routeContext},t.createElement(me.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),r}(t.Component);function Pe(e){var n=e.routeContext,r=e.match,i=e.children,o=t.useContext(ce);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),t.createElement(ve.Provider,{value:n},i)}function Ee(e,n,r){var i;if(void 0===n&&(n=[]),void 0===r&&(r=null),null==e){var o;if(null==(o=r)||!o.errors)return null;e=r.matches}var a=e,s=null==(i=r)?void 0:i.errors;if(null!=s){var l=a.findIndex((function(e){return e.route.id&&(null==s?void 0:s[e.route.id])}));l>=0||$(!1),a=a.slice(0,Math.min(a.length,l+1))}return a.reduceRight((function(e,i,o){var l=i.route.id?null==s?void 0:s[i.route.id]:null,u=null;r&&(u=i.route.errorElement||xe);var c=n.concat(a.slice(0,o+1)),f=function(){var n;return n=l?u:i.route.Component?t.createElement(i.route.Component,null):i.route.element?i.route.element:e,t.createElement(Pe,{match:i,routeContext:{outlet:e,matches:c,isDataRoute:null!=r},children:n})};return r&&(i.route.ErrorBoundary||i.route.errorElement||0===o)?t.createElement(Ce,{location:r.location,revalidation:r.revalidation,component:u,error:l,children:f(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):f()}),null)}var Qe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Qe||{}),Te=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Te||{});function $e(e){var n=t.useContext(ce);return n||$(!1),n}function _e(e){var n=t.useContext(fe);return n||$(!1),n}function Re(e){var n=function(e){var n=t.useContext(ve);return n||$(!1),n}(),r=n.matches[n.matches.length-1];return r.route.id||$(!1),r.route.id}r.startTransition;function Ae(e){$(!1)}function Me(n){var r=n.basename,i=void 0===r?"/":r,o=n.children,a=void 0===o?null:o,s=n.location,l=n.navigationType,u=void 0===l?e.Pop:l,c=n.navigator,f=n.static,h=void 0!==f&&f;ge()&&$(!1);var d=i.replace(/^\/*/,"/"),p=t.useMemo((function(){return{basename:d,navigator:c,static:h}}),[d,c,h]);"string"===typeof s&&(s=N(s));var v=s,m=v.pathname,g=void 0===m?"/":m,y=v.search,O=void 0===y?"":y,b=v.hash,w=void 0===b?"":b,k=v.state,S=void 0===k?null:k,x=v.key,C=void 0===x?"default":x,P=t.useMemo((function(){var e=G(g,d);return null==e?null:{location:{pathname:e,search:O,hash:w,state:S,key:C},navigationType:u}}),[d,g,O,w,S,C,u]);return null==P?null:t.createElement(de.Provider,{value:p},t.createElement(pe.Provider,{children:a,value:P}))}function Ne(e){var t=e.children,n=e.location;return ke(Le(t),n)}var Ze=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Ze||{}),De=new Promise((function(){}));t.Component;function Le(e,n){void 0===n&&(n=[]);var r=[];return t.Children.forEach(e,(function(e,i){if(t.isValidElement(e)){var o=[].concat(f(n),[i]);if(e.type!==t.Fragment){e.type!==Ae&&$(!1),e.props.index&&e.props.children&&$(!1);var a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Le(e.props.children,o)),r.push(a)}else r.push.apply(r,Le(e.props.children,o))}})),r}function Ie(){return Ie=Object.assign?Object.assign.bind():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},Ie.apply(this,arguments)}function Ye(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}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);var Ve=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];var Ue=r.startTransition;function je(e){var n,r=e.basename,i=e.children,o=e.future,a=e.window,s=t.useRef();null==s.current&&(s.current=(void 0===(n={window:a,v5Compat:!0})&&(n={}),Z((function(e,t){var n=N(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,s=n.hash,l=void 0===s?"":s;return i.startsWith("/")||i.startsWith(".")||(i="/"+i),A("",{pathname:i,search:a,hash:l},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:M(t))}),(function(e,t){_("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),n)));var l=s.current,c=u(t.useState({action:l.action,location:l.location}),2),f=c[0],h=c[1],d=(o||{}).v7_startTransition,p=t.useCallback((function(e){d&&Ue?Ue((function(){return h(e)})):h(e)}),[h,d]);return t.useLayoutEffect((function(){return l.listen(p)}),[l,p]),t.createElement(Me,{basename:r,children:i,location:f.location,navigationType:f.action,navigator:l})}var We="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,ze=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xe=t.forwardRef((function(e,n){var r,i=e.onClick,o=e.relative,a=e.reloadDocument,s=e.replace,l=e.state,u=e.target,c=e.to,f=e.preventScrollReset,h=Ye(e,Ve),d=t.useContext(de).basename,p=!1;if("string"===typeof c&&ze.test(c)&&(r=c,We))try{var v=new URL(window.location.href),m=c.startsWith("//")?new URL(v.protocol+c):new URL(c),g=G(m.pathname,d);m.origin===v.origin&&null!=g?c=g+m.search+m.hash:p=!0}catch(b){}var y=function(e,n){var r=(void 0===n?{}:n).relative;ge()||$(!1);var i=t.useContext(de),o=i.basename,a=i.navigator,s=we(e,{relative:r}),l=s.hash,u=s.pathname,c=s.search,f=u;return"/"!==o&&(f="/"===u?o:te([o,u])),a.createHref({pathname:f,search:c,hash:l})}(c,{relative:o}),O=function(e,n){var r=void 0===n?{}:n,i=r.target,o=r.replace,a=r.state,s=r.preventScrollReset,l=r.relative,u=be(),c=ye(),f=we(e,{relative:l});return t.useCallback((function(t){if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,i)){t.preventDefault();var n=void 0!==o?o:M(c)===M(f);u(e,{replace:n,state:a,preventScrollReset:s,relative:l})}}),[c,u,f,o,a,i,e,s,l])}(c,{replace:s,state:l,target:u,preventScrollReset:f,relative:o});return t.createElement("a",Ie({},h,{href:r||y,onClick:p||a?i:function(e){i&&i(e),e.defaultPrevented||O(e)},ref:n,target:u}))}));var Fe,Be;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Fe||(Fe={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Be||(Be={}));function qe(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 He(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 Ge(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){He(o,r,i,a,s,"next",e)}function s(e){He(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Ke(){Ke=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new _(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",g={};function y(){}function O(){}function b(){}var w={};u(w,a,(function(){return this}));var k=Object.getPrototypeOf,S=k&&k(k(R([])));S&&S!==n&&r.call(S,a)&&(w=S);var x=b.prototype=y.prototype=Object.create(w);function C(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,s){var l=f(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==d(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function E(t,n,r){var i=h;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=Q(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?m:p,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=m,r.method="throw",r.arg=u.arg)}}}function Q(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,Q(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(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 $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(d(t)+" is not iterable")}return O.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:O,configurable:!0}),O.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===O||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},C(P.prototype),u(P.prototype,s,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(x),u(x,l,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach($),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!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,g):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),g},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),$(n),g}},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;$(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Je(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(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 tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){Je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt=n(164),rt=["override"],it=["cachePolicyForParams_UNSTABLE"],ot=Ke().mark(In),at=Ke().mark(Hr);var st=function(e){var t=new Error(e);if(void 0===t.stack)try{throw t}catch(n){}return t};var lt=function(e){return!!e&&"function"===typeof e.then};var ut=function(e,t){if(null!=e)return e;throw st(null!==t&&void 0!==t?t:"Got unexpected null or undefined")};function ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ft=function(){function e(){h(this,e)}return m(e,[{key:"getValue",value:function(){throw st("BaseLoadable")}},{key:"toPromise",value:function(){throw st("BaseLoadable")}},{key:"valueMaybe",value:function(){throw st("BaseLoadable")}},{key:"valueOrThrow",value:function(){throw st('Loadable expected value, but in "'.concat(this.state,'" state'))}},{key:"promiseMaybe",value:function(){throw st("BaseLoadable")}},{key:"promiseOrThrow",value:function(){throw st('Loadable expected promise, but in "'.concat(this.state,'" state'))}},{key:"errorMaybe",value:function(){throw st("BaseLoadable")}},{key:"errorOrThrow",value:function(){throw st('Loadable expected error, but in "'.concat(this.state,'" state'))}},{key:"is",value:function(e){return e.state===this.state&&e.contents===this.contents}},{key:"map",value:function(e){throw st("BaseLoadable")}}]),e}(),ht=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),ct(w(r=t.call(this)),"state","hasValue"),ct(w(r),"contents",void 0),r.contents=e,r}return m(n,[{key:"getValue",value:function(){return this.contents}},{key:"toPromise",value:function(){return Promise.resolve(this.contents)}},{key:"valueMaybe",value:function(){return this.contents}},{key:"valueOrThrow",value:function(){return this.contents}},{key:"promiseMaybe",value:function(){}},{key:"errorMaybe",value:function(){}},{key:"map",value:function(e){var t=this;try{var n=e(this.contents);return lt(n)?gt(n):bt(n)?n:vt(n)}catch(r){return lt(r)?gt(r.next((function(){return t.map(e)}))):mt(r)}}}]),n}(ft),dt=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),ct(w(r=t.call(this)),"state","hasError"),ct(w(r),"contents",void 0),r.contents=e,r}return m(n,[{key:"getValue",value:function(){throw this.contents}},{key:"toPromise",value:function(){return Promise.reject(this.contents)}},{key:"valueMaybe",value:function(){}},{key:"promiseMaybe",value:function(){}},{key:"errorMaybe",value:function(){return this.contents}},{key:"errorOrThrow",value:function(){return this.contents}},{key:"map",value:function(e){return this}}]),n}(ft),pt=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),ct(w(r=t.call(this)),"state","loading"),ct(w(r),"contents",void 0),r.contents=e,r}return m(n,[{key:"getValue",value:function(){throw this.contents}},{key:"toPromise",value:function(){return this.contents}},{key:"valueMaybe",value:function(){}},{key:"promiseMaybe",value:function(){return this.contents}},{key:"promiseOrThrow",value:function(){return this.contents}},{key:"errorMaybe",value:function(){}},{key:"map",value:function(e){var t=this;return gt(this.contents.then((function(t){var n=e(t);if(bt(n)){var r=n;switch(r.state){case"hasValue":case"loading":return r.contents;case"hasError":throw r.contents}}return n})).catch((function(n){if(lt(n))return n.then((function(){return t.map(e).contents}));throw n})))}}]),n}(ft);function vt(e){return Object.freeze(new ht(e))}function mt(e){return Object.freeze(new dt(e))}function gt(e){return Object.freeze(new pt(e))}function yt(){return Object.freeze(new pt(new Promise((function(){}))))}function Ot(e){var t=function(e){return e.every((function(e){return"hasValue"===e.state}))?vt(e.map((function(e){return e.contents}))):e.some((function(e){return"hasError"===e.state}))?mt(ut(e.find((function(e){return"hasError"===e.state})),"Invalid loadable passed to loadableAll").contents):gt(Promise.all(e.map((function(e){return e.contents}))))}((Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((function(t){return e[t]}))).map((function(e){return bt(e)?e:lt(e)?gt(e):vt(e)})));return Array.isArray(e)?t:t.map((function(t){return Object.getOwnPropertyNames(e).reduce((function(e,n,r){return tt(tt({},e),{},Je({},n,t[r]))}),{})}))}function bt(e){return e instanceof ft}var wt={of:function(e){return lt(e)?gt(e):bt(e)?e:vt(e)},error:function(e){return mt(e)},loading:function(){return yt()},all:Ot,isLoadable:bt},kt={loadableWithValue:vt,loadableWithError:mt,loadableWithPromise:gt,loadableLoading:yt,loadableAll:Ot,isLoadable:bt,RecoilLoadable:wt},St=kt.loadableWithValue,xt=kt.loadableWithError,Ct=kt.loadableWithPromise,Pt=kt.loadableLoading,Et=kt.loadableAll,Qt=kt.isLoadable,Tt=kt.RecoilLoadable,$t=Object.freeze({__proto__:null,loadableWithValue:St,loadableWithError:xt,loadableWithPromise:Ct,loadableLoading:Pt,loadableAll:Et,isLoadable:Qt,RecoilLoadable:Tt}),_t={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};!function(){var e;"undefined"!==typeof process&&null!=(null===(e=process)||void 0===e?void 0:{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0})&&(function(e,t){var n,r,i=null===(n={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}[e])||void 0===n||null===(r=n.toLowerCase())||void 0===r?void 0:r.trim();if(null!=i&&""!==i){if(!["true","false"].includes(i))throw st("process.env.".concat(e," value must be 'true', 'false', or empty: ").concat(i));t("true"===i)}}("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",(function(e){_t.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=e})),function(e,t){var n,r=null===(n={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}[e])||void 0===n?void 0:n.trim();null!=r&&""!==r&&t(r.split(/\s*,\s*|\s+/))}("RECOIL_GKS_ENABLED",(function(e){e.forEach((function(e){_t.RECOIL_GKS_ENABLED.add(e)}))})))}();var Rt=_t;function At(e){return Rt.RECOIL_GKS_ENABLED.has(e)}At.setPass=function(e){Rt.RECOIL_GKS_ENABLED.add(e)},At.setFail=function(e){Rt.RECOIL_GKS_ENABLED.delete(e)},At.clear=function(){Rt.RECOIL_GKS_ENABLED.clear()};var Mt=At;var Nt,Zt,Dt,Lt=function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).error,null},It=Lt,Yt=null!==(Nt=t.createMutableSource)&&void 0!==Nt?Nt:t.unstable_createMutableSource,Vt=null!==(Zt=t.useMutableSource)&&void 0!==Zt?Zt:t.unstable_useMutableSource,Ut=null!==(Dt=t.useSyncExternalStore)&&void 0!==Dt?Dt:t.unstable_useSyncExternalStore,jt=!1;var Wt={createMutableSource:Yt,useMutableSource:Vt,useSyncExternalStore:Ut,currentRendererSupportsUseSyncExternalStore:function(){var e,n=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,r=n.ReactCurrentDispatcher,i=n.ReactCurrentOwner,o=null!=(null!==(e=null===r||void 0===r?void 0:r.current)&&void 0!==e?e:i.currentDispatcher).useSyncExternalStore;return!Ut||o||jt||(jt=!0,It("A React renderer without React 18+ API support is being used with React 18+.")),o},reactMode:function(){return Mt("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:Mt("recoil_sync_external_store")&&null!=Ut?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:Mt("recoil_mutable_source")&&null!=Vt&&"undefined"!==typeof window&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?Mt("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:Mt("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}},isFastRefreshEnabled:function(){return!1}},zt=function(){function e(t){h(this,e),ct(this,"key",void 0),this.key=t}return m(e,[{key:"toJSON",value:function(){return{key:this.key}}}]),e}(),Xt=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n)}(zt),Ft=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n)}(zt);var Bt={AbstractRecoilValue:zt,RecoilState:Xt,RecoilValueReadOnly:Ft,isRecoilValue:function(e){return e instanceof Xt||e instanceof Ft}},qt=Bt.AbstractRecoilValue,Ht=Bt.RecoilState,Gt=Bt.RecoilValueReadOnly,Kt=Bt.isRecoilValue,Jt=Object.freeze({__proto__:null,AbstractRecoilValue:qt,RecoilState:Ht,RecoilValueReadOnly:Gt,isRecoilValue:Kt});var en=function(e){};var tn=function(e,t){return Ke().mark((function n(){var r,i,o,a;return Ke().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=0,i=P(e),n.prev=2,i.s();case 4:if((o=i.n()).done){n.next=10;break}return a=o.value,n.next=8,t(a,r++);case 8:n.next=4;break;case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(2),i.e(n.t0);case 15:return n.prev=15,i.f(),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,12,15,18]])}))()},nn=m((function e(){h(this,e)})),rn=new nn,on=new Map,an=new Map;var sn=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n)}(x(Error));var ln=new Map;function un(e){return ln.get(e)}var cn={nodes:on,recoilValues:an,registerNode:function(e){Rt.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&function(e){if(on.has(e)){var t='Duplicate atom key "'.concat(e,'". This is a FATAL ERROR in\n production. But it is safe to ignore this warning if it occurred because of\n hot module replacement.');console.warn(t)}}(e.key),on.set(e.key,e);var t=null==e.set?new Jt.RecoilValueReadOnly(e.key):new Jt.RecoilState(e.key);return an.set(e.key,t),t},getNode:function(e){var t=on.get(e);if(null==t)throw new sn('Missing definition for RecoilValue: "'.concat(e,'""'));return t},getNodeMaybe:function(e){return on.get(e)},deleteNodeConfigIfPossible:function(e){var t;if(Mt("recoil_memory_managament_2020")){var n,r=on.get(e);if(null!==r&&void 0!==r&&null!==(t=r.shouldDeleteConfigOnRelease)&&void 0!==t&&t.call(r))on.delete(e),null===(n=un(e))||void 0===n||n(),ln.delete(e)}},setConfigDeletionHandler:function(e,t){Mt("recoil_memory_managament_2020")&&(void 0===t?ln.delete(e):ln.set(e,t))},getConfigDeletionHandler:un,recoilValuesForKeys:function(e){return tn(e,(function(e){return ut(an.get(e))}))},NodeMissingError:sn,DefaultValue:nn,DEFAULT_VALUE:rn};var fn={enqueueExecution:function(e,t){t()}};var hn,dn,pn=(hn=function(e){var t="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},n={},r=Math.pow(2,5),i=r-1,o=r/2,a=r/4,s={},l=function(e){return function(){return e}},u=n.hash=function(e){var n="undefined"===typeof e?"undefined":t(e);if("number"===n)return e;"string"!==n&&(e+="");for(var r=0,i=0,o=e.length;i<o;++i)r=(r<<5)-r+e.charCodeAt(i)|0;return r},c=function(e,t){return t>>>e&i},f=function(e){return 1<<e},h=function(e,t){return n=e&t-1,n=(n=(858993459&(n-=n>>1&1431655765))+(n>>2&858993459))+(n>>4)&252645135,127&(n+=n>>8)+(n>>16);var n},d=function(e,t,n,r){var i=r;if(!e){var o=r.length;i=new Array(o);for(var a=0;a<o;++a)i[a]=r[a]}return i[t]=n,i},p=function(e,t,n){var r=n.length-1,i=0,o=0,a=n;if(e)i=o=t;else for(a=new Array(r);i<t;)a[o++]=n[i++];for(++i;i<=r;)a[o++]=n[i++];return e&&(a.length=r),a},v={__hamt_isEmpty:!0},m=function(e){return e===v||e&&e.__hamt_isEmpty},g=function(e,t,n,r){return{type:1,edit:e,hash:t,key:n,value:r,_modify:S}},y=function(e,t,n){return{type:2,edit:e,hash:t,children:n,_modify:x}},O=function(e,t,n){return{type:3,edit:e,mask:t,children:n,_modify:C}},b=function(e,t,n){return{type:4,edit:e,size:t,children:n,_modify:P}},w=function e(t,n,r,i,o,a){if(r===o)return y(t,r,[a,i]);var s=c(n,r),l=c(n,o);return O(t,f(s)|f(l),s===l?[e(t,n+5,r,i,o,a)]:s<l?[i,a]:[a,i])},k=function(e,t){return e===t.edit},S=function(e,t,n,r,i,o,a){if(t(o,this.key)){var l=r(this.value);return l===this.value?this:l===s?(--a.value,v):k(e,this)?(this.value=l,this):g(e,i,o,l)}var u=r();return u===s?this:(++a.value,w(e,n,this.hash,this,i,g(e,i,o,u)))},x=function(e,t,n,r,i,o,a){if(i===this.hash){var l=function(e,t,n,r,i,o,a,l){for(var u=i.length,c=0;c<u;++c){var f=i[c];if(n(a,f.key)){var h=f.value,v=o(h);return v===h?i:v===s?(--l.value,p(e,c,i)):d(e,c,g(t,r,a,v),i)}}var m=o();return m===s?i:(++l.value,d(e,u,g(t,r,a,m),i))}(k(e,this),e,t,this.hash,this.children,r,o,a);return l===this.children?this:l.length>1?y(e,this.hash,l):l[0]}var u=r();return u===s?this:(++a.value,w(e,n,this.hash,this,i,g(e,i,o,u)))},C=function(e,t,n,r,i,a,s){var l=this.mask,u=this.children,g=c(n,i),y=f(g),w=h(l,y),S=l&y,x=S?u[w]:v,C=x._modify(e,t,n+5,r,i,a,s);if(x===C)return this;var P,E=k(e,this),Q=l,T=void 0;if(S&&m(C)){if(!(Q&=~y))return v;if(u.length<=2&&((P=u[1^w])===v||1===P.type||2===P.type))return u[1^w];T=p(E,w,u)}else if(S||m(C))T=d(E,w,C,u);else{if(u.length>=o)return function(e,t,n,r,i){for(var o=[],a=r,s=0,l=0;a;++l)1&a&&(o[l]=i[s++]),a>>>=1;return o[t]=n,b(e,s+1,o)}(e,g,C,l,u);Q|=y,T=function(e,t,n,r){var i=r.length;if(e){for(var o=i;o>=t;)r[o--]=r[o];return r[t]=n,r}for(var a=0,s=0,l=new Array(i+1);a<t;)l[s++]=r[a++];for(l[t]=n;a<i;)l[++s]=r[a++];return l}(E,w,C,u)}return E?(this.mask=Q,this.children=T,this):O(e,Q,T)},P=function(e,t,n,r,i,o,s){var l=this.size,u=this.children,f=c(n,i),h=u[f],p=(h||v)._modify(e,t,n+5,r,i,o,s);if(h===p)return this;var g=k(e,this),y=void 0;if(m(h)&&!m(p))++l,y=d(g,f,p,u);else if(!m(h)&&m(p)){if(--l<=a)return function(e,t,n,r){for(var i=new Array(t-1),o=0,a=0,s=0,l=r.length;s<l;++s)if(s!==n){var u=r[s];u&&!m(u)&&(i[o++]=u,a|=1<<s)}return O(e,a,i)}(e,l,f,u);y=d(g,f,v,u)}else y=d(g,f,p,u);return g?(this.size=l,this.children=y,this):b(e,l,y)};function E(e,t,n,r,i){this._editable=e,this._edit=t,this._config=n,this._root=r,this._size=i}v._modify=function(e,t,n,r,i,o,a){var l=r();return l===s?v:(++a.value,g(e,i,o,l))},E.prototype.setTree=function(e,t){return this._editable?(this._root=e,this._size=t,this):e===this._root?this:new E(this._editable,this._edit,this._config,e,t)};var Q=n.tryGetHash=function(e,t,n,r){for(var i=r._root,o=0,a=r._config.keyEq;;)switch(i.type){case 1:return a(n,i.key)?i.value:e;case 2:if(t===i.hash)for(var s=i.children,l=0,u=s.length;l<u;++l){var d=s[l];if(a(n,d.key))return d.value}return e;case 3:var p=c(o,t),v=f(p);if(i.mask&v){i=i.children[h(i.mask,v)],o+=5;break}return e;case 4:if(i=i.children[c(o,t)]){o+=5;break}return e;default:return e}};E.prototype.tryGetHash=function(e,t,n){return Q(e,t,n,this)};var T=n.tryGet=function(e,t,n){return Q(e,n._config.hash(t),t,n)};E.prototype.tryGet=function(e,t){return T(e,t,this)};var $=n.getHash=function(e,t,n){return Q(void 0,e,t,n)};E.prototype.getHash=function(e,t){return $(e,t,this)},n.get=function(e,t){return Q(void 0,t._config.hash(e),e,t)},E.prototype.get=function(e,t){return T(t,e,this)};var _=n.has=function(e,t,n){return Q(s,e,t,n)!==s};E.prototype.hasHash=function(e,t){return _(e,t,this)};var R=n.has=function(e,t){return _(t._config.hash(e),e,t)};E.prototype.has=function(e){return R(e,this)};var A=function(e,t){return e===t};n.make=function(e){return new E(0,0,{keyEq:e&&e.keyEq||A,hash:e&&e.hash||u},v,0)},n.empty=n.make();var M=n.isEmpty=function(e){return e&&!!m(e._root)};E.prototype.isEmpty=function(){return M(this)};var N=n.modifyHash=function(e,t,n,r){var i={value:r._size},o=r._root._modify(r._editable?r._edit:NaN,r._config.keyEq,0,e,t,n,i);return r.setTree(o,i.value)};E.prototype.modifyHash=function(e,t,n){return N(n,e,t,this)};var Z=n.modify=function(e,t,n){return N(e,n._config.hash(t),t,n)};E.prototype.modify=function(e,t){return Z(t,e,this)};var D=n.setHash=function(e,t,n,r){return N(l(n),e,t,r)};E.prototype.setHash=function(e,t,n){return D(e,t,n,this)};var L=n.set=function(e,t,n){return D(n._config.hash(e),e,t,n)};E.prototype.set=function(e,t){return L(e,t,this)};var I=l(s),Y=n.removeHash=function(e,t,n){return N(I,e,t,n)};E.prototype.removeHash=E.prototype.deleteHash=function(e,t){return Y(e,t,this)};var V=n.remove=function(e,t){return Y(t._config.hash(e),e,t)};E.prototype.remove=E.prototype.delete=function(e){return V(e,this)};var U=n.beginMutation=function(e){return new E(e._editable+1,e._edit+1,e._config,e._root,e._size)};E.prototype.beginMutation=function(){return U(this)};var j=n.endMutation=function(e){return e._editable=e._editable&&e._editable-1,e};E.prototype.endMutation=function(){return j(this)};var W=n.mutate=function(e,t){var n=U(t);return e(n),j(n)};E.prototype.mutate=function(e){return W(e,this)};var z=function(e){return e&&X(e[0],e[1],e[2],e[3],e[4])},X=function(e,t,n,r,i){for(;n<e;){var o=t[n++];if(o&&!m(o))return F(o,r,[e,t,n,r,i])}return z(i)},F=function(e,t,n){switch(e.type){case 1:return{value:t(e),rest:n};case 2:case 4:case 3:var r=e.children;return X(r.length,r,0,t,n);default:return z(n)}},B={done:!0};function q(e){this.v=e}q.prototype.next=function(){if(!this.v)return B;var e=this.v;return this.v=z(e.rest),e},q.prototype[Symbol.iterator]=function(){return this};var H=function(e,t){return new q(F(e._root,t))},G=function(e){return[e.key,e.value]},K=n.entries=function(e){return H(e,G)};E.prototype.entries=E.prototype[Symbol.iterator]=function(){return K(this)};var J=function(e){return e.key},ee=n.keys=function(e){return H(e,J)};E.prototype.keys=function(){return ee(this)};var te=function(e){return e.value},ne=n.values=E.prototype.values=function(e){return H(e,te)};E.prototype.values=function(){return ne(this)};var re=n.fold=function(e,t,n){var r=n._root;if(1===r.type)return e(t,r.value,r.key);for(var i=[r.children],o=void 0;o=i.pop();)for(var a=0,s=o.length;a<s;){var l=o[a++];l&&l.type&&(1===l.type?t=e(t,l.value,l.key):i.push(l.children))}return t};E.prototype.fold=function(e,t){return re(e,t,this)};var ie=n.forEach=function(e,t){return re((function(n,r,i){return e(r,i,t)}),null,t)};E.prototype.forEach=function(e){return ie(e,this)};var oe=n.count=function(e){return e._size};E.prototype.count=function(){return oe(this)},Object.defineProperty(E.prototype,"size",{get:E.prototype.count}),e.exports?e.exports=n:(void 0).hamt=n},hn(dn={exports:{}},dn.exports),dn.exports),vn=function(){function e(t){h(this,e),ct(this,"_map",void 0),this._map=new Map(null===t||void 0===t?void 0:t.entries())}return m(e,[{key:"keys",value:function(){return this._map.keys()}},{key:"entries",value:function(){return this._map.entries()}},{key:"get",value:function(e){return this._map.get(e)}},{key:"has",value:function(e){return this._map.has(e)}},{key:"set",value:function(e,t){return this._map.set(e,t),this}},{key:"delete",value:function(e){return this._map.delete(e),this}},{key:"clone",value:function(){return gn(this)}},{key:"toMap",value:function(){return new Map(this._map)}}]),e}(),mn=function(){function e(t){if(h(this,e),ct(this,"_hamt",pn.empty.beginMutation()),t instanceof e){var n=t._hamt.endMutation();t._hamt=n.beginMutation(),this._hamt=n.beginMutation()}else if(t){var r,i=P(t.entries());try{for(i.s();!(r=i.n()).done;){var o=u(r.value,2),a=o[0],s=o[1];this._hamt.set(a,s)}}catch(l){i.e(l)}finally{i.f()}}}return m(e,[{key:"keys",value:function(){return this._hamt.keys()}},{key:"entries",value:function(){return this._hamt.entries()}},{key:"get",value:function(e){return this._hamt.get(e)}},{key:"has",value:function(e){return this._hamt.has(e)}},{key:"set",value:function(e,t){return this._hamt.set(e,t),this}},{key:"delete",value:function(e){return this._hamt.delete(e),this}},{key:"clone",value:function(){return gn(this)}},{key:"toMap",value:function(){return new Map(this._hamt)}}]),e}();function gn(e){return Mt("recoil_hamt_2020")?new mn(e):new vn(e)}var yn=gn;var On=function(e){for(var t=new Set,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o,a=P(e);try{e:for(a.s();!(o=a.n()).done;){var s,l=o.value,u=P(r);try{for(u.s();!(s=u.n()).done;){if(s.value.has(l))continue e}}catch(c){u.e(c)}finally{u.f()}t.add(l)}}catch(c){a.e(c)}finally{a.f()}return t};var bn=function(e,t){var n=new Map;return e.forEach((function(e,r){n.set(r,t(e,r))})),n};function wn(e,t,n,r){var i=n.nodeDeps,o=n.nodeToNodeSubscriptions,a=i.get(e);if(!a||!r||a===r.nodeDeps.get(e)){i.set(e,t);var s,l=P(null==a?t:On(t,a));try{for(l.s();!(s=l.n()).done;){var u=s.value;o.has(u)||o.set(u,new Set),ut(o.get(u)).add(e)}}catch(p){l.e(p)}finally{l.f()}if(a){var c,f=P(On(a,t));try{for(f.s();!(c=f.n()).done;){var h=c.value;if(!o.has(h))return;var d=ut(o.get(h));d.delete(e),0===d.size&&o.delete(h)}}catch(p){f.e(p)}finally{f.f()}}}}var kn=function(e){return{nodeDeps:bn(e.nodeDeps,(function(e){return new Set(e)})),nodeToNodeSubscriptions:bn(e.nodeToNodeSubscriptions,(function(e){return new Set(e)}))}},Sn=function(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}},xn=function(e,t,n,r){var i,o,a,s,l=n.getState();r!==l.currentTree.version&&r!==(null===(i=l.nextTree)||void 0===i?void 0:i.version)&&r!==(null===(o=l.previousTree)||void 0===o?void 0:o.version)&&It("Tried to save dependencies to a discarded tree");var u=n.getGraph(r);if(wn(e,t,u),r===(null===(a=l.previousTree)||void 0===a?void 0:a.version)&&wn(e,t,n.getGraph(l.currentTree.version),u),r===(null===(s=l.previousTree)||void 0===s?void 0:s.version)||r===l.currentTree.version){var c,f=null===(c=l.nextTree)||void 0===c?void 0:c.version;if(void 0!==f)wn(e,t,n.getGraph(f),u)}},Cn=0,Pn=0,En=0,Qn=function(){return Cn++},Tn=function(){return Pn++},$n=function(){return En++},_n=Object.freeze({__proto__:null,persistentMap:yn}).persistentMap,Rn=Sn,An=Qn;function Mn(){var e=An();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:_n(),nonvalidatedAtoms:_n()}}var Nn={makeEmptyTreeState:Mn,makeEmptyStoreState:function(){var e=Mn();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:(new Map).set(e.version,Rn()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}},getNextTreeStateVersion:An},Zn=m((function e(){h(this,e)}));var Dn={RetentionZone:Zn,retentionZone:function(){return new Zn}};var Ln=function(e,t){var n=new Set(e);return n.add(t),n};function In(e,t){var n,r,i,o;return Ke().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=0,r=P(e),a.prev=2,r.s();case 4:if((i=r.n()).done){a.next=11;break}if(o=i.value,!t(o,n++)){a.next=9;break}return a.next=9,o;case 9:a.next=4;break;case 11:a.next=16;break;case 13:a.prev=13,a.t0=a.catch(2),r.e(a.t0);case 16:return a.prev=16,r.f(),a.finish(16);case 19:case"end":return a.stop()}}),ot,null,[[2,13,16,19]])}var Yn=In;var Vn=function(e,t){return new Proxy(e,{get:function(e,n){return!(n in e)&&n in t&&(e[n]=t[n]()),e[n]},ownKeys:function(e){return Object.keys(e)}})},Un=cn.getNode,jn=cn.getNodeMaybe,Wn=cn.recoilValuesForKeys,zn=Dn.RetentionZone,Xn=Ln,Fn=Object.freeze(new Set),Bn=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n)}(x(Error));function qn(e,t,n,r){var i=e.getState();if(!i.nodeCleanupFunctions.has(n)){var o=Un(n),a=function(e,t,n){if(!Mt("recoil_memory_managament_2020"))return function(){};var r=e.getState().retention.nodesRetainedByZone;function i(e){var n=r.get(e);n||r.set(e,n=new Set),n.add(t)}if(n instanceof zn)i(n);else if(Array.isArray(n)){var o,a=P(n);try{for(a.s();!(o=a.n()).done;)i(o.value)}catch(s){a.e(s)}finally{a.f()}}return function(){if(Mt("recoil_memory_managament_2020")){var r=e.getState().retention;if(n instanceof zn)a(n);else if(Array.isArray(n)){var i,o=P(n);try{for(o.s();!(i=o.n()).done;)a(i.value)}catch(s){o.e(s)}finally{o.f()}}}function a(e){var n=r.nodesRetainedByZone.get(e);null===n||void 0===n||n.delete(t),n&&0===n.size&&r.nodesRetainedByZone.delete(e)}}}(e,n,o.retainedBy),s=o.init(e,t,r);i.nodeCleanupFunctions.set(n,(function(){s(),a()}))}}function Hn(e,t,n){return Un(n).peek(e,t)}function Gn(e,t,n){for(var r=new Set,i=Array.from(n),o=e.getGraph(t.version),a=i.pop();a;a=i.pop()){var s;r.add(a);var l,u=P(null!==(s=o.nodeToNodeSubscriptions.get(a))&&void 0!==s?s:Fn);try{for(u.s();!(l=u.n()).done;){var c=l.value;r.has(c)||i.push(c)}}catch(f){u.e(f)}finally{u.f()}}return r}var Kn=function(e,t,n){return qn(e,t,n,"get"),Un(n).get(e,t)},Jn=Hn,er=function(e,t,n,r){var i=Un(n);if(null==i.set)throw new Bn("Attempt to set read-only RecoilValue: ".concat(n));var o=i.set;return qn(e,t,n,"set"),o(e,t,r)},tr=function(e,t,n){qn(e,e.getState().currentTree,t,n)},nr=function(e,t){var n,r=e.getState();null===(n=r.nodeCleanupFunctions.get(t))||void 0===n||n(),r.nodeCleanupFunctions.delete(t)},rr=function(e,t,n){var r,i=jn(t);return null===i||void 0===i||null===(r=i.invalidate)||void 0===r||r.call(i,e),tt(tt({},e),{},{atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:Xn(e.dirtyAtoms,t)})},ir=function(e,t,n){var r=e.getState(),i=e.getGraph(t.version),o=Un(n).nodeType;return Vn({type:o},{loadable:function(){return Hn(e,t,n)},isActive:function(){return r.knownAtoms.has(n)||r.knownSelectors.has(n)},isSet:function(){return"selector"!==o&&t.atomValues.has(n)},isModified:function(){return t.dirtyAtoms.has(n)},deps:function(){var e;return Wn(null!==(e=i.nodeDeps.get(n))&&void 0!==e?e:[])},subscribers:function(){var i,o;return{nodes:Wn(Yn(Gn(e,t,new Set([n])),(function(e){return e!==n}))),components:tn(null!==(i=null===(o=r.nodeToComponentSubscriptions.get(n))||void 0===o?void 0:o.values())&&void 0!==i?i:[],(function(e){return{name:u(e,1)[0]}}))}}})},or=Gn,ar=null;var sr=function(e){ar=e},lr=function(){var e;null===(e=ar)||void 0===e||e()},ur=or,cr=Kn,fr=er,hr=$n,dr=cn.getNode,pr=cn.getNodeMaybe,vr=cn.DefaultValue,mr=Wt.reactMode,gr=Jt.AbstractRecoilValue,yr=Jt.RecoilState,Or=Jt.RecoilValueReadOnly,br=Jt.isRecoilValue,wr=lr;function kr(e,t,n){if("set"===n.type){var r,i=n.recoilValue,o=function(e,t,n,r){var i=n.key;if("function"===typeof r){var o=cr(e,t,i);if("loading"===o.state){var a='Tried to set atom or selector "'.concat(i,'" using an updater function while the current state is pending, this is not currently supported.');throw It(a),st(a)}if("hasError"===o.state)throw o.contents;return r(o.contents)}return r}(e,t,i,n.valueOrUpdater),a=P(fr(e,t,i.key,o).entries());try{for(a.s();!(r=a.n()).done;){var s=u(r.value,2);Sr(t,s[0],s[1])}}catch(p){a.e(p)}finally{a.f()}}else if("setLoadable"===n.type){Sr(t,n.recoilValue.key,n.loadable)}else if("markModified"===n.type){var l=n.recoilValue.key;t.dirtyAtoms.add(l)}else if("setUnvalidated"===n.type){var c,f=n.recoilValue.key,h=n.unvalidatedValue,d=pr(f);null===d||void 0===d||null===(c=d.invalidate)||void 0===c||c.call(d,t),t.atomValues.delete(f),t.nonvalidatedAtoms.set(f,h),t.dirtyAtoms.add(f)}else It("Unknown action ".concat(n.type))}function Sr(e,t,n){"hasValue"===n.state&&n.contents instanceof vr?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function xr(e,t){e.replaceState((function(n){var r,i=Er(n),o=P(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;kr(e,i,a)}}catch(s){o.e(s)}finally{o.f()}return Qr(e,i),wr(),i}))}function Cr(e,t){if(Pr.length){var n=Pr[Pr.length-1],r=n.get(e);r||n.set(e,r=[]),r.push(t)}else xr(e,[t])}var Pr=[];function Er(e){return tt(tt({},e),{},{atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)})}function Qr(e,t){var n,r=P(ur(e,t,t.dirtyAtoms));try{for(r.s();!(n=r.n()).done;){var i,o,a=n.value;null===(i=pr(a))||void 0===i||null===(o=i.invalidate)||void 0===o||o.call(i,t)}}catch(s){r.e(s)}finally{r.f()}}function Tr(e,t,n){Cr(e,{type:"set",recoilValue:t,valueOrUpdater:n})}var $r={RecoilValueReadOnly:Or,AbstractRecoilValue:gr,RecoilState:yr,getRecoilValueAsLoadable:function(e,t){var n,r,i=t.key,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getState().currentTree,a=e.getState();o.version!==a.currentTree.version&&o.version!==(null===(n=a.nextTree)||void 0===n?void 0:n.version)&&o.version!==(null===(r=a.previousTree)||void 0===r?void 0:r.version)&&It("Tried to read from a discarded tree");var s=cr(e,o,i);return"loading"===s.state&&s.contents.catch((function(){})),s},setRecoilValue:Tr,setRecoilValueLoadable:function(e,t,n){if(n instanceof vr)return Tr(e,t,n);Cr(e,{type:"setLoadable",recoilValue:t,loadable:n})},markRecoilValueModified:function(e,t){Cr(e,{type:"markModified",recoilValue:t})},setUnvalidatedRecoilValue:function(e,t,n){Cr(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})},subscribeToRecoilValue:function(e,t,n){var r=t.key,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=hr(),a=e.getState();a.nodeToComponentSubscriptions.has(r)||a.nodeToComponentSubscriptions.set(r,new Map),ut(a.nodeToComponentSubscriptions.get(r)).set(o,[null!==i&&void 0!==i?i:"<not captured>",n]);var s=mr();if(s.early&&("LEGACY"===s.mode||"MUTABLE_SOURCE"===s.mode)){var l=e.getState().nextTree;l&&l.dirtyAtoms.has(r)&&n(l)}return{release:function(){var t=e.getState(),n=t.nodeToComponentSubscriptions.get(r);void 0!==n&&n.has(o)?(n.delete(o),0===n.size&&t.nodeToComponentSubscriptions.delete(r)):It("Subscription missing at release time for atom ".concat(r,". This is a bug in Recoil."))}}},isRecoilValue:br,applyAtomValueWrites:function(e,t){var n=e.clone();return t.forEach((function(e,t){"hasValue"===e.state&&e.contents instanceof vr?n.delete(t):n.set(t,e)})),n},batchStart:function(){var e=new Map;return Pr.push(e),function(){var t,n=P(e);try{for(n.s();!(t=n.n()).done;){var r=u(t.value,2);xr(r[0],r[1])}}catch(i){n.e(i)}finally{n.f()}Pr.pop()!==e&&It("Incorrect order of batch popping")}},writeLoadableToTreeState:Sr,invalidateDownstreams:Qr,copyTreeState:Er,refreshRecoilValue:function(e,t){var n,r=e.getState().currentTree,i=dr(t.key);null===(n=i.clearCache)||void 0===n||n.call(i,e,r)}};var _r=function(e,t,n){for(var r=e.entries(),i=r.next();!i.done;){var o=i.value;if(t.call(n,o[1],o[0],e))return!0;i=r.next()}return!1},Rr=nr,Ar=cn.deleteNodeConfigIfPossible,Mr=cn.getNode,Nr=Dn.RetentionZone,Zr=new Set;function Dr(e,t){var n=e.getState(),r=n.currentTree;if(n.nextTree)It("releaseNodesNowOnCurrentTree should only be called at the end of a batch");else{var i,o=new Set,a=P(t);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s instanceof Nr){var l,u=P(Ir(n,s));try{for(u.s();!(l=u.n()).done;){var c=l.value;o.add(c)}}catch(p){u.e(p)}finally{u.f()}}else o.add(s)}}catch(p){a.e(p)}finally{a.f()}var f,h=function(e,t){var n=e.getState(),r=n.currentTree,i=e.getGraph(r.version),o=new Set,a=new Set;return s(t),o;function s(t){var l,u=new Set,c=function(e,t,n,r,i){var o=e.getGraph(t.version),a=[],s=new Set;for(;n.size>0;)l(ut(n.values().next().value));return a;function l(e){if(r.has(e)||i.has(e))n.delete(e);else if(!s.has(e)){var t=o.nodeToNodeSubscriptions.get(e);if(t){var u,c=P(t);try{for(c.s();!(u=c.n()).done;){l(u.value)}}catch(p){c.e(p)}finally{c.f()}}s.add(e),n.delete(e),a.push(e)}}}(e,r,t,o,a),f=P(c);try{for(f.s();!(l=f.n()).done;){var h,d=l.value;if("recoilRoot"!==Mr(d).retainedBy)if((null!==(h=n.retention.referenceCounts.get(d))&&void 0!==h?h:0)>0)a.add(d);else if(Yr(d).some((function(e){return n.retention.referenceCounts.get(e)})))a.add(d);else{var v=i.nodeToNodeSubscriptions.get(d);v&&_r(v,(function(e){return a.has(e)}))?a.add(d):(o.add(d),u.add(d))}else a.add(d)}}catch(p){f.e(p)}finally{f.f()}var m,g=new Set,y=P(u);try{for(y.s();!(m=y.n()).done;){var O,b=m.value,w=P(null!==(k=i.nodeDeps.get(b))&&void 0!==k?k:Zr);try{for(w.s();!(O=w.n()).done;){var k,S=O.value;o.has(S)||g.add(S)}}catch(p){w.e(p)}finally{w.f()}}}catch(p){y.e(p)}finally{y.f()}g.size&&s(g)}}(e,o),d=P(h);try{for(d.s();!(f=d.n()).done;){Lr(e,r,f.value)}}catch(p){d.e(p)}finally{d.f()}}}function Lr(e,t,n){if(Mt("recoil_memory_managament_2020")){Rr(e,n);var r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);var i,o=P(Yr(n));try{for(o.s();!(i=o.n()).done;){var a,s=i.value;null===(a=r.retention.nodesRetainedByZone.get(s))||void 0===a||a.delete(n)}}catch(p){o.e(p)}finally{o.f()}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);var l=r.graphsByVersion.get(t.version);if(l){var u=l.nodeDeps.get(n);if(void 0!==u){l.nodeDeps.delete(n);var c,f=P(u);try{for(f.s();!(c=f.n()).done;){var h,d=c.value;null===(h=l.nodeToNodeSubscriptions.get(d))||void 0===h||h.delete(n)}}catch(p){f.e(p)}finally{f.f()}}l.nodeToNodeSubscriptions.delete(n)}Ar(n)}}function Ir(e,t){var n;return null!==(n=e.retention.nodesRetainedByZone.get(t))&&void 0!==n?n:Zr}function Yr(e){var t=Mr(e).retainedBy;return void 0===t||"components"===t||"recoilRoot"===t?[]:t instanceof Nr?[t]:t}function Vr(e,t){Mt("recoil_memory_managament_2020")&&(e.getState().retention.referenceCounts.delete(t),function(e,t){var n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):Dr(e,new Set([t]))}(e,t))}var Ur=12e4,jr=function(e,t,n){var r;if(Mt("recoil_memory_managament_2020")){var i=e.getState().retention.referenceCounts,o=(null!==(r=i.get(t))&&void 0!==r?r:0)+n;0===o?Vr(e,t):i.set(t,o)}},Wr=function(e){if(Mt("recoil_memory_managament_2020")){var t=e.getState();Dr(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}},zr=function(e){return void 0===e?"recoilRoot":e},Xr=nt.unstable_batchedUpdates,Fr=$r.batchStart,Br={unstable_batchedUpdates:{unstable_batchedUpdates:Xr}.unstable_batchedUpdates}.unstable_batchedUpdates||function(e){return e()},qr=function(e){Br((function(){var t=function(){};try{t=Fr(),e()}finally{t()}}))};function Hr(e){var t,n,r,i,o,a;return Ke().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=P(e),s.prev=1,t.s();case 3:if((n=t.n()).done){s.next=24;break}r=n.value,i=P(r),s.prev=6,i.s();case 8:if((o=i.n()).done){s.next=14;break}return a=o.value,s.next=12,a;case 12:s.next=8;break;case 14:s.next=19;break;case 16:s.prev=16,s.t0=s.catch(6),i.e(s.t0);case 19:return s.prev=19,i.f(),s.finish(19);case 22:s.next=3;break;case 24:s.next=29;break;case 26:s.prev=26,s.t1=s.catch(1),t.e(s.t1);case 29:return s.prev=29,t.f(),s.finish(29);case 32:case"end":return s.stop()}}),at,null,[[1,26,29,32],[6,16,19,22]])}var Gr=Hr,Kr="undefined"===typeof Window||"undefined"===typeof window,Jr="undefined"!==typeof navigator&&"ReactNative"===navigator.product,ei={isSSR:Kr,isReactNative:Jr,isWindow:function(e){return!Kr&&(e===window||e instanceof Window)}};var ti=function(e,t){var n,r;return[function(){var i=t.apply(void 0,arguments);return n===i?r:(n=i,r=e.apply(void 0,arguments))},function(){n=null}]},ni=qr,ri=tr,ii=ir,oi=Sn,ai=Tn,si=cn.DEFAULT_VALUE,li=cn.recoilValues,ui=cn.recoilValuesForKeys,ci=$r.AbstractRecoilValue,fi=$r.getRecoilValueAsLoadable,hi=$r.setRecoilValue,di=$r.setUnvalidatedRecoilValue,pi=jr,vi=sr,mi=Nn.getNextTreeStateVersion,gi=Nn.makeEmptyStoreState,yi=ei.isSSR,Oi=ti,bi=function(){function e(t,n){var r=this;h(this,e),ct(this,"_store",void 0),ct(this,"_refCount",1),ct(this,"getLoadable",(function(e){return r.checkRefCount_INTERNAL(),fi(r._store,e)})),ct(this,"getPromise",(function(e){return r.checkRefCount_INTERNAL(),r.getLoadable(e).toPromise()})),ct(this,"getNodes_UNSTABLE",(function(e){if(r.checkRefCount_INTERNAL(),!0===(null===e||void 0===e?void 0:e.isModified)){if(!1===(null===e||void 0===e?void 0:e.isInitialized))return[];var t=r._store.getState().currentTree;return ui(t.dirtyAtoms)}var n=r._store.getState().knownAtoms,i=r._store.getState().knownSelectors;return null==(null===e||void 0===e?void 0:e.isInitialized)?li.values():!0===e.isInitialized?ui(Gr([n,i])):Yn(li.values(),(function(e){var t=e.key;return!n.has(t)&&!i.has(t)}))})),ct(this,"getInfo_UNSTABLE",(function(e){var t=e.key;return r.checkRefCount_INTERNAL(),ii(r._store,r._store.getState().currentTree,t)})),ct(this,"map",(function(e){r.checkRefCount_INTERNAL();var t=new Ci(r,ni);return e(t),t})),ct(this,"asyncMap",function(){var e=Ge(Ke().mark((function e(t){var n;return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.checkRefCount_INTERNAL(),(n=new Ci(r,ni)).retain(),e.next=5,t(n);case 5:return n.autoRelease_INTERNAL(),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this._store={storeID:ai(),parentStoreID:n,getState:function(){return t},replaceState:function(e){t.currentTree=e(t.currentTree)},getGraph:function(e){var n=t.graphsByVersion;if(n.has(e))return ut(n.get(e));var r=oi();return n.set(e,r),r},subscribeToTransactions:function(){return{release:function(){}}},addTransactionMetadata:function(){throw st("Cannot subscribe to Snapshots")}};var i,o=P(this._store.getState().knownAtoms);try{for(o.s();!(i=o.n()).done;){var a=i.value;ri(this._store,a,"get"),pi(this._store,a,1)}}catch(s){o.e(s)}finally{o.f()}this.autoRelease_INTERNAL()}return m(e,[{key:"retain",value:function(){var e=this;this._refCount<=0&&It("Attempt to retain() Snapshot that was already released."),this._refCount++;var t=!1;return function(){t||(t=!0,e._release())}}},{key:"autoRelease_INTERNAL",value:function(){var e=this;yi||window.setTimeout((function(){return e._release()}),10)}},{key:"_release",value:function(){if(this._refCount--,0===this._refCount){if(this._store.getState().nodeCleanupFunctions.forEach((function(e){return e()})),this._store.getState().nodeCleanupFunctions.clear(),!Mt("recoil_memory_managament_2020"))return}else this._refCount}},{key:"isRetained",value:function(){return this._refCount>0}},{key:"checkRefCount_INTERNAL",value:function(){Mt("recoil_memory_managament_2020")&&this._refCount}},{key:"getStore_INTERNAL",value:function(){return this.checkRefCount_INTERNAL(),this._store}},{key:"getID",value:function(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}},{key:"getStoreID",value:function(){return this.checkRefCount_INTERNAL(),this._store.storeID}}]),e}();function wi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.getState(),i=n?mi():t.version;return{currentTree:{version:n?i:t.version,stateID:n?i:t.stateID,transactionMetadata:tt({},t.transactionMetadata),dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:(new Map).set(i,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(tn(r.nodeCleanupFunctions.entries(),(function(e){return[u(e,1)[0],function(){}]})))}}var ki=u(Oi((function(e,t){var n,r=e.getState(),i="latest"===t?null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree:ut(r.previousTree);return new bi(wi(e,i),e.storeID)}),(function(e,t){var n,r;return String(t)+String(e.storeID)+String(null===(n=e.getState().nextTree)||void 0===n?void 0:n.version)+String(e.getState().currentTree.version)+String(null===(r=e.getState().previousTree)||void 0===r?void 0:r.version)})),2),Si=ki[0],xi=ki[1];vi(xi);var Ci=function(e){y(n,e);var t=k(n);function n(e,r){var i;return h(this,n),ct(w(i=t.call(this,wi(e.getStore_INTERNAL(),e.getStore_INTERNAL().getState().currentTree,!0),e.getStoreID())),"_batch",void 0),ct(w(i),"set",(function(e,t){i.checkRefCount_INTERNAL();var n=i.getStore_INTERNAL();i._batch((function(){pi(n,e.key,1),hi(i.getStore_INTERNAL(),e,t)}))})),ct(w(i),"reset",(function(e){i.checkRefCount_INTERNAL();var t=i.getStore_INTERNAL();i._batch((function(){pi(t,e.key,1),hi(i.getStore_INTERNAL(),e,si)}))})),ct(w(i),"setUnvalidatedAtomValues_DEPRECATED",(function(e){i.checkRefCount_INTERNAL();var t=i.getStore_INTERNAL();ni((function(){var n,r=P(e.entries());try{for(r.s();!(n=r.n()).done;){var i=u(n.value,2),o=i[0],a=i[1];pi(t,o,1),di(t,new ci(o),a)}}catch(s){r.e(s)}finally{r.f()}}))})),i._batch=r,i}return m(n)}(bi),Pi={Snapshot:bi,MutableSnapshot:Ci,freshSnapshot:function(e){var t=new bi(gi());return null!=e?t.map(e):t},cloneSnapshot:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"latest",n=Si(e,t);return n.isRetained()?n:(xi(),Si(e,t))}},Ei=Pi.Snapshot,Qi=Pi.MutableSnapshot,Ti=Pi.freshSnapshot,$i=Pi.cloneSnapshot,_i=Object.freeze({__proto__:null,Snapshot:Ei,MutableSnapshot:Qi,freshSnapshot:Ti,cloneSnapshot:$i});var Ri=function(){for(var e=new Set,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a,s=P(o[i]);try{for(s.s();!(a=s.n()).done;){var l=a.value;e.add(l)}}catch(u){s.e(u)}finally{s.f()}}return e},Ai=t.useRef;var Mi=function(e){var t=Ai(e);return t.current===e&&"function"===typeof e&&(t.current=e()),t},Ni=Nn.getNextTreeStateVersion,Zi=Nn.makeEmptyStoreState,Di=nr,Li=or,Ii=tr,Yi=er,Vi=rr,Ui=Sn,ji=kn,Wi=Tn,zi=Wt.createMutableSource,Xi=Wt.reactMode,Fi=$r.applyAtomValueWrites,Bi=Wr,qi=_i.freshSnapshot,Hi=t.useCallback,Gi=t.useContext,Ki=t.useEffect,Ji=t.useMemo,eo=t.useRef,to=t.useState;function no(){throw st("This component must be used inside a <RecoilRoot> component.")}var ro=Object.freeze({storeID:Wi(),getState:no,replaceState:no,getGraph:no,subscribeToTransactions:no,addTransactionMetadata:no}),io=!1;function oo(e){if(io)throw st("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");var t=e.getState();if(null===t.nextTree){Mt("recoil_memory_managament_2020")&&Mt("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&Bi(e);var n=t.currentTree.version,r=Ni();t.nextTree=tt(tt({},t.currentTree),{},{version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}}),t.graphsByVersion.set(r,ji(ut(t.graphsByVersion.get(n))))}}var ao=t.createContext({current:ro}),so=function(){return Gi(ao)},lo=t.createContext(null);function uo(e,t,n){var r,i=P(Li(e,n,n.dirtyAtoms));try{for(i.s();!(r=i.n()).done;){var o=r.value,a=t.nodeToComponentSubscriptions.get(o);if(a){var s,l=P(a);try{for(l.s();!(s=l.n()).done;){var c=u(s.value,2),f=(c[0],u(c[1],2));f[0];(0,f[1])(n)}}catch(h){l.e(h)}finally{l.f()}}}}catch(h){i.e(h)}finally{i.f()}}function co(e){var t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){var i,o=P(t.nodeTransactionSubscriptions);try{for(o.s();!(i=o.n()).done;){var a=u(i.value,2),s=a[0],l=a[1];if(r.has(s)){var c,f=P(l);try{for(f.s();!(c=f.n()).done;){var h=u(c.value,2);h[0];(0,h[1])(e)}}catch(m){f.e(m)}finally{f.f()}}}}catch(m){o.e(m)}finally{o.f()}var d,p=P(t.transactionSubscriptions);try{for(p.s();!(d=p.n()).done;){var v=u(d.value,2);v[0];(0,v[1])(e)}}catch(m){p.e(m)}finally{p.f()}(!Xi().early||t.suspendedComponentResolvers.size>0)&&(uo(e,t,n),t.suspendedComponentResolvers.forEach((function(e){return e()})),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach((function(e){return e(n)})),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function fo(e){var t=e.setNotifyBatcherOfChange,n=so(),r=u(to([]),2)[1];return t((function(){return r({})})),Ki((function(){return t((function(){return r({})})),function(){t((function(){}))}}),[t]),Ki((function(){fn.enqueueExecution("Batcher",(function(){!function(e){var t=e.getState();t.commitDepth++;try{var n=t.nextTree;if(null==n)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,co(e),null!=t.previousTree?t.graphsByVersion.delete(t.previousTree.version):It("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Mt("recoil_memory_managament_2020")&&null==n&&Bi(e)}finally{t.commitDepth--}}(n.current)}))})),null}var ho=0;function po(e){var n,r=e.initializeState_DEPRECATED,i=e.initializeState,o=e.store_INTERNAL,a=e.children,s=function(e){var t=n.current.graphsByVersion;if(t.has(e))return ut(t.get(e));var r=Ui();return t.set(e,r),r},l=function(e,t){if(null==t){var n=d.current.getState().transactionSubscriptions,r=ho++;return n.set(r,e),{release:function(){n.delete(r)}}}var i=d.current.getState().nodeTransactionSubscriptions;i.has(t)||i.set(t,new Map);var o=ho++;return ut(i.get(t)).set(o,e),{release:function(){var e=i.get(t);e&&(e.delete(o),0===e.size&&i.delete(t))}}},u=function(e){oo(d.current);for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];ut(d.current.getState().nextTree).transactionMetadata[r]=e[r]}},c=function(e){oo(d.current);var t,r=ut(n.current.nextTree);try{io=!0,t=e(r)}finally{io=!1}t!==r&&(n.current.nextTree=t,Xi().early&&uo(d.current,n.current,t),ut(f.current)())},f=eo(null),h=Hi((function(e){f.current=e}),[f]),d=Mi((function(){return null!==o&&void 0!==o?o:{storeID:Wi(),getState:function(){return n.current},replaceState:c,getGraph:s,subscribeToTransactions:l,addTransactionMetadata:u}}));null!=o&&(d.current=o),n=Mi((function(){return null!=r?function(e,t){var n=Zi();return t({set:function(t,r){var i,o=n.currentTree,a=Yi(e,o,t.key,r),s=new Set(a.keys()),l=o.nonvalidatedAtoms.clone(),u=P(s);try{for(u.s();!(i=u.n()).done;){var c=i.value;l.delete(c)}}catch(f){u.e(f)}finally{u.f()}n.currentTree=tt(tt({},o),{},{dirtyAtoms:Ri(o.dirtyAtoms,s),atomValues:Fi(o.atomValues,a),nonvalidatedAtoms:l})},setUnvalidatedAtomValues:function(e){e.forEach((function(e,t){n.currentTree=Vi(n.currentTree,t,e)}))}}),n}(d.current,r):null!=i?function(e){var t=qi(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach((function(e){return e()})),n.nodeCleanupFunctions.clear(),n}(i):Zi()}));var p=Ji((function(){return null===zi||void 0===zi?void 0:zi(n,(function(){return n.current.currentTree.version}))}),[n]);return Ki((function(){var e,t=d.current,n=P(new Set(t.getState().knownAtoms));try{for(n.s();!(e=n.n()).done;){var r=e.value;Ii(t,r,"get")}}catch(i){n.e(i)}finally{n.f()}return function(){var e,n=P(t.getState().knownAtoms);try{for(n.s();!(e=n.n()).done;){var r=e.value;Di(t,r)}}catch(i){n.e(i)}finally{n.f()}}}),[d]),t.createElement(ao.Provider,{value:d},t.createElement(lo.Provider,{value:p},t.createElement(fo,{setNotifyBatcherOfChange:h}),a))}var vo=function(e){var n=e.override,r=qe(e,rt),i=so();return!1===n&&i.current!==ro?e.children:t.createElement(po,r)},mo=so,go=function(){var e=Gi(lo);return null==e&&en("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),e},yo=function(){return so().current.storeID};var Oo=function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0},bo=t.useEffect,wo=t.useRef;var ko=function(e){var t=wo();return bo((function(){t.current=e})),t.current},So=mo,xo=Ur,Co=jr,Po=Dn.RetentionZone,Eo=t.useEffect,Qo=t.useRef,To=ei.isSSR;var $o=function(e){if(Mt("recoil_memory_managament_2020"))return function(e){var t=Array.isArray(e)?e:[e],n=t.map((function(e){return e instanceof Po?e:e.key})),r=So();Eo((function(){if(Mt("recoil_memory_managament_2020")){var e=r.current;if(i.current&&!To)window.clearTimeout(i.current),i.current=null;else{var t,o=P(n);try{for(o.s();!(t=o.n()).done;){var a=t.value;Co(e,a,1)}}catch(s){o.e(s)}finally{o.f()}}return function(){var t,r=P(n);try{for(r.s();!(t=r.n()).done;){var i=t.value;Co(e,i,-1)}}catch(s){r.e(s)}finally{r.f()}}}}),[r].concat(f(n)));var i=Qo(),o=ko(n);if(!To&&(void 0===o||!Oo(o,n))){var a,s=r.current,l=P(n);try{for(l.s();!(a=l.n()).done;){var u=a.value;Co(s,u,1)}}catch(p){l.e(p)}finally{l.f()}if(o){var c,h=P(o);try{for(h.s();!(c=h.n()).done;){var d=c.value;Co(s,d,-1)}}catch(p){h.e(p)}finally{h.f()}}i.current&&window.clearTimeout(i.current),i.current=window.setTimeout((function(){i.current=null;var e,t=P(n);try{for(t.s();!(e=t.n()).done;){var r=e.value;Co(s,r,-1)}}catch(p){t.e(p)}finally{t.f()}}),xo)}}(e)};var _o=function(){return"<component name not available>"},Ro=cn.DEFAULT_VALUE,Ao=Wt.currentRendererSupportsUseSyncExternalStore,Mo=Wt.reactMode,No=Wt.useMutableSource,Zo=Wt.useSyncExternalStore,Do=go,Lo=mo,Io=(Jt.isRecoilValue,$r.getRecoilValueAsLoadable),Yo=$r.setRecoilValue,Vo=$r.subscribeToRecoilValue,Uo=t.useCallback,jo=t.useEffect,Wo=t.useMemo,zo=t.useRef,Xo=t.useState,Fo=ei.isSSR;function Bo(e,t,n){if("hasValue"===e.state)return e.contents;if("loading"===e.state)throw new Promise((function(t){var r=n.current.getState().suspendedComponentResolvers;r.add(t),Fo&&lt(e.contents)&&e.contents.finally((function(){r.delete(t)}))}));throw"hasError"===e.state?e.contents:st('Invalid value of loadable atom "'.concat(t.key,'"'))}function qo(e){var t=Lo(),n=_o(),r=Uo((function(){var n;var r=t.current,i=r.getState(),o=Mo().early&&null!==(n=i.nextTree)&&void 0!==n?n:i.currentTree;return{loadable:Io(r,e,o),key:e.key}}),[t,e]),i=Uo((function(e){var t;return function(){var n,r,i=e();return null!==(n=t)&&void 0!==n&&n.loadable.is(i.loadable)&&(null===(r=t)||void 0===r?void 0:r.key)===i.key?t:(t=i,i)}}),[]),o=Wo((function(){return i(r)}),[r,i]),a=Uo((function(r){var i=t.current;return Vo(i,e,r,n).release}),[t,e,n]);return Zo(a,o,o).loadable}function Ho(e){var t=Lo(),n=Uo((function(){var n,r=t.current,i=r.getState(),o=Mo().early&&null!==(n=i.nextTree)&&void 0!==n?n:i.currentTree;return Io(r,e,o)}),[t,e]),r=Uo((function(){return n()}),[n]),i=_o(),o=Uo((function(r,o){var a=t.current;return Vo(a,e,(function(){if(!Mt("recoil_suppress_rerender_in_callback"))return o();var e=n();l.current.is(e)||o(),l.current=e}),i).release}),[t,e,i,n]),a=Do();if(null==a)throw st("Recoil hooks must be used in components contained within a <RecoilRoot> component.");var s=No(a,r,o),l=zo(s);return jo((function(){l.current=s})),s}function Go(e){var t=Lo(),n=_o(),r=Uo((function(){var n;var r=t.current,i=r.getState(),o=Mo().early&&null!==(n=i.nextTree)&&void 0!==n?n:i.currentTree;return Io(r,e,o)}),[t,e]),i=Uo((function(){return{loadable:r(),key:e.key}}),[r,e.key]),o=Uo((function(e){var t=i();return e.loadable.is(t.loadable)&&e.key===t.key?e:t}),[i]);jo((function(){var r=Vo(t.current,e,(function(e){l(o)}),n);return l(o),r.release}),[n,e,t,o]);var a=u(Xo(i),2),s=a[0],l=a[1];return s.key!==e.key?i().loadable:s.loadable}function Ko(e){var t=Lo(),n=u(Xo([]),2)[1],r=_o(),i=Uo((function(){var n;var r=t.current,i=r.getState(),o=Mo().early&&null!==(n=i.nextTree)&&void 0!==n?n:i.currentTree;return Io(r,e,o)}),[t,e]),o=i(),a=zo(o);return jo((function(){a.current=o})),jo((function(){var o=t.current,s=o.getState(),l=Vo(o,e,(function(e){var t;if(!Mt("recoil_suppress_rerender_in_callback"))return n([]);var r=i();null!==(t=a.current)&&void 0!==t&&t.is(r)||n(r),a.current=r}),r);if(s.nextTree)o.getState().queuedComponentCallbacks_DEPRECATED.push((function(){a.current=null,n([])}));else{var u;if(!Mt("recoil_suppress_rerender_in_callback"))return n([]);var c=i();null!==(u=a.current)&&void 0!==u&&u.is(c)||n(c),a.current=c}return l.release}),[r,i,e,t]),o}function Jo(e){return Mt("recoil_memory_managament_2020")&&$o(e),{TRANSITION_SUPPORT:Go,SYNC_EXTERNAL_STORE:Ao()?qo:Go,MUTABLE_SOURCE:Ho,LEGACY:Ko}[Mo().mode](e)}function ea(e){var t=Lo();return Bo(Jo(e),e,t)}function ta(e){var t=Lo();return Uo((function(n){Yo(t.current,e,n)}),[t,e])}function na(e){return Mt("recoil_memory_managament_2020")&&$o(e),Go(e)}function ra(e){var t=Lo();return Bo(na(e),e,t)}var ia=function(e){return[ea(e),ta(e)]},oa=function(e){return[Jo(e),ta(e)]},aa=ea,sa=Jo,la=function(e){var t=Lo();return Uo((function(){Yo(t.current,e,Ro)}),[t,e])},ua=ta,ca=na,fa=ra,ha=function(e){return[ra(e),ta(e)]};var da=qr,pa=cn.DEFAULT_VALUE,va=cn.getNode,ma=mo,ga=$r.AbstractRecoilValue,ya=$r.setRecoilValueLoadable,Oa=Ur,ba=_i.cloneSnapshot,wa=t.useCallback,ka=t.useEffect,Sa=t.useRef,xa=t.useState,Ca=ei.isSSR;function Pa(e){var t=ma();ka((function(){return t.current.subscribeToTransactions(e).release}),[e,t])}function Ea(e,t){var n,r=e.getState(),i=null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree,o=t.getStore_INTERNAL().getState().currentTree;da((function(){for(var n=new Set,r=0,a=[i.atomValues.keys(),o.atomValues.keys()];r<a.length;r++){var s,l=P(a[r]);try{for(l.s();!(s=l.n()).done;){var u,c,f=s.value;(null===(u=i.atomValues.get(f))||void 0===u?void 0:u.contents)!==(null===(c=o.atomValues.get(f))||void 0===c?void 0:c.contents)&&va(f).shouldRestoreFromSnapshots&&n.add(f)}}catch(h){l.e(h)}finally{l.f()}}n.forEach((function(t){ya(e,new ga(t),o.atomValues.has(t)?ut(o.atomValues.get(t)):pa)})),e.replaceState((function(e){return tt(tt({},e),{},{stateID:t.getID()})}))}))}var Qa=function(){var e=ma(),t=u(xa((function(){return ba(e.current)})),2),n=t[0],r=t[1],i=ko(n),o=Sa(),a=Sa();if(Pa(wa((function(e){return r(ba(e))}),[])),ka((function(){var e,t=n.retain();o.current&&!Ca&&(window.clearTimeout(o.current),o.current=null,null===(e=a.current)||void 0===e||e.call(a),a.current=null);return function(){window.setTimeout(t,10)}}),[n]),i!==n&&!Ca){var s;if(o.current)window.clearTimeout(o.current),o.current=null,null===(s=a.current)||void 0===s||s.call(a),a.current=null;a.current=n.retain(),o.current=window.setTimeout((function(){var e;o.current=null,null===(e=a.current)||void 0===e||e.call(a),a.current=null}),Oa)}return n},Ta=Ea,$a=function(){var e=ma();return wa((function(t){return Ea(e.current,t)}),[e])},_a=function(e){Pa(wa((function(t){var n=ba(t,"latest"),r=ba(t,"previous");e({snapshot:n,previousSnapshot:r})}),[e]))},Ra=ir,Aa=mo;var Ma=function(){var e=Aa();return function(t){var n=t.key;return Ra(e.current,e.current.getState().currentTree,n)}},Na=Wt.reactMode,Za=vo,Da=mo,La=t.useMemo;var Ia=function(){"MUTABLE_SOURCE"===Na().mode&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");var e=Da().current;return La((function(){return function(n){var r=n.children;return t.createElement(Za,{store_INTERNAL:e},r)}}),[e])},Ya=$t.loadableWithValue,Va=tr,Ua=cn.DEFAULT_VALUE,ja=cn.getNode,Wa=$r.copyTreeState,za=$r.getRecoilValueAsLoadable,Xa=$r.invalidateDownstreams,Fa=$r.writeLoadableToTreeState;function Ba(e){return"atom"===ja(e.key).nodeType}var qa=function(){function e(t,n){var r=this;h(this,e),ct(this,"_store",void 0),ct(this,"_treeState",void 0),ct(this,"_changes",void 0),ct(this,"get",(function(e){if(r._changes.has(e.key))return r._changes.get(e.key);if(!Ba(e))throw st("Reading selectors within atomicUpdate is not supported");var t=za(r._store,e,r._treeState);if("hasValue"===t.state)return t.contents;throw"hasError"===t.state?t.contents:st("Expected Recoil atom ".concat(e.key," to have a value, but it is in a loading state."))})),ct(this,"set",(function(e,t){if(!Ba(e))throw st("Setting selectors within atomicUpdate is not supported");if("function"===typeof t){var n=r.get(e);r._changes.set(e.key,t(n))}else Va(r._store,e.key,"set"),r._changes.set(e.key,t)})),ct(this,"reset",(function(e){r.set(e,Ua)})),this._store=t,this._treeState=n,this._changes=new Map}return m(e,[{key:"newTreeState_INTERNAL",value:function(){if(0===this._changes.size)return this._treeState;var e,t=Wa(this._treeState),n=P(this._changes);try{for(n.s();!(e=n.n()).done;){var r=u(e.value,2),i=r[0],o=r[1];Fa(t,i,Ya(o))}}catch(a){n.e(a)}finally{n.f()}return Xa(this._store,t),t}}]),e}();var Ha=function(e){return function(t){e.replaceState((function(n){var r=new qa(e,n);return t(r),r.newTreeState_INTERNAL()}))}},Ga=Ha,Ka=Object.freeze({__proto__:null,atomicUpdater:Ga});var Ja=function(e,t){if(!e)throw new Error(t)},es=Ka.atomicUpdater,ts=qr,ns=cn.DEFAULT_VALUE,rs=mo,is=$r.refreshRecoilValue,os=$r.setRecoilValue,as=_i.cloneSnapshot,ss=Ta,ls=t.useCallback,us=m((function e(){h(this,e)})),cs=new us;function fs(e,t,n,r){var i,o,a=cs;(ts((function(){var o="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if("function"!==typeof t)throw st(o);var s=Vn(tt(tt({},null!==r&&void 0!==r?r:{}),{},{set:function(t,n){return os(e,t,n)},reset:function(t){return os(e,t,ns)},refresh:function(t){return is(e,t)},gotoSnapshot:function(t){return ss(e,t)},transact_UNSTABLE:function(t){return es(e)(t)}}),{snapshot:function(){var t=as(e);return i=t.retain(),t}}),l=t(s);if("function"!==typeof l)throw st(o);a=l.apply(void 0,f(n))})),a instanceof us&&Ja(!1),lt(a))?a=a.finally((function(){var e;null===(e=i)||void 0===e||e()})):null===(o=i)||void 0===o||o();return a}var hs=fs,ds=function(e,t){var n=rs();return ls((function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return fs(n.current,e,r)}),null!=t?[].concat(f(t),[n]):void 0)},ps=mo,vs=$r.refreshRecoilValue,ms=t.useCallback;var gs=function(e){var t=ps();return ms((function(){var n=t.current;vs(n,e)}),[e,t])},ys=Ka.atomicUpdater,Os=mo,bs=t.useMemo;var ws=function(e,t){var n=Os();return bs((function(){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];ys(n.current)((function(t){e(t).apply(void 0,r)}))}}),null!=t?[].concat(f(t),[n]):void 0)},ks={WrappedValue:m((function e(t){h(this,e),ct(this,"value",void 0),this.value=t}))}.WrappedValue,Ss=Object.freeze({__proto__:null,WrappedValue:ks}),xs=Wt.isFastRefreshEnabled,Cs=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n)}(x(Error)),Ps=function(){function e(t){var n,r,i;h(this,e),ct(this,"_name",void 0),ct(this,"_numLeafs",void 0),ct(this,"_root",void 0),ct(this,"_onHit",void 0),ct(this,"_onSet",void 0),ct(this,"_mapNodeValue",void 0),this._name=null===t||void 0===t?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=null!==(n=null===t||void 0===t?void 0:t.onHit)&&void 0!==n?n:function(){},this._onSet=null!==(r=null===t||void 0===t?void 0:t.onSet)&&void 0!==r?r:function(){},this._mapNodeValue=null!==(i=null===t||void 0===t?void 0:t.mapNodeValue)&&void 0!==i?i:function(e){return e}}return m(e,[{key:"size",value:function(){return this._numLeafs}},{key:"root",value:function(){return this._root}},{key:"get",value:function(e,t){var n;return null===(n=this.getLeafNode(e,t))||void 0===n?void 0:n.value}},{key:"getLeafNode",value:function(e,t){if(null!=this._root)for(var n=this._root;n;){if(null===t||void 0===t||t.onNodeVisit(n),"leaf"===n.type)return this._onHit(n),n;var r=this._mapNodeValue(e(n.nodeKey));n=n.branches.get(r)}}},{key:"set",value:function(e,t,n){var r=this,i=function(){var i,o,a,s,l,c,f,h=P(e);try{for(h.s();!(f=h.n()).done;){var d,p,v,m=u(f.value,2),g=m[0],y=m[1],O=r._root;if("leaf"===(null===O||void 0===O?void 0:O.type))throw r.invalidCacheError();var b=l;if("branch"!==(l=null!==(d=l=b?b.branches.get(c):O)&&void 0!==d?d:{type:"branch",nodeKey:g,parent:b,branches:new Map,branchKey:c}).type||l.nodeKey!==g)throw r.invalidCacheError();null===b||void 0===b||b.branches.set(c,l),null===n||void 0===n||null===(p=n.onNodeVisit)||void 0===p||p.call(n,l),c=r._mapNodeValue(y),r._root=null!==(v=r._root)&&void 0!==v?v:l}}catch(S){h.e(S)}finally{h.f()}var w=l?null===(i=l)||void 0===i?void 0:i.branches.get(c):r._root;if(null!=w&&("leaf"!==w.type||w.branchKey!==c))throw r.invalidCacheError();var k={type:"leaf",value:t,parent:l,branchKey:c};null===(o=l)||void 0===o||o.branches.set(c,k),r._root=null!==(a=r._root)&&void 0!==a?a:k,r._numLeafs++,r._onSet(k),null===n||void 0===n||null===(s=n.onNodeVisit)||void 0===s||s.call(n,k)};try{i()}catch(o){if(!(o instanceof Cs))throw o;this.clear(),i()}}},{key:"delete",value:function(e){var t=this.root();if(!t)return!1;if(e===t)return this._root=null,this._numLeafs=0,!0;for(var n=e.parent,r=e.branchKey;n;){var i;if(n.branches.delete(r),n===t)return 0===n.branches.size?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(n.branches.size>0)break;r=null===(i=n)||void 0===i?void 0:i.branchKey,n=n.parent}for(;n!==t;n=n.parent)if(null==n)return!1;return this._numLeafs--,!0}},{key:"clear",value:function(){this._numLeafs=0,this._root=null}},{key:"invalidCacheError",value:function(){var e=xs()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw It(e+(null!=this._name?" - ".concat(this._name):"")),new Cs}}]),e}(),Es={TreeCache:Ps}.TreeCache,Qs=Object.freeze({__proto__:null,TreeCache:Es}),Ts={LRUCache:function(){function e(t){var n;h(this,e),ct(this,"_maxSize",void 0),ct(this,"_size",void 0),ct(this,"_head",void 0),ct(this,"_tail",void 0),ct(this,"_map",void 0),ct(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=null!==(n=t.mapKey)&&void 0!==n?n:function(e){return e}}return m(e,[{key:"head",value:function(){return this._head}},{key:"tail",value:function(){return this._tail}},{key:"size",value:function(){return this._size}},{key:"maxSize",value:function(){return this._maxSize}},{key:"has",value:function(e){return this._map.has(this._keyMapper(e))}},{key:"get",value:function(e){var t=this._keyMapper(e),n=this._map.get(t);if(n)return this.set(e,n.value),n.value}},{key:"set",value:function(e,t){var n=this._keyMapper(e);this._map.get(n)&&this.delete(e);var r=this.head(),i={key:e,right:r,left:null,value:t};r?r.left=i:this._tail=i,this._map.set(n,i),this._head=i,this._size++,this._maybeDeleteLRU()}},{key:"_maybeDeleteLRU",value:function(){this.size()>this.maxSize()&&this.deleteLru()}},{key:"deleteLru",value:function(){var e=this.tail();e&&this.delete(e.key)}},{key:"delete",value:function(e){var t=this._keyMapper(e);if(this._size&&this._map.has(t)){var n=ut(this._map.get(t)),r=n.right,i=n.left;r&&(r.left=n.left),i&&(i.right=n.right),n===this.head()&&(this._head=r),n===this.tail()&&(this._tail=i),this._map.delete(t),this._size--}}},{key:"clear",value:function(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}]),e}()}.LRUCache,$s=Object.freeze({__proto__:null,LRUCache:Ts}),_s=$s.LRUCache,Rs=Qs.TreeCache;var As=function(e){var t=e.name,n=e.maxSize,r=e.mapNodeValue,i=void 0===r?function(e){return e}:r,o=new _s({maxSize:n}),a=new Rs({name:t,mapNodeValue:i,onHit:function(e){o.set(e,!0)},onSet:function(e){var t=o.tail();o.set(e,!0),t&&a.size()>n&&a.delete(t.key)}});return a};function Ms(e,t,n){if("string"===typeof e&&!e.includes('"')&&!e.includes("\\"))return'"'.concat(e,'"');switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(!0!==(null===t||void 0===t?void 0:t.allowFunctions))throw st("Attempt to serialize function in a Recoil cache key");return"__FUNCTION(".concat(e.name,")__")}if(null===e)return"null";var r;if("object"!==typeof e)return null!==(r=JSON.stringify(e))&&void 0!==r?r:"";if(lt(e))return"__PROMISE__";if(Array.isArray(e))return"[".concat(e.map((function(e,n){return Ms(e,t,n.toString())})),"]");if("function"===typeof e.toJSON)return Ms(e.toJSON(n),t,n);if(e instanceof Map){var i,o={},a=P(e);try{for(a.s();!(i=a.n()).done;){var s=u(i.value,2),l=s[0],c=s[1];o["string"===typeof l?l:Ms(l,t)]=c}}catch(f){a.e(f)}finally{a.f()}return Ms(o,t,n)}return e instanceof Set?Ms(Array.from(e).sort((function(e,n){return Ms(e,t).localeCompare(Ms(n,t))})),t,n):void 0!==Symbol&&null!=e[Symbol.iterator]&&"function"===typeof e[Symbol.iterator]?Ms(Array.from(e),t,n):"{".concat(Object.keys(e).filter((function(t){return void 0!==e[t]})).sort().map((function(n){return"".concat(Ms(n,t),":").concat(Ms(e[n],t,n))})).join(","),"}")}var Ns=function(e){return Ms(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{allowFunctions:!1})},Zs=Qs.TreeCache,Ds={equality:"reference",eviction:"keep-all",maxSize:1/0};var Ls=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ds,t=e.equality,n=void 0===t?Ds.equality:t,r=e.eviction,i=void 0===r?Ds.eviction:r,o=e.maxSize,a=void 0===o?Ds.maxSize:o,s=arguments.length>1?arguments[1]:void 0,l=function(e){switch(e){case"reference":return function(e){return e};case"value":return function(e){return Ns(e)}}throw st("Unrecognized equality policy ".concat(e))}(n);return function(e,t,n,r){switch(e){case"keep-all":return new Zs({name:r,mapNodeValue:n});case"lru":return As({name:r,maxSize:ut(t),mapNodeValue:n});case"most-recent":return As({name:r,maxSize:1,mapNodeValue:n})}throw st("Unrecognized eviction policy ".concat(e))}(i,a,l,s)};var Is=function(e){return function(){return null}},Ys=$t.isLoadable,Vs=$t.loadableWithError,Us=$t.loadableWithPromise,js=$t.loadableWithValue,Ws=Ss.WrappedValue,zs=Kn,Xs=Jn,Fs=er,Bs=xn,qs=cn.DEFAULT_VALUE,Hs=cn.getConfigDeletionHandler,Gs=cn.getNode,Ks=cn.registerNode,Js=Jt.isRecoilValue,el=$r.markRecoilValueModified,tl=zr,nl=hs,rl=Is,il=m((function e(){h(this,e)})),ol=new il,al=[],sl=new Map,ll=function(){var e=0;return function(){return e++}}();function ul(e){var t=null,n=e.key,r=e.get,i=e.cachePolicy_UNSTABLE,o=null!=e.set?e.set:void 0;var a=new Set,s=Ls(null!==i&&void 0!==i?i:{equality:"reference",eviction:"keep-all"},n),l=tl(e.retainedBy_UNSTABLE),c=new Map,f=0;function h(){return!Mt("recoil_memory_managament_2020")||f>0}function d(e){return e.getState().knownSelectors.add(n),f++,function(){f--}}function p(){return void 0!==Hs(n)&&!h()}function v(e,t,n,r,i){T(t,r,i),m(e,n)}function m(e,t){Q(e,t)&&E(e),g(t,!0)}function g(e,n){var r=sl.get(e);if(null!=r){var i,o=P(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;el(a,ut(t))}}catch(s){o.e(s)}finally{o.f()}n&&sl.delete(e)}}function y(e,t){var n=sl.get(t);null==n&&sl.set(t,n=new Set),n.add(e)}function O(e,t,n,r,i,o){return t.then((function(r){if(!h())throw E(e),ol;null!=o.loadingDepKey&&o.loadingDepPromise===t?n.atomValues.set(o.loadingDepKey,js(r)):e.getState().knownSelectors.forEach((function(e){n.atomValues.delete(e)}));var a=k(e,n);if(a&&"loading"!==a.state){if((Q(e,i)||null==C(e))&&m(e,i),"hasValue"===a.state)return a.contents;throw a.contents}if(!Q(e,i)){var s=x(e,n);if(null!=s)return s.loadingLoadable.contents}var l=u(w(e,n,i),2),c=l[0],f=l[1];if("loading"!==c.state&&v(e,n,i,c,f),"hasError"===c.state)throw c.contents;return c.contents})).catch((function(t){if(t instanceof il)throw ol;if(!h())throw E(e),ol;var o=Vs(t);throw v(e,n,i,o,r),t}))}function b(e,t,r,i){var o,s,l,u,c,f,h;(Q(e,i)||t.version===(null===(o=e.getState())||void 0===o||null===(s=o.currentTree)||void 0===s?void 0:s.version)||t.version===(null===(l=e.getState())||void 0===l||null===(u=l.nextTree)||void 0===u?void 0:u.version))&&Bs(n,r,e,null!==(c=null===(f=e.getState())||void 0===f||null===(h=f.nextTree)||void 0===h?void 0:h.version)&&void 0!==c?c:e.getState().currentTree.version);var d,p=P(r);try{for(p.s();!(d=p.n()).done;){var v=d.value;a.add(v)}}catch(m){p.e(m)}finally{p.f()}}function w(e,i,o){var a,s,l=rl(n),u=!0,c=!0,f=function(){l(),c=!1},d=!1,p={loadingDepKey:null,loadingDepPromise:null},m=new Map;function y(t){var n=t.key,r=zs(e,i,n);switch(m.set(n,r),u||(b(e,i,new Set(m.keys()),o),function(e,t){Q(e,t)&&(ut(C(e)).stateVersions.clear(),g(t,!1))}(e,o)),r.state){case"hasValue":return r.contents;case"hasError":throw r.contents;case"loading":throw p.loadingDepKey=n,p.loadingDepPromise=r.contents,r.contents}throw st("Invalid Loadable state")}try{a=r({get:y,getCallback:function(n){return function(){if(c)throw st("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");null==t&&Ja(!1);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return nl(e,n,i,{node:t})}}}),a=Js(a)?y(a):a,Ys(a)&&("hasError"===a.state&&(d=!0),a=a.contents),lt(a)?a=function(e,t,n,r,i,o){return t.then((function(t){if(!h())throw E(e),ol;var o=js(t);return v(e,n,i,o,r),t})).catch((function(t){if(!h())throw E(e),ol;if(lt(t))return O(e,t,n,r,i,o);var a=Vs(t);throw v(e,n,i,a,r),t}))}(e,a,i,m,o,p).finally(f):f(),a=a instanceof Ws?a.value:a}catch(w){lt(a=w)?a=O(e,a,i,m,o,p).finally(f):(d=!0,f())}return s=d?Vs(a):lt(a)?Us(a):js(a),u=!1,function(e,t,n){if(Q(e,t)){var r=C(e);null!=r&&(r.depValuesDiscoveredSoFarDuringAsyncWork=n)}}(e,o,m),b(e,i,new Set(m.keys()),o),[s,m]}function k(e,t){var r=t.atomValues.get(n);if(null!=r)return r;var i,o=new Set;try{r=s.get((function(n){return"string"!==typeof n&&Ja(!1),zs(e,t,n).contents}),{onNodeVisit:function(e){"branch"===e.type&&e.nodeKey!==n&&o.add(e.nodeKey)}})}catch(a){throw st('Problem with cache lookup for selector "'.concat(n,'": ').concat(a.message))}r&&(t.atomValues.set(n,r),b(e,t,o,null===(i=C(e))||void 0===i?void 0:i.executionID));return r}function S(e,t){var n=k(e,t);if(null!=n)return E(e),n;var r,i=x(e,t);if(null!=i)return"loading"===(null===(r=i.loadingLoadable)||void 0===r?void 0:r.state)&&y(e,i.executionID),i.loadingLoadable;var o=ll(),a=u(w(e,t,o),2),s=a[0],l=a[1];return"loading"===s.state?(!function(e,t,n,r,i){c.set(e,{depValuesDiscoveredSoFarDuringAsyncWork:r,executionID:t,loadingLoadable:n,stateVersions:new Map([[i.version,!0]])})}(e,o,s,l,t),y(e,o)):(E(e),T(t,s,l)),s}function x(e,t){function n(n){var r,i=P(n);try{for(i.s();!(r=i.n()).done;){var o=u(r.value,2),a=o[0],s=o[1];if(!zs(e,t,a).is(s))return!0}}catch(l){i.e(l)}finally{i.f()}return!1}var r,i=P(Gr([c.has(e)?[ut(c.get(e))]:[],tn(Yn(c,(function(t){return u(t,1)[0]!==e})),(function(e){return u(e,2)[1]}))]));try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.stateVersions.get(t.version)||!n(o.depValuesDiscoveredSoFarDuringAsyncWork))return o.stateVersions.set(t.version,!0),o;o.stateVersions.set(t.version,!1)}}catch(a){i.e(a)}finally{i.f()}}function C(e){return c.get(e)}function E(e){c.delete(e)}function Q(e,t){var n;return t===(null===(n=C(e))||void 0===n?void 0:n.executionID)}function T(e,t,r){e.atomValues.set(n,t);try{s.set(function(e){return Array.from(e.entries()).map((function(e){var t=u(e,2);return[t[0],t[1].contents]}))}(r),t)}catch(i){throw st('Problem with setting cache for selector "'.concat(n,'": ').concat(i.message))}}function $(e,t){var r=t.atomValues.get(n);return null!=r?r:s.get((function(n){var r;return"string"!==typeof n&&Ja(!1),null===(r=Xs(e,t,n))||void 0===r?void 0:r.contents}))}function _(e,t){return function(e){if(al.includes(n)){var t="Recoil selector has circular dependencies: ".concat(al.slice(al.indexOf(n)).join(" \u2192 "));return Vs(st(t))}al.push(n);try{return e()}finally{al.pop()}}((function(){return S(e,t)}))}function R(e){e.atomValues.delete(n)}function A(e,n){null==t&&Ja(!1);var r,i=P(a);try{for(i.s();!(r=i.n()).done;){var o,l=r.value,u=Gs(l);null===(o=u.clearCache)||void 0===o||o.call(u,e,n)}}catch(c){i.e(c)}finally{i.f()}a.clear(),R(n),s.clear(),el(e,t)}if(null!=o){return t=Ks({key:n,nodeType:"selector",peek:$,get:_,set:function(e,t,r){var i=!1,a=new Map;function s(r){var o=r.key;if(i)throw st("Recoil: Async selector sets are not currently supported.");var a=zs(e,t,o);if("hasValue"===a.state)return a.contents;if("loading"===a.state){var s='Getting value of asynchronous atom or selector "'.concat(o,'" in a pending state while setting selector "').concat(n,'" is not yet supported.');throw It(s),st(s)}throw a.contents}function l(n,r){if(i){var o="Recoil: Async selector sets are not currently supported.";throw It(o),st(o)}var l="function"===typeof r?r(s(n)):r;Fs(e,t,n.key,l).forEach((function(e,t){return a.set(t,e)}))}var u=o({set:l,get:s,reset:function(e){l(e,qs)}},r);if(void 0!==u)throw lt(u)?st("Recoil: Async selector sets are not currently supported."):st("Recoil: selector set should be a void function.");return i=!0,a},init:d,invalidate:R,clearCache:A,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}return t=Ks({key:n,nodeType:"selector",peek:$,get:_,init:d,invalidate:R,clearCache:A,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}ul.value=function(e){return new Ws(e)};var cl=ul,fl=$t.isLoadable,hl=$t.loadableWithError,dl=$t.loadableWithPromise,pl=$t.loadableWithValue,vl=Ss.WrappedValue,ml=ir,gl=cn.DEFAULT_VALUE,yl=cn.DefaultValue,Ol=cn.getConfigDeletionHandler,bl=cn.registerNode,wl=cn.setConfigDeletionHandler,kl=Jt.isRecoilValue,Sl=$r.getRecoilValueAsLoadable,xl=$r.markRecoilValueModified,Cl=$r.setRecoilValue,Pl=$r.setRecoilValueLoadable,El=zr,Ql=function(e){return e instanceof vl?e.value:e};function Tl(e){var t=e.key,n=e.persistence_UNSTABLE,r=El(e.retainedBy_UNSTABLE),i=0;function o(e){return dl(e.then((function(e){return a=pl(e),e})).catch((function(e){throw a=hl(e),e})))}var a=lt(e.default)?o(e.default):fl(e.default)?"loading"===e.default.state?o(e.default.contents):e.default:pl(Ql(e.default));u(a.contents);var s=void 0,l=new Map;function u(e){return e}function c(e,n){var r,i;return null!==(r=null!==(i=n.atomValues.get(t))&&void 0!==i?i:s)&&void 0!==r?r:a}var h=bl({key:t,nodeType:"atom",peek:c,get:function(e,r){if(r.atomValues.has(t))return ut(r.atomValues.get(t));if(r.nonvalidatedAtoms.has(t)){if(null!=s)return s;if(null==n)return en("Tried to restore a persisted value for atom ".concat(t," but it has no persistence settings.")),a;var i=r.nonvalidatedAtoms.get(t),o=n.validator(i,gl),l=o instanceof yl?a:pl(o);return s=l}return a},set:function(e,n,r){if(n.atomValues.has(t)){var i=ut(n.atomValues.get(t));if("hasValue"===i.state&&r===i.contents)return new Map}else if(!n.nonvalidatedAtoms.has(t)&&r instanceof yl)return new Map;return s=void 0,(new Map).set(t,pl(r))},init:function(n,r,o){var s;if(i++,n.getState().knownAtoms.add(t),"loading"===a.state){a.contents.finally((function(){var e;(null!==(e=n.getState().nextTree)&&void 0!==e?e:n.getState().currentTree).atomValues.has(t)||xl(n,h)}))}var u=null!==(s=e.effects)&&void 0!==s?s:e.effects_UNSTABLE;if(null!=u){var d,p=function(e){if(y&&e.key===t){var i=g;return i instanceof yl?c(n,r):lt(i)?dl(i.then((function(e){return e instanceof yl?a.toPromise():e}))):pl(i)}return Sl(n,e)},v=function(e){return p(e).toPromise()},m=function(e){var r,i=ml(n,null!==(r=n.getState().nextTree)&&void 0!==r?r:n.getState().currentTree,e.key);return!y||e.key!==t||g instanceof yl?i:tt(tt({},i),{},{isSet:!0,loadable:p(e)})},g=gl,y=!0,O=!1,b=null,w=function(e){return function(t){if(y){var r=p(h),i="hasValue"===r.state?r.contents:gl;g="function"===typeof t?t(i):t,lt(g)&&(g=g.then((function(t){return b={effect:e,value:t},t})))}else{if(lt(t))throw st("Setting atoms to async values is not implemented.");"function"!==typeof t&&(b={effect:e,value:Ql(t)}),Cl(n,h,"function"===typeof t?function(n){var r=Ql(t(n));return b={effect:e,value:r},r}:Ql(t))}}},k=function(e){return function(){return w(e)(gl)}},S=function(e){return function(r){var i,o=n.subscribeToTransactions((function(n){var i,o=n.getState(),s=o.currentTree,l=o.previousTree;l||(It("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),l=s);var u=null!==(i=s.atomValues.get(t))&&void 0!==i?i:a;if("hasValue"===u.state){var c,f,h,d,p=u.contents,v=null!==(c=l.atomValues.get(t))&&void 0!==c?c:a,m="hasValue"===v.state?v.contents:gl;(null===(f=b)||void 0===f?void 0:f.effect)!==e||(null===(h=b)||void 0===h?void 0:h.value)!==p?r(p,m,!s.atomValues.has(t)):(null===(d=b)||void 0===d?void 0:d.effect)===e&&(b=null)}}),t).release;l.set(n,[].concat(f(null!==(i=l.get(n))&&void 0!==i?i:[]),[o]))}},x=P(u);try{for(x.s();!(d=x.n()).done;){var C=d.value;try{var E,Q=C({node:h,storeID:n.storeID,parentStoreID_UNSTABLE:n.parentStoreID,trigger:o,setSelf:w(C),resetSelf:k(C),onSet:S(C),getPromise:v,getLoadable:p,getInfo_UNSTABLE:m});if(null!=Q)l.set(n,[].concat(f(null!==(E=l.get(n))&&void 0!==E?E:[]),[Q]))}catch(_){g=_,O=!0}}}catch(R){x.e(R)}finally{x.f()}if(y=!1,!(g instanceof yl)){var T,$=O?hl(g):lt(g)?dl(function(e,n){var r=n.then((function(n){var i,o;return(null===(o=(null!==(i=e.getState().nextTree)&&void 0!==i?i:e.getState().currentTree).atomValues.get(t))||void 0===o?void 0:o.contents)===r&&Cl(e,h,n),n})).catch((function(n){var i,o;throw(null===(o=(null!==(i=e.getState().nextTree)&&void 0!==i?i:e.getState().currentTree).atomValues.get(t))||void 0===o?void 0:o.contents)===r&&Pl(e,h,hl(n)),n}));return r}(n,g)):pl(Ql(g));$.contents,r.atomValues.set(t,$),null===(T=n.getState().nextTree)||void 0===T||T.atomValues.set(t,$)}}return function(){var e;i--,null===(e=l.get(n))||void 0===e||e.forEach((function(e){return e()})),l.delete(n)}},invalidate:function(){s=void 0},shouldDeleteConfigOnRelease:function(){return void 0!==Ol(t)&&i<=0},dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return h}function $l(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e)),n="default"in e?e.default:new Promise((function(){}));return kl(n)?function(e){var t=$l(tt(tt({},e),{},{default:gl,persistence_UNSTABLE:void 0===e.persistence_UNSTABLE?void 0:tt(tt({},e.persistence_UNSTABLE),{},{validator:function(t){return t instanceof yl?t:ut(e.persistence_UNSTABLE).validator(t,gl)}}),effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE})),n=cl({key:"".concat(e.key,"__withFallback"),get:function(n){var r=(0,n.get)(t);return r instanceof yl?e.default:r},set:function(e,n){return(0,e.set)(t,n)},cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return wl(n.key,Ol(e.key)),n}(tt(tt({},t),{},{default:n})):Tl(tt(tt({},t),{},{default:n}))}$l.value=function(e){return new vl(e)};var _l=$l,Rl={MapCache:function(){function e(t){var n;h(this,e),ct(this,"_map",void 0),ct(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=null!==(n=null===t||void 0===t?void 0:t.mapKey)&&void 0!==n?n:function(e){return e}}return m(e,[{key:"size",value:function(){return this._map.size}},{key:"has",value:function(e){return this._map.has(this._keyMapper(e))}},{key:"get",value:function(e){return this._map.get(this._keyMapper(e))}},{key:"set",value:function(e,t){this._map.set(this._keyMapper(e),t)}},{key:"delete",value:function(e){this._map.delete(this._keyMapper(e))}},{key:"clear",value:function(){this._map.clear()}}]),e}()}.MapCache,Al=Object.freeze({__proto__:null,MapCache:Rl}),Ml=$s.LRUCache,Nl=Al.MapCache,Zl={equality:"reference",eviction:"none",maxSize:1/0};var Dl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zl,t=e.equality,n=void 0===t?Zl.equality:t,r=e.eviction,i=void 0===r?Zl.eviction:r,o=e.maxSize,a=void 0===o?Zl.maxSize:o,s=function(e){switch(e){case"reference":return function(e){return e};case"value":return function(e){return Ns(e)}}throw st("Unrecognized equality policy ".concat(e))}(n),l=function(e,t,n){switch(e){case"keep-all":return new Nl({mapKey:n});case"lru":return new Ml({mapKey:n,maxSize:ut(t)});case"most-recent":return new Ml({mapKey:n,maxSize:1})}throw st("Unrecognized eviction policy ".concat(e))}(i,a,s);return l},Ll=cn.setConfigDeletionHandler;var Il=function(e){var t,n,r=Dl({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return function(t){var n,i,o=r.get(t);if(null!=o)return o;e.cachePolicyForParams_UNSTABLE;var a=qe(e,it),s="default"in e?e.default:new Promise((function(){})),l=_l(tt(tt({},a),{},{key:"".concat(e.key,"__").concat(null!==(n=Ns(t))&&void 0!==n?n:"void"),default:"function"===typeof s?s(t):s,retainedBy_UNSTABLE:"function"===typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE,effects:"function"===typeof e.effects?e.effects(t):"function"===typeof e.effects_UNSTABLE?e.effects_UNSTABLE(t):null!==(i=e.effects)&&void 0!==i?i:e.effects_UNSTABLE}));return r.set(t,l),Ll(l.key,(function(){r.delete(t)})),l}},Yl=cn.setConfigDeletionHandler,Vl=0;var Ul=function(e){var t,n,r=Dl({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return function(t){var n,i;try{i=r.get(t)}catch(f){throw st("Problem with cache lookup for selector ".concat(e.key,": ").concat(f.message))}if(null!=i)return i;var o,a="".concat(e.key,"__selectorFamily/").concat(null!==(n=Ns(t,{allowFunctions:!0}))&&void 0!==n?n:"void","/").concat(Vl++),s=function(n){return e.get(t)(n)},l=e.cachePolicy_UNSTABLE,u="function"===typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE;if(null!=e.set){var c=e.set;o=cl({key:a,get:s,set:function(e,n){return c(t)(e,n)},cachePolicy_UNSTABLE:l,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:u})}else o=cl({key:a,get:s,cachePolicy_UNSTABLE:l,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:u});return r.set(t,o),Yl(o.key,(function(){r.delete(t)})),o}},jl=Ul({key:"__constant",get:function(e){return function(){return e}},cachePolicyForParams_UNSTABLE:{equality:"reference"}});var Wl=function(e){return jl(e)},zl=Ul({key:"__error",get:function(e){return function(){throw st(e)}},cachePolicyForParams_UNSTABLE:{equality:"reference"}});var Xl=function(e){return zl(e)};var Fl=function(e){return e},Bl=$t.loadableWithError,ql=$t.loadableWithPromise,Hl=$t.loadableWithValue;function Gl(e,t){var n,r=Array(t.length).fill(void 0),i=Array(t.length).fill(void 0),o=P(t.entries());try{for(o.s();!(n=o.n()).done;){var a=u(n.value,2),s=a[0],l=a[1];try{r[s]=e(l)}catch(c){i[s]=c}}}catch(f){o.e(f)}finally{o.f()}return[r,i]}function Kl(e){return null!=e&&!lt(e)}function Jl(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((function(t){return e[t]}))}function eu(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((function(e,n,r){return tt(tt({},e),{},Je({},n,t[r]))}),{})}function tu(e,t,n){return eu(e,n.map((function(e,n){return null==e?Hl(t[n]):lt(e)?ql(e):Bl(e)})))}var nu=Ul({key:"__waitForNone",get:function(e){return function(t){var n=u(Gl(t.get,Jl(e)),2),r=n[0],i=n[1];return tu(e,r,i)}},dangerouslyAllowMutability:!0}),ru=Ul({key:"__waitForAny",get:function(e){return function(t){var n=u(Gl(t.get,Jl(e)),2),r=n[0],i=n[1];return i.some((function(e){return!lt(e)}))?tu(e,r,i):new Promise((function(t){var n,o=P(i.entries());try{var a=function(){var o=u(n.value,2),a=o[0],s=o[1];lt(s)&&s.then((function(n){r[a]=n,i[a]=void 0,t(tu(e,r,i))})).catch((function(n){i[a]=n,t(tu(e,r,i))}))};for(o.s();!(n=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}}))}},dangerouslyAllowMutability:!0}),iu=Ul({key:"__waitForAll",get:function(e){return function(t){var n=u(Gl(t.get,Jl(e)),2),r=n[0],i=n[1];if(i.every((function(e){return null==e})))return eu(e,r);var o=i.find(Kl);if(null!=o)throw o;return Promise.all(i).then((function(t){return eu(e,(n=r,t.map((function(e,t){return void 0===e?n[t]:e}))));var n}))}},dangerouslyAllowMutability:!0}),ou=Ul({key:"__waitForAllSettled",get:function(e){return function(t){var n=u(Gl(t.get,Jl(e)),2),r=n[0],i=n[1];return i.every((function(e){return!lt(e)}))?tu(e,r,i):Promise.all(i.map((function(e,t){return lt(e)?e.then((function(e){r[t]=e,i[t]=void 0})).catch((function(e){r[t]=void 0,i[t]=e})):null}))).then((function(){return tu(e,r,i)}))}},dangerouslyAllowMutability:!0}),au=Ul({key:"__noWait",get:function(e){return function(t){var n=t.get;try{return cl.value(Hl(n(e)))}catch(r){return cl.value(lt(r)?ql(r):Bl(r))}}},dangerouslyAllowMutability:!0}),su={waitForNone:nu,waitForAny:ru,waitForAll:iu,waitForAllSettled:ou,noWait:au},lu=$t.RecoilLoadable,uu=cn.DefaultValue,cu=vo,fu=yo,hu=Jt.isRecoilValue,du=Dn.retentionZone,pu=_i.freshSnapshot,vu={DefaultValue:uu,isRecoilValue:hu,RecoilLoadable:lu,RecoilEnv:Rt,RecoilRoot:cu,useRecoilStoreID:fu,useRecoilBridgeAcrossReactRoots_UNSTABLE:Ia,atom:_l,selector:cl,atomFamily:Il,selectorFamily:Ul,constSelector:Wl,errorSelector:Xl,readOnlySelector:Fl,noWait:su.noWait,waitForNone:su.waitForNone,waitForAny:su.waitForAny,waitForAll:su.waitForAll,waitForAllSettled:su.waitForAllSettled,useRecoilValue:aa,useRecoilValueLoadable:sa,useRecoilState:ia,useRecoilStateLoadable:oa,useSetRecoilState:ua,useResetRecoilState:la,useGetRecoilValueInfo_UNSTABLE:Ma,useRecoilRefresher_UNSTABLE:gs,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:ca,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:fa,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:ha,useRecoilCallback:ds,useRecoilTransaction_UNSTABLE:ws,useGotoRecoilSnapshot:$a,useRecoilSnapshot:Qa,useRecoilTransactionObserver_UNSTABLE:_a,snapshot_UNSTABLE:pu,useRetain:$o,retentionZone:du},mu=vu.RecoilRoot,gu=vu.atom,yu=vu.useRecoilValue,Ou=vu.useRecoilState,bu=vu.useSetRecoilState;function wu(){return wu=Object.assign?Object.assign.bind():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},wu.apply(this,arguments)}var ku=n(694),Su=n.n(ku);function xu(e){var n=t.useRef();n.current=e;var r=t.useCallback((function(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return null===(e=n.current)||void 0===e?void 0:e.call.apply(e,[n].concat(r))}),[]);return r}function Cu(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}var Pu=Cu()?t.useLayoutEffect:t.useEffect,Eu=function(e,n){var r=t.useRef(!0);Pu((function(){return e(r.current)}),n),Pu((function(){return r.current=!1,function(){r.current=!0}}),[])},Qu=function(e,t){Eu((function(t){if(!t)return e()}),t)},Tu=Eu;function $u(e){var n=t.useRef(!1),r=u(t.useState(e),2),i=r[0],o=r[1];return t.useEffect((function(){return n.current=!1,function(){n.current=!0}}),[]),[i,function(e,t){t&&n.current||o(e)}]}function _u(e){return void 0!==e}function Ru(e,t){var n=t||{},r=n.defaultValue,i=n.value,o=n.onChange,a=n.postState,s=u($u((function(){return _u(i)?i:_u(r)?"function"===typeof r?r():r:"function"===typeof e?e():e})),2),l=s[0],c=s[1],f=void 0!==i?i:l,h=a?a(f):f,d=xu(o),p=u($u([f]),2),v=p[0],m=p[1];return Qu((function(){var e=v[0];l!==e&&d(l,e)}),[v]),Qu((function(){_u(i)||c(i)}),[i]),[h,xu((function(e,t){c(e,t),m([f],t)}))]}var Au={},Mu=[];function Nu(e,t){}function Zu(e,t){}function Du(e,t,n){t||Au[n]||(e(!1,n),Au[n]=!0)}function Lu(e,t){Du(Nu,e,t)}Lu.preMessage=function(e){Mu.push(e)},Lu.resetWarned=function(){Au={}},Lu.noteOnce=function(e,t){Du(Zu,e,t)};var Iu=Lu,Yu=function(){if("undefined"===typeof navigator||"undefined"===typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null===e||void 0===e?void 0:e.substr(0,4))},Vu={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Vu.F1&&t<=Vu.F12)return!1;switch(t){case Vu.ALT:case Vu.CAPS_LOCK:case Vu.CONTEXT_MENU:case Vu.CTRL:case Vu.DOWN:case Vu.END:case Vu.ESC:case Vu.HOME:case Vu.INSERT:case Vu.LEFT:case Vu.MAC_FF_META:case Vu.META:case Vu.NUMLOCK:case Vu.NUM_CENTER:case Vu.PAGE_DOWN:case Vu.PAGE_UP:case Vu.PAUSE:case Vu.PRINT_SCREEN:case Vu.RIGHT:case Vu.SHIFT:case Vu.UP:case Vu.WIN_KEY:case Vu.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Vu.ZERO&&e<=Vu.NINE)return!0;if(e>=Vu.NUM_ZERO&&e<=Vu.NUM_MULTIPLY)return!0;if(e>=Vu.A&&e<=Vu.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Vu.SPACE:case Vu.QUESTION_MARK:case Vu.NUM_PLUS:case Vu.NUM_MINUS:case Vu.NUM_PERIOD:case Vu.NUM_DIVISION:case Vu.SEMICOLON:case Vu.DASH:case Vu.EQUALS:case Vu.COMMA:case Vu.PERIOD:case Vu.SLASH:case Vu.APOSTROPHE:case Vu.SINGLE_QUOTE:case Vu.OPEN_SQUARE_BRACKET:case Vu.BACKSLASH:case Vu.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Uu=Vu,ju=n(441);function Wu(e,n,r){var i=t.useRef({});return"value"in i.current&&!r(i.current.condition,n)||(i.current.value=e(),i.current.condition=n),i.current.value}function zu(e,t){"function"===typeof e?e(t):"object"===d(e)&&e&&"current"in e&&(e.current=t)}function Xu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter((function(e){return e}));return r.length<=1?r[0]:function(e){t.forEach((function(t){zu(t,e)}))}}function Fu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Wu((function(){return Xu.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))}function Bu(e){var t,n,r=(0,ju.isMemo)(e)?e.type.type:e.type;return!!("function"!==typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render)&&!!("function"!==typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render)}var qu=t.createContext(null);function Hu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,n=t.useRef(null),r=t.useRef(null);return t.useEffect((function(){return function(){window.clearTimeout(r.current)}}),[]),[function(){return n.current},function(t){(t||null===n.current)&&(n.current=t),window.clearTimeout(r.current),r.current=window.setTimeout((function(){n.current=null}),e)}]}var Gu="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function Ku(e,t){return 0===e.indexOf(t)}function Ju(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:tt({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||Ku(n,"aria-"))||t.data&&Ku(n,"data-")||t.attr&&Gu.includes(n))&&(r[n]=e[n])})),r}function ec(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return t.Children.forEach(e,(function(e){(void 0!==e&&null!==e||n.keepEmpty)&&(Array.isArray(e)?r=r.concat(ec(e)):(0,ju.isFragment)(e)&&e.props?r=r.concat(ec(e.props.children,n)):r.push(e))})),r}function tc(e){return function(e){return e instanceof HTMLElement||e instanceof SVGElement}(e)?e:e instanceof t.Component?nt.findDOMNode(e):null}var nc=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),rc="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,ic="undefined"!==typeof n.g&&n.g.Math===Math?n.g:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),oc="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(ic):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var ac=["top","right","bottom","left","width","height","size","weight"],sc="undefined"!==typeof MutationObserver,lc=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&s()}function a(){oc(o)}function s(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,t);i=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){rc&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),sc?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){rc&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;ac.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),uc=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},cc=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||ic},fc=gc(0,0,0,0);function hc(e){return parseFloat(e)||0}function dc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+hc(e["border-"+n+"-width"])}),0)}function pc(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return fc;var r=cc(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=hc(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=hc(r.width),l=hc(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=dc(r,"left","right")+o),Math.round(l+a)!==n&&(l-=dc(r,"top","bottom")+a)),!function(e){return e===cc(e).document.documentElement}(e)){var u=Math.round(s+o)-t,c=Math.round(l+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return gc(i.left,i.top,s,l)}var vc="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof cc(e).SVGGraphicsElement}:function(e){return e instanceof cc(e).SVGElement&&"function"===typeof e.getBBox};function mc(e){return rc?vc(e)?function(e){var t=e.getBBox();return gc(0,0,t.width,t.height)}(e):pc(e):fc}function gc(e,t,n,r){return{x:e,y:t,width:n,height:r}}var yc=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=gc(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=mc(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Oc=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return uc(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}(t);uc(this,{target:e,contentRect:n})},bc=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new nc,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof cc(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new yc(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof cc(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new Oc(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),wc="undefined"!==typeof WeakMap?new WeakMap:new nc,kc=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=lc.getInstance(),r=new bc(t,n,this);wc.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){kc.prototype[e]=function(){var t;return(t=wc.get(this))[e].apply(t,arguments)}}));var Sc="undefined"!==typeof ic.ResizeObserver?ic.ResizeObserver:kc,xc=new Map;var Cc=new Sc((function(e){e.forEach((function(e){var t,n=e.target;null===(t=xc.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var Pc=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n,[{key:"render",value:function(){return this.props.children}}]),n}(t.Component),Ec=t.createContext(null);function Qc(e,n){var r=e.children,i=e.disabled,o=t.useRef(null),a=t.useRef(null),s=t.useContext(Ec),l="function"===typeof r,u=l?r(o):r,c=t.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),f=!l&&t.isValidElement(u)&&Bu(u),h=f?u.ref:null,d=t.useMemo((function(){return Xu(h,o)}),[h,o]),p=function(){return tc(o.current)||tc(a.current)};t.useImperativeHandle(n,(function(){return p()}));var v=t.useRef(e);v.current=e;var m=t.useCallback((function(e){var t=v.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),o=i.width,a=i.height,l=e.offsetWidth,u=e.offsetHeight,f=Math.floor(o),h=Math.floor(a);if(c.current.width!==f||c.current.height!==h||c.current.offsetWidth!==l||c.current.offsetHeight!==u){var d={width:f,height:h,offsetWidth:l,offsetHeight:u};c.current=d;var p=l===Math.round(o)?o:l,m=u===Math.round(a)?a:u,g=tt(tt({},d),{},{offsetWidth:p,offsetHeight:m});null===s||void 0===s||s(g,e,r),n&&Promise.resolve().then((function(){n(g,e)}))}}),[]);return t.useEffect((function(){var e,t,n=p();return n&&!i&&(e=n,t=m,xc.has(e)||(xc.set(e,new Set),Cc.observe(e)),xc.get(e).add(t)),function(){return function(e,t){xc.has(e)&&(xc.get(e).delete(t),xc.get(e).size||(Cc.unobserve(e),xc.delete(e)))}(n,m)}}),[o.current,i]),t.createElement(Pc,{ref:a},f?t.cloneElement(u,{ref:d}):u)}var Tc=t.forwardRef(Qc);function $c(e,n){var r=e.children;return("function"===typeof r?[r]:ec(r)).map((function(r,i){var o=(null===r||void 0===r?void 0:r.key)||"".concat("rc-observer-key","-").concat(i);return t.createElement(Tc,wu({},e,{key:o,ref:0===i?n:void 0}),r)}))}var _c=t.forwardRef($c);_c.Collection=function(e){var n=e.children,r=e.onBatchResize,i=t.useRef(0),o=t.useRef([]),a=t.useContext(Ec),s=t.useCallback((function(e,t,n){i.current+=1;var s=i.current;o.current.push({size:e,element:t,data:n}),Promise.resolve().then((function(){s===i.current&&(null===r||void 0===r||r(o.current),o.current=[])})),null===a||void 0===a||a(e,t,n)}),[r,a]);return t.createElement(Ec.Provider,{value:s},n)};var Rc=_c,Ac=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Mc=void 0;function Nc(e,n){var r=e.prefixCls,i=e.invalidate,o=e.item,a=e.renderItem,s=e.responsive,l=e.responsiveDisabled,u=e.registerSize,c=e.itemKey,f=e.className,h=e.style,d=e.children,p=e.display,v=e.order,m=e.component,g=void 0===m?"div":m,y=qe(e,Ac),O=s&&!p;function b(e){u(c,e)}t.useEffect((function(){return function(){b(null)}}),[]);var w,k=a&&o!==Mc?a(o):d;i||(w={opacity:O?0:1,height:O?0:Mc,overflowY:O?"hidden":Mc,order:s?v:Mc,pointerEvents:O?"none":Mc,position:O?"absolute":Mc});var S={};O&&(S["aria-hidden"]=!0);var x=t.createElement(g,wu({className:Su()(!i&&r,f),style:tt(tt({},w),h)},S,y,{ref:n}),k);return s&&(x=t.createElement(Rc,{onResize:function(e){b(e.offsetWidth)},disabled:l},x)),x}var Zc=t.forwardRef(Nc);Zc.displayName="Item";var Dc=Zc,Lc=function(e){return+setTimeout(e,16)},Ic=function(e){return clearTimeout(e)};"undefined"!==typeof window&&"requestAnimationFrame"in window&&(Lc=function(e){return window.requestAnimationFrame(e)},Ic=function(e){return window.cancelAnimationFrame(e)});var Yc=0,Vc=new Map;function Uc(e){Vc.delete(e)}var jc=function(e){var t=Yc+=1;return function n(r){if(0===r)Uc(t),e();else{var i=Lc((function(){n(r-1)}));Vc.set(t,i)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};jc.cancel=function(e){var t=Vc.get(e);return Uc(t),Ic(t)};var Wc=jc;function zc(){var e=t.useRef(null);return function(t){e.current||(e.current=[],function(e){if("undefined"===typeof MessageChannel)Wc(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){(0,nt.unstable_batchedUpdates)((function(){e.current.forEach((function(e){e()})),e.current=null}))}))),e.current.push(t)}}function Xc(e,n){var r=u(t.useState(n),2),i=r[0],o=r[1];return[i,xu((function(t){e((function(){o(t)}))}))]}var Fc=t.createContext(null),Bc=["component"],qc=["className"],Hc=["className"],Gc=function(e,n){var r=t.useContext(Fc);if(!r){var i=e.component,o=void 0===i?"div":i,a=qe(e,Bc);return t.createElement(o,wu({},a,{ref:n}))}var s=r.className,l=qe(r,qc),u=e.className,c=qe(e,Hc);return t.createElement(Fc.Provider,{value:null},t.createElement(Dc,wu({ref:n,className:Su()(s,u)},l,c)))},Kc=t.forwardRef(Gc);Kc.displayName="RawItem";var Jc=Kc,ef=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],tf="responsive",nf="invalidate";function rf(e){return"+ ".concat(e.length," ...")}function of(e,n){var r=e.prefixCls,i=void 0===r?"rc-overflow":r,o=e.data,a=void 0===o?[]:o,s=e.renderItem,l=e.renderRawItem,c=e.itemKey,f=e.itemWidth,h=void 0===f?10:f,d=e.ssr,p=e.style,v=e.className,m=e.maxCount,g=e.renderRest,y=e.renderRawRest,O=e.suffix,b=e.component,w=void 0===b?"div":b,k=e.itemComponent,S=e.onVisibleChange,x=qe(e,ef),C="full"===d,P=zc(),E=u(Xc(P,null),2),Q=E[0],T=E[1],$=Q||0,_=u(Xc(P,new Map),2),R=_[0],A=_[1],M=u(Xc(P,0),2),N=M[0],Z=M[1],D=u(Xc(P,0),2),L=D[0],I=D[1],Y=u(Xc(P,0),2),V=Y[0],U=Y[1],j=u((0,t.useState)(null),2),W=j[0],z=j[1],X=u((0,t.useState)(null),2),F=X[0],B=X[1],q=t.useMemo((function(){return null===F&&C?Number.MAX_SAFE_INTEGER:F||0}),[F,Q]),H=u((0,t.useState)(!1),2),G=H[0],K=H[1],J="".concat(i,"-item"),ee=Math.max(N,L),te=m===tf,ne=a.length&&te,re=m===nf,ie=ne||"number"===typeof m&&a.length>m,oe=(0,t.useMemo)((function(){var e=a;return ne?e=null===Q&&C?a:a.slice(0,Math.min(a.length,$/h)):"number"===typeof m&&(e=a.slice(0,m)),e}),[a,h,Q,m,ne]),ae=(0,t.useMemo)((function(){return ne?a.slice(q+1):a.slice(oe.length)}),[a,oe,ne,q]),se=(0,t.useCallback)((function(e,t){var n;return"function"===typeof c?c(e):null!==(n=c&&(null===e||void 0===e?void 0:e[c]))&&void 0!==n?n:t}),[c]),le=(0,t.useCallback)(s||function(e){return e},[s]);function ue(e,t,n){(F!==e||void 0!==t&&t!==W)&&(B(e),n||(K(e<a.length-1),null===S||void 0===S||S(e)),void 0!==t&&z(t))}function ce(e,t){A((function(n){var r=new Map(n);return null===t?r.delete(e):r.set(e,t),r}))}function fe(e){return R.get(se(oe[e],e))}Tu((function(){if($&&"number"===typeof ee&&oe){var e=V,t=oe.length,n=t-1;if(!t)return void ue(0,null);for(var r=0;r<t;r+=1){var i=fe(r);if(C&&(i=i||0),void 0===i){ue(r-1,void 0,!0);break}if(e+=i,0===n&&e<=$||r===n-1&&e+fe(n)<=$){ue(n,null);break}if(e+ee>$){ue(r-1,e-i-V+L);break}}O&&fe(0)+V>$&&z(null)}}),[$,R,L,V,se,oe]);var he=G&&!!ae.length,de={};null!==W&&ne&&(de={position:"absolute",left:W,top:0});var pe,ve={prefixCls:J,responsive:ne,component:k,invalidate:re},me=l?function(e,n){var r=se(e,n);return t.createElement(Fc.Provider,{key:r,value:tt(tt({},ve),{},{order:n,item:e,itemKey:r,registerSize:ce,display:n<=q})},l(e,n))}:function(e,n){var r=se(e,n);return t.createElement(Dc,wu({},ve,{order:n,key:r,item:e,renderItem:le,itemKey:r,registerSize:ce,display:n<=q}))},ge={order:he?q:Number.MAX_SAFE_INTEGER,className:"".concat(J,"-rest"),registerSize:function(e,t){I(t),Z(L)},display:he};if(y)y&&(pe=t.createElement(Fc.Provider,{value:tt(tt({},ve),ge)},y(ae)));else{var ye=g||rf;pe=t.createElement(Dc,wu({},ve,ge),"function"===typeof ye?ye(ae):ye)}var Oe=t.createElement(w,wu({className:Su()(!re&&i,v),style:p,ref:n},x),oe.map(me),ie?pe:null,O&&t.createElement(Dc,wu({},ve,{responsive:te,responsiveDisabled:!ne,order:q,className:"".concat(J,"-suffix"),registerSize:function(e,t){U(t)},display:!0,style:de}),O));return te&&(Oe=t.createElement(Rc,{onResize:function(e,t){T(t.clientWidth)},disabled:!ne},Oe)),Oe}var af=t.forwardRef(of);af.displayName="Overflow",af.Item=Jc,af.RESPONSIVE=tf,af.INVALIDATE=nf;var sf=af,lf=function(e){var n,r=e.className,i=e.customizeIcon,o=e.customizeIconProps,a=e.onMouseDown,s=e.onClick,l=e.children;return n="function"===typeof i?i(o):i,t.createElement("span",{className:r,onMouseDown:function(e){e.preventDefault(),a&&a(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},void 0!==n?n:t.createElement("span",{className:Su()(r.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},l))},uf=function(e,n){var r,i,o=e.prefixCls,a=e.id,s=e.inputElement,l=e.disabled,u=e.tabIndex,c=e.autoFocus,f=e.autoComplete,h=e.editable,d=e.activeDescendantId,p=e.value,v=e.maxLength,m=e.onKeyDown,g=e.onMouseDown,y=e.onChange,O=e.onPaste,b=e.onCompositionStart,w=e.onCompositionEnd,k=e.open,S=e.attrs,x=s||t.createElement("input",null),C=x,P=C.ref,E=C.props,Q=E.onKeyDown,T=E.onChange,$=E.onMouseDown,_=E.onCompositionStart,R=E.onCompositionEnd,A=E.style;return x.props,x=t.cloneElement(x,tt(tt(tt({type:"search"},E),{},{id:a,ref:Xu(n,P),disabled:l,tabIndex:u,autoComplete:f||"off",autoFocus:c,className:Su()("".concat(o,"-selection-search-input"),null===(r=x)||void 0===r||null===(i=r.props)||void 0===i?void 0:i.className),role:"combobox","aria-expanded":k,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":d},S),{},{value:h?p:"",maxLength:v,readOnly:!h,unselectable:h?null:"on",style:tt(tt({},A),{},{opacity:h?null:0}),onKeyDown:function(e){m(e),Q&&Q(e)},onMouseDown:function(e){g(e),$&&$(e)},onChange:function(e){y(e),T&&T(e)},onCompositionStart:function(e){b(e),_&&_(e)},onCompositionEnd:function(e){w(e),R&&R(e)},onPaste:O}))},cf=t.forwardRef(uf);cf.displayName="Input";var ff=cf;function hf(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var df="undefined"!==typeof window&&window.document&&window.document.documentElement;function pf(e){return["string","number"].includes(d(e))}function vf(e){var t=void 0;return e&&(pf(e.title)?t=e.title.toString():pf(e.label)&&(t=e.label.toString())),t}function mf(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var gf=function(e){e.preventDefault(),e.stopPropagation()},yf=function(e){var n,r,i=e.id,o=e.prefixCls,a=e.values,s=e.open,l=e.searchValue,c=e.autoClearSearchValue,f=e.inputRef,h=e.placeholder,d=e.disabled,p=e.mode,v=e.showSearch,m=e.autoFocus,g=e.autoComplete,y=e.activeDescendantId,O=e.tabIndex,b=e.removeIcon,w=e.maxTagCount,k=e.maxTagTextLength,S=e.maxTagPlaceholder,x=void 0===S?function(e){return"+ ".concat(e.length," ...")}:S,C=e.tagRender,P=e.onToggleOpen,E=e.onRemove,Q=e.onInputChange,T=e.onInputPaste,$=e.onInputKeyDown,_=e.onInputMouseDown,R=e.onInputCompositionStart,A=e.onInputCompositionEnd,M=t.useRef(null),N=u((0,t.useState)(0),2),Z=N[0],D=N[1],L=u((0,t.useState)(!1),2),I=L[0],Y=L[1],V="".concat(o,"-selection"),U=s||"multiple"===p&&!1===c||"tags"===p?l:"",j="tags"===p||"multiple"===p&&!1===c||v&&(s||I);function W(e,n,r,i,o){return t.createElement("span",{className:Su()("".concat(V,"-item"),Je({},"".concat(V,"-item-disabled"),r)),title:vf(e)},t.createElement("span",{className:"".concat(V,"-item-content")},n),i&&t.createElement(lf,{className:"".concat(V,"-item-remove"),onMouseDown:gf,onClick:o,customizeIcon:b},"\xd7"))}n=function(){D(M.current.scrollWidth)},r=[U],df?t.useLayoutEffect(n,r):t.useEffect(n,r);var z=t.createElement("div",{className:"".concat(V,"-search"),style:{width:Z},onFocus:function(){Y(!0)},onBlur:function(){Y(!1)}},t.createElement(ff,{ref:f,open:s,prefixCls:o,id:i,inputElement:null,disabled:d,autoFocus:m,autoComplete:g,editable:j,activeDescendantId:y,value:U,onKeyDown:$,onMouseDown:_,onChange:Q,onPaste:T,onCompositionStart:R,onCompositionEnd:A,tabIndex:O,attrs:Ju(e,!0)}),t.createElement("span",{ref:M,className:"".concat(V,"-search-mirror"),"aria-hidden":!0},U,"\xa0")),X=t.createElement(sf,{prefixCls:"".concat(V,"-overflow"),data:a,renderItem:function(e){var n=e.disabled,r=e.label,i=e.value,o=!d&&!n,a=r;if("number"===typeof k&&("string"===typeof r||"number"===typeof r)){var l=String(a);l.length>k&&(a="".concat(l.slice(0,k),"..."))}var u=function(t){t&&t.stopPropagation(),E(e)};return"function"===typeof C?function(e,n,r,i,o){return t.createElement("span",{onMouseDown:function(e){gf(e),P(!s)}},C({label:n,value:e,disabled:r,closable:i,onClose:o}))}(i,a,n,o,u):W(e,a,n,o,u)},renderRest:function(e){var t="function"===typeof x?x(e):x;return W({title:t},t,!1)},suffix:z,itemKey:mf,maxCount:w});return t.createElement(t.Fragment,null,X,!a.length&&!U&&t.createElement("span",{className:"".concat(V,"-placeholder")},h))},Of=function(e){var n=e.inputElement,r=e.prefixCls,i=e.id,o=e.inputRef,a=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,f=e.mode,h=e.open,d=e.values,p=e.placeholder,v=e.tabIndex,m=e.showSearch,g=e.searchValue,y=e.activeValue,O=e.maxLength,b=e.onInputKeyDown,w=e.onInputMouseDown,k=e.onInputChange,S=e.onInputPaste,x=e.onInputCompositionStart,C=e.onInputCompositionEnd,P=u(t.useState(!1),2),E=P[0],Q=P[1],T="combobox"===f,$=T||m,_=d[0],R=g||"";T&&y&&!E&&(R=y),t.useEffect((function(){T&&Q(!1)}),[T,y]);var A=!("combobox"!==f&&!h&&!m)&&!!R,M=vf(_);return t.createElement(t.Fragment,null,t.createElement("span",{className:"".concat(r,"-selection-search")},t.createElement(ff,{ref:o,prefixCls:r,id:i,open:h,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:$,activeDescendantId:c,value:R,onKeyDown:b,onMouseDown:w,onChange:function(e){Q(!0),k(e)},onPaste:S,onCompositionStart:x,onCompositionEnd:C,tabIndex:v,attrs:Ju(e,!0),maxLength:T?O:void 0})),!T&&_?t.createElement("span",{className:"".concat(r,"-selection-item"),title:M,style:A?{visibility:"hidden"}:void 0},_.label):null,function(){if(_)return null;var e=A?{visibility:"hidden"}:void 0;return t.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:e},p)}())};var bf=function(e,n){var r=(0,t.useRef)(null),i=(0,t.useRef)(!1),o=e.prefixCls,a=e.open,s=e.mode,l=e.showSearch,c=e.tokenWithEnter,f=e.autoClearSearchValue,h=e.onSearch,d=e.onSearchSubmit,p=e.onToggleOpen,v=e.onInputKeyDown,m=e.domRef;t.useImperativeHandle(n,(function(){return{focus:function(){r.current.focus()},blur:function(){r.current.blur()}}}));var g=u(Hu(0),2),y=g[0],O=g[1],b=(0,t.useRef)(null),w=function(e){!1!==h(e,!0,i.current)&&p(!0)},k={inputRef:r,onInputKeyDown:function(e){var t,n=e.which;n!==Uu.UP&&n!==Uu.DOWN||e.preventDefault(),v&&v(e),n!==Uu.ENTER||"tags"!==s||i.current||a||null===d||void 0===d||d(e.target.value),t=n,[Uu.ESC,Uu.SHIFT,Uu.BACKSPACE,Uu.TAB,Uu.WIN_KEY,Uu.ALT,Uu.META,Uu.WIN_KEY_RIGHT,Uu.CTRL,Uu.SEMICOLON,Uu.EQUALS,Uu.CAPS_LOCK,Uu.CONTEXT_MENU,Uu.F1,Uu.F2,Uu.F3,Uu.F4,Uu.F5,Uu.F6,Uu.F7,Uu.F8,Uu.F9,Uu.F10,Uu.F11,Uu.F12].includes(t)||p(!0)},onInputMouseDown:function(){O(!0)},onInputChange:function(e){var t=e.target.value;if(c&&b.current&&/[\r\n]/.test(b.current)){var n=b.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,b.current)}b.current=null,w(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");b.current=t},onInputCompositionStart:function(){i.current=!0},onInputCompositionEnd:function(e){i.current=!1,"combobox"!==s&&w(e.target.value)}},S="multiple"===s||"tags"===s?t.createElement(yf,wu({},e,k)):t.createElement(Of,wu({},e,k));return t.createElement("div",{ref:m,className:"".concat(o,"-selector"),onClick:function(e){e.target!==r.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){r.current.focus()})):r.current.focus())},onMouseDown:function(e){var t=y();e.target===r.current||t||"combobox"===s||e.preventDefault(),("combobox"===s||l&&t)&&a||(a&&!1!==f&&h("",!0,!1),p())}},S)},wf=t.forwardRef(bf);wf.displayName="Selector";var kf=wf;function Sf(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}function xf(e,t,n,r){var i=nt.unstable_batchedUpdates?function(e){nt.unstable_batchedUpdates(n,e)}:n;return null!==e&&void 0!==e&&e.addEventListener&&e.addEventListener(t,i,r),{remove:function(){null!==e&&void 0!==e&&e.removeEventListener&&e.removeEventListener(t,i,r)}}}var Cf=(0,t.forwardRef)((function(e,n){var r=e.didUpdate,i=e.getContainer,o=e.children,a=(0,t.useRef)(),s=(0,t.useRef)();(0,t.useImperativeHandle)(n,(function(){return{}}));var l=(0,t.useRef)(!1);return!l.current&&Cu()&&(s.current=i(),a.current=s.current.parentNode,l.current=!0),(0,t.useEffect)((function(){null===r||void 0===r||r(e)})),(0,t.useEffect)((function(){return null===s.current.parentNode&&null!==a.current&&a.current.appendChild(s.current),function(){var e,t;null===(e=s.current)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(s.current)}}),[]),s.current?nt.createPortal(o,s.current):null})),Pf=Cf;function Ef(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var Qf=t.createContext({});var Tf=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n,[{key:"render",value:function(){return this.props.children}}]),n}(t.Component),$f=Tf,_f="none",Rf="appear",Af="enter",Mf="leave",Nf="none",Zf="prepare",Df="start",Lf="active",If="end",Yf="prepared";function Vf(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var Uf=function(e,t){var n={animationend:Vf("Animation","AnimationEnd"),transitionend:Vf("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}(Cu(),"undefined"!==typeof window?window:{}),jf={};if(Cu()){var Wf=document.createElement("div");jf=Wf.style}var zf={};function Xf(e){if(zf[e])return zf[e];var t=Uf[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in jf)return zf[e]=t[o],zf[e]}return""}var Ff=Xf("animationend"),Bf=Xf("transitionend"),qf=!(!Ff||!Bf),Hf=Ff||"animationend",Gf=Bf||"transitionend";function Kf(e,t){if(!e)return null;if("object"===d(e)){var n=t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}));return e[n]}return"".concat(e,"-").concat(t)}var Jf=function(e){var n=(0,t.useRef)(),r=(0,t.useRef)(e);r.current=e;var i=t.useCallback((function(e){r.current(e)}),[]);function o(e){e&&(e.removeEventListener(Gf,i),e.removeEventListener(Hf,i))}return t.useEffect((function(){return function(){o(n.current)}}),[]),[function(e){n.current&&n.current!==e&&o(n.current),e&&e!==n.current&&(e.addEventListener(Gf,i),e.addEventListener(Hf,i),n.current=e)},o]},eh=Cu()?t.useLayoutEffect:t.useEffect,th=[Zf,Df,Lf,If],nh=[Zf,Yf],rh=!1,ih=!0;function oh(e){return e===Lf||e===If}var ah=function(e,n,r){var i=u($u(Nf),2),o=i[0],a=i[1],s=function(){var e=t.useRef(null);function n(){Wc.cancel(e.current)}return t.useEffect((function(){return function(){n()}}),[]),[function t(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;n();var o=Wc((function(){i<=1?r({isCanceled:function(){return o!==e.current}}):t(r,i-1)}));e.current=o},n]}(),l=u(s,2),c=l[0],f=l[1];var h=n?nh:th;return eh((function(){if(o!==Nf&&o!==If){var e=h.indexOf(o),t=h[e+1],n=r(o);n===rh?a(t,!0):t&&c((function(e){function r(){e.isCanceled()||a(t,!0)}!0===n?r():Promise.resolve(n).then(r)}))}}),[e,o]),t.useEffect((function(){return function(){f()}}),[]),[function(){a(Zf,!0)},o]};var sh=function(e){var n=e;"object"===d(e)&&(n=e.transitionSupport);var r=t.forwardRef((function(e,r){var i=e.visible,o=void 0===i||i,a=e.removeOnLeave,s=void 0===a||a,l=e.forceRender,c=e.children,f=e.motionName,h=e.leavedClassName,d=e.eventProps,p=function(e,t){return!(!e.motionName||!n||!1===t)}(e,t.useContext(Qf).motion),v=(0,t.useRef)(),m=(0,t.useRef)();var g=function(e,n,r,i){var o=i.motionEnter,a=void 0===o||o,s=i.motionAppear,l=void 0===s||s,c=i.motionLeave,f=void 0===c||c,h=i.motionDeadline,d=i.motionLeaveImmediately,p=i.onAppearPrepare,v=i.onEnterPrepare,m=i.onLeavePrepare,g=i.onAppearStart,y=i.onEnterStart,O=i.onLeaveStart,b=i.onAppearActive,w=i.onEnterActive,k=i.onLeaveActive,S=i.onAppearEnd,x=i.onEnterEnd,C=i.onLeaveEnd,P=i.onVisibleChanged,E=u($u(),2),Q=E[0],T=E[1],$=u($u(_f),2),_=$[0],R=$[1],A=u($u(null),2),M=A[0],N=A[1],Z=(0,t.useRef)(!1),D=(0,t.useRef)(null);function L(){return r()}var I=(0,t.useRef)(!1);function Y(){R(_f,!0),N(null,!0)}function V(e){var t=L();if(!e||e.deadline||e.target===t){var n,r=I.current;_===Rf&&r?n=null===S||void 0===S?void 0:S(t,e):_===Af&&r?n=null===x||void 0===x?void 0:x(t,e):_===Mf&&r&&(n=null===C||void 0===C?void 0:C(t,e)),_!==_f&&r&&!1!==n&&Y()}}var U=u(Jf(V),1)[0],j=function(e){var t,n,r;switch(e){case Rf:return Je(t={},Zf,p),Je(t,Df,g),Je(t,Lf,b),t;case Af:return Je(n={},Zf,v),Je(n,Df,y),Je(n,Lf,w),n;case Mf:return Je(r={},Zf,m),Je(r,Df,O),Je(r,Lf,k),r;default:return{}}},W=t.useMemo((function(){return j(_)}),[_]),z=u(ah(_,!e,(function(e){if(e===Zf){var t=W[Zf];return t?t(L()):rh}var n;return F in W&&N((null===(n=W[F])||void 0===n?void 0:n.call(W,L(),null))||null),F===Lf&&(U(L()),h>0&&(clearTimeout(D.current),D.current=setTimeout((function(){V({deadline:!0})}),h))),F===Yf&&Y(),ih})),2),X=z[0],F=z[1],B=oh(F);I.current=B,eh((function(){T(n);var t,r=Z.current;Z.current=!0,!r&&n&&l&&(t=Rf),r&&n&&a&&(t=Af),(r&&!n&&f||!r&&d&&!n&&f)&&(t=Mf);var i=j(t);t&&(e||i[Zf])?(R(t),X()):R(_f)}),[n]),(0,t.useEffect)((function(){(_===Rf&&!l||_===Af&&!a||_===Mf&&!f)&&R(_f)}),[l,a,f]),(0,t.useEffect)((function(){return function(){Z.current=!1,clearTimeout(D.current)}}),[]);var q=t.useRef(!1);(0,t.useEffect)((function(){Q&&(q.current=!0),void 0!==Q&&_===_f&&((q.current||Q)&&(null===P||void 0===P||P(Q)),q.current=!0)}),[Q,_]);var H=M;return W[Zf]&&F===Df&&(H=tt({transition:"none"},H)),[_,F,H,null!==Q&&void 0!==Q?Q:n]}(p,o,(function(){try{return v.current instanceof HTMLElement?v.current:tc(m.current)}catch(e){return null}}),e),y=u(g,4),O=y[0],b=y[1],w=y[2],k=y[3],S=t.useRef(k);k&&(S.current=!0);var x,C=t.useCallback((function(e){v.current=e,zu(r,e)}),[r]),P=tt(tt({},d),{},{visible:o});if(c)if(O===_f)x=k?c(tt({},P),C):!s&&S.current&&h?c(tt(tt({},P),{},{className:h}),C):l||!s&&!h?c(tt(tt({},P),{},{style:{display:"none"}}),C):null;else{var E,Q;b===Zf?Q="prepare":oh(b)?Q="active":b===Df&&(Q="start");var T=Kf(f,"".concat(O,"-").concat(Q));x=c(tt(tt({},P),{},{className:Su()(Kf(f,O),(E={},Je(E,T,T&&Q),Je(E,f,"string"===typeof f),E)),style:w}),C)}else x=null;t.isValidElement(x)&&Bu(x)&&(x.ref||(x=t.cloneElement(x,{ref:C})));return t.createElement($f,{ref:m},x)}));return r.displayName="CSSMotion",r}(qf),lh="add",uh="keep",ch="remove",fh="removed";function hh(e){var t;return tt(tt({},t=e&&"object"===d(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function dh(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(hh)}var ph=["component","children","onVisibleChanged","onAllRemoved"],vh=["status"],mh=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sh,r=function(e){y(i,e);var r=k(i);function i(){var e;h(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Je(w(e=r.call.apply(r,[this].concat(n))),"state",{keyEntities:[]}),Je(w(e),"removeKey",(function(t){var n=e.state.keyEntities.map((function(e){return e.key!==t?e:tt(tt({},e),{},{status:fh})}));return e.setState({keyEntities:n}),n.filter((function(e){return e.status!==fh})).length})),e}return m(i,[{key:"render",value:function(){var e=this,r=this.state.keyEntities,i=this.props,o=i.component,a=i.children,s=i.onVisibleChanged,l=i.onAllRemoved,u=qe(i,ph),c=o||t.Fragment,f={};return mh.forEach((function(e){f[e]=u[e],delete u[e]})),delete u.keys,t.createElement(c,u,r.map((function(r){var i=r.status,o=qe(r,vh),u=i===lh||i===uh;return t.createElement(n,wu({},f,{key:o.key,visible:u,eventProps:o,onVisibleChanged:function(t){(null===s||void 0===s||s(t,{key:o.key}),t)||0===e.removeKey(o.key)&&l&&l()}}),a)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=dh(n),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,o=dh(e),a=dh(t);o.forEach((function(e){for(var t=!1,o=r;o<i;o+=1){var s=a[o];if(s.key===e.key){r<o&&(n=n.concat(a.slice(r,o).map((function(e){return tt(tt({},e),{},{status:lh})}))),r=o),n.push(tt(tt({},s),{},{status:uh})),r+=1,t=!0;break}}t||n.push(tt(tt({},e),{},{status:ch}))})),r<i&&(n=n.concat(a.slice(r).map((function(e){return tt(tt({},e),{},{status:lh})}))));var s={};return n.forEach((function(e){var t=e.key;s[t]=(s[t]||0)+1})),Object.keys(s).filter((function(e){return s[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==ch}))).forEach((function(t){t.key===e&&(t.status=uh)}))})),n}(r,i);return{keyEntities:o.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==fh||e.status!==ch}))}}}]),i}(t.Component);Je(r,"defaultProps",{component:"div"})}(qf);var gh,yh=sh;function Oh(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function bh(e){var n=e.prefixCls,r=e.visible,i=e.zIndex,o=e.mask,a=e.maskMotion,s=e.maskAnimation,l=e.maskTransitionName;if(!o)return null;var u={};return(a||l||s)&&(u=tt({motionAppear:!0},Oh({motion:a,prefixCls:n,transitionName:l,animation:s}))),t.createElement(yh,wu({},u,{visible:r,removeOnLeave:!0}),(function(e){var r=e.className;return t.createElement("div",{style:{zIndex:i},className:Su()("".concat(n,"-mask"),r)})}))}function wh(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 kh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wh(Object(n),!0).forEach((function(t){xh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sh(e){return Sh="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},Sh(e)}function xh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ch={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function Ph(){if(void 0!==gh)return gh;gh="";var e=document.createElement("p").style;for(var t in Ch)t+"Transform"in e&&(gh=t);return gh}function Eh(){return Ph()?"".concat(Ph(),"TransitionProperty"):"transitionProperty"}function Qh(){return Ph()?"".concat(Ph(),"Transform"):"transform"}function Th(e,t){var n=Eh();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function $h(e,t){var n=Qh();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var _h,Rh=/matrix\((.*)\)/,Ah=/matrix3d\((.*)\)/;function Mh(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function Nh(e,t,n){var r=n;if("object"!==Sh(t))return"undefined"!==typeof r?("number"===typeof r&&(r="".concat(r,"px")),void(e.style[t]=r)):_h(e,t);for(var i in t)t.hasOwnProperty(i)&&Nh(e,i,t[i])}function Zh(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!==typeof n){var i=e.document;"number"!==typeof(n=i.documentElement[r])&&(n=i.body[r])}return n}function Dh(e){return Zh(e)}function Lh(e){return Zh(e,!0)}function Ih(e){var t=function(e){var t,n,r,i=e.ownerDocument,o=i.body,a=i&&i.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),r=Math.floor(t.top),{left:n-=a.clientLeft||o.clientLeft||0,top:r-=a.clientTop||o.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=Dh(r),t.top+=Lh(r),t}function Yh(e){return null!==e&&void 0!==e&&e==e.window}function Vh(e){return Yh(e)?e.document:9===e.nodeType?e:e.ownerDocument}var Uh=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),jh=/^(top|right|bottom|left)$/,Wh="currentStyle",zh="runtimeStyle",Xh="left";function Fh(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function Bh(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function qh(e,t,n){"static"===Nh(e,"position")&&(e.style.position="relative");var r=-999,i=-999,o=Fh("left",n),a=Fh("top",n),s=Bh(o),l=Bh(a);"left"!==o&&(r=999),"top"!==a&&(i=999);var u,c="",f=Ih(e);("left"in t||"top"in t)&&(c=(u=e).style.transitionProperty||u.style[Eh()]||"",Th(e,"none")),"left"in t&&(e.style[s]="",e.style[o]="".concat(r,"px")),"top"in t&&(e.style[l]="",e.style[a]="".concat(i,"px")),Mh(e);var h=Ih(e),d={};for(var p in t)if(t.hasOwnProperty(p)){var v=Fh(p,n),m="left"===p?r:i,g=f[p]-h[p];d[v]=v===p?m+g:m-g}Nh(e,d),Mh(e),("left"in t||"top"in t)&&Th(e,c);var y={};for(var O in t)if(t.hasOwnProperty(O)){var b=Fh(O,n),w=t[O]-f[O];y[b]=O===b?d[b]+w:d[b]-w}Nh(e,y)}function Hh(e,t){var n=Ih(e),r=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(Qh());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(e),i={x:r.x,y:r.y};"left"in t&&(i.x=r.x+t.left-n.left),"top"in t&&(i.y=r.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(Qh());if(r&&"none"!==r){var i,o=r.match(Rh);o?((i=(o=o[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,i[5]=t.y,$h(e,"matrix(".concat(i.join(","),")"))):((i=r.match(Ah)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,i[13]=t.y,$h(e,"matrix3d(".concat(i.join(","),")")))}else $h(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,i)}function Gh(e,t){for(var n=0;n<e.length;n++)t(e[n])}function Kh(e){return"border-box"===_h(e,"boxSizing")}"undefined"!==typeof window&&(_h=window.getComputedStyle?function(e,t,n){var r=n,i="",o=Vh(e);return(r=r||o.defaultView.getComputedStyle(e,null))&&(i=r.getPropertyValue(t)||r[t]),i}:function(e,t){var n=e[Wh]&&e[Wh][t];if(Uh.test(n)&&!jh.test(t)){var r=e.style,i=r[Xh],o=e[zh][Xh];e[zh][Xh]=e[Wh][Xh],r[Xh]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[Xh]=i,e[zh][Xh]=o}return""===n?"auto":n});var Jh=["margin","border","padding"],ed=-1,td=2,nd=1;function rd(e,t,n){var r,i,o,a=0;for(i=0;i<t.length;i++)if(r=t[i])for(o=0;o<n.length;o++){var s=void 0;s="border"===r?"".concat(r).concat(n[o],"Width"):r+n[o],a+=parseFloat(_h(e,s))||0}return a}var id={getParent:function(e){var t=e;do{t=11===t.nodeType&&t.host?t.host:t.parentNode}while(t&&1!==t.nodeType&&9!==t.nodeType);return t}};function od(e,t,n){var r=n;if(Yh(e))return"width"===t?id.viewportWidth(e):id.viewportHeight(e);if(9===e.nodeType)return"width"===t?id.docWidth(e):id.docHeight(e);var i="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?Math.floor(e.getBoundingClientRect().width):Math.floor(e.getBoundingClientRect().height),a=Kh(e),s=0;(null===o||void 0===o||o<=0)&&(o=void 0,(null===(s=_h(e,t))||void 0===s||Number(s)<0)&&(s=e.style[t]||0),s=Math.floor(parseFloat(s))||0),void 0===r&&(r=a?nd:ed);var l=void 0!==o||a,u=o||s;return r===ed?l?u-rd(e,["border","padding"],i):s:l?r===nd?u:u+(r===td?-rd(e,["border"],i):rd(e,["margin"],i)):s+rd(e,Jh.slice(r),i)}Gh(["Width","Height"],(function(e){id["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],id["viewport".concat(e)](n))},id["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,i=r.body,o=r.documentElement[n];return"CSS1Compat"===r.compatMode&&o||i&&i[n]||o}}));var ad={position:"absolute",visibility:"hidden",display:"block"};function sd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0];return 0!==i.offsetWidth?r=od.apply(void 0,t):function(e,t,n){var r,i={},o=e.style;for(r in t)t.hasOwnProperty(r)&&(i[r]=o[r],o[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(o[r]=i[r])}(i,ad,(function(){r=od.apply(void 0,t)})),r}function ld(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}Gh(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);id["outer".concat(t)]=function(t,n){return t&&sd(t,e,n?0:nd)};var n="width"===e?["Left","Right"]:["Top","Bottom"];id[e]=function(t,r){var i=r;return void 0!==i?t?(Kh(t)&&(i+=rd(t,["padding","border"],n)),Nh(t,e,i)):void 0:t&&sd(t,e,ed)}}));var ud={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:Vh,offset:function(e,t,n){if("undefined"===typeof t)return Ih(e);!function(e,t,n){if(n.ignoreShake){var r=Ih(e),i=r.left.toFixed(0),o=r.top.toFixed(0),a=t.left.toFixed(0),s=t.top.toFixed(0);if(i===a&&o===s)return}n.useCssRight||n.useCssBottom?qh(e,t,n):n.useCssTransform&&Qh()in document.body.style?Hh(e,t):qh(e,t,n)}(e,t,n||{})},isWindow:Yh,each:Gh,css:Nh,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:ld,getWindowScrollLeft:function(e){return Dh(e)},getWindowScrollTop:function(e){return Lh(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)ud.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};ld(ud,id);var cd=ud.getParent;function fd(e){if(ud.isWindow(e)||9===e.nodeType)return null;var t,n=ud.getDocument(e).body,r=ud.css(e,"position");if(!("fixed"===r||"absolute"===r))return"html"===e.nodeName.toLowerCase()?null:cd(e);for(t=cd(e);t&&t!==n&&9!==t.nodeType;t=cd(t))if("static"!==(r=ud.css(t,"position")))return t;return null}var hd=ud.getParent;function dd(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=fd(e),i=ud.getDocument(e),o=i.defaultView||i.parentWindow,a=i.body,s=i.documentElement;r;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===r.clientWidth||r===a||r===s||"visible"===ud.css(r,"overflow")){if(r===a||r===s)break}else{var l=ud.offset(r);l.left+=r.clientLeft,l.top+=r.clientTop,n.top=Math.max(n.top,l.top),n.right=Math.min(n.right,l.left+r.clientWidth),n.bottom=Math.min(n.bottom,l.top+r.clientHeight),n.left=Math.max(n.left,l.left)}r=fd(r)}var u=null;ud.isWindow(e)||9===e.nodeType||(u=e.style.position,"absolute"===ud.css(e,"position")&&(e.style.position="fixed"));var c=ud.getWindowScrollLeft(o),f=ud.getWindowScrollTop(o),h=ud.viewportWidth(o),d=ud.viewportHeight(o),p=s.scrollWidth,v=s.scrollHeight,m=window.getComputedStyle(a);if("hidden"===m.overflowX&&(p=o.innerWidth),"hidden"===m.overflowY&&(v=o.innerHeight),e.style&&(e.style.position=u),t||function(e){if(ud.isWindow(e)||9===e.nodeType)return!1;var t=ud.getDocument(e),n=t.body,r=null;for(r=hd(e);r&&r!==n&&r!==t;r=hd(r))if("fixed"===ud.css(r,"position"))return!0;return!1}(e))n.left=Math.max(n.left,c),n.top=Math.max(n.top,f),n.right=Math.min(n.right,c+h),n.bottom=Math.min(n.bottom,f+d);else{var g=Math.max(p,c+h);n.right=Math.min(n.right,g);var y=Math.max(v,f+d);n.bottom=Math.min(n.bottom,y)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function pd(e){var t,n,r;if(ud.isWindow(e)||9===e.nodeType){var i=ud.getWindow(e);t={left:ud.getWindowScrollLeft(i),top:ud.getWindowScrollTop(i)},n=ud.viewportWidth(i),r=ud.viewportHeight(i)}else t=ud.offset(e),n=ud.outerWidth(e),r=ud.outerHeight(e);return t.width=n,t.height=r,t}function vd(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,o=e.height,a=e.left,s=e.top;return"c"===n?s+=o/2:"b"===n&&(s+=o),"c"===r?a+=i/2:"r"===r&&(a+=i),{left:a,top:s}}function md(e,t,n,r,i){var o=vd(t,n[1]),a=vd(e,n[0]),s=[a.left-o.left,a.top-o.top];return{left:Math.round(e.left-s[0]+r[0]-i[0]),top:Math.round(e.top-s[1]+r[1]-i[1])}}function gd(e,t,n){return e.left<n.left||e.left+t.width>n.right}function yd(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function Od(e,t,n){var r=[];return ud.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function bd(e,t){return e[t]=-e[t],e}function wd(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function kd(e,t){e[0]=wd(e[0],t.width),e[1]=wd(e[1],t.height)}function Sd(e,t,n,r){var i=n.points,o=n.offset||[0,0],a=n.targetOffset||[0,0],s=n.overflow,l=n.source||e;o=[].concat(o),a=[].concat(a);var u={},c=0,f=dd(l,!(!(s=s||{})||!s.alwaysByViewport)),h=pd(l);kd(o,h),kd(a,t);var d=md(h,t,i,o,a),p=ud.merge(h,d);if(f&&(s.adjustX||s.adjustY)&&r){if(s.adjustX&&gd(d,h,f)){var v=Od(i,/[lr]/gi,{l:"r",r:"l"}),m=bd(o,0),g=bd(a,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})(md(h,t,v,m,g),h,f)||(c=1,i=v,o=m,a=g)}if(s.adjustY&&yd(d,h,f)){var y=Od(i,/[tb]/gi,{t:"b",b:"t"}),O=bd(o,1),b=bd(a,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})(md(h,t,y,O,b),h,f)||(c=1,i=y,o=O,a=b)}c&&(d=md(h,t,i,o,a),ud.mix(p,d));var w=gd(d,h,f),k=yd(d,h,f);if(w||k){var S=i;w&&(S=Od(i,/[lr]/gi,{l:"r",r:"l"})),k&&(S=Od(i,/[tb]/gi,{t:"b",b:"t"})),i=S,o=n.offset||[0,0],a=n.targetOffset||[0,0]}u.adjustX=s.adjustX&&w,u.adjustY=s.adjustY&&k,(u.adjustX||u.adjustY)&&(p=function(e,t,n,r){var i=ud.clone(e),o={width:t.width,height:t.height};return r.adjustX&&i.left<n.left&&(i.left=n.left),r.resizeWidth&&i.left>=n.left&&i.left+o.width>n.right&&(o.width-=i.left+o.width-n.right),r.adjustX&&i.left+o.width>n.right&&(i.left=Math.max(n.right-o.width,n.left)),r.adjustY&&i.top<n.top&&(i.top=n.top),r.resizeHeight&&i.top>=n.top&&i.top+o.height>n.bottom&&(o.height-=i.top+o.height-n.bottom),r.adjustY&&i.top+o.height>n.bottom&&(i.top=Math.max(n.bottom-o.height,n.top)),ud.mix(i,o)}(d,h,f,u))}return p.width!==h.width&&ud.css(l,"width",ud.width(l)+p.width-h.width),p.height!==h.height&&ud.css(l,"height",ud.height(l)+p.height-h.height),ud.offset(l,{left:p.left,top:p.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:o,targetOffset:a,overflow:u}}function xd(e,t,n){var r=n.target||t,i=pd(r),o=!function(e,t){var n=dd(e,t),r=pd(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport);return Sd(e,i,n,o)}xd.__getOffsetParent=fd,xd.__getVisibleRectForElement=dd;var Cd=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(Iu(!a,"Warning: There may be circular references"),a)return!1;if(t===i)return!0;if(n&&o>1)return!1;r.add(t);var s=o+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var l=0;l<t.length;l++)if(!e(t[l],i[l],s))return!1;return!0}if(t&&i&&"object"===d(t)&&"object"===d(i)){var u=Object.keys(t);return u.length===Object.keys(i).length&&u.every((function(n){return e(t[n],i[n],s)}))}return!1}(e,t)},Pd=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1};function Ed(e,t){var n=null,r=null;var i=new Sc((function(e){var i=u(e,1)[0].target;if(document.documentElement.contains(i)){var o=i.getBoundingClientRect(),a=o.width,s=o.height,l=Math.floor(a),c=Math.floor(s);n===l&&r===c||Promise.resolve().then((function(){t({width:l,height:c})})),n=l,r=c}}));return e&&i.observe(e),function(){i.disconnect()}}function Qd(e){return"function"!==typeof e?null:e()}function Td(e){return"object"===d(e)&&e?e:null}var $d=function(e,n){var r=e.children,i=e.disabled,o=e.target,a=e.align,s=e.onAlign,l=e.monitorWindowResize,c=e.monitorBufferTime,f=void 0===c?0:c,h=t.useRef({}),d=t.useRef(),p=t.Children.only(r),v=t.useRef({});v.current.disabled=i,v.current.target=o,v.current.align=a,v.current.onAlign=s;var m=function(e,n){var r=t.useRef(!1),i=t.useRef(null);function o(){window.clearTimeout(i.current)}return[function t(a){if(o(),r.current&&!0!==a)i.current=window.setTimeout((function(){r.current=!1,t()}),n);else{if(!1===e(a))return;r.current=!0,i.current=window.setTimeout((function(){r.current=!1}),n)}},function(){r.current=!1,o()}]}((function(){var e=v.current,t=e.disabled,n=e.target,r=e.align,i=e.onAlign,o=d.current;if(!t&&n&&o){var a,s=Qd(n),l=Td(n);h.current.element=s,h.current.point=l,h.current.align=r;var u=document.activeElement;return s&&Pd(s)?a=xd(o,s,r):l&&(a=function(e,t,n){var r,i,o=ud.getDocument(e),a=o.defaultView||o.parentWindow,s=ud.getWindowScrollLeft(a),l=ud.getWindowScrollTop(a),u=ud.viewportWidth(a),c=ud.viewportHeight(a),f={left:r="pageX"in t?t.pageX:s+t.clientX,top:i="pageY"in t?t.pageY:l+t.clientY,width:0,height:0},h=r>=0&&r<=s+u&&i>=0&&i<=l+c,d=[n.points[0],"cc"];return Sd(e,f,kh(kh({},n),{},{points:d}),h)}(o,l,r)),function(e,t){e!==document.activeElement&&Sf(t,e)&&"function"===typeof e.focus&&e.focus()}(u,o),i&&a&&i(o,a),!0}return!1}),f),g=u(m,2),y=g[0],O=g[1],b=u(t.useState(),2),w=b[0],k=b[1],S=u(t.useState(),2),x=S[0],C=S[1];return Tu((function(){k(Qd(o)),C(Td(o))})),t.useEffect((function(){var e,t;h.current.element===w&&((e=h.current.point)===(t=x)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&Cd(h.current.align,a)||y()})),t.useEffect((function(){return Ed(d.current,y)}),[d.current]),t.useEffect((function(){return Ed(w,y)}),[w]),t.useEffect((function(){i?O():y()}),[i]),t.useEffect((function(){if(l)return xf(window,"resize",y).remove}),[l]),t.useEffect((function(){return function(){O()}}),[]),t.useImperativeHandle(n,(function(){return{forceAlign:function(){return y(!0)}}})),t.isValidElement(p)&&(p=t.cloneElement(p,{ref:Xu(p.ref,d)})),p},_d=t.forwardRef($d);_d.displayName="Align";var Rd=_d,Ad=["measure","alignPre","align",null,"motion"],Md=t.forwardRef((function(e,n){var r=e.visible,i=e.prefixCls,o=e.className,a=e.style,s=e.children,l=e.zIndex,c=e.stretch,f=e.destroyPopupOnHide,h=e.forceRender,d=e.align,p=e.point,v=e.getRootDomNode,m=e.getClassNameFromAlign,g=e.onAlign,y=e.onMouseEnter,O=e.onMouseLeave,b=e.onMouseDown,w=e.onTouchStart,k=e.onClick,S=(0,t.useRef)(),x=(0,t.useRef)(),C=u((0,t.useState)(),2),P=C[0],E=C[1],Q=function(e){var n=u(t.useState({width:0,height:0}),2),r=n[0],i=n[1];return[t.useMemo((function(){var t={};if(e){var n=r.width,i=r.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){var t=e.offsetWidth,n=e.offsetHeight,r=e.getBoundingClientRect(),o=r.width,a=r.height;Math.abs(t-o)<1&&Math.abs(n-a)<1&&(t=o,n=a),i({width:t,height:n})}]}(c),T=u(Q,2),$=T[0],_=T[1];var R=function(e,n){var r=u($u(null),2),i=r[0],o=r[1],a=(0,t.useRef)();function s(e){o(e,!0)}function l(){Wc.cancel(a.current)}return(0,t.useEffect)((function(){s("measure")}),[e]),(0,t.useEffect)((function(){"measure"===i&&n(),i&&(a.current=Wc(Ge(Ke().mark((function e(){var t,n;return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ad.indexOf(i),(n=Ad[t+1])&&-1!==t&&s(n);case 3:case"end":return e.stop()}}),e)})))))}),[i]),(0,t.useEffect)((function(){return function(){l()}}),[]),[i,function(e){l(),a.current=Wc((function(){s((function(e){switch(i){case"align":return"motion";case"motion":return"stable"}return e})),null===e||void 0===e||e()}))}]}(r,(function(){c&&_(v())})),A=u(R,2),M=A[0],N=A[1],Z=u((0,t.useState)(0),2),D=Z[0],L=Z[1],I=(0,t.useRef)();function Y(){var e;null===(e=S.current)||void 0===e||e.forceAlign()}function V(e,t){var n=m(t);P!==n&&E(n),L((function(e){return e+1})),"align"===M&&(null===g||void 0===g||g(e,t))}Tu((function(){"alignPre"===M&&L(0)}),[M]),Tu((function(){"align"===M&&(D<3?Y():N((function(){var e;null===(e=I.current)||void 0===e||e.call(I)})))}),[D]);var U=tt({},Oh(e));function j(){return new Promise((function(e){I.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=U[e];U[e]=function(e,n){return N(),null===t||void 0===t?void 0:t(e,n)}})),t.useEffect((function(){U.motionName||"motion"!==M||N()}),[U.motionName,M]),t.useImperativeHandle(n,(function(){return{forceAlign:Y,getElement:function(){return x.current}}}));var W=tt(tt({},$),{},{zIndex:l,opacity:"motion"!==M&&"stable"!==M&&r?0:void 0,pointerEvents:r||"stable"===M?void 0:"none"},a),z=!0;null===d||void 0===d||!d.points||"align"!==M&&"stable"!==M||(z=!1);var X=s;return t.Children.count(s)>1&&(X=t.createElement("div",{className:"".concat(i,"-content")},s)),t.createElement(yh,wu({visible:r,ref:x,leavedClassName:"".concat(i,"-hidden")},U,{onAppearPrepare:j,onEnterPrepare:j,removeOnLeave:f,forceRender:h}),(function(e,n){var r=e.className,a=e.style,s=Su()(i,o,P,r);return t.createElement(Rd,{target:p||v,key:"popup",ref:S,monitorWindowResize:!0,disabled:z,align:d,onAlign:V},t.createElement("div",{ref:n,className:s,onMouseEnter:y,onMouseLeave:O,onMouseDownCapture:b,onTouchStartCapture:w,onClick:k,style:tt(tt({},a),W)},X))}))}));Md.displayName="PopupInner";var Nd=Md,Zd=t.forwardRef((function(e,n){var r=e.prefixCls,i=e.visible,o=e.zIndex,a=e.children,s=e.mobile,l=(s=void 0===s?{}:s).popupClassName,u=s.popupStyle,c=s.popupMotion,f=void 0===c?{}:c,h=s.popupRender,d=e.onClick,p=t.useRef();t.useImperativeHandle(n,(function(){return{forceAlign:function(){},getElement:function(){return p.current}}}));var v=tt({zIndex:o},u),m=a;return t.Children.count(a)>1&&(m=t.createElement("div",{className:"".concat(r,"-content")},a)),h&&(m=h(m)),t.createElement(yh,wu({visible:i,ref:p,removeOnLeave:!0},f),(function(e,n){var i=e.className,o=e.style,a=Su()(r,l,i);return t.createElement("div",{ref:n,className:a,onClick:d,style:tt(tt({},o),v)},m)}))}));Zd.displayName="MobilePopupInner";var Dd=Zd,Ld=["visible","mobile"],Id=t.forwardRef((function(e,n){var r=e.visible,i=e.mobile,o=qe(e,Ld),a=u((0,t.useState)(r),2),s=a[0],l=a[1],c=u((0,t.useState)(!1),2),f=c[0],h=c[1],d=tt(tt({},o),{},{visible:s});(0,t.useEffect)((function(){l(r),r&&i&&h(Yu())}),[r,i]);var p=f?t.createElement(Dd,wu({},d,{mobile:i,ref:n})):t.createElement(Nd,wu({},d,{ref:n}));return t.createElement("div",null,t.createElement(bh,d),p)}));Id.displayName="Popup";var Yd=Id,Vd=t.createContext(null);function Ud(){}function jd(){return""}function Wd(e){return e?e.ownerDocument:window.document}var zd=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var Xd=function(e){var n=function(n){y(i,n);var r=k(i);function i(e){var n,o;return h(this,i),Je(w(n=r.call(this,e)),"popupRef",t.createRef()),Je(w(n),"triggerRef",t.createRef()),Je(w(n),"portalContainer",void 0),Je(w(n),"attachId",void 0),Je(w(n),"clickOutsideHandler",void 0),Je(w(n),"touchOutsideHandler",void 0),Je(w(n),"contextMenuOutsideHandler1",void 0),Je(w(n),"contextMenuOutsideHandler2",void 0),Je(w(n),"mouseDownTimeout",void 0),Je(w(n),"focusTime",void 0),Je(w(n),"preClickTime",void 0),Je(w(n),"preTouchTime",void 0),Je(w(n),"delayTimer",void 0),Je(w(n),"hasPopupMouseDown",void 0),Je(w(n),"onMouseEnter",(function(e){var t=n.props.mouseEnterDelay;n.fireEvents("onMouseEnter",e),n.delaySetPopupVisible(!0,t,t?null:e)})),Je(w(n),"onMouseMove",(function(e){n.fireEvents("onMouseMove",e),n.setPoint(e)})),Je(w(n),"onMouseLeave",(function(e){n.fireEvents("onMouseLeave",e),n.delaySetPopupVisible(!1,n.props.mouseLeaveDelay)})),Je(w(n),"onPopupMouseEnter",(function(){n.clearDelayTimer()})),Je(w(n),"onPopupMouseLeave",(function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Sf(null===(t=n.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||n.delaySetPopupVisible(!1,n.props.mouseLeaveDelay)})),Je(w(n),"onFocus",(function(e){n.fireEvents("onFocus",e),n.clearDelayTimer(),n.isFocusToShow()&&(n.focusTime=Date.now(),n.delaySetPopupVisible(!0,n.props.focusDelay))})),Je(w(n),"onMouseDown",(function(e){n.fireEvents("onMouseDown",e),n.preClickTime=Date.now()})),Je(w(n),"onTouchStart",(function(e){n.fireEvents("onTouchStart",e),n.preTouchTime=Date.now()})),Je(w(n),"onBlur",(function(e){n.fireEvents("onBlur",e),n.clearDelayTimer(),n.isBlurToHide()&&n.delaySetPopupVisible(!1,n.props.blurDelay)})),Je(w(n),"onContextMenu",(function(e){e.preventDefault(),n.fireEvents("onContextMenu",e),n.setPopupVisible(!0,e)})),Je(w(n),"onContextMenuClose",(function(){n.isContextMenuToShow()&&n.close()})),Je(w(n),"onClick",(function(e){if(n.fireEvents("onClick",e),n.focusTime){var t;if(n.preClickTime&&n.preTouchTime?t=Math.min(n.preClickTime,n.preTouchTime):n.preClickTime?t=n.preClickTime:n.preTouchTime&&(t=n.preTouchTime),Math.abs(t-n.focusTime)<20)return;n.focusTime=0}n.preClickTime=0,n.preTouchTime=0,n.isClickToShow()&&(n.isClickToHide()||n.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var r=!n.state.popupVisible;(n.isClickToHide()&&!r||r&&n.isClickToShow())&&n.setPopupVisible(!n.state.popupVisible,e)})),Je(w(n),"onPopupMouseDown",(function(){var e;(n.hasPopupMouseDown=!0,clearTimeout(n.mouseDownTimeout),n.mouseDownTimeout=window.setTimeout((function(){n.hasPopupMouseDown=!1}),0),n.context)&&(e=n.context).onPopupMouseDown.apply(e,arguments)})),Je(w(n),"onDocumentClick",(function(e){if(!n.props.mask||n.props.maskClosable){var t=e.target,r=n.getRootDomNode(),i=n.getPopupDomNode();Sf(r,t)&&!n.isContextMenuOnly()||Sf(i,t)||n.hasPopupMouseDown||n.close()}})),Je(w(n),"getRootDomNode",(function(){var e=n.props.getTriggerDOMNode;if(e)return e(n.triggerRef.current);try{var t=tc(n.triggerRef.current);if(t)return t}catch(r){}return nt.findDOMNode(w(n))})),Je(w(n),"getPopupClassNameFromAlign",(function(e){var t=[],r=n.props,i=r.popupPlacement,o=r.builtinPlacements,a=r.prefixCls,s=r.alignPoint,l=r.getPopupClassNameFromAlign;return i&&o&&t.push(function(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a<o.length;a+=1){var s=o[a];if(Ef(e[s].points,i,r))return"".concat(t,"-placement-").concat(s)}return""}(o,a,e,s)),l&&t.push(l(e)),t.join(" ")})),Je(w(n),"getComponent",(function(){var e=n.props,r=e.prefixCls,i=e.destroyPopupOnHide,o=e.popupClassName,a=e.onPopupAlign,s=e.popupMotion,l=e.popupAnimation,u=e.popupTransitionName,c=e.popupStyle,f=e.mask,h=e.maskAnimation,d=e.maskTransitionName,p=e.maskMotion,v=e.zIndex,m=e.popup,g=e.stretch,y=e.alignPoint,O=e.mobile,b=e.forceRender,w=e.onPopupClick,k=n.state,S=k.popupVisible,x=k.point,C=n.getPopupAlign(),P={};return n.isMouseEnterToShow()&&(P.onMouseEnter=n.onPopupMouseEnter),n.isMouseLeaveToHide()&&(P.onMouseLeave=n.onPopupMouseLeave),P.onMouseDown=n.onPopupMouseDown,P.onTouchStart=n.onPopupMouseDown,t.createElement(Yd,wu({prefixCls:r,destroyPopupOnHide:i,visible:S,point:y&&x,className:o,align:C,onAlign:a,animation:l,getClassNameFromAlign:n.getPopupClassNameFromAlign},P,{stretch:g,getRootDomNode:n.getRootDomNode,style:c,mask:f,zIndex:v,transitionName:u,maskAnimation:h,maskTransitionName:d,maskMotion:p,ref:n.popupRef,motion:s,mobile:O,forceRender:b,onClick:w}),"function"===typeof m?m():m)})),Je(w(n),"attachParent",(function(e){Wc.cancel(n.attachId);var t,r=n.props,i=r.getPopupContainer,o=r.getDocument,a=n.getRootDomNode();i?(a||0===i.length)&&(t=i(a)):t=o(n.getRootDomNode()).body,t?t.appendChild(e):n.attachId=Wc((function(){n.attachParent(e)}))})),Je(w(n),"getContainer",(function(){if(!n.portalContainer){var e=(0,n.props.getDocument)(n.getRootDomNode()).createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",n.portalContainer=e}return n.attachParent(n.portalContainer),n.portalContainer})),Je(w(n),"setPoint",(function(e){n.props.alignPoint&&e&&n.setState({point:{pageX:e.pageX,pageY:e.pageY}})})),Je(w(n),"handlePortalUpdate",(function(){n.state.prevPopupVisible!==n.state.popupVisible&&n.props.afterPopupVisibleChange(n.state.popupVisible)})),Je(w(n),"triggerContextValue",{onPopupMouseDown:n.onPopupMouseDown}),o="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,n.state={prevPopupVisible:o,popupVisible:o},zd.forEach((function(e){n["fire".concat(e)]=function(t){n.fireEvents(e,t)}})),n}return m(i,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=xf(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=xf(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=xf(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=xf(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Wc.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){return tt(tt({},e[t]||{}),n)}(r,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var r=this,i=1e3*t;if(this.clearDelayTimer(),i){var o=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(e,o),r.clearDelayTimer()}),i)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var e=this.props.action;return"contextMenu"===e||1===e.length&&"contextMenu"===e[0]}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var n=this.state.popupVisible,r=this.props,i=r.children,o=r.forceRender,a=r.alignPoint,s=r.className,l=r.autoDestroy,u=t.Children.only(i),c={key:"trigger"};this.isContextMenuToShow()?c.onContextMenu=this.onContextMenu:c.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(c.onClick=this.onClick,c.onMouseDown=this.onMouseDown,c.onTouchStart=this.onTouchStart):(c.onClick=this.createTwoChains("onClick"),c.onMouseDown=this.createTwoChains("onMouseDown"),c.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(c.onMouseEnter=this.onMouseEnter,a&&(c.onMouseMove=this.onMouseMove)):c.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?c.onMouseLeave=this.onMouseLeave:c.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(c.onFocus=this.onFocus,c.onBlur=this.onBlur):(c.onFocus=this.createTwoChains("onFocus"),c.onBlur=this.createTwoChains("onBlur"));var f=Su()(u&&u.props&&u.props.className,s);f&&(c.className=f);var h=tt({},c);Bu(u)&&(h.ref=Xu(this.triggerRef,u.ref));var d,p=t.cloneElement(u,h);return(n||this.popupRef.current||o)&&(d=t.createElement(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!n&&l&&(d=null),t.createElement(Vd.Provider,{value:this.triggerContextValue},p,d)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r}}]),i}(t.Component);return Je(n,"contextType",Vd),Je(n,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:jd,getDocument:Wd,onPopupVisibleChange:Ud,afterPopupVisibleChange:Ud,onPopupAlign:Ud,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1}),n}(Pf),Fd=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Bd=function(e,n){var r=e.prefixCls,i=(e.disabled,e.visible),o=e.children,a=e.popupElement,s=e.containerWidth,l=e.animation,u=e.transitionName,c=e.dropdownStyle,f=e.dropdownClassName,h=e.direction,d=void 0===h?"ltr":h,p=e.placement,v=e.dropdownMatchSelectWidth,m=e.dropdownRender,g=e.dropdownAlign,y=e.getPopupContainer,O=e.empty,b=e.getTriggerDOMNode,w=e.onPopupVisibleChange,k=e.onPopupMouseEnter,S=qe(e,Fd),x="".concat(r,"-dropdown"),C=a;m&&(C=m(a));var P=t.useMemo((function(){return function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}}(v)}),[v]),E=l?"".concat(x,"-").concat(l):u,Q=t.useRef(null);t.useImperativeHandle(n,(function(){return{getPopupElement:function(){return Q.current}}}));var T=tt({minWidth:s},c);return"number"===typeof v?T.width=v:v&&(T.width=s),t.createElement(Xd,wu({},S,{showAction:w?["click"]:[],hideAction:w?["click"]:[],popupPlacement:p||("rtl"===d?"bottomRight":"bottomLeft"),builtinPlacements:P,prefixCls:x,popupTransitionName:E,popup:t.createElement("div",{ref:Q,onMouseEnter:k},C),popupAlign:g,popupVisible:i,getPopupContainer:y,popupClassName:Su()(f,Je({},"".concat(x,"-empty"),O)),popupStyle:T,getTriggerDOMNode:b,onPopupVisibleChange:w}),o)},qd=t.forwardRef(Bd);qd.displayName="SelectTrigger";var Hd=qd;function Gd(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!==r&&void 0!==r?r:void 0!==n?n:"rc-index-key-".concat(t)}function Kd(e,t){var n=e||{};return{label:n.label||(t?"children":"label"),value:n.value||"value",options:n.options||"options"}}function Jd(e){var t=tt({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Iu(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var ep=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],tp=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function np(e){return"tags"===e||"multiple"===e}var rp=t.forwardRef((function(e,n){var r,i,o=e.id,a=e.prefixCls,s=e.className,l=e.showSearch,c=e.tagRender,h=e.direction,p=e.omitDomProps,v=e.displayValues,m=e.onDisplayValuesChange,g=e.emptyOptions,y=e.notFoundContent,O=void 0===y?"Not Found":y,b=e.onClear,w=e.mode,k=e.disabled,S=e.loading,x=e.getInputElement,P=e.getRawInputElement,E=e.open,Q=e.defaultOpen,T=e.onDropdownVisibleChange,$=e.activeValue,_=e.onActiveValueChange,R=e.activeDescendantId,A=e.searchValue,M=e.autoClearSearchValue,N=e.onSearch,Z=e.onSearchSplit,D=e.tokenSeparators,L=e.allowClear,I=e.showArrow,Y=e.inputIcon,V=e.clearIcon,U=e.OptionList,j=e.animation,W=e.transitionName,z=e.dropdownStyle,X=e.dropdownClassName,F=e.dropdownMatchSelectWidth,B=e.dropdownRender,q=e.dropdownAlign,H=e.placement,G=e.getPopupContainer,K=e.showAction,J=void 0===K?[]:K,ee=e.onFocus,te=e.onBlur,ne=e.onKeyUp,re=e.onKeyDown,ie=e.onMouseDown,oe=qe(e,ep),ae=np(w),se=(void 0!==l?l:ae)||"combobox"===w,le=tt({},oe);tp.forEach((function(e){delete le[e]})),null===p||void 0===p||p.forEach((function(e){delete le[e]}));var ue=u(t.useState(!1),2),ce=ue[0],fe=ue[1];t.useEffect((function(){fe(Yu())}),[]);var he=t.useRef(null),de=t.useRef(null),pe=t.useRef(null),ve=t.useRef(null),me=t.useRef(null),ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=u(t.useState(!1),2),r=n[0],i=n[1],o=t.useRef(null),a=function(){window.clearTimeout(o.current)};return t.useEffect((function(){return a}),[]),[r,function(t,n){a(),o.current=window.setTimeout((function(){i(t),n&&n()}),e)},a]}(),ye=u(ge,3),Oe=ye[0],be=ye[1],we=ye[2];t.useImperativeHandle(n,(function(){var e,t;return{focus:null===(e=ve.current)||void 0===e?void 0:e.focus,blur:null===(t=ve.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=me.current)||void 0===t?void 0:t.scrollTo(e)}}}));var ke=t.useMemo((function(){var e;if("combobox"!==w)return A;var t=null===(e=v[0])||void 0===e?void 0:e.value;return"string"===typeof t||"number"===typeof t?String(t):""}),[A,w,v]),Se="combobox"===w&&"function"===typeof x&&x()||null,xe="function"===typeof P&&P(),Ce=Fu(de,null===xe||void 0===xe||null===(r=xe.props)||void 0===r?void 0:r.ref),Pe=u(Ru(void 0,{defaultValue:Q,value:E}),2),Ee=Pe[0],Qe=Pe[1],Te=Ee,$e=!O&&g;(k||$e&&Te&&"combobox"===w)&&(Te=!1);var _e=!$e&&Te,Re=t.useCallback((function(e){var t=void 0!==e?e:!Te;k||(Qe(t),Te!==t&&(null===T||void 0===T||T(t)))}),[k,Te,Qe,T]),Ae=t.useMemo((function(){return(D||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[D]),Me=function(e,t,n){var r=!0,i=e;null===_||void 0===_||_(null);var o=n?null:function(e,t){if(!t||!t.length)return null;var n=!1,r=function e(t,r){var i=C(r),o=i[0],a=i.slice(1);if(!o)return[t];var s=t.split(o);return n=n||s.length>1,s.reduce((function(t,n){return[].concat(f(t),f(e(n,a)))}),[]).filter((function(e){return e}))}(e,t);return n?r:null}(e,D);return"combobox"!==w&&o&&(i="",null===Z||void 0===Z||Z(o),Re(!1),r=!1),N&&ke!==i&&N(i,{source:t?"typing":"effect"}),r};t.useEffect((function(){Te||ae||"combobox"===w||Me("",!1,!1)}),[Te]),t.useEffect((function(){Ee&&k&&Qe(!1),k&&be(!1)}),[k]);var Ne=u(Hu(),2),Ze=Ne[0],De=Ne[1],Le=t.useRef(!1),Ie=[];t.useEffect((function(){return function(){Ie.forEach((function(e){return clearTimeout(e)})),Ie.splice(0,Ie.length)}}),[]);var Ye,Ve=u(t.useState(null),2),Ue=Ve[0],je=Ve[1],We=u(t.useState({}),2)[1];Tu((function(){if(_e){var e,t=Math.ceil(null===(e=he.current)||void 0===e?void 0:e.offsetWidth);Ue===t||Number.isNaN(t)||je(t)}}),[_e]),xe&&(Ye=function(e){Re(e)}),function(e,n,r,i){var o=t.useRef(null);o.current={open:n,triggerOpen:r,customizedTrigger:i},t.useEffect((function(){function t(t){var n;if(null===(n=o.current)||void 0===n||!n.customizedTrigger){var r=t.target;r.shadowRoot&&t.composed&&(r=t.composedPath()[0]||r),o.current.open&&e().filter((function(e){return e})).every((function(e){return!e.contains(r)&&e!==r}))&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",t),function(){return window.removeEventListener("mousedown",t)}}),[])}((function(){var e;return[he.current,null===(e=pe.current)||void 0===e?void 0:e.getPopupElement()]}),_e,Re,!!xe);var ze,Xe,Fe=t.useMemo((function(){return tt(tt({},e),{},{notFoundContent:O,open:Te,triggerOpen:_e,id:o,showSearch:se,multiple:ae,toggleOpen:Re})}),[e,O,_e,Te,o,se,ae,Re]),Be=void 0!==I?I:S||!ae&&"combobox"!==w;Be&&(ze=t.createElement(lf,{className:Su()("".concat(a,"-arrow"),Je({},"".concat(a,"-arrow-loading"),S)),customizeIcon:Y,customizeIconProps:{loading:S,searchValue:ke,open:Te,focused:Oe,showSearch:se}}));k||!L||!v.length&&!ke||"combobox"===w&&""===ke||(Xe=t.createElement(lf,{className:"".concat(a,"-clear"),onMouseDown:function(){var e;null===b||void 0===b||b(),null===(e=ve.current)||void 0===e||e.focus(),m([],{type:"clear",values:v}),Me("",!1,!1)},customizeIcon:V},"\xd7"));var He,Ge=t.createElement(U,{ref:me}),Ke=Su()(a,s,(Je(i={},"".concat(a,"-focused"),Oe),Je(i,"".concat(a,"-multiple"),ae),Je(i,"".concat(a,"-single"),!ae),Je(i,"".concat(a,"-allow-clear"),L),Je(i,"".concat(a,"-show-arrow"),Be),Je(i,"".concat(a,"-disabled"),k),Je(i,"".concat(a,"-loading"),S),Je(i,"".concat(a,"-open"),Te),Je(i,"".concat(a,"-customize-input"),Se),Je(i,"".concat(a,"-show-search"),se),i)),et=t.createElement(Hd,{ref:pe,disabled:k,prefixCls:a,visible:_e,popupElement:Ge,containerWidth:Ue,animation:j,transitionName:W,dropdownStyle:z,dropdownClassName:X,direction:h,dropdownMatchSelectWidth:F,dropdownRender:B,dropdownAlign:q,placement:H,getPopupContainer:G,empty:g,getTriggerDOMNode:function(){return de.current},onPopupVisibleChange:Ye,onPopupMouseEnter:function(){We({})}},xe?t.cloneElement(xe,{ref:Ce}):t.createElement(kf,wu({},e,{domRef:de,prefixCls:a,inputElement:Se,ref:ve,id:o,showSearch:se,autoClearSearchValue:M,mode:w,activeDescendantId:R,tagRender:c,values:v,open:Te,onToggleOpen:Re,activeValue:$,searchValue:ke,onSearch:Me,onSearchSubmit:function(e){e&&e.trim()&&N(e,{source:"submit"})},onRemove:function(e){var t=v.filter((function(t){return t!==e}));m(t,{type:"remove",values:[e]})},tokenWithEnter:Ae})));return He=xe?et:t.createElement("div",wu({className:Ke},le,{ref:he,onMouseDown:function(e){var t,n=e.target,r=null===(t=pe.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var i=setTimeout((function(){var e,t=Ie.indexOf(i);-1!==t&&Ie.splice(t,1),we(),ce||r.contains(document.activeElement)||null===(e=ve.current)||void 0===e||e.focus()}));Ie.push(i)}for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];null===ie||void 0===ie||ie.apply(void 0,[e].concat(a))},onKeyDown:function(e){var t,n=Ze(),r=e.which;if(r===Uu.ENTER&&("combobox"!==w&&e.preventDefault(),Te||Re(!0)),De(!!ke),r===Uu.BACKSPACE&&!n&&ae&&!ke&&v.length){for(var i=f(v),o=null,a=i.length-1;a>=0;a-=1){var s=i[a];if(!s.disabled){i.splice(a,1),o=s;break}}o&&m(i,{type:"remove",values:[o]})}for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];Te&&me.current&&(t=me.current).onKeyDown.apply(t,[e].concat(u)),null===re||void 0===re||re.apply(void 0,[e].concat(u))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;Te&&me.current&&(i=me.current).onKeyUp.apply(i,[e].concat(n)),null===ne||void 0===ne||ne.apply(void 0,[e].concat(n))},onFocus:function(){be(!0),k||(ee&&!Le.current&&ee.apply(void 0,arguments),J.includes("focus")&&Re(!0)),Le.current=!0},onBlur:function(){be(!1,(function(){Le.current=!1,Re(!1)})),k||(ke&&("tags"===w?N(ke,{source:"submit"}):"multiple"===w&&N("",{source:"blur"})),te&&te.apply(void 0,arguments))}}),Oe&&!Te&&t.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(v.map((function(e){var t=e.label,n=e.value;return["number","string"].includes(d(t))?t:n})).join(", "))),et,ze,Xe),t.createElement(qu.Provider,{value:Fe},He)}));var ip=rp;function op(e,t){return hf(e).join("").toUpperCase().includes(t)}var ap=0,sp=Cu();function lp(e){var n=u(t.useState(),2),r=n[0],i=n[1];return t.useEffect((function(){i("rc_select_".concat(function(){var e;return sp?(e=ap,ap+=1):e="TEST_OR_SSR",e}()))}),[]),e||r}var up=["children","value"],cp=["children"];function fp(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ec(e).map((function(e,r){if(!t.isValidElement(e)||!e.type)return null;var i=e,o=i.type.isSelectOptGroup,a=i.key,s=i.props,l=s.children,u=qe(s,cp);return n||!o?function(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value;return tt({key:n,value:void 0!==o?o:n,children:i},qe(r,up))}(e):tt(tt({key:"__RC_SELECT_GRP__".concat(null===a?r:a,"__"),label:a},u),{},{options:fp(l)})})).filter((function(e){return e}))}function hp(e){var n=t.useRef();n.current=e;var r=t.useCallback((function(){return n.current.apply(n,arguments)}),[]);return r}var dp=function(){return null};dp.isSelectOptGroup=!0;var pp=dp,vp=function(){return null};vp.isSelectOption=!0;var mp=vp;function gp(e,t){var n=tt({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}var yp=t.forwardRef((function(e,n){var r,i=e.height,o=e.offsetY,a=e.offsetX,s=e.children,l=e.prefixCls,u=e.onInnerResize,c=e.innerProps,f=e.rtl,h=e.extra,d={},p={display:"flex",flexDirection:"column"};void 0!==o&&(d={height:i,position:"relative",overflow:"hidden"},p=tt(tt({},p),{},(Je(r={transform:"translateY(".concat(o,"px)")},f?"marginRight":"marginLeft",-a),Je(r,"position","absolute"),Je(r,"left",0),Je(r,"right",0),Je(r,"top",0),r)));return t.createElement("div",{style:d},t.createElement(Rc,{onResize:function(e){e.offsetHeight&&u&&u()}},t.createElement("div",wu({style:p,className:Su()(Je({},"".concat(l,"-holder-inner"),l)),ref:n},c),s,h)))}));yp.displayName="Filler";var Op=yp;function bp(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}var wp=t.forwardRef((function(e,n){var r,i=e.prefixCls,o=e.rtl,a=e.scrollOffset,s=e.scrollRange,l=e.onStartMove,c=e.onStopMove,f=e.onScroll,h=e.horizontal,d=e.spinSize,p=e.containerSize,v=u(t.useState(!1),2),m=v[0],g=v[1],y=u(t.useState(null),2),O=y[0],b=y[1],w=u(t.useState(null),2),k=w[0],S=w[1],x=!o,C=t.useRef(),P=t.useRef(),E=u(t.useState(!1),2),Q=E[0],T=E[1],$=t.useRef(),_=function(){clearTimeout($.current),T(!0),$.current=setTimeout((function(){T(!1)}),3e3)},R=s-p||0,A=p-d||0,M=R>0,N=t.useMemo((function(){return 0===a||0===R?0:a/R*A}),[a,R,A]),Z=t.useRef({top:N,dragging:m,pageY:O,startTop:k});Z.current={top:N,dragging:m,pageY:O,startTop:k};var D=function(e){g(!0),b(bp(e,h)),S(Z.current.top),l(),e.stopPropagation(),e.preventDefault()};t.useEffect((function(){var e=function(e){e.preventDefault()},t=C.current,n=P.current;return t.addEventListener("touchstart",e),n.addEventListener("touchstart",D),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",D)}}),[]);var L=t.useRef();L.current=R;var I=t.useRef();I.current=A,t.useEffect((function(){if(m){var e,t=function(t){var n=Z.current,r=n.dragging,i=n.pageY,o=n.startTop;if(Wc.cancel(e),r){var a=bp(t,h)-i,s=o;!x&&h?s-=a:s+=a;var l=L.current,u=I.current,c=u?s/u:0,d=Math.ceil(c*l);d=Math.max(d,0),d=Math.min(d,l),e=Wc((function(){f(d,h)}))}},n=function(){g(!1),c()};return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),Wc.cancel(e)}}}),[m]),t.useEffect((function(){_()}),[a]),t.useImperativeHandle(n,(function(){return{delayHidden:_}}));var Y="".concat(i,"-scrollbar"),V={position:"absolute",visibility:Q&&M?null:"hidden"},U={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return h?(V.height=8,V.left=0,V.right=0,V.bottom=0,U.height="100%",U.width=d,x?U.left=N:U.right=N):(V.width=8,V.top=0,V.bottom=0,x?V.right=0:V.left=0,U.width="100%",U.height=d,U.top=N),t.createElement("div",{ref:C,className:Su()(Y,(r={},Je(r,"".concat(Y,"-horizontal"),h),Je(r,"".concat(Y,"-vertical"),!h),Je(r,"".concat(Y,"-visible"),Q),r)),style:V,onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:_},t.createElement("div",{ref:P,className:Su()("".concat(Y,"-thumb"),Je({},"".concat(Y,"-thumb-moving"),m)),style:U,onMouseDown:D}))}));function kp(e){var n=e.children,r=e.setRef,i=t.useCallback((function(e){r(e)}),[]);return t.cloneElement(n,{ref:i})}var Sp=function(){function e(){h(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return m(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}();function xp(e,n,r){var i=u(t.useState(e),2),o=i[0],a=i[1],s=u(t.useState(null),2),l=s[0],c=s[1];return t.useEffect((function(){var t=function(e,t,n){var r,i,o=e.length,a=t.length;if(0===o&&0===a)return null;o<a?(r=e,i=t):(r=t,i=e);var s={__EMPTY_ITEM__:!0};function l(e){return void 0!==e?n(e):s}for(var u=null,c=1!==Math.abs(o-a),f=0;f<i.length;f+=1){var h=l(r[f]);if(h!==l(i[f])){u=f,c=c||h!==l(i[f+1]);break}}return null===u?null:{index:u,multiple:c}}(o||[],e||[],n);void 0!==(null===t||void 0===t?void 0:t.index)&&(null===r||void 0===r||r(t.index),c(e[t.index])),a(e)}),[e]),[l]}var Cp="object"===("undefined"===typeof navigator?"undefined":d(navigator))&&/Firefox/i.test(navigator.userAgent),Pp=function(e,n){var r=(0,t.useRef)(!1),i=(0,t.useRef)(null);var o=(0,t.useRef)({top:e,bottom:n});return o.current.top=e,o.current.bottom=n,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e<0&&o.current.top||e>0&&o.current.bottom;return t&&n?(clearTimeout(i.current),r.current=!1):n&&!r.current||(clearTimeout(i.current),r.current=!0,i.current=setTimeout((function(){r.current=!1}),50)),!r.current&&n}};function Ep(e,n,r,i,o){var a=(0,t.useRef)(0),s=(0,t.useRef)(null),l=(0,t.useRef)(null),u=(0,t.useRef)(!1),c=Pp(n,r);var f=(0,t.useRef)(null),h=(0,t.useRef)(null);return[function(t){if(e){Wc.cancel(h.current),h.current=Wc((function(){f.current=null}),2);var n=t.deltaX,r=t.deltaY,d=Math.abs(n),p=Math.abs(r);null===f.current&&(f.current=i&&d>p?"x":"y"),"x"===f.current?function(e){var t=e.deltaX;o(t,!0),Cp||e.preventDefault()}(t):function(e){Wc.cancel(s.current);var t=e.deltaY;a.current+=t,l.current=t,c(t)||(Cp||e.preventDefault(),s.current=Wc((function(){var e=u.current?10:1;o(a.current*e),a.current=0})))}(t)}},function(t){e&&(u.current=t.detail===l.current)}]}var Qp=14/15;var Tp=20;function $p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)*100;return isNaN(t)&&(t=0),t=Math.max(t,Tp),t=Math.min(t,e/2),Math.floor(t)}function _p(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null===n||void 0===n)return;n=n[t[r]]}return n}function Rp(e,t,n,r){if(!t.length)return n;var i,o=C(t),a=o[0],s=o.slice(1);return i=e||"number"!==typeof a?Array.isArray(e)?f(e):tt({},e):[],r&&void 0===n&&1===s.length?delete i[a][s[0]]:i[a]=Rp(i[a],s,n,r),i}function Ap(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!_p(e,t.slice(0,-1))?e:Rp(e,t,n,r)}function Mp(e){return Array.isArray(e)?[]:{}}var Np="undefined"===typeof Reflect?Object.keys:Reflect.ownKeys;function Zp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Mp(t[0]);return t.forEach((function(e){!function t(n,i){var o,a=new Set(i),s=_p(e,n),l=Array.isArray(s);if(l||"object"===d(o=s)&&null!==o&&Object.getPrototypeOf(o)===Object.prototype){if(!a.has(s)){a.add(s);var u=_p(r,n);l?r=Ap(r,n,[]):u&&"object"===d(u)||(r=Ap(r,n,Mp(s))),Np(s).forEach((function(e){t([].concat(f(n),[e]),a)}))}}else r=Ap(r,n,s)}([])})),r}var Dp=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender"],Lp=[],Ip={overflowY:"auto",overflowAnchor:"none"};function Yp(e,n){var r=e.prefixCls,i=void 0===r?"rc-virtual-list":r,o=e.className,a=e.height,s=e.itemHeight,l=e.fullHeight,c=void 0===l||l,f=e.style,h=e.data,p=e.children,v=e.itemKey,m=e.virtual,g=e.direction,y=e.scrollWidth,O=e.component,b=void 0===O?"div":O,w=e.onScroll,k=e.onVirtualScroll,S=e.onVisibleChange,x=e.innerProps,C=e.extraRender,P=qe(e,Dp),E=!(!1===m||!a||!s),Q=E&&h&&s*h.length>a,T="rtl"===g,$=Su()(i,Je({},"".concat(i,"-rtl"),T),o),_=h||Lp,R=(0,t.useRef)(),A=(0,t.useRef)(),M=u((0,t.useState)(0),2),N=M[0],Z=M[1],D=u((0,t.useState)(0),2),L=D[0],I=D[1],Y=u((0,t.useState)(!1),2),V=Y[0],U=Y[1],j=function(){U(!0)},W=function(){U(!1)},z=t.useCallback((function(e){return"function"===typeof v?v(e):null===e||void 0===e?void 0:e[v]}),[v]),X={getKey:z};function F(e){Z((function(t){var n=function(e){var t=e;Number.isNaN(me.current)||(t=Math.min(t,me.current));return t=Math.max(t,0),t}("function"===typeof e?e(t):e);return R.current.scrollTop=n,n}))}var B=(0,t.useRef)({start:0,end:_.length}),q=(0,t.useRef)(),H=u(xp(_,z),1)[0];q.current=H;var G=function(e,n,r){var i=u(t.useState(0),2),o=i[0],a=i[1],s=(0,t.useRef)(new Map),l=(0,t.useRef)(new Sp),c=(0,t.useRef)();function f(){Wc.cancel(c.current)}function h(){f(),c.current=Wc((function(){s.current.forEach((function(e,t){if(e&&e.offsetParent){var n=tc(e),r=n.offsetHeight;l.current.get(t)!==r&&l.current.set(t,n.offsetHeight)}})),a((function(e){return e+1}))}))}return(0,t.useEffect)((function(){return f}),[]),[function(t,i){var o=e(t),a=s.current.get(o);i?(s.current.set(o,i),h()):s.current.delete(o),!a!==!i&&(i?null===n||void 0===n||n(t):null===r||void 0===r||r(t))},h,l.current,o]}(z,null,null),K=u(G,4),J=K[0],ee=K[1],te=K[2],ne=K[3],re=t.useMemo((function(){if(!E)return{scrollHeight:void 0,start:0,end:_.length-1,offset:void 0};var e;if(!Q)return{scrollHeight:(null===(e=A.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:_.length-1,offset:void 0};for(var t,n,r,i=0,o=_.length,l=0;l<o;l+=1){var u=_[l],c=z(u),f=te.get(c),h=i+(void 0===f?s:f);h>=N&&void 0===t&&(t=l,n=i),h>N+a&&void 0===r&&(r=l),i=h}return void 0===t&&(t=0,n=0,r=Math.ceil(a/s)),void 0===r&&(r=_.length-1),{scrollHeight:i,start:t,end:r=Math.min(r+1,_.length-1),offset:n}}),[Q,E,N,_,ne,a]),ie=re.scrollHeight,oe=re.start,ae=re.end,se=re.offset;B.current.start=oe,B.current.end=ae;var le=u(t.useState({width:0,height:a}),2),ue=le[0],ce=le[1],fe=(0,t.useRef)(),he=(0,t.useRef)(),de=t.useMemo((function(){return $p(ue.width,y)}),[ue.width,y]),pe=t.useMemo((function(){return $p(ue.height,ie)}),[ue.height,ie]),ve=ie-a,me=(0,t.useRef)(ve);me.current=ve;var ge=N<=0,ye=N>=ve,Oe=Pp(ge,ye),be=function(){return{x:T?-L:L,y:N}},we=(0,t.useRef)(be()),ke=xu((function(){if(k){var e=be();we.current.x===e.x&&we.current.y===e.y||(k(e),we.current=e)}}));function Se(e,t){var n=e;t?((0,nt.flushSync)((function(){I(n)})),ke()):F(n)}var xe=function(e){var t=e,n=y-ue.width;return t=Math.max(t,0),t=Math.min(t,n)},Ce=xu((function(e,t){t?((0,nt.flushSync)((function(){I((function(t){return xe(t+(T?-e:e))}))})),ke()):F((function(t){return t+e}))})),Pe=u(Ep(E,ge,ye,!!y,Ce),2),Ee=Pe[0],Qe=Pe[1];!function(e,n,r){var i,o=(0,t.useRef)(!1),a=(0,t.useRef)(0),s=(0,t.useRef)(null),l=(0,t.useRef)(null),u=function(e){if(o.current){var t=Math.ceil(e.touches[0].pageY),n=a.current-t;a.current=t,r(n)&&e.preventDefault(),clearInterval(l.current),l.current=setInterval((function(){(!r(n*=Qp,!0)||Math.abs(n)<=.1)&&clearInterval(l.current)}),16)}},c=function(){o.current=!1,i()},f=function(e){i(),1!==e.touches.length||o.current||(o.current=!0,a.current=Math.ceil(e.touches[0].pageY),s.current=e.target,s.current.addEventListener("touchmove",u),s.current.addEventListener("touchend",c))};i=function(){s.current&&(s.current.removeEventListener("touchmove",u),s.current.removeEventListener("touchend",c))},Tu((function(){return e&&n.current.addEventListener("touchstart",f),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchstart",f),i(),clearInterval(l.current)}}),[e])}(E,R,(function(e,t){return!Oe(e,t)&&(Ee({preventDefault:function(){},deltaY:e}),!0)})),Tu((function(){function e(e){E&&e.preventDefault()}var t=R.current;return t.addEventListener("wheel",Ee),t.addEventListener("DOMMouseScroll",Qe),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",Ee),t.removeEventListener("DOMMouseScroll",Qe),t.removeEventListener("MozMousePixelScroll",e)}}),[E]);var Te=function(){var e,t;null===(e=fe.current)||void 0===e||e.delayHidden(),null===(t=he.current)||void 0===t||t.delayHidden()},$e=function(e,n,r,i,o,a,s,l){var u=t.useRef();return function(t){if(null!==t&&void 0!==t){if(Wc.cancel(u.current),"number"===typeof t)s(t);else if(t&&"object"===d(t)){var c,f=t.align;c="index"in t?t.index:n.findIndex((function(e){return o(e)===t.key}));var h=t.offset,p=void 0===h?0:h;!function t(l,h){if(!(l<0)&&e.current){var d=e.current.clientHeight,v=!1,m=h;if(d){for(var g=h||f,y=0,O=0,b=0,w=Math.min(n.length,c),k=0;k<=w;k+=1){var S=o(n[k]);O=y;var x=r.get(S);y=b=O+(void 0===x?i:x),k===c&&void 0===x&&(v=!0)}var C=null;switch(g){case"top":C=O-p;break;case"bottom":C=b-d+p;break;default:var P=e.current.scrollTop;O<P?m="top":b>P+d&&(m="bottom")}null!==C&&C!==e.current.scrollTop&&s(C)}u.current=Wc((function(){v&&a(),t(l-1,m)}),2)}}(3)}}else l()}}(R,_,te,s,z,ee,F,Te);t.useImperativeHandle(n,(function(){return{getScrollInfo:be,scrollTo:function(e){var t;(t=e)&&"object"===d(t)&&("left"in t||"top"in t)?(void 0!==e.left&&I(xe(e.left)),$e(e.top)):$e(e)}}})),Tu((function(){if(S){var e=_.slice(oe,ae+1);S(e,_)}}),[oe,ae,_]);var _e=function(e,n,r,i){var o=u(t.useMemo((function(){return[new Map,[]]}),[e,r.id,i]),2),a=o[0],s=o[1];return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,l=a.get(t),u=a.get(o);if(void 0===l||void 0===u)for(var c=e.length,f=s.length;f<c;f+=1){var h,d=e[f],p=n(d);a.set(p,f);var v=null!==(h=r.get(p))&&void 0!==h?h:i;if(s[f]=(s[f-1]||0)+v,p===t&&(l=f),p===o&&(u=f),void 0!==l&&void 0!==u)break}return{top:s[l-1]||0,bottom:s[u]}}}(_,z,te,s),Re=null===C||void 0===C?void 0:C({start:oe,end:ae,virtual:Q,offsetX:L,offsetY:se,rtl:T,getSize:_e}),Ae=function(e,n,r,i,o,a,s){var l=s.getKey;return e.slice(n,r+1).map((function(e,r){var s=a(e,n+r,{style:{width:i}}),u=l(e);return t.createElement(kp,{key:u,setRef:function(t){return o(e,t)}},s)}))}(_,oe,ae,y,J,p,X),Me=null;a&&(Me=tt(Je({},c?"height":"maxHeight",a),Ip),E&&(Me.overflowY="hidden",y&&(Me.overflowX="hidden"),V&&(Me.pointerEvents="none")));var Ne={};return T&&(Ne.dir="rtl"),t.createElement("div",wu({style:tt(tt({},f),{},{position:"relative"}),className:$},Ne,P),t.createElement(Rc,{onResize:function(e){ce(e)}},t.createElement(b,{className:"".concat(i,"-holder"),style:Me,ref:R,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==N&&F(t),null===w||void 0===w||w(e),ke()},onMouseEnter:Te},t.createElement(Op,{prefixCls:i,height:ie,offsetX:L,offsetY:se,scrollWidth:y,onInnerResize:ee,ref:A,innerProps:x,rtl:T,extra:Re},Ae))),Q&&ie>a&&t.createElement(wp,{ref:fe,prefixCls:i,scrollOffset:N,scrollRange:ie,rtl:T,onScroll:Se,onStartMove:j,onStopMove:W,spinSize:pe,containerSize:ue.height}),Q&&y&&t.createElement(wp,{ref:he,prefixCls:i,scrollOffset:L,scrollRange:y,rtl:T,onScroll:Se,onStartMove:j,onStopMove:W,spinSize:de,containerSize:ue.width,horizontal:!0}))}var Vp=t.forwardRef(Yp);Vp.displayName="List";var Up=Vp;var jp=t.createContext(null),Wp=["disabled","title","children","style","className"];function zp(e){return"string"===typeof e||"number"===typeof e}var Xp=function(e,n){var r=t.useContext(qu),i=r.prefixCls,o=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,h=r.toggleOpen,d=r.notFoundContent,p=r.onPopupScroll,v=t.useContext(jp),m=v.flattenOptions,g=v.onActiveValue,y=v.defaultActiveFirstOption,O=v.onSelect,b=v.menuItemSelectedIcon,w=v.rawValues,k=v.fieldNames,S=v.virtual,x=v.listHeight,C=v.listItemHeight,P="".concat(i,"-item"),E=Wu((function(){return m}),[a,m],(function(e,t){return t[0]&&e[1]!==t[1]})),Q=t.useRef(null),T=function(e){e.preventDefault()},$=function(e){Q.current&&Q.current.scrollTo("number"===typeof e?{index:e}:e)},_=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=E.length,r=0;r<n;r+=1){var i=(e+r*t+n)%n,o=E[i],a=o.group,s=o.data;if(!a&&!s.disabled)return i}return-1},R=u(t.useState((function(){return _(0)})),2),A=R[0],M=R[1],N=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];M(e);var n={source:t?"keyboard":"mouse"},r=E[e];r?g(r.value,e,n):g(null,-1,n)};(0,t.useEffect)((function(){N(!1!==y?_(0):-1)}),[E.length,c]);var Z=t.useCallback((function(e){return w.has(e)&&"combobox"!==l}),[l,f(w).toString(),w.size]);(0,t.useEffect)((function(){var e,t=setTimeout((function(){if(!s&&a&&1===w.size){var e=Array.from(w)[0],t=E.findIndex((function(t){return t.data.value===e}));-1!==t&&(N(t),$(t))}}));a&&(null===(e=Q.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[a,c]);var D=function(e){void 0!==e&&O(e,{selected:!w.has(e)}),s||h(!1)};if(t.useImperativeHandle(n,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case Uu.N:case Uu.P:case Uu.UP:case Uu.DOWN:var r=0;if(t===Uu.UP?r=-1:t===Uu.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===Uu.N?r=1:t===Uu.P&&(r=-1)),0!==r){var i=_(A+r,r);$(i),N(i,!0)}break;case Uu.ENTER:var o=E[A];o&&!o.data.disabled?D(o.value):D(void 0),a&&e.preventDefault();break;case Uu.ESC:h(!1),a&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){$(e)}}})),0===E.length)return t.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(P,"-empty"),onMouseDown:T},d);var L=Object.keys(k).map((function(e){return k[e]})),I=function(e){return e.label},Y=function(e){var n=E[e];if(!n)return null;var r=n.data||{},i=r.value,a=n.group,s=Ju(r,!0),l=I(n);return n?t.createElement("div",wu({"aria-label":"string"!==typeof l||a?null:l},s,{key:e,role:a?"presentation":"option",id:"".concat(o,"_list_").concat(e),"aria-selected":Z(i)}),i):null};return t.createElement(t.Fragment,null,t.createElement("div",{role:"listbox",id:"".concat(o,"_list"),style:{height:0,width:0,overflow:"hidden"}},Y(A-1),Y(A),Y(A+1)),t.createElement(Up,{itemKey:"key",ref:Q,data:E,height:x,itemHeight:C,fullHeight:!1,onMouseDown:T,onScroll:p,virtual:S},(function(e,n){var r,i=e.group,o=e.groupOption,a=e.data,s=e.label,l=e.value,u=a.key;if(i){var c,f=null!==(c=a.title)&&void 0!==c?c:zp(s)?s.toString():void 0;return t.createElement("div",{className:Su()(P,"".concat(P,"-group")),title:f},void 0!==s?s:u)}var h=a.disabled,d=a.title,p=(a.children,a.style),v=a.className,m=gp(qe(a,Wp),L),g=Z(l),y="".concat(P,"-option"),O=Su()(P,y,v,(Je(r={},"".concat(y,"-grouped"),o),Je(r,"".concat(y,"-active"),A===n&&!h),Je(r,"".concat(y,"-disabled"),h),Je(r,"".concat(y,"-selected"),g),r)),w=I(e),k=!b||"function"===typeof b||g,S="number"===typeof w?w:w||l,x=zp(S)?S.toString():void 0;return void 0!==d&&(x=d),t.createElement("div",wu({},Ju(m),{"aria-selected":g,className:O,title:x,onMouseMove:function(){A===n||h||N(n)},onClick:function(){h||D(l)},style:p}),t.createElement("div",{className:"".concat(y,"-content")},S),t.isValidElement(b)||g,k&&t.createElement(lf,{className:"".concat(P,"-option-state"),customizeIcon:b,customizeIconProps:{isSelected:g}},g?"\u2713":null))})))},Fp=t.forwardRef(Xp);Fp.displayName="OptionList";var Bp=Fp;var qp=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Hp=["inputValue"];var Gp=t.forwardRef((function(e,n){var r=e.id,i=e.mode,o=e.prefixCls,a=void 0===o?"rc-select":o,s=e.backfill,l=e.fieldNames,c=e.inputValue,h=e.searchValue,p=e.onSearch,v=e.autoClearSearchValue,m=void 0===v||v,g=e.onSelect,y=e.onDeselect,O=e.dropdownMatchSelectWidth,b=void 0===O||O,w=e.filterOption,k=e.filterSort,S=e.optionFilterProp,x=e.optionLabelProp,C=e.options,P=e.children,E=e.defaultActiveFirstOption,Q=e.menuItemSelectedIcon,T=e.virtual,$=e.listHeight,_=void 0===$?200:$,R=e.listItemHeight,A=void 0===R?20:R,M=e.value,N=e.defaultValue,Z=e.labelInValue,D=e.onChange,L=qe(e,qp),I=lp(r),Y=np(i),V=!(C||!P),U=t.useMemo((function(){return(void 0!==w||"combobox"!==i)&&w}),[w,i]),j=t.useMemo((function(){return Kd(l,V)}),[JSON.stringify(l),V]),W=Ru("",{value:void 0!==h?h:c,postState:function(e){return e||""}}),z=u(W,2),X=z[0],F=z[1],B=function(e,n,r,i,o){return t.useMemo((function(){var t=e;!e&&(t=fp(n));var a=new Map,s=new Map,l=function(e,t,n){n&&"string"===typeof n&&e.set(t[n],t)};return function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=0;u<t.length;u+=1){var c=t[u];!c[r.options]||n?(a.set(c[r.value],c),l(s,c,r.label),l(s,c,i),l(s,c,o)):e(c[r.options],!0)}}(t),{options:t,valueOptions:a,labelOptions:s}}),[e,n,r,i,o])}(C,P,j,S,x),q=B.valueOptions,H=B.labelOptions,G=B.options,K=t.useCallback((function(e){return hf(e).map((function(e){var t,n,r,i,o,a;(function(e){return!e||"object"!==d(e)})(e)?t=e:(r=e.key,n=e.label,t=null!==(a=e.value)&&void 0!==a?a:r);var s,l=q.get(t);l&&(void 0===n&&(n=null===l||void 0===l?void 0:l[x||j.label]),void 0===r&&(r=null!==(s=null===l||void 0===l?void 0:l.key)&&void 0!==s?s:t),i=null===l||void 0===l?void 0:l.disabled,o=null===l||void 0===l?void 0:l.title);return{label:n,value:t,key:r,disabled:i,title:o}}))}),[j,x,q]),J=u(Ru(N,{value:M}),2),ee=J[0],te=J[1],ne=function(e,n){var r=t.useRef({values:new Map,options:new Map});return[t.useMemo((function(){var t=r.current,i=t.values,o=t.options,a=e.map((function(e){var t;return void 0===e.label?tt(tt({},e),{},{label:null===(t=i.get(e.value))||void 0===t?void 0:t.label}):e})),s=new Map,l=new Map;return a.forEach((function(e){s.set(e.value,e),l.set(e.value,n.get(e.value)||o.get(e.value))})),r.current.values=s,r.current.options=l,a}),[e,n]),t.useCallback((function(e){return n.get(e)||r.current.options.get(e)}),[n])]}(t.useMemo((function(){var e,t=K(ee);return"combobox"!==i||null!==(e=t[0])&&void 0!==e&&e.value?t:[]}),[ee,K,i]),q),re=u(ne,2),ie=re[0],oe=re[1],ae=t.useMemo((function(){if(!i&&1===ie.length){var e=ie[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return ie.map((function(e){var t;return tt(tt({},e),{},{label:null!==(t=e.label)&&void 0!==t?t:e.value})}))}),[i,ie]),se=t.useMemo((function(){return new Set(ie.map((function(e){return e.value})))}),[ie]);t.useEffect((function(){if("combobox"===i){var e,t=null===(e=ie[0])||void 0===e?void 0:e.value;F(function(e){return void 0!==e&&null!==e}(t)?String(t):"")}}),[ie]);var le=hp((function(e,t){var n,r=null!==t&&void 0!==t?t:e;return Je(n={},j.value,e),Je(n,j.label,r),n})),ue=function(e,n,r,i,o){return t.useMemo((function(){if(!r||!1===i)return e;var t=n.options,a=n.label,s=n.value,l=[],u="function"===typeof i,c=r.toUpperCase(),f=u?i:function(e,n){return o?op(n[o],c):n[t]?op(n["children"!==a?a:"label"],c):op(n[s],c)},h=u?function(e){return Jd(e)}:function(e){return e};return e.forEach((function(e){if(e[t])if(f(r,h(e)))l.push(e);else{var n=e[t].filter((function(e){return f(r,h(e))}));n.length&&l.push(tt(tt({},e),{},Je({},t,n)))}else f(r,h(e))&&l.push(e)})),l}),[e,i,o,r,n])}(t.useMemo((function(){if("tags"!==i)return G;var e=f(G);return f(ie).sort((function(e,t){return e.value<t.value?-1:1})).forEach((function(t){var n=t.value;(function(e){return q.has(e)})(n)||e.push(le(n,t.label))})),e}),[le,G,q,ie,i]),j,X,U,S),ce=t.useMemo((function(){return"tags"!==i||!X||ue.some((function(e){return e[S||"value"]===X}))?ue:[le(X)].concat(f(ue))}),[le,S,i,ue,X]),fe=t.useMemo((function(){return k?f(ce).sort((function(e,t){return k(e,t)})):ce}),[ce,k]),he=t.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=Kd(n,!1),a=o.label,s=o.value,l=o.options;return function e(t,n){t.forEach((function(t){var o=t[a];if(n||!(l in t)){var u=t[s];i.push({key:Gd(t,i.length),groupOption:n,data:t,label:o,value:u})}else{var c=o;void 0===c&&r&&(c=t.label),i.push({key:Gd(t,i.length),group:!0,data:t,label:c}),e(t[l],!0)}}))}(e,!1),i}(fe,{fieldNames:j,childrenAsData:V})}),[fe,j,V]),de=function(e){var t=K(e);if(te(t),D&&(t.length!==ie.length||t.some((function(e,t){var n;return(null===(n=ie[t])||void 0===n?void 0:n.value)!==(null===e||void 0===e?void 0:e.value)})))){var n=Z?t:t.map((function(e){return e.value})),r=t.map((function(e){return Jd(oe(e.value))}));D(Y?n:n[0],Y?r:r[0])}},pe=u(t.useState(null),2),ve=pe[0],me=pe[1],ge=u(t.useState(0),2),ye=ge[0],Oe=ge[1],be=void 0!==E?E:"combobox"!==i,we=t.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,r=void 0===n?"keyboard":n;Oe(t),s&&"combobox"===i&&null!==e&&"keyboard"===r&&me(String(e))}),[s,i]),ke=function(e,t,n){var r=function(){var t,n=oe(e);return[Z?{label:null===n||void 0===n?void 0:n[j.label],value:e,key:null!==(t=null===n||void 0===n?void 0:n.key)&&void 0!==t?t:e}:e,Jd(n)]};if(t&&g){var i=u(r(),2),o=i[0],a=i[1];g(o,a)}else if(!t&&y&&"clear"!==n){var s=u(r(),2),l=s[0],c=s[1];y(l,c)}},Se=hp((function(e,t){var n,r=!Y||t.selected;n=r?Y?[].concat(f(ie),[e]):[e]:ie.filter((function(t){return t.value!==e})),de(n),ke(e,r),"combobox"===i?me(""):np&&!m||(F(""),me(""))})),xe=t.useMemo((function(){var e=!1!==T&&!1!==b;return tt(tt({},B),{},{flattenOptions:he,onActiveValue:we,defaultActiveFirstOption:be,onSelect:Se,menuItemSelectedIcon:Q,rawValues:se,fieldNames:j,virtual:e,listHeight:_,listItemHeight:A,childrenAsData:V})}),[B,he,we,be,Se,Q,se,j,T,b,_,A,V]);return t.createElement(jp.Provider,{value:xe},t.createElement(ip,wu({},L,{id:I,prefixCls:a,ref:n,omitDomProps:Hp,mode:i,displayValues:ae,onDisplayValuesChange:function(e,t){de(e);var n=t.type,r=t.values;"remove"!==n&&"clear"!==n||r.forEach((function(e){ke(e.value,!1,n)}))},searchValue:X,onSearch:function(e,t){if(F(e),me(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===i&&de(e),null===p||void 0===p||p(e));else{var n=(e||"").trim();if(n){var r=Array.from(new Set([].concat(f(se),[n])));de(r),ke(n,!0),F("")}}},autoClearSearchValue:m,onSearchSplit:function(e){var t=e;"tags"!==i&&(t=e.map((function(e){var t=H.get(e);return null===t||void 0===t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat(f(se),f(t))));de(n),n.forEach((function(e){ke(e,!0)}))},dropdownMatchSelectWidth:b,OptionList:Bp,emptyOptions:!he.length,activeValue:ve,activeDescendantId:"".concat(I,"_list_").concat(ye)})))}));var Kp=Gp;Kp.Option=mp,Kp.OptGroup=pp;var Jp=Kp,ev=t.createContext({getPrefixCls:function(e,t){return t||(e?"ant-".concat(e):"ant")}}),tv=ev.Consumer;var nv=(0,t.createContext)(void 0),rv={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},iv={lang:wu({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),timePickerLocale:wu({},rv)},ov="${label} is not a valid ${type}",av={locale:"en",Pagination:{items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},DatePicker:iv,TimePicker:rv,Calendar:iv,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ov,method:ov,array:ov,object:ov,number:ov,date:ov,boolean:ov,integer:ov,float:ov,regexp:ov,email:ov,url:ov,hex:ov},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}},sv=function(e){var n=e.componentName,r=void 0===n?"global":n,i=e.defaultLocale,o=e.children,a=t.useContext(nv),s=t.useMemo((function(){var e,t=i||av[r],n=null!==(e=null===a||void 0===a?void 0:a[r])&&void 0!==e?e:{};return wu(wu({},t instanceof Function?t():t),n||{})}),[r,i,a]);return o(s,t.useMemo((function(){var e=a&&a.locale;return a&&a.exist&&!e?av.locale:e}),[a]),a)},lv=function(){var e=(0,t.useContext(ev).getPrefixCls)("empty-img-default");return t.createElement("svg",{className:e,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{fill:"none",fillRule:"evenodd"},t.createElement("g",{transform:"translate(24 31.67)"},t.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),t.createElement("path",{className:"".concat(e,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),t.createElement("path",{className:"".concat(e,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),t.createElement("path",{className:"".concat(e,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),t.createElement("path",{className:"".concat(e,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),t.createElement("path",{className:"".concat(e,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),t.createElement("g",{className:"".concat(e,"-g"),transform:"translate(149.65 15.383)"},t.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),t.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},uv=function(){var e=(0,t.useContext(ev).getPrefixCls)("empty-img-simple");return t.createElement("svg",{className:e,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},t.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),t.createElement("g",{className:"".concat(e,"-g"),fillRule:"nonzero"},t.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),t.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(e,"-path")}))))},cv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},fv=t.createElement(lv,null),hv=t.createElement(uv,null),dv=function(e){var n=e.className,r=e.prefixCls,i=e.image,o=void 0===i?fv:i,a=e.description,s=e.children,l=e.imageStyle,u=cv(e,["className","prefixCls","image","description","children","imageStyle"]),c=t.useContext(ev),f=c.getPrefixCls,h=c.direction;return t.createElement(sv,{componentName:"Empty"},(function(e){var i,c=f("empty",r),d="undefined"!==typeof a?a:e.description,p="string"===typeof d?d:"empty",v=null;return v="string"===typeof o?t.createElement("img",{alt:p,src:o}):o,t.createElement("div",wu({className:Su()(c,(i={},Je(i,"".concat(c,"-normal"),o===hv),Je(i,"".concat(c,"-rtl"),"rtl"===h),i),n)},u),t.createElement("div",{className:"".concat(c,"-image"),style:l},v),d&&t.createElement("div",{className:"".concat(c,"-description")},d),s&&t.createElement("div",{className:"".concat(c,"-footer")},s))}))};dv.PRESENTED_IMAGE_DEFAULT=fv,dv.PRESENTED_IMAGE_SIMPLE=hv;var pv=dv,vv=function(e){return t.createElement(tv,null,(function(n){var r=(0,n.getPrefixCls)("empty");switch(e){case"Table":case"List":return t.createElement(pv,{image:pv.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return t.createElement(pv,{image:pv.PRESENTED_IMAGE_SIMPLE,className:"".concat(r,"-small")});default:return t.createElement(pv,null)}}))},mv=t.createContext(!1),gv=mv,yv=t.createContext(void 0),Ov=yv,bv="RC_FORM_INTERNAL_HOOKS",wv=function(){Iu(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},kv=t.createContext({getFieldValue:wv,getFieldsValue:wv,getFieldError:wv,getFieldWarning:wv,getFieldsError:wv,isFieldsTouched:wv,isFieldTouched:wv,isFieldValidating:wv,isFieldsValidating:wv,resetFields:wv,setFields:wv,setFieldValue:wv,setFieldsValue:wv,validateFields:wv,submit:wv,getInternalHooks:function(){return wv(),{dispatch:wv,initEntityValue:wv,registerField:wv,useSubscribe:wv,setInitialValues:wv,destroyForm:wv,setCallbacks:wv,registerWatch:wv,getFields:wv,setValidateMessages:wv,setPreserve:wv,getInitialValue:wv}}}),Sv=t.createContext(null);function xv(e){return void 0===e||null===e?[]:Array.isArray(e)?e:[e]}function Cv(){return Cv=Object.assign?Object.assign.bind():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},Cv.apply(this,arguments)}function Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pv(e)}function Ev(e,t){return Ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ev(e,t)}function Qv(e,t,n){return Qv=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}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Ev(i,n.prototype),i},Qv.apply(null,arguments)}function Tv(e){var t="function"===typeof Map?new Map:void 0;return Tv=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Qv(e,arguments,Pv(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ev(n,e)},Tv(e)}var $v=/%[sdj%]/g;function _v(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function Rv(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o=n.length;return"function"===typeof e?e.apply(null,n):"string"===typeof e?e.replace($v,(function(e){if("%%"===e)return"%";if(i>=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(t){return"[Circular]"}break;default:return e}})):e}function Av(e,t){return void 0===e||null===e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!==typeof e||e))}function Mv(e,t,n){var r=0,i=e.length;!function o(a){if(a&&a.length)n(a);else{var s=r;r+=1,s<i?t(e[s],o):n([])}}([])}var Nv=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,"Async Validation Error")||this).errors=t,r.fields=n,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ev(t,n),r}(Tv(Error));function Zv(e,t,n,r,i){if(t.first){var o=new Promise((function(t,o){var a=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n]||[])})),t}(e);Mv(a,n,(function(e){return r(e),e.length?o(new Nv(e,_v(e))):t(i)}))}));return o.catch((function(e){return e})),o}var a=!0===t.firstFields?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,u=0,c=[],f=new Promise((function(t,o){var f=function(e){if(c.push.apply(c,e),++u===l)return r(c),c.length?o(new Nv(c,_v(c))):t(i)};s.length||(r(c),t(i)),s.forEach((function(t){var r=e[t];-1!==a.indexOf(t)?Mv(r,n,f):function(e,t,n){var r=[],i=0,o=e.length;function a(e){r.push.apply(r,e||[]),++i===o&&n(r)}e.forEach((function(e){t(e,a)}))}(r,n,f)}))}));return f.catch((function(e){return e})),f}function Dv(e,t){return function(n){var r,i;return r=e.fullFields?function(e,t){for(var n=e,r=0;r<t.length;r++){if(void 0==n)return n;n=n[t[r]]}return n}(t,e.fullFields):t[n.field||e.fullField],(i=n)&&void 0!==i.message?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:"function"===typeof n?n():n,fieldValue:r,field:n.field||e.fullField}}}function Lv(e,t){if(t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];"object"===typeof r&&"object"===typeof e[n]?e[n]=Cv({},e[n],r):e[n]=r}return e}var Iv,Yv=function(e,t,n,r,i,o){!e.required||n.hasOwnProperty(e.field)&&!Av(t,o||e.type)||r.push(Rv(i.messages.required,e.fullField))},Vv=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,Uv=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,jv={integer:function(e){return jv.number(e)&&parseInt(e,10)===e},float:function(e){return jv.number(e)&&!jv.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"===typeof e},object:function(e){return"object"===typeof e&&!jv.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&e.length<=320&&!!e.match(Vv)},url:function(e){return"string"===typeof e&&e.length<=2048&&!!e.match(function(){if(Iv)return Iv;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=("\n(?:\n(?:"+r+":){7}(?:"+r+"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:"+r+":){6}(?:"+n+"|:"+r+"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:"+r+":){5}(?::"+n+"|(?::"+r+"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:"+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:"+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:"+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:"+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::"+r+"){0,5}:"+n+"|(?::"+r+"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),a=new RegExp("^"+n+"$"),s=new RegExp("^"+i+"$"),l=function(e){return e&&e.exact?o:new RegExp("(?:"+t(e)+n+t(e)+")|(?:"+t(e)+i+t(e)+")","g")};l.v4=function(e){return e&&e.exact?a:new RegExp(""+t(e)+n+t(e),"g")},l.v6=function(e){return e&&e.exact?s:new RegExp(""+t(e)+i+t(e),"g")};var u=l.v4().source,c=l.v6().source;return Iv=new RegExp("(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|"+u+"|"+c+'|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)',"i")}())},hex:function(e){return"string"===typeof e&&!!e.match(Uv)}},Wv="enum",zv={required:Yv,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||""===t)&&r.push(Rv(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&void 0===t)Yv(e,t,n,r,i);else{var o=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(o)>-1?jv[o](t)||r.push(Rv(i.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(Rv(i.messages.types[o],e.fullField,e.type))}},range:function(e,t,n,r,i){var o="number"===typeof e.len,a="number"===typeof e.min,s="number"===typeof e.max,l=t,u=null,c="number"===typeof t,f="string"===typeof t,h=Array.isArray(t);if(c?u="number":f?u="string":h&&(u="array"),!u)return!1;h&&(l=t.length),f&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),o?l!==e.len&&r.push(Rv(i.messages[u].len,e.fullField,e.len)):a&&!s&&l<e.min?r.push(Rv(i.messages[u].min,e.fullField,e.min)):s&&!a&&l>e.max?r.push(Rv(i.messages[u].max,e.fullField,e.max)):a&&s&&(l<e.min||l>e.max)&&r.push(Rv(i.messages[u].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,i){e[Wv]=Array.isArray(e[Wv])?e[Wv]:[],-1===e[Wv].indexOf(t)&&r.push(Rv(i.messages[Wv],e.fullField,e[Wv].join(", ")))},pattern:function(e,t,n,r,i){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Rv(i.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(Rv(i.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},Xv=function(e,t,n,r,i){var o=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t,o)&&!e.required)return n();zv.required(e,t,r,a,i,o),Av(t,o)||zv.type(e,t,r,a,i)}n(a)},Fv={string:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t,"string")&&!e.required)return n();zv.required(e,t,r,o,i,"string"),Av(t,"string")||(zv.type(e,t,r,o,i),zv.range(e,t,r,o,i),zv.pattern(e,t,r,o,i),!0===e.whitespace&&zv.whitespace(e,t,r,o,i))}n(o)},method:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t)&&!e.required)return n();zv.required(e,t,r,o,i),void 0!==t&&zv.type(e,t,r,o,i)}n(o)},number:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),Av(t)&&!e.required)return n();zv.required(e,t,r,o,i),void 0!==t&&(zv.type(e,t,r,o,i),zv.range(e,t,r,o,i))}n(o)},boolean:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t)&&!e.required)return n();zv.required(e,t,r,o,i),void 0!==t&&zv.type(e,t,r,o,i)}n(o)},regexp:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t)&&!e.required)return n();zv.required(e,t,r,o,i),Av(t)||zv.type(e,t,r,o,i)}n(o)},integer:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t)&&!e.required)return n();zv.required(e,t,r,o,i),void 0!==t&&(zv.type(e,t,r,o,i),zv.range(e,t,r,o,i))}n(o)},float:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t)&&!e.required)return n();zv.required(e,t,r,o,i),void 0!==t&&(zv.type(e,t,r,o,i),zv.range(e,t,r,o,i))}n(o)},array:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if((void 0===t||null===t)&&!e.required)return n();zv.required(e,t,r,o,i,"array"),void 0!==t&&null!==t&&(zv.type(e,t,r,o,i),zv.range(e,t,r,o,i))}n(o)},object:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t)&&!e.required)return n();zv.required(e,t,r,o,i),void 0!==t&&zv.type(e,t,r,o,i)}n(o)},enum:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t)&&!e.required)return n();zv.required(e,t,r,o,i),void 0!==t&&zv.enum(e,t,r,o,i)}n(o)},pattern:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t,"string")&&!e.required)return n();zv.required(e,t,r,o,i),Av(t,"string")||zv.pattern(e,t,r,o,i)}n(o)},date:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t,"date")&&!e.required)return n();var a;if(zv.required(e,t,r,o,i),!Av(t,"date"))a=t instanceof Date?t:new Date(t),zv.type(e,a,r,o,i),a&&zv.range(e,a.getTime(),r,o,i)}n(o)},url:Xv,hex:Xv,email:Xv,required:function(e,t,n,r,i){var o=[],a=Array.isArray(t)?"array":typeof t;zv.required(e,t,r,o,i,a),n(o)},any:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Av(t)&&!e.required)return n();zv.required(e,t,r,o,i)}n(o)}};function Bv(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var qv=Bv(),Hv=function(){function e(e){this.rules=null,this._messages=qv,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))},t.messages=function(e){return e&&(this._messages=Lv(Bv(),e)),this._messages},t.validate=function(t,n,r){var i=this;void 0===n&&(n={}),void 0===r&&(r=function(){});var o=t,a=n,s=r;if("function"===typeof a&&(s=a,a={}),!this.rules||0===Object.keys(this.rules).length)return s&&s(null,o),Promise.resolve(o);if(a.messages){var l=this.messages();l===qv&&(l=Bv()),Lv(l,a.messages),a.messages=l}else a.messages=this.messages();var u={};(a.keys||Object.keys(this.rules)).forEach((function(e){var n=i.rules[e],r=o[e];n.forEach((function(n){var a=n;"function"===typeof a.transform&&(o===t&&(o=Cv({},o)),r=o[e]=a.transform(r)),(a="function"===typeof a?{validator:a}:Cv({},a)).validator=i.getValidationMethod(a),a.validator&&(a.field=e,a.fullField=a.fullField||e,a.type=i.getType(a),u[e]=u[e]||[],u[e].push({rule:a,value:r,source:o,field:e}))}))}));var c={};return Zv(u,a,(function(t,n){var r,i=t.rule,s=("object"===i.type||"array"===i.type)&&("object"===typeof i.fields||"object"===typeof i.defaultField);function l(e,t){return Cv({},t,{fullField:i.fullField+"."+e,fullFields:i.fullFields?[].concat(i.fullFields,[e]):[e]})}function u(r){void 0===r&&(r=[]);var u=Array.isArray(r)?r:[r];!a.suppressWarning&&u.length&&e.warning("async-validator:",u),u.length&&void 0!==i.message&&(u=[].concat(i.message));var f=u.map(Dv(i,o));if(a.first&&f.length)return c[i.field]=1,n(f);if(s){if(i.required&&!t.value)return void 0!==i.message?f=[].concat(i.message).map(Dv(i,o)):a.error&&(f=[a.error(i,Rv(a.messages.required,i.field))]),n(f);var h={};i.defaultField&&Object.keys(t.value).map((function(e){h[e]=i.defaultField})),h=Cv({},h,t.rule.fields);var d={};Object.keys(h).forEach((function(e){var t=h[e],n=Array.isArray(t)?t:[t];d[e]=n.map(l.bind(null,e))}));var p=new e(d);p.messages(a.messages),t.rule.options&&(t.rule.options.messages=a.messages,t.rule.options.error=a.error),p.validate(t.value,t.rule.options||a,(function(e){var t=[];f&&f.length&&t.push.apply(t,f),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)}))}else n(f)}if(s=s&&(i.required||!i.required&&t.value),i.field=t.field,i.asyncValidator)r=i.asyncValidator(i,t.value,u,t.source,a);else if(i.validator){try{r=i.validator(i,t.value,u,t.source,a)}catch(f){null==console.error||console.error(f),a.suppressValidatorError||setTimeout((function(){throw f}),0),u(f.message)}!0===r?u():!1===r?u("function"===typeof i.message?i.message(i.fullField||i.field):i.message||(i.fullField||i.field)+" fails"):r instanceof Array?u(r):r instanceof Error&&u(r.message)}r&&r.then&&r.then((function(){return u()}),(function(e){return u(e)}))}),(function(e){!function(e){var t=[],n={};function r(e){var n;Array.isArray(e)?t=(n=t).concat.apply(n,e):t.push(e)}for(var i=0;i<e.length;i++)r(e[i]);t.length?(n=_v(t),s(t,n)):s(null,o)}(e)}),o)},t.getType=function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!==typeof e.validator&&e.type&&!Fv.hasOwnProperty(e.type))throw new Error(Rv("Unknown rule type %s",e.type));return e.type||"string"},t.getValidationMethod=function(e){if("function"===typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?Fv.required:Fv[this.getType(e)]||void 0},e}();Hv.register=function(e,t){if("function"!==typeof t)throw new Error("Cannot register a validator by type, validator is not a function");Fv[e]=t},Hv.warning=function(){},Hv.messages=qv,Hv.validators=Fv;var Gv="'${name}' is not a valid ${type}",Kv={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Gv,method:Gv,array:Gv,object:Gv,number:Gv,date:Gv,boolean:Gv,integer:Gv,float:Gv,regexp:Gv,email:Gv,url:Gv,hex:Gv},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Jv=Hv;function em(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}var tm="CODE_LOGIC_ERROR";function nm(e,t,n,r,i){return rm.apply(this,arguments)}function rm(){return rm=Ge(Ke().mark((function e(n,r,i,o,a){var s,l,u,c,h,d,p,v,m;return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(s=tt({},i)).ruleIndex,Jv.warning=function(){},s.validator&&(l=s.validator,s.validator=function(){try{return l.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(tm)}}),u=null,s&&"array"===s.type&&s.defaultField&&(u=s.defaultField,delete s.defaultField),c=new Jv(Je({},n,[s])),h=Zp(Kv,o.validateMessages),c.messages(h),d=[],e.prev=10,e.next=13,Promise.resolve(c.validate(Je({},n,r),tt({},o)));case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(10),e.t0.errors&&(d=e.t0.errors.map((function(e,n){var r=e.message,i=r===tm?h.default:r;return t.isValidElement(i)?t.cloneElement(i,{key:"error_".concat(n)}):i})));case 18:if(d.length||!u){e.next=23;break}return e.next=21,Promise.all(r.map((function(e,t){return nm("".concat(n,".").concat(t),e,u,o,a)})));case 21:return p=e.sent,e.abrupt("return",p.reduce((function(e,t){return[].concat(f(e),f(t))}),[]));case 23:return v=tt(tt({},i),{},{name:n,enum:(i.enum||[]).join(", ")},a),m=d.map((function(e){return"string"===typeof e?em(e,v):e})),e.abrupt("return",m);case 26:case"end":return e.stop()}}),e,null,[[10,15]])}))),rm.apply(this,arguments)}function im(e,t,n,r,i,o){var a,s=e.join("."),l=n.map((function(e,t){var n=e.validator,r=tt(tt({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var i=!1,o=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){Iu(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||r.apply(void 0,t)}))}));i=o&&"function"===typeof o.then&&"function"===typeof o.catch,Iu(i,"`callback` is deprecated. Please return a promise instead."),i&&o.then((function(){r()})).catch((function(e){r(e||" ")}))}),r})).sort((function(e,t){var n=e.warningOnly,r=e.ruleIndex,i=t.warningOnly,o=t.ruleIndex;return!!n===!!i?r-o:n?1:-1}));if(!0===i)a=new Promise(function(){var e=Ge(Ke().mark((function e(n,i){var a,u,c;return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=0;case 1:if(!(a<l.length)){e.next=12;break}return u=l[a],e.next=5,nm(s,t,u,r,o);case 5:if(!(c=e.sent).length){e.next=9;break}return i([{errors:c,rule:u}]),e.abrupt("return");case 9:a+=1,e.next=1;break;case 12:n([]);case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var u=l.map((function(e){return nm(s,t,e,r,o).then((function(t){return{errors:t,rule:e}}))}));a=(i?function(e){return am.apply(this,arguments)}(u):function(e){return om.apply(this,arguments)}(u)).then((function(e){return Promise.reject(e)}))}return a.catch((function(e){return e})),a}function om(){return(om=Ge(Ke().mark((function e(t){return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,f(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function am(){return(am=Ge(Ke().mark((function e(t){var n;return Ke().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.errors.length&&e([r]),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function sm(e){return xv(e)}function lm(e,t){var n={};return t.forEach((function(t){var r=_p(e,t);n=Ap(n,t,r)})),n}function um(e,t){return e&&e.some((function(e){return cm(e,t)}))}function cm(e,t){return!(!e||!t||e.length!==t.length)&&e.every((function(e,n){return t[n]===e}))}function fm(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===d(t.target)&&e in t.target?t.target[e]:t}function hm(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat(f(e.slice(0,n)),[i],f(e.slice(n,t)),f(e.slice(t+1,r))):o<0?[].concat(f(e.slice(0,t)),f(e.slice(t+1,n+1)),[i],f(e.slice(n+1,r))):e}var dm=["name"],pm=[];function vm(e,t,n,r,i,o){return"function"===typeof e?e(t,n,"source"in o?{source:o.source}:{}):r!==i}var mm=function(e){y(r,e);var n=k(r);function r(e){var i;(h(this,r),(i=n.call(this,e)).state={resetCount:0},i.cancelRegisterFunc=null,i.mounted=!1,i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.prevValidating=void 0,i.errors=pm,i.warnings=pm,i.cancelRegister=function(){var e=i.props,t=e.preserve,n=e.isListField,r=e.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(n,t,sm(r)),i.cancelRegisterFunc=null},i.getNamePath=function(){var e=i.props,t=e.name,n=e.fieldContext.prefixName;return void 0!==t?[].concat(f(void 0===n?[]:n),f(t)):[]},i.getRules=function(){var e=i.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"===typeof e?e(r):e}))},i.refresh=function(){i.mounted&&i.setState((function(e){return{resetCount:e.resetCount+1}}))},i.metaCache=null,i.triggerMetaEvent=function(e){var t=i.props.onMetaChange;if(t){var n=tt(tt({},i.getMeta()),{},{destroy:e});Cd(i.metaCache,n)||t(n),i.metaCache=n}else i.metaCache=null},i.onStoreChange=function(e,t,n){var r=i.props,o=r.shouldUpdate,a=r.dependencies,s=void 0===a?[]:a,l=r.onReset,u=n.store,c=i.getNamePath(),f=i.getValue(e),h=i.getValue(u),d=t&&um(t,c);switch("valueUpdate"===n.type&&"external"===n.source&&f!==h&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=pm,i.warnings=pm,i.triggerMetaEvent()),n.type){case"reset":if(!t||d)return i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=pm,i.warnings=pm,i.triggerMetaEvent(),null===l||void 0===l||l(),void i.refresh();break;case"remove":if(o)return void i.reRender();break;case"setField":if(d){var p=n.data;return"touched"in p&&(i.touched=p.touched),"validating"in p&&!("originRCField"in p)&&(i.validatePromise=p.validating?Promise.resolve([]):null),"errors"in p&&(i.errors=p.errors||pm),"warnings"in p&&(i.warnings=p.warnings||pm),i.dirty=!0,i.triggerMetaEvent(),void i.reRender()}if(o&&!c.length&&vm(o,e,u,f,h,n))return void i.reRender();break;case"dependenciesUpdate":if(s.map(sm).some((function(e){return um(n.relatedFields,e)})))return void i.reRender();break;default:if(d||(!s.length||c.length||o)&&vm(o,e,u,f,h,n))return void i.reRender()}!0===o&&i.reRender()},i.validateRules=function(e){var t=i.getNamePath(),n=i.getValue(),r=e||{},o=r.triggerName,a=r.validateOnly,s=void 0!==a&&a,l=Promise.resolve().then((function(){if(!i.mounted)return[];var r=i.props,a=r.validateFirst,s=void 0!==a&&a,u=r.messageVariables,c=i.getRules();o&&(c=c.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||xv(t).includes(o)})));var h=im(t,n,c,e,s,u);return h.catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pm;if(i.validatePromise===l){var t;i.validatePromise=null;var n=[],r=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,i=e.errors,o=void 0===i?pm:i;t?r.push.apply(r,f(o)):n.push.apply(n,f(o))})),i.errors=n,i.warnings=r,i.triggerMetaEvent(),i.reRender()}})),h}));return s||(i.validatePromise=l,i.dirty=!0,i.errors=pm,i.warnings=pm,i.triggerMetaEvent(),i.reRender()),l},i.isFieldValidating=function(){return!!i.validatePromise},i.isFieldTouched=function(){return i.touched},i.isFieldDirty=function(){return!(!i.dirty&&void 0===i.props.initialValue)||void 0!==(0,i.props.fieldContext.getInternalHooks(bv).getInitialValue)(i.getNamePath())},i.getErrors=function(){return i.errors},i.getWarnings=function(){return i.warnings},i.isListField=function(){return i.props.isListField},i.isList=function(){return i.props.isList},i.isPreserve=function(){return i.props.preserve},i.getMeta=function(){return i.prevValidating=i.isFieldValidating(),{touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:null===i.validatePromise}},i.getOnlyChild=function(e){if("function"===typeof e){var n=i.getMeta();return tt(tt({},i.getOnlyChild(e(i.getControlled(),n,i.props.fieldContext))),{},{isFunction:!0})}var r=ec(e);return 1===r.length&&t.isValidElement(r[0])?{child:r[0],isFunction:!1}:{child:r,isFunction:!1}},i.getValue=function(e){var t=i.props.fieldContext.getFieldsValue,n=i.getNamePath();return _p(e||t(!0),n)},i.getControlled=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.props,n=t.trigger,r=t.validateTrigger,o=t.getValueFromEvent,a=t.normalize,s=t.valuePropName,l=t.getValueProps,u=t.fieldContext,c=void 0!==r?r:u.validateTrigger,f=i.getNamePath(),h=u.getInternalHooks,d=u.getFieldsValue,p=h(bv).dispatch,v=i.getValue(),m=l||function(e){return Je({},s,e)},g=e[n],y=tt(tt({},e),m(v));return y[n]=function(){var e;i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e=o?o.apply(void 0,n):fm.apply(void 0,[s].concat(n)),a&&(e=a(e,v,d(!0))),p({type:"updateValue",namePath:f,value:e}),g&&g.apply(void 0,n)},xv(c||[]).forEach((function(e){var t=y[e];y[e]=function(){t&&t.apply(void 0,arguments);var n=i.props.rules;n&&n.length&&p({type:"validateField",namePath:f,triggerName:e})}})),y},e.fieldContext)&&(0,(0,e.fieldContext.getInternalHooks)(bv).initEntityValue)(w(i));return i}return m(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(bv).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,n=this.state.resetCount,r=this.props.children,i=this.getOnlyChild(r),o=i.child;return i.isFunction?e=o:t.isValidElement(o)?e=t.cloneElement(o,this.getControlled(o.props)):(Iu(!o,"`children` of Field is not validate ReactElement."),e=o),t.createElement(t.Fragment,{key:n},e)}}]),r}(t.Component);mm.contextType=kv,mm.defaultProps={trigger:"onChange",valuePropName:"value"};var gm=function(e){var n=e.name,r=qe(e,dm),i=t.useContext(kv),o=t.useContext(Sv),a=void 0!==n?sm(n):void 0,s="keep";return r.isListField||(s="_".concat((a||[]).join("_"))),t.createElement(mm,wu({key:s,name:a,isListField:!!o},r,{fieldContext:i}))},ym=function(e){var n=e.name,r=e.initialValue,i=e.children,o=e.rules,a=e.validateTrigger,s=e.isListField,l=t.useContext(kv),u=t.useContext(Sv),c=t.useRef({keys:[],id:0}).current,h=t.useMemo((function(){var e=sm(l.prefixName)||[];return[].concat(f(e),f(sm(n)))}),[l.prefixName,n]),d=t.useMemo((function(){return tt(tt({},l),{},{prefixName:h})}),[l,h]),p=t.useMemo((function(){return{getKey:function(e){var t=h.length,n=e[t];return[c.keys[n],e.slice(t+1)]}}}),[h]);if("function"!==typeof i)return Iu(!1,"Form.List only accepts function as children."),null;return t.createElement(Sv.Provider,{value:p},t.createElement(kv.Provider,{value:d},t.createElement(gm,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:o,validateTrigger:a,initialValue:r,isList:!0,isListField:null!==s&&void 0!==s?s:!!u},(function(e,t){var n=e.value,r=void 0===n?[]:n,o=e.onChange,a=l.getFieldValue,s=function(){return a(h||[])||[]},u={add:function(e,t){var n=s();t>=0&&t<=n.length?(c.keys=[].concat(f(c.keys.slice(0,t)),[c.id],f(c.keys.slice(t))),o([].concat(f(n.slice(0,t)),[e],f(n.slice(t))))):(c.keys=[].concat(f(c.keys),[c.id]),o([].concat(f(n),[e]))),c.id+=1},remove:function(e){var t=s(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(c.keys=c.keys.filter((function(e,t){return!n.has(t)})),o(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=s();e<0||e>=n.length||t<0||t>=n.length||(c.keys=hm(c.keys,e,t),o(hm(n,e,t)))}}},d=r||[];return Array.isArray(d)||(d=[]),i(d.map((function(e,t){var n=c.keys[t];return void 0===n&&(c.keys[t]=c.id,n=c.keys[t],c.id+=1),{name:t,key:n,isListField:!0}})),u,t)}))))};var Om="__@field_split__";function bm(e){return e.map((function(e){return"".concat(d(e),":").concat(e)})).join(Om)}var wm=function(){function e(){h(this,e),this.kvs=new Map}return m(e,[{key:"set",value:function(e,t){this.kvs.set(bm(e),t)}},{key:"get",value:function(e){return this.kvs.get(bm(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(bm(e))}},{key:"map",value:function(e){return f(this.kvs.entries()).map((function(t){var n=u(t,2),r=n[0],i=n[1],o=r.split(Om);return e({key:o.map((function(e){var t=u(e.match(/^([^:]*):(.*)$/),3),n=t[1],r=t[2];return"number"===n?Number(r):r})),value:i})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}(),km=wm,Sm=["name"],xm=m((function e(t){var n=this;h(this,e),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(e){return e===bv?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Iu(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(e){n.subscribable=e},this.prevWithoutPreserves=null,this.setInitialValues=function(e,t){if(n.initialValues=e||{},t){var r,i=Zp(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;i=Ap(i,n,_p(e,n))})),n.prevWithoutPreserves=null,n.updateStore(i)}},this.destroyForm=function(){var e=new km;n.getFieldEntities(!0).forEach((function(t){n.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)})),n.prevWithoutPreserves=e},this.getInitialValue=function(e){var t=_p(n.initialValues,e);return e.length?Zp(t):t},this.setCallbacks=function(e){n.callbacks=e},this.setValidateMessages=function(e){n.validateMessages=e},this.setPreserve=function(e){n.preserve=e},this.watchList=[],this.registerWatch=function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}},this.notifyWatch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach((function(n){n(t,r,e)}))}},this.timeoutId=null,this.warningUnhooked=function(){0},this.updateStore=function(e){n.store=e},this.getFieldEntities=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities},this.getFieldsMap=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new km;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t},this.getFieldEntitiesForNamePathList=function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=sm(e);return t.get(n)||{INVALIDATE_NAME_PATH:sm(e)}}))},this.getFieldsValue=function(e,t){if(n.warningUnhooked(),!0===e&&!t)return n.store;var r=n.getFieldEntitiesForNamePathList(Array.isArray(e)?e:null),i=[];return r.forEach((function(n){var r,o="INVALIDATE_NAME_PATH"in n?n.INVALIDATE_NAME_PATH:n.getNamePath();if(e||!(null===(r=n.isListField)||void 0===r?void 0:r.call(n)))if(t){var a="getMeta"in n?n.getMeta():null;t(a)&&i.push(o)}else i.push(o)})),lm(n.store,i.map(sm))},this.getFieldValue=function(e){n.warningUnhooked();var t=sm(e);return _p(n.store,t)},this.getFieldsError=function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:sm(e[n]),errors:[],warnings:[]}}))},this.getFieldError=function(e){n.warningUnhooked();var t=sm(e);return n.getFieldsError([t])[0].errors},this.getFieldWarning=function(e){n.warningUnhooked();var t=sm(e);return n.getFieldsError([t])[0].warnings},this.isFieldsTouched=function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i,o=t[0],a=t[1],s=!1;0===t.length?i=null:1===t.length?Array.isArray(o)?(i=o.map(sm),s=!1):(i=null,s=o):(i=o.map(sm),s=a);var l=n.getFieldEntities(!0),u=function(e){return e.isFieldTouched()};if(!i)return s?l.every(u):l.some(u);var c=new km;i.forEach((function(e){c.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();i.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&c.update(n,(function(t){return[].concat(f(t),[e])}))}))}));var h=function(e){return e.some(u)},d=c.map((function(e){return e.value}));return s?d.every(h):d.some(h)},this.isFieldTouched=function(e){return n.warningUnhooked(),n.isFieldsTouched([e])},this.isFieldsValidating=function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(sm);return t.some((function(e){var t=e.getNamePath();return um(r,t)&&e.isFieldValidating()}))},this.isFieldValidating=function(e){return n.warningUnhooked(),n.isFieldsValidating([e])},this.resetWithFieldInitialValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new km,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}}));var i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=i).push.apply(n,f(f(r).map((function(e){return e.entity}))))}))):i=r,i.forEach((function(r){if(void 0!==r.props.initialValue){var i=r.getNamePath();if(void 0!==n.getInitialValue(i))Iu(!1,"Form already set 'initialValues' with path '".concat(i.join("."),"'. Field can not overwrite it."));else{var o=t.get(i);if(o&&o.size>1)Iu(!1,"Multiple Field with path '".concat(i.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(o){var a=n.getFieldValue(i);e.skipExist&&void 0!==a||n.updateStore(Ap(n.store,i,f(o)[0].value))}}}}))},this.resetFields=function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore(Zp(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var r=e.map(sm);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore(Ap(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)},this.setFields=function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var i=e.name,o=qe(e,Sm),a=sm(i);r.push(a),"value"in o&&n.updateStore(Ap(n.store,a,o.value)),n.notifyObservers(t,[a],{type:"setField",data:e})})),n.notifyWatch(r)},this.getFields=function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=tt(tt({},e.getMeta()),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(r,"originRCField",{value:!0}),r}))},this.initEntityValue=function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===_p(n.store,r)&&n.updateStore(Ap(n.store,r,t))}},this.isMergedPreserve=function(e){var t=void 0!==e?e:n.preserve;return null===t||void 0===t||t},this.registerField=function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(i)&&(!r||o.length>1)){var a=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==a&&n.fieldEntities.every((function(e){return!cm(e.getNamePath(),t)}))){var s=n.store;n.updateStore(Ap(s,t,a,!0)),n.notifyObservers(s,[t],{type:"remove"}),n.triggerDependenciesUpdate(s,t)}}n.notifyWatch([t])}},this.dispatch=function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var i=e.namePath,o=e.triggerName;n.validateFields([i],{triggerName:o})}},this.notifyObservers=function(e,t,r){if(n.subscribable){var i=tt(tt({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,i)}))}else n.forceRootUpdate()},this.triggerDependenciesUpdate=function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat(f(r))}),r},this.updateValue=function(e,t){var r=sm(e),i=n.store;n.updateStore(Ap(n.store,r,t)),n.notifyObservers(i,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var o=n.triggerDependenciesUpdate(i,r),a=n.callbacks.onValuesChange;a&&a(lm(n.store,[r]),n.getFieldsValue());n.triggerOnFieldsChange([r].concat(f(o)))},this.setFieldsValue=function(e){n.warningUnhooked();var t=n.store;if(e){var r=Zp(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()},this.setFieldValue=function(e,t){n.setFields([{name:e,value:t}])},this.getDependencyChildrenFields=function(e){var t=new Set,r=[],i=new km;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=sm(t);i.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(i.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var i=n.getNamePath();n.isFieldDirty()&&i.length&&(r.push(i),e(i))}}))}(e),r},this.triggerOnFieldsChange=function(e,t){var r=n.callbacks.onFieldsChange;if(r){var i=n.getFields();if(t){var o=new km;t.forEach((function(e){var t=e.name,n=e.errors;o.set(t,n)})),i.forEach((function(e){e.errors=o.get(e.name)||e.errors}))}var a=i.filter((function(t){var n=t.name;return um(e,n)}));a.length&&r(a,i)}},this.validateFields=function(e,t){var r,i;n.warningUnhooked(),Array.isArray(e)||"string"===typeof e||"string"===typeof t?(r=e,i=t):i=e;var o=!!r,a=o?r.map(sm):[],s=[],l=String(Date.now()),u=new Set;n.getFieldEntities(!0).forEach((function(e){var t;if(o||a.push(e.getNamePath()),(null===(t=i)||void 0===t?void 0:t.recursive)&&o){var c=e.getNamePath();c.every((function(e,t){return r[t]===e||void 0===r[t]}))&&a.push(c)}if(e.props.rules&&e.props.rules.length){var h=e.getNamePath();if(u.add(h.join(l)),!o||um(a,h)){var d=e.validateRules(tt({validateMessages:tt(tt({},Kv),n.validateMessages)},i));s.push(d.then((function(){return{name:h,errors:[],warnings:[]}})).catch((function(e){var t,n=[],r=[];return null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,i=e.errors;t?r.push.apply(r,f(i)):n.push.apply(n,f(i))})),n.length?Promise.reject({name:h,errors:n,warnings:r}):{name:h,errors:n,warnings:r}})))}}}));var c=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(i,o){e.forEach((function(e,a){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[a]=e,n>0||(t&&o(r),i(r))}))}))})):Promise.resolve([])}(s);n.lastValidatePromise=c,c.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var h=c.then((function(){return n.lastValidatePromise===c?Promise.resolve(n.getFieldsValue(a)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(a),errorFields:t,outOfDate:n.lastValidatePromise!==c})}));h.catch((function(e){return e}));var d=a.filter((function(e){return u.has(e.join(l))}));return n.triggerOnFieldsChange(d),h},this.submit=function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(r){console.error(r)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))},this.forceRootUpdate=t}));var Cm=function(e){var n=t.useRef(),r=u(t.useState({}),2)[1];if(!n.current)if(e)n.current=e;else{var i=new xm((function(){r({})}));n.current=i.getForm()}return[n.current]},Pm=t.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Em=Pm,Qm=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],Tm=function(e,n){var r=e.name,i=e.initialValues,o=e.fields,a=e.form,s=e.preserve,l=e.children,c=e.component,h=void 0===c?"form":c,p=e.validateMessages,v=e.validateTrigger,m=void 0===v?"onChange":v,g=e.onValuesChange,y=e.onFieldsChange,O=e.onFinish,b=e.onFinishFailed,w=qe(e,Qm),k=t.useContext(Em),S=u(Cm(a),1)[0],x=S.getInternalHooks(bv),C=x.useSubscribe,P=x.setInitialValues,E=x.setCallbacks,Q=x.setValidateMessages,T=x.setPreserve,$=x.destroyForm;t.useImperativeHandle(n,(function(){return S})),t.useEffect((function(){return k.registerForm(r,S),function(){k.unregisterForm(r)}}),[k,S,r]),Q(tt(tt({},k.validateMessages),p)),E({onValuesChange:g,onFieldsChange:function(e){if(k.triggerFormChange(r,e),y){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];y.apply(void 0,[e].concat(n))}},onFinish:function(e){k.triggerFormFinish(r,e),O&&O(e)},onFinishFailed:b}),T(s);var _,R=t.useRef(null);P(i,!R.current),R.current||(R.current=!0),t.useEffect((function(){return $}),[]);var A="function"===typeof l;A?_=l(S.getFieldsValue(!0),S):_=l;C(!A);var M=t.useRef();t.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==d(e)||"object"!==d(t))return!1;var n=Object.keys(e),r=Object.keys(t);return f(new Set([].concat(n,r))).every((function(n){var r=e[n],i=t[n];return"function"===typeof r&&"function"===typeof i||r===i}))})(M.current||[],o||[])||S.setFields(o||[]),M.current=o}),[o,S]);var N=t.useMemo((function(){return tt(tt({},S),{},{validateTrigger:m})}),[S,m]),Z=t.createElement(Sv.Provider,{value:null},t.createElement(kv.Provider,{value:N},_));return!1===h?Z:t.createElement(h,wu({},w,{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),S.submit()},onReset:function(e){var t;e.preventDefault(),S.resetFields(),null===(t=w.onReset)||void 0===t||t.call(w,e)}}),Z)};function $m(e){try{return JSON.stringify(e)}catch(t){return Math.random()}}var _m=function(){};var Rm=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],o=void 0===i?[]:i,a=n[1],s=void 0===a?{}:a,l=function(e){return e&&!!e._init}(s)?{form:s}:s,c=l.form,f=u((0,t.useState)(),2),h=f[0],d=f[1],p=(0,t.useMemo)((function(){return $m(h)}),[h]),v=(0,t.useRef)(p);v.current=p;var m=(0,t.useContext)(kv),g=c||m,y=g&&g._init,O=sm(o),b=(0,t.useRef)(O);return b.current=O,_m(O),(0,t.useEffect)((function(){if(y){var e=g.getFieldsValue,t=(0,(0,g.getInternalHooks)(bv).registerWatch)((function(e,t){var n=_p(l.preserve?t:e,b.current),r=$m(n);v.current!==r&&(v.current=r,d(n))})),n=_p(l.preserve?e(!0):e(),b.current);return d(n),t}}),[y]),h},Am=t.forwardRef(Tm);Am.FormProvider=function(e){var n=e.validateMessages,r=e.onFormChange,i=e.onFormFinish,o=e.children,a=t.useContext(Pm),s=t.useRef({});return t.createElement(Pm.Provider,{value:tt(tt({},a),{},{validateMessages:tt(tt({},a.validateMessages),n),triggerFormChange:function(e,t){r&&r(e,{changedFields:t,forms:s.current}),a.triggerFormChange(e,t)},triggerFormFinish:function(e,t){i&&i(e,{values:t,forms:s.current}),a.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(s.current=tt(tt({},s.current),{},Je({},e,t))),a.registerForm(e,t)},unregisterForm:function(e){var t=tt({},s.current);delete t[e],s.current=t,a.unregisterForm(e)}})},o)},Am.Field=gm,Am.List=ym,Am.useForm=Cm,Am.useWatch=Rm;var Mm=t.createContext({}),Nm=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t},Zm=function(){return{height:0,opacity:0}},Dm=function(e){return{height:e.scrollHeight,opacity:1}},Lm=function(e,t){return!0===(null===t||void 0===t?void 0:t.deadline)||"height"===t.propertyName},Im={motionName:"ant-motion-collapse",onAppearStart:Zm,onEnterStart:Zm,onAppearActive:Dm,onEnterActive:Dm,onLeaveStart:function(e){return{height:e?e.offsetHeight:0}},onLeaveActive:Zm,onAppearEnd:Lm,onEnterEnd:Lm,onLeaveEnd:Lm,motionDeadline:500},Ym=(Nm("bottomLeft","bottomRight","topLeft","topRight"),function(e){return void 0===e||"topLeft"!==e&&"topRight"!==e?"slide-up":"slide-down"}),Vm=function(e,t,n){return void 0!==n?n:"".concat(e,"-").concat(t)},Um=Im;Nm("warning","error","");var jm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Wm=(0,t.createContext)({});function zm(e,t){(function(e){return"string"===typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function Xm(e){return e<=1?"".concat(100*Number(e),"%"):e}function Fm(e){return 1===e.length?"0"+e:String(e)}function Bm(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qm(e){return Hm(e)/255}function Hm(e){return parseInt(e,16)}var Gm={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Km(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return"string"===typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(Gm[e])e=Gm[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=ng.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=ng.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=ng.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=ng.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=ng.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=ng.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=ng.hex8.exec(e),n)return{r:Hm(n[1]),g:Hm(n[2]),b:Hm(n[3]),a:qm(n[4]),format:t?"name":"hex8"};if(n=ng.hex6.exec(e),n)return{r:Hm(n[1]),g:Hm(n[2]),b:Hm(n[3]),format:t?"name":"hex"};if(n=ng.hex4.exec(e),n)return{r:Hm(n[1]+n[1]),g:Hm(n[2]+n[2]),b:Hm(n[3]+n[3]),a:qm(n[4]+n[4]),format:t?"name":"hex8"};if(n=ng.hex3.exec(e),n)return{r:Hm(n[1]+n[1]),g:Hm(n[2]+n[2]),b:Hm(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===typeof e&&(rg(e.r)&&rg(e.g)&&rg(e.b)?(t=function(e,t,n){return{r:255*zm(e,255),g:255*zm(t,255),b:255*zm(n,255)}}(e.r,e.g,e.b),a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):rg(e.h)&&rg(e.s)&&rg(e.v)?(r=Xm(e.s),i=Xm(e.v),t=function(e,t,n){e=6*zm(e,360),t=zm(t,100),n=zm(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(e.h,r,i),a=!0,s="hsv"):rg(e.h)&&rg(e.s)&&rg(e.l)&&(r=Xm(e.s),o=Xm(e.l),t=function(e,t,n){var r,i,o;if(e=zm(e,360),t=zm(t,100),n=zm(n,100),0===t)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Bm(s,a,e+1/3),i=Bm(s,a,e),o=Bm(s,a,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Jm="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),eg="[\\s|\\(]+(".concat(Jm,")[,|\\s]+(").concat(Jm,")[,|\\s]+(").concat(Jm,")\\s*\\)?"),tg="[\\s|\\(]+(".concat(Jm,")[,|\\s]+(").concat(Jm,")[,|\\s]+(").concat(Jm,")[,|\\s]+(").concat(Jm,")\\s*\\)?"),ng={CSS_UNIT:new RegExp(Jm),rgb:new RegExp("rgb"+eg),rgba:new RegExp("rgba"+tg),hsl:new RegExp("hsl"+eg),hsla:new RegExp("hsla"+tg),hsv:new RegExp("hsv"+eg),hsva:new RegExp("hsva"+tg),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function rg(e){return Boolean(ng.CSS_UNIT.exec(String(e)))}var ig=2,og=.16,ag=.05,sg=.05,lg=.15,ug=5,cg=4,fg=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function hg(e){var t=function(e,t,n){e=zm(e,255),t=zm(t,255),n=zm(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=0===r?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:l,v:a}}(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function dg(e){var t=e.r,n=e.g,r=e.b;return"#".concat(function(e,t,n,r){var i=[Fm(Math.round(e).toString(16)),Fm(Math.round(t).toString(16)),Fm(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}(t,n,r,!1))}function pg(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-ig*t:Math.round(e.h)+ig*t:n?Math.round(e.h)+ig*t:Math.round(e.h)-ig*t)<0?r+=360:r>=360&&(r-=360),r}function vg(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-og*t:t===cg?e.s+og:e.s+ag*t)>1&&(r=1),n&&t===ug&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function mg(e,t,n){var r;return(r=n?e.v+sg*t:e.v-lg*t)>1&&(r=1),Number(r.toFixed(2))}function gg(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=Km(e),i=ug;i>0;i-=1){var o=hg(r),a=dg(Km({h:pg(o,i,!0),s:vg(o,i,!0),v:mg(o,i,!0)}));n.push(a)}n.push(dg(r));for(var s=1;s<=cg;s+=1){var l=hg(r),u=dg(Km({h:pg(l,s),s:vg(l,s),v:mg(l,s)}));n.push(u)}return"dark"===t.theme?fg.map((function(e){var r=e.index,i=e.opacity,o=dg(function(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}(Km(t.backgroundColor||"#141414"),Km(n[r]),100*i));return o})):n}var yg={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Og={},bg={};Object.keys(yg).forEach((function(e){Og[e]=gg(yg[e]),Og[e].primary=Og[e][5],bg[e]=gg(yg[e],{theme:"dark",backgroundColor:"#141414"}),bg[e].primary=bg[e][5]}));Og.red,Og.volcano,Og.gold,Og.orange,Og.yellow,Og.lime,Og.green,Og.cyan,Og.blue,Og.geekblue,Og.purple,Og.magenta,Og.grey;var wg="data-rc-order",kg="data-rc-priority",Sg="rc-util-key",xg=new Map;function Cg(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):Sg}function Pg(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Eg(e){return Array.from((xg.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function Qg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Cu())return null;var n=t.csp,r=t.prepend,i=t.priority,o=void 0===i?0:i,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),s="prependQueue"===a,l=document.createElement("style");l.setAttribute(wg,a),s&&o&&l.setAttribute(kg,"".concat(o)),null!==n&&void 0!==n&&n.nonce&&(l.nonce=null===n||void 0===n?void 0:n.nonce),l.innerHTML=e;var u=Pg(t),c=u.firstChild;if(r){if(s){var f=Eg(u).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(wg)))return!1;var t=Number(e.getAttribute(kg)||0);return o>=t}));if(f.length)return u.insertBefore(l,f[f.length-1].nextSibling),l}u.insertBefore(l,c)}else u.appendChild(l);return l}function Tg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Eg(Pg(t)).find((function(n){return n.getAttribute(Cg(t))===e}))}function $g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=xg.get(e);if(!n||!Sf(document,n)){var r=Qg("",t),i=r.parentNode;xg.set(e,i),e.removeChild(r)}}(Pg(n),n);var r=Tg(t,n);if(r){var i,o,a;if(null!==(i=n.csp)&&void 0!==i&&i.nonce&&r.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce))r.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce;return r.innerHTML!==e&&(r.innerHTML=e),r}var s=Qg(e,n);return s.setAttribute(Cg(n),t),s}var _g=n(567),Rg=n.n(_g);function Ag(e){return"object"===d(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===d(e.icon)||"function"===typeof e.icon)}function Mg(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else delete t[n],t[Rg()(n)]=r;return t}),{})}function Ng(e,n,r){return r?t.createElement(e.tag,tt(tt({key:n},Mg(e.attrs)),r),(e.children||[]).map((function(t,r){return Ng(t,"".concat(n,"-").concat(e.tag,"-").concat(r))}))):t.createElement(e.tag,tt({key:n},Mg(e.attrs)),(e.children||[]).map((function(t,r){return Ng(t,"".concat(n,"-").concat(e.tag,"-").concat(r))})))}function Zg(e){return gg(e)[0]}function Dg(e){return e?Array.isArray(e)?e:[e]:[]}var Lg=["icon","className","onClick","style","primaryColor","secondaryColor"],Ig={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var Yg=function(e){var n,r,i=e.icon,o=e.className,a=e.onClick,s=e.style,l=e.primaryColor,u=e.secondaryColor,c=qe(e,Lg),f=Ig;if(l&&(f={primaryColor:l,secondaryColor:u||Zg(l)}),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",n=(0,t.useContext)(Wm).csp;(0,t.useEffect)((function(){$g(e,"@ant-design-icons",{prepend:!0,csp:n})}),[])}(),n=Ag(i),r="icon should be icon definiton, but got ".concat(i),Iu(n,"[@ant-design/icons] ".concat(r)),!Ag(i))return null;var h=i;return h&&"function"===typeof h.icon&&(h=tt(tt({},h),{},{icon:h.icon(f.primaryColor,f.secondaryColor)})),Ng(h.icon,"svg-".concat(h.name),tt({className:o,onClick:a,style:s,"data-icon":h.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c))};Yg.displayName="IconReact",Yg.getTwoToneColors=function(){return tt({},Ig)},Yg.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;Ig.primaryColor=t,Ig.secondaryColor=n||Zg(t),Ig.calculated=!!n};var Vg=Yg;function Ug(e){var t=u(Dg(e),2),n=t[0],r=t[1];return Vg.setTwoToneColors({primaryColor:n,secondaryColor:r})}var jg=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Ug("#1890ff");var Wg=t.forwardRef((function(e,n){var r,i=e.className,o=e.icon,a=e.spin,s=e.rotate,l=e.tabIndex,c=e.onClick,f=e.twoToneColor,h=qe(e,jg),d=t.useContext(Wm),p=d.prefixCls,v=void 0===p?"anticon":p,m=d.rootClassName,g=Su()(m,v,(Je(r={},"".concat(v,"-").concat(o.name),!!o.name),Je(r,"".concat(v,"-spin"),!!a||"loading"===o.name),r),i),y=l;void 0===y&&c&&(y=-1);var O=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,b=u(Dg(f),2),w=b[0],k=b[1];return t.createElement("span",tt(tt({role:"img","aria-label":o.name},h),{},{ref:n,tabIndex:y,onClick:c,className:g}),t.createElement(Vg,{icon:o,primaryColor:w,secondaryColor:k,style:O}))}));Wg.displayName="AntdIcon",Wg.getTwoToneColor=function(){var e=Vg.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},Wg.setTwoToneColor=Ug;var zg=Wg,Xg=function(e,n){return t.createElement(zg,tt(tt({},e),{},{ref:n,icon:jm}))};Xg.displayName="CheckOutlined";var Fg=t.forwardRef(Xg),Bg={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},qg=function(e,n){return t.createElement(zg,tt(tt({},e),{},{ref:n,icon:Bg}))};qg.displayName="CloseCircleFilled";var Hg=t.forwardRef(qg),Gg={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},Kg=function(e,n){return t.createElement(zg,tt(tt({},e),{},{ref:n,icon:Gg}))};Kg.displayName="CloseOutlined";var Jg=t.forwardRef(Kg),ey={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},ty=function(e,n){return t.createElement(zg,tt(tt({},e),{},{ref:n,icon:ey}))};ty.displayName="DownOutlined";var ny=t.forwardRef(ty),ry={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},iy=function(e,n){return t.createElement(zg,tt(tt({},e),{},{ref:n,icon:ry}))};iy.displayName="LoadingOutlined";var oy=t.forwardRef(iy),ay={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},sy=function(e,n){return t.createElement(zg,tt(tt({},e),{},{ref:n,icon:ay}))};sy.displayName="SearchOutlined";var ly=t.forwardRef(sy);var uy=t.createContext(null),cy=function(e,n){var r=t.useContext(uy),i=t.useMemo((function(){var t;if(!r)return"";var i=r.compactDirection,o=r.isFirstItem,a=r.isLastItem,s="vertical"===i?"-vertical-":"-";return Su()((Je(t={},"".concat(e,"-compact").concat(s,"item"),!0),Je(t,"".concat(e,"-compact").concat(s,"first-item"),o),Je(t,"".concat(e,"-compact").concat(s,"last-item"),a),Je(t,"".concat(e,"-compact").concat(s,"item-rtl"),"rtl"===n),t))}),[e,n,r]);return{compactSize:null===r||void 0===r?void 0:r.compactSize,compactDirection:null===r||void 0===r?void 0:r.compactDirection,compactItemClassnames:i}},fy=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},hy="SECRET_COMBOBOX_MODE_DO_NOT_USE",dy=function(e,n){var r,i,o=e.prefixCls,a=e.bordered,s=void 0===a||a,l=e.className,u=e.getPopupContainer,c=e.dropdownClassName,f=e.popupClassName,h=e.listHeight,d=void 0===h?256:h,p=e.placement,v=e.listItemHeight,m=void 0===v?24:v,g=e.size,y=e.disabled,O=e.notFoundContent,b=e.status,w=e.showArrow,k=fy(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),S=t.useContext(ev),x=S.getPopupContainer,C=S.getPrefixCls,P=S.renderEmpty,E=S.direction,Q=S.virtual,T=S.dropdownMatchSelectWidth,$=t.useContext(Ov),_=C("select",o),R=C(),A=cy(_,E),M=A.compactSize,N=A.compactItemClassnames,Z=t.useMemo((function(){var e=k.mode;if("combobox"!==e)return e===hy?"combobox":e}),[k.mode]),D="multiple"===Z||"tags"===Z,L=void 0!==w?w:k.loading||!(D||"combobox"===Z),I=(0,t.useContext)(Mm),Y=I.status,V=I.hasFeedback,U=I.isFormItemInput,j=I.feedbackIcon,W=function(e,t){return t||e}(Y,b);i=void 0!==O?O:"combobox"===Z?null:(P||vv)("Select");var z=function(e){var n=e.suffixIcon,r=e.clearIcon,i=e.menuItemSelectedIcon,o=e.removeIcon,a=e.loading,s=e.multiple,l=e.hasFeedback,u=e.prefixCls,c=e.showArrow,f=e.feedbackIcon,h=null!==r&&void 0!==r?r:t.createElement(Hg,null),d=function(e){return t.createElement(t.Fragment,null,!1!==c&&e,l&&f)},p=null;if(void 0!==n)p=d(n);else if(a)p=d(t.createElement(oy,{spin:!0}));else{var v="".concat(u,"-suffix");p=function(e){var n=e.open,r=e.showSearch;return d(n&&r?t.createElement(ly,{className:v}):t.createElement(ny,{className:v}))}}return{clearIcon:h,suffixIcon:p,itemIcon:void 0!==i?i:s?t.createElement(Fg,null):null,removeIcon:void 0!==o?o:t.createElement(Jg,null)}}(wu(wu({},k),{multiple:D,hasFeedback:V,feedbackIcon:j,showArrow:L,prefixCls:_})),X=z.suffixIcon,F=z.itemIcon,B=z.removeIcon,q=z.clearIcon,H=gp(k,["suffixIcon","itemIcon"]),G=Su()(f||c,Je({},"".concat(_,"-dropdown-").concat(E),"rtl"===E)),K=M||g||$,J=t.useContext(gv),ee=null!==y&&void 0!==y?y:J,te=Su()((Je(r={},"".concat(_,"-lg"),"large"===K),Je(r,"".concat(_,"-sm"),"small"===K),Je(r,"".concat(_,"-rtl"),"rtl"===E),Je(r,"".concat(_,"-borderless"),!s),Je(r,"".concat(_,"-in-form-item"),U),r),function(e,t,n){var r;return Su()((Je(r={},"".concat(e,"-status-success"),"success"===t),Je(r,"".concat(e,"-status-warning"),"warning"===t),Je(r,"".concat(e,"-status-error"),"error"===t),Je(r,"".concat(e,"-status-validating"),"validating"===t),Je(r,"".concat(e,"-has-feedback"),n),r))}(_,W,V),N,l);return t.createElement(Jp,wu({ref:n,virtual:Q,dropdownMatchSelectWidth:T},H,{transitionName:Vm(R,Ym(p),k.transitionName),listHeight:d,listItemHeight:m,mode:Z,prefixCls:_,placement:void 0!==p?p:"rtl"===E?"bottomRight":"bottomLeft",direction:E,inputIcon:X,menuItemSelectedIcon:F,removeIcon:B,clearIcon:q,notFoundContent:i,className:te,getPopupContainer:u||x,dropdownClassName:G,showArrow:V||w,disabled:ee}))},py=t.forwardRef(dy);py.SECRET_COMBOBOX_MODE_DO_NOT_USE=hy,py.Option=mp,py.OptGroup=pp;var vy=py,my={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},gy=function(e,n){return t.createElement(zg,tt(tt({},e),{},{ref:n,icon:my}))};gy.displayName="EllipsisOutlined";var yy=t.forwardRef(gy),Oy=t.createContext(null);function by(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function wy(e){return by(t.useContext(Oy),e)}var ky=["children","locked"],Sy=t.createContext(null);function xy(e){var n=e.children,r=e.locked,i=qe(e,ky),o=t.useContext(Sy),a=Wu((function(){return function(e,t){var n=tt({},e);return Object.keys(t).forEach((function(e){var r=t[e];void 0!==r&&(n[e]=r)})),n}(o,i)}),[o,i],(function(e,t){return!r&&(e[0]!==t[0]||!Cd(e[1],t[1],!0))}));return t.createElement(Sy.Provider,{value:a},n)}var Cy=[],Py=t.createContext(null);function Ey(){return t.useContext(Py)}var Qy=t.createContext(Cy);function Ty(e){var n=t.useContext(Qy);return t.useMemo((function(){return void 0!==e?[].concat(f(n),[e]):n}),[n,e])}var $y=t.createContext(null),_y=t.createContext({});function Ry(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Pd(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&null===a&&(a=0),r&&e.disabled&&(a=null),null!==a&&(a>=0||t&&a<0)}return!1}function Ay(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=f(e.querySelectorAll("*")).filter((function(e){return Ry(e,t)}));return Ry(e,t)&&n.unshift(e),n}var My=Uu.LEFT,Ny=Uu.RIGHT,Zy=Uu.UP,Dy=Uu.DOWN,Ly=Uu.ENTER,Iy=Uu.ESC,Yy=Uu.HOME,Vy=Uu.END,Uy=[Zy,Dy,My,Ny];function jy(e,t){return Ay(e,!0).filter((function(e){return t.has(e)}))}function Wy(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var i=jy(e,t),o=i.length,a=i.findIndex((function(e){return n===e}));return r<0?-1===a?a=o-1:a-=1:r>0&&(a+=1),i[a=(a+o)%o]}function zy(e,n,r,i,o,a,s,l,u,c){var f=t.useRef(),h=t.useRef();h.current=n;var d=function(){Wc.cancel(f.current)};return t.useEffect((function(){return function(){d()}}),[]),function(t){var p=t.which;if([].concat(Uy,[Ly,Iy,Yy,Vy]).includes(p)){var v,m,g,y=function(){return v=new Set,m=new Map,g=new Map,a().forEach((function(e){var t=document.querySelector("[data-menu-id='".concat(by(i,e),"']"));t&&(v.add(t),g.set(t,e),m.set(e,t))})),v};y();var O=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(m.get(n),v),b=g.get(O),w=function(e,t,n,r){var i,o,a,s,l="prev",u="next",c="children",f="parent";if("inline"===e&&r===Ly)return{inlineTrigger:!0};var h=(Je(i={},Zy,l),Je(i,Dy,u),i),d=(Je(o={},My,n?u:l),Je(o,Ny,n?l:u),Je(o,Dy,c),Je(o,Ly,c),o),p=(Je(a={},Zy,l),Je(a,Dy,u),Je(a,Ly,c),Je(a,Iy,f),Je(a,My,n?c:f),Je(a,Ny,n?f:c),a);switch(null===(s={inline:h,horizontal:d,vertical:p,inlineSub:h,horizontalSub:p,verticalSub:p}["".concat(e).concat(t?"":"Sub")])||void 0===s?void 0:s[r]){case l:return{offset:-1,sibling:!0};case u:return{offset:1,sibling:!0};case f:return{offset:-1,sibling:!1};case c:return{offset:1,sibling:!1};default:return null}}(e,1===s(b,!0).length,r,p);if(!w&&p!==Yy&&p!==Vy)return;(Uy.includes(p)||[Yy,Vy].includes(p))&&t.preventDefault();var k=function(e){if(e){var t=e,n=e.querySelector("a");null!==n&&void 0!==n&&n.getAttribute("href")&&(t=n);var r=g.get(e);l(r),d(),f.current=Wc((function(){h.current===r&&t.focus()}))}};if([Yy,Vy].includes(p)||w.sibling||!O){var S,x,C=jy(S=O&&"inline"!==e?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(O):o.current,v);x=p===Yy?C[0]:p===Vy?C[C.length-1]:Wy(S,v,O,w.offset),k(x)}else if(w.inlineTrigger)u(b);else if(w.offset>0)u(b,!0),d(),f.current=Wc((function(){y();var e=O.getAttribute("aria-controls"),t=Wy(document.getElementById(e),v);k(t)}),5);else if(w.offset<0){var P=s(b,!0),E=P[P.length-2],Q=m.get(E);u(E,!1),k(Q)}}null===c||void 0===c||c(t)}}var Xy="__RC_UTIL_PATH_SPLIT__",Fy=function(e){return e.join(Xy)},By="rc-menu-more";function qy(){var e=u(t.useState({}),2)[1],n=(0,t.useRef)(new Map),r=(0,t.useRef)(new Map),i=u(t.useState([]),2),o=i[0],a=i[1],s=(0,t.useRef)(0),l=(0,t.useRef)(!1),c=(0,t.useCallback)((function(t,i){var o=Fy(i);r.current.set(o,t),n.current.set(t,o),s.current+=1;var a,u=s.current;a=function(){u===s.current&&(l.current||e({}))},Promise.resolve().then(a)}),[]),h=(0,t.useCallback)((function(e,t){var i=Fy(t);r.current.delete(i),n.current.delete(e)}),[]),d=(0,t.useCallback)((function(e){a(e)}),[]),p=(0,t.useCallback)((function(e,t){var r=n.current.get(e)||"",i=r.split(Xy);return t&&o.includes(i[0])&&i.unshift(By),i}),[o]),v=(0,t.useCallback)((function(e,t){return e.some((function(e){return p(e,!0).includes(t)}))}),[p]),m=(0,t.useCallback)((function(e){var t="".concat(n.current.get(e)).concat(Xy),i=new Set;return f(r.current.keys()).forEach((function(e){e.startsWith(t)&&i.add(r.current.get(e))})),i}),[]);return t.useEffect((function(){return function(){l.current=!0}}),[]),{registerPath:c,unregisterPath:h,refreshOverflowKeys:d,isSubPathKey:v,getKeyPath:p,getKeys:function(){var e=f(n.current.keys());return o.length&&e.push(By),e},getSubPathKeys:m}}function Hy(e){var n=t.useRef(e);n.current=e;var r=t.useCallback((function(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return null===(e=n.current)||void 0===e?void 0:e.call.apply(e,[n].concat(r))}),[]);return e?r:void 0}var Gy=Math.random().toFixed(5).toString().slice(2),Ky=0;function Jy(e,n,r,i){var o=t.useContext(Sy),a=o.activeKey,s=o.onActive,l=o.onInactive,u={active:a===e};return n||(u.onMouseEnter=function(t){null===r||void 0===r||r({key:e,domEvent:t}),s(e)},u.onMouseLeave=function(t){null===i||void 0===i||i({key:e,domEvent:t}),l(e)}),u}function eO(e){var n=t.useContext(Sy),r=n.mode,i=n.rtl,o=n.inlineIndent;if("inline"!==r)return null;return i?{paddingRight:e*o}:{paddingLeft:e*o}}function tO(e){var n=e.icon,r=e.props,i=e.children;return("function"===typeof n?t.createElement(n,tt({},r)):n)||i||null}var nO=["item"];function rO(e){var t=e.item,n=qe(e,nO);return Object.defineProperty(n,"item",{get:function(){return Iu(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var iO=["title","attribute","elementRef"],oO=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],aO=["active"],sO=function(e){y(r,e);var n=k(r);function r(){return h(this,r),n.apply(this,arguments)}return m(r,[{key:"render",value:function(){var e=this.props,n=e.title,r=e.attribute,i=e.elementRef,o=gp(qe(e,iO),["eventKey","popupClassName","popupOffset","onTitleClick"]);return Iu(!r,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),t.createElement(sf.Item,wu({},r,{title:"string"===typeof n?n:void 0},o,{ref:i}))}}]),r}(t.Component),lO=t.forwardRef((function(e,n){var r,i=e.style,o=e.className,a=e.eventKey,s=(e.warnKey,e.disabled),l=e.itemIcon,u=e.children,c=e.role,h=e.onMouseEnter,d=e.onMouseLeave,p=e.onClick,v=e.onKeyDown,m=e.onFocus,g=qe(e,oO),y=wy(a),O=t.useContext(Sy),b=O.prefixCls,w=O.onItemClick,k=O.disabled,S=O.overflowDisabled,x=O.itemIcon,C=O.selectedKeys,P=O.onActive,E=t.useContext(_y)._internalRenderMenuItem,Q="".concat(b,"-item"),T=t.useRef(),$=t.useRef(),_=k||s,R=Fu(n,$),A=Ty(a);var M=function(e){return{key:a,keyPath:f(A).reverse(),item:T.current,domEvent:e}},N=l||x,Z=Jy(a,_,h,d),D=Z.active,L=qe(Z,aO),I=C.includes(a),Y=eO(A.length),V={};"option"===e.role&&(V["aria-selected"]=I);var U=t.createElement(sO,wu({ref:T,elementRef:R,role:null===c?"none":c||"menuitem",tabIndex:s?null:-1,"data-menu-id":S&&y?null:y},g,L,V,{component:"li","aria-disabled":s,style:tt(tt({},Y),i),className:Su()(Q,(r={},Je(r,"".concat(Q,"-active"),D),Je(r,"".concat(Q,"-selected"),I),Je(r,"".concat(Q,"-disabled"),_),r),o),onClick:function(e){if(!_){var t=M(e);null===p||void 0===p||p(rO(t)),w(t)}},onKeyDown:function(e){if(null===v||void 0===v||v(e),e.which===Uu.ENTER){var t=M(e);null===p||void 0===p||p(rO(t)),w(t)}},onFocus:function(e){P(a),null===m||void 0===m||m(e)}}),u,t.createElement(tO,{props:tt(tt({},e),{},{isSelected:I}),icon:N}));return E&&(U=E(U,e,{selected:I})),U}));function uO(e,n){var r=e.eventKey,i=Ey(),o=Ty(r);return t.useEffect((function(){if(i)return i.registerPath(r,o),function(){i.unregisterPath(r,o)}}),[o]),i?null:t.createElement(lO,wu({},e,{ref:n}))}var cO=t.forwardRef(uO),fO=["className","children"],hO=function(e,n){var r=e.className,i=e.children,o=qe(e,fO),a=t.useContext(Sy),s=a.prefixCls,l=a.mode,u=a.rtl;return t.createElement("ul",wu({className:Su()(s,u&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat("inline"===l?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),i)},dO=t.forwardRef(hO);dO.displayName="SubMenuList";var pO=dO,vO=["label","children","key","type"];function mO(e,n){return ec(e).map((function(e,r){if(t.isValidElement(e)){var i,o,a=e.key,s=null!==(i=null===(o=e.props)||void 0===o?void 0:o.eventKey)&&void 0!==i?i:a;(null===s||void 0===s)&&(s="tmp_key-".concat([].concat(f(n),[r]).join("-")));var l={key:s,eventKey:s};return t.cloneElement(e,l)}return e}))}function gO(e){return(e||[]).map((function(e,n){if(e&&"object"===d(e)){var r=e,i=r.label,o=r.children,a=r.key,s=r.type,l=qe(r,vO),u=null!==a&&void 0!==a?a:"tmp-".concat(n);return o||"group"===s?"group"===s?t.createElement(ZO,wu({key:u},l,{title:i}),gO(o)):t.createElement(TO,wu({key:u},l,{title:i}),gO(o)):"divider"===s?t.createElement(DO,wu({key:u},l)):t.createElement(cO,wu({key:u},l),i)}return null})).filter((function(e){return e}))}function yO(e,t,n){var r=e;return t&&(r=gO(t)),mO(r,n)}var OO={adjustX:1,adjustY:1},bO={topLeft:{points:["bl","tl"],overflow:OO,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:OO,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:OO,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:OO,offset:[4,0]}},wO={topLeft:{points:["bl","tl"],overflow:OO,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:OO,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:OO,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:OO,offset:[4,0]}};function kO(e,t,n){return t||(n?n[e]||n.other:void 0)}var SO={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function xO(e){var n=e.prefixCls,r=e.visible,i=e.children,o=e.popup,a=e.popupClassName,s=e.popupOffset,l=e.disabled,c=e.mode,f=e.onVisibleChange,h=t.useContext(Sy),d=h.getPopupContainer,p=h.rtl,v=h.subMenuOpenDelay,m=h.subMenuCloseDelay,g=h.builtinPlacements,y=h.triggerSubMenuAction,O=h.forceSubMenuRender,b=h.rootClassName,w=h.motion,k=h.defaultMotions,S=u(t.useState(!1),2),x=S[0],C=S[1],P=tt(tt({},p?wO:bO),g),E=SO[c],Q=kO(c,w,k),T=t.useRef(Q);"inline"!==c&&(T.current=Q);var $=tt(tt({},T.current),{},{leavedClassName:"".concat(n,"-hidden"),removeOnLeave:!1,motionAppear:!0}),_=t.useRef();return t.useEffect((function(){return _.current=Wc((function(){C(r)})),function(){Wc.cancel(_.current)}}),[r]),t.createElement(Xd,{prefixCls:n,popupClassName:Su()("".concat(n,"-popup"),Je({},"".concat(n,"-rtl"),p),a,b),stretch:"horizontal"===c?"minWidth":null,getPopupContainer:d,builtinPlacements:P,popupPlacement:E,popupVisible:x,popup:o,popupAlign:s&&{offset:s},action:l?[]:[y],mouseEnterDelay:v,mouseLeaveDelay:m,onPopupVisibleChange:f,forceRender:O,popupMotion:$},i)}function CO(e){var n=e.id,r=e.open,i=e.keyPath,o=e.children,a="inline",s=t.useContext(Sy),l=s.prefixCls,c=s.forceSubMenuRender,f=s.motion,h=s.defaultMotions,d=s.mode,p=t.useRef(!1);p.current=d===a;var v=u(t.useState(!p.current),2),m=v[0],g=v[1],y=!!p.current&&r;t.useEffect((function(){p.current&&g(!1)}),[d]);var O=tt({},kO(a,f,h));i.length>1&&(O.motionAppear=!1);var b=O.onVisibleChanged;return O.onVisibleChanged=function(e){return p.current||e||g(!0),null===b||void 0===b?void 0:b(e)},m?null:t.createElement(xy,{mode:a,locked:!p.current},t.createElement(yh,wu({visible:y},O,{forceRender:c,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),(function(e){var r=e.className,i=e.style;return t.createElement(pO,{id:n,className:r,style:i},o)})))}var PO=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],EO=["active"],QO=function(e){var n,r=e.style,i=e.className,o=e.title,a=e.eventKey,s=(e.warnKey,e.disabled),l=e.internalPopupClose,c=e.children,f=e.itemIcon,h=e.expandIcon,d=e.popupClassName,p=e.popupOffset,v=e.onClick,m=e.onMouseEnter,g=e.onMouseLeave,y=e.onTitleClick,O=e.onTitleMouseEnter,b=e.onTitleMouseLeave,w=qe(e,PO),k=wy(a),S=t.useContext(Sy),x=S.prefixCls,C=S.mode,P=S.openKeys,E=S.disabled,Q=S.overflowDisabled,T=S.activeKey,$=S.selectedKeys,_=S.itemIcon,R=S.expandIcon,A=S.onItemClick,M=S.onOpenChange,N=S.onActive,Z=t.useContext(_y)._internalRenderSubMenuItem,D=t.useContext($y).isSubPathKey,L=Ty(),I="".concat(x,"-submenu"),Y=E||s,V=t.useRef(),U=t.useRef();var j=f||_,W=h||R,z=P.includes(a),X=!Q&&z,F=D($,a),B=Jy(a,Y,O,b),q=B.active,H=qe(B,EO),G=u(t.useState(!1),2),K=G[0],J=G[1],ee=function(e){Y||J(e)},te=t.useMemo((function(){return q||"inline"!==C&&(K||D([T],a))}),[C,q,T,K,a,D]),ne=eO(L.length),re=Hy((function(e){null===v||void 0===v||v(rO(e)),A(e)})),ie=k&&"".concat(k,"-popup"),oe=t.createElement("div",wu({role:"menuitem",style:ne,className:"".concat(I,"-title"),tabIndex:Y?null:-1,ref:V,title:"string"===typeof o?o:null,"data-menu-id":Q&&k?null:k,"aria-expanded":X,"aria-haspopup":!0,"aria-controls":ie,"aria-disabled":Y,onClick:function(e){Y||(null===y||void 0===y||y({key:a,domEvent:e}),"inline"===C&&M(a,!z))},onFocus:function(){N(a)}},H),o,t.createElement(tO,{icon:"horizontal"!==C?W:null,props:tt(tt({},e),{},{isOpen:X,isSubMenu:!0})},t.createElement("i",{className:"".concat(I,"-arrow")}))),ae=t.useRef(C);if("inline"!==C&&L.length>1?ae.current="vertical":ae.current=C,!Q){var se=ae.current;oe=t.createElement(xO,{mode:se,prefixCls:I,visible:!l&&X&&"inline"!==C,popupClassName:d,popupOffset:p,popup:t.createElement(xy,{mode:"horizontal"===se?"vertical":se},t.createElement(pO,{id:ie,ref:U},c)),disabled:Y,onVisibleChange:function(e){"inline"!==C&&M(a,e)}},oe)}var le=t.createElement(sf.Item,wu({role:"none"},w,{component:"li",style:r,className:Su()(I,"".concat(I,"-").concat(C),i,(n={},Je(n,"".concat(I,"-open"),X),Je(n,"".concat(I,"-active"),te),Je(n,"".concat(I,"-selected"),F),Je(n,"".concat(I,"-disabled"),Y),n)),onMouseEnter:function(e){ee(!0),null===m||void 0===m||m({key:a,domEvent:e})},onMouseLeave:function(e){ee(!1),null===g||void 0===g||g({key:a,domEvent:e})}}),oe,!Q&&t.createElement(CO,{id:ie,open:X,keyPath:L},c));return Z&&(le=Z(le,e,{selected:F,active:te,open:X,disabled:Y})),t.createElement(xy,{onItemClick:re,mode:"horizontal"===C?"vertical":C,itemIcon:j,expandIcon:W},le)};function TO(e){var n,r=e.eventKey,i=e.children,o=Ty(r),a=mO(i,o),s=Ey();return t.useEffect((function(){if(s)return s.registerPath(r,o),function(){s.unregisterPath(r,o)}}),[o]),n=s?a:t.createElement(QO,e,a),t.createElement(Qy.Provider,{value:o},n)}var $O=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],_O=[],RO=t.forwardRef((function(e,n){var r,i,o=e,a=o.prefixCls,s=void 0===a?"rc-menu":a,l=o.rootClassName,c=o.style,h=o.className,d=o.tabIndex,p=void 0===d?0:d,v=o.items,m=o.children,g=o.direction,y=o.id,O=o.mode,b=void 0===O?"vertical":O,w=o.inlineCollapsed,k=o.disabled,S=o.disabledOverflow,x=o.subMenuOpenDelay,C=void 0===x?.1:x,P=o.subMenuCloseDelay,E=void 0===P?.1:P,Q=o.forceSubMenuRender,T=o.defaultOpenKeys,$=o.openKeys,_=o.activeKey,R=o.defaultActiveFirst,A=o.selectable,M=void 0===A||A,N=o.multiple,Z=void 0!==N&&N,D=o.defaultSelectedKeys,L=o.selectedKeys,I=o.onSelect,Y=o.onDeselect,V=o.inlineIndent,U=void 0===V?24:V,j=o.motion,W=o.defaultMotions,z=o.triggerSubMenuAction,X=void 0===z?"hover":z,F=o.builtinPlacements,B=o.itemIcon,q=o.expandIcon,H=o.overflowedIndicator,G=void 0===H?"...":H,K=o.overflowedIndicatorPopupClassName,J=o.getPopupContainer,ee=o.onClick,te=o.onOpenChange,ne=o.onKeyDown,re=(o.openAnimation,o.openTransitionName,o._internalRenderMenuItem),ie=o._internalRenderSubMenuItem,oe=qe(o,$O),ae=t.useMemo((function(){return yO(m,v,_O)}),[m,v]),se=u(t.useState(!1),2),le=se[0],ue=se[1],ce=t.useRef(),fe=function(e){var n=u(Ru(e,{value:e}),2),r=n[0],i=n[1];return t.useEffect((function(){Ky+=1;var e="".concat(Gy,"-").concat(Ky);i("rc-menu-uuid-".concat(e))}),[]),r}(y),he="rtl"===g;var de=Ru(T,{value:$,postState:function(e){return e||_O}}),pe=u(de,2),ve=pe[0],me=pe[1],ge=function(e){function t(){me(e),null===te||void 0===te||te(e)}arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(0,nt.flushSync)(t):t()},ye=u(t.useState(ve),2),Oe=ye[0],be=ye[1],we=t.useRef(!1),ke=u(t.useMemo((function(){return"inline"!==b&&"vertical"!==b||!w?[b,!1]:["vertical",w]}),[b,w]),2),Se=ke[0],xe=ke[1],Ce="inline"===Se,Pe=u(t.useState(Se),2),Ee=Pe[0],Qe=Pe[1],Te=u(t.useState(xe),2),$e=Te[0],_e=Te[1];t.useEffect((function(){Qe(Se),_e(xe),we.current&&(Ce?me(Oe):ge(_O))}),[Se,xe]);var Re=u(t.useState(0),2),Ae=Re[0],Me=Re[1],Ne=Ae>=ae.length-1||"horizontal"!==Ee||S;t.useEffect((function(){Ce&&be(ve)}),[ve]),t.useEffect((function(){return we.current=!0,function(){we.current=!1}}),[]);var Ze=qy(),De=Ze.registerPath,Le=Ze.unregisterPath,Ie=Ze.refreshOverflowKeys,Ye=Ze.isSubPathKey,Ve=Ze.getKeyPath,Ue=Ze.getKeys,je=Ze.getSubPathKeys,We=t.useMemo((function(){return{registerPath:De,unregisterPath:Le}}),[De,Le]),ze=t.useMemo((function(){return{isSubPathKey:Ye}}),[Ye]);t.useEffect((function(){Ie(Ne?_O:ae.slice(Ae+1).map((function(e){return e.key})))}),[Ae,Ne]);var Xe=u(Ru(_||R&&(null===(r=ae[0])||void 0===r?void 0:r.key),{value:_}),2),Fe=Xe[0],Be=Xe[1],He=Hy((function(e){Be(e)})),Ge=Hy((function(){Be(void 0)}));(0,t.useImperativeHandle)(n,(function(){return{list:ce.current,focus:function(e){var t,n,r,i,o=null!==Fe&&void 0!==Fe?Fe:null===(t=ae.find((function(e){return!e.props.disabled})))||void 0===t?void 0:t.key;o&&(null===(n=ce.current)||void 0===n||null===(r=n.querySelector("li[data-menu-id='".concat(by(fe,o),"']")))||void 0===r||null===(i=r.focus)||void 0===i||i.call(r,e))}}}));var Ke=Ru(D||[],{value:L,postState:function(e){return Array.isArray(e)?e:null===e||void 0===e?_O:[e]}}),et=u(Ke,2),rt=et[0],it=et[1],ot=Hy((function(e){null===ee||void 0===ee||ee(rO(e)),function(e){if(M){var t,n=e.key,r=rt.includes(n);t=Z?r?rt.filter((function(e){return e!==n})):[].concat(f(rt),[n]):[n],it(t);var i=tt(tt({},e),{},{selectedKeys:t});r?null===Y||void 0===Y||Y(i):null===I||void 0===I||I(i)}!Z&&ve.length&&"inline"!==Ee&&ge(_O)}(e)})),at=Hy((function(e,t){var n=ve.filter((function(t){return t!==e}));if(t)n.push(e);else if("inline"!==Ee){var r=je(e);n=n.filter((function(e){return!r.has(e)}))}Cd(ve,n,!0)||ge(n,!0)})),st=Hy(J),lt=zy(Ee,Fe,he,fe,ce,Ue,Ve,Be,(function(e,t){var n=null!==t&&void 0!==t?t:!ve.includes(e);at(e,n)}),ne);t.useEffect((function(){ue(!0)}),[]);var ut=t.useMemo((function(){return{_internalRenderMenuItem:re,_internalRenderSubMenuItem:ie}}),[re,ie]),ct="horizontal"!==Ee||S?ae:ae.map((function(e,n){return t.createElement(xy,{key:e.key,overflowDisabled:n>Ae},e)})),ft=t.createElement(sf,wu({id:y,ref:ce,prefixCls:"".concat(s,"-overflow"),component:"ul",itemComponent:cO,className:Su()(s,"".concat(s,"-root"),"".concat(s,"-").concat(Ee),h,(i={},Je(i,"".concat(s,"-inline-collapsed"),$e),Je(i,"".concat(s,"-rtl"),he),i),l),dir:g,style:c,role:"menu",tabIndex:p,data:ct,renderRawItem:function(e){return e},renderRawRest:function(e){var n=e.length,r=n?ae.slice(-n):null;return t.createElement(TO,{eventKey:By,title:G,disabled:Ne,internalPopupClose:0===n,popupClassName:K},r)},maxCount:"horizontal"!==Ee||S?sf.INVALIDATE:sf.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){Me(e)},onKeyDown:lt},oe));return t.createElement(_y.Provider,{value:ut},t.createElement(Oy.Provider,{value:fe},t.createElement(xy,{prefixCls:s,rootClassName:l,mode:Ee,openKeys:ve,rtl:he,disabled:k,motion:le?j:null,defaultMotions:le?W:null,activeKey:Fe,onActive:He,onInactive:Ge,selectedKeys:rt,inlineIndent:U,subMenuOpenDelay:C,subMenuCloseDelay:E,forceSubMenuRender:Q,builtinPlacements:F,triggerSubMenuAction:X,getPopupContainer:st,itemIcon:B,expandIcon:q,onItemClick:ot,onOpenChange:at},t.createElement($y.Provider,{value:ze},ft),t.createElement("div",{style:{display:"none"},"aria-hidden":!0},t.createElement(Py.Provider,{value:We},ae)))))})),AO=["className","title","eventKey","children"],MO=["children"],NO=function(e){var n=e.className,r=e.title,i=(e.eventKey,e.children),o=qe(e,AO),a=t.useContext(Sy).prefixCls,s="".concat(a,"-item-group");return t.createElement("li",wu({role:"presentation"},o,{onClick:function(e){return e.stopPropagation()},className:Su()(s,n)}),t.createElement("div",{role:"presentation",className:"".concat(s,"-title"),title:"string"===typeof r?r:void 0},r),t.createElement("ul",{role:"group",className:"".concat(s,"-list")},i))};function ZO(e){var n=e.children,r=qe(e,MO),i=mO(n,Ty(r.eventKey));return Ey()?i:t.createElement(NO,gp(r,["warnKey"]),i)}function DO(e){var n=e.className,r=e.style,i=t.useContext(Sy).prefixCls;return Ey()?null:t.createElement("li",{className:Su()("".concat(i,"-item-divider"),n),style:r})}var LO=RO;LO.Item=cO,LO.SubMenu=TO,LO.ItemGroup=ZO,LO.Divider=DO;var IO=LO,YO=t.createContext({});!function(){var e=0}();var VO=t.isValidElement;function UO(e){return e&&VO(e)&&e.type===t.Fragment}function jO(e,n){return function(e,n,r){return VO(e)?t.cloneElement(e,"function"===typeof r?r(e.props||{}):r):n}(e,e,n)}var WO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},zO=function(e){var n=e.prefixCls,r=e.className,i=e.dashed,o=WO(e,["prefixCls","className","dashed"]),a=(0,t.useContext(ev).getPrefixCls)("menu",n),s=Su()(Je({},"".concat(a,"-item-divider-dashed"),!!i),r);return t.createElement(DO,wu({className:s},o))},XO={adjustX:1,adjustY:1},FO=[0,0],BO={left:{points:["cr","cl"],overflow:XO,offset:[-4,0],targetOffset:FO},right:{points:["cl","cr"],overflow:XO,offset:[4,0],targetOffset:FO},top:{points:["bc","tc"],overflow:XO,offset:[0,-4],targetOffset:FO},bottom:{points:["tc","bc"],overflow:XO,offset:[0,4],targetOffset:FO},topLeft:{points:["bl","tl"],overflow:XO,offset:[0,-4],targetOffset:FO},leftTop:{points:["tr","tl"],overflow:XO,offset:[-4,0],targetOffset:FO},topRight:{points:["br","tr"],overflow:XO,offset:[0,-4],targetOffset:FO},rightTop:{points:["tl","tr"],overflow:XO,offset:[4,0],targetOffset:FO},bottomRight:{points:["tr","br"],overflow:XO,offset:[0,4],targetOffset:FO},rightBottom:{points:["bl","br"],overflow:XO,offset:[4,0],targetOffset:FO},bottomLeft:{points:["tl","bl"],overflow:XO,offset:[0,4],targetOffset:FO},leftBottom:{points:["br","bl"],overflow:XO,offset:[-4,0],targetOffset:FO}};function qO(e){var n=e.showArrow,r=e.arrowContent,i=e.children,o=e.prefixCls,a=e.id,s=e.overlayInnerStyle,l=e.className,u=e.style;return t.createElement("div",{className:Su()("".concat(o,"-content"),l),style:u},!1!==n&&t.createElement("div",{className:"".concat(o,"-arrow"),key:"arrow"},r),t.createElement("div",{className:"".concat(o,"-inner"),id:a,role:"tooltip",style:s},"function"===typeof i?i():i))}var HO=function(e,n){var r=e.overlayClassName,i=e.trigger,o=void 0===i?["hover"]:i,a=e.mouseEnterDelay,s=void 0===a?0:a,l=e.mouseLeaveDelay,u=void 0===l?.1:l,c=e.overlayStyle,f=e.prefixCls,h=void 0===f?"rc-tooltip":f,p=e.children,v=e.onVisibleChange,m=e.afterVisibleChange,g=e.transitionName,y=e.animation,O=e.motion,b=e.placement,w=void 0===b?"right":b,k=e.align,S=void 0===k?{}:k,x=e.destroyTooltipOnHide,C=void 0!==x&&x,P=e.defaultVisible,E=e.getTooltipContainer,Q=e.overlayInnerStyle,T=e.arrowContent,$=e.overlay,_=e.id,R=e.showArrow,A=qe(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),M=(0,t.useRef)(null);(0,t.useImperativeHandle)(n,(function(){return M.current}));var N=tt({},A);"visible"in e&&(N.popupVisible=e.visible);var Z=!1,D=!1;if("boolean"===typeof C)Z=C;else if(C&&"object"===d(C)){var L=C.keepParent;Z=!0===L,D=!1===L}return t.createElement(Xd,wu({popupClassName:r,prefixCls:h,popup:function(){return t.createElement(qO,{showArrow:R,arrowContent:T,key:"content",prefixCls:h,id:_,overlayInnerStyle:Q},$)},action:o,builtinPlacements:BO,popupPlacement:w,ref:M,popupAlign:S,getPopupContainer:E,onPopupVisibleChange:v,afterPopupVisibleChange:m,popupTransitionName:g,popupAnimation:y,popupMotion:O,defaultPopupVisible:P,destroyPopupOnHide:Z,autoDestroy:D,mouseLeaveDelay:u,popupStyle:c,mouseEnterDelay:s},N),p)},GO=(0,t.forwardRef)(HO),KO=(Nm("success","processing","error","default","warning"),Nm("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime")),JO={adjustX:1,adjustY:1},eb={adjustX:0,adjustY:0},tb=[0,0];function nb(e){return"boolean"===typeof e?e?JO:eb:wu(wu({},eb),e)}var rb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},ib=new RegExp("^(".concat(KO.join("|"),")(-inverse)?$"));function ob(e,n){var r=e.type;if((!0===r.__ANT_BUTTON||"button"===e.type)&&e.props.disabled||!0===r.__ANT_SWITCH&&(e.props.disabled||e.props.loading)||!0===r.__ANT_RADIO&&e.props.disabled){var i=function(e,t){var n={},r=wu({},e);return t.forEach((function(t){e&&t in e&&(n[t]=e[t],delete r[t])})),{picked:n,omitted:r}}(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),o=i.picked,a=i.omitted,s=wu(wu({display:"inline-block"},o),{cursor:"not-allowed",width:e.props.block?"100%":void 0}),l=jO(e,{style:wu(wu({},a),{pointerEvents:"none"}),className:null});return t.createElement("span",{style:s,className:Su()(e.props.className,"".concat(n,"-disabled-compatible-wrapper"))},l)}return e}var ab=t.forwardRef((function(e,n){var r,i=t.useContext(ev),o=i.getPopupContainer,a=i.getPrefixCls,s=i.direction;var l=u(Ru(!1,{value:void 0!==e.open?e.open:e.visible,defaultValue:void 0!==e.defaultOpen?e.defaultOpen:e.defaultVisible}),2),c=l[0],f=l[1],h=function(){var t=e.title,n=e.overlay;return!t&&!n&&0!==t},d=function(){var t=e.builtinPlacements,n=e.arrowPointAtCenter,r=void 0!==n&&n,i=e.autoAdjustOverflow;return t||function(e){var t=e.arrowWidth,n=void 0===t?4:t,r=e.horizontalArrowShift,i=void 0===r?16:r,o=e.verticalArrowShift,a=void 0===o?8:o,s=e.autoAdjustOverflow,l=e.arrowPointAtCenter,u={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(i+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(a+n)]},topRight:{points:["br","tc"],offset:[i+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(a+n)]},bottomRight:{points:["tr","bc"],offset:[i+n,4]},rightBottom:{points:["bl","cr"],offset:[4,a+n]},bottomLeft:{points:["tl","bc"],offset:[-(i+n),4]},leftBottom:{points:["br","cl"],offset:[-4,a+n]}};return Object.keys(u).forEach((function(e){u[e]=l?wu(wu({},u[e]),{overflow:nb(s),targetOffset:tb}):wu(wu({},BO[e]),{overflow:nb(s)}),u[e].ignoreShake=!0})),u}({arrowPointAtCenter:r,autoAdjustOverflow:void 0===i||i})},p=e.getPopupContainer,v=e.placement,m=void 0===v?"top":v,g=e.mouseEnterDelay,y=void 0===g?.1:g,O=e.mouseLeaveDelay,b=void 0===O?.1:O,w=rb(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay"]),k=e.prefixCls,S=e.openClassName,x=e.getTooltipContainer,C=e.overlayClassName,P=e.color,E=e.overlayInnerStyle,Q=e.children,T=a("tooltip",k),$=a(),_=c;"open"in e||"visible"in e||!h()||(_=!1);var R=ob(VO(Q)&&!UO(Q)?Q:t.createElement("span",null,Q),T),A=R.props,M=A.className&&"string"!==typeof A.className?A.className:Su()(A.className,Je({},S||"".concat(T,"-open"),!0)),N=Su()(C,(Je(r={},"".concat(T,"-rtl"),"rtl"===s),Je(r,"".concat(T,"-").concat(P),P&&ib.test(P)),r)),Z=E,D={};return P&&!ib.test(P)&&(Z=wu(wu({},E),{background:P}),D={"--antd-arrow-background-color":P}),t.createElement(GO,wu({},w,{placement:m,mouseEnterDelay:y,mouseLeaveDelay:b,prefixCls:T,overlayClassName:N,getTooltipContainer:p||x||o,ref:n,builtinPlacements:d(),overlay:function(){var t=e.title,n=e.overlay;return 0===t?t:n||t||""}(),visible:_,onVisibleChange:function(t){var n,r;f(!h()&&t),h()||(null===(n=e.onOpenChange)||void 0===n||n.call(e,t),null===(r=e.onVisibleChange)||void 0===r||r.call(e,t))},onPopupAlign:function(e,t){var n=d(),r=Object.keys(n).find((function(e){var r,i;return n[e].points[0]===(null===(r=t.points)||void 0===r?void 0:r[0])&&n[e].points[1]===(null===(i=t.points)||void 0===i?void 0:i[1])}));if(r){var i=e.getBoundingClientRect(),o={top:"50%",left:"50%"};/top|Bottom/.test(r)?o.top="".concat(i.height-t.offset[1],"px"):/Top|bottom/.test(r)&&(o.top="".concat(-t.offset[1],"px")),/left|Right/.test(r)?o.left="".concat(i.width-t.offset[0],"px"):/right|Left/.test(r)&&(o.left="".concat(-t.offset[0],"px")),e.style.transformOrigin="".concat(o.left," ").concat(o.top)}},overlayInnerStyle:Z,arrowContent:t.createElement("span",{className:"".concat(T,"-arrow-content"),style:D}),motion:{motionName:Vm($,"zoom-big-fast",e.transitionName),motionDeadline:1e3}}),_?jO(R,{className:M}):R)}));var sb=ab,lb=(0,t.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ub=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},cb=function(e){y(r,e);var n=k(r);function r(){var e;return h(this,r),(e=n.apply(this,arguments)).renderItem=function(n){var r,i,o=n.siderCollapsed,a=e.context,s=a.prefixCls,l=a.firstLevel,u=a.inlineCollapsed,c=a.direction,f=a.disableMenuItemTitleTooltip,h=e.props,d=h.className,p=h.children,v=e.props,m=v.title,g=v.icon,y=v.danger,O=ub(v,["title","icon","danger"]),b=m;"undefined"===typeof m?b=l?p:"":!1===m&&(b="");var w={title:b};o||u||(w.title=null,w.open=!1);var k=ec(p).length,S=t.createElement(cO,wu({},O,{className:Su()((r={},Je(r,"".concat(s,"-item-danger"),y),Je(r,"".concat(s,"-item-only-child"),1===(g?k+1:k)),r),d),title:"string"===typeof m?m:void 0}),jO(g,{className:Su()(VO(g)?null===(i=g.props)||void 0===i?void 0:i.className:"","".concat(s,"-item-icon"))}),e.renderItemChildren(u));return f||(S=t.createElement(sb,wu({},w,{placement:"rtl"===c?"left":"right",overlayClassName:"".concat(s,"-inline-collapsed-tooltip")}),S)),S},e}return m(r,[{key:"renderItemChildren",value:function(e){var n=this.context,r=n.prefixCls,i=n.firstLevel,o=this.props,a=o.icon,s=o.children,l=t.createElement("span",{className:"".concat(r,"-title-content")},s);return(!a||VO(s)&&"span"===s.type)&&s&&e&&i&&"string"===typeof s?t.createElement("div",{className:"".concat(r,"-inline-collapsed-noicon")},s.charAt(0)):l}},{key:"render",value:function(){return t.createElement(YO.Consumer,null,this.renderItem)}}]),r}(t.Component);cb.contextType=lb;var fb=function(e){var n,r,i=e.popupClassName,o=e.icon,a=e.title,s=e.theme,l=t.useContext(lb),u=l.prefixCls,c=l.inlineCollapsed,f=l.antdMenuTheme,h=Ty();if(o){var d=VO(a)&&"span"===a.type;r=t.createElement(t.Fragment,null,jO(o,{className:Su()(VO(o)?null===(n=o.props)||void 0===n?void 0:n.className:"","".concat(u,"-item-icon"))}),d?a:t.createElement("span",{className:"".concat(u,"-title-content")},a))}else r=c&&!h.length&&a&&"string"===typeof a?t.createElement("div",{className:"".concat(u,"-inline-collapsed-noicon")},a.charAt(0)):t.createElement("span",{className:"".concat(u,"-title-content")},a);var p=t.useMemo((function(){return wu(wu({},l),{firstLevel:!1})}),[l]);return t.createElement(lb.Provider,{value:p},t.createElement(TO,wu({},gp(e,["icon"]),{title:r,popupClassName:Su()(u,"".concat(u,"-").concat(s||f),i)})))},hb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function db(e){return(e||[]).map((function(e,n){if(e&&"object"===d(e)){var r=e,i=r.label,o=r.children,a=r.key,s=r.type,l=hb(r,["label","children","key","type"]),u=null!==a&&void 0!==a?a:"tmp-".concat(n);return o||"group"===s?"group"===s?t.createElement(ZO,wu({key:u},l,{title:i}),db(o)):t.createElement(fb,wu({key:u},l,{title:i}),db(o)):"divider"===s?t.createElement(zO,wu({key:u},l)):t.createElement(cb,wu({key:u},l),i)}return null})).filter((function(e){return e}))}function pb(e){return t.useMemo((function(){return e?db(e):e}),[e])}var vb=t.createContext(null),mb=vb,gb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},yb=(0,t.forwardRef)((function(e,n){var r,i=t.useContext(mb)||{},o=t.useContext(ev),a=o.getPrefixCls,s=o.getPopupContainer,l=o.direction,u=a(),c=e.prefixCls,f=e.className,h=e.theme,d=void 0===h?"light":h,p=e.expandIcon,v=e._internalDisableMenuItemTitleTooltip,m=e.inlineCollapsed,g=e.siderCollapsed,y=e.items,O=e.children,b=e.mode,w=e.selectable,k=e.onClick,S=gp(gb(e,["prefixCls","className","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","mode","selectable","onClick"]),["collapsedWidth"]),x=pb(y)||O;null===(r=i.validator)||void 0===r||r.call(i,{mode:b});var C,P=xu((function(){var e;null===k||void 0===k||k.apply(void 0,arguments),null===(e=null===i||void 0===i?void 0:i.onClick)||void 0===e||e.call(i)})),E=i.mode||b,Q=null!==w&&void 0!==w?w:i.selectable,T=t.useMemo((function(){return void 0!==g?g:m}),[m,g]),$={horizontal:{motionName:"".concat(u,"-slide-up")},inline:Um,other:{motionName:"".concat(u,"-zoom-big")}},_=a("menu",c||i.prefixCls),R=Su()("".concat(_,"-").concat(d),f);C="function"===typeof p?p:jO(p||i.expandIcon,{className:"".concat(_,"-submenu-expand-icon")});var A=t.useMemo((function(){return{prefixCls:_,inlineCollapsed:T||!1,antdMenuTheme:d,direction:l,firstLevel:!0,disableMenuItemTitleTooltip:v}}),[_,T,d,l,v]);return t.createElement(mb.Provider,{value:null},t.createElement(lb.Provider,{value:A},t.createElement(IO,wu({getPopupContainer:s,overflowedIndicator:t.createElement(yy,null),overflowedIndicatorPopupClassName:"".concat(_,"-").concat(d),mode:E,selectable:Q,onClick:P},S,{inlineCollapsed:T,className:R,prefixCls:_,direction:l,defaultMotions:$,expandIcon:C,ref:n}),x)))})),Ob=function(e){y(r,e);var n=k(r);function r(){var e;return h(this,r),(e=n.apply(this,arguments)).focus=function(t){var n;null===(n=e.menu)||void 0===n||n.focus(t)},e}return m(r,[{key:"render",value:function(){var e=this;return t.createElement(YO.Consumer,null,(function(n){return t.createElement(yb,wu({ref:function(t){e.menu=t}},e.props,n))}))}}]),r}(t.Component);Ob.Divider=zO,Ob.Item=cb,Ob.SubMenu=fb,Ob.ItemGroup=ZO;var bb=Ob,wb=gu({key:"title",default:""}),kb=gu({key:"url",default:""}),Sb=gu({key:"collapsed",default:!0}),xb=n(184);function Cb(e,t,n,r,i,o){return{key:t,icon:r,children:i,label:e,type:o,url:n}}var Pb=function(e){var n=e.menus,r=u((0,t.useState)([]),2),i=r[0],o=r[1],a=u((0,t.useState)(""),2),s=a[0],l=a[1],c=u((0,t.useState)([]),2),f=c[0],h=c[1],d=bu(kb),p=bu(wb),v=yu(Sb),m=n.map((function(e,t){return Cb(e.title,"menu".concat(t),void 0,void 0,e.subMenus.map((function(e,n){return Cb(e.title,"menu".concat(t,"-").concat(n),e.url)})))}));return(0,t.useEffect)((function(){var e=[];n.forEach((function(t,n){e.push("menu".concat(n)),t.subMenus.forEach((function(e,t){0===n&&0===t&&(l("menu".concat(n,"-").concat(t)),p(e.title),d(e.url))}))})),o(e)}),[n]),(0,xb.jsxs)("div",{className:"NavMenu".concat(v?"":" active"),children:[(0,xb.jsx)(vy,{showSearch:!0,placeholder:"\u8bf7\u8f93\u5165\u8981\u641c\u7d22\u5185\u5bb9",size:"large",style:{width:"100%",height:40},showArrow:!1,filterOption:!1,onSearch:function(e){h([]);var t=[];n.forEach((function(n,r){n.subMenus.forEach((function(n,r){n.title.indexOf(e)>-1&&t.push({label:n.title,value:n.title})}))})),h(t)},onSelect:function(e){n.forEach((function(t,n){t.subMenus.forEach((function(t,n){t.title===e&&(p(t.title),d(t.url))}))}))},options:f}),(0,xb.jsx)(bb,{style:{width:"100%"},openKeys:i,selectedKeys:[s],mode:"inline",items:m,onSelect:function(e){l(e.key),n.forEach((function(t,n){t.subMenus.forEach((function(t,r){"menu".concat(n,"-").concat(r)===e.key&&(p(t.title),d(t.url))}))}))},onOpenChange:function(e){o(e)}})]})};function Eb(){return Eb="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=O(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Eb.apply(this,arguments)}var Qb=function(){function e(){h(this,e)}return m(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),$b.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),$b.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 Ab(this),i=new Ab(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(){return new Ab(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return new Mb(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 Nb(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 Tb(t):$b.from(Tb.split(t,[])):e.empty}}]),e}(),Tb=function(e){y(n,e);var t=k(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var t,n=-1,r=P(e);try{for(r.s();!(t=r.n()).done;){n+=t.value.length+1}}catch(i){r.e(i)}finally{r.f()}return n}(e);return h(this,n),(r=t.call(this)).text=e,r.length=i,r}return m(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 Zb(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(Rb(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&i){var a=r.pop(),s=_b(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 Eb(O(n.prototype),"replace",this).call(this,e,t,r);var i=_b(this.text,_b(r.text,Rb(this.text,0,e)),t),o=this.length+r.length-(t-e);return i.length<=32?new n(i,o):$b.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=P(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=P(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}(Qb),$b=function(e){y(n,e);var t=k(n);function n(e,r){var i;h(this,n),(i=t.call(this)).children=e,i.length=r,i.lines=0;var o,a=P(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 m(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 Eb(O(n.prototype),"replace",this).call(this,o,s,l)}o=s+1}return Eb(O(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=P(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 r=0,i=u(t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1],4),o=i[0],a=i[1],s=i[2],l=i[3];;o+=t,a+=t){if(o==s||a==l)return r;var c=this.children[o],f=e.children[a];if(c!=f)return r+c.scanIdentical(f,t);r+=c.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=P(e);try{for(o.s();!(t=o.n()).done;){i+=t.value.lines}}catch(b){o.e(b)}finally{o.f()}if(i<32){var a,s=[],l=P(e);try{for(l.s();!(a=l.n()).done;){a.value.flatten(s)}}catch(b){l.e(b)}finally{l.f()}return new Tb(s,r)}var u=Math.max(32,i>>5),c=u<<1,f=u>>1,h=[],d=0,p=-1,v=[];function m(e){var t;if(e.lines>c&&e instanceof n){var r,i=P(e.children);try{for(i.s();!(r=i.n()).done;){m(r.value)}}catch(b){i.e(b)}finally{i.f()}}else e.lines>f&&(d>f||!d)?(g(),h.push(e)):e instanceof Tb&&d&&(t=v[v.length-1])instanceof Tb&&e.lines+t.lines<=32?(d+=e.lines,p+=e.length+1,v[v.length-1]=new Tb(t.text.concat(e.text),t.length+1+e.length)):(d+e.lines>u&&g(),d+=e.lines,p+=e.length+1,v.push(e))}function g(){0!=d&&(h.push(1==v.length?v[0]:n.from(v,p)),p=-1,d=v.length=0)}var y,O=P(e);try{for(O.s();!(y=O.n()).done;){m(y.value)}}catch(b){O.e(b)}finally{O.f()}return g(),1==h.length?h[0]:new n(h,r)}}]),n}(Qb);function _b(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 Rb(e,t,n){return _b(e,[""],t,n)}Qb.empty=new Tb([""],0);var Ab=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;h(this,e),this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[n>0?1:(t instanceof Tb?t.text.length:t.children.length)<<1]}return m(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 Tb?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 Tb){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 Tb?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}(),Mb=function(){function e(t,n,r){h(this,e),this.value="",this.done=!1,this.cursor=new Ab(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 m(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}(),Nb=function(){function e(t){h(this,e),this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}return m(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&&(Qb.prototype[Symbol.iterator]=function(){return this.iter()},Ab.prototype[Symbol.iterator]=Mb.prototype[Symbol.iterator]=Nb.prototype[Symbol.iterator]=function(){return this});for(var Zb=function(){function e(t,n,r,i){h(this,e),this.from=t,this.to=n,this.number=r,this.text=i}return m(e,[{key:"length",get:function(){return this.to-this.from}}]),e}(),Db="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,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,,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})),Lb=1;Lb<Db.length;Lb++)Db[Lb]+=Db[Lb-1];function Ib(e){for(var t=1;t<Db.length;t+=2)if(Db[t]>e)return Db[t-1]<=e;return!1}function Yb(e){return e>=127462&&e<=127487}var Vb=8205;function Ub(e,t){return(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?jb:Wb)(e,t,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function jb(e,t,n){if(t==e.length)return t;t&&zb(e.charCodeAt(t))&&Xb(e.charCodeAt(t-1))&&t--;var r=Fb(e,t);for(t+=qb(r);t<e.length;){var i=Fb(e,t);if(r==Vb||i==Vb||n&&Ib(i))t+=qb(i),r=i;else{if(!Yb(i))break;for(var o=0,a=t-2;a>=0&&Yb(Fb(e,a));)o++,a-=2;if(o%2==0)break;t+=2}}return t}function Wb(e,t,n){for(;t>0;){var r=jb(e,t-2,n);if(r<t)return r;t--}return 0}function zb(e){return e>=56320&&e<57344}function Xb(e){return e>=55296&&e<56320}function Fb(e,t){var n=e.charCodeAt(t);if(!Xb(n)||t+1==e.length)return n;var r=e.charCodeAt(t+1);return zb(r)?r-56320+(n-55296<<10)+65536:n}function Bb(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function qb(e){return e<65536?1:2}var Hb=/\r\n?|\n/,Gb=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(Gb||(Gb={})),Kb=function(){function e(t){h(this,e),this.sections=t}return m(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){nw(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{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:iw(this,e)}},{key:"mapDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:rw(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]:Gb.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!=Gb.Simple&&l>=e&&(n==Gb.TrackDel&&r<e&&l>e||n==Gb.TrackBefore&&r<e||n==Gb.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=r+this.sections[n++];if(this.sections[n++]>=0&&r<=t&&i>=e)return!(r<e&&i>t)||"cover";r=i}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)}},{key:"create",value:function(t){return new e(t)}}]),e}(),Jb=function(e){y(n,e);var t=k(n);function n(e,r){var i;return h(this,n),(i=t.call(this,e)).inserted=r,i}return m(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 nw(this,(function(t,n,r,i,o){return e=e.replace(r,r+(n-t),o)}),!1),e}},{key:"mapDesc",value:function(e){return rw(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!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(Qb.empty);r.push(a?e.slice(o,o+a):Qb.empty)}o+=a}return new n(t,r)}},{key:"compose",value:function(e){return this.empty?e:e.empty?this:iw(this,e,!0)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:rw(this,e,t,!0)}},{key:"iterChanges",value:function(e){nw(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return Kb.create(this.sections)}},{key:"filter",value:function(e){var t=[],r=[],i=[],o=new ow(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);ew(i,u,-1);var c=-1==o.ins?-1:0==o.off?o.ins:0;ew(t,u,c),c>0&&tw(r,t,o.text),o.forward(u),s+=u}for(var f=e[a++];s<f;){if(o.done)break e;var h=Math.min(o.len,f-s);ew(t,h,-1),ew(i,h,-1==o.ins?-1:0==o.off?o.ins:0),o.forward(h),s+=h}}return{changes:new n(t,r),filtered:Kb.create(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(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||i.length){a<t&&ew(i,t-a,-1);var e=new n(i,o);s=s?s.compose(e.map(s)):e,i=[],o=[],a=0}}return function e(u){if(Array.isArray(u)){var c,f=P(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 h=u.from,d=u.to,p=void 0===d?h:d,v=u.insert;if(h>p||h<0||p>t)throw new RangeError("Invalid change range ".concat(h," to ").concat(p," (in doc of length ").concat(t,")"));var m=v?"string"==typeof v?Qb.of(v.split(r||Hb)):v:Qb.empty,g=m.length;if(h==p&&0==g)return;h<a&&l(),h>a&&ew(i,h-a,-1),ew(i,p-h,g),tw(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(Qb.empty);r[i]=Qb.of(o.slice(1)),t.push(o[0],r[i].length)}}}return new n(t,r)}},{key:"createSet",value:function(e,t){return new n(e,t)}}]),n}(Kb);function ew(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 tw(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(Qb.empty);e.push(n)}}}function nw(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=Qb.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 rw(e,t,n){for(var r=[],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,o=new ow(e),a=new ow(t),s=-1;;)if(-1==o.ins&&-1==a.ins){var l=Math.min(o.len,a.len);ew(r,l,-1),o.forward(l),a.forward(l)}else if(a.ins>=0&&(o.ins<0||s==o.i||0==o.off&&(a.len<o.len||a.len==o.len&&!n))){var u=a.len;for(ew(r,a.ins,-1);u;){var c=Math.min(o.len,u);o.ins>=0&&s<o.i&&o.len<=c&&(ew(r,0,o.ins),i&&tw(i,r,o.text),s=o.i),o.forward(c),u-=c}a.next()}else{if(!(o.ins>=0)){if(o.done&&a.done)return i?Jb.createSet(r,i):Kb.create(r);throw new Error("Mismatched change set lengths")}for(var f=0,h=o.len;h;)if(-1==a.ins){var d=Math.min(h,a.len);f+=d,h-=d,a.forward(d)}else{if(!(0==a.ins&&a.len<h))break;h-=a.len,a.next()}ew(r,f,s<o.i?o.ins:0),i&&s<o.i&&tw(i,r,o.text),s=o.i,o.forward(o.len-h)}}function iw(e,t){for(var n=[],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?[]:null,i=new ow(e),o=new ow(t),a=!1;;){if(i.done&&o.done)return r?Jb.createSet(n,r):Kb.create(n);if(0==i.ins)ew(n,i.len,0,a),i.next();else if(0!=o.len||o.done){if(i.done||o.done)throw new Error("Mismatched change set lengths");var s=Math.min(i.len2,o.len),l=n.length;if(-1==i.ins){var u=-1==o.ins?-1:o.off?0:o.ins;ew(n,s,u,a),r&&u&&tw(r,n,o.text)}else-1==o.ins?(ew(n,i.off?0:i.len,s,a),r&&tw(r,n,i.textBit(s))):(ew(n,i.off?0:i.len,o.off?0:o.ins,a),r&&!o.off&&tw(r,n,o.text));a=(i.ins>s||o.ins>=0&&o.len>s)&&(a||n.length>l),i.forward2(s),o.forward(s)}else ew(n,0,o.ins,a),r&&tw(r,n,o.text),o.next()}}var ow=function(){function e(t){h(this,e),this.set=t,this.i=0,this.next()}return m(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?Qb.empty:e[t]}},{key:"textBit",value:function(e){var t=this.set.inserted,n=this.i-2>>1;return n>=t.length&&!e?Qb.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}(),aw=function(){function e(t,n,r){h(this,e),this.from=t,this.to=n,this.flags=r}return m(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,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return this.empty?n=r=t.mapPos(this.from,i):(n=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new e(n,r,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 sw.range(e,t);var n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return sw.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 sw.range(e.anchor,e.head)}},{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}(),sw=function(){function e(t,n){h(this,e),this.ranges=t,this.mainIndex=n}return m(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],0)}},{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 aw.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 e.normalized(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 aw.create(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,r){var i=(null!==n&&void 0!==n?n:33554431)<<5|(null==r?3:Math.min(2,r));return t<e?aw.create(t,e,24|i):aw.create(e,t,(t>e?4:0)|i)}},{key:"normalized",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t[n];t.sort((function(e,t){return e.from-t.from})),n=t.indexOf(r);for(var i=1;i<t.length;i++){var o=t[i],a=t[i-1];if(o.empty?o.from<=a.to:o.from<a.to){var s=a.from,l=Math.max(o.to,a.to);i<=n&&n--,t.splice(--i,2,o.anchor>o.head?e.range(l,s):e.range(s,l))}}return new e(t,n)}}]),e}();function lw(e,t){var n,r=P(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 uw=0,cw=function(){function e(t,n,r,i,o){h(this,e),this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=uw++,this.default=t([]),this.extensions="function"==typeof o?o(this):o}return m(e,[{key:"of",value:function(e){return new hw([],this,0,e)}},{key:"compute",value:function(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new hw(e,this,1,t)}},{key:"computeN",value:function(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new hw(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}:fw),!!t.static,t.enables)}}]),e}();function fw(e,t){return e==t||e.length==t.length&&e.every((function(e,n){return e===t[n]}))}var hw=function(){function e(t,n,r,i){h(this,e),this.dependencies=t,this.facet=n,this.type=r,this.value=i,this.id=uw++}return m(e,[{key:"dynamicSlot",value:function(e){var t,n,r=this,i=this.value,o=this.facet.compareInput,a=this.id,s=e[a]>>1,l=2==this.type,u=!1,c=!1,f=[],h=P(this.dependencies);try{for(h.s();!(n=h.n()).done;){var d=n.value;"doc"==d?u=!0:"selection"==d?c=!0:0==(1&(null!==(t=e[d.id])&&void 0!==t?t:1))&&f.push(e[d.id])}}catch(p){h.e(p)}finally{h.f()}return{create:function(e){return e.values[s]=i(e),1},update:function(e,t){if(u&&t.docChanged||c&&(t.docChanged||t.selection)||pw(e,f)){var n=i(e);if(l?!dw(n,e.values[s],o):!o(n,e.values[s]))return e.values[s]=n,1}return 0},reconfigure:function(e,t){var n,u=t.config.address[a];if(null!=u){var c=Qw(t,u);if(r.dependencies.every((function(n){return n instanceof cw?t.facet(n)===e.facet(n):!(n instanceof mw)||t.field(n,!1)==e.field(n,!1)}))||(l?dw(n=i(e),c,o):o(n=i(e),c)))return e.values[s]=c,0}else n=i(e);return e.values[s]=n,1}}}}]),e}();function dw(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}function pw(e,t){var n,r=!1,i=P(t);try{for(i.s();!(n=i.n()).done;){1&Ew(e,n.value)&&(r=!0)}}catch(o){i.e(o)}finally{i.f()}return r}var vw=cw.define({static:!0}),mw=function(){function e(t,n,r,i,o){h(this,e),this.id=t,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}return m(e,[{key:"create",value:function(e){var t=this,n=e.facet(vw).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{create:function(e){return e.values[n]=t.create(e),1},update:function(e,r){var i=e.values[n],o=t.updateF(i,r);return t.compareF(i,o)?0:(e.values[n]=o,1)},reconfigure:function(e,r){return null!=r.config.address[t.id]?(e.values[n]=r.field(t),0):(e.values[n]=t.create(e),1)}}}},{key:"init",value:function(e){return[this,vw.of({field:this,create:e})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(t){var n=new e(uw++,t.create,t.update,t.compare||function(e,t){return e===t},t);return t.provide&&(n.provides=t.provide(n)),n}}]),e}(),gw=4,yw=3,Ow=2,bw=1;function ww(e){return function(t){return new Sw(t,e)}}var kw={highest:ww(0),high:ww(bw),default:ww(Ow),low:ww(yw),lowest:ww(gw)},Sw=m((function e(t,n){h(this,e),this.inner=t,this.prec=n})),xw=function(){function e(){h(this,e)}return m(e,[{key:"of",value:function(e){return new Cw(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}(),Cw=m((function e(t,n){h(this,e),this.compartment=t,this.inner=n})),Pw=function(){function e(t,n,r,i,o,a){for(h(this,e),this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}return m(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=P(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 Cw&&n.delete(e.compartment)}if(i.set(e,a),Array.isArray(e)){var u,c=P(e);try{for(c.s();!(u=c.n()).done;){o(u.value,a)}}catch(d){c.e(d)}finally{c.f()}}else if(e instanceof Cw){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 Sw)o(e.inner,e.prec);else if(e instanceof mw)r[a].push(e),e.provides&&o(e.provides,a);else if(e instanceof hw)r[a].push(e),e.facet.extensions&&o(e.facet.extensions,Ow);else{var h=e.extension;if(!h)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(h,a)}}return o(e,Ow),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 mw?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=[],h=[],d=function(){var e=v[p];c[e.id]=h.length<<1,h.push((function(t){return e.slot(t)}))},p=0,v=o;p<v.length;p++)d();var m=null===r||void 0===r?void 0:r.config.facets,g=function(){var e=a[y],t=e[0].facet,n=m&&m[y]||[];if(e.every((function(e){return 0==e.type})))if(c[t.id]=f.length<<1|1,fw(n,e))f.push(r.facet(t));else{var i=t.combine(e.map((function(e){return e.value})));f.push(r&&t.compare(i,r.facet(t))?r.facet(t):i)}else{var o,s=P(e);try{var l=function(){var e=o.value;0==e.type?(c[e.id]=f.length<<1|1,f.push(e.value)):(c[e.id]=h.length<<1,h.push((function(t){return e.dynamicSlot(t)})))};for(s.s();!(o=s.n()).done;)l()}catch(O){s.e(O)}finally{s.f()}c[t.id]=h.length<<1,h.push((function(n){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;function s(e){for(var n=[],o=0;o<r.length;o++){var a=Qw(e,r[o]);if(2==i[o]){var s,l=P(a);try{for(l.s();!(s=l.n()).done;){var u=s.value;n.push(u)}}catch(O){l.e(O)}finally{l.f()}}else n.push(a)}return t.combine(n)}return{create:function(e){var t,n=P(r);try{for(n.s();!(t=n.n()).done;)Ew(e,t.value)}catch(O){n.e(O)}finally{n.f()}return e.values[a]=s(e),1},update:function(e,n){if(!pw(e,o))return 0;var r=s(e);return t.compare(r,e.values[a])?0:(e.values[a]=r,1)},reconfigure:function(e,i){var o=pw(e,r),l=i.config.facets[t.id],u=i.facet(t);if(l&&!o&&fw(n,l))return e.values[a]=u,0;var c=s(e);return t.compare(c,u)?(e.values[a]=u,0):(e.values[a]=c,1)}}}(n,t,e)}))}};for(var y in a)g();return new e(t,s,h.map((function(e){return e(c)})),c,f,a)}}]),e}();function Ew(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.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Qw(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}var Tw=cw.define(),$w=cw.define({combine:function(e){return e.some((function(e){return e}))},static:!0}),_w=cw.define({combine:function(e){return e.length?e[0]:void 0},static:!0}),Rw=cw.define(),Aw=cw.define(),Mw=cw.define(),Nw=cw.define({combine:function(e){return!!e.length&&e[0]}}),Zw=function(){function e(t,n){h(this,e),this.type=t,this.value=n}return m(e,null,[{key:"define",value:function(){return new Dw}}]),e}(),Dw=function(){function e(){h(this,e)}return m(e,[{key:"of",value:function(e){return new Zw(this,e)}}]),e}(),Lw=function(){function e(t){h(this,e),this.map=t}return m(e,[{key:"of",value:function(e){return new Iw(this,e)}}]),e}(),Iw=function(){function e(t,n){h(this,e),this.type=t,this.value=n}return m(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(){return new Lw((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(e,t){if(!e.length)return e;var n,r=[],i=P(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}();Iw.reconfigure=Iw.define(),Iw.appendConfig=Iw.define();var Yw=function(){function e(t,n,r,i,o,a){h(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&&lw(r,n.newLength),o.some((function(t){return t.type==e.time}))||(this.annotations=o.concat(e.time.of(Date.now())))}return m(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=P(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]))}}],[{key:"create",value:function(t,n,r,i,o,a){return new e(t,n,r,i,o,a)}}]),e}();function Vw(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 Uw(e,t,n){var r,i,o,a;return n?(i=t.changes,o=Jb.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:Iw.mapEffects(e.effects,i).concat(Iw.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function jw(e,t,n){var r=t.selection,i=Xw(t.annotations);return t.userEvent&&(i=i.concat(Yw.userEvent.of(t.userEvent))),{changes:t.changes instanceof Jb?t.changes:Jb.of(t.changes||[],n,e.facet(_w)),selection:r&&(r instanceof sw?r:sw.single(r.anchor,r.head)),effects:Xw(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function Ww(e,t,n){var r=jw(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=Uw(r,jw(e,t[i],o?r.changes.newLength:e.doc.length),o)}var a=Yw.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){for(var t=e.startState,n=t.facet(Mw),r=e,i=n.length-1;i>=0;i--){var o=n[i](e);o&&Object.keys(o).length&&(r=Uw(r,jw(t,o,e.changes.newLength),!0))}return r==e?e:Yw.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){var t,n=e.startState,r=!0,i=P(n.facet(Rw));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:Vw(r,o))}}catch(h){i.e(h)}finally{i.f()}if(!0!==r){var a,s;if(!1===r)s=e.changes.invertedDesc,a=Jb.empty(n.doc.length);else{var l=e.changes.filter(r);a=l.changes,s=l.filtered.mapDesc(l.changes).invertedDesc}e=Yw.create(n,a,e.selection&&e.selection.map(s),Iw.mapEffects(e.effects,s),e.annotations,e.scrollIntoView)}for(var u=n.facet(Aw),c=u.length-1;c>=0;c--){var f=u[c](e);e=f instanceof Yw?f:Array.isArray(f)&&1==f.length&&f[0]instanceof Yw?f[0]:Ww(n,Xw(f),!1)}return e}(a):a)}Yw.time=Zw.define(),Yw.userEvent=Zw.define(),Yw.addToHistory=Zw.define(),Yw.remote=Zw.define();var zw=[];function Xw(e){return null==e?zw:Array.isArray(e)?e:[e]}var Fw,Bw=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(Bw||(Bw={})),qw=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{Fw=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(oD){}function Hw(e){return function(t){if(!/\S/.test(t))return Bw.Space;if(function(e){if(Fw)return Fw.test(e);for(var t=0;t<e.length;t++){var n=e[t];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||qw.test(n)))return!0}return!1}(t))return Bw.Word;for(var n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Bw.Word;return Bw.Other}}var Gw=function(){function e(t,n,r,i,o,a){h(this,e),this.config=t,this.doc=n,this.selection=r,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(var s=0;s<this.config.dynamicSlots.length;s++)Ew(this,s<<1);this.computeSlot=null}return m(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 Ew(this,n),Qw(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 Ww(this,t,!0)}},{key:"applyTransaction",value:function(t){var n,r,i=this,o=this.config,a=o,s=a.base,l=a.compartments,u=P(t.effects);try{for(u.s();!(n=u.n()).done;){var c=n.value;c.is(xw.reconfigure)?(o&&(l=new Map,o.compartments.forEach((function(e,t){return l.set(t,e)})),o=null),l.set(c.value.compartment,c.value.extension)):c.is(Iw.reconfigure)?(o=null,s=c.value):c.is(Iw.appendConfig)&&(o=null,s=Xw(s).concat(c.value))}}catch(f){u.e(f)}finally{u.f()}o?r=t.startState.values.slice():r=new e(o=Pw.resolve(s,l,this),this.doc,this.selection,o.dynamicSlots.map((function(){return null})),(function(e,t){return t.reconfigure(e,i)}),null).values;new e(o,t.newDoc,t.newSelection,r,(function(e,n){return n.update(e,t)}),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:sw.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=Xw(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=Iw.mapEffects(o,u).concat(Iw.mapEffects(Xw(s.effects),f))}return{changes:r,selection:sw.create(i,t.mainIndex),effects:o}}},{key:"changes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Jb?t:Jb.of(t,this.doc.length,this.facet(e.lineSeparator))}},{key:"toText",value:function(t){return Qb.of(t.split(this.facet(e.lineSeparator)||Hb))}},{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:(Ew(this,t),Qw(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 mw&&null!=this.config.address[r.id]&&(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(Nw)}},{key:"phrase",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o,a=P(this.facet(e.phrases));try{for(a.s();!(o=a.n()).done;){var s=o.value;if(Object.prototype.hasOwnProperty.call(s,t)){t=s[t];break}}}catch(l){a.e(l)}finally{a.f()}return r.length&&(t=t.replace(/\$(\$|\d*)/g,(function(e,t){if("$"==t)return"$";var n=+(t||1);return!n||n>r.length?e:r[n-1]}))),t}},{key:"languageDataAt",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],o=P(this.facet(Tw));try{for(o.s();!(n=o.n()).done;){var a,s=P((0,n.value)(this,t,r));try{for(s.s();!(a=s.n()).done;){var l=a.value;Object.prototype.hasOwnProperty.call(l,e)&&i.push(l[e])}}catch(u){s.e(u)}finally{s.f()}}}catch(u){o.e(u)}finally{o.f()}return i}},{key:"charCategorizer",value:function(e){return Hw(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=Ub(n,a,!1);if(o(n.slice(l,a))!=Bw.Word)break;a=l}for(;s<i;){var u=Ub(n,s);if(o(n.slice(s,u))!=Bw.Word)break;s=u}return a==s?null:sw.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(){if(Object.prototype.hasOwnProperty.call(t,a)){var e=r[a],n=t[a];i.push(e.init((function(t){return e.spec.fromJSON(n,t)})))}};for(var a in r)o()}return e.create({doc:t.doc,selection:sw.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=Pw.resolve(t.extensions||[],new Map),r=t.doc instanceof Qb?t.doc:Qb.of((t.doc||"").split(n.staticFacet(e.lineSeparator)||Hb)),i=t.selection?t.selection instanceof sw?t.selection:sw.single(t.selection.anchor,t.selection.head):sw.single(0);return lw(i,r.length),n.staticFacet($w)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map((function(){return null})),(function(e,t){return t.create(e)}),null)}}]),e}();function Kw(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={},o=P(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(d){o.e(d)}finally{o.f()}for(var h in t)void 0===i[h]&&(i[h]=t[h]);return i}Gw.allowMultipleSelections=$w,Gw.tabSize=cw.define({combine:function(e){return e.length?e[0]:4}}),Gw.lineSeparator=_w,Gw.readOnly=Nw,Gw.phrases=cw.define({compare:function(e,t){var n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every((function(n){return e[n]==t[n]}))}}),Gw.languageData=Tw,Gw.changeFilter=Rw,Gw.transactionFilter=Aw,Gw.transactionExtender=Mw,xw.reconfigure=Iw.define();var Jw=function(){function e(){h(this,e)}return m(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 ek.create(e,t,this)}}]),e}();Jw.prototype.startSide=Jw.prototype.endSide=0,Jw.prototype.point=!1,Jw.prototype.mapMode=Gb.TrackDel;var ek=function(){function e(t,n,r){h(this,e),this.from=t,this.to=n,this.value=r}return m(e,null,[{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}();function tk(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var nk=function(){function e(t,n,r,i){h(this,e),this.from=t,this.to=n,this.value=r,this.maxPoint=i}return m(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,h=void 0,d=void 0;if(c==f){var p=n.mapPos(c,u.startSide,u.mapMode);if(null==p)continue;if(h=d=p,u.startSide!=u.endSide&&(d=n.mapPos(c,u.endSide))<h)continue}else if((h=n.mapPos(c,u.startSide))>(d=n.mapPos(f,u.endSide))||h==d&&u.startSide>0&&u.endSide<=0)continue;(d-h||u.endSide-u.startSide)<0||(a<0&&(a=h),u.point&&(s=Math.max(s,d-h)),r.push(u),i.push(h-a),o.push(d-a))}return{mapped:r.length?new e(i,o,r,s):null,pos:a}}}]),e}(),rk=function(){function e(t,n,r,i){h(this,e),this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=i}return m(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=P(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=r.slice().sort(tk)),this.isEmpty)return r.length?e.of(r):this;for(var f=new ak(this,null,-1).goto(0),h=0,d=[],p=new ik;f.value||h<r.length;)if(h<r.length&&(f.from-r[h].from||f.startSide-r[h].value.startSide)>=0){var v=r[h++];p.addInner(v.from,v.to,v.value)||d.push(v)}else 1==f.rangeIndex&&f.chunkIndex<this.chunk.length&&(h==r.length||this.chunkEnd(f.chunkIndex)<r[h].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)||d.push(ek.create(f.from,f.to,f.value))),f.next());return p.finishInner(this.nextLayer.isEmpty&&!d.length?e.empty:this.nextLayer.update({add:d,filter:c,filterFrom:s,filterTo:u}))}},{key:"map",value:function(t){if(t.empty||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 h=this.nextLayer.map(t);return 0==n.length?h:new e(r,n,h||e.empty,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 sk.from([this]).goto(e)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(t,n,r,i){return new e(t,n,r,i)}},{key:"iter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return sk.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=ok(o,a,n),l=new uk(o,s,i),u=new uk(a,s,i);n.iterGaps((function(e,t,n){return ck(l,e,u,t,n,r)})),n.empty&&0==n.length&&ck(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=999999999);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=ok(i,o),s=new uk(i,a,0).goto(n),l=new uk(o,a,0).goto(n);;){if(s.to!=l.to||!fk(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=new uk(e,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(t),o=t,a=i.openStart;;){var s=Math.min(i.to,n);if(i.point){var l=i.activeForPoint(i.to),u=i.pointFrom<t?l.length+1:Math.min(l.length,a);r.point(o,s,i.point,l,u,i.pointRank),a=Math.min(i.openEnd(s),l.length)}else s>o&&(r.span(o,s,i.active,a),a=i.openEnd(s));if(i.to>n)return a+(i.point&&i.to>n?1:0);o=i.to,i.next()}}},{key:"of",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new ik,i=P(e instanceof ek?[e]:n?function(e){if(e.length>1)for(var t=e[0],n=1;n<e.length;n++){var r=e[n];if(tk(t,r)>0)return e.slice().sort(tk);t=r}return e}(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}();rk.empty=new rk([],[],null,-1),rk.empty.nextLayer=rk.empty;var ik=function(){function e(){h(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 m(e,[{key:"finishChunk",value:function(e){this.chunks.push(new nk(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(rk.empty)}},{key:"finishInner",value:function(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;var t=rk.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}]),e}();function ok(e,t,n){var r,i=new Map,o=P(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=P(t);try{for(c.s();!(l=c.n()).done;)for(var f=l.value,h=0;h<f.chunk.length;h++){var d=i.get(f.chunk[h]);null==d||(n?n.mapPos(d):d)!=f.chunkPos[h]||(null===n||void 0===n?void 0:n.touchesRange(d,d+f.chunk[h].length))||u.add(f.chunk[h])}}catch(p){c.e(p)}finally{c.f()}return u}var ak=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;h(this,e),this.layer=t,this.skip=n,this.minPoint=r,this.rank=i}return m(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.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}]),e}(),sk=function(){function e(t){h(this,e),this.heap=t}return m(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=P(this.heap);try{for(r.s();!(t=r.n()).done;){t.value.goto(e,n)}}catch(o){r.e(o)}finally{r.f()}for(var i=this.heap.length>>1;i>=0;i--)lk(this.heap,i);return this.next(),this}},{key:"forward",value:function(e,t){var n,r=P(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--)lk(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(),lk(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 ak(a,n,r,o));return 1==i.length?i[0]:new e(i)}}]),e}();function lk(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 uk=function(){function e(t,n,r){h(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=sk.from(t,n,r)}return m(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){hk(this.active,e),hk(this.activeTo,e),hk(this.activeRank,e),this.minActive=pk(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++;dk(this.active,t,r),dk(this.activeTo,t,i),dk(this.activeRank,t,o),e&&dk(e,t,this.cursor.from),this.minActive=pk(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;;){var r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&hk(n,r)}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 i=this.cursor.value;if(i.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=i,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=i.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}if(n){this.openStart=0;for(var o=n.length-1;o>=0&&n[o]<e;o--)this.openStart++}}},{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 ck(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))&&fk(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(s,f,e.point,n.point):f>s&&!fk(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 fk(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 hk(e,t){for(var n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function dk(e,t,n){for(var r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=n}function pk(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}function vk(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=Ub(e,i));return r}function mk(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=Ub(e,i)}return!0===r?-1:e.length}for(var gk="undefined"==typeof Symbol?"__\u037c":Symbol.for("\u037c"),yk="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Ok="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},bk=function(){function e(t,n){h(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 m(e,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var e=Ok[gk]||1;return Ok[gk]=e+1,"\u037c"+e.toString(36)}},{key:"mount",value:function(e,t,n){var r=e[yk],i=n&&n.nonce;r?i&&r.setNonce(i):r=new kk(e,i),r.mount(Array.isArray(t)?t:[t])}}]),e}(),wk=new Map,kk=function(){function e(t,n){h(this,e);var r=t.ownerDocument||t,i=r.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){var o=wk.get(r);if(o)return t.adoptedStyleSheets=[o.sheet].concat(f(t.adoptedStyleSheets)),t[yk]=o;this.sheet=new i.CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(f(t.adoptedStyleSheets)),wk.set(r,this)}else{this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);var a=t.head||t;a.insertBefore(this.styleTag,a.firstChild)}this.modules=[],t[yk]=this}return m(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}}},{key:"setNonce",value:function(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}]),e}(),Sk={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:"'"},xk={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ck="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Pk="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ek=0;Ek<10;Ek++)Sk[48+Ek]=Sk[96+Ek]=String(Ek);for(Ek=1;Ek<=24;Ek++)Sk[Ek+111]="F"+Ek;for(Ek=65;Ek<=90;Ek++)Sk[Ek]=String.fromCharCode(Ek+32),xk[Ek]=String.fromCharCode(Ek);for(var Qk in Sk)xk.hasOwnProperty(Qk)||(xk[Qk]=Sk[Qk]);function Tk(e){return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function $k(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function _k(e,t){if(!t.anchorNode)return!1;try{return $k(e,t.anchorNode)}catch(oD){return!1}}function Rk(e){return 3==e.nodeType?jk(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Ak(e,t,n,r){return!!n&&(Nk(e,t,n,r,-1)||Nk(e,t,n,r,1))}function Mk(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Nk(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Zk(e))){if("DIV"==e.nodeName)return!1;var o=e.parentNode;if(!o||1!=o.nodeType)return!1;t=Mk(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?Zk(e):0}}}function Zk(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Dk(e,t){var n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Lk(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}var Ik,Yk=function(){function e(){h(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return m(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){var t=e.anchorNode,n=e.focusNode;this.set(t,Math.min(e.anchorOffset,t?Zk(t):0),n,Math.min(e.focusOffset,n?Zk(n):0))}},{key:"set",value:function(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}]),e}(),Vk=null;function Uk(e){if(e.setActive)return e.setActive();if(Vk)return e.focus(Vk);for(var t=[],n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==Vk?{get preventScroll(){return Vk={preventScroll:!0},!0}}:void 0),!Vk){Vk=!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 jk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=Ik||(Ik=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function Wk(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 zk(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function Xk(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}var Fk=function(){function e(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];h(this,e),this.node=t,this.offset=n,this.precise=r}return m(e,null,[{key:"before",value:function(t,n){return new e(t.parentNode,Mk(t),n)}},{key:"after",value:function(t,n){return new e(t.parentNode,Mk(t)+1,n)}}]),e}(),Bk=[],qk=function(){function e(){h(this,e),this.parent=null,this.dom=null,this.flags=2}return m(e,[{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=P(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:"sync",value:function(t,n){if(2&this.flags){var r,i,o=this.dom,a=null,s=P(this.children);try{for(s.s();!(i=s.n()).done;){var l=i.value;if(7&l.flags){if(!l.dom&&(r=a?a.nextSibling:o.firstChild)){var u=e.get(r);(!u||!u.parent&&u.canReuseDOM(l))&&l.reuseDOM(r)}l.sync(t,n),l.flags&=-8}if(r=a?a.nextSibling:o.firstChild,n&&!n.written&&n.node==o&&r!=l.dom&&(n.written=!0),l.dom.parentNode==o)for(;r&&r!=l.dom;)r=Hk(r);else o.insertBefore(l.dom,r);a=l.dom}}catch(d){s.e(d)}finally{s.f()}for((r=a?a.nextSibling:o.firstChild)&&n&&n.node==o&&(n.written=!0);r;)r=Hk(r)}else if(1&this.flags){var c,f=P(this.children);try{for(f.s();!(c=f.n()).done;){var h=c.value;7&h.flags&&(h.sync(t,n),h.flags&=-8)}}catch(d){f.e(d)}finally{f.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==Zk(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.flags|=2,this.markParentsDirty(e)}},{key:"markParentsDirty",value:function(e){for(var t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}},{key:"setParent",value:function(e){this.parent!=e&&(this.parent=e,7&this.flags&&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]:Bk;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(f(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 Gk(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:"isWidget",get:function(){return!1}},{key:"isHidden",get:function(){return!1}},{key:"merge",value:function(e,t,n,r,i,o){return!1}},{key:"become",value:function(e){return!1}},{key:"canReuseDOM",value:function(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(e){return e.cmView}}]),e}();function Hk(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}qk.prototype.breakAfter=0;var Gk=function(){function e(t,n,r){h(this,e),this.children=t,this.pos=n,this.i=r,this.off=0}return m(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 Kk(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,h=f?f.breakAfter:a;if(!(t==r&&c&&!a&&!h&&o.length<2&&c.merge(n,i,o.length?f:null,0==n,s,l))){if(r<u.length){var d=u[r];d&&i<d.length?(t==r&&(d=d.split(i),i=0),!h&&f&&d.merge(0,i,f,!0,0,l)?o[o.length-1]=d:(i&&d.merge(0,i,null,!1,0,l),o.push(d))):(null===d||void 0===d?void 0:d.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 Jk(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),h=f.i,d=f.off,p=t-n,v=P(r);try{for(v.s();!(a=v.n()).done;){p+=a.value.length}}catch(m){v.e(m)}finally{v.f()}e.length+=p,Kk(e,h,d,u,c,r,0,i,o)}var eS="\uffff",tS=function(){function e(t,n){h(this,e),this.points=t,this.text="",this.lineSeparator=n.facet(Gw.lineSeparator)}return m(e,[{key:"append",value:function(e){this.text+=e}},{key:"lineBreak",value:function(){this.text+=eS}},{key:"readRange",value:function(e,t){if(!e)return this;for(var n=e.parentNode,r=e;;){this.findPointBefore(n,r);var i=this.text.length;this.readNode(r);var o=r.nextSibling;if(o==t)break;var a=qk.get(r),s=qk.get(o);(a&&s?a.breakAfter:(a?a.breakAfter:nS(r))||nS(o)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>i)&&this.lineBreak(),r=o}return this.findPointBefore(n,t),this}},{key:"readTextNode",value:function(e){var t,n=e.nodeValue,r=P(this.points);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length))}}catch(d){r.e(d)}finally{r.f()}for(var o=0,a=this.lineSeparator?null:/\r\n?|\n/g;;){var s=-1,l=1,u=void 0;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,o),l=this.lineSeparator.length):(u=a.exec(n))&&(s=u.index,l=u[0].length),this.append(n.slice(o,s<0?n.length:s)),s<0)break;if(this.lineBreak(),l>1){var c,f=P(this.points);try{for(f.s();!(c=f.n()).done;){var h=c.value;h.node==e&&h.pos>this.text.length&&(h.pos-=l-1)}}catch(d){f.e(d)}finally{f.f()}}o=s+l}}},{key:"readNode",value:function(e){if(!e.cmIgnore){var t=qk.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(var r=n.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}}},{key:"findPointBefore",value:function(e,t){var n,r=P(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:"findPointInside",value:function(e,t){var n,r=P(this.points);try{for(r.s();!(n=r.n()).done;){var i=n.value;(3==e.nodeType?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}catch(o){r.e(o)}finally{r.f()}}}]),e}();function nS(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}var rS=m((function e(t,n){h(this,e),this.node=t,this.offset=n,this.pos=-1})),iS="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},oS="undefined"!=typeof document?document:{documentElement:{style:{}}},aS=/Edge\/(\d+)/.exec(iS.userAgent),sS=/MSIE \d/.test(iS.userAgent),lS=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(iS.userAgent),uS=!!(sS||lS||aS),cS=!uS&&/gecko\/(\d+)/i.test(iS.userAgent),fS=!uS&&/Chrome\/(\d+)/.exec(iS.userAgent),hS="webkitFontSmoothing"in oS.documentElement.style,dS=!uS&&/Apple Computer/.test(iS.vendor),pS=dS&&(/Mobile\/\w+/.test(iS.userAgent)||iS.maxTouchPoints>2),vS={mac:pS||/Mac/.test(iS.platform),windows:/Win/.test(iS.platform),linux:/Linux|X11/.test(iS.platform),ie:uS,ie_version:sS?oS.documentMode||6:lS?+lS[1]:aS?+aS[1]:0,gecko:cS,gecko_version:cS?+(/Firefox\/(\d+)/.exec(iS.userAgent)||[0,0])[1]:0,chrome:!!fS,chrome_version:fS?+fS[1]:0,ios:pS,android:/Android\b/.test(iS.userAgent),webkit:hS,safari:dS,webkit_version:hS?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=oS.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},mS=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),(r=t.call(this)).text=e,r}return m(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,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.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!(8&this.flags||r&&(!(r instanceof n)||this.length-(t-e)+r.length>256||8&r.flags))&&(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.flags|=8&this.flags,t}},{key:"localPosFromDOM",value:function(e,t){return e==this.dom?t:t?this.text.length:0}},{key:"domAtPos",value:function(e){return new Fk(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 function(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?vS.chrome||vS.gecko||(t?(i--,a=1):o<r&&(o++,a=-1)):n<0?i--:o<r&&o++;var s=jk(e,i,o).getClientRects();if(!s.length)return null;var l=s[(a?a<0:n>=0)?0:s.length-1];vS.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,(function(e){return e.width}))||l);return a?Dk(l,a<0):l||null}(this.dom,e,t)}}]),n}(qk),gS=function(e){y(n,e);var t=k(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;h(this,n),(r=t.call(this)).mark=e,r.children=i,r.length=o;var a,s=P(i);try{for(s.s();!(a=s.n()).done;){a.value.setParent(w(r))}}catch(l){s.e(l)}finally{s.f()}return r}return m(n,[{key:"setAttrs",value:function(e){if(zk(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:"canReuseDOM",value:function(e){return Eb(O(n.prototype),"canReuseDOM",this).call(this,e)&&!(8&(this.flags|e.flags))}},{key:"reuseDOM",value:function(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}},{key:"sync",value:function(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),Eb(O(n.prototype),"sync",this).call(this,e,t)}},{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))&&(Jk(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=P(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 bS(this,e)}},{key:"coordsAt",value:function(e,t){return kS(this,e,t)}}]),n}(qk);var yS=function(e){y(n,e);var t=k(n);function n(e,r,i){var o;return h(this,n),(o=t.call(this)).widget=e,o.length=r,o.side=i,o.prevWidget=null,o}return m(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(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}},{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 instanceof n&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}},{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 Qb.empty;for(var e=this;e.parent;)e=e.parent;var t=e.view,n=t&&t.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):Qb.empty}},{key:"domAtPos",value:function(e){return(this.length?0==e:this.side>0)?Fk.before(this.dom):Fk.after(this.dom,e==this.length)}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(e,t){var n=this.widget.coordsAt(this.dom,e,t);if(n)return n;var r=this.dom.getClientRects(),i=null;if(!r.length)return null;for(var o=this.side?this.side<0:e>0,a=o?r.length-1:0;i=r[a],!(e>0?0==a:a==r.length-1||i.top<i.bottom);a+=o?-1:1);return Dk(i,!o)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"isHidden",get:function(){return this.widget.isHidden}},{key:"destroy",value:function(){Eb(O(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(e,t,r){return new n(e,t,r)}}]),n}(qk),OS=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),(r=t.call(this)).side=e,r}return m(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(){if(!this.dom){var e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}},{key:"getSide",value:function(){return this.side}},{key:"domAtPos",value:function(e){return this.side>0?Fk.before(this.dom):Fk.after(this.dom)}},{key:"localPosFromDOM",value:function(){return 0}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(e){return this.dom.getBoundingClientRect()}},{key:"overrideDOMText",get:function(){return Qb.empty}},{key:"isHidden",get:function(){return!0}}]),n}(qk);function bS(e,t){for(var n=e.dom,r=e.children,i=0,o=0;i<r.length;i++){var a=r[i],s=o+a.length;if(!(s==o&&a.getSide()<=0)){if(t>o&&t<s&&a.dom.parentNode==n)return a.domAtPos(t-o);if(t<=o)break;o=s}}for(var l=i;l>0;l--){var u=r[l-1];if(u.dom.parentNode==n)return u.domAtPos(u.length)}for(var c=i;c<r.length;c++){var f=r[c];if(f.dom.parentNode==n)return f.domAtPos(0)}return new Fk(n,0)}function wS(e,t,n){var r,i=e.children;n>0&&t instanceof gS&&i.length&&(r=i[i.length-1])instanceof gS&&r.mark.eq(t.mark)?wS(r,t.children[0],n-1):(i.push(t),t.setParent(e)),e.length+=t.length}function kS(e,t,n){var r=null,i=-1,o=null,a=-1;!function e(t,s){for(var l=0,u=0;l<t.children.length&&u<=s;l++){var c=t.children[l],f=u+c.length;f>=s&&(c.children.length?e(c,s-u):(!o||o.isHidden&&n>0)&&(f>s||u==f&&c.getSide()>0)?(o=c,a=s-u):(u<s||u==f&&c.getSide()<0&&!c.isHidden)&&(r=c,i=s-u)),u=f}}(e,t);var s=(n<0?r:o)||r||o;return s?s.coordsAt(Math.max(0,s==r?i:a),n):function(e){var t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();var n=Rk(t);return n[n.length-1]||null}(e)}function SS(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}mS.prototype.children=yS.prototype.children=OS.prototype.children=Bk;var xS=Object.create(null);function CS(e,t,n){if(e==t)return!0;e||(e=xS),t||(t=xS);var r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(var o=0,a=r;o<a.length;o++){var s=a[o];if(s!=n&&(-1==i.indexOf(s)||e[s]!==t[s]))return!1}return!0}function PS(e,t,n){var r=!1;if(t)for(var i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(var o in n)t&&t[o]==n[o]||(r=!0,"style"==o?e.style.cssText=n[o]:e.setAttribute(o,n[o]));return r}function ES(e){for(var t=Object.create(null),n=0;n<e.attributes.length;n++){var r=e.attributes[n];t[r.name]=r.value}return t}var QS=function(){function e(){h(this,e)}return m(e,[{key:"eq",value:function(e){return!1}},{key:"updateDOM",value:function(e,t){return!1}},{key:"compare",value:function(e){return this==e||this.constructor==e.constructor&&this.eq(e)}},{key:"estimatedHeight",get:function(){return-1}},{key:"lineBreaks",get:function(){return 0}},{key:"ignoreEvent",value:function(e){return!0}},{key:"coordsAt",value:function(e,t,n){return null}},{key:"isHidden",get:function(){return!1}},{key:"destroy",value:function(e){}}]),e}(),TS=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(TS||(TS={})),$S=function(e){y(n,e);var t=k(n);function n(e,r,i,o){var a;return h(this,n),(a=t.call(this)).startSide=e,a.endSide=r,a.widget=i,a.spec=o,a}return m(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 _S(e)}},{key:"widget",value:function(e){var t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new AS(e,t,t,n,e.widget||null,!1)}},{key:"replace",value:function(e){var t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{var i=MS(e,r);t=(i.start?r?-3e8:-1:5e8)-1,n=1+(i.end?r?2e8:1:-6e8)}return new AS(e,t,n,r,e.widget||null,!0)}},{key:"line",value:function(e){return new RS(e)}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return rk.of(e,t)}}]),n}(Jw);$S.none=rk.empty;var _S=function(e){y(n,e);var t=k(n);function n(e){var r;h(this,n);var i=MS(e),o=i.start,a=i.end;return(r=t.call(this,o?-1:5e8,a?1:-6e8,null,e)).tagName=e.tagName||"span",r.class=e.class||"",r.attrs=e.attributes||null,r}return m(n,[{key:"eq",value:function(e){var t,r;return this==e||e instanceof n&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(r=e.attrs)||void 0===r?void 0:r.class))&&CS(this.attrs,e.attrs,"class")}},{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 Eb(O(n.prototype),"range",this).call(this,e,t)}}]),n}($S);_S.prototype.point=!1;var RS=function(e){y(n,e);var t=k(n);function n(e){return h(this,n),t.call(this,-2e8,-2e8,null,e)}return m(n,[{key:"eq",value:function(e){return e instanceof n&&this.spec.class==e.spec.class&&CS(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 Eb(O(n.prototype),"range",this).call(this,e,t)}}]),n}($S);RS.prototype.mapMode=Gb.TrackBefore,RS.prototype.point=!0;var AS=function(e){y(n,e);var t=k(n);function n(e,r,i,o,a,s){var l;return h(this,n),(l=t.call(this,r,i,a,e)).block=o,l.isReplace=s,l.mapMode=o?r<=0?Gb.TrackBefore:Gb.TrackAfter:Gb.TrackDel,l}return m(n,[{key:"type",get:function(){return this.startSide<this.endSide?TS.WidgetRange:this.startSide<=0?TS.WidgetBefore:TS.WidgetAfter}},{key:"heightRelevant",get:function(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}},{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 Eb(O(n.prototype),"range",this).call(this,e,t)}}]),n}($S);function MS(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 NS(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)}AS.prototype.point=!0;var ZS=function(e){y(n,e);var t=k(n);function n(){var e;return h(this,n),(e=t.apply(this,arguments)).children=[],e.length=0,e.prevAttrs=void 0,e.attrs=null,e.breakAfter=0,e}return m(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),Jk(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&&(this.markDirty(),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){CS(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}},{key:"append",value:function(e,t){wS(this,e,t)}},{key:"addLineDeco",value:function(e){var t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=SS(t,this.attrs||{})),n&&(this.attrs=SS({class:n},this.attrs||{}))}},{key:"domAtPos",value:function(e){return bS(this,e)}},{key:"reuseDOM",value:function(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}},{key:"sync",value:function(e,t){var r;this.dom?4&this.flags&&(zk(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&&(PS(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),Eb(O(n.prototype),"sync",this).call(this,e,t);for(var i=this.dom.lastChild;i&&qk.get(i)instanceof gS;)i=i.lastChild;if(!i||!this.length||"BR"!=i.nodeName&&0==(null===(r=qk.get(i))||void 0===r?void 0:r.isEditable)&&(!vS.ios||!this.children.some((function(e){return e instanceof mS})))){var o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var e,t,n=0,r=P(this.children);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!(i instanceof mS)||/[^ -~]/.test(i.text))return null;var o=Rk(i.dom);if(1!=o.length)return null;n+=o[0].width,e=o[0].height}}catch(a){r.e(a)}finally{r.f()}return n?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:n/this.length,textHeight:e}:null}},{key:"coordsAt",value:function(e,t){var n=kS(this,e,t);if(!this.children.length&&n&&this.parent){var r=this.parent.view.viewState.heightOracle,i=n.bottom-n.top;if(Math.abs(i-r.lineHeight)<2&&r.textHeight<i){var o=(i-r.textHeight)/2;return{top:n.top+o,bottom:n.bottom-o,left:n.left,right:n.left}}}return n}},{key:"become",value:function(e){return!1}},{key:"type",get:function(){return TS.Text}}],[{key:"find",value:function(e,t){for(var r=0,i=0;r<e.children.length;r++){var o=e.children[r],a=i+o.length;if(a>=t){if(o instanceof n)return o;if(a>t)break}i=a+o.breakAfter}return null}}]),n}(qk),DS=function(e){y(n,e);var t=k(n);function n(e,r,i){var o;return h(this,n),(o=t.call(this)).widget=e,o.length=r,o.type=i,o.breakAfter=0,o.prevWidget=null,o}return m(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?Fk.before(this.dom):Fk.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 Bk}},{key:"sync",value:function(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}},{key:"overrideDOMText",get:function(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Qb.empty}},{key:"domBoundsAround",value:function(){return null}},{key:"become",value:function(e){return e instanceof n&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.type=e.type,this.breakAfter=e.breakAfter,!0)}},{key:"ignoreMutation",value:function(){return!0}},{key:"ignoreEvent",value:function(e){return this.widget.ignoreEvent(e)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"coordsAt",value:function(e,t){return this.widget.coordsAt(this.dom,e,t)}},{key:"destroy",value:function(){Eb(O(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}]),n}(qk),LS=function(){function e(t,n,r,i){h(this,e),this.doc=t,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=n}return m(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 DS&&e.type==TS.WidgetBefore)}},{key:"getLine",value:function(){return this.curLine||(this.content.push(this.curLine=new ZS),this.atCursorPos=!0),this.curLine}},{key:"flushBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(IS(new OS(-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){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,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,this.atCursorPos=!0,e--;continue}this.text=i,this.textOff=0}var s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(IS(new mS(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,o){if(this.disallowBlockEffectsFor[o]&&n instanceof AS){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=t-e;if(n instanceof AS)if(n.block){var s=n.type;s!=TS.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new DS(n.widget||new YS("div"),a,s))}else{var l=yS.create(n.widget||new YS("span"),a,a?0:n.startSide),u=this.atCursorPos&&!l.isEditable&&i<=r.length&&(e<t||n.startSide>0),c=!l.isEditable&&(e<t||i>r.length||n.startSide<=0),f=this.getLine();2!=this.pendingBuffer||u||l.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),u&&(f.append(IS(new OS(1),r),i),i=r.length+Math.max(0,i-r.length)),f.append(IS(l,r),i),this.atCursorPos=c,this.pendingBuffer=c?e<t||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}}],[{key:"build",value:function(t,n,r,i,o){var a=new e(t,n,r,o);return a.openEnd=rk.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}]),e}();function IS(e,t){var n,r=P(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;e=new gS(i,[e],e.length)}}catch(o){r.e(o)}finally{r.f()}return e}var YS=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),(r=t.call(this)).tag=e,r}return m(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}},{key:"isHidden",get:function(){return!0}}]),n}(QS),VS=cw.define(),US=cw.define(),jS=cw.define(),WS=cw.define(),zS=cw.define(),XS=cw.define(),FS=cw.define(),BS=cw.define({combine:function(e){return e.some((function(e){return e}))}}),qS=cw.define({combine:function(e){return e.some((function(e){return e}))}}),HS=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;h(this,e),this.range=t,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o}return m(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}(),GS=Iw.define({map:function(e,t){return e.map(t)}});function KS(e,t,n){var r=e.facet(WS);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 JS=cw.define({combine:function(e){return!e.length||e[0]}}),ex=0,tx=cw.define(),nx=function(){function e(t,n,r,i){h(this,e),this.id=t,this.create=n,this.domEventHandlers=r,this.extension=i(this)}return m(e,null,[{key:"define",value:function(t,n){var r=n||{},i=r.eventHandlers,o=r.provide,a=r.decorations;return new e(ex++,t,i,(function(e){var t=[tx.of(e)];return a&&t.push(ax.of((function(t){var n=t.plugin(e);return n?a(n):$S.none}))),o&&t.push(o(e)),t}))}},{key:"fromClass",value:function(t,n){return e.define((function(e){return new t(e)}),n)}}]),e}(),rx=function(){function e(t){h(this,e),this.spec=t,this.mustUpdate=null,this.value=null}return m(e,[{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(KS(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(oD){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){KS(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){KS(e.state,n,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),e}(),ix=cw.define(),ox=cw.define(),ax=cw.define(),sx=cw.define(),lx=cw.define();function ux(e,t,n){var r=e.state.facet(lx);if(!r.length)return r;var i=r.map((function(t){return t instanceof Function?t(e):t})),o=[];return rk.spans(i,t,n,{point:function(){},span:function(e,t,n,r){for(var i=o,a=n.length-1;a>=0;a--,r--){var s=n[a].spec.bidiIsolate,l=void 0;if(null!=s)if(r>0&&i.length&&(l=i[i.length-1]).to==e&&l.direction==s)l.to=t,i=l.inner;else{var u={from:e,to:t,direction:s,inner:[]};i.push(u),i=u.inner}}}}),o}var cx=cw.define();function fx(e){var t,n=0,r=0,i=0,o=0,a=P(e.state.facet(cx));try{for(a.s();!(t=a.n()).done;){var s=(0,t.value)(e);s&&(null!=s.left&&(n=Math.max(n,s.left)),null!=s.right&&(r=Math.max(r,s.right)),null!=s.top&&(i=Math.max(i,s.top)),null!=s.bottom&&(o=Math.max(o,s.bottom)))}}catch(l){a.e(l)}finally{a.f()}return{left:n,right:r,top:i,bottom:o}}var hx=cw.define(),dx=function(){function e(t,n,r,i){h(this,e),this.fromA=t,this.toA=n,this.fromB=r,this.toB=i}return m(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],h=n[o+1],d=Math.max(s,f),p=Math.min(c,h);if(d<=p&&new e(d+u,p+u,d,p).addToSet(r),h>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}(),px=function(){function e(t,n,r){h(this,e),this.view=t,this.state=n,this.transactions=r,this.flags=0,this.startState=t.state,this.changes=Jb.empty(this.startState.doc.length);var i,o=P(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.changes=this.changes.compose(a.changes)}}catch(l){o.e(l)}finally{o.f()}var s=[];this.changes.iterChangedRanges((function(e,t,n,r){return s.push(new dx(e,t,n,r))})),this.changedRanges=s}return m(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}}],[{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}(),vx=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(vx||(vx={})),mx=vx.LTR,gx=vx.RTL;function yx(e){for(var t=[],n=0;n<e.length;n++)t.push(1<<+e[n]);return t}for(var Ox=yx("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),bx=yx("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),wx=Object.create(null),kx=[],Sx=0,xx=["()","[]","{}"];Sx<xx.length;Sx++){var Cx=xx[Sx],Px=Cx.charCodeAt(0),Ex=Cx.charCodeAt(1);wx[Px]=Ex,wx[Ex]=-Px}var Qx=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,Tx=function(){function e(t,n,r){h(this,e),this.from=t,this.to=n,this.level=r}return m(e,[{key:"dir",get:function(){return this.level%2?gx:mx}},{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}();function $x(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.direction!=i.direction||!$x(r.inner,i.inner))return!1}return!0}var _x=[];function Rx(e,t,n,r,i,o,a){var s=r%2?2:1;if(r%2==i%2)for(var l=t,u=0;l<n;){var c=!0,f=!1;if(u==o.length||l<o[u].from){var h=_x[l];h!=s&&(c=!1,f=16==h)}var d=c||1!=s?null:[],p=c?r:r+1,v=l;e:for(;;)if(u<o.length&&v==o[u].from){if(f)break e;var m=o[u];if(!c)for(var g=m.to,y=u+1;;){if(g==n)break e;if(!(y<o.length&&o[y].from==g)){if(_x[g]==s)break e;break}g=o[y++].to}if(u++,d)d.push(m);else m.from>l&&a.push(new Tx(l,m.from,p)),Ax(e,m.direction==mx!=!(p%2)?r+1:r,i,m.inner,m.from,m.to,a),l=m.to;v=m.to}else{if(v==n||(c?_x[v]!=s:_x[v]==s))break;v++}d?Rx(e,l,v,r+1,i,d,a):l<v&&a.push(new Tx(l,v,p)),l=v}else for(var O=n,b=o.length;O>t;){var w=!0,k=!1;if(!b||O>o[b-1].to){var S=_x[O-1];S!=s&&(w=!1,k=16==S)}var x=w||1!=s?null:[],C=w?r:r+1,P=O;e:for(;;)if(b&&P==o[b-1].to){if(k)break e;var E=o[--b];if(!w)for(var Q=E.from,T=b;;){if(Q==t)break e;if(!T||o[T-1].to!=Q){if(_x[Q-1]==s)break e;break}Q=o[--T].from}if(x)x.push(E);else E.to<O&&a.push(new Tx(E.to,O,C)),Ax(e,E.direction==mx!=!(C%2)?r+1:r,i,E.inner,E.from,E.to,a),O=E.from;P=E.from}else{if(P==t||(w?_x[P-1]!=s:_x[P-1]==s))break;P--}x?Rx(e,P,O,r+1,i,x,a):P<O&&a.push(new Tx(P,O,C)),O=P}}function Ax(e,t,n,r,i,o,a){var s=t%2?2:1;!function(e,t,n,r,i){for(var o=0;o<=r.length;o++){for(var a=o?r[o-1].to:t,s=o<r.length?r[o].from:n,l=o?256:i,u=a,c=l,f=l;u<s;u++){var h=(b=e.charCodeAt(u))<=247?Ox[b]:1424<=b&&b<=1524?2:1536<=b&&b<=1785?bx[b-1536]:1774<=b&&b<=2220?4:8192<=b&&b<=8203?256:64336<=b&&b<=65023?4:8204==b?256:1;512==h?h=c:8==h&&4==f&&(h=16),_x[u]=4==h?2:h,7&h&&(f=h),c=h}for(var d=a,p=l,v=l;d<s;d++){var m=_x[d];if(128==m)d<s-1&&p==_x[d+1]&&24&p?m=_x[d]=p:_x[d]=256;else if(64==m){for(var g=d+1;g<s&&64==_x[g];)g++;for(var y=d&&8==p||g<n&&8==_x[g]?1==v?1:8:256,O=d;O<g;O++)_x[O]=y;d=g-1}else 8==m&&1==v&&(_x[d]=1);p=m,7&m&&(v=m)}}var b}(e,i,o,r,s),function(e,t,n,r,i){for(var o=1==i?2:1,a=0,s=0,l=0;a<=r.length;a++)for(var u,c,f,h=a?r[a-1].to:t,d=a<r.length?r[a].from:n,p=h;p<d;p++)if(c=wx[u=e.charCodeAt(p)])if(c<0){for(var v=s-3;v>=0;v-=3)if(kx[v+1]==-c){var m=kx[v+2],g=2&m?i:4&m?1&m?o:i:0;g&&(_x[p]=_x[kx[v]]=g),s=v;break}}else{if(189==kx.length)break;kx[s++]=p,kx[s++]=u,kx[s++]=l}else if(2==(f=_x[p])||1==f){var y=f==i;l=y?0:1;for(var O=s-3;O>=0;O-=3){var b=kx[O+2];if(2&b)break;if(y)kx[O+2]|=2;else{if(4&b)break;kx[O+2]|=4}}}}(e,i,o,r,s),function(e,t,n,r){for(var i=0,o=r;i<=n.length;i++)for(var a=i?n[i-1].to:e,s=i<n.length?n[i].from:t,l=a;l<s;){var u=_x[l];if(256==u){for(var c=l+1;;)if(c==s){if(i==n.length)break;c=n[i++].to,s=i<n.length?n[i].from:t}else{if(256!=_x[c])break;c++}for(var f=1==o,h=f==(1==(c<t?_x[c]:r))?f?1:2:r,d=c,p=i,v=p?n[p-1].to:e;d>l;)d==v&&(d=n[--p].from,v=p?n[p-1].to:e),_x[--d]=h;l=c}else o=u,l++}}(i,o,r,s),Rx(e,i,o,t,n,r,a)}function Mx(e,t,n){if(!e)return[new Tx(0,0,t==gx?1:0)];if(t==mx&&!n.length&&!Qx.test(e))return Nx(e.length);if(n.length)for(;e.length>_x.length;)_x[_x.length]=256;var r=[],i=t==mx?0:1;return Ax(e,i,i,n,0,e.length,r),r}function Nx(e){return[new Tx(0,e,0)]}var Zx="";function Dx(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=Tx.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=Ub(e.text,a,c);if(Zx=e.text.slice(Math.min(a,f),Math.max(a,f)),f!=u.side(i,n))return sw.cursor(f+e.from,c?-1:1,u.level);var h=s==(i?t.length-1:0)?null:t[s+(i?1:-1)];return h||u.level==n?h&&h.level<u.level?sw.cursor(h.side(!i,n)+e.from,i?1:-1,h.level):sw.cursor(f+e.from,i?-1:1,u.level):sw.cursor(i?e.to:e.from,i?-1:1,n)}var Lx=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),(r=t.call(this)).view=e,r.decorations=[],r.dynamicDecorationMap=[],r.hasComposition=null,r.markedForComposition=new Set,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 ZS],r.children[0].setParent(w(r)),r.updateDeco(),r.updateInner([new dx(0,0,0,e.state.doc.length)],0,null),r}return m(n,[{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);var r=this.view.inputState.composing<0?null:function(e,t){var n=Yx(e,t.newLength-t.length);if(!n)return null;var r=n.from,i=n.to,o=n.node,a=t.mapPos(r,-1),s=t.mapPos(i,1),l=o.nodeValue;if(/[\n\r]/.test(l))return null;if(s-a!=l.length){var u=t.mapPos(r,1),c=t.mapPos(i,-1);if(c-u==l.length)a=u,s=c;else if(e.state.doc.sliceString(s-l.length,s)==l)a=s-l.length;else{if(e.state.doc.sliceString(a,a+l.length)!=l)return null;s=a+l.length}}var f=e.state.selection.main;if(e.state.doc.sliceString(a,s)!=l||a>f.head||s<f.head)return null;for(var h=[],d=new dx(r,i,a,s),p=o.parentNode;;p=p.parentNode){var v=qk.get(p);if(v instanceof gS)h.push({node:p,deco:v.mark});else{if(v instanceof ZS||"DIV"==p.nodeName&&p.parentNode==e.contentDOM)return{range:d,text:o,marks:h,line:p};if(p==e.contentDOM)return null;h.push({node:p,deco:new _S({inclusive:!0,attributes:ES(p),tagName:p.tagName.toLowerCase()})})}}}(this.view,e.changes);if(this.hasComposition){this.markedForComposition.clear();var i=this.hasComposition,o=i.from,a=i.to;n=new dx(o,a,e.changes.mapPos(o,-1),e.changes.mapPos(a,1)).addToSet(n.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(vS.ie||vS.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);var s=function(e,t,n){var r=new Ux;return rk.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=dx.extendWithRanges(n,s),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,r),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.flexBasis=r.minWidth?r.minWidth+"px":"";var e=vS.chrome||vS.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;r.sync(r.view,e),r.flags&=-8,e&&(e.written||i.selectionRange.focusNode!=e.node)&&(r.forceSelection=!0),r.dom.style.height=""})),this.markedForComposition.forEach((function(e){return e.flags&=-9}));var o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length){var a,s=P(this.children);try{for(s.s();!(a=s.n()).done;){var l=a.value;l instanceof DS&&l.widget instanceof Ix&&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=n?n.range.addToSet(e.slice()):e,i=this.childCursor(t),o=r.length-1;;o--){var a=o>=0?r[o]:null;if(!a)break;var s=a.fromA,l=a.toA,u=a.fromB,c=a.toB,f=void 0,h=void 0,d=void 0,p=void 0;if(n&&n.range.fromB<c&&n.range.toB>u){var v=LS.build(this.view.state.doc,u,n.range.fromB,this.decorations,this.dynamicDecorationMap),m=LS.build(this.view.state.doc,n.range.toB,c,this.decorations,this.dynamicDecorationMap);h=v.breakAtStart,d=v.openStart,p=m.openEnd;var g=this.compositionView(n);m.breakAtStart?g.breakAfter=1:m.content.length&&g.merge(g.length,g.length,m.content[0],!1,m.openStart,0)&&(g.breakAfter=m.content[0].breakAfter,m.content.shift()),v.content.length&&g.merge(0,0,v.content[v.content.length-1],!0,0,v.openEnd)&&v.content.pop(),f=v.content.concat(g).concat(m.content)}else{var y=LS.build(this.view.state.doc,u,c,this.decorations,this.dynamicDecorationMap);f=y.content,h=y.breakAtStart,d=y.openStart,p=y.openEnd}var O=i.findPos(l,1),b=O.i,w=O.off,k=i.findPos(s,-1);Kk(this,k.i,k.off,b,w,f,h,d,p)}n&&this.fixCompositionDOM(n)}},{key:"compositionView",value:function(e){var t=new mS(e.text.nodeValue);t.flags|=8;var n,r=P(e.marks);try{for(r.s();!(n=r.n()).done;){var i=n.value.deco;t=new gS(i,[t],t.length)}}catch(a){r.e(a)}finally{r.f()}var o=new ZS;return o.append(t,0),o}},{key:"fixCompositionDOM",value:function(e){var t=this,n=function(e,n){n.flags|=8,t.markedForComposition.add(n);var r=qk.get(e);r!=n&&(r&&(r.dom=null),n.setDOM(e))},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(var o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}},{key:"updateSelection",value:function(){var e=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();var n=this.view.root.activeElement,r=n==this.dom,i=!r&&_k(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(r||t||i){var o=this.forceSelection;this.forceSelection=!1;var a,s=this.view.state.selection.main,l=this.domAtPos(s.anchor),u=s.empty?l:this.domAtPos(s.head);if(vS.gecko&&s.empty&&!this.hasComposition&&(1==(a=l).node.nodeType&&a.node.firstChild&&(0==a.offset||"false"==a.node.childNodes[a.offset-1].contentEditable)&&(a.offset==a.node.childNodes.length||"false"==a.node.childNodes[a.offset].contentEditable))){var c=document.createTextNode("");this.view.observer.ignore((function(){return l.node.insertBefore(c,l.node.childNodes[l.offset]||null)})),l=u=new Fk(c,0),o=!0}var f=this.view.observer.selectionRange;!o&&f.focusNode&&Ak(l.node,l.offset,f.anchorNode,f.anchorOffset)&&Ak(u.node,u.offset,f.focusNode,f.focusOffset)||(this.view.observer.ignore((function(){vS.android&&vS.chrome&&e.dom.contains(f.focusNode)&&function(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}(f.focusNode,e.dom)&&(e.dom.blur(),e.dom.focus({preventScroll:!0}));var t,r,o=Tk(e.view.root);if(o)if(s.empty){if(vS.gecko){var a=(t=l.node,r=l.offset,1!=t.nodeType?0:(r&&"false"==t.childNodes[r-1].contentEditable?1:0)|(r<t.childNodes.length&&"false"==t.childNodes[r].contentEditable?2:0));if(a&&3!=a){var c=Vx(l.node,l.offset,1==a?1:-1);c&&(l=new Fk(c,1==a?0:c.nodeValue.length))}}o.collapse(l.node,l.offset),null!=s.bidiLevel&&null!=f.caretBidiLevel&&(f.caretBidiLevel=s.bidiLevel)}else if(o.extend){o.collapse(l.node,l.offset);try{o.extend(u.node,u.offset)}catch(oD){}}else{var h=document.createRange();if(s.anchor>s.head){var d=[u,l];l=d[0],u=d[1]}h.setEnd(u.node,u.offset),h.setStart(l.node,l.offset),o.removeAllRanges(),o.addRange(h)}else;i&&e.view.root.activeElement==e.dom&&(e.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new Fk(f.anchorNode,f.anchorOffset),this.impreciseHead=u.precise?null:new Fk(f.focusNode,f.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.hasComposition){var e=this.view,t=e.state.selection.main,n=Tk(e.root),r=e.observer.selectionRange,i=r.anchorNode,o=r.anchorOffset;if(n&&t.empty&&t.assoc&&n.modify){var a=ZS.find(this,t.head);if(a){var s=a.posAtStart;if(t.head!=s&&t.head!=s+a.length){var l=this.coordsAt(t.head,-1),u=this.coordsAt(t.head,1);if(l&&u&&!(l.bottom>u.top)){var c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();var f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(i,o)}}}}}}},{key:"nearest",value:function(e){for(var t=e;t;){var n=qk.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 ZS)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!=TS.WidgetBefore&&i.type!=TS.WidgetAfter&&(!r||2==t||this.children[r-1].breakAfter||this.children[r-1].type==TS.WidgetBefore&&t>-2))return i.coordsAt(e-o,t);n=o}}},{key:"coordsForChar",value:function(e){var t=this.childPos(e,1),n=t.i,r=t.off,i=this.children[n];if(!(i instanceof ZS))return null;for(;i.children.length;){for(var o=i.childPos(r,1),a=o.i,s=o.off;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=s}if(!(i instanceof mS))return null;var l=Ub(i.text,r);if(l==r)return null;var u=jk(i.dom,r,l).getClientRects();return!u.length||u[0].top>=u[0].bottom?null:u[0]}},{key:"measureVisibleLineHeights",value:function(e){for(var t=[],n=e.from,r=e.to,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==vx.LTR,l=0,u=0;u<this.children.length;u++){var c=this.children[u],f=l+c.length;if(f>r)break;if(l>=n){var h=c.dom.getBoundingClientRect();if(t.push(h.height),o){var d=c.dom.lastChild,p=d?Rk(d):[];if(p.length){var v=p[p.length-1],m=s?v.right-h.left:h.right-v.left;m>a&&(a=m,this.minWidth=i,this.minWidthFrom=l,this.minWidthTo=f)}}}l=f+c.breakAfter}return t}},{key:"textDirectionAt",value:function(e){var t=this.childPos(e,1).i;return"rtl"==getComputedStyle(this.children[t].dom).direction?vx.RTL:vx.LTR}},{key:"measureTextSize",value:function(){var e,t=this,n=P(this.children);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r instanceof ZS){var i=r.measureTextSize();if(i)return i}}}catch(u){n.e(u)}finally{n.f()}var o,a,s,l=document.createElement("div");return l.className="cm-line",l.style.width="99999px",l.style.position="absolute",l.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((function(){t.dom.appendChild(l);var e=Rk(l.firstChild)[0];o=l.getBoundingClientRect().height,a=e?e.width/27:7,s=e?e.height:o,l.remove()})),{lineHeight:o,charWidth:a,textHeight:s}}},{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 Gk(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($S.replace({widget:new Ix(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return $S.set(e)}},{key:"updateDeco",value:function(){for(var e=this,t=this.view.state.facet(ax).map((function(t,n){return(e.dynamicDecorationMap[n]="function"==typeof t)?t(e.view):t})),n=t.length;n<t.length+3;n++)this.dynamicDecorationMap[n]=!1;return this.decorations=[].concat(f(t),[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=fx(this.view),o={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom};!function(e,t,n,r,i,o,a,s){for(var l=e.ownerDocument,u=l.defaultView||window,c=e,f=!1;c&&!f;)if(1==c.nodeType){var h=void 0,d=c==l.body;if(d)h=Lk(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}var p=c.getBoundingClientRect();h={left:p.left,right:p.left+c.clientWidth,top:p.top,bottom:p.top+c.clientHeight}}var v=0,m=0;if("nearest"==i)t.top<h.top?(m=-(h.top-t.top+a),n>0&&t.bottom>h.bottom+m&&(m=t.bottom-h.bottom+m+a)):t.bottom>h.bottom&&(m=t.bottom-h.bottom+a,n<0&&t.top-m<h.top&&(m=-(h.top+m-t.top+a)));else{var g=t.bottom-t.top,y=h.bottom-h.top;m=("center"==i&&g<=y?t.top+g/2-y/2:"start"==i||"center"==i&&n<0?t.top-a:t.bottom-y+a)-h.top}if("nearest"==r?t.left<h.left?(v=-(h.left-t.left+o),n>0&&t.right>h.right+v&&(v=t.right-h.right+v+o)):t.right>h.right&&(v=t.right-h.right+o,n<0&&t.left<h.left+v&&(v=-(h.left+v-t.left+o))):v=("center"==r?t.left+(t.right-t.left)/2-(h.right-h.left)/2:"start"==r==s?t.left-o:t.right-(h.right-h.left)+o)-h.left,v||m)if(d)u.scrollBy(v,m);else{var O=0,b=0;if(m){var w=c.scrollTop;c.scrollTop+=m,b=c.scrollTop-w}if(v){var k=c.scrollLeft;c.scrollLeft+=v,O=c.scrollLeft-k}t={left:t.left-O,top:t.top-b,right:t.right-O,bottom:t.bottom-b},O&&Math.abs(O-v)<1&&(r="nearest"),b&&Math.abs(b-m)<1&&(i="nearest")}if(d)break;c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==vx.LTR)}}}]),n}(qk);var Ix=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),(r=t.call(this)).height=e,r}return m(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}(QS);function Yx(e,t){var n=e.observer.selectionRange,r=n.focusNode&&Vx(n.focusNode,n.focusOffset,0);if(!r)return null;var i,o,a=qk.get(r);if(a instanceof mS)o=(i=a.posAtStart)+a.length;else{var s=Math.max(0,r.nodeValue.length-t);e:for(var l=0,u=r;;){for(var c,f=u.previousSibling;f;f=f.previousSibling){if(c=qk.get(f)){o=c.posAtEnd+l,i=Math.max(0,o-s);break e}var h=new tS([],e.state);if(h.readNode(f),h.text.indexOf(eS)>-1)return null;l+=h.text.length}if(!(u=u.parentNode))return null;var d=qk.get(u);if(d){o=(i=d.posAtStart+l)+s;break}}}return{from:i,to:o,node:r}}function Vx(e,t,n){if(n<=0)for(var r=e,i=t;;){if(3==r.nodeType)return r;if(!(1==r.nodeType&&i>0))break;i=Zk(r=r.childNodes[i-1])}if(n>=0)for(var o=e,a=t;;){if(3==o.nodeType)return o;if(!(1==o.nodeType&&a<o.childNodes.length&&n>=0))break;o=o.childNodes[a],a=0}return null}var Ux=function(){function e(){h(this,e),this.changes=[]}return m(e,[{key:"compareRange",value:function(e,t){NS(e,t,this.changes)}},{key:"comparePoint",value:function(e,t){NS(e,t,this.changes)}}]),e}();function jx(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function Wx(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function zx(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function Xx(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function Fx(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function Bx(e,t,n){for(var r,i,o,a,s,l,u,c,f=!1,h=e.firstChild;h;h=h.nextSibling)for(var d=Rk(h),p=0;p<d.length;p++){var v=d[p];i&&zx(i,v)&&(v=Xx(Fx(v,i.bottom),i.top));var m=jx(t,v),g=Wx(n,v);if(0==m&&0==g)return 3==h.nodeType?qx(h,t,n):Bx(h,t,n);if(!r||a>g||a==g&&o>m){r=h,i=v,o=m,a=g;var y=g?n<v.top?-1:1:m?t<v.left?-1:1:0;f=!y||(y>0?p<d.length-1:p>0)}0==m?n>v.bottom&&(!u||u.bottom<v.bottom)?(s=h,u=v):n<v.top&&(!c||c.top>v.top)&&(l=h,c=v):u&&zx(u,v)?u=Fx(u,v.bottom):c&&zx(c,v)&&(c=Xx(c,v.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 O=Math.max(i.left,Math.min(i.right,t));return 3==r.nodeType?qx(r,O,n):f&&"false"!=r.contentEditable?Bx(r,O,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(i.left+i.right)/2?1:0)}}function qx(e,t,n){for(var r=e.nodeValue.length,i=-1,o=1e9,a=0,s=0;s<r;s++)for(var l=jk(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 h=t>=(c.left+c.right)/2,d=h;if(vS.chrome||vS.gecko)jk(e,s).getBoundingClientRect().left==c.right&&(d=!h);if(f<=0)return{node:e,offset:s+(d?1:0)};i=s+(d?1:0),o=f}}}return{node:e,offset:i>-1?i:a>0?e.nodeValue.length:0}}function Hx(e,t,n){var r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=e.contentDOM.getBoundingClientRect(),l=s.top+e.viewState.paddingTop,u=e.viewState.docHeight,c=t.x,f=t.y,h=f-l;if(h<0)return 0;if(h>u)return e.state.doc.length;for(var d=e.viewState.heightOracle.textHeight/2,p=!1;(o=e.elementAtHeight(h)).type!=TS.Text;)for(;!((h=a>0?o.bottom+d:o.top-d)>=0&&h<=u);){if(p)return n?null:0;p=!0,a=-a}f=l+h;var v=o.from;if(v<e.viewport.from)return 0==e.viewport.from?0:n?null:Gx(e,s,o,c,f);if(v>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:Gx(e,s,o,c,f);var m=e.dom.ownerDocument,g=e.root.elementFromPoint?e.root:m,y=g.elementFromPoint(c,f);y&&!e.contentDOM.contains(y)&&(y=null),y||(c=Math.max(s.left+1,Math.min(s.right-1,c)),(y=g.elementFromPoint(c,f))&&!e.contentDOM.contains(y)&&(y=null));var O,b=-1;if(y&&0!=(null===(r=e.docView.nearest(y))||void 0===r?void 0:r.isEditable))if(m.caretPositionFromPoint){var w=m.caretPositionFromPoint(c,f);w&&(O=w.offsetNode,b=w.offset)}else if(m.caretRangeFromPoint){var k=m.caretRangeFromPoint(c,f);k&&(O=k.startContainer,b=k.startOffset,(!e.contentDOM.contains(O)||vS.safari&&function(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 jk(e,r-1,r).getBoundingClientRect().left>n}(O,b,c)||vS.chrome&&function(e,t,n){if(0!=t)return!1;for(var r=e;;){var i=r.parentNode;if(!i||1!=i.nodeType||i.firstChild!=r)return!1;if(i.classList.contains("cm-line"))break;r=i}var o=1==e.nodeType?e.getBoundingClientRect():jk(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-o.left>5}(O,b,c))&&(O=void 0))}if(!O||!e.docView.dom.contains(O)){var S=ZS.find(e.docView,v);if(!S)return h>o.top+o.height/2?o.to:o.from;var x=Bx(S.dom,c,f);O=x.node,b=x.offset}var C=e.docView.nearest(O);if(!C)return null;if(C.isWidget&&1==(null===(i=C.dom)||void 0===i?void 0:i.nodeType)){var P=C.dom.getBoundingClientRect();return t.y<P.top||t.y<=P.bottom&&t.x<=(P.left+P.right)/2?C.posAtStart:C.posAtEnd}return C.localPosFromDOM(O,b)+C.posAtStart}function Gx(e,t,n,r,i){var o=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){var a=e.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-.5*(e.defaultLineHeight-a))/a)*e.viewState.heightOracle.lineLength}var s=e.state.sliceDoc(n.from,n.to);return n.from+mk(s,o,e.state.tabSize)}function Kx(e,t){var n=e.lineBlockAt(t);if(Array.isArray(n.type)){var r,i=P(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==TS.Text))return o}}catch(a){i.e(a)}finally{i.f()}}return n}function Jx(e,t,n,r){for(var i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),a=e.textDirectionAt(i.from),s=t,l=null;;){var u=Dx(i,o,a,s,n),c=Zx;if(!u){if(i.number==(n?e.state.doc.lines:1))return s;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),u=sw.cursor(n?i.from:i.to)}if(l){if(!l(c))return s}else{if(!r)return u;l=r(c)}s=u}}function eC(e,t,n){for(var r,i=function(){var r,i=0,o=P(e);try{for(o.s();!(r=o.n()).done;){r.value.between(t-1,t+1,(function(e,r,o){if(t>e&&t<r){var a=i||n||(t-e<r-t?-1:1);t=a<0?e:r,i=a}}))}}catch(a){o.e(a)}finally{o.f()}if(!i)return{v:t}};;)if(r=i())return r.v}function tC(e,t,n){var r=eC(e.state.facet(sx).map((function(t){return t(e)})),n.from,t.head>n.from?-1:1);return r==n.from?n:sw.cursor(r,r<n.from?1:-1)}var nC=function(){function e(t){var n=this;h(this,e),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,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.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null;var r=function(e,r){n.ignoreDuringComposition(r)||"keydown"==r.type&&n.keydown(t,r)||(n.mustFlushObserver(r)&&t.observer.forceFlush(),n.runCustomHandlers(r.type,t,r)?r.preventDefault():e(t,r))},i=function(){var e=uC[o];t.contentDOM.addEventListener(o,(function(n){lC(t,n)&&r(e,n)}),cC[o]),n.registeredEvents.push(o)};for(var o in uC)i();t.scrollDOM.addEventListener("mousedown",(function(e){if(e.target==t.scrollDOM&&e.clientY>t.contentDOM.getBoundingClientRect().bottom&&(r(uC.mousedown,e),!e.defaultPrevented&&2==e.button)){var n=t.contentDOM.style.minHeight;t.contentDOM.style.minHeight="100%",setTimeout((function(){return t.contentDOM.style.minHeight=n}),200)}})),t.scrollDOM.addEventListener("drop",(function(e){e.target==t.scrollDOM&&e.clientY>t.contentDOM.getBoundingClientRect().bottom&&r(uC.drop,e)})),vS.chrome&&102==vS.chrome_version&&t.scrollDOM.addEventListener("wheel",(function(){n.chromeScrollHack<0?t.contentDOM.style.pointerEvents="none":window.clearTimeout(n.chromeScrollHack),n.chromeScrollHack=setTimeout((function(){n.chromeScrollHack=-1,t.contentDOM.style.pointerEvents=""}),100)}),{passive:!0}),this.notifiedFocused=t.hasFocus,vS.safari&&t.contentDOM.addEventListener("input",(function(){return null})),vS.gecko&&function(e){QC.has(e)||(QC.add(e),e.addEventListener("copy",(function(){})),e.addEventListener("cut",(function(){})))}(t.contentDOM.ownerDocument)}return m(e,[{key:"setSelectionOrigin",value:function(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(e,t){var n,r,i=this;this.customHandlers=[];var o,a=P(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(r=null===(n=s.update(e).spec)||void 0===n?void 0:n.domEventHandlers){this.customHandlers.push({plugin:s.value,handlers:r});var l=function(t){i.registeredEvents.indexOf(t)<0&&"scroll"!=t&&(i.registeredEvents.push(t),e.contentDOM.addEventListener(t,(function(n){lC(e,n)&&i.runCustomHandlers(t,e,n)&&n.preventDefault()})))};for(var u in r)l(u)}}}catch(c){a.e(c)}finally{a.f()}}},{key:"runCustomHandlers",value:function(e,t,n){var r,i=P(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){KS(t.state,s)}}}catch(l){i.e(l)}finally{i.f()}return!1}},{key:"runScrollHandlers",value:function(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;var n,r=P(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){KS(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(),9==t.keyCode&&Date.now()<this.lastEscPress+2e3||(27!=t.keyCode&&oC.indexOf(t.keyCode)<0&&(e.inputState.lastEscPress=0),!vS.android||!vS.chrome||t.synthetic||13!=t.keyCode&&8!=t.keyCode?!(!vS.ios||t.synthetic||t.altKey||t.metaKey||!((n=rC.find((function(e){return e.keyCode==t.keyCode})))&&!t.ctrlKey||iC.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey))&&(this.pendingIOSKey=n||t,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,Wk(e.contentDOM,t.key,t.keyCode))}},{key:"ignoreDuringComposition",value:function(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(vS.safari&&!vS.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}},{key:"mustFlushObserver",value:function(e){return"keydown"==e.type&&229!=e.keyCode}},{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}(),rC=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],iC="dthko",oC=[16,17,18,20,91,92,224,225];function aC(e){return.7*Math.max(0,e)+8}var sC=function(){function e(t,n,r,i){h(this,e),this.view=t,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=function(e){for(var t=e.ownerDocument,n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(t.contentDOM),this.atoms=t.state.facet(sx).map((function(e){return e(t)}));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(Gw.allowMultipleSelections)&&function(e,t){var n=e.state.facet(VS);return n.length?n[0](t):vS.mac?t.metaKey:t.ctrlKey}(t,n),this.dragging=!(!function(e,t){var n=e.state.selection.main;if(n.empty)return!1;var r=Tk(e.root);if(!r||0==r.rangeCount)return!0;for(var i=r.getRangeAt(0).getClientRects(),o=0;o<i.length;o++){var a=i[o];if(a.left<=t.clientX&&a.right>=t.clientX&&a.top<=t.clientY&&a.bottom>=t.clientY)return!0}return!1}(t,n)||1!=kC(n))&&null}return m(e,[{key:"start",value:function(e){!1===this.dragging&&(e.preventDefault(),this.select(e))}},{key:"move",value:function(e){var t;if(0==e.buttons)return this.destroy();if(!(this.dragging||null==this.dragging&&(n=this.startEvent,r=e,Math.max(Math.abs(n.clientX-r.clientX),Math.abs(n.clientY-r.clientY))<10))){var n,r;this.select(this.lastEvent=e);var i=0,o=0,a=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=fx(this.view);e.clientX-s.left<=a.left+6?i=-aC(a.left-e.clientX):e.clientX+s.right>=a.right-6&&(i=aC(e.clientX-a.right)),e.clientY-s.top<=a.top+6?o=-aC(a.top-e.clientY):e.clientY+s.bottom>=a.bottom-6&&(o=aC(e.clientY-a.bottom)),this.setScrollSpeed(i,o)}}},{key:"up",value:function(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(e,t){var n=this;this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((function(){return n.scroll()}),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}},{key:"scroll",value:function(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}},{key:"skipAtoms",value:function(e){for(var t=null,n=0;n<e.ranges.length;n++){var r=e.ranges[n],i=null;if(r.empty){var o=eC(this.atoms,r.from,0);o!=r.from&&(i=sw.cursor(o,-1))}else{var a=eC(this.atoms,r.from,-1),s=eC(this.atoms,r.to,1);a==r.from&&s==r.to||(i=sw.range(r.from==r.anchor?a:s,r.from==r.head?a:s))}i&&(t||(t=e.ranges.slice()),t[n]=i)}return t?sw.create(t,e.mainIndex):e}},{key:"select",value:function(e){var t=this.view,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection)||n.main.assoc!=t.state.selection.main.assoc&&!1===this.dragging)&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),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 lC(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=qk.get(r))&&n.ignoreEvent(t))return!1;return!0}var uC=Object.create(null),cC=Object.create(null),fC=vS.ie&&vS.ie_version<15||vS.ios&&vS.webkit_version<604;function hC(e,t){var n,r=e.state,i=1,o=r.toText(t),a=o.lines==r.selection.ranges.length,s=null!=xC&&r.selection.ranges.every((function(e){return e.empty}))&&xC==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:sw.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:sw.cursor(e.from+t.length)}})):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function dC(e,t,n,r){if(1==r)return sw.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 sw.cursor(t);0==o?n=1:o==i.length&&(n=-1);var a=o,s=o;n<0?a=Ub(i.text,o,!1):s=Ub(i.text,o);for(var l=r(i.text.slice(a,s));a>0;){var u=Ub(i.text,a,!1);if(r(i.text.slice(u,a))!=l)break;a=u}for(;s<i.length;){var c=Ub(i.text,s);if(r(i.text.slice(s,c))!=l)break;s=c}return sw.range(a+i.from,s+i.from)}(e.state,t,n);var i=ZS.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++,sw.range(a,s)}uC.keydown=function(e,t){e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now())},uC.touchstart=function(e,t){e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},uC.touchmove=function(e){e.inputState.setSelectionOrigin("select.pointer")},cC.touchstart=cC.touchmove={passive:!0},uC.mousedown=function(e,t){if(e.observer.flush(),!(e.inputState.lastTouchTime>Date.now()-2e3)){var n,r=null,i=P(e.state.facet(jS));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=gC(e,t),r=kC(t),i=e.state.selection;return{update:function(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get:function(t,o,a){var s,l=gC(e,t),u=dC(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!o){var c=dC(e,n.pos,n.bias,r),f=Math.min(c.from,u.from),h=Math.max(c.to,u.to);u=f<u.from?sw.range(f,h):sw.range(h,f)}return o?i.replaceRange(i.main.extend(u.from,u.to)):a&&1==r&&i.ranges.length>1&&(s=function(e,t){for(var n=0;n<e.ranges.length;n++){var r=e.ranges[n],i=r.from,o=r.to;if(i<=t&&o>=t)return sw.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?s:a?i.addRange(u):sw.create([u])}}}(e,t)),r){var o=!e.hasFocus;e.inputState.startMouseSelection(new sC(e,t,r,o)),o&&e.observer.ignore((function(){return Uk(e.contentDOM)})),e.inputState.mouseSelection&&e.inputState.mouseSelection.start(t)}}};var pC=function(e,t){return e>=t.top&&e<=t.bottom},vC=function(e,t,n){return pC(t,n)&&e>=n.left&&e<=n.right};function mC(e,t,n,r){var i=ZS.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&&vC(n,r,a))return-1;var s=i.coordsAt(o,1);return s&&vC(n,r,s)?1:a&&pC(r,a)?-1:1}function gC(e,t){var n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:mC(e,n,t.clientX,t.clientY)}}var yC=vS.ie&&vS.ie_version<=11,OC=null,bC=0,wC=0;function kC(e){if(!yC)return e.detail;var t=OC,n=wC;return OC=e,wC=Date.now(),bC=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(bC+1)%3:1}function SC(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&&function(e,t){var n=e.state.facet(US);return n.length?n[0](t):vS.mac?!t.altKey:!t.ctrlKey}(e,t)?{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"})}}uC.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")},uC.drop=function(e,t){if(t.dataTransfer){if(e.state.readOnly)return t.preventDefault();var n=t.dataTransfer.files;if(n&&n.length){t.preventDefault();for(var r=Array(n.length),i=0,o=function(){++i==n.length&&SC(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)}else SC(e,t,t.dataTransfer.getData("Text"),!0)}},uC.paste=function(e,t){if(e.state.readOnly)return t.preventDefault();e.observer.flush();var n=fC?null:t.clipboardData;n?(hC(e,n.getData("text/plain")||n.getData("text/uri-text")),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(),hC(e,n.value)}),50)}}(e)};var xC=null;uC.copy=uC.cut=function(e,t){var n=function(e){var t,n=[],r=[],i=!1,o=P(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(h){o.e(h)}finally{o.f()}if(!n.length){var s,l=-1,u=P(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(h){u.e(h)}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){xC=o?r:null;var a=fC?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"})}};var CC=Zw.define();function PC(e,t){var n,r=[],i=P(e.facet(FS));try{for(i.s();!(n=i.n()).done;){var o=(0,n.value)(e,t);o&&r.push(o)}}catch(a){i.e(a)}finally{i.f()}return r?e.update({effects:r,annotations:CC.of(!0)}):null}function EC(e){setTimeout((function(){var t=e.hasFocus;if(t!=e.inputState.notifiedFocused){var n=PC(e.state,t);n?e.dispatch(n):e.update([])}}),10)}uC.focus=function(e){e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),EC(e)},uC.blur=function(e){e.observer.clearSelectionRange(),EC(e)},uC.compositionstart=uC.compositionupdate=function(e){null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},uC.compositionend=function(e){e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,vS.chrome&&vS.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((function(){return e.observer.flush()})):setTimeout((function(){e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50)},uC.contextmenu=function(e){e.inputState.lastContextMenu=Date.now()},uC.beforeinput=function(e,t){var n,r;if(vS.chrome&&vS.android&&(r=rC.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 QC=new Set;var TC=["pre-wrap","normal","pre-line","break-spaces"],$C=function(){function e(t){h(this,e),this.lineWrapping=t,this.doc=Qb.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}return m(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.max(0,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:"mustRefreshForWrapping",value:function(e){return TC.indexOf(e)>-1!=this.lineWrapping}},{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=TC.indexOf(e)>-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=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}(),_C=function(){function e(t,n){h(this,e),this.from=t,this.heights=n,this.index=0}return m(e,[{key:"more",get:function(){return this.index<this.heights.length}}]),e}(),RC=function(){function e(t,n,r,i,o){h(this,e),this.from=t,this.length=n,this.top=r,this.height=i,this._content=o}return m(e,[{key:"type",get:function(){return"number"==typeof this._content?TS.Text:Array.isArray(this._content)?this._content:this._content.type}},{key:"to",get:function(){return this.from+this.length}},{key:"bottom",get:function(){return this.top+this.height}},{key:"widget",get:function(){return this._content instanceof AS?this._content.widget:null}},{key:"widgetLineBreaks",get:function(){return"number"==typeof this._content?this._content:0}},{key:"join",value:function(t){var n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}}]),e}(),AC=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(AC||(AC={})),MC=.001,NC=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;h(this,e),this.length=t,this.height=n,this.flags=r}return m(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)>MC&&(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=n.doc,a=r.length-1;a>=0;a--){var s=r[a],l=s.fromA,u=s.toA,c=s.fromB,f=s.toB,h=i.lineAt(l,AC.ByPosNoHeight,n.setDoc(t),0,0),d=h.to>=u?h:i.lineAt(u,AC.ByPosNoHeight,n,0,0);for(f+=d.to-u,u=d.to;a>0&&h.from<=r[a-1].toA;)l=r[a-1].fromA,c=r[a-1].fromB,a--,l<h.from&&(h=i.lineAt(l,AC.ByPosNoHeight,n,0,0));c+=h.from-l,l=h.from;var p=VC.build(n.setDoc(o),e,c,f);i=i.replace(l,u,p)}return i.updateHeight(n,0)}}],[{key:"empty",value:function(){return new DC(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 IC(e.of(t.slice(0,n)),c,e.of(t.slice(r)))}}]),e}();NC.prototype.size=1;var ZC=function(e){y(n,e);var t=k(n);function n(e,r,i){var o;return h(this,n),(o=t.call(this,e,r)).deco=i,o}return m(n,[{key:"blockAt",value:function(e,t,n,r){return new RC(r,this.length,n,this.height,this.deco||0)}},{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){e<=i+this.length&&t>=i&&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}(NC),DC=function(e){y(n,e);var t=k(n);function n(e,r){var i;return h(this,n),(i=t.call(this,e,r,null)).collapsed=0,i.widgetHeight=0,i.breaks=0,i}return m(n,[{key:"blockAt",value:function(e,t,n,r){return new RC(r,this.length,n,this.height,this.breaks)}},{key:"replace",value:function(e,t,r){var i=r[0];return 1==r.length&&(i instanceof n||i instanceof LC&&4&i.flags)&&Math.abs(this.length-i.length)<10?(i instanceof LC?i=new n(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):NC.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.breaks*e.lineHeight),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),n}(ZC),LC=function(e){y(n,e);var t=k(n);function n(e){return h(this,n),t.call(this,e,0)}return m(n,[{key:"heightMetrics",value:function(e,t){var n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,a=0;if(e.lineWrapping){var s=Math.min(this.height,e.lineHeight*o);n=s/o,this.length>o+1&&(a=(this.height-s)/(this.length-o-1))}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:a}}},{key:"blockAt",value:function(e,t,n,r){var i=this.heightMetrics(t,r),o=i.firstLine,a=i.lastLine,s=i.perLine,l=i.perChar;if(t.lineWrapping){var u=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),c=t.doc.lineAt(u),f=s+c.length*l,h=Math.max(n,e-f/2);return new RC(c.from,c.length,h,f,0)}var d=Math.max(0,Math.min(a-o,Math.floor((e-n)/s))),p=t.doc.line(o+d),v=p.from,m=p.length;return new RC(v,m,n+s*d,s,0)}},{key:"lineAt",value:function(e,t,n,r,i){if(t==AC.ByHeight)return this.blockAt(e,n,r,i);if(t==AC.ByPosNoHeight){var o=n.doc.lineAt(e),a=o.from,s=o.to;return new RC(a,s-a,0,0,0)}var l=this.heightMetrics(n,i),u=l.firstLine,c=l.perLine,f=l.perChar,h=n.doc.lineAt(e),d=c+h.length*f,p=h.number-u,v=r+c*p+f*(h.from-i-p);return new RC(h.from,h.length,Math.max(r,Math.min(v,r+this.height-d)),d,0)}},{key:"forEachLine",value:function(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);for(var a=this.heightMetrics(n,i),s=a.firstLine,l=a.perLine,u=a.perChar,c=e,f=r;c<=t;){var h=n.doc.lineAt(c);if(c==e){var d=h.number-s;f+=l*d+u*(e-i-d)}var p=l+u*h.length;o(new RC(h.from,h.length,f,p,0)),f+=p,c=h.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 NC.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;for(i.from>t&&a.push(new n(i.from-t-1).updateHeight(e,t));s<=o&&i.more;){var u=e.doc.lineAt(s).length;a.length&&a.push(null);var c=i.heights[i.index++];-1==l?l=c:Math.abs(c-l)>=MC&&(l=-2);var f=new DC(u,c);f.outdated=!1,a.push(f),s+=u+1}s<=o&&a.push(null,new n(o-s).updateHeight(e,s));var h=NC.of(a);return(l<0||Math.abs(h.height-this.height)>=MC||Math.abs(l-this.heightMetrics(e,t).perLine)>=MC)&&(e.heightChanged=!0),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}(NC),IC=function(e){y(n,e);var t=k(n);function n(e,r,i){var o;return h(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 m(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==AC.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==AC.ByPosNoHeight?AC.ByPosNoHeight:AC.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,AC.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=P(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&&YC(i,a-1),t<this.length){var u=i.length;this.decomposeRight(t,i),YC(i,u)}return NC.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?NC.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}(NC);function YC(e,t){var n,r;null==e[t]&&(n=e[t-1])instanceof LC&&(r=e[t+1])instanceof LC&&e.splice(t-1,3,new LC(n.length+1+r.length))}var VC=function(){function e(t,n){h(this,e),this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}return m(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 DC?r.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new DC(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,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);var o=t-e;n.block?this.addBlock(new ZC(o,r,n)):(o||i||r>=5)&&this.addLineDeco(r,i,o)}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 DC(this.pos-t,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(e,t){var n=new LC(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 DC)return e;var t=new DC(0,-1);return this.nodes.push(t),t}},{key:"addBlock",value:function(e){var t;this.enterLine();var n=null===(t=e.deco)||void 0===t?void 0:t.type;n!=TS.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n!=TS.WidgetBefore&&(this.covering=e)}},{key:"addLineDeco",value:function(e,t,n){var r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}},{key:"finish",value:function(e){var t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof DC||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new DC(0,-1));var n,r=e,i=P(this.nodes);try{for(i.s();!(n=i.n()).done;){var o=n.value;o instanceof DC&&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 rk.spans(n,r,i,o,0),o.finish(r)}}]),e}();var UC=function(){function e(){h(this,e),this.changes=[]}return m(e,[{key:"compareRange",value:function(){}},{key:"comparePoint",value:function(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&NS(e,t,this.changes,5)}}]),e}();function jC(e,t){for(var n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),a=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom),u=e.parentNode;u&&u!=r.body;)if(1==u.nodeType){var c=u,f=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&"visible"!=f.overflow){var h=c.getBoundingClientRect();o=Math.max(o,h.left),a=Math.min(a,h.right),s=Math.max(s,h.top),l=u==e.parentNode?h.bottom:Math.min(l,h.bottom)}u="absolute"==f.position||"fixed"==f.position?c.offsetParent:c.parentNode}else{if(11!=u.nodeType)break;u=u.host}return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+t),bottom:Math.max(s,l)-(n.top+t)}}function WC(e,t){var n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var zC=function(){function e(t,n,r){h(this,e),this.from=t,this.to=n,this.size=r}return m(e,[{key:"draw",value:function(e){return $S.replace({widget:new XC(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}(),XC=function(e){y(n,e);var t=k(n);function n(e,r){var i;return h(this,n),(i=t.call(this)).size=e,i.vertical=r,i}return m(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}(QS),FC=function(){function e(t){h(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.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=KC,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=vx.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;var n=t.facet(ox).some((function(e){return"function"!=typeof e&&"cm-lineWrapping"==e.class}));this.heightOracle=new $C(n),this.stateDeco=t.facet(ax).filter((function(e){return"function"!=typeof e})),this.heightMap=NC.empty().applyChanges(this.stateDeco,Qb.empty,this.heightOracle.setDoc(t.doc),[new dx(0,0,0,t.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=$S.set(this.lineGaps.map((function(e){return e.draw(!1)}))),this.computeVisibleRanges()}return m(e,[{key:"updateForViewport",value:function(){for(var e=this,t=[this.viewport],n=this.state.selection.main,r=function(){var r=i?n.head:n.anchor;if(!t.some((function(e){var t=e.from,n=e.to;return r>=t&&r<=n}))){var o=e.lineBlockAt(r),a=o.from,s=o.to;t.push(new BC(a,s))}},i=0;i<=1;i++)r();this.viewports=t.sort((function(e,t){return e.from-t.from})),this.scaler=this.heightMap.height<=7e6?KC:new JC(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var e=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(function(t){e.viewportLines.push(1==e.scaler.scale?t:eP(t,e.scaler))}))}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=e.state;var n=this.stateDeco;this.stateDeco=this.state.facet(ax).filter((function(e){return"function"!=typeof e}));var r=e.changedRanges,i=dx.extendWithRanges(r,function(e,t,n){var r=new UC;return rk.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:Jb.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=o&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);var s=i.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&&!e.state.facet(qS)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(e){var t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?vx.RTL:vx.LTR;var o=this.heightOracle.mustRefreshForWrapping(i),a=t.getBoundingClientRect(),s=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var l=0,u=0,c=parseInt(n.paddingTop)||0,f=parseInt(n.paddingBottom)||0;this.paddingTop==c&&this.paddingBottom==f||(this.paddingTop=c,this.paddingBottom=f,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8),this.scrollTop!=e.scrollDOM.scrollTop&&(this.scrollAnchorHeight=-1,this.scrollTop=e.scrollDOM.scrollTop),this.scrolledToBottom=Xk(e.scrollDOM);var h=(this.printing?WC:jC)(t,this.paddingTop),d=h.top-this.pixelViewport.top,p=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;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&&!this.scrollTarget)return 0;var m=a.width;if(this.contentDOMWidth==m&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),s){var g=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(g)&&(o=!0),o||r.lineWrapping&&Math.abs(m-this.contentDOMWidth)>r.charWidth){var y=e.docView.measureTextSize(),O=y.lineHeight,b=y.charWidth,w=y.textHeight;(o=O>0&&r.refresh(i,O,b,w,m/b,g))&&(e.docView.minWidth=0,l|=8)}d>0&&p>0?u=Math.max(d,p):d<0&&p<0&&(u=Math.min(d,p)),r.heightChanged=!1;var k,S=P(this.viewports);try{for(S.s();!(k=S.n()).done;){var x=k.value,C=x.from==this.viewport.from?g:e.docView.measureVisibleLineHeights(x);this.heightMap=(o?NC.empty().applyChanges(this.stateDeco,Qb.empty,this.heightOracle,[new dx(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new _C(x.from,C))}}catch(Q){S.e(Q)}finally{S.f()}r.heightChanged&&(l|=2)}var E=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return E&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&l||E)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),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.heightOracle,o=this.visibleTop,a=this.visibleBottom,s=new BC(r.lineAt(o-1e3*n,AC.ByHeight,i,0,0).from,r.lineAt(a+1e3*(1-n),AC.ByHeight,i,0,0).to);if(t){var l=t.range.head;if(l<s.from||l>s.to){var u,c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(l,AC.ByPos,i,0,0);u="center"==t.y?(f.top+f.bottom)/2-c/2:"start"==t.y||"nearest"==t.y&&l<s.from?f.top:f.bottom-c,s=new BC(r.lineAt(u-500,AC.ByHeight,i,0,0).from,r.lineAt(u+c+500,AC.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 BC(this.heightMap.lineAt(n,AC.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,AC.ByPos,this.heightOracle,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,AC.ByPos,this.heightOracle,0,0).top,o=this.heightMap.lineAt(n,AC.ByPos,this.heightOracle,0,0).bottom,a=this.visibleTop,s=this.visibleBottom;return(0==t||i<=a-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=s+Math.max(10,Math.min(r,250)))&&i>a-2e3&&o<s+2e3}},{key:"mapLineGaps",value:function(e,t){if(!e.length||t.empty)return e;var n,r=[],i=P(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.touchesRange(o.from,o.to)||r.push(new zC(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,t){var n=this,r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,a=i<<1;if(this.defaultTextDirection!=vx.LTR&&!r)return[];var s,l=[],u=function i(a,s,u,c){if(!(s-a<o)){var f=n.state.selection.main,h=[f.from];f.empty||h.push(f.to);for(var d=0,p=h;d<p.length;d++){var v=p[d];if(v>a&&v<s)return i(a,v-10,u,c),void i(v+10,s,u,c)}var m=function(e,t){var n,r=P(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>=u.from&&e.to<=u.to&&Math.abs(e.from-a)<o&&Math.abs(e.to-s)<o&&!h.some((function(t){return e.from<t&&e.to>t}))}));if(!m){if(s<u.to&&t&&r&&t.visibleRanges.some((function(e){return e.from<=s&&e.to>=s}))){var g=t.moveToLineBoundary(sw.cursor(s),!1,!0).head;g>a&&(s=g)}m=new zC(a,s,n.gapSize(u,a,s,c))}l.push(m)}},c=P(this.viewportLines);try{for(c.s();!(s=c.n()).done;){var f=s.value;if(!(f.length<a)){var h=qC(f.from,f.to,this.stateDeco);if(!(h.total<a)){var d=this.scrollTarget?this.scrollTarget.range.head:null,p=void 0,v=void 0;if(r){var m=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,g=void 0,y=void 0;if(null!=d){var O=GC(h,d),b=((this.visibleBottom-this.visibleTop)/2+m)/f.height;g=O-b,y=O+b}else g=(this.visibleTop-f.top-m)/f.height,y=(this.visibleBottom-f.top+m)/f.height;p=HC(h,g),v=HC(h,y)}else{var w=h.total*this.heightOracle.charWidth,k=i*this.heightOracle.charWidth,S=void 0,x=void 0;if(null!=d){var C=GC(h,d),E=((this.pixelViewport.right-this.pixelViewport.left)/2+k)/w;S=C-E,x=C+E}else S=(this.pixelViewport.left-k)/w,x=(this.pixelViewport.right+k)/w;p=HC(h,S),v=HC(h,x)}p>f.from&&u(f.from,p,f,h),v<f.to&&u(v,f.to,f,h)}}}}catch(Q){c.e(Q)}finally{c.f()}return l}},{key:"gapSize",value:function(e,t,n,r){var i=GC(r,n)-GC(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}},{key:"updateLineGaps",value:function(e){var t=this;zC.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=$S.set(e.map((function(e){return e.draw(t.heightOracle.lineWrapping)}))))}},{key:"computeVisibleRanges",value:function(){var e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));var t=[];rk.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}))||eP(this.heightMap.lineAt(e,AC.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(e){return eP(this.heightMap.lineAt(this.scaler.fromDOM(e),AC.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"scrollAnchorAt",value:function(e){var t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}},{key:"elementAtHeight",value:function(e){return eP(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,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}(),BC=m((function e(t,n){h(this,e),this.from=t,this.to=n}));function qC(e,t,n){var r=[],i=e,o=0;return rk.spans(n,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),{total:o,ranges:r}}function HC(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 GC(e,t){var n,r=0,i=P(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}var KC={toDOM:function(e){return e},fromDOM:function(e){return e},scale:1},JC=function(){function e(t,n,r){h(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,AC.ByPos,t,0,0).top,s=n.lineAt(o,AC.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=P(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 m(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 eP(e,t){if(1==t.scale)return e;var n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new RC(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map((function(e){return eP(e,t)})):e._content)}var tP=cw.define({combine:function(e){return e.join(" ")}}),nP=cw.define({combine:function(e){return e.indexOf(!0)>-1}}),rP=bk.newName(),iP=bk.newName(),oP=bk.newName(),aP={"&light":"."+iP,"&dark":"."+oP};function sP(e,t,n){return new bk(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 lP=sP("."+rP,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},aP),uP=m((function e(t,n,r,i){h(this,e),this.typeOver=i,this.bounds=null,this.text="";var o=t.docView,a=o.impreciseHead,s=o.impreciseAnchor;if(t.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=t.docView.domBoundsAround(n,r,0))){var l=a||s?[]: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 rS(r,i)),o==r&&a==i||t.push(new rS(o,a)));return t}(t),u=new tS(l,t.state);u.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=u.text,this.newSel=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?sw.single(n+t,r+t):null}(l,this.bounds.from)}else{var c=t.observer.selectionRange,f=a&&a.node==c.focusNode&&a.offset==c.focusOffset||!$k(t.contentDOM,c.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(c.focusNode,c.focusOffset),d=s&&s.node==c.anchorNode&&s.offset==c.anchorOffset||!$k(t.contentDOM,c.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(c.anchorNode,c.anchorOffset);this.newSel=sw.single(d,f)}}));function cP(e,t){var n,r=t.newSel,i=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){var a=t.bounds,s=a.from,l=a.to,u=i.from,c=null;(8===o||vS.android&&t.text.length<l-s)&&(u=i.to,c="end");var f=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.doc.sliceString(s,l,eS),t.text,u-s,c);f&&(vS.chrome&&13==o&&f.toB==f.from+2&&t.text.slice(f.from,f.toB)==eS+eS&&f.toB--,n={from:s+f.from,to:s+f.toA,insert:Qb.of(t.text.slice(f.from,f.toB).split(eS))})}else r&&(!e.hasFocus&&e.state.facet(JS)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(vS.mac||vS.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=sw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Qb.of([" "])}):vS.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=sw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Qb.of([" "])}),n){if(vS.ios&&e.inputState.flushIOSKey(e))return!0;if(vS.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&Wk(e.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&0==n.insert.length||8==o&&n.insert.length<n.to-n.from&&n.to>i.head)&&Wk(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&Wk(e.contentDOM,"Delete",46)))return!0;var h,d=n.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;var p=function(){return h||(h=function(e,t,n){var r,i=e.state,o=i.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){var a=o.from<t.from?i.sliceDoc(o.from,t.from):"",s=o.to>t.to?i.sliceDoc(t.to,o.to):"";r=i.replaceSelection(e.state.toText(a+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{var l=i.changes(t),u=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){var c=e.state.sliceDoc(t.from,t.to),f=Yx(e,t.insert.length-(t.to-t.from))||e.state.doc.lineAt(o.head),h=o.to-t.to,d=o.to-o.from;r=i.changeByRange((function(n){if(n.from==o.from&&n.to==o.to)return{changes:l,range:u||n.map(l)};var r=n.to-h,a=r-c.length;if(n.to-n.from!=d||e.state.sliceDoc(a,r)!=c||f&&n.to>=f.from&&n.from<=f.to)return{range:n};var s=i.changes({from:a,to:r,insert:t.insert}),p=n.to-o.to;return{changes:s,range:u?sw.range(Math.max(0,u.anchor+p),Math.max(0,u.head+p)):n.map(s)}}))}else r={changes:l,selection:u&&i.selection.replaceRange(u)}}var p="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,p+=".compose",e.inputState.compositionFirstChange&&(p+=".start",e.inputState.compositionFirstChange=!1));return i.update(r,{userEvent:p,scrollIntoView:!0})}(e,n,r))};return e.state.facet(XS).some((function(t){return t(e,n.from,n.to,d,p)}))||e.dispatch(p()),!0}if(r&&!r.main.eq(i)){var v=!1,m="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(v=!0),m=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:v,userEvent:m}),!0}return!1}var fP={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},hP=vS.ie&&vS.ie_version<=11,dP=function(){function e(t){var n=this;h(this,e),this.view=t,this.active=!1,this.selectionRange=new Yk,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((function(e){var r,i=P(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.queue.push(o)}}catch(a){i.e(a)}finally{i.f()}(vS.ie&&vS.ie_version<=11||vS.ios&&t.composing)&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?n.flushSoon():n.flush()})),hP&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((function(){var e;(null===(e=n.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&n.onResize()})),this.resizeScroll.observe(t.scrollDOM),this.resizeContent=new ResizeObserver((function(){return n.view.requestMeasure()})),this.resizeContent.observe(t.contentDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((function(e){n.parentCheck<0&&(n.parentCheck=setTimeout(n.listenForScroll.bind(n),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=n.intersecting&&(n.intersecting=!n.intersecting,n.intersecting!=n.view.inView&&n.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((function(e){e.length>0&&e[e.length-1].intersectionRatio>0&&n.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}return m(e,[{key:"onScrollChanged",value:function(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}},{key:"onResize",value:function(){var e=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((function(){e.resizeTimeout=-1,e.view.requestMeasure()}),50))}},{key:"onPrint",value:function(){var e=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout((function(){e.view.viewState.printing=!1,e.view.requestMeasure()}),500)}},{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=P(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){var t=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var n=this.view,r=this.selectionRange;if(n.state.facet(JS)?n.root.activeElement==this.dom:_k(n.dom,r)){var i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(vS.ie&&vS.ie_version<=11||vS.android&&vS.chrome)&&!n.state.selection.main.empty&&r.focusNode&&Ak(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var e=this.view,t=vS.safari&&11==e.root.nodeType&&function(e){for(var t=e.activeElement;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){var t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.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(Ak(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)||Tk(e.root);if(!t||this.selectionRange.eq(t))return!1;var n=_k(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){var n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,Zk(n));;)if(r){if(1!=n.nodeType)return!1;var i=n.childNodes[r-1];"false"==i.contentEditable?r--:r=Zk(n=i)}else{if(n==e)return!0;r=Mk(n),n=n.parentNode}}(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}},{key:"setSelectionRange",value:function(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}},{key:"clearSelectionRange",value:function(){this.selectionRange.set(null,0,null,0)}},{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=P(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=P(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,fP),hP&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}},{key:"stop",value:function(){this.active&&(this.active=!1,this.observer.disconnect(),hP&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}},{key:"clear",value:function(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}},{key:"delayAndroidKey",value:function(e,t){var n,r=this;if(!this.delayedAndroidKey){this.flushingAndroidKey=this.view.win.requestAnimationFrame((function(){var e=r.delayedAndroidKey;e&&(r.clearDelayedAndroidKey(),r.view.inputState.lastKeyCode=e.keyCode,r.view.inputState.lastKeyTime=Date.now(),!r.flush()&&e.force&&Wk(r.dom,e.key,e.keyCode))}))}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}},{key:"clearDelayedAndroidKey",value:function(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}},{key:"flushSoon",value:function(){var e=this;this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((function(){e.delayedFlush=-1,e.flush()})))}},{key:"forceFlush",value:function(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"pendingRecords",value:function(){var e,t=P(this.observer.takeRecords());try{for(t.s();!(e=t.n()).done;){var n=e.value;this.queue.push(n)}}catch(r){t.e(r)}finally{t.f()}return this.queue}},{key:"processRecords",value:function(){var e=this.pendingRecords();e.length&&(this.queue=[]);var t,n=-1,r=-1,i=!1,o=P(e);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=this.readMutation(a);s&&(s.typeOver&&(i=!0),-1==n?(n=s.from,r=s.to):(n=Math.min(s.from,n),r=Math.max(s.to,r)))}}catch(l){o.e(l)}finally{o.f()}return{from:n,to:r,typeOver:i}}},{key:"readChange",value:function(){var e=this.processRecords(),t=e.from,n=e.to,r=e.typeOver,i=this.selectionChanged&&_k(this.dom,this.selectionRange);return t<0&&!i?null:(t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new uP(this.view,t,n,r))}},{key:"flush",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();var t=this.readChange();if(!t)return!1;var n=this.view.state,r=cP(this.view,t);return this.view.state==n&&this.view.update([]),r}},{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.flags|=4),"childList"==e.type){var n=pP(t,e.previousSibling||e.target.previousSibling,-1),r=pP(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:"setWindow",value:function(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var e,t,n,r;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();var i,o=P(this.scrollTargets);try{for(o.s();!(i=o.n()).done;){i.value.removeEventListener("scroll",this.onScroll)}}catch(a){o.e(a)}finally{o.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),e}();function pP(e,t,n){for(;t;){var r=qk.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}var vP=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(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: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);var r=n.dispatch;this.dispatchTransactions=n.dispatchTransactions||r&&function(e){return e.forEach((function(e){return r(e,t)}))}||function(e){return t.update(e)},this.dispatch=this.dispatch.bind(this),this._root=n.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(n.parent)||document,this.viewState=new FC(n.state||Gw.create(n)),this.plugins=this.state.facet(tx).map((function(e){return new rx(e)}));var i,o=P(this.plugins);try{for(o.s();!(i=o.n()).done;){i.value.update(this)}}catch(a){o.e(a)}finally{o.f()}this.observer=new dP(this),this.inputState=new nC(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Lx(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),n.parent&&n.parent.appendChild(this.dom)}return m(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:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=1==n.length&&n[0]instanceof Yw?n:1==n.length&&Array.isArray(n[0])?n[0]:[(e=this.state).update.apply(e,n)];this.dispatchTransactions(i,this)}},{key:"update",value:function(e){var t=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var n,r,i=!1,o=!1,a=this.state,s=P(e);try{for(s.s();!(r=s.n()).done;){var l=r.value;if(l.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=l.state}}catch(x){s.e(x)}finally{s.f()}if(this.destroyed)this.viewState.state=a;else{var u=this.hasFocus,c=0,f=null;e.some((function(e){return e.annotation(CC)}))?(this.inputState.notifiedFocused=u,c=1):u!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=u,(f=PC(a,u))||(c=1));var h=this.observer.delayedAndroidKey,d=null;if(h?(this.observer.clearDelayedAndroidKey(),((d=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(d=null)):this.observer.clear(),a.facet(Gw.phrases)!=this.state.facet(Gw.phrases))return this.setState(a);n=px.create(this,a,e),n.flags|=c;var p=this.viewState.scrollTarget;try{this.updateState=2;var v,m=P(e);try{for(m.s();!(v=m.n()).done;){var g=v.value;if(p&&(p=p.map(g.changes)),g.scrollIntoView){var y=g.state.selection.main;p=new HS(y.empty?y:sw.cursor(y.head,y.head>y.anchor?-1:1))}var O,b=P(g.effects);try{for(b.s();!(O=b.n()).done;){var w=O.value;w.is(GS)&&(p=w.value)}}catch(x){b.e(x)}finally{b.f()}}}catch(x){m.e(x)}finally{m.f()}this.viewState.update(n,p),this.bidiCache=yP.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),i=this.docView.update(n),this.state.facet(hx)!=this.styleModules&&this.mountStyles(),o=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(i,e.some((function(e){return e.isUserEvent("select.pointer")})))}finally{this.updateState=0}if(n.startState.facet(tP)!=n.state.facet(tP)&&(this.viewState.mustMeasureContent=!0),(i||o||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!n.empty){var k,S=P(this.state.facet(zS));try{for(S.s();!(k=S.n()).done;){(0,k.value)(n)}}catch(x){S.e(x)}finally{S.f()}}(f||d)&&Promise.resolve().then((function(){f&&t.state==f.startState&&t.dispatch(f),d&&!cP(t,d)&&h.force&&Wk(t.contentDOM,h.key,h.keyCode)}))}}},{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;var t=this.hasFocus;try{var n,r=P(this.plugins);try{for(r.s();!(n=r.n()).done;){n.value.destroy(this)}}catch(a){r.e(a)}finally{r.f()}this.viewState=new FC(e),this.plugins=e.facet(tx).map((function(e){return new rx(e)})),this.pluginMap.clear();var i,o=P(this.plugins);try{for(o.s();!(i=o.n()).done;){i.value.update(this)}}catch(a){o.e(a)}finally{o.f()}this.docView=new Lx(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(e){var t=e.startState.facet(tx),n=e.state.facet(tx);if(t!=n){var r,i=[],o=P(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=t.indexOf(a);if(s<0)i.push(new rx(a));else{var l=this.plugins[s];l.mustUpdate=e,i.push(l)}}}catch(v){o.e(v)}finally{o.f()}var u,c=P(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,this.plugins)}else{var h,d=P(this.plugins);try{for(d.s();!(h=d.n()).done;){h.value.mustUpdate=e}}catch(v){d.e(v)}finally{d.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){if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();var n=null,r=this.scrollDOM,i=r.scrollTop,o=this.viewState,a=o.scrollAnchorPos,s=o.scrollAnchorHeight;i!=this.viewState.scrollTop&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(var l=0;;l++){if(s<0)if(Xk(r))a=-1,s=this.viewState.heightMap.height;else{var u=this.viewState.scrollAnchorAt(i);a=u.from,s=u.top}this.updateState=1;var c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var f=[];if(!(4&c)){var h=[f,this.measureRequests];this.measureRequests=h[0],f=h[1]}var d=f.map((function(t){try{return t.read(e)}catch(n){return KS(e.state,n),gP}})),p=px.create(this,this.state,[]),v=!1;p.flags|=c,n?n.flags|=c:n=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),v=this.docView.update(p));for(var m=0;m<f.length;m++)if(d[m]!=gP)try{var g=f[m];g.write&&g.write(d[m],this)}catch(w){KS(this.state,w)}if(v&&this.docView.updateSelection(!0),!p.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null;continue}var y=(a<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(a).top)-s;if(y>1||y<-1){i=r.scrollTop=i+y,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty){var O,b=P(this.state.facet(zS));try{for(b.s();!(O=b.n()).done;){(0,O.value)(n)}}catch(k){b.e(k)}finally{b.f()}}}}},{key:"themeClasses",get:function(){return rP+" "+(this.state.facet(nP)?oP:iP)+" "+this.state.facet(tP)}},{key:"updateAttrs",value:function(){var e=this,t=OP(this,ix,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(JS)?"true":"false",class:"cm-content",style:"".concat(vS.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),OP(this,ox,n);var r=this.observer.ignore((function(){var r=PS(e.contentDOM,e.contentAttrs,n),i=PS(e.dom,e.editorAttrs,t);return r||i}));return this.editorAttrs=t,this.contentAttrs=n,r}},{key:"showAnnouncements",value:function(t){var n,r=!0,i=P(t);try{for(i.s();!(n=i.n()).done;){var o,a=P(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(hx);var t=this.state.facet(e.cspNonce);bk.mount(this.root,this.styleModules.concat(lP).reverse(),t?{nonce:t}:void 0)}},{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=this.win.requestAnimationFrame((function(){return t.measure()}))),e){if(this.measureRequests.indexOf(e)>-1)return;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:"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:"elementAtHeight",value:function(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}},{key:"lineBlockAtHeight",value:function(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}},{key:"viewportLineBlocks",get:function(){return this.viewState.viewportLines}},{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 tC(this,e,Jx(this,e,t,n))}},{key:"moveByGroup",value:function(e,t){var n=this;return tC(this,e,Jx(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==Bw.Space&&(i=t),i==t}}(n,e.head,t)})))}},{key:"moveToLineBoundary",value:function(e,t){return function(e,t,n,r){var i=Kx(e,t.head),o=r&&i.type==TS.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){var a=e.dom.getBoundingClientRect(),s=e.textDirectionAt(i.from),l=e.posAtCoords({x:n==(s==vx.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(null!=l)return sw.cursor(l,n?-1:1)}return sw.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(e,t,n){return tC(this,e,function(e,t,n,r){var i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return sw.cursor(i,t.assoc);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);null==s&&(s=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-f.from))),a=(o<0?f.top:f.bottom)+c}for(var h=l.left+s,d=null!==r&&void 0!==r?r:e.viewState.heightOracle.textHeight>>1,p=0;;p+=10){var v=a+(d+p)*o,m=Hx(e,{x:h,y:v},!1,o);if(v<l.top||v>l.bottom||(o<0?m<i:m>i))return sw.cursor(m,t.assoc,void 0,s)}}(this,e,t,n))}},{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(),Hx(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);return Dk(n,i[Tx.find(i,e-r.from,-1,t)].dir==vx.LTR==t>0)}},{key:"coordsForChar",value:function(e){return this.readMeasured(),this.docView.coordsForChar(e)}},{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.defaultTextDirection}},{key:"textDirectionAt",value:function(e){return!this.state.facet(BS)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(e){if(e.length>mP)return Nx(e.length);var t,n,r=this.textDirectionAt(e.from),i=P(this.bidiCache);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.from==e.from&&o.dir==r&&(o.fresh||$x(o.isolates,t=ux(this,e.from,e.to))))return o.order}}catch(s){i.e(s)}finally{i.f()}t||(t=ux(this,e.from,e.to));var a=Mx(e.text,r,t);return this.bidiCache.push(new yP(e.from,e.to,r,t,!0,a)),a}},{key:"hasFocus",get:function(){var e;return(this.dom.ownerDocument.hasFocus()||vS.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(){Uk(e.contentDOM),e.docView.updateSelection()}))}},{key:"setRoot",value:function(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var e,t=P(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&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return GS.of(new HS("number"==typeof e?sw.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}},{key:"domEventHandlers",value:function(e){return nx.define((function(){return{}}),{eventHandlers:e})}},{key:"theme",value:function(e,t){var n=bk.newName(),r=[tP.of(n),hx.of(sP(".".concat(n),e))];return t&&t.dark&&r.push(nP.of(!0)),r}},{key:"baseTheme",value:function(e){return kw.lowest(hx.of(sP("."+rP,e,aP)))}},{key:"findFromDOM",value:function(e){var t,n=e.querySelector(".cm-content"),r=n&&qk.get(n)||qk.get(e);return(null===(t=null===r||void 0===r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}]),e}();vP.styleModule=hx,vP.inputHandler=XS,vP.focusChangeEffect=FS,vP.perLineTextDirection=BS,vP.exceptionSink=WS,vP.updateListener=zS,vP.editable=JS,vP.mouseSelectionStyle=jS,vP.dragMovesSelection=US,vP.clickAddsSelectionRange=VS,vP.decorations=ax,vP.atomicRanges=sx,vP.bidiIsolatedRanges=lx,vP.scrollMargins=cx,vP.darkTheme=nP,vP.cspNonce=cw.define({combine:function(e){return e.length?e[0]:""}}),vP.contentAttributes=ox,vP.editorAttributes=ix,vP.lineWrapping=vP.contentAttributes.of({class:"cm-lineWrapping"}),vP.announce=Iw.define();var mP=4096,gP={},yP=function(){function e(t,n,r,i,o,a){h(this,e),this.from=t,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}return m(e,null,[{key:"update",value:function(t,n){if(n.empty&&!t.some((function(e){return e.fresh})))return t;for(var r=[],i=t.length?t[t.length-1].dir:vx.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.isolates,!1,a.order))}return r}}]),e}();function OP(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&&SS(a,n)}return n}var bP=vS.mac?"mac":vS.windows?"win":vS.linux?"linux":"key";function wP(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 kP=kw.default(vP.domEventHandlers({keydown:function(e,t){return QP(CP(t.state),e,t,"editor")}})),SP=cw.define({enables:kP}),xP=new WeakMap;function CP(e){var t=e.facet(SP),n=xP.get(t);return n||xP.set(t,n=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bP,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,s){for(var l,u,c=r[e]||(r[e]=Object.create(null)),f=t.split(/ (?!$)/).map((function(e){return function(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}(e,n)})),h=function(){var t=f.slice(0,d).join(" ");o(t,!0),c[t]||(c[t]={preventDefault:!0,stopPropagation:!1,run:[function(n){var r=PP={view:n,prefix:t,scope:e};return setTimeout((function(){PP==r&&(PP=null)}),EP),!0}]})},d=1;d<f.length;d++)h();var p=f.join(" ");o(p,!1);var v=c[p]||(c[p]={preventDefault:!1,stopPropagation:!1,run:(null===(u=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===u?void 0:u.slice())||[]});i&&v.run.push(i),a&&(v.preventDefault=!0),s&&(v.stopPropagation=!0)},s=P(e);try{for(s.s();!(t=s.n()).done;){var l=t.value,u=l.scope?l.scope.split(" "):["editor"];if(l.any){var c,f=P(u);try{for(f.s();!(c=f.n()).done;){var h=c.value,d=r[h]||(r[h]=Object.create(null));for(var p in d._any||(d._any={preventDefault:!1,stopPropagation:!1,run:[]}),d)d[p].run.push(l.any)}}catch(O){f.e(O)}finally{f.f()}}var v=l[n]||l.key;if(v){var m,g=P(u);try{for(g.s();!(m=g.n()).done;){var y=m.value;a(y,v,l.run,l.preventDefault,l.stopPropagation),l.shift&&a(y,"Shift-"+v,l.shift,l.preventDefault,l.stopPropagation)}}catch(O){g.e(O)}finally{g.f()}}}}catch(O){s.e(O)}finally{s.f()}return r}(t.reduce((function(e,t){return e.concat(t)}),[]))),n}var PP=null,EP=4e3;function QP(e,t,n,r){var i=function(e){var t=!(Ck&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Pk&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?xk:Sk)[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=qb(Fb(i,0))==i.length&&" "!=i,a="",s=!1,l=!1,u=!1;PP&&PP.view==n&&PP.scope==r&&(a=PP.prefix+" ",oC.indexOf(t.keyCode)<0&&(l=!0,PP=null));var c,f,h=new Set,d=function(e){if(e){var r,i=P(e.run);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(!h.has(o)&&(h.add(o),o(n,t)))return e.stopPropagation&&(u=!0),!0}}catch(a){i.e(a)}finally{i.f()}e.preventDefault&&(e.stopPropagation&&(u=!0),l=!0)}return!1},p=e[r];return p&&(d(p[a+wP(i,t,!o)])?s=!0:o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(vS.windows&&t.ctrlKey&&t.altKey)&&(c=Sk[t.keyCode])&&c!=i?(d(p[a+wP(c,t,!0)])||t.shiftKey&&(f=xk[t.keyCode])!=i&&f!=c&&d(p[a+wP(f,t,!1)]))&&(s=!0):o&&t.shiftKey&&d(p[a+wP(i,t,!0)])&&(s=!0),!s&&d(p._any)&&(s=!0)),l&&(s=!0),s&&u&&t.stopPropagation(),s}var TP=function(){function e(t,n,r,i,o){h(this,e),this.className=t,this.left=n,this.top=r,this.width=i,this.height=o}return m(e,[{key:"draw",value:function(){var e=document.createElement("div");return e.className=this.className,this.adjust(e),e}},{key:"update",value:function(e,t){return t.className==this.className&&(this.adjust(e),!0)}},{key:"adjust",value:function(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(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}}],[{key:"forRange",value:function(t,n,r){if(r.empty){var i=t.coordsAtPos(r.head,r.assoc||1);if(!i)return[];var o=$P(t);return[new e(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}return RP(t,n,r)}}]),e}();function $P(e){var t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==vx.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function _P(e,t,n){var r=sw.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:TS.Text}}function RP(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];var r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),o=e.textDirection==vx.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),l=$P(e),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),f=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=s.right-(c?parseInt(c.paddingRight):0),d=Kx(e,r),p=Kx(e,i),v=d.type==TS.Text?d:null,m=p.type==TS.Text?p:null;if(v&&(e.lineWrapping||d.widgetLineBreaks)&&(v=_P(e,r,v)),m&&(e.lineWrapping||p.widgetLineBreaks)&&(m=_P(e,i,m)),v&&m&&v.from==m.from)return w(k(n.from,n.to,v));var g=v?k(n.from,null,v):S(d,!1),y=m?k(null,n.to,m):S(p,!0),O=[];return(v||d).to<(m||p).from-(v&&m?1:0)||d.widgetLineBreaks>1&&g.bottom+e.defaultLineHeight/2<y.top?O.push(b(f,g.bottom,h,y.top)):g.bottom<y.top&&e.elementAtHeight((g.bottom+y.top)/2).type==TS.Text&&(g.bottom=y.top=(g.bottom+y.top)/2),w(g).concat(O).concat(w(y));function b(e,n,r,i){return new TP(t,e-l.left,n-l.top-.01,r-e,i-n+.01)}function w(e){for(var t=e.top,n=e.bottom,r=e.horizontal,i=[],o=0;o<r.length;o+=2)i.push(b(r[o],t,r[o+1],n));return i}function k(t,n,r){var i=1e9,a=-1e9,s=[];function l(t,n,l,u,c){var d=e.coordsAtPos(t,t==r.to?-2:2),p=e.coordsAtPos(l,l==r.from?2:-2);d&&p&&(i=Math.min(d.top,p.top,i),a=Math.max(d.bottom,p.bottom,a),c==vx.LTR?s.push(o&&n?f:d.left,o&&u?h:p.right):s.push(!o&&u?f:p.left,!o&&n?h:d.right))}var u,c=null!==t&&void 0!==t?t:r.from,d=null!==n&&void 0!==n?n:r.to,p=P(e.visibleRanges);try{for(p.s();!(u=p.n()).done;){var v=u.value;if(v.to>c&&v.from<d)for(var m=Math.max(v.from,c),g=Math.min(v.to,d);;){var y,O=e.state.doc.lineAt(m),b=P(e.bidiSpans(O));try{for(b.s();!(y=b.n()).done;){var w=y.value,k=w.from+O.from,S=w.to+O.from;if(k>=g)break;S>m&&l(Math.max(k,m),null==t&&k<=c,Math.min(S,g),null==n&&S>=d,w.dir)}}catch(x){b.e(x)}finally{b.f()}if((m=O.to+1)>=g)break}}}catch(x){p.e(x)}finally{p.f()}return 0==s.length&&l(c,null==t,d,null==n,e.textDirection),{top:i,bottom:a,horizontal:s}}function S(e,t){var n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}var AP=function(){function e(t,n){h(this,e),this.view=t,this.layer=n,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,t)}return m(e,[{key:"update",value:function(e){e.startState.facet(MP)!=e.state.facet(MP)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(e){for(var t=0,n=e.facet(MP);t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}},{key:"measure",value:function(){return this.layer.markers(this.view)}},{key:"draw",value:function(e){var t=this;if(e.length!=this.drawn.length||e.some((function(e,n){return r=e,i=t.drawn[n],!(r.constructor==i.constructor&&r.eq(i));var r,i}))){var n,r=this.dom.firstChild,i=0,o=P(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;a.update&&r&&a.constructor&&this.drawn[i].constructor&&a.update(r,this.drawn[i])?(r=r.nextSibling,i++):this.dom.insertBefore(a.draw(),r)}}catch(l){o.e(l)}finally{o.f()}for(;r;){var s=r.nextSibling;r.remove(),r=s}this.drawn=e}}},{key:"destroy",value:function(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}]),e}(),MP=cw.define();function NP(e){return[nx.define((function(t){return new AP(t,e)})),MP.of(e)]}var ZP=!vS.ios,DP=cw.define({combine:function(e){return Kw(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:function(e,t){return Math.min(e,t)},drawRangeCursor:function(e,t){return e||t}})}});function LP(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[DP.of(e),YP,UP,WP,qS.of(!0)]}function IP(e){return e.startState.facet(DP)!=e.state.facet(DP)}var YP=NP({above:!0,markers:function(e){var t,n=e.state,r=n.facet(DP),i=[],o=P(n.selection.ranges);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a==n.selection.main;if(a.empty?!s||ZP:r.drawRangeCursor){var l,u=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",c=a.empty?a:sw.cursor(a.head,a.head>a.anchor?-1:1),f=P(TP.forRange(e,u,c));try{for(f.s();!(l=f.n()).done;){var h=l.value;i.push(h)}}catch(d){f.e(d)}finally{f.f()}}}}catch(d){o.e(d)}finally{o.f()}return i},update:function(e,t){e.transactions.some((function(e){return e.selection}))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");var n=IP(e);return n&&VP(e.state,t),e.docChanged||e.selectionSet||n},mount:function(e,t){VP(t.state,e)},class:"cm-cursorLayer"});function VP(e,t){t.style.animationDuration=e.facet(DP).cursorBlinkRate+"ms"}var UP=NP({above:!1,markers:function(e){return e.state.selection.ranges.map((function(t){return t.empty?[]:TP.forRange(e,"cm-selectionBackground",t)})).reduce((function(e,t){return e.concat(t)}))},update:function(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||IP(e)},class:"cm-selectionLayer"}),jP={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};ZP&&(jP[".cm-line"].caretColor="transparent !important");var WP=kw.highest(vP.theme(jP)),zP=Iw.define({map:function(e,t){return null==e?null:t.mapPos(e)}}),XP=mw.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(zP)?t.value:e}),e)}}),FP=nx.fromClass(function(){function e(t){h(this,e),this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return m(e,[{key:"update",value:function(e){var t,n=e.state.field(XP);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(XP)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var e=this.view.state.field(XP),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(XP)!=e&&this.view.dispatch({effects:zP.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 BP(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,o)}var qP=function(){function e(t){h(this,e);var n=t.regexp,r=t.decoration,i=t.decorate,o=t.boundary,a=t.maxLength,s=void 0===a?1e3:a;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=function(e,t,n,r){return i(r,n,n+e[0].length,e,t)};else if("function"==typeof r)this.addMatch=function(e,t,n,i){var o=r(e,t,n);o&&i(n,n+e[0].length,o)};else{if(!r)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(e,t,n,i){return i(n,n+e[0].length,r)}}this.boundary=o,this.maxLength=s}return m(e,[{key:"createDeco",value:function(e){var t,n=this,r=new ik,i=r.add.bind(r),o=P(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=P(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(o.s();!(t=o.n()).done;){var a=t.value,s=a.from,l=a.to;BP(e.state.doc,this.regexp,s,l,(function(t,r){return n.addMatch(r,e,t,i)}))}}catch(u){o.e(u)}finally{o.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=P(e.visibleRanges);try{var s=function(){var a=i.value,s=Math.max(a.from,n),l=Math.min(a.to,r);if(l>s){var u=e.state.doc.lineAt(s),c=u.to<l?e.state.doc.lineAt(l):u,f=Math.max(a.from,u.from),h=Math.min(a.to,c.to);if(o.boundary){for(;s>u.from;s--)if(o.boundary.test(u.text[s-1-u.from])){f=s;break}for(;l<c.to;l++)if(o.boundary.test(c.text[l-c.from])){h=l;break}}var d,p=[],v=function(e,t,n){return p.push(n.range(e,t))};if(u==c)for(o.regexp.lastIndex=f-u.from;(d=o.regexp.exec(u.text))&&d.index<h-u.from;)o.addMatch(d,e,d.index+u.from,v);else BP(e.state.doc,o.regexp,f,h,(function(t,n){return o.addMatch(n,e,t,v)}));t=t.update({filterFrom:f,filterTo:h,filter:function(e,t){return e<f||t>h},add:p})}};for(a.s();!(i=a.n()).done;)s()}catch(l){a.e(l)}finally{a.f()}return t}}]),e}(),HP=null!=/x/.unicode?"gu":"g",GP=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]",HP),KP={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},JP=null;var eE=cw.define({combine:function(e){var t=Kw(e,{render:null,specialChars:GP,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==JP&&"undefined"!=typeof document&&document.body){var t=document.body.style;JP=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return JP||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,HP)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,HP)),t}});function tE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[eE.of(e),nE||(nE=nx.fromClass(function(){function e(t){h(this,e),this.view=t,this.decorations=$S.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(eE)),this.decorations=this.decorator.createDeco(t)}return m(e,[{key:"makeDecorator",value:function(e){var t=this;return new qP({regexp:e.specialChars,decoration:function(n,r,i){var o=r.state.doc,a=Fb(n[0],0);if(9==a){var s=o.lineAt(i),l=r.state.tabSize,u=vk(s.text,l,i-s.from);return $S.replace({widget:new iE((l-u%l)*t.view.defaultCharacterWidth)})}return t.decorationCache[a]||(t.decorationCache[a]=$S.replace({widget:new rE(e,a)}))},boundary:e.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(e){var t=e.state.facet(eE);e.startState.facet(eE)!=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 nE=null;var rE=function(e){y(n,e);var t=k(n);function n(e,r){var i;return h(this,n),(i=t.call(this)).options=e,i.code=r,i}return m(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")+" "+(KP[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}(QS),iE=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),(r=t.call(this)).width=e,r}return m(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}(QS);var oE=$S.line({class:"cm-activeLine"}),aE=nx.fromClass(function(){function e(t){h(this,e),this.decorations=this.getDeco(t)}return m(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=P(e.state.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=e.lineBlockAt(o.head);a.from>n&&(r.push(oE.range(a.from)),n=a.from)}}catch(s){i.e(s)}finally{i.f()}return $S.set(r)}}]),e}(),{decorations:function(e){return e.decorations}});var sE=2e3;function lE(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>sE?-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):vk(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function uE(e,t){var n=lE(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=lE(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>sE||n.off>sE||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(sw.range(u.from+a,u.to+s))}else for(var c=Math.min(t.col,n.col),f=Math.max(t.col,n.col),h=r;h<=i;h++){var d=e.doc.line(h),p=mk(d.text,c,e.tabSize,!0);if(p<0)o.push(sw.cursor(d.to));else{var v=mk(d.text,f,e.tabSize);o.push(sw.range(d.from+p,d.from+v))}}return o}(e.state,n,a);return s.length?o?sw.create(s.concat(r.ranges)):sw.create(s):r}}:null}function cE(e){var t=(null===e||void 0===e?void 0:e.eventFilter)||function(e){return e.altKey&&0==e.button};return vP.mouseSelectionStyle.of((function(e,n){return t(n)?uE(e,n):null}))}var fE={Alt:[18,function(e){return!!e.altKey}],Control:[17,function(e){return!!e.ctrlKey}],Shift:[16,function(e){return!!e.shiftKey}],Meta:[91,function(e){return!!e.metaKey}]},hE={style:"cursor: crosshair"};function dE(){var e=u(fE[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),t=e[0],n=e[1],r=nx.fromClass(function(){function e(t){h(this,e),this.view=t,this.isDown=!1}return m(e,[{key:"set",value:function(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}}]),e}(),{eventHandlers:{keydown:function(e){this.set(e.keyCode==t||n(e))},keyup:function(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove:function(e){this.set(n(e))}}});return[r,vP.contentAttributes.of((function(e){var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?hE:null}))]}var pE="-10000px",vE=function(){function e(t,n,r){h(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 m(e,[{key:"update",value:function(e){var t,n=e.state.facet(this.facet),r=n.filter((function(e){return e}));if(n===this.input){var i,o=P(this.tooltipViews);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.update&&a.update(e)}}catch(g){o.e(g)}finally{o.f()}return!1}for(var s=[],l=0;l<r.length;l++){var u=r[l],c=-1;if(u){for(var f=0;f<this.tooltips.length;f++){var h=this.tooltips[f];h&&h.create==u.create&&(c=f)}if(c<0)s[l]=this.createTooltipView(u);else{var d=s[l]=this.tooltipViews[c];d.update&&d.update(e)}}}var p,v=P(this.tooltipViews);try{for(v.s();!(p=v.n()).done;){var m=p.value;s.indexOf(m)<0&&(m.dom.remove(),null===(t=m.destroy)||void 0===t||t.call(m))}}catch(g){v.e(g)}finally{v.f()}return this.input=n,this.tooltips=r,this.tooltipViews=s,!0}}]),e}();function mE(e){var t=e.win;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}var gE=cw.define({combine:function(e){var t,n,r;return{position:vS.ios?"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,tooltipSpace:(null===(r=e.find((function(e){return e.tooltipSpace})))||void 0===r?void 0:r.tooltipSpace)||mE}}}),yE=new WeakMap,OE=nx.fromClass(function(){function e(t){var n=this;h(this,e),this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;var r=t.state.facet(gE);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 vE(t,kE,(function(e){return n.createTooltip(e)})),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((function(e){Date.now()>n.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&n.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return m(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:"observeIntersection",value:function(){if(this.intersectionObserver){this.intersectionObserver.disconnect();var e,t=P(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.intersectionObserver.observe(n.dom)}}catch(r){t.e(r)}finally{t.f()}}}},{key:"measureSoon",value:function(){var e=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout((function(){e.measureTimeout=-1,e.maybeMeasure()}),50))}},{key:"update",value:function(e){e.transactions.length&&(this.lastTransaction=Date.now());var t=this.manager.update(e);t&&this.observeIntersection();var n=t||e.geometryChanged,r=e.state.facet(gE);if(r.position!=this.position){this.position=r.position;var i,o=P(this.manager.tooltipViews);try{for(o.s();!(i=o.n()).done;){i.value.dom.style.position=this.position}}catch(u){o.e(u)}finally{o.f()}n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,s=P(this.manager.tooltipViews);try{for(s.s();!(a=s.n()).done;){var l=a.value;this.container.appendChild(l.dom)}}catch(u){s.e(u)}finally{s.f()}n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}},{key:"createTooltip",value:function(e){var t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var n=document.createElement("div");n.className="cm-tooltip-arrow",t.dom.appendChild(n)}return t.dom.style.position=this.position,t.dom.style.top=pE,this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}},{key:"destroy",value:function(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);var n,r=P(this.manager.tooltipViews);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.dom.remove(),null===(e=i.destroy)||void 0===e||e.call(i)}}catch(o){r.e(o)}finally{r.f()}null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}},{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,n){var r=e.manager.tooltipViews[n];return r.getCoords?r.getCoords(t.pos):e.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((function(e){return e.dom.getBoundingClientRect()})),space:this.view.state.facet(gE).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(e){for(var t,n=e.editor,r=e.space,i=[],o=0;o<this.manager.tooltips.length;o++){var a=this.manager.tooltips[o],s=this.manager.tooltipViews[o],l=s.dom,u=e.pos[o],c=e.size[o];if(!u||u.bottom<=Math.max(n.top,r.top)||u.top>=Math.min(n.bottom,r.bottom)||u.right<Math.max(n.left,r.left)-.1||u.left>Math.min(n.right,r.right)+.1)l.style.top=pE;else{var f=a.arrow?s.dom.querySelector(".cm-tooltip-arrow"):null,h=f?7:0,d=c.right-c.left,p=null!==(t=yE.get(s))&&void 0!==t?t:c.bottom-c.top,v=s.offset||wE,m=this.view.textDirection==vx.LTR,g=c.width>r.right-r.left?m?r.left:r.right-c.width:m?Math.min(u.left-(f?14:0)+v.x,r.right-d):Math.max(r.left,u.left-d+(f?14:0)-v.x),y=!!a.above;!a.strictSide&&(y?u.top-(c.bottom-c.top)-v.y<r.top:u.bottom+(c.bottom-c.top)+v.y>r.bottom)&&y==r.bottom-u.bottom>u.top-r.top&&(y=!y);var O=(y?u.top-r.top:r.bottom-u.bottom)-h;if(O<p&&!1!==s.resize){if(O<this.view.defaultLineHeight){l.style.top=pE;continue}yE.set(s,p),l.style.height=(p=O)+"px"}else l.style.height&&(l.style.height="");var b=y?u.top-p-h-v.y:u.bottom+h+v.y,w=g+d;if(!0!==s.overlap){var k,S=P(i);try{for(S.s();!(k=S.n()).done;){var x=k.value;x.left<w&&x.right>g&&x.top<b+p&&x.bottom>b&&(b=y?x.top-p-2-h:x.bottom+h+2)}}catch(C){S.e(C)}finally{S.f()}}"absolute"==this.position?(l.style.top=b-e.parent.top+"px",l.style.left=g-e.parent.left+"px"):(l.style.top=b+"px",l.style.left=g+"px"),f&&(f.style.left="".concat(u.left+(m?v.x:-v.x)-(g+14-7),"px")),!0!==s.overlap&&i.push({left:g,top:b,right:w,bottom:b+p}),l.classList.toggle("cm-tooltip-above",y),l.classList.toggle("cm-tooltip-below",!y),s.positioned&&s.positioned(e.space)}}}},{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=P(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){e.value.dom.style.top=pE}}catch(n){t.e(n)}finally{t.f()}}}}]),e}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),bE=vP.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"".concat(7,"px"),width:"".concat(14,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"".concat(7,"px solid transparent"),borderRight:"".concat(7,"px solid transparent")},".cm-tooltip-above &":{bottom:"-".concat(7,"px"),"&:before":{borderTop:"".concat(7,"px solid #bbb")},"&:after":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"1px"}},".cm-tooltip-below &":{top:"-".concat(7,"px"),"&:before":{borderBottom:"".concat(7,"px solid #bbb")},"&:after":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),wE={x:0,y:0},kE=cw.define({enables:[OE,bE]}),SE=cw.define(),xE=function(){function e(t){var n=this;h(this,e),this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new vE(t,SE,(function(e){return n.createHostedView(e)}))}return m(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=P(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(e){var t,n=P(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.positioned&&r.positioned(e)}}catch(i){n.e(i)}finally{n.f()}}},{key:"update",value:function(e){this.manager.update(e)}},{key:"destroy",value:function(){var e,t,n=P(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;null===(e=r.destroy)||void 0===e||e.call(r)}}catch(i){n.e(i)}finally{n.f()}}}],[{key:"create",value:function(t){return new e(t)}}]),e}(),CE=kE.compute([SE],(function(e){var t=e.facet(SE).filter((function(e){return e}));return 0===t.length?null:{pos:Math.min.apply(Math,f(t.map((function(e){return e.pos})))),end:Math.max.apply(Math,f(t.filter((function(e){return null!=e.end})).map((function(e){return e.end})))),create:xE.create,above:t[0].above,arrow:t.some((function(e){return e.arrow}))}})),PE=function(){function e(t,n,r,i,o){h(this,e),this.view=t,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},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 m(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.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}}},{key:"startHover",value:function(){var e=this;clearTimeout(this.restartTimeout);var t=this.view,n=this.lastMove,r=t.docView.nearest(n.target);if(r){var i,o=1;if(r instanceof yS)i=r.posAtStart;else{if(null==(i=t.posAtCoords(n)))return;var a=t.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-t.defaultCharacterWidth||n.x>a.right+t.defaultCharacterWidth)return;var s=t.bidiSpans(t.state.doc.lineAt(i)).find((function(e){return e.from<=i&&e.to>=i})),l=s&&s.dir==vx.RTL?-1:1;o=n.x<a.left?-l:l}var u=this.source(t,i,o);if(null===u||void 0===u?void 0:u.then){var c=this.pending={pos:i};u.then((function(n){e.pending==c&&(e.pending=null,n&&t.dispatch({effects:e.setHover.of(n)}))}),(function(e){return KS(t.state,e,"hover tooltip")}))}else u&&t.dispatch({effects:this.setHover.of(u)})}}},{key:"mousemove",value:function(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));var n=this.active;if(n&&!EE(this.lastMove.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(this.lastMove)==r:function(e,t,n,r,i,o){var a=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>r||a.right<r||a.top>i||Math.min(a.bottom,s)<i)return!1;var l=e.posAtCoords({x:r,y:i},!1);return l>=t&&l<=n}(this.view,r,i,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}},{key:"mouseleave",value:function(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!EE(e.relatedTarget)&&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 EE(e){for(var t=e;t;t=t.parentNode)if(1==t.nodeType&&t.classList.contains("cm-tooltip"))return!0;return!1}function QE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Iw.define(),r=mw.define({create:function(){return null},update:function(e,r){if(e&&(t.hideOnChange&&(r.docChanged||r.selection)||t.hideOn&&t.hideOn(r,e)))return null;if(e&&r.docChanged){var i=r.changes.mapPos(e.pos,-1,Gb.TrackDel);if(null==i)return null;var o=Object.assign(Object.create(null),e);o.pos=i,null!=e.end&&(o.end=r.changes.mapPos(e.end)),e=o}var a,s=P(r.effects);try{for(s.s();!(a=s.n()).done;){var l=a.value;l.is(n)&&(e=l.value),l.is($E)&&(e=null)}}catch(u){s.e(u)}finally{s.f()}return e},provide:function(e){return SE.from(e)}});return[r,nx.define((function(i){return new PE(i,e,r,n,t.hoverTime||300)})),CE]}function TE(e,t){var n=e.plugin(OE);if(!n)return null;var r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}var $E=Iw.define();var _E=cw.define({combine:function(e){var t,n,r,i=P(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 RE(e,t){var n=e.plugin(AE),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}var AE=nx.fromClass(function(){function e(t){h(this,e),this.input=t.state.facet(ZE),this.specs=this.input.filter((function(e){return e})),this.panels=this.specs.map((function(e){return e(t)}));var n=t.state.facet(_E);this.top=new ME(t,!0,n.topContainer),this.bottom=new ME(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=P(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 m(e,[{key:"update",value:function(e){var t=e.state.facet(_E);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new ME(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new ME(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var n=e.state.facet(ZE);if(n!=this.input){var r,i=n.filter((function(e){return e})),o=[],a=[],s=[],l=[],u=P(i);try{for(u.s();!(r=u.n()).done;){var c=r.value,f=this.specs.indexOf(c),h=void 0;f<0?(h=c(e.view),l.push(h)):(h=this.panels[f]).update&&h.update(e),o.push(h),(h.top?a:s).push(h)}}catch(O){u.e(O)}finally{u.f()}this.specs=i,this.panels=o,this.top.sync(a),this.bottom.sync(s);for(var d=0,p=l;d<p.length;d++){var v=p[d];v.dom.classList.add("cm-panel"),v.mount&&v.mount()}}else{var m,g=P(this.panels);try{for(g.s();!(m=g.n()).done;){var y=m.value;y.update&&y.update(e)}}catch(O){g.e(O)}finally{g.f()}}}},{key:"destroy",value:function(){this.top.sync([]),this.bottom.sync([])}}]),e}(),{provide:function(e){return vP.scrollMargins.of((function(t){var n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))}}),ME=function(){function e(t,n,r){h(this,e),this.view=t,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}return m(e,[{key:"sync",value:function(e){var t,n=P(this.panels);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.destroy&&e.indexOf(r)<0&&r.destroy()}}catch(i){n.e(i)}finally{n.f()}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=P(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=NE(n);n=n.nextSibling}else this.dom.insertBefore(i.dom,n)}}catch(o){r.e(o)}finally{r.f()}for(;n;)n=NE(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=P(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=P((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 NE(e){var t=e.nextSibling;return e.remove(),t}var ZE=cw.define({enables:AE}),DE=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n,[{key:"compare",value:function(e){return this==e||this.constructor==e.constructor&&this.eq(e)}},{key:"eq",value:function(e){return!1}},{key:"destroy",value:function(e){}}]),n}(Jw);DE.prototype.elementClass="",DE.prototype.toDOM=void 0,DE.prototype.mapMode=Gb.TrackBefore,DE.prototype.startSide=DE.prototype.endSide=-1,DE.prototype.point=!0;var LE=cw.define(),IE={class:"",renderEmptyElements:!1,elementStyle:"",markers:function(){return rk.empty},lineMarker:function(){return null},widgetMarker:function(){return null},lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},YE=cw.define();function VE(e){return[jE(),YE.of(Object.assign(Object.assign({},IE),e))]}var UE=cw.define({combine:function(e){return e.some((function(e){return e}))}});function jE(e){var t=[WE];return e&&!1===e.fixed&&t.push(UE.of(!0)),t}var WE=nx.fromClass(function(){function e(t){h(this,e),this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(YE).map((function(e){return new BE(t,e)}));var n,r=P(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(UE),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}return m(e,[{key:"update",value:function(e){if(this.updateGutters(e)){var t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(UE)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}},{key:"syncGutters",value:function(e){var t=this,n=this.dom.nextSibling;e&&this.dom.remove();var r,i=rk.iter(this.view.state.facet(LE),this.view.viewport.from),o=[],a=this.gutters.map((function(e){return new FE(e,t.view.viewport,-t.view.documentPadding.top)})),s=P(this.view.viewportLineBlocks);try{for(s.s();!(r=s.n()).done;){var l=r.value;if(o.length&&(o=[]),Array.isArray(l.type)){var u,c=!0,f=P(l.type);try{for(f.s();!(u=f.n()).done;){var h=u.value;if(h.type==TS.Text&&c){XE(i,o,h.from);var d,p=P(a);try{for(p.s();!(d=p.n()).done;){d.value.line(this.view,h,o)}}catch(w){p.e(w)}finally{p.f()}c=!1}else if(h.widget){var v,m=P(a);try{for(m.s();!(v=m.n()).done;){v.value.widget(this.view,h)}}catch(w){m.e(w)}finally{m.f()}}}}catch(w){f.e(w)}finally{f.f()}}else if(l.type==TS.Text){XE(i,o,l.from);var g,y=P(a);try{for(y.s();!(g=y.n()).done;){g.value.line(this.view,l,o)}}catch(w){y.e(w)}finally{y.f()}}}}catch(w){s.e(w)}finally{s.f()}var O,b=P(a);try{for(b.s();!(O=b.n()).done;){O.value.finish()}}catch(w){b.e(w)}finally{b.f()}e&&this.view.scrollDOM.insertBefore(this.dom,n)}},{key:"updateGutters",value:function(e){var t=e.startState.facet(YE),n=e.state.facet(YE),r=e.docChanged||e.heightChanged||e.viewportChanged||!rk.eq(e.startState.facet(LE),e.state.facet(LE),e.view.viewport.from,e.view.viewport.to);if(t==n){var i,o=P(this.gutters);try{for(o.s();!(i=o.n()).done;){i.value.update(e)&&(r=!0)}}catch(g){o.e(g)}finally{o.f()}}else{r=!0;var a,s=[],l=P(n);try{for(l.s();!(a=l.n()).done;){var u=a.value,c=t.indexOf(u);c<0?s.push(new BE(this.view,u)):(this.gutters[c].update(e),s.push(this.gutters[c]))}}catch(g){l.e(g)}finally{l.f()}var f,h=P(this.gutters);try{for(h.s();!(f=h.n()).done;){var d=f.value;d.dom.remove(),s.indexOf(d)<0&&d.destroy()}}catch(g){h.e(g)}finally{h.f()}for(var p=0,v=s;p<v.length;p++){var m=v[p];this.dom.appendChild(m.dom)}this.gutters=s}return r}},{key:"destroy",value:function(){var e,t=P(this.gutters);try{for(t.s();!(e=t.n()).done;){e.value.destroy()}}catch(n){t.e(n)}finally{t.f()}this.dom.remove()}}]),e}(),{provide:function(e){return vP.scrollMargins.of((function(t){var n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==vx.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}:null}))}});function zE(e){return Array.isArray(e)?e:[e]}function XE(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var FE=function(){function e(t,n,r){h(this,e),this.gutter=t,this.height=r,this.i=0,this.cursor=rk.iter(t.markers,n.from)}return m(e,[{key:"addElement",value:function(e,t,n){var r=this.gutter,i=t.top-this.height;if(this.i==r.elements.length){var o=new qE(e,t.height,i,n);r.elements.push(o),r.dom.appendChild(o.dom)}else r.elements[this.i].update(e,t.height,i,n);this.height=t.bottom,this.i++}},{key:"line",value:function(e,t,n){var r=[];XE(this.cursor,r,t.from),n.length&&(r=r.concat(n));var i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);var o=this.gutter;(0!=r.length||o.config.renderEmptyElements)&&this.addElement(e,t,r)}},{key:"widget",value:function(e,t){var n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}},{key:"finish",value:function(){for(var e=this.gutter;e.elements.length>this.i;){var t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}]),e}(),BE=function(){function e(t,n){var r=this;h(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(i){var o,a=i.target;if(a!=r.dom&&r.dom.contains(a)){for(;a.parentNode!=r.dom;)a=a.parentNode;var s=a.getBoundingClientRect();o=(s.top+s.bottom)/2}else o=i.clientY;var l=t.lineBlockAtHeight(o-t.documentTop);n.domEventHandlers[e](t,l,i)&&i.preventDefault()}))};for(var o in n.domEventHandlers)i(o);this.markers=zE(n.markers(t)),n.initialSpacer&&(this.spacer=new qE(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return m(e,[{key:"update",value:function(e){var t=this.markers;if(this.markers=zE(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!rk.eq(this.markers,t,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}},{key:"destroy",value:function(){var e,t=P(this.elements);try{for(t.s();!(e=t.n()).done;){e.value.destroy()}}catch(n){t.e(n)}finally{t.f()}}}]),e}(),qE=function(){function e(t,n,r,i){h(this,e),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,n,r,i)}return m(e,[{key:"update",value:function(e,t,n,r){this.height!=t&&(this.dom.style.height=(this.height=t)+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),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}(this.markers,r)||this.setMarkers(e,r)}},{key:"setMarkers",value:function(e,t){for(var n="cm-gutterElement",r=this.dom.firstChild,i=0,o=0;;){var a=o,s=i<t.length?t[i++]:null,l=!1;if(s){var u=s.elementClass;u&&(n+=" "+u);for(var c=o;c<this.markers.length;c++)if(this.markers[c].compare(s)){a=c,l=!0;break}}else a=this.markers.length;for(;o<a;){var f=this.markers[o++];if(f.toDOM){f.destroy(r);var h=r.nextSibling;r.remove(),r=h}}if(!s)break;s.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),l&&o++}this.dom.className=n,this.markers=t}},{key:"destroy",value:function(){this.setMarkers(null,[])}}]),e}();var HE=cw.define(),GE=cw.define({combine:function(e){return Kw(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers:function(e,t){var n=Object.assign({},e),r=function(){var e=n[i],r=t[i];n[i]=e?function(t,n,i){return e(t,n,i)||r(t,n,i)}:r};for(var i in t)r();return n}})}}),KE=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),(r=t.call(this)).number=e,r}return m(n,[{key:"eq",value:function(e){return this.number==e.number}},{key:"toDOM",value:function(){return document.createTextNode(this.number)}}]),n}(DE);function JE(e,t){return e.state.facet(GE).formatNumber(t,e.state)}var eQ=YE.compute([GE],(function(e){return{class:"cm-lineNumbers",renderEmptyElements:!1,markers:function(e){return e.state.facet(HE)},lineMarker:function(e,t,n){return n.some((function(e){return e.toDOM}))?null:new KE(JE(e,e.state.doc.lineAt(t.from).number))},widgetMarker:function(){return null},lineMarkerChange:function(e){return e.startState.facet(GE)!=e.state.facet(GE)},initialSpacer:function(e){return new KE(JE(e,nQ(e.state.doc.lines)))},updateSpacer:function(e,t){var n=JE(t.view,nQ(t.view.state.doc.lines));return n==e.number?e:new KE(n)},domEventHandlers:e.facet(GE).domEventHandlers}}));function tQ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[GE.of(e),jE(),eQ]}function nQ(e){for(var t=9;t<e;)t=10*t+9;return t}var rQ=new(function(e){y(n,e);var t=k(n);function n(){var e;return h(this,n),(e=t.apply(this,arguments)).elementClass="cm-activeLineGutter",e}return m(n)}(DE)),iQ=LE.compute(["selection"],(function(e){var t,n=[],r=-1,i=P(e.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=e.doc.lineAt(o.head).from;a>r&&(r=a,n.push(rQ.range(a)))}}catch(s){i.e(s)}finally{i.f()}return rk.of(n)}));var oQ=1024,aQ=0,sQ=m((function e(t,n){h(this,e),this.from=t,this.to=n})),lQ=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),this.id=aQ++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return m(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=cQ.match(e)),function(n){var r=e(n);return void 0===r?null:[t,r]}}}]),e}();lQ.closedBy=new lQ({deserialize:function(e){return e.split(" ")}}),lQ.openedBy=new lQ({deserialize:function(e){return e.split(" ")}}),lQ.group=new lQ({deserialize:function(e){return e.split(" ")}}),lQ.contextHash=new lQ({perNode:!0}),lQ.lookAhead=new lQ({perNode:!0}),lQ.mounted=new lQ({perNode:!0});var uQ=Object.create(null),cQ=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;h(this,e),this.name=t,this.props=n,this.id=r,this.flags=i}return m(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(lQ.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):uQ,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=P(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=P(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(lQ.group),r=-1;r<(n?n.length:0);r++){var i=t[r<0?e.name:n[r]];if(i)return i}}}}]),e}();cQ.none=new cQ("",Object.create(null),0,8);var fQ,hQ=function(){function e(t){h(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 m(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=P(this.types);try{for(a.s();!(o=a.n()).done;){var s,l=o.value,u=null,c=P(r);try{for(c.s();!(s=c.n()).done;){var f=(0,s.value)(l);f&&(u||(u=Object.assign({},l.props)),u[f[0].id]=f[1])}}catch(h){c.e(h)}finally{c.f()}t.push(u?new cQ(l.name,u,l.id,l.flags):l)}}catch(h){a.e(h)}finally{a.f()}return new e(t)}}]),e}(),dQ=new WeakMap,pQ=new WeakMap;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(fQ||(fQ={}));var vQ=function(){function e(t,n,r,i,o){if(h(this,e),this.type=t,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);var a,s=P(o);try{for(s.s();!(a=s.n()).done;){var l=u(a.value,2),c=l[0],f=l[1];this.props["number"==typeof c?c:c.id]=f}}catch(d){s.e(d)}finally{s.f()}}}return m(e,[{key:"toString",value:function(){var e=this.prop(lQ.mounted);if(e&&!e.overlay)return e.tree.toString();var t,n="",r=P(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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new PQ(this.topNode,e)}},{key:"cursorAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=dQ.get(this)||this.topNode,r=new PQ(n);return r.moveTo(e,t),dQ.set(this,r._tree),r}},{key:"topNode",get:function(){return new wQ(this,0,0,null)}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=bQ(dQ.get(this)||this.topNode,e,t,!1);return dQ.set(this,n),n}},{key:"resolveInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=bQ(pQ.get(this)||this.topNode,e,t,!0);return pQ.set(this,n),n}},{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=e.mode||0,l=(s&fQ.IncludeAnonymous)>0,u=this.cursor(s|fQ.IncludeAnonymous);;){var c=!1;if(u.from<=a&&u.to>=i&&(!l&&u.type.isAnonymous||!1!==t(u))){if(u.firstChild())continue;c=!0}for(;c&&n&&(l||!u.type.isAnonymous)&&n(u),!u.nextSibling();){if(!u.parent())return;c=!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:$Q(cQ.none,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(cQ.none,t,n,r)})}}],[{key:"build",value:function(e){return function(e){var t,n=e.buffer,r=e.nodeSet,i=e.maxBufferLength,o=void 0===i?oQ: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 mQ(n,n.length):n,f=r.types,h=0,d=0;function p(e,t,n,i,a){for(var l=c.id,b=c.start,w=c.end,k=c.size,S=d;k<0;){if(c.next(),-1==k){var x=s[l];return n.push(x),void i.push(b-e)}if(-3==k)return void(h=l);if(-4==k)return void(d=l);throw new RangeError("Unrecognized record size: ".concat(k))}var C,P,E=f[l],Q=b-e;if(w-b<=o&&(P=y(c.pos-t,a))){for(var T=new Uint16Array(P.size-P.skip),$=c.pos-P.size,_=T.length;c.pos>$;)_=O(P.start,T,_);C=new gQ(T,w-P.start,r),Q=P.start-e}else{var R=c.pos-k;c.next();for(var A=[],M=[],N=l>=u?l:-1,Z=0,D=w;c.pos>R;)N>=0&&c.id==N&&c.size>=0?(c.end<=D-o&&(m(A,M,b,Z,c.end,D,N,S),Z=A.length,D=c.end),c.next()):p(b,R,A,M,N);if(N>=0&&Z>0&&Z<A.length&&m(A,M,b,Z,b,D,N,S),A.reverse(),M.reverse(),N>-1&&Z>0){var L=v(E);C=$Q(E,A,M,0,A.length,0,w-b,L,L)}else C=g(E,A,M,w-b,S-w)}n.push(C),i.push(Q)}function v(e){return function(t,n,r){var i,o,a=0,s=t.length-1;if(s>=0&&(i=t[s])instanceof vQ){if(!s&&i.type==e&&i.length==r)return i;(o=i.prop(lQ.lookAhead))&&(a=n[s]+i.length+o)}return g(e,t,n,r,a)}}function m(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(g(r.types[s],u,c,a-o,l-a)),t.push(o-n)}function g(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(h){var a=[lQ.contextHash,h];o=o?[a].concat(o):[a]}if(i>25){var s=[lQ.lookAhead,i];o=o?[s].concat(o):[s]}return new vQ(e,t,n,r,o)}function y(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 h=n.size;if(n.id==t&&h>=0)l.size=r,l.start=i,l.skip=a,a+=4,r+=4,n.next();else{var d=n.pos-h;if(h<0||d<f||n.start<s)break;var p=n.id>=u?4:0,v=n.start;for(n.next();n.pos>d;){if(n.size<0){if(-3!=n.size)break e;p+=4}else n.id>=u&&(p+=4);n.next()}i=v,r+=h,a+=p}}return(t<0||r==e)&&(l.size=r,l.start=i,l.skip=a),l.size>4?l:void 0}function O(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=O(e,t,n);t[--n]=s,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else-3==a?h=r:-4==a&&(d=r);return n}var b=[],w=[];for(;c.pos>0;)p(e.start||0,e.bufferStart||0,b,w,-1);var k=null!==(t=e.length)&&void 0!==t?t:b.length?w[0]+b[0].length:0;return new vQ(f[e.topID],b.reverse(),w.reverse(),k)}(e)}}]),e}();vQ.empty=new vQ(cQ.none,[],[],0);var mQ=function(){function e(t,n){h(this,e),this.buffer=t,this.index=n}return m(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}(),gQ=function(){function e(t,n,r){h(this,e),this.buffer=t,this.length=n,this.set=r}return m(e,[{key:"type",get:function(){return cQ.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&&!(yQ(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){for(var i=this.buffer,o=new Uint16Array(n-t),a=0,s=t,l=0;s<n;){o[l++]=i[s++],o[l++]=i[s++]-r;var u=o[l++]=i[s++]-r;o[l++]=i[s++]-t,a=Math.max(a,u)}return new e(o,a,this.set)}}]),e}();function yQ(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 OQ(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}function bQ(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){var o=!r&&e instanceof wQ&&e.index<0?null:e.parent;if(!o)return e;e=o}var a=r?0:fQ.IgnoreOverlays;if(r)for(var s=e,l=s.parent;l;l=(s=l).parent)s instanceof wQ&&s.index<0&&(null===(i=l.enter(t,n,a))||void 0===i?void 0:i.from)!=s.from&&(e=l);for(;;){var u=e.enter(t,n,a);if(!u)return e;e=u}}var wQ=function(){function e(t,n,r,i){h(this,e),this._tree=t,this.from=n,this.index=r,this._parent=i}return m(e,[{key:"type",get:function(){return this._tree.type}},{key:"name",get:function(){return this._tree.type.name}},{key:"to",get:function(){return this.from+this._tree.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._tree,l=s.children,u=s.positions,c=n>0?l.length:-1;t!=c;t+=n){var f=l[t],h=u[t]+a.from;if(yQ(i,r,h,h+f.length))if(f instanceof gQ){if(o&fQ.ExcludeBuffers)continue;var d=f.findChild(0,f.buffer.length,n,r-h,i);if(d>-1)return new CQ(new xQ(a,f,t,h),null,d)}else if(o&fQ.IncludeAnonymous||!f.type.isAnonymous||EQ(f)){var p=void 0;if(!(o&fQ.IgnoreMounts)&&f.props&&(p=f.prop(lQ.mounted))&&!p.overlay)return new e(p.tree,h,t,a);var v=new e(f,h,t,a);return o&fQ.IncludeAnonymous||!v.type.isAnonymous?v:v.nextChild(n<0?f.children.length-1:0,n,r,i)}}if(o&fQ.IncludeAnonymous||!a.type.isAnonymous)return null;if(t=a.index>=0?a.index+n:n<0?-1:a._parent._tree.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._tree.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._tree.children.length-1,-1,e,-2)}},{key:"enter",value:function(t,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(i&fQ.IgnoreOverlays)&&(r=this._tree.prop(lQ.mounted))&&r.overlay){var o,a=t-this.from,s=P(r.overlay);try{for(s.s();!(o=s.n()).done;){var l=o.value,u=l.from,c=l.to;if((n>0?u<=a:u<a)&&(n<0?c>=a:c>a))return new e(r.tree,r.overlay[0].from+this.from,-1,this)}}catch(f){s.e(f)}finally{s.f()}}return this.nextChild(0,1,t,n,i)}},{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",value:function(){return new PQ(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(e){return bQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(e){return bQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(e){return OQ(this,e)}},{key:"getChild",value:function(e){var t=kQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return t.length?t[0]:null}},{key:"getChildren",value:function(e){return kQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(e){return SQ(this,e)}}]),e}();function kQ(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:[]}}function SQ(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length-1,r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var xQ=m((function e(t,n,r,i){h(this,e),this.parent=t,this.buffer=n,this.index=r,this.start=i})),CQ=function(){function e(t,n,r){h(this,e),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}return m(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){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&fQ.ExcludeBuffers)return null;var r=this.context.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return i<0?null:new e(this.context,this,i)}},{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",value:function(){return new PQ(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{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];e.push(n.slice(r,i,o)),t.push(0)}return new vQ(this.type,e,t,this.to-this.from)}},{key:"resolve",value:function(e){return bQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(e){return bQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(e){return OQ(this,e)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(e){var t=kQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return t.length?t[0]:null}},{key:"getChildren",value:function(e){return kQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(e){return SQ(this,e)}}]),e}(),PQ=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(h(this,e),this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof wQ)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 m(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 wQ?(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._tree.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]:this.mode;return this.buffer?!(n&fQ.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&fQ.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var e=this.mode&fQ.IncludeAnonymous?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._tree.children.length;s!=l;s+=e){var u=n._tree.children[s];if(this.mode&fQ.IncludeAnonymous||u instanceof gQ||!u.type.isAnonymous||EQ(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 CQ(this.buffer,t,this.stack[a]);return this.bufferNode=new CQ(this.buffer,t,this.index)}},{key:"tree",get:function(){return this.buffer?null:this._tree._tree}},{key:"iterate",value:function(e,t){for(var n=0;;){var r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;r&&t&&t(this),r=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,r=!0}}}},{key:"matchContext",value:function(e){if(!this.buffer)return SQ(this.node,e);for(var t=this.buffer.buffer,n=t.set.types,r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return SQ(this.node,e,r);var o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}]),e}();function EQ(e){return e.children.some((function(e){return e instanceof gQ||!e.type.isAnonymous||EQ(e)}))}var QQ=new WeakMap;function TQ(e,t){if(!e.isAnonymous||t instanceof gQ||t.type!=e)return 1;var n=QQ.get(t);if(null==n){n=1;var r,i=P(t.children);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.type!=e||!(o instanceof vQ)){n=1;break}n+=TQ(e,o)}}catch(a){i.e(a)}finally{i.f()}QQ.set(t,n)}return n}function $Q(e,t,n,r,i,o,a,s,l){for(var u=0,c=r;c<i;c++)u+=TQ(e,t[c]);var f=Math.ceil(1.5*u/8),h=[],d=[];return function t(n,r,i,a,s){for(var u=i;u<a;){var c=u,p=r[u],v=TQ(e,n[u]);for(u++;u<a;u++){var m=TQ(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}h.push(n[c])}else{var y=r[u-1]+n[u-1].length-p;h.push($Q(e,n,r,c,u,p,y,null,l))}d.push(p+s-o)}}(t,n,r,i,0),(s||l)(h,d,a)}var _Q=function(){function e(){h(this,e),this.map=new WeakMap}return m(e,[{key:"setBuffer",value:function(e,t,n){var r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}},{key:"getBuffer",value:function(e,t){var n=this.map.get(e);return n&&n.get(t)}},{key:"set",value:function(e,t){e instanceof CQ?this.setBuffer(e.context.buffer,e.index,t):e instanceof wQ&&this.map.set(e.tree,t)}},{key:"get",value:function(e){return e instanceof CQ?this.getBuffer(e.context.buffer,e.index):e instanceof wQ?this.map.get(e.tree):void 0}},{key:"cursorSet",value:function(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}},{key:"cursorGet",value:function(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}]),e}(),RQ=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];h(this,e),this.from=t,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}return m(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=P(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 h=a;if(l>=h.from||f<=h.to||u){var d=Math.max(h.from,l)-u,p=Math.min(h.to,f)-u;h=d>=p?null:new e(d,p,h.tree,h.offset+u,s>0,!!c)}if(h&&i.push(h),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}(),AQ=function(){function e(){h(this,e)}return m(e,[{key:"startParse",value:function(e,t,n){return"string"==typeof e&&(e=new MQ(e)),n=n?n.length?n.map((function(e){return new sQ(e.from,e.to)})):[new sQ(0,0)]:[new sQ(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}(),MQ=function(){function e(t){h(this,e),this.string=t}return m(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}();new lQ({perNode:!0});var NQ=0,ZQ=function(){function e(t,n,r){h(this,e),this.set=t,this.base=n,this.modified=r,this.id=NQ++}return m(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=P(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 LQ;return function(t){return t.modified.indexOf(e)>-1?t:LQ.get(t.base||t,t.modified.concat(e).sort((function(e,t){return e.id-t.id})))}}}]),e}(),DQ=0,LQ=function(){function e(){h(this,e),this.instances=[],this.id=DQ++}return m(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 ZQ(o,t,n),s=P(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=function(e){for(var t=[[]],n=0;n<e.length;n++)for(var r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((function(e,t){return t.length-e.length}))}(n),c=P(t.set);try{for(c.s();!(l=c.n()).done;){var f=l.value;if(!f.modified.length){var h,d=P(u);try{for(d.s();!(h=d.n()).done;){var p=h.value;o.push(e.get(f,p))}}catch(v){d.e(v)}finally{d.f()}}}}catch(v){c.e(v)}finally{c.f()}return a}}]),e}();function IQ(e){var t=Object.create(null);for(var n in e){var r=e[n];Array.isArray(r)||(r=[r]);var i,o=P(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]?"":'"'==f[0][0]?JSON.parse(f[0]):f[0]),(c+=f[0].length)==a.length)break;var h=a[c++];if(c==a.length&&"!"==h){l=0;break}if("/"!=h)throw new RangeError("Invalid path: "+a);u=a.slice(c)}var d=s.length-1,p=s[d];if(!p)throw new RangeError("Invalid path: "+a);var v=new VQ(r,l,d>0?s.slice(0,d):null);t[p]=v.sort(t[p])}}}catch(m){o.e(m)}finally{o.f()}}return YQ.add(t)}var YQ=new lQ,VQ=function(){function e(t,n,r,i){h(this,e),this.tags=t,this.mode=n,this.context=r,this.next=i}return m(e,[{key:"opaque",get:function(){return 0==this.mode}},{key:"inherit",get:function(){return 1==this.mode}},{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}();function UQ(e,t){var n,r=Object.create(null),i=P(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(Array.isArray(o.tag)){var a,s=P(o.tag);try{for(s.s();!(a=s.n()).done;){var l=a.value;r[l.id]=o.class}}catch(d){s.e(d)}finally{s.f()}}else r[o.tag.id]=o.class}}catch(d){i.e(d)}finally{i.f()}var u=t||{},c=u.scope,f=u.all,h=void 0===f?null:f;return{style:function(e){var t,n=h,i=P(e);try{for(i.s();!(t=i.n()).done;){var o,a=P(t.value.set);try{for(a.s();!(o=a.n()).done;){var s=o.value,l=r[s.id];if(l){n=n?n+" "+l:l;break}}}catch(d){a.e(d)}finally{a.f()}}}catch(d){i.e(d)}finally{i.f()}return n},scope:c}}function jQ(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.length,o=new WQ(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}VQ.empty=new VQ([],2,null);var WQ=function(){function e(t,n,r){h(this,e),this.at=t,this.highlighters=n,this.span=r,this.class=""}return m(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){var o=e.type,a=e.from,s=e.to;if(!(a>=n||s<=t)){o.isTop&&(i=this.highlighters.filter((function(e){return!e.scope||e.scope(o)})));var l=r,u=function(e){var t=e.type.prop(YQ);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||VQ.empty,c=function(e,t){var n,r=null,i=P(e);try{for(i.s();!(n=i.n()).done;){var o=n.value.style(t);o&&(r=r?r+" "+o:o)}}catch(a){i.e(a)}finally{i.f()}return r}(i,u.tags);if(c&&(l&&(l+=" "),l+=c,1==u.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(t,a),l),!u.opaque){var f=e.tree&&e.tree.prop(lQ.mounted);if(f&&f.overlay){for(var h=e.node.enter(f.overlay[0].from+a,1),d=this.highlighters.filter((function(e){return!e.scope||e.scope(f.tree.type)})),p=e.firstChild(),v=0,m=a;;v++){var g=v<f.overlay.length?f.overlay[v]:null,y=g?g.from+a:s,O=Math.max(t,m),b=Math.min(n,y);if(O<b&&p)for(;e.from<b&&(this.highlightRange(e,O,b,r,i),this.startSpan(Math.min(b,e.to),l),!(e.to>=y)&&e.nextSibling()););if(!g||y>n)break;(m=g.to+a)>t&&(this.highlightRange(h.cursor(),Math.max(t,g.from+a),Math.min(n,m),"",d),this.startSpan(Math.min(n,m),l))}p&&e.parent()}else if(e.firstChild()){f&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}}}]),e}();var zQ,XQ=ZQ.define,FQ=XQ(),BQ=XQ(),qQ=XQ(BQ),HQ=XQ(BQ),GQ=XQ(),KQ=XQ(GQ),JQ=XQ(GQ),eT=XQ(),tT=XQ(eT),nT=XQ(),rT=XQ(),iT=XQ(),oT=XQ(iT),aT=XQ(),sT={comment:FQ,lineComment:XQ(FQ),blockComment:XQ(FQ),docComment:XQ(FQ),name:BQ,variableName:XQ(BQ),typeName:qQ,tagName:XQ(qQ),propertyName:HQ,attributeName:XQ(HQ),className:XQ(BQ),labelName:XQ(BQ),namespace:XQ(BQ),macroName:XQ(BQ),literal:GQ,string:KQ,docString:XQ(KQ),character:XQ(KQ),attributeValue:XQ(KQ),number:JQ,integer:XQ(JQ),float:XQ(JQ),bool:XQ(GQ),regexp:XQ(GQ),escape:XQ(GQ),color:XQ(GQ),url:XQ(GQ),keyword:nT,self:XQ(nT),null:XQ(nT),atom:XQ(nT),unit:XQ(nT),modifier:XQ(nT),operatorKeyword:XQ(nT),controlKeyword:XQ(nT),definitionKeyword:XQ(nT),moduleKeyword:XQ(nT),operator:rT,derefOperator:XQ(rT),arithmeticOperator:XQ(rT),logicOperator:XQ(rT),bitwiseOperator:XQ(rT),compareOperator:XQ(rT),updateOperator:XQ(rT),definitionOperator:XQ(rT),typeOperator:XQ(rT),controlOperator:XQ(rT),punctuation:iT,separator:XQ(iT),bracket:oT,angleBracket:XQ(oT),squareBracket:XQ(oT),paren:XQ(oT),brace:XQ(oT),content:eT,heading:tT,heading1:XQ(tT),heading2:XQ(tT),heading3:XQ(tT),heading4:XQ(tT),heading5:XQ(tT),heading6:XQ(tT),contentSeparator:XQ(eT),list:XQ(eT),quote:XQ(eT),emphasis:XQ(eT),strong:XQ(eT),link:XQ(eT),monospace:XQ(eT),strikethrough:XQ(eT),inserted:XQ(),deleted:XQ(),changed:XQ(),invalid:XQ(),meta:aT,documentMeta:XQ(aT),annotation:XQ(aT),processingInstruction:XQ(aT),definition:ZQ.defineModifier(),constant:ZQ.defineModifier(),function:ZQ.defineModifier(),standard:ZQ.defineModifier(),local:ZQ.defineModifier(),special:ZQ.defineModifier()},lT=(UQ([{tag:sT.link,class:"tok-link"},{tag:sT.heading,class:"tok-heading"},{tag:sT.emphasis,class:"tok-emphasis"},{tag:sT.strong,class:"tok-strong"},{tag:sT.keyword,class:"tok-keyword"},{tag:sT.atom,class:"tok-atom"},{tag:sT.bool,class:"tok-bool"},{tag:sT.url,class:"tok-url"},{tag:sT.labelName,class:"tok-labelName"},{tag:sT.inserted,class:"tok-inserted"},{tag:sT.deleted,class:"tok-deleted"},{tag:sT.literal,class:"tok-literal"},{tag:sT.string,class:"tok-string"},{tag:sT.number,class:"tok-number"},{tag:[sT.regexp,sT.escape,sT.special(sT.string)],class:"tok-string2"},{tag:sT.variableName,class:"tok-variableName"},{tag:sT.local(sT.variableName),class:"tok-variableName tok-local"},{tag:sT.definition(sT.variableName),class:"tok-variableName tok-definition"},{tag:sT.special(sT.variableName),class:"tok-variableName2"},{tag:sT.definition(sT.propertyName),class:"tok-propertyName tok-definition"},{tag:sT.typeName,class:"tok-typeName"},{tag:sT.namespace,class:"tok-namespace"},{tag:sT.className,class:"tok-className"},{tag:sT.macroName,class:"tok-macroName"},{tag:sT.propertyName,class:"tok-propertyName"},{tag:sT.operator,class:"tok-operator"},{tag:sT.comment,class:"tok-comment"},{tag:sT.meta,class:"tok-meta"},{tag:sT.invalid,class:"tok-invalid"},{tag:sT.punctuation,class:"tok-punctuation"}]),new lQ);function uT(e){return cw.define({combine:e?function(t){return t.concat(e)}:void 0})}var cT=new lQ,fT=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";h(this,e),this.data=t,this.name=i,Gw.prototype.hasOwnProperty("tree")||Object.defineProperty(Gw.prototype,"tree",{get:function(){return pT(this)}}),this.parser=n,this.extension=[ST.of(this),Gw.languageData.of((function(e,t,n){var r=hT(e,t,n),i=r.type.prop(lT);if(!i)return[];var o=e.facet(i),a=r.type.prop(cT);if(a){var s,l=r.resolve(t-r.from,n),u=P(a);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(c.test(l,e)){var f=e.facet(c.facet);return"replace"==c.type?f:f.concat(o)}}}catch(h){u.e(h)}finally{u.f()}}return o}))].concat(r)}return m(e,[{key:"isActiveAt",value:function(e,t){return hT(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(lT)==this.data}},{key:"findRegions",value:function(e){var t=this,n=e.facet(ST);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(lT)!=t.data){var o=n.prop(lQ.mounted);if(o){if(o.tree.prop(lT)==t.data){if(o.overlay){var a,s=P(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(h){s.e(h)}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 vQ&&e(f,n.positions[c]+i)}}else r.push({from:i,to:i+n.length})}(pT(e),0),r}},{key:"allowsNesting",get:function(){return!0}}]),e}();function hT(e,t,n){var r=e.facet(ST),i=pT(e).topNode;if(!r||r.allowsNesting)for(var o=i;o;o=o.enter(t,n,fQ.ExcludeBuffers))o.type.isTop&&(i=o);return i}fT.setState=Iw.define();var dT=function(e){y(n,e);var t=k(n);function n(e,r,i){var o;return h(this,n),(o=t.call(this,e,r,[],i)).parser=r,o}return m(n,[{key:"configure",value:function(e,t){return new n(this.data,this.parser.configure(e),t||this.name)}},{key:"allowsNesting",get:function(){return this.parser.hasWrappers()}}],[{key:"define",value:function(e){var t=uT(e.languageData);return new n(t,e.parser.configure({props:[lT.add((function(e){return e.isTop?t:void 0}))]}),e.name)}}]),n}(fT);function pT(e){var t=e.field(fT.state,!1);return t?t.tree:vQ.empty}var vT=function(){function e(t){h(this,e),this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}return m(e,[{key:"length",get:function(){return this.doc.length}},{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}(),mT=null,gT=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;h(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 m(e,[{key:"startParse",value:function(){return this.parser.startParse(new vT(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!=vQ.empty&&this.isDone(null!==t&&void 0!==t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((function(){var r;if("number"==typeof e){var i=Date.now()+e;e=function(){return Date.now()>i}}for(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);;){var o=n.parse.advance();if(o){if(n.fragments=n.withoutTempSkipped(RQ.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(e())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.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(RQ.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(e){var t=mT;mT=this;try{return e()}finally{mT=t}}},{key:"withoutTempSkipped",value:function(e){for(var t;t=this.tempSkipped.pop();)e=yT(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=RQ.applyChanges(r,l),i=vQ.empty,o=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length){s=[];var u,c=P(this.skipped);try{for(c.s();!(u=c.n()).done;){var f=u.value,h=t.mapPos(f.from,1),d=t.mapPos(f.to,-1);h<d&&s.push({from:h,to:d})}}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=yT(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:"isDone",value:function(e){e=Math.min(e,this.state.doc.length);var t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}}],[{key:"create",value:function(t,n,r){return new e(t,n,[],vQ.empty,0,r,[],null)}},{key:"getSkippingParser",value:function(e){return new(function(t){y(r,t);var n=k(r);function r(){return h(this,r),n.apply(this,arguments)}return m(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=mT;if(t){var n,a=P(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 vQ(cQ.none,[],[],o-i)},stoppedAt:null,stopAt:function(){}};return a}}]),r}(AQ))}},{key:"get",value:function(){return mT}}]),e}();function yT(e,t,n){return RQ.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var OT=function(){function e(t){h(this,e),this.context=t,this.tree=t.tree}return m(e,[{key:"apply",value:function(t){if(!t.docChanged&&this.tree==this.context.tree)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(20,r)||n.takeTree(),new e(n)}}],[{key:"init",value:function(t){var n=Math.min(3e3,t.doc.length),r=gT.create(t.facet(ST).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}}]),e}();fT.state=mw.define({create:OT.init,update:function(e,t){var n,r=P(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(fT.setState))return i.value}}catch(o){r.e(o)}finally{r.f()}return t.startState.facet(ST)!=t.state.facet(ST)?OT.init(t.state):e.apply(t)}});var bT=function(e){var t=setTimeout((function(){return e()}),500);return function(){return clearTimeout(t)}};"undefined"!=typeof requestIdleCallback&&(bT=function(e){var t=-1,n=setTimeout((function(){t=requestIdleCallback(e,{timeout:400})}),100);return function(){return t<0?clearTimeout(n):cancelIdleCallback(t)}});var wT="undefined"!=typeof navigator&&(null===(zQ=navigator.scheduling)||void 0===zQ?void 0:zQ.isInputPending)?function(){return navigator.scheduling.isInputPending()}:null,kT=nx.fromClass(function(){function e(t){h(this,e),this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return m(e,[{key:"update",value:function(e){var t=this.view.state.field(fT.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){var e=this.view.state,t=e.field(fT.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=bT(this.work))}}},{key:"work",value:function(e){this.working=null;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(fT.state);if(o.tree!=o.context.tree||!o.context.isDone(i+1e5)){var a=Date.now()+Math.min(this.chunkBudget,100,e&&!wT?Math.max(25,e.timeRemaining()-5):1e9),s=o.context.treeLen<i&&r.doc.length>i+1e3,l=o.context.work((function(){return wT&&wT()||Date.now()>a}),i+(s?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:fT.setState.of(new OT(o.context))})),this.chunkBudget>0&&(!l||s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}}}},{key:"checkAsyncSchedule",value:function(e){var t=this;e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((function(){return t.scheduleWork()})).catch((function(e){return KS(t.view.state,e)})).then((function(){return t.workScheduled--})),e.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),e}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),ST=cw.define({combine:function(e){return e.length?e[0]:null},enables:function(e){return[fT.state,kT,vP.contentAttributes.compute([e],(function(t){var n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]}}),xT=m((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];h(this,e),this.language=t,this.support=n,this.extension=[t,n]})),CT=cw.define(),PT=cw.define({combine:function(e){if(!e.length)return" ";var t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((function(e){return e!=t[0]})))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function ET(e){var t=e.facet(PT);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function QT(e,t){var n="",r=e.tabSize,i=e.facet(PT)[0];if("\t"==i){for(;t>=r;)n+="\t",t-=r;i=" "}for(var o=0;o<t;o++)n+=i;return n}function TT(e,t){e instanceof Gw&&(e=new $T(e));var n,r=P(e.state.facet(CT));try{for(r.s();!(n=r.n()).done;){var i=(0,n.value)(e,t);if(void 0!==i)return i}}catch(a){r.e(a)}finally{r.f()}var o=pT(e.state);return o.length>=t?function(e,t,n){return AT(t.resolveInner(n).enterUnfinishedNodesBefore(n),n,e)}(e,o,t):null}var $T=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h(this,e),this.state=t,this.options=n,this.unit=ET(t)}return m(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,i=r.simulateBreak,o=r.simulateDoubleBreak;return null!=i&&i>=n.from&&i<=n.to?o&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:n.text.slice(i-n.from),from:i}:{text:n.text.slice(0,i-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 vk(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}(),_T=new lQ;function RT(e){var t=e.type.prop(_T);if(t)return t;var n,r=e.firstChild;if(r&&(n=r.type.prop(lQ.closedBy))){var i=e.lastChild,o=i&&n.indexOf(i.name)>-1;return function(e){return LT(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?MT:null}function AT(e,t,n){for(;e;e=e.parent){var r=RT(e);if(r)return r(NT.create(n,t,e))}return null}function MT(){return 0}var NT=function(e){y(n,e);var t=k(n);function n(e,r,i){var o;return h(this,n),(o=t.call(this,e.state,e.options)).base=e,o.pos=r,o.node=i,o}return m(n,[{key:"textAfter",get:function(){return this.textAfterPos(this.pos)}},{key:"baseIndent",get:function(){return this.baseIndentFor(this.node)}},{key:"baseIndentFor",value:function(e){for(var t=this.state.doc.lineAt(e.from);;){for(var n=e.resolve(t.from);n.parent&&n.parent.from==n.from;)n=n.parent;if(ZT(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}},{key:"continue",value:function(){var e=this.node.parent;return e?AT(e,this.pos,this.base):0}}],[{key:"create",value:function(e,t,r){return new n(e,t,r)}}]),n}($T);function ZT(e,t){for(var n=t;n;n=n.parent)if(e==n)return!0;return!1}function DT(e){var t=e.closing,n=e.align,r=void 0===n||n,i=e.units,o=void 0===i?1:i;return function(e){return LT(e,r,o,t)}}function LT(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 IT(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.except,n=e.units,r=void 0===n?1:n;return function(e){var n=t&&t.test(e.textAfter);return e.baseIndent+(n?0:r*e.unit)}}var YT=cw.define(),VT=new lQ;function UT(e){var t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function jT(e,t,n){var r,i=P(e.facet(YT));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=pT(e);if(r.length<n)return null;for(var i=null,o=r.resolveInner(n,1);o;o=o.parent)if(!(o.to<=n||o.from>n)){if(i&&o.from<t)break;var a=o.type.prop(VT);if(a&&(o.to<r.length-50||r.length==e.doc.length||!UT(o))){var s=a(o,e);s&&s.from<=n&&s.from>=t&&s.to>n&&(i=s)}}return i}(e,t,n)}function WT(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 zT=Iw.define({map:WT}),XT=Iw.define({map:WT});function FT(e){var t,n=[],r=P(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 1;n.push(e.lineBlockAt(r))};for(r.s();!(t=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}return n}var BT=mw.define({create:function(){return $S.none},update:function(e,t){e=e.map(t.changes);var n,r=P(t.effects);try{var i=function(){var r=n.value;if(r.is(zT)&&!function(e,t,n){var r=!1;return e.between(t,t,(function(e,i){e==t&&i==n&&(r=!0)})),r}(e,r.value.from,r.value.to)){var i=t.state.facet(e$).preparePlaceholder,o=i?$S.replace({widget:new i$(i(t.state,r.value))}):r$;e=e.update({add:[o.range(r.value.from,r.value.to)]})}else r.is(XT)&&(e=e.update({filter:function(e,t){return r.value.from!=e||r.value.to!=t},filterFrom:r.value.from,filterTo:r.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 vP.decorations.from(e)},toJSON:function(e,t){var n=[];return e.between(0,t.doc.length,(function(e,t){n.push(e,t)})),n},fromJSON:function(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");for(var t=[],n=0;n<e.length;){var r=e[n++],i=e[n++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");t.push(r$.range(r,i))}return $S.set(t,!0)}});function qT(e,t,n){var r,i=null;return null===(r=e.field(BT,!1))||void 0===r||r.between(t,n,(function(e,t){(!i||i.from>e)&&(i={from:e,to:t})})),i}function HT(e,t){return e.field(BT,!1)?t:t.concat(Iw.appendConfig.of(t$()))}function GT(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 vP.announce.of("".concat(e.state.phrase(n?"Folded lines":"Unfolded lines")," ").concat(r," ").concat(e.state.phrase("to")," ").concat(i,"."))}var KT=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(e){var t,n=P(FT(e));try{for(n.s();!(t=n.n()).done;){var r=t.value,i=jT(e.state,r.from,r.to);if(i)return e.dispatch({effects:HT(e.state,[zT.of(i),GT(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(BT,!1))return!1;var t,n=[],r=P(FT(e));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=qT(e.state,i.from,i.to);o&&n.push(XT.of(o),GT(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.lineBlockAt(r),o=jT(t,i.from,i.to);o&&n.push(zT.of(o)),r=(o?e.lineBlockAt(o.to):i).to+1}return n.length&&e.dispatch({effects:HT(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:function(e){var t=e.state.field(BT,!1);if(!t||!t.size)return!1;var n=[];return t.between(0,e.state.doc.length,(function(e,t){n.push(XT.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],JT={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},e$=cw.define({combine:function(e){return Kw(e,JT)}});function t$(e){var t=[BT,l$];return e&&t.push(e$.of(e)),t}function n$(e,t){var n=e.state,r=n.facet(e$),i=function(t){var n=e.lineBlockAt(e.posAtDOM(t.target)),r=qT(e.state,n.from,n.to);r&&e.dispatch({effects:XT.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);var o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}var r$=$S.replace({widget:new(function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n,[{key:"toDOM",value:function(e){return n$(e,null)}}]),n}(QS))}),i$=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),(r=t.call(this)).value=e,r}return m(n,[{key:"eq",value:function(e){return this.value==e.value}},{key:"toDOM",value:function(e){return n$(e,this.value)}}]),n}(QS),o$={openText:"\u2304",closedText:"\u203a",markerDOM:null,domEventHandlers:{},foldingChanged:function(){return!1}},a$=function(e){y(n,e);var t=k(n);function n(e,r){var i;return h(this,n),(i=t.call(this)).config=e,i.open=r,i}return m(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}(DE);function s$(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign(Object.assign({},o$),e),n=new a$(t,!0),r=new a$(t,!1),i=nx.fromClass(function(){function e(t){h(this,e),this.from=t.viewport.from,this.markers=this.buildMarkers(t)}return m(e,[{key:"update",value:function(e){(e.docChanged||e.viewportChanged||e.startState.facet(ST)!=e.state.facet(ST)||e.startState.field(BT,!1)!=e.state.field(BT,!1)||pT(e.startState)!=pT(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}},{key:"buildMarkers",value:function(e){var t,i=new ik,o=P(e.viewportLineBlocks);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=qT(e.state,a.from,a.to)?r:jT(e.state,a.from,a.to)?n:null;s&&i.add(a.from,a.from,s)}}catch(l){o.e(l)}finally{o.f()}return i.finish()}}]),e}()),o=t.domEventHandlers;return[i,VE({class:"cm-foldGutter",markers:function(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||rk.empty},initialSpacer:function(){return new a$(t,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(e,t,n){if(o.click&&o.click(e,t,n))return!0;var r=qT(e.state,t.from,t.to);if(r)return e.dispatch({effects:XT.of(r)}),!0;var i=jT(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:zT.of(i)}),!0)}})}),t$()]}var l$=vP.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"}}),u$=function(){function e(t,n){var r;function i(e){var t=bk.newName();return(r||(r=Object.create(null)))["."+t]=e,t}h(this,e),this.specs=t;var o="string"==typeof n.all?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof fT?function(e){return e.prop(lT)==a.data}:a?function(e){return e==a}:void 0,this.style=UQ(t.map((function(e){return{tag:e.tag,class:e.class||i(Object.assign({},e,{tag:null}))}})),{all:o}).style,this.module=r?new bk(r):null,this.themeType=n.themeType}return m(e,null,[{key:"define",value:function(t,n){return new e(t,n||{})}}]),e}(),c$=cw.define(),f$=cw.define({combine:function(e){return e.length?[e[0]]:null}});function h$(e){var t=e.facet(c$);return t.length?t:e.facet(f$)}function d$(e,t){var n,r=[v$];return e instanceof u$&&(e.module&&r.push(vP.styleModule.of(e.module)),n=e.themeType),(null===t||void 0===t?void 0:t.fallback)?r.push(f$.of(e)):n?r.push(c$.computeN([vP.darkTheme],(function(t){return t.facet(vP.darkTheme)==("dark"==n)?[e]:[]}))):r.push(c$.of(e)),r}var p$=function(){function e(t){h(this,e),this.markCache=Object.create(null),this.tree=pT(t.state),this.decorations=this.buildDeco(t,h$(t.state))}return m(e,[{key:"update",value:function(e){var t=pT(e.state),n=h$(e.state),r=n!=h$(e.startState);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 $S.none;var r,i=new ik,o=P(e.visibleRanges);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.from,l=a.to;jQ(this.tree,t,(function(e,t,r){i.add(e,t,n.markCache[r]||(n.markCache[r]=$S.mark({class:r})))}),s,l)}}catch(u){o.e(u)}finally{o.f()}return i.finish()}}]),e}(),v$=kw.high(nx.fromClass(p$,{decorations:function(e){return e.decorations}})),m$=u$.define([{tag:sT.meta,color:"#404740"},{tag:sT.link,textDecoration:"underline"},{tag:sT.heading,textDecoration:"underline",fontWeight:"bold"},{tag:sT.emphasis,fontStyle:"italic"},{tag:sT.strong,fontWeight:"bold"},{tag:sT.strikethrough,textDecoration:"line-through"},{tag:sT.keyword,color:"#708"},{tag:[sT.atom,sT.bool,sT.url,sT.contentSeparator,sT.labelName],color:"#219"},{tag:[sT.literal,sT.inserted],color:"#164"},{tag:[sT.string,sT.deleted],color:"#a11"},{tag:[sT.regexp,sT.escape,sT.special(sT.string)],color:"#e40"},{tag:sT.definition(sT.variableName),color:"#00f"},{tag:sT.local(sT.variableName),color:"#30a"},{tag:[sT.typeName,sT.namespace],color:"#085"},{tag:sT.className,color:"#167"},{tag:[sT.special(sT.variableName),sT.macroName],color:"#256"},{tag:sT.definition(sT.propertyName),color:"#00c"},{tag:sT.comment,color:"#940"},{tag:sT.invalid,color:"#f00"}]),g$=vP.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),y$=1e4,O$="()[]{}",b$=cw.define({combine:function(e){return Kw(e,{afterCursor:!0,brackets:O$,maxScanDistance:y$,renderMatch:S$})}}),w$=$S.mark({class:"cm-matchingBracket"}),k$=$S.mark({class:"cm-nonmatchingBracket"});function S$(e){var t=[],n=e.matched?w$:k$;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}var x$=mw.define({create:function(){return $S.none},update:function(e,t){if(!t.docChanged&&!t.selection)return e;var n,r=[],i=t.state.facet(b$),o=P(t.state.selection.ranges);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.empty){var s=$$(t.state,a.head,-1,i)||a.head>0&&$$(t.state,a.head-1,1,i)||i.afterCursor&&($$(t.state,a.head,1,i)||a.head<t.state.doc.length&&$$(t.state,a.head+1,-1,i));s&&(r=r.concat(i.renderMatch(s,t.state)))}}}catch(l){o.e(l)}finally{o.f()}return $S.set(r,!0)},provide:function(e){return vP.decorations.from(e)}}),C$=[x$,g$];function P$(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[b$.of(e),C$]}var E$=new lQ;function Q$(e,t,n){var r=e.prop(t<0?lQ.openedBy:lQ.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 T$(e){var t=e.type.prop(E$);return t?t(e.node):e}function $$(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.maxScanDistance||y$,o=r.brackets||O$,a=pT(e),s=a.resolveInner(t,n),l=s;l;l=l.parent){var u=Q$(l.type,n,o);if(u&&l.from<l.to){var c=T$(l);if(c&&(n>0?t>=c.from&&t<c.to:t>c.from&&t<=c.to))return _$(e,t,n,l,c,u,o)}}return function(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,h=0;!c.next().done&&h<=o;){var d=c.value;n<0&&(h+=d.length);for(var p=t+h*n,v=n>0?0:d.length-1,m=n>0?d.length:-1;v!=m;v+=n){var g=a.indexOf(d[v]);if(!(g<0||r.resolveInner(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&&(h+=d.length)}return c.done?{start:u,matched:!1}:null}(e,t,n,a,s.type,i,o)}function _$(e,t,n,r,i,o,a){var s=r.parent,l={from:i.from,to:i.to},u=0,c=null===s||void 0===s?void 0:s.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do{if(n<0?c.to<=r.from:c.from>=r.to){if(0==u&&o.indexOf(c.type.name)>-1&&c.from<c.to){var f=T$(c);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}if(Q$(c.type,n,a))u++;else if(Q$(c.type,-n,a)){if(0==u){var h=T$(c);return{start:l,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}u--}}}while(n<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}for(var R$=Object.create(null),A$=[cQ.none],M$=[],N$=Object.create(null),Z$=0,D$=[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]];Z$<D$.length;Z$++){var L$=u(D$[Z$],2),I$=L$[0],Y$=L$[1];N$[I$]=U$(R$,Y$)}function V$(e,t){M$.indexOf(e)>-1||(M$.push(e),console.warn(t))}function U$(e,t){var n,r=null,i=P(t.split("."));try{for(i.s();!(n=i.n()).done;){var o=n.value,a=e[o]||sT[o];a?"function"==typeof a?r?r=a(r):V$(o,"Modifier ".concat(o," used at start of tag")):r?V$(o,"Tag ".concat(o," used as modifier")):r=a:V$(o,"Unknown highlighting tag ".concat(o))}}catch(u){i.e(u)}finally{i.f()}if(!r)return 0;var s=t.replace(/ /g,"_"),l=cQ.define({id:A$.length,name:s,props:[IQ(Je({},s,r))]});return A$.push(l),l.id}function j$(e,t){return function(n){var r=n.state,i=n.dispatch;if(r.readOnly)return!1;var o=e(t,r);return!!o&&(i(r.update(o)),!0)}}var W$=j$(H$,0),z$=j$(q$,0),X$=j$((function(e,t){return q$(e,t,function(e){var t,n=[],r=P(e.selection.ranges);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=e.doc.lineAt(i.from),a=i.to<=o.to?o:e.doc.lineAt(i.to),s=n.length-1;s>=0&&n[s].to>o.from?n[s].to=a.to:n.push({from:o.from+/^\s*/.exec(o.text)[0].length,to:a.to})}}catch(l){r.e(l)}finally{r.f()}return n}(t))}),0);function F$(e,t){var n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}var B$=50;function q$(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges,r=n.map((function(e){return F$(t,e.from).block}));if(!r.every((function(e){return e})))return null;var i=n.map((function(e,n){return function(e,t,n,r){var i,o,a=t.open,s=t.close,l=e.sliceDoc(n-B$,n),u=e.sliceDoc(r,r+B$),c=/\s*$/.exec(l)[0].length,f=/^\s*/.exec(u)[0].length,h=l.length-c;if(l.slice(h-a.length,h)==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<=2*B$?i=o=e.sliceDoc(n,r):(i=e.sliceDoc(n,n+B$),o=e.sliceDoc(r-B$,r));var d=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(o)[0].length,v=o.length-p-s.length;return i.slice(d,d+a.length)==a&&o.slice(v,v+s.length)==s?{open:{pos:n+d+a.length,margin:/\s/.test(i.charAt(d+a.length))?1:0},close:{pos:r-p-s.length,margin:/\s/.test(o.charAt(v-1))?1:0}}:null}(t,r[n],e.from,e.to)}));if(2!=e&&!i.every((function(e){return e})))return{changes:t.changes(n.map((function(e,t){return i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]})))};if(1!=e&&i.some((function(e){return e}))){for(var o,a=[],s=0;s<i.length;s++)if(o=i[s]){var l=r[s],u=o,c=u.open,f=u.close;a.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:f.pos-f.margin,to:f.pos+l.close.length})}return{changes:a}}return null}function H$(e,t){var n,r=[],i=-1,o=P(arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.from,l=a.to,u=r.length,c=1e9,f=F$(t,s).line;if(f){for(var h=s;h<=l;){var d=t.doc.lineAt(h);if(d.from>i&&(s==l||l>d.from)){i=d.from;var p=/^\s*/.exec(d.text)[0].length,v=p==d.length,m=d.text.slice(p,p+f.length)==f?p:-1;p<d.text.length&&p<c&&(c=p),r.push({line:d,comment:m,token:f,indent:p,empty:v,single:!1})}h=d.to+1}if(c<1e9)for(var g=u;g<r.length;g++)r[g].indent<r[g].line.text.length&&(r[g].indent=c);r.length==u+1&&(r[u].single=!0)}}}catch(D){o.e(D)}finally{o.f()}if(2!=e&&r.some((function(e){return e.comment<0&&(!e.empty||e.single)}))){var y,O=[],b=P(r);try{for(b.s();!(y=b.n()).done;){var w=y.value,k=w.line,S=w.token,x=w.indent,C=w.empty;!w.single&&C||O.push({from:k.from+x,insert:S+" "})}}catch(D){b.e(D)}finally{b.f()}var E=t.changes(O);return{changes:E,selection:t.selection.map(E,1)}}if(1!=e&&r.some((function(e){return e.comment>=0}))){var Q,T=[],$=P(r);try{for($.s();!(Q=$.n()).done;){var _=Q.value,R=_.line,A=_.comment,M=_.token;if(A>=0){var N=R.from+A,Z=N+M.length;" "==R.text[Z-R.from]&&Z++,T.push({from:N,to:Z})}}}catch(D){$.e(D)}finally{$.f()}return{changes:T}}return null}var G$=Zw.define(),K$=Zw.define(),J$=cw.define(),e_=cw.define({combine:function(e){return Kw(e,{minDepth:100,newGroupDelay:500,joinToEvent:function(e,t){return t}},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:function(e,t){return function(n,r){return e(n,r)||t(n,r)}}})}});var t_=mw.define({create:function(){return y_.empty},update:function(e,t){var n=t.state.facet(e_),r=t.annotation(G$);if(r){var i=t.docChanged?sw.single(function(e){var t=0;return e.iterChangedRanges((function(e,n){return t=n})),t}(t.changes)):void 0,o=l_.fromTransaction(t,i),a=r.side,s=0==a?e.undone:e.done;return s=o?u_(s,s.length,n.minDepth,o):d_(s,t.startState.selection),new y_(0==a?r.rest:s,0==a?s:r.rest)}var l=t.annotation(K$);if("full"!=l&&"before"!=l||(e=e.isolate()),!1===t.annotation(Yw.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);var u=l_.fromTransaction(t),c=t.annotation(Yw.time),f=t.annotation(Yw.userEvent);return u?e=e.addChanges(u,c,f,n,t):t.selection&&(e=e.addSelection(t.startState.selection,c,f,n.newGroupDelay)),"full"!=l&&"after"!=l||(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 y_(e.done.map(l_.fromJSON),e.undone.map(l_.fromJSON))}});function n_(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[t_,e_.of(e),vP.domEventHandlers({beforeinput:function(e,t){var n="historyUndo"==e.inputType?i_:"historyRedo"==e.inputType?o_:null;return!!n&&(e.preventDefault(),n(t))}})]}function r_(e,t){return function(n){var r=n.state,i=n.dispatch;if(!t&&r.readOnly)return!1;var o=r.field(t_,!1);if(!o)return!1;var a=o.pop(e,r,t);return!!a&&(i(a),!0)}}var i_=r_(0,!1),o_=r_(1,!1),a_=r_(0,!0),s_=r_(1,!0);var l_=function(){function e(t,n,r,i,o){h(this,e),this.changes=t,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}return m(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&&Jb.fromJSON(t.changes),[],t.mapped&&Kb.fromJSON(t.mapped),t.startSelection&&sw.fromJSON(t.startSelection),t.selectionsAfter.map(sw.fromJSON))}},{key:"fromTransaction",value:function(t,n){var r,i=f_,o=P(t.startState.facet(J$));try{for(o.s();!(r=o.n()).done;){var a=(0,r.value)(t);a.length&&(i=i.concat(a))}}catch(s){o.e(s)}finally{o.f()}return!i.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),i,void 0,n||t.startState.selection,f_)}},{key:"selection",value:function(t){return new e(void 0,f_,void 0,void 0,t)}}]),e}();function u_(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 c_(e,t){return e.length?t.length?e.concat(t):e:t}var f_=[],h_=200;function d_(e,t){if(e.length){var n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-h_));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),u_(e,e.length-1,1e9,n.setSelAfter(r)))}return[l_.selection([t])]}function p_(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 v_(e,t){if(!e.length)return e;for(var n=e.length,r=f_;n;){var i=m_(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?[l_.selection(r)]:f_}function m_(e,t,n){var r=c_(e.selectionsAfter.length?e.selectionsAfter.map((function(e){return e.map(t)})):f_,n);if(!e.changes)return l_.selection(r);var i=e.changes.map(t),o=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(o):o;return new l_(i,Iw.mapEffects(e.effects,t),a,e.startSelection.map(o),r)}var g_=/^(input\.type|delete)($|\.)/,y_=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;h(this,e),this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=i}return m(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&&(!r||g_.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,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)?u_(a,a.length-1,i.minDepth,new l_(t.changes.compose(s.changes),c_(t.effects,s.effects),s.mapped,s.startSelection,f_)):u_(a,a.length,i.minDepth,t),new e(a,f_,n,r)}},{key:"addSelection",value:function(t,n,r,i){var o,a,s=this.done.length?this.done[this.done.length-1].selectionsAfter:f_;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(d_(this.done,t),this.undone,n,r)}},{key:"addMapping",value:function(t){return new e(v_(this.done,t),v_(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:G$.of({side:e,rest:p_(r)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){var o=1==r.length?f_:r.slice(0,r.length-1);return i.mapped&&(o=v_(o,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:G$.of({side:e,rest:o}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}]),e}();y_.empty=new y_(f_,f_);var O_=[{key:"Mod-z",run:i_,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:o_,preventDefault:!0},{linux:"Ctrl-Shift-z",run:o_,preventDefault:!0},{key:"Mod-u",run:a_,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:s_,preventDefault:!0}];function b_(e,t){return sw.create(e.ranges.map(t),e.mainIndex)}function w_(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function k_(e,t){var n=e.state,r=e.dispatch,i=b_(n.selection,t);return!i.eq(n.selection)&&(r(w_(n,i)),!0)}function S_(e,t){return sw.cursor(t?e.to:e.from)}function x_(e,t){return k_(e,(function(n){return n.empty?e.moveByChar(n,t):S_(n,t)}))}function C_(e){return e.textDirectionAt(e.state.selection.main.head)==vx.LTR}var P_=function(e){return x_(e,!C_(e))},E_=function(e){return x_(e,C_(e))};function Q_(e,t){return k_(e,(function(n){return n.empty?e.moveByGroup(n,t):S_(n,t)}))}"undefined"!=typeof Intl&&Intl.Segmenter;function T_(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 $_(e,t,n){for(var r=pT(e).resolveInner(t.head),i=n?lQ.closedBy:lQ.openedBy,o=t.head;;){var a=n?r.childAfter(o):r.childBefore(o);if(!a)break;T_(e,a,i)?r=a:o=n?a.to:a.from}var s,l;return l=r.type.prop(i)&&(s=n?$$(e,r.from,1):$$(e,r.to,-1))&&s.matched?n?s.end.to:s.end.from:n?r.to:r.from,sw.cursor(l,n?-1:1)}function __(e,t){return k_(e,(function(n){if(!n.empty)return S_(n,t);var r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}var R_=function(e){return __(e,!1)},A_=function(e){return __(e,!0)};function M_(e){var t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){var o,a=P(e.state.facet(vP.scrollMargins));try{for(a.s();!(o=a.n()).done;){var s=(0,o.value)(e);(null===s||void 0===s?void 0:s.top)&&(r=Math.max(null===s||void 0===s?void 0:s.top,r)),(null===s||void 0===s?void 0:s.bottom)&&(i=Math.max(null===s||void 0===s?void 0:s.bottom,i))}}catch(l){a.e(l)}finally{a.f()}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function N_(e,t){var n,r=M_(e),i=e.state,o=b_(i.selection,(function(n){return n.empty?e.moveVertically(n,t,r.height):S_(n,t)}));if(o.eq(i.selection))return!1;if(r.selfScroll){var a=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),l=s.top+r.marginTop,u=s.bottom-r.marginBottom;a&&a.top>l&&a.bottom<u&&(n=vP.scrollIntoView(o.main.head,{y:"start",yMargin:a.top-l}))}return e.dispatch(w_(i,o),{effects:n}),!0}var Z_=function(e){return N_(e,!1)},D_=function(e){return N_(e,!0)};function L_(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=sw.cursor(r.from+o))}return i}function I_(e,t,n){var r=!1,i=b_(e.selection,(function(t){var i=$$(e,t.head,-1)||$$(e,t.head,1)||t.head>0&&$$(e,t.head-1,1)||t.head<e.doc.length&&$$(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?sw.range(t.anchor,o):sw.cursor(o)}));return!!r&&(t(w_(e,i)),!0)}function Y_(e,t){var n=b_(e.state.selection,(function(e){var n=t(e);return sw.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(w_(e.state,n)),!0)}function V_(e,t){return Y_(e,(function(n){return e.moveByChar(n,t)}))}var U_=function(e){return V_(e,!C_(e))},j_=function(e){return V_(e,C_(e))};function W_(e,t){return Y_(e,(function(n){return e.moveByGroup(n,t)}))}function z_(e,t){return Y_(e,(function(n){return e.moveVertically(n,t)}))}var X_=function(e){return z_(e,!1)},F_=function(e){return z_(e,!0)};function B_(e,t){return Y_(e,(function(n){return e.moveVertically(n,t,M_(e).height)}))}var q_=function(e){return B_(e,!1)},H_=function(e){return B_(e,!0)},G_=function(e){var t=e.state;return(0,e.dispatch)(w_(t,{anchor:0})),!0},K_=function(e){var t=e.state;return(0,e.dispatch)(w_(t,{anchor:t.doc.length})),!0},J_=function(e){var t=e.state;return(0,e.dispatch)(w_(t,{anchor:t.selection.main.anchor,head:0})),!0},eR=function(e){var t=e.state;return(0,e.dispatch)(w_(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0};function tR(e,t){if(e.state.readOnly)return!1;var n="delete.selection",r=e.state,i=r.changeByRange((function(r){var i=r.from,o=r.to;if(i==o){var a=t(i);a<i?(n="delete.backward",a=nR(e,a,!1)):a>i&&(n="delete.forward",a=nR(e,a,!0)),i=Math.min(i,a),o=Math.max(o,a)}else i=nR(e,i,!1),o=nR(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:sw.cursor(i)}}));return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?vP.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function nR(e,t,n){if(e instanceof vP){var r,i=P(e.state.facet(vP.atomicRanges).map((function(t){return t(e)})));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 rR=function(e,t){return tR(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=vk(r,o.tabSize)%ET(o)||ET(o),l=0;l<s&&" "==r[r.length-1-l];l++)n--;i=n}else(i=Ub(a.text,n-a.from,t,t)+a.from)==n&&a.number!=(t?o.doc.lines:1)&&(i+=t?1:-1);return i}))},iR=function(e){return rR(e,!1)},oR=function(e){return rR(e,!0)},aR=function(e,t){return tR(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=Ub(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 r}))},sR=function(e){return aR(e,!1)},lR=function(e){return tR(e,(function(t){var n=e.lineBlockAt(t).to;return t<n?n:Math.min(e.state.doc.length,t+1)}))};function uR(e){var t,n=[],r=-1,i=P(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 cR(e,t,n){if(e.readOnly)return!1;var r,i=[],o=[],a=P(uR(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=P(s.ranges);try{for(f.s();!(c=f.n()).done;){var h=c.value;o.push(sw.range(Math.min(e.doc.length,h.anchor+u),Math.min(e.doc.length,h.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 d,p=P(s.ranges);try{for(p.s();!(d=p.n()).done;){var v=d.value;o.push(sw.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:sw.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function fR(e,t,n){if(e.readOnly)return!1;var r,i=[],o=P(uR(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 hR=pR(!1),dR=pR(!0);function pR(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=pT(e).resolveInner(t),i=r.childBefore(t),o=r.childAfter(t);return i&&o&&i.to<=t&&o.from>=t&&(n=i.type.prop(lQ.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(o.from).from&&!/\S/.test(e.sliceDoc(i.to,o.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 $T(n,{simulateBreak:r,simulateDoubleBreak:!!a}),l=TT(s,r);for(null==l&&(l=vk(/^\s*/.exec(n.doc.lineAt(r).text)[0],n.tabSize));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=["",QT(n,l)];return a&&u.push(QT(n,s.lineIndent(o.from,-1))),{changes:{from:r,to:i,insert:Qb.of(u)},range:sw.cursor(r+1+u[1].length)}}));return r(n.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function vR(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:sw.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}}))}var mR=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(vR(t,(function(e,n){n.push({from:e.from,insert:t.facet(PT)})})),{userEvent:"input.indent"})),!0)},gR=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(vR(t,(function(e,n){var r=/^\s*/.exec(e.text)[0];if(r){for(var i=vk(r,t.tabSize),o=0,a=QT(t,Math.max(0,i-ET(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)},yR=[{key:"Ctrl-b",run:P_,shift:U_,preventDefault:!0},{key:"Ctrl-f",run:E_,shift:j_},{key:"Ctrl-p",run:R_,shift:X_},{key:"Ctrl-n",run:A_,shift:F_},{key:"Ctrl-a",run:function(e){return k_(e,(function(t){return sw.cursor(e.lineBlockAt(t.head).from,1)}))},shift:function(e){return Y_(e,(function(t){return sw.cursor(e.lineBlockAt(t.head).from)}))}},{key:"Ctrl-e",run:function(e){return k_(e,(function(t){return sw.cursor(e.lineBlockAt(t.head).to,-1)}))},shift:function(e){return Y_(e,(function(t){return sw.cursor(e.lineBlockAt(t.head).to)}))}},{key:"Ctrl-d",run:oR},{key:"Ctrl-h",run:iR},{key:"Ctrl-k",run:lR},{key:"Ctrl-Alt-h",run:sR},{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:Qb.of(["",""])},range:sw.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:Ub(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:Ub(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:sw.cursor(o)}}));return!r.changes.empty&&(n(t.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:D_}],OR=[{key:"ArrowLeft",run:P_,shift:U_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:function(e){return Q_(e,!C_(e))},shift:function(e){return W_(e,!C_(e))},preventDefault:!0},{mac:"Cmd-ArrowLeft",run:function(e){return k_(e,(function(t){return L_(e,t,!C_(e))}))},shift:function(e){return Y_(e,(function(t){return L_(e,t,!C_(e))}))},preventDefault:!0},{key:"ArrowRight",run:E_,shift:j_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:function(e){return Q_(e,C_(e))},shift:function(e){return W_(e,C_(e))},preventDefault:!0},{mac:"Cmd-ArrowRight",run:function(e){return k_(e,(function(t){return L_(e,t,C_(e))}))},shift:function(e){return Y_(e,(function(t){return L_(e,t,C_(e))}))},preventDefault:!0},{key:"ArrowUp",run:R_,shift:X_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:G_,shift:J_},{mac:"Ctrl-ArrowUp",run:Z_,shift:q_},{key:"ArrowDown",run:A_,shift:F_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:K_,shift:eR},{mac:"Ctrl-ArrowDown",run:D_,shift:H_},{key:"PageUp",run:Z_,shift:q_},{key:"PageDown",run:D_,shift:H_},{key:"Home",run:function(e){return k_(e,(function(t){return L_(e,t,!1)}))},shift:function(e){return Y_(e,(function(t){return L_(e,t,!1)}))},preventDefault:!0},{key:"Mod-Home",run:G_,shift:J_},{key:"End",run:function(e){return k_(e,(function(t){return L_(e,t,!0)}))},shift:function(e){return Y_(e,(function(t){return L_(e,t,!0)}))},preventDefault:!0},{key:"Mod-End",run:K_,shift:eR},{key:"Enter",run:hR},{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:iR,shift:iR},{key:"Delete",run:oR},{key:"Mod-Backspace",mac:"Alt-Backspace",run:sR},{key:"Mod-Delete",mac:"Alt-Delete",run:function(e){return aR(e,!0)}},{mac:"Mod-Backspace",run:function(e){return tR(e,(function(t){var n=e.lineBlockAt(t).from;return t>n?n:Math.max(0,t-1)}))}},{mac:"Mod-Delete",run:lR}].concat(yR.map((function(e){return{mac:e.key,run:e.run,shift:e.shift}}))),bR=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(e){return k_(e,(function(t){return $_(e.state,t,!C_(e))}))},shift:function(e){return Y_(e,(function(t){return $_(e.state,t,!C_(e))}))}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(e){return k_(e,(function(t){return $_(e.state,t,C_(e))}))},shift:function(e){return Y_(e,(function(t){return $_(e.state,t,C_(e))}))}},{key:"Alt-ArrowUp",run:function(e){return cR(e.state,e.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(e){return fR(e.state,e.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(e){return cR(e.state,e.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(e){return fR(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=sw.create([r.main]):r.main.empty||(i=sw.create([sw.cursor(r.main.head)])),!!i&&(n(w_(t,i)),!0)}},{key:"Mod-Enter",run:dR},{key:"Alt-l",mac:"Ctrl-l",run:function(e){var t=e.state,n=e.dispatch,r=uR(t).map((function(e){var n=e.from,r=e.to;return sw.range(n,Math.min(r+1,t.doc.length))}));return n(t.update({selection:sw.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:function(e){var t=e.state,n=e.dispatch,r=b_(t.selection,(function(e){for(var n,r=pT(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 sw.range(r.to,r.from)}));return n(w_(t,r)),!0},preventDefault:!0},{key:"Mod-[",run:gR},{key:"Mod-]",run:mR},{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 $T(t,{overrideIndentation:function(e){var t=r[e];return null==t?-1:t}}),o=vR(t,(function(e,n,o){var a=TT(i,e.from);if(null!=a){/\S/.test(e.text)||(a=0);var s=/^\s*/.exec(e.text)[0],l=QT(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(uR(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=b_(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 I_(e.state,e.dispatch,!1)}},{key:"Mod-/",run:function(e){var t=e.state,n=t.doc.lineAt(t.selection.main.from),r=F$(e.state,n.from);return r.line?W$(e):!!r.block&&X$(e)}},{key:"Alt-A",run:z$}].concat(OR),wR={key:"Tab",run:mR,shift:gR};function kR(){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++)SR(e,arguments[t]);return e}function SR(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++)SR(e,t[n])}}var xR="function"==typeof String.prototype.normalize?function(e){return e.normalize("NFKD")}:function(e){return e},CR=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,a=arguments.length>5?arguments[5]:void 0;h(this,e),this.test=a,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(xR(e))}:xR,this.query=this.normalize(n)}return m(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 Fb(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=Bb(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=qb(e);for(var r=this.normalize(t),i=0,o=n;;i++){var a=r.charCodeAt(i),s=this.match(a,o);if(i==r.length-1){if(s)return this.value=s,this;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&&this.test&&!this.test(n.from,n.to,this.buffer,this.bufferPos)&&(n=null),n}}]),e}();"undefined"!=typeof Symbol&&(CR.prototype[Symbol.iterator]=function(){return this});var PR={from:-1,to:-1,match:/.*/.exec("")},ER="gm"+(null==/x/.unicode?"":"u"),QR=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(h(this,e),this.text=t,this.to=o,this.curLine="",this.done=!1,this.value=PR,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new _R(t,n,r,i,o);this.re=new RegExp(n,ER+((null===r||void 0===r?void 0:r.ignoreCase)?"i":"")),this.test=null===r||void 0===r?void 0:r.test,this.iter=t.iter();var a=t.lineAt(i);this.curLineStart=a.from,this.matchPos=RR(t,i),this.getLine(this.curLineStart)}return m(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=RR(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))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}(),TR=new WeakMap,$R=function(){function e(t,n){h(this,e),this.from=t,this.text=n}return m(e,[{key:"to",get:function(){return this.from+this.text.length}}],[{key:"get",value:function(t,n,r){var i=TR.get(t);if(!i||i.from>=r||i.to<=n){var o=new e(n,t.sliceString(n,r));return TR.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)),TR.set(t,new e(s,a)),new e(n,a.slice(n-s,r-s))}}]),e}(),_R=function(){function e(t,n,r,i,o){h(this,e),this.text=t,this.to=o,this.done=!1,this.value=PR,this.matchPos=RR(t,i),this.re=new RegExp(n,ER+((null===r||void 0===r?void 0:r.ignoreCase)?"i":"")),this.test=null===r||void 0===r?void 0:r.test,this.flat=$R.get(t,i,this.chunkEnd(i+5e3))}return m(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){var n=this.flat.from+t.index,r=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this.matchPos=RR(this.text,r+(n==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=$R.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),e}();function RR(e,t){if(t>=e.length)return t;for(var n,r=e.lineAt(t);t<r.to&&(n=r.text.charCodeAt(t-r.from))>=56320&&n<57344;)t++;return t}function AR(e){var t=kR("input",{class:"cm-textfield",name:"line"});function n(){var n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(n){var r=e.state,i=r.doc.lineAt(r.selection.main.head),o=u(n,5),a=o[1],s=o[2],l=o[3],c=o[4],f=l?+l.slice(1):0,h=s?+s:i.number;if(s&&c){var d=h/100;a&&(d=d*("-"==a?-1:1)+i.number/r.doc.lines),h=Math.round(r.doc.lines*d)}else s&&a&&(h=h*("-"==a?-1:1)+i.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,h))),v=sw.cursor(p.from+Math.max(0,Math.min(f,p.length)));e.dispatch({effects:[MR.of(!1),vP.scrollIntoView(v.from,{y:"center"})],selection:v}),e.focus()}}return{dom:kR("form",{class:"cm-gotoLine",onkeydown:function(t){27==t.keyCode?(t.preventDefault(),e.dispatch({effects:MR.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:function(e){e.preventDefault(),n()}},kR("label",e.state.phrase("Go to line"),": ",t)," ",kR("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(QR.prototype[Symbol.iterator]=_R.prototype[Symbol.iterator]=function(){return this});var MR=Iw.define(),NR=mw.define({create:function(){return!0},update:function(e,t){var n,r=P(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(MR)&&(e=i.value)}}catch(o){r.e(o)}finally{r.f()}return e},provide:function(e){return ZE.from(e,(function(e){return e?AR:null}))}}),ZR=vP.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),DR={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},LR=cw.define({combine:function(e){return Kw(e,DR,{highlightWordAroundCursor:function(e,t){return e||t},minSelectionLength:Math.min,maxMatches:Math.min})}});function IR(e){var t=[WR,jR];return e&&t.push(LR.of(e)),t}var YR=$S.mark({class:"cm-selectionMatch"}),VR=$S.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function UR(e,t,n,r){return(0==n||e(t.sliceDoc(n-1,n))!=Bw.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=Bw.Word)}var jR=nx.fromClass(function(){function e(t){h(this,e),this.decorations=this.getDeco(t)}return m(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(LR),n=e.state,r=n.selection;if(r.ranges.length>1)return $S.none;var i,o=r.main,a=null;if(o.empty){if(!t.highlightWordAroundCursor)return $S.none;var s=n.wordAt(o.head);if(!s)return $S.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 $S.none;if(t.wholeWords){if(i=n.sliceDoc(o.from,o.to),!UR(a=n.charCategorizer(o.head),n,o.from,o.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==Bw.Word&&e(t.sliceDoc(r-1,r))==Bw.Word}(a,n,o.from,o.to))return $S.none}else if(!(i=n.sliceDoc(o.from,o.to).trim()))return $S.none}var u,c=[],f=P(e.visibleRanges);try{for(f.s();!(u=f.n()).done;)for(var h=u.value,d=new CR(n.doc,i,h.from,h.to);!d.next().done;){var p=d.value,v=p.from,m=p.to;if((!a||UR(a,n,v,m))&&(o.empty&&v<=o.from&&m>=o.to?c.push(VR.range(v,m)):(v>=o.to||m<=o.from)&&c.push(YR.range(v,m)),c.length>t.maxMatches))return $S.none}}catch(g){f.e(g)}finally{f.f()}return $S.set(c)}}]),e}(),{decorations:function(e){return e.decorations}}),WR=vP.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});var zR=cw.define({combine:function(e){return Kw(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:function(e){return new bA(e)},scrollToMatch:function(e){return vP.scrollIntoView(e)}})}});var XR=function(){function e(t){h(this,e),this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,ER),!0}catch(zQ){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}return m(e,[{key:"unquote",value:function(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"}))}},{key:"eq",value:function(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}},{key:"create",value:function(){return this.regexp?new JR(this):new qR(this)}},{key:"getCursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=e.doc?e:Gw.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?HR(this,r,t,n):BR(this,r,t,n)}}]),e}(),FR=m((function e(t){h(this,e),this.spec=t}));function BR(e,t,n,r){return new CR(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:function(e){return e.toLowerCase()},e.wholeWord?function(e,t){return function(n,r,i,o){return(o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=e.sliceString(o,Math.min(e.length,r+2))),(t(GR(i,n-o))!=Bw.Word||t(KR(i,n-o))!=Bw.Word)&&(t(KR(i,r-o))!=Bw.Word||t(GR(i,r-o))!=Bw.Word)}}(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}var qR=function(e){y(n,e);var t=k(n);function n(e){return h(this,n),t.call(this,e)}return m(n,[{key:"nextMatch",value:function(e,t,n){var r=BR(this.spec,e,n,e.doc.length).nextOverlapping();return r.done&&(r=BR(this.spec,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.spec.unquoted.length),o=BR(this.spec,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.doc.length)}},{key:"getReplacement",value:function(e){return this.spec.unquote(this.spec.replace)}},{key:"matchAll",value:function(e,t){for(var n=BR(this.spec,e,0,e.doc.length),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=BR(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));!i.next().done;)r(i.value.from,i.value.to)}}]),n}(FR);function HR(e,t,n,r){return new QR(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),function(e,t,n){return!n[0].length||(i(GR(n.input,n.index))!=Bw.Word||i(KR(n.input,n.index))!=Bw.Word)&&(i(KR(n.input,n.index+n[0].length))!=Bw.Word||i(GR(n.input,n.index+n[0].length))!=Bw.Word)}):void 0},n,r);var i}function GR(e,t){return e.slice(Ub(e,t,!1),t)}function KR(e,t){return e.slice(t,Ub(e,t))}var JR=function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n,[{key:"nextMatch",value:function(e,t,n){var r=HR(this.spec,e,n,e.doc.length).next();return r.done&&(r=HR(this.spec,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=HR(this.spec,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.doc.length)}},{key:"getReplacement",value:function(e){return this.spec.unquote(this.spec.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=HR(this.spec,e,0,e.doc.length),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=HR(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));!i.next().done;)r(i.value.from,i.value.to)}}]),n}(FR),eA=Iw.define(),tA=Iw.define(),nA=mw.define({create:function(e){return new rA(pA(e).create(),null)},update:function(e,t){var n,r=P(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(eA)?e=new rA(i.value.create(),e.panel):i.is(tA)&&(e=new rA(e.query,i.value?dA:null))}}catch(o){r.e(o)}finally{r.f()}return e},provide:function(e){return ZE.from(e,(function(e){return e.panel}))}});var rA=m((function e(t,n){h(this,e),this.query=t,this.panel=n})),iA=$S.mark({class:"cm-searchMatch"}),oA=$S.mark({class:"cm-searchMatch cm-searchMatch-selected"}),aA=nx.fromClass(function(){function e(t){h(this,e),this.view=t,this.decorations=this.highlight(t.state.field(nA))}return m(e,[{key:"update",value:function(e){var t=e.state.field(nA);(t!=e.startState.field(nA)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}},{key:"highlight",value:function(e){var t=e.query;if(!e.panel||!t.spec.valid)return $S.none;for(var n=this.view,r=new ik,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,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?oA:iA)}))}return r.finish()}}]),e}(),{decorations:function(e){return e.decorations}});function sA(e){return function(t){var n=t.state.field(nA,!1);return n&&n.query.spec.valid?e(t,n):gA(t)}}var lA=sA((function(e,t){var n=t.query,r=e.state.selection.main.to,i=n.nextMatch(e.state,r,r);if(!i)return!1;var o=sw.single(i.from,i.to),a=e.state.facet(zR);return e.dispatch({selection:o,effects:[xA(e,i),a.scrollToMatch(o.main,e)],userEvent:"select.search"}),mA(e),!0})),uA=sA((function(e,t){var n=t.query,r=e.state,i=r.selection.main.from,o=n.prevMatch(r,i,i);if(!o)return!1;var a=sw.single(o.from,o.to),s=e.state.facet(zR);return e.dispatch({selection:a,effects:[xA(e,o),s.scrollToMatch(a.main,e)],userEvent:"select.search"}),mA(e),!0})),cA=sA((function(e,t){var n=t.query.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:sw.create(n.map((function(e){return sw.range(e.from,e.to)}))),userEvent:"select.search.matches"}),!0)})),fA=sA((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,o,o);if(!s)return!1;var l,u,c=[],f=[];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,s.from,s.to),f.push(vP.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(o).number)+"."))),s){var h=0==c.length||c[0].from>=s.to?0:s.to-s.from-u.length;l=sw.single(s.from-h,s.to-h),f.push(xA(e,s)),f.push(r.facet(zR).scrollToMatch(l.main,e))}return e.dispatch({changes:c,selection:l,effects:f,userEvent:"input.replace"}),!0})),hA=sA((function(e,t){var n=t.query;if(e.state.readOnly)return!1;var r=n.matchAll(e.state,1e9).map((function(e){return{from:e.from,to:e.to,insert:n.getReplacement(e)}}));if(!r.length)return!1;var i=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:vP.announce.of(i),userEvent:"input.replace.all"}),!0}));function dA(e){return e.state.facet(zR).createPanel(e)}function pA(e,t){var n,r,i,o,a,s=e.selection.main,l=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!l)return t;var u=e.facet(zR);return new XR({search:(null!==(n=null===t||void 0===t?void 0:t.literal)&&void 0!==n?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null===t||void 0===t?void 0:t.caseSensitive)&&void 0!==r?r:u.caseSensitive,literal:null!==(i=null===t||void 0===t?void 0:t.literal)&&void 0!==i?i:u.literal,regexp:null!==(o=null===t||void 0===t?void 0:t.regexp)&&void 0!==o?o:u.regexp,wholeWord:null!==(a=null===t||void 0===t?void 0:t.wholeWord)&&void 0!==a?a:u.wholeWord})}function vA(e){var t=RE(e,dA);return t&&t.dom.querySelector("[main-field]")}function mA(e){var t=vA(e);t&&t==e.root.activeElement&&t.select()}var gA=function(e){var t=e.state.field(nA,!1);if(t&&t.panel){var n=vA(e);if(n&&n!=e.root.activeElement){var r=pA(e.state,t.query.spec);r.valid&&e.dispatch({effects:eA.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[tA.of(!0),t?eA.of(pA(e.state,t.query.spec)):Iw.appendConfig.of(PA)]});return!0},yA=function(e){var t=e.state.field(nA,!1);if(!t||!t.panel)return!1;var n=RE(e,dA);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:tA.of(!1)}),!0},OA=[{key:"Mod-f",run:gA,scope:"editor search-panel"},{key:"F3",run:lA,shift:uA,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:lA,shift:uA,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:yA,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 CR(t.doc,t.sliceDoc(o,a));!u.next().done;){if(s.length>1e3)return!1;u.value.from==o&&(l=s.length),s.push(sw.range(u.value.from,u.value.to))}return n(t.update({selection:sw.create(s,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(e){var t=RE(e,AR);if(!t){var n=[MR.of(!0)];null==e.state.field(NR,!1)&&n.push(Iw.appendConfig.of([NR,ZR])),e.dispatch({effects:n}),t=RE(e,AR)}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=sw.create(r.ranges.map((function(e){return t.wordAt(e.head)||sw.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,r=e.selection,i=r.main,o=r.ranges,a=e.wordAt(i.head),s=a&&a.from==i.from&&a.to==i.to,l=function(n,r){if(r.next(),!r.done){if(n&&o.some((function(e){return e.from==r.value.from})))return u=n,c=r,0;if(s){var i=e.wordAt(r.value.from);if(!i||i.from!=r.value.from||i.to!=r.value.to)return u=n,c=r,0}return{v:r.value}}if(n)return{v:null};r=new CR(e.doc,t,0,Math.max(0,o[o.length-1].from-1)),u=n=!0,c=r},u=!1,c=new CR(e.doc,t,o[o.length-1].to);;)if(0!==(n=l(u,c))&&n)return n.v}(t,i);return!!o&&(n(t.update({selection:t.selection.addRange(sw.range(o.from,o.to),!1),effects:vP.scrollIntoView(o.to)})),!0)},preventDefault:!0}],bA=function(){function e(t){var n=this;h(this,e),this.view=t;var r=this.query=t.state.field(nA).query.spec;function i(e,t,n){return kR("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=kR("input",{value:r.search,placeholder:wA(t,"Find"),"aria-label":wA(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=kR("input",{value:r.replace,placeholder:wA(t,"Replace"),"aria-label":wA(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=kR("input",{type:"checkbox",name:"case",form:"",checked:r.caseSensitive,onchange:this.commit}),this.reField=kR("input",{type:"checkbox",name:"re",form:"",checked:r.regexp,onchange:this.commit}),this.wordField=kR("input",{type:"checkbox",name:"word",form:"",checked:r.wholeWord,onchange:this.commit}),this.dom=kR("div",{onkeydown:function(e){return n.keydown(e)},class:"cm-search"},[this.searchField,i("next",(function(){return lA(t)}),[wA(t,"next")]),i("prev",(function(){return uA(t)}),[wA(t,"previous")]),i("select",(function(){return cA(t)}),[wA(t,"all")]),kR("label",null,[this.caseField,wA(t,"match case")]),kR("label",null,[this.reField,wA(t,"regexp")]),kR("label",null,[this.wordField,wA(t,"by word")])].concat(f(t.state.readOnly?[]:[kR("br"),this.replaceField,i("replace",(function(){return fA(t)}),[wA(t,"replace")]),i("replaceAll",(function(){return hA(t)}),[wA(t,"replace all")])]),[kR("button",{name:"close",onclick:function(){return yA(t)},"aria-label":wA(t,"close"),type:"button"},["\xd7"])]))}return m(e,[{key:"commit",value:function(){var e=new XR({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:eA.of(e)}))}},{key:"keydown",value:function(e){var t,n,r;t=this.view,n=e,r="search-panel",QP(CP(t.state),n,t,r)?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?uA:lA)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),fA(this.view))}},{key:"update",value:function(e){var t,n=P(e.transactions);try{for(n.s();!(t=n.n()).done;){var r,i=P(t.value.effects);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.is(eA)&&!o.value.eq(this.query)&&this.setQuery(o.value)}}catch(a){i.e(a)}finally{i.f()}}}catch(a){n.e(a)}finally{n.f()}}},{key:"setQuery",value:function(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(zR).top}}]),e}();function wA(e,t){return e.state.phrase(t)}var kA=30,SA=/[\s\.,:;?!]/;function xA(e,t){var n=t.from,r=t.to,i=e.state.doc.lineAt(n),o=e.state.doc.lineAt(r).to,a=Math.max(i.from,n-kA),s=Math.min(o,r+kA),l=e.state.sliceDoc(a,s);if(a!=i.from)for(var u=0;u<kA;u++)if(!SA.test(l[u+1])&&SA.test(l[u])){l=l.slice(u);break}if(s!=o)for(var c=l.length-1;c>l.length-kA;c--)if(!SA.test(l[c-1])&&SA.test(l[c])){l=l.slice(0,c);break}return vP.announce.of("".concat(e.state.phrase("current match"),". ").concat(l," ").concat(e.state.phrase("on line")," ").concat(i.number,"."))}var CA=vP.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"}}),PA=[nA,kw.low(aA),CA],EA=function(){function e(t,n,r){h(this,e),this.state=t,this.pos=n,this.explicit=r,this.abortListeners=[]}return m(e,[{key:"tokenBefore",value:function(e){for(var t=pT(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(AA(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 QA(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 TA(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=P(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=QA(n)+QA(r)+"*$";return[new RegExp("^"+s),new RegExp(s)]}(t),r=u(n,2),i=r[0],o=r[1];return function(e){var n=e.matchBefore(o);return n||e.explicit?{from:n?n.from:e.pos,options:t,validFor:i}:null}}function $A(e,t){return function(n){for(var r=pT(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(e.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return t(n)}}var _A=m((function e(t,n,r,i){h(this,e),this.completion=t,this.source=n,this.match=r,this.score=i}));function RA(e){return e.selection.main.from}function AA(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 MA=Zw.define();var NA=new WeakMap;function ZA(e){if(!Array.isArray(e))return e;var t=NA.get(e);return t||NA.set(e,t=TA(e)),t}var DA=Iw.define(),LA=Iw.define(),IA=function(){function e(t){h(this,e),this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(var n=0;n<t.length;){var r=Fb(t,n),i=qb(r);this.chars.push(r);var o=t.slice(n,n+i),a=o.toUpperCase();this.folded.push(Fb(a==o?o.toLowerCase():a,0)),n+=i}this.astral=t.length!=this.chars.length}return m(e,[{key:"ret",value:function(e,t){return this.score=e,this.matched=t,!0}},{key:"match",value:function(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return!1;var t=this.chars,n=this.folded,r=this.any,i=this.precise,o=this.byWord;if(1==t.length){var a=Fb(e,0),s=qb(a),l=s==e.length?0:-100;if(a==t[0]);else{if(a!=n[0])return!1;l+=-200}return this.ret(l,[0,s])}var u=e.indexOf(this.pattern);if(0==u)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);var c=t.length,f=0;if(u<0){for(var h=0,d=Math.min(e.length,200);h<d&&f<c;){var p=Fb(e,h);p!=t[f]&&p!=n[f]||(r[f++]=h),h+=qb(p)}if(f<c)return!1}for(var v=0,m=0,g=!1,y=0,O=-1,b=-1,w=/[a-z]/.test(e),k=!0,S=0,x=Math.min(e.length,200),C=0;S<x&&m<c;){var P=Fb(e,S);u<0&&(v<c&&P==t[v]&&(i[v++]=S),y<c&&(P==t[y]||P==n[y]?(0==y&&(O=S),b=S+1,y++):y=0));var E=void 0,Q=P<255?P>=48&&P<=57||P>=97&&P<=122?2:P>=65&&P<=90?1:0:(E=Bb(P))!=E.toLowerCase()?1:E!=E.toUpperCase()?2:0;(!S||1==Q&&w||0==C&&0!=Q)&&(t[m]==P||n[m]==P&&(g=!0)?o[m++]=S:o.length&&(k=!1)),C=Q,S+=qb(P)}return m==c&&0==o[0]&&k?this.result((g?-200:0)-100,o,e):y==c&&0==O?this.ret(-200-e.length+(b==e.length?0:-100),[0,b]):u>-1?this.ret(-700-e.length,[u,u+this.pattern.length]):y==c?this.ret(-900-e.length,[O,b]):m==c?this.result((g?-200:0)-100-700+(k?0:-1100),o,e):2!=t.length&&this.result((r[0]?-700:0)-200-1100,r,e)}},{key:"result",value:function(e,t,n){var r,i=[],o=0,a=P(t);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=s+(this.astral?qb(Fb(n,s)):1);o&&i[o-1]==s?i[o-1]=l:(i[o++]=s,i[o++]=l)}}catch(u){a.e(u)}finally{a.f()}return this.ret(e-n.length,i)}}]),e}(),YA=cw.define({combine:function(e){return Kw(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:function(){return""},optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:UA,compareCompletions:function(e,t){return e.label.localeCompare(t.label)},interactionDelay:75},{defaultKeymap:function(e,t){return e&&t},closeOnBlur:function(e,t){return e&&t},icons:function(e,t){return e&&t},tooltipClass:function(e,t){return function(n){return VA(e(n),t(n))}},optionClass:function(e,t){return function(n){return VA(e(n),t(n))}},addToOptions:function(e,t){return e.concat(t)}})}});function VA(e,t){return e?t?e+" "+t:e:t}function UA(e,t,n,r,i){var o,a,s=e.textDirection==vx.RTL,l=s,u=!1,c="top",f=t.left-i.left,h=i.right-t.right,d=r.right-r.left,p=r.bottom-r.top;if(l&&f<Math.min(d,h)?l=!1:!l&&h<Math.min(d,f)&&(l=!0),d<=(l?f:h))o=Math.max(i.top,Math.min(n.top,i.bottom-p))-t.top,a=Math.min(400,l?f:h);else{u=!0,a=Math.min(400,(s?t.right:i.right-t.left)-30);var v=i.bottom-t.bottom;v>=p||v>t.top?o=n.bottom-t.top:(c="bottom",o=t.bottom-n.top)}return{style:"".concat(c,": ").concat(o,"px; max-width: ").concat(a,"px"),class:"cm-completionInfo-"+(u?s?"left-narrow":"right-narrow":l?"left":"right")}}function jA(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),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 WA=function(){function e(t,n,r){var i=this;h(this,e),this.view=t,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:function(){return i.measureInfo()},write:function(e){return i.placeInfo(e)},key:this},this.space=null,this.currentClass="";var o=t.state.field(n),a=o.open,s=a.options,l=a.selected,u=t.state.facet(YA);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,f(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.displayLabel||e.label,o=0,a=0;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}))}(u),this.optionClass=u.optionClass,this.tooltipClass=u.tooltipClass,this.range=jA(s.length,l,u.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(function(e){for(var n,r=e.target;r&&r!=i.dom;r=r.parentNode)if("LI"==r.nodeName&&(n=/-(\d+)$/.exec(r.id))&&+n[1]<s.length)return i.applyCompletion(t,s[+n[1]]),void e.preventDefault()})),this.dom.addEventListener("focusout",(function(e){var n=t.state.field(i.stateField,!1);n&&n.tooltip&&t.state.facet(YA).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:LA.of(null)})})),this.list=this.dom.appendChild(this.createListBox(s,o.id,this.range)),this.list.addEventListener("scroll",(function(){i.info&&i.view.requestMeasure(i.placeInfoReq)}))}return m(e,[{key:"mount",value:function(){this.updateSel()}},{key:"update",value:function(e){var t,n,r,i=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),i!=o&&(this.updateSel(),(null===(t=i.open)||void 0===t?void 0:t.disabled)!=(null===(n=o.open)||void 0===n?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(r=i.open)||void 0===r?void 0:r.disabled)))}},{key:"updateTooltipClass",value:function(e){var t=this.tooltipClass(e);if(t!=this.currentClass){var n,r=P(this.currentClass.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.dom.classList.remove(i)}}catch(l){r.e(l)}finally{r.f()}var o,a=P(t.split(" "));try{for(a.s();!(o=a.n()).done;){var s=o.value;s&&this.dom.classList.add(s)}}catch(l){a.e(l)}finally{a.f()}this.currentClass=t}}},{key:"positioned",value:function(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}},{key:"updateSel",value:function(){var e=this,t=this.view.state.field(this.stateField),n=t.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=jA(n.options.length,n.selected,this.view.state.facet(YA).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.placeInfoReq)}))),this.updateSelectedOption(n.selected)){this.destroyInfo();var r=n.options[n.selected].completion,i=r.info;if(!i)return;var o="string"===typeof i?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then((function(n){n&&e.view.state.field(e.stateField,!1)==t&&e.addInfoPane(n,r)})).catch((function(t){return KS(e.view.state,t,"completion info")})):this.addInfoPane(o,r)}}},{key:"addInfoPane",value:function(e,t){this.destroyInfo();var n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{var r=e.dom,i=e.destroy;n.appendChild(r),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}},{key:"updateSelectedOption",value:function(e){for(var t=null,n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;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(),r=e.getBoundingClientRect(),i=this.space;if(!i){var o=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(YA).positionInfo(this.view,t,r,n,i)}},{key:"placeInfo",value:function(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}},{key:"createListBox",value:function(e,t,n){var r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));for(var i=null,o=n.from;o<n.to;o++){var a=e[o],s=a.completion,l=a.match,u=s.section;if(u){var c="string"==typeof u?u:u.name;if(c!=i&&(o>n.from||0==n.from))if(i=c,"string"!=typeof u&&u.header)r.appendChild(u.header(u));else r.appendChild(document.createElement("completion-section")).textContent=c}var f=r.appendChild(document.createElement("li"));f.id=t+"-"+o,f.setAttribute("role","option");var h=this.optionClass(s);h&&(f.className=h);var d,p=P(this.optionContent);try{for(p.s();!(d=p.n()).done;){var v=(0,d.value)(s,this.view.state,l);v&&f.appendChild(v)}}catch(m){p.e(m)}finally{p.f()}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}},{key:"destroyInfo",value:function(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}},{key:"destroy",value:function(){this.destroyInfo()}}]),e}();function zA(e,t){return function(n){return new WA(n,e,t)}}function XA(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}var FA=function(){function e(t,n,r,i,o,a){h(this,e),this.options=t,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}return m(e,[{key:"setSelected",value:function(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,HA(n,t),this.tooltip,this.timestamp,t,this.disabled)}},{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,this.disabled)}}],[{key:"build",value:function(t,n,r,i,o){var a=function(e,t){var n,r=[],i=null,o=function(e){r.push(e);var t=e.completion.section;if(t){i||(i=[]);var n="string"==typeof t?t:t.name;i.some((function(e){return e.name==n}))||i.push("string"==typeof t?{name:n}:t)}},a=P(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.hasResult()){var l=s.result.getMatch;if(!1===s.result.filter){var u,c=P(s.result.options);try{for(c.s();!(u=c.n()).done;){var f=u.value;o(new _A(f,s.source,l?l(f):[],1e9-r.length))}}catch(M){c.e(M)}finally{c.f()}}else{var h,d=new IA(t.sliceDoc(s.from,s.to)),p=P(s.result.options);try{for(p.s();!(h=p.n()).done;){var v=h.value;if(d.match(v.label)){var m=v.displayLabel?l?l(v,d.matched):[]:d.matched;o(new _A(v,s.source,m,d.score+(v.boost||0)))}}}catch(M){p.e(M)}finally{p.f()}}}}}catch(M){a.e(M)}finally{a.f()}if(i){var g,y=Object.create(null),O=0,b=P(i.sort((function(e,t){var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.name<t.name?-1:1)})));try{for(b.s();!(g=b.n()).done;){var w=g.value;O-=1e5,y[w.name]=O}}catch(M){b.e(M)}finally{b.f()}var k,S=P(r);try{for(S.s();!(k=S.n()).done;){var x=k.value,C=x.completion.section;C&&(x.score+=y["string"==typeof C?C:C.name])}}catch(M){S.e(M)}finally{S.f()}}var E,Q=[],T=null,$=t.facet(YA).compareCompletions,_=P(r.sort((function(e,t){return t.score-e.score||$(e.completion,t.completion)})));try{for(_.s();!(E=_.n()).done;){var R=E.value,A=R.completion;!T||T.label!=A.label||T.detail!=A.detail||null!=T.type&&null!=A.type&&T.type!=A.type||T.apply!=A.apply||T.boost!=A.boost?Q.push(R):XA(R.completion)>XA(T)&&(Q[Q.length-1]=R),T=R.completion}}catch(M){_.e(M)}finally{_.f()}return Q}(t,n);if(!a.length)return i&&t.some((function(e){return 1==e.state}))?new e(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;var s=n.facet(YA).selectOnOpen?0:-1;if(i&&i.selected!=s&&-1!=i.selected)for(var l=i.options[i.selected].completion,u=0;u<a.length;u++)if(a[u].completion==l){s=u;break}return new e(a,HA(r,s),{pos:t.reduce((function(e,t){return t.hasResult()?Math.min(e,t.from):e}),1e8),create:zA(rM,iM),above:o.aboveCursor},i?i.timestamp:Date.now(),s,!1)}}]),e}(),BA=function(){function e(t,n,r){h(this,e),this.active=t,this.id=n,this.open=r}return m(e,[{key:"update",value:function(t){var n=this,r=t.state,i=r.facet(YA),o=(i.override||r.languageDataAt("autocomplete",RA(r)).map(ZA)).map((function(e){return(n.active.find((function(t){return t.source==e}))||new JA(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=this.open;a&&t.docChanged&&(a=a.map(t.changes)),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)?a=FA.build(o,r,this.id,a,i):a&&a.disabled&&!o.some((function(e){return 1==e.state}))&&(a=null),!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 JA(e.source,0):e})));var s,l=P(t.effects);try{for(l.s();!(s=l.n()).done;){var u=s.value;u.is(nM)&&(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:qA}}],[{key:"start",value:function(){return new e(GA,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}}]),e}();var qA={"aria-autocomplete":"list"};function HA(e,t){var n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}var GA=[];function KA(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}var JA=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;h(this,e),this.source=t,this.state=n,this.explicitPos=r}return m(e,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(t,n){var r=KA(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=P(t.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.is(DA))i=new e(i.source,1,s.value?RA(t.state):-1);else if(s.is(LA))i=new e(i.source,0);else if(s.is(tM)){var l,u=P(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(RA(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}(),eM=function(e){y(n,e);var t=k(n);function n(e,r,i,o,a){var s;return h(this,n),(s=t.call(this,e,2,r)).result=i,s.from=o,s.to=a,s}return m(n,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(e,t,r){var i,o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=RA(e.state);if((this.explicitPos<0?s<=o:s<this.from)||s>a||"delete"==t&&RA(e.startState)==this.from)return new JA(this.source,"input"==t&&r.activateOnTyping?1:0);var l,u=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,r){if(!e)return!1;var i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):AA(e,!0).test(i)}(this.result.validFor,e.state,o,a)?new n(this.source,u,this.result,o,a):this.result.update&&(l=this.result.update(this.result,o,a,new EA(e.state,s,u>=0)))?new n(this.source,u,l,l.from,null!==(i=l.to)&&void 0!==i?i:RA(e.state)):new JA(this.source,1,u)}},{key:"handleChange",value:function(e){return e.changes.touchesRange(this.from,this.to)?new JA(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))}}]),n}(JA);var tM=Iw.define({map:function(e,t){return e.map((function(e){return e.map(t)}))}}),nM=Iw.define(),rM=mw.define({create:function(){return BA.start()},update:function(e,t){return e.update(t)},provide:function(e){return[kE.from(e,(function(e){return e.tooltip})),vP.contentAttributes.from(e,(function(e){return e.attrs}))]}});function iM(e,t){var n=t.completion.apply||t.completion.label,r=e.state.field(rM).active.find((function(e){return e.source==t.source}));return r instanceof eM&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){var i=e.selection.main,o=n-i.from,a=r-i.from;return Object.assign(Object.assign({},e.changeByRange((function(s){return s!=i&&n!=r&&e.sliceDoc(s.from+o,s.from+a)!=e.sliceDoc(n,r)?{range:s}:{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:t},range:sw.cursor(s.from+o+t.length)}}))),{userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:MA.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}function oM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(n){var r=n.state.field(rM,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(YA).interactionDelay)return!1;var i,o=1;"page"==t&&(i=TE(n,r.open.tooltip))&&(o=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));var a=r.open.options.length,s=r.open.selected>-1?r.open.selected+o*(e?1:-1):e?0:a-1;return s<0?s="page"==t?0:a-1:s>=a&&(s="page"==t?a-1:0),n.dispatch({effects:nM.of(s)}),!0}}var aM=m((function e(t,n){h(this,e),this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0})),sM=nx.fromClass(function(){function e(t){h(this,e),this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var n,r=P(t.state.field(rM).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 m(e,[{key:"update",value:function(e){var t=this,n=e.state.field(rM);if(e.selectionSet||e.docChanged||e.startState.field(rM)!=n){for(var r=e.transactions.some((function(e){return(e.selection||e.docChanged)&&!KA(e)})),i=0;i<this.running.length;i++){var o=this.running[i];if(r||o.updates.length+e.transactions.length>50&&Date.now()-o.time>1e3){var a,s=P(o.context.abortListeners);try{for(s.s();!(a=s.n()).done;){var l=a.value;try{l()}catch(p){KS(this.view.state,p)}}}catch(v){s.e(v)}finally{s.f()}o.context.abortListeners=null,this.running.splice(i--,1)}else{var u;(u=o.updates).push.apply(u,f(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,h=P(e.transactions);try{for(h.s();!(c=h.n()).done;){var d=c.value;"input"==KA(d)?this.composing=2:2==this.composing&&d.selection&&(this.composing=3)}}catch(v){h.e(v)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var e=this;this.debounceUpdate=-1;var t,n=P(this.view.state.field(rM).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=RA(n),i=new EA(n,r,e.explicitPos==r),o=new aM(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:LA.of(null)}),KS(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(YA),i=function(i){var a=t.running[i];if(void 0===a.done)return o=i,0;if(t.running.splice(i--,1),a.done){var s,l=new eM(a.active.source,a.active.explicitPos,a.done,a.done.from,null!==(e=a.done.to)&&void 0!==e?e:RA(a.updates.length?a.updates[0].startState:t.view.state)),u=P(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,0}var f=t.view.state.field(rM).active.find((function(e){return e.source==a.active.source}));if(f&&1==f.state)if(null==a.done){var h,d=new JA(a.active.source,0),p=P(a.updates);try{for(p.s();!(h=p.n()).done;){var v=h.value;d=d.update(v,r)}}catch(m){p.e(m)}finally{p.f()}1!=d.state&&n.push(d)}else t.startQuery(f);o=i},o=0;o<this.running.length;o++)i(o);n.length&&this.view.dispatch({effects:tM.of(n)})}}]),e}(),{eventHandlers:{blur:function(e){var t=this.view.state.field(rM,!1);if(t&&t.tooltip&&this.view.state.facet(YA).closeOnBlur){var n=t.open&&TE(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||this.view.dispatch({effects:LA.of(null)})}},compositionstart:function(){this.composing=1},compositionend:function(){var e=this;3==this.composing&&setTimeout((function(){return e.view.dispatch({effects:DA.of(!1)})}),20),this.composing=0}}}),lM=vP.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"".concat(400,"px"),boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"".concat(30,"px")},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"".concat(30,"px")},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\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"}}}),uM=m((function e(t,n,r,i){h(this,e),this.field=t,this.line=n,this.from=r,this.to=i})),cM=function(){function e(t,n,r){h(this,e),this.field=t,this.from=n,this.to=r}return m(e,[{key:"map",value:function(t){var n=t.mapPos(this.from,-1,Gb.TrackDel),r=t.mapPos(this.to,1,Gb.TrackDel);return null==n||null==r?null:new e(this.field,n,r)}}]),e}(),fM=function(){function e(t,n){h(this,e),this.lines=t,this.fieldPositions=n}return m(e,[{key:"instantiate",value:function(e,t){var n,r=[],i=[t],o=e.doc.lineAt(t),a=/^\s*/.exec(o.text)[0],s=P(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(PT);i.push(t+u.length-c),l=u+l.slice(c)}r.push(l),t+=l.length+1}}catch(d){s.e(d)}finally{s.f()}var h=this.fieldPositions.map((function(e){return new cM(e.field,i[e.line]+e.from,i[e.line]+e.to)}));return{text:r,ranges:h}}}],[{key:"parse",value:function(t){var n,r,i=[],o=[],a=[],s=P(t.split(/\r\n?|\n/));try{for(s.s();!(r=s.n()).done;){for(var l,u=r.value;n=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(u);){for(var c=n[1]?+n[1]:null,f=n[2]||n[3]||"",h=-1,d=0;d<i.length;d++)(null!=c?i[d].seq==c:f&&i[d].name==f)&&(h=d);if(h<0){for(var p=0;p<i.length&&(null==c||null!=i[p].seq&&i[p].seq<c);)p++;i.splice(p,0,{seq:c,name:f}),h=p;var v,m=P(a);try{for(m.s();!(v=m.n()).done;){var g=v.value;g.field>=h&&g.field++}}catch(w){m.e(w)}finally{m.f()}}a.push(new uM(h,o.length,n.index,n.index+f.length)),u=u.slice(0,n.index)+f+u.slice(n.index+n[0].length)}for(;l=/\\([{}])/.exec(u);){u=u.slice(0,l.index)+l[1]+u.slice(l.index+l[0].length);var y,O=P(a);try{for(O.s();!(y=O.n()).done;){var b=y.value;b.line==o.length&&b.from>l.index&&(b.from--,b.to--)}}catch(w){O.e(w)}finally{O.f()}}o.push(u)}}catch(w){s.e(w)}finally{s.f()}return new e(o,a)}}]),e}(),hM=$S.widget({widget:new(function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n,[{key:"toDOM",value:function(){var e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}},{key:"ignoreEvent",value:function(){return!1}}]),n}(QS))}),dM=$S.mark({class:"cm-snippetField"}),pM=function(){function e(t,n){h(this,e),this.ranges=t,this.active=n,this.deco=$S.set(t.map((function(e){return(e.from==e.to?hM:dM).range(e.from,e.to)})))}return m(e,[{key:"map",value:function(t){var n,r=[],i=P(this.ranges);try{for(i.s();!(n=i.n()).done;){var o=n.value.map(t);if(!o)return null;r.push(o)}}catch(a){i.e(a)}finally{i.f()}return new e(r,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}(),vM=Iw.define({map:function(e,t){return e&&e.map(t)}}),mM=Iw.define(),gM=mw.define({create:function(){return null},update:function(e,t){var n,r=P(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(vM))return i.value;if(i.is(mM)&&e)return new pM(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 vP.decorations.from(e,(function(e){return e?e.deco:$S.none}))}});function yM(e,t){return sw.create(e.filter((function(e){return e.field==t})).map((function(e){return sw.range(e.from,e.to)})))}function OM(e){var t=fM.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:Qb.of(a)},scrollIntoView:!0,annotations:n?MA.of(n):void 0};if(s.length&&(l.selection=yM(s,0)),s.length>1){var u=new pM(s,0),c=l.effects=[vM.of(u)];void 0===e.state.field(gM,!1)&&c.push(Iw.appendConfig.of([gM,SM,CM,lM]))}e.dispatch(e.state.update(l))}}function bM(e){return function(t){var n=t.state,r=t.dispatch,i=n.field(gM,!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:yM(i.ranges,o),effects:vM.of(a?null:new pM(i.ranges,o))})),!0}}var wM=[{key:"Tab",run:bM(1),shift:bM(-1)},{key:"Escape",run:function(e){var t=e.state,n=e.dispatch;return!!t.field(gM,!1)&&(n(t.update({effects:vM.of(null)})),!0)}}],kM=cw.define({combine:function(e){return e.length?e[0]:wM}}),SM=kw.highest(SP.compute([kM],(function(e){return e.facet(kM)})));function xM(e,t){return Object.assign(Object.assign({},t),{apply:OM(e)})}var CM=vP.domEventHandlers({mousedown:function(e,t){var n,r=t.state.field(gM,!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:yM(r.ranges,i.field),effects:vM.of(r.ranges.some((function(e){return e.field>i.field}))?new pM(r.ranges,i.field):null)}),!0)}});var PM={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},EM=Iw.define({map:function(e,t){var n=t.mapPos(e,-1,Gb.TrackAfter);return null==n?void 0:n}}),QM=new(function(e){y(n,e);var t=k(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n)}(Jw));QM.startSide=1,QM.endSide=-1;var TM=mw.define({create:function(){return rk.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=rk.empty)}e=e.map(t.changes);var i,o=P(t.effects);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.is(EM)&&(e=e.update({add:[QM.range(a.value,a.value+1)]}))}}catch(s){o.e(s)}finally{o.f()}return e}});var $M="()[]{}<>";function _M(e){for(var t=0;t<$M.length;t+=2)if($M.charCodeAt(t)==e)return $M.charAt(t+1);return Bb(e<128?e:e+1)}function RM(e,t){return e.languageDataAt("closeBrackets",t)[0]||PM}var AM="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),MM=vP.inputHandler.of((function(e,t,n,r){if((AM?e.composing:e.compositionStarted)||e.state.readOnly)return!1;var i=e.state.selection.main;if(r.length>2||2==r.length&&1==qb(Fb(r,0))||t!=i.from||n!=i.to)return!1;var o=function(e,t){var n,r=RM(e,e.selection.main.head),i=r.brackets||PM.brackets,o=P(i);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=_M(Fb(a,0));if(t==a)return s==a?YM(e,a,i.indexOf(a+a+a)>-1,r):LM(e,a,s,r.before||PM.before);if(t==s&&ZM(e,e.selection.main.from))return IM(e,a,s)}}catch(l){o.e(l)}finally{o.f()}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)})),NM=[{key:"Backspace",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=RM(t,t.selection.main.head).brackets||PM.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 qb(Fb(n,0))==n.length?n:n.slice(1)}(t.doc,e.head),a=P(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s==o&&DM(t.doc,e.head)==_M(Fb(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:sw.cursor(e.head-s.length)}}}catch(l){a.e(l)}finally{a.f()}}return{range:i=e}}));return i||n(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function ZM(e,t){var n=!1;return e.field(TM).between(0,e.doc.length,(function(e){e==t&&(n=!0)})),n}function DM(e,t){var n=e.sliceString(t,t+2);return n.slice(0,qb(Fb(n,0)))}function LM(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:EM.of(o.to+t.length),range:sw.range(o.anchor+t.length,o.head+t.length)};var a=DM(e.doc,o.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:o.head},effects:EM.of(o.head+t.length),range:sw.cursor(o.head+t.length)}:{range:i=o}}));return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function IM(e,t,n){var r=null,i=e.changeByRange((function(t){return t.empty&&DM(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:sw.cursor(t.head+n.length)}:r={range:t}}));return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function YM(e,t,n,r){var i=r.stringPrefixes||PM.stringPrefixes,o=null,a=e.changeByRange((function(r){if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:EM.of(r.to+t.length),range:sw.range(r.anchor+t.length,r.head+t.length)};var a,s=r.head,l=DM(e.doc,s);if(l==t){if(VM(e,s))return{changes:{insert:t+t,from:s},effects:EM.of(s+t.length),range:sw.cursor(s+t.length)};if(ZM(e,s)){var u=n&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+u.length,insert:u},range:sw.cursor(s+u.length)}}}else{if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(a=UM(e,s-2*t.length,i))>-1&&VM(e,a))return{changes:{insert:t+t+t+t,from:s},effects:EM.of(s+t.length),range:sw.cursor(s+t.length)};if(e.charCategorizer(s)(l)!=Bw.Word&&UM(e,s,i)>-1&&!function(e,t,n,r){for(var i=pT(e).resolveInner(t,-1),o=r.reduce((function(e,t){return Math.max(e,t.length)}),0),a=0;a<5;a++){var s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){for(var u=i.firstChild;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(e.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}var c=i.to==t&&i.parent;if(!c)break;i=c}return!1}(e,s,t,i))return{changes:{insert:t+t,from:s},effects:EM.of(s+t.length),range:sw.cursor(s+t.length)}}return{range:o=r}}));return o?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function VM(e,t){var n=pT(e).resolveInner(t+1);return n.parent&&n.from==t}function UM(e,t,n){var r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=Bw.Word)return t;var i,o=P(n);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=t-a.length;if(e.sliceDoc(s,t)==a&&r(e.sliceDoc(s-1,s))!=Bw.Word)return s}}catch(l){o.e(l)}finally{o.f()}return-1}function jM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[rM,YA.of(e),sM,zM,lM]}var WM=[{key:"Ctrl-Space",run:function(e){return!!e.state.field(rM,!1)&&(e.dispatch({effects:DA.of(!0)}),!0)}},{key:"Escape",run:function(e){var t=e.state.field(rM,!1);return!(!t||!t.active.some((function(e){return 0!=e.state})))&&(e.dispatch({effects:LA.of(null)}),!0)}},{key:"ArrowDown",run:oM(!0)},{key:"ArrowUp",run:oM(!1)},{key:"PageDown",run:oM(!0,"page")},{key:"PageUp",run:oM(!1,"page")},{key:"Enter",run:function(e){var t=e.state.field(rM,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(YA).interactionDelay)&&iM(e,t.open.options[t.open.selected])}}],zM=kw.highest(SP.computeN([YA],(function(e){return e.facet(YA).defaultKeymap?[WM]:[]})));var XM=m((function e(t,n,r){h(this,e),this.from=t,this.to=n,this.diagnostic=r})),FM=function(){function e(t,n,r){h(this,e),this.diagnostics=t,this.panel=n,this.selected=r}return m(e,null,[{key:"init",value:function(t,n,r){var i=t,o=r.facet(aN).markerFilter;o&&(i=o(i));var a=$S.set(i.map((function(e){return e.from==e.to||e.from==e.to-1&&r.doc.lineAt(e.from).to==e.from?$S.widget({widget:new uN(e),diagnostic:e}).range(e.from):$S.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to)})),!0);return new e(a,n,BM(a))}}]),e}();function BM(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 XM(e,n,o.diagnostic),!1})),r}function qM(e,t){var n=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((function(e){return e.is(GM)}))&&!e.changes.touchesRange(n.from,n.to))}function HM(e,t){return e.field(eN,!1)?t:t.concat(Iw.appendConfig.of(vN))}var GM=Iw.define(),KM=Iw.define(),JM=Iw.define(),eN=mw.define({create:function(){return new FM($S.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=BM(n,e.selected.diagnostic,i)||BM(n,null,i)}e=new FM(n,e.panel,r)}var o,a=P(t.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.is(GM)?e=FM.init(s.value,e.panel,t.state):s.is(KM)?e=new FM(e.diagnostics,s.value?fN.open:null,e.selected):s.is(JM)&&(e=new FM(e.diagnostics,e.panel,s.value))}}catch(l){a.e(l)}finally{a.f()}return e},provide:function(e){return[ZE.from(e,(function(e){return e.panel})),vP.decorations.from(e,(function(e){return e.diagnostics}))]}});var tN=$S.mark({class:"cm-lintRange cm-lintRange-active"});function nN(e,t,n){var r=e.state.field(eN).diagnostics,i=[],o=2e8,a=0;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))}));var s=e.state.facet(aN).tooltipFilter;return s&&(i=s(i)),i.length?{pos:o,end:a,above:e.state.doc.lineAt(o).to<a,create:function(){return{dom:rN(e,i)}}}:null}function rN(e,t){return kR("ul",{class:"cm-tooltip-lint"},t.map((function(t){return lN(e,t,!1)})))}var iN=function(e){var t=e.state.field(eN,!1);return!(!t||!t.panel)&&(e.dispatch({effects:KM.of(!1)}),!0)},oN=[{key:"Mod-Shift-m",run:function(e){var t=e.state.field(eN,!1);t&&t.panel||e.dispatch({effects:HM(e.state,[KM.of(!0)])});var n=RE(e,fN.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:function(e){var t=e.state.field(eN,!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)}}],aN=cw.define({combine:function(e){return Object.assign({sources:e.map((function(e){return e.source}))},Kw(e.map((function(e){return e.config})),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:function(e,t){return e?t?function(n){return e(n)||t(n)}:e:t}}))}});function sN(e){var t=[];if(e){var n,r=P(e);try{e:for(r.s();!(n=r.n()).done;){for(var i=n.value.name,o=function(){var e=i[a];if(/[a-zA-Z]/.test(e)&&!t.some((function(t){return t.toLowerCase()==e.toLowerCase()})))return t.push(e),1},a=0;a<i.length;a++)if(o())continue e;t.push("")}}catch(s){r.e(s)}finally{r.f()}}return t}function lN(e,t,n){var r,i=n?sN(t.actions):[];return kR("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},kR("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(r=t.actions)||void 0===r?void 0:r.map((function(n,r){var o=!1,a=function(r){if(r.preventDefault(),!o){o=!0;var i=BM(e.state.field(eN).diagnostics,t);i&&n.apply(e,i.from,i.to)}},s=n.name,l=i[r]?s.indexOf(i[r]):-1,u=l<0?s:[s.slice(0,l),kR("u",s.slice(l,l+1)),s.slice(l+1)];return kR("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":" Action: ".concat(s).concat(l<0?"":' (access key "'.concat(i[r],')"'),".")},u)})),t.source&&kR("div",{class:"cm-diagnosticSource"},t.source))}var uN=function(e){y(n,e);var t=k(n);function n(e){var r;return h(this,n),(r=t.call(this)).diagnostic=e,r}return m(n,[{key:"eq",value:function(e){return e.diagnostic==this.diagnostic}},{key:"toDOM",value:function(){return kR("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}]),n}(QS),cN=m((function e(t,n){h(this,e),this.diagnostic=n,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=lN(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")})),fN=function(){function e(t){var n=this;h(this,e),this.view=t,this.items=[];this.list=kR("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:function(e){if(27==e.keyCode)iN(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=sN(r.actions),o=0;o<i.length;o++)if(i[o].toUpperCase().charCodeAt(0)==e.keyCode){var a=BM(n.view.state.field(eN).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=kR("div",{class:"cm-panel-lint"},this.list,kR("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:function(){return iN(n.view)}},"\xd7")),this.update()}return m(e,[{key:"selectedIndex",get:function(){var e=this.view.state.field(eN).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(eN),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 cN(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 cN(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=P(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=BM(this.view.state.field(eN).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:JM.of(t)})}}}],[{key:"open",value:function(t){return new e(t)}}]),e}();function hN(e){return'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" '.concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(e),"</svg>')")}function dN(e){return hN('<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="'.concat(e,'" fill="none" stroke-width=".7"/>'),'width="6" height="3"')}var pN=vP.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:dN("#d11")},".cm-lintRange-warning":{backgroundImage:dN("orange")},".cm-lintRange-info":{backgroundImage:dN("#999")},".cm-lintRange-hint":{backgroundImage:dN("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});var vN=[eN,vP.decorations.compute([eN],(function(e){var t=e.field(eN),n=t.selected,r=t.panel;return n&&r&&n.from!=n.to?$S.set([tN.range(n.from,n.to)]):$S.none})),QE(nN,{hideOn:qM}),pN];var mN=function(){return[tQ(),iQ,tE(),n_(),s$(),LP(),[XP,FP],Gw.allowMultipleSelections.of(!0),Gw.transactionFilter.of((function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))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=P(s.selection.ranges);try{for(c.s();!(a=c.n()).done;){var f=a.value.head,h=s.doc.lineAt(f);if(h.from!=l){l=h.from;var d=TT(s,h.from);if(null!=d){var p=/^\s*/.exec(h.text)[0],v=QT(s,d);p!=v&&u.push({from:h.from,to:h.from+p.length,insert:v})}}}}catch(m){c.e(m)}finally{c.f()}return u.length?[e,{changes:u,sequential:!0}]:e})),d$(m$,{fallback:!0}),P$(),[MM,TM],jM(),cE(),dE(),aE,IR(),SP.of([].concat(f(NM),f(bR),f(OA),f(O_),f(KT),f(WM),f(oN)))]}(),gN=function(e){var t=e.theme,n=e.settings,r=void 0===n?{}:n,i=e.styles,o=void 0===i?[]:i,a={".cm-gutters":{}},s={};r.background&&(s.backgroundColor=r.background),r.foreground&&(s.color=r.foreground),(r.background||r.foreground)&&(a["&"]=s),r.fontFamily&&(a["&.cm-editor .cm-scroller"]={fontFamily:r.fontFamily}),r.gutterBackground&&(a[".cm-gutters"].backgroundColor=r.gutterBackground),r.gutterForeground&&(a[".cm-gutters"].color=r.gutterForeground),r.gutterBorder&&(a[".cm-gutters"].borderRightColor=r.gutterBorder),r.caret&&(a[".cm-content"]={caretColor:r.caret},a[".cm-cursor, .cm-dropCursor"]={borderLeftColor:r.caret});var l={};return r.gutterActiveForeground&&(l.color=r.gutterActiveForeground),r.lineHighlight&&(a[".cm-activeLine"]={backgroundColor:r.lineHighlight},l.backgroundColor=r.lineHighlight),a[".cm-activeLineGutter"]=l,r.selection&&(a["&.cm-focused .cm-selectionBackground, &.cm-focused .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:r.selection+" !important"}),r.selectionMatch&&(a["& .cm-selectionMatch"]={backgroundColor:r.selectionMatch}),[vP.theme(a,{dark:"dark"===t}),d$(u$.define(o))]},yN={background:"#303841",foreground:"#FFFFFF",caret:"#FBAC52",selection:"#4C5964",selectionMatch:"#3A546E",gutterBackground:"#303841",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"};var ON=function(e){var t=e||{},n=t.theme,r=void 0===n?"dark":n,i=t.settings,o=void 0===i?{}:i,a=t.styles,s=void 0===a?[]:a;return gN({theme:r,settings:wu({},yN,o),styles:[{tag:[sT.meta,sT.comment],color:"#A2A9B5"},{tag:[sT.attributeName,sT.keyword],color:"#B78FBA"},{tag:sT.function(sT.variableName),color:"#5AB0B0"},{tag:[sT.string,sT.regexp,sT.attributeValue],color:"#99C592"},{tag:sT.operator,color:"#f47954"},{tag:[sT.tagName,sT.modifier],color:"#E35F63"},{tag:[sT.number,sT.definition(sT.tagName),sT.className,sT.definition(sT.variableName)],color:"#fbac52"},{tag:[sT.atom,sT.bool,sT.special(sT.variableName)],color:"#E35F63"},{tag:sT.variableName,color:"#539ac4"},{tag:[sT.propertyName,sT.typeName],color:"#629ccd"},{tag:sT.propertyName,color:"#36b7b5"}].concat(f(s))})}(),bN=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;h(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 m(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,n=e>>19,r=65535&e,i=this.p.parser,o=i.dynamicPrecedence(r);if(o&&(this.score+=o),0==n)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,4,!0),void this.reduceContext(r,this.reducePos);var a=this.stack.length-3*(n-1)-(262144&e?6:0),s=a?this.stack[a-2]:this.p.ranges[0].from,l=this.reducePos-s;l>=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=l));var u=a?this.stack[a-1]:0,c=this.bufferBase+this.buffer.length-u;if(r<i.minRepeatTerm||131072&e){var f=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,s,f,c+4,!0)}if(262144&e)this.state=this.stack[a];else{var h=this.stack[a-3];this.state=i.getGoto(h,r,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(r,s)}},{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&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){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 kN(this);;){var n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(0==(65536&n))return!0;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(){var e=t[a+1];r.some((function(t,n){return 1&n&&t==e}))||r.push(t[a],e)},a=0;r.length<8&&a<t.length;a+=2)o();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.pushState(u,this.pos),c.storeNode(0,c.pos,c.pos,4,!0),c.shiftContext(t[l],this.pos),c.score-=200,s.push(c)}}return s}},{key:"forceReduce",value:function(){var e=this.p.parser,t=e.stateSlot(this.state,5);if(0==(65536&t))return!1;if(!e.validAction(this.state,t)){var n=t>>19,r=65535&t,i=this.stack.length-3*n;if(i<0||e.getGoto(this.stack[i],r,!1)<0){var o=this.findForcedReduction();if(null==o)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}},{key:"findForcedReduction",value:function(){var e=this,t=this.p.parser,n=[];return function r(i,o){if(!n.includes(i))return n.push(i),t.allActions(i,(function(n){if(393216&n);else if(65536&n){var i=(n>>19)-o;if(i>1){var a=65535&n,s=e.stack.length-3*i;if(s>=0&&t.getGoto(e.stack[s],a,!1)>=0)return i<<19|65536|a}}else{var l=r(n,o+1);if(null!=l)return l}}))}(this.state,0)}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}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.pos,this.pos,-3)}},{key:"emitLookAhead",value:function(){var e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}},{key:"updateContext",value:function(e){if(e!=this.curContext.context){var t=new wN(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 wN(i,i.start):null,0,null)}}]),e}(),wN=m((function e(t,n){h(this,e),this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0})),kN=function(){function e(t){h(this,e),this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}return m(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}(),SN=function(){function e(t,n,r){h(this,e),this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,0==this.index&&this.maybeNext()}return m(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}();function xN(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 CN=m((function e(){h(this,e),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0})),PN=new CN,EN=function(){function e(t,n){h(this,e),this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=PN,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}return m(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:"clipPos",value:function(e){if(e>=this.range.from&&e<this.range.to)return e;var t,n=P(this.ranges);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.to>e)return Math.max(e,r.from)}}catch(i){n.e(i)}finally{n.f()}return this.end}},{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+1),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+1),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=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=PN,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.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);var n,r="",i=P(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}(),QN=function(){function e(t,n){h(this,e),this.data=t,this.id=n}return m(e,[{key:"token",value:function(e,t){var n=t.p.parser;_N(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}]),e}();QN.prototype.contextual=QN.prototype.fallback=QN.prototype.extend=!1;var TN=function(){function e(t,n,r){h(this,e),this.precTable=n,this.elseToken=r,this.data="string"==typeof t?xN(t):t}return m(e,[{key:"token",value:function(e,t){for(var n=e.pos,r=0;;){var i=e.next<0,o=e.resolveOffset(1,1);if(_N(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(i||r++,null==o)break;e.reset(o,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}]),e}();TN.prototype.contextual=QN.prototype.fallback=QN.prototype.extend=!1;var $N=m((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h(this,e),this.token=t,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}));function _N(e,t,n,r,i,o){var a=0,s=1<<r,l=n.p.parser.dialect;e:for(;0!=(s&e[a]);){for(var u=e[a+1],c=a+3;c<u;c+=2)if((e[c+1]&s)>0){var f=e[c];if(l.allows(f)&&(-1==t.token.value||t.token.value==f||AN(f,t.token.value,i,o))){t.acceptToken(f);break}}var h=t.next,d=0,p=e[a+2];if(!(t.next<0&&p>d&&65535==e[u+3*p-3]&&65535==e[u+3*p-3])){for(;d<p;){var v=d+p>>1,m=u+v+(v<<1),g=e[m],y=e[m+1]||65536;if(h<g)p=v;else{if(!(h>=y)){a=e[m+2],t.advance();continue e}d=v+1}}break}a=e[u+3*p-1]}}function RN(e,t,n){for(var r,i=t;65535!=(r=e[i]);i++)if(r==n)return i-t;return-1}function AN(e,t,n,r){var i=RN(n,r,t);return i<0||RN(n,r,e)<i}var MN="undefined"!=typeof process&&{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}&&/\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),NN=null;function ZN(e,t,n){var r=e.cursor(fQ.IncludeAnonymous);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}}var DN=function(){function e(t,n){h(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 m(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?ZN(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?ZN(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 vQ){if(o==e){if(o<this.safeFrom)return null;var a=o+i.length;if(a<=this.safeTo){var s=i.prop(lQ.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}(),LN=function(){function e(t,n){h(this,e),this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((function(e){return new CN}))}return m(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 CN).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 CN,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){var r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){for(var i=n.p.parser,o=0;o<i.specialized.length;o++)if(i.specialized[o]==e.value){var a=i.specializers[o](this.stream.read(e.start,e.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){0==(1&a)?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+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(zN(a,l+2),t,n,r));break}l=zN(a,l+2)}a[l]==t&&(r=this.putAction(zN(a,l+1),t,n,r))}return r}}]),e}(),IN=function(){function e(t,n,r,i){h(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.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new EN(n,i),this.tokens=new LN(t,this.stream),this.topTerm=t.top[1];var o=i[0].from;this.stacks=[bN.start(this,t.top[0],o)],this.fragments=r.length&&this.stream.end-o>4*t.bufferLength?new DN(r,t.nodeSet):null}return m(e,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){var e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){for(var o=u(n,1)[0];o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(var a=0;a<n.length;a++)for(var s=n[a];;){if(this.tokens.mainToken=null,s.pos>r)i.push(s);else{if(this.advanceStack(s,i,n))continue;e||(e=[],t=[]),e.push(s);var l=this.tokens.getMainToken(s);t.push(l.value,l.end)}break}if(!i.length){var c=e&&function(e){var t,n=null,r=P(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(c)return MN&&console.log("Finish with "+this.stackID(c)),this.stackToTree(c);if(this.parser.strict)throw MN&&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 f=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,i);if(f)return MN&&console.log("Force-finish "+this.stackID(f)),this.stackToTree(f.forceAll())}if(this.recovering){var h=1==this.recovering?1:3*this.recovering;if(i.length>h)for(i.sort((function(e,t){return t.score-e.score}));i.length>h;)i.pop();i.some((function(e){return e.reducePos>r}))&&this.recovering--}else if(i.length>1){e:for(var d=0;d<i.length-1;d++)for(var p=i[d],v=d+1;v<i.length;v++){var m=i[v];if(p.sameState(m)||p.buffer.length>500&&m.buffer.length>500){if(!((p.score-m.score||p.buffer.length-m.buffer.length)>0)){i.splice(d--,1);continue e}i.splice(v--,1)}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(var g=1;g<i.length;g++)i[g].pos<this.minStackPos&&(this.minStackPos=i[g].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=MN?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(lQ.contextHash)||0)==s))return e.useNode(l,u),MN&&console.log(o+this.stackID(e)+" (via reuse of ".concat(i.getName(l.type.id),")")),!0;if(!(l instanceof vQ)||0==l.children.length||l.positions[0]>0)break;var c=l.children[0];if(!(c instanceof vQ&&0==l.positions[0]))break;l=c}var f=i.stateSlot(e.state,4);if(f>0)return e.reduce(f),MN&&console.log(o+this.stackID(e)+" (via always-reduce ".concat(i.getName(65535&f),")")),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););for(var h=this.tokens.getActions(e),d=0;d<h.length;){var p=h[d++],v=h[d++],m=h[d++],g=d==h.length||!n,y=g?e:e.split();if(y.apply(p,v,m),MN&&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 YN(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=MN?this.stackID(a)+" -> ":"";if(a.deadEnd){if(i)continue;if(i=!0,a.restart(),MN&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}for(var c=a.split(),f=u,h=0;c.forceReduce()&&h<10;h++){if(MN&&console.log(f+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,n))break;MN&&(f=this.stackID(c)+" -> ")}var d,p=P(a.recoverByInsert(s));try{for(p.s();!(d=p.n()).done;){var v=d.value;MN&&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),MN&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(s),")")),YN(a,n)):(!r||r.score<a.score)&&(r=a)}return r}},{key:"stackToTree",value:function(e){return e.close(),vQ.build({buffer:SN.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=(NN||(NN=new WeakMap)).get(e);return t||NN.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}]),e}();function YN(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 VN=function(){function e(t,n,r){h(this,e),this.source=t,this.flags=n,this.disabled=r}return m(e,[{key:"allows",value:function(e){return!this.disabled||0==this.disabled[e]}}]),e}(),UN=function(e){return e},jN=m((function e(t){h(this,e),this.start=t.start,this.shift=t.shift||UN,this.reduce=t.reduce||UN,this.reuse=t.reuse||UN,this.hash=t.hash||function(){return 0},this.strict=!1!==t.strict})),WN=function(e){y(n,e);var t=k(n);function n(e){var r,i;if(h(this,n),(i=t.call(this)).wrappers=[],14!=e.version)throw new RangeError("Parser version (".concat(e.version,") doesn't match runtime version (",14,")"));var o=e.nodeNames.split(" ");i.minRepeatTerm=o.length;for(var a=0;a<e.repeatNodeCount;a++)o.push("");for(var s=Object.keys(e.topRules).map((function(t){return e.topRules[t][1]})),l=[],u=0;u<o.length;u++)l.push([]);function c(e,t,n){l[e].push([t,t.deserialize(String(n))])}if(e.nodeProps){var d,p=P(e.nodeProps);try{for(p.s();!(d=p.n()).done;){var v=d.value,m=v[0];"string"==typeof m&&(m=lQ[m]);for(var g=1;g<v.length;){var y=v[g++];if(y>=0)c(y,m,v[g++]);else{for(var O=v[g+-y],b=-y;b>0;b--)c(v[g++],m,O);g++}}}}catch(S){p.e(S)}finally{p.f()}}i.nodeSet=new hQ(o.map((function(t,n){return cQ.define({name:n>=i.minRepeatTerm?void 0:t,id:n,props:l[n],top:s.indexOf(n)>-1,error:0==n,skipped:e.skippedNodes&&e.skippedNodes.indexOf(n)>-1})}))),e.propSources&&(i.nodeSet=(r=i.nodeSet).extend.apply(r,f(e.propSources))),i.strict=!1,i.bufferLength=oQ;var w=xN(e.tokenData);i.context=e.context,i.specializerSpecs=e.specialized||[],i.specialized=new Uint16Array(i.specializerSpecs.length);for(var k=0;k<i.specializerSpecs.length;k++)i.specialized[k]=i.specializerSpecs[k].term;return i.specializers=i.specializerSpecs.map(XN),i.states=xN(e.states,Uint32Array),i.data=xN(e.stateData),i.goto=xN(e.goto),i.maxTerm=e.maxTerm,i.tokenizers=e.tokenizers.map((function(e){return"number"==typeof e?new QN(w,e):e})),i.topRules=e.topRules,i.dialects=e.dialects||{},i.dynamicPrecedences=e.dynamicPrecedences||null,i.tokenPrecTable=e.tokenPrec,i.termNames=e.termNames||null,i.maxNode=i.nodeSet.types.length-1,i.dialect=i.parseDialect(),i.top=i.topRules[Object.keys(i.topRules)[0]],i}return m(n,[{key:"createParse",value:function(e,t,n){var r,i=new IN(this,e,t,n),o=P(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 zN(n,o+2);break}i=n[o=zN(n,o+2)]}if(i==t||0==i)return zN(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){return!!this.allActions(e,(function(e){return e==t||null}))}},{key:"allActions",value:function(e,t){for(var n=this.stateSlot(e,4),r=n?t(n):void 0,i=this.stateSlot(e,1);null==r;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=zN(this.data,i+2)}r=t(zN(this.data,i+1))}return r}},{key:"nextStates",value:function(e){for(var t=this,n=[],r=function(e){if(65535==t.data[e]){if(1!=t.data[e+1])return i=e,1;e=zN(t.data,e+2)}if(0==(1&t.data[e+2])){var r=t.data[e+1];n.some((function(e,t){return 1&t&&e==r}))||n.push(t.data[e],r)}i=e},i=this.stateSlot(e,1);!r(i);i+=3);return 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,f(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.specializers&&(r.specializers=this.specializers.slice(),r.specializerSpecs=this.specializerSpecs.map((function(t,n){var i=e.specializers.find((function(e){return e.from==t.external}));if(!i)return t;var o=Object.assign(Object.assign({},t),{external:i.to});return r.specializers[n]=XN(o),o}))),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:"hasWrappers",value:function(){return this.wrappers.length>0}},{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=P(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 VN(e,n,s)}}],[{key:"deserialize",value:function(e){return new n(e)}}]),n}(AQ);function zN(e,t){return e[t]|e[t+1]<<16}function XN(e){if(e.external){var t=e.extend?1:0;return function(n,r){return e.external(n,r)<<1|t}}return e.get}var FN=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],BN=new jN({start:!1,shift:function(e,t){return 3==t||4==t||307==t?e:308==t},strict:!1}),qN=new $N((function(e,t){var n=e.next;(125==n||-1==n||t.context)&&e.acceptToken(305)}),{contextual:!0,fallback:!0}),HN=new $N((function(e,t){var n,r=e.next;FN.indexOf(r)>-1||(47!=r||47!=(n=e.peek(1))&&42!=n)&&(125==r||59==r||-1==r||t.context||e.acceptToken(304))}),{contextual:!0}),GN=new $N((function(e,t){var n=e.next;if((43==n||45==n)&&(e.advance(),n==e.next)){e.advance();var r=!t.context&&t.canShift(1);e.acceptToken(r?1:2)}}),{contextual:!0}),KN=IQ({"get set async static":sT.modifier,"for while do if else switch try catch finally return throw break continue default case":sT.controlKeyword,"in of await yield void typeof delete instanceof":sT.operatorKeyword,"let var const function class extends":sT.definitionKeyword,"import export from":sT.moduleKeyword,"with debugger as new":sT.keyword,TemplateString:sT.special(sT.string),super:sT.atom,BooleanLiteral:sT.bool,this:sT.self,null:sT.null,Star:sT.modifier,VariableName:sT.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":sT.function(sT.variableName),VariableDefinition:sT.definition(sT.variableName),Label:sT.labelName,PropertyName:sT.propertyName,PrivatePropertyName:sT.special(sT.propertyName),"CallExpression/MemberExpression/PropertyName":sT.function(sT.propertyName),"FunctionDeclaration/VariableDefinition":sT.function(sT.definition(sT.variableName)),"ClassDeclaration/VariableDefinition":sT.definition(sT.className),PropertyDefinition:sT.definition(sT.propertyName),PrivatePropertyDefinition:sT.definition(sT.special(sT.propertyName)),UpdateOp:sT.updateOperator,"LineComment Hashbang":sT.lineComment,BlockComment:sT.blockComment,Number:sT.number,String:sT.string,Escape:sT.escape,ArithOp:sT.arithmeticOperator,LogicOp:sT.logicOperator,BitOp:sT.bitwiseOperator,CompareOp:sT.compareOperator,RegExp:sT.regexp,Equals:sT.definitionOperator,Arrow:sT.function(sT.punctuation),": Spread":sT.punctuation,"( )":sT.paren,"[ ]":sT.squareBracket,"{ }":sT.brace,"InterpolationStart InterpolationEnd":sT.special(sT.brace),".":sT.derefOperator,", ;":sT.separator,"@":sT.meta,TypeName:sT.typeName,TypeDefinition:sT.definition(sT.typeName),"type enum interface implements namespace module declare":sT.definitionKeyword,"abstract global Privacy readonly override":sT.modifier,"is keyof unique infer":sT.operatorKeyword,JSXAttributeValue:sT.attributeValue,JSXText:sT.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":sT.angleBracket,"JSXIdentifier JSXNameSpacedName":sT.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":sT.attributeName,"JSXBuiltin/JSXIdentifier":sT.standard(sT.tagName)}),JN={__proto__:null,export:16,as:21,from:29,default:32,async:37,function:38,extends:48,this:52,true:60,false:60,null:72,void:76,typeof:80,super:98,new:132,delete:148,yield:157,await:161,class:166,public:223,private:223,protected:223,readonly:225,instanceof:244,satisfies:247,in:248,const:250,import:282,keyof:337,unique:341,infer:347,is:383,abstract:403,implements:405,type:407,let:410,var:412,using:415,interface:421,enum:425,namespace:431,module:433,declare:437,global:441,for:460,of:469,while:472,with:476,do:480,if:484,else:486,switch:490,case:496,try:502,catch:506,finally:510,return:514,throw:518,break:522,continue:526,debugger:530},eZ={__proto__:null,async:119,get:121,set:123,declare:183,public:185,private:185,protected:185,static:187,abstract:189,override:191,readonly:197,accessor:199,new:387},tZ={__proto__:null,"<":139},nZ=WN.deserialize({version:14,states:"$6zO%TQUOOO%[QUOOO'_QWOOP(lOSOOO*zQ(CjO'#CgO+ROpO'#ChO+aO!bO'#ChO+oO07`O'#D[O.QQUO'#DbO.bQUO'#DmO%[QUO'#DwO0fQUO'#EPOOQ(CY'#EX'#EXO1PQSO'#EUOOQO'#Ej'#EjOOQO'#Id'#IdO1XQSO'#GlO1dQSO'#EiO1iQSO'#EiO3kQ(CjO'#JeO6[Q(CjO'#JfO6xQSO'#FXO6}Q#tO'#FpOOQ(CY'#Fa'#FaO7YO&jO'#FaO7hQ,UO'#FwO9OQSO'#FvOOQ(CY'#Jf'#JfOOQ(CW'#Je'#JeO9TQSO'#GpOOQQ'#KQ'#KQO9`QSO'#IQO9eQ(C[O'#IROOQQ'#JR'#JROOQQ'#IV'#IVQ`QUOOO`QUOOO%[QUO'#DoO9mQUO'#D{O9tQUO'#D}O9ZQSO'#GlO9{Q,UO'#CmO:ZQSO'#EhO:fQSO'#EsO:kQ,UO'#F`O;YQSO'#GlOOQO'#KR'#KRO;_QSO'#KRO;mQSO'#GtO;mQSO'#GuO;mQSO'#GwO9ZQSO'#GzO<dQSO'#G}O={QSO'#CcO>]QSO'#HZO>eQSO'#HaO>eQSO'#HcO`QUO'#HeO>eQSO'#HgO>eQSO'#HjO>jQSO'#HpO>oQ(C]O'#HvO%[QUO'#HxO>zQ(C]O'#HzO?VQ(C]O'#H|O9eQ(C[O'#IOO?bQ(CjO'#CgO@dQWO'#DgQOQSOOO%[QUO'#D}O@zQSO'#EQO9{Q,UO'#EhOAVQSO'#EhOAbQ`O'#F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z-|2g2h5|Q1a,^Q1w,tQ5j1oQ7r5kT:}'O*{T#`W%aS#_W%aS'z#V(SS(P#Y*zS,y'O*{T-m'y-rT'T!e%bQ$kfR)o$pT)d$k)eR3`.pT*T$x*VR*]${Q0V+VQ2j.TQ4x0|Q6Q2nQ7^4{Q7}6PQ8j7]Q8|7|Q9]8lQ9e9OQ9j9^R9m9fnqOXst!Z#c%f&i&k&l&n,b,g1g1jQ&c!VR,V&`tmOXst!U!V!Z#c%f&`&i&k&l&n,b,g1g1jR,^&fT%em,^R0v+vR,U&^Q%||R+n%}R+d%wT&g!W&jT&h!W&jT1i,g1j",nodeNames:"\u26a0 ArithOp ArithOp LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:367,context:BN,nodeProps:[["group",-26,7,15,17,63,200,204,208,209,211,214,217,227,229,235,237,239,241,244,250,256,258,260,262,264,266,267,"Statement",-32,11,12,26,29,30,36,46,49,50,52,57,65,73,77,79,81,82,104,105,114,115,132,135,137,138,139,140,142,143,163,164,166,"Expression",-23,25,27,31,35,37,39,167,169,171,172,174,175,176,178,179,180,182,183,184,194,196,198,199,"Type",-3,85,97,103,"ClassItem"],["openedBy",32,"InterpolationStart",51,"[",55,"{",70,"(",144,"JSXStartTag",156,"JSXStartTag JSXStartCloseTag"],["closedBy",34,"InterpolationEnd",45,"]",56,"}",71,")",145,"JSXSelfCloseEndTag JSXEndTag",161,"JSXEndTag"]],propSources:[KN],skippedNodes:[0,3,4,270],repeatNodeCount:33,tokenData:"$Fl(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq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Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$AZ#BZ$ISEr$IS$I_$AZ$I_$JTEr$JT$JU$AZ$JU$KVEr$KV$KW$AZ$KW&FUEr&FU&FV$AZ&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AZ?HUOEr(CS$Dwk$e&j'yp'|!b'p(;d(W!LY'v&;d$X#tOY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[HN,GN,2,3,4,5,6,7,8,9,10,11,12,13,qN,new TN("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOr~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!P~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(V~~",141,328),new TN("j~RQYZXz{^~^O's~~aP!P!Qd~iO't~~",25,310)],topRules:{Script:[0,5],SingleExpression:[1,268],SingleClassItem:[2,269]},dialects:{jsx:12801,ts:12803},dynamicPrecedences:{67:1,77:1,79:1,164:1,192:1},specialized:[{term:314,get:function(e){return JN[e]||-1}},{term:330,get:function(e){return eZ[e]||-1}},{term:68,get:function(e){return tZ[e]||-1}}],tokenPrec:12827}),rZ=[xM("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),xM("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),xM("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),xM("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),xM("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),xM("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),xM("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),xM("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),xM("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),xM('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),xM('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],iZ=rZ.concat([xM("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),xM("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),xM("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),oZ=new _Q,aZ=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function sZ(e){return function(t,n){var r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}var lZ=["FunctionDeclaration"],uZ={FunctionDeclaration:sZ("function"),ClassDeclaration:sZ("class"),ClassExpression:function(){return!0},EnumDeclaration:sZ("constant"),TypeAliasDeclaration:sZ("type"),NamespaceDeclaration:sZ("namespace"),VariableDefinition:function(e,t){e.matchContext(lZ)||t(e,"variable")},TypeDefinition:function(e,t){t(e,"type")},__proto__:null};function cZ(e,t){var n=oZ.get(t);if(n)return n;var r=[],i=!0;function o(t,n){var i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(fQ.IncludeAnonymous).iterate((function(t){if(i)i=!1;else if(t.name){var n=uZ[t.name];if(n&&n(t,o)||aZ.has(t.name))return!1}else if(t.to-t.from>8192){var a,s=P(cZ(e,t.node));try{for(s.s();!(a=s.n()).done;){var l=a.value;r.push(l)}}catch(u){s.e(u)}finally{s.f()}return!1}})),oZ.set(t,r),r}var fZ=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,hZ=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function dZ(e){var t=pT(e.state).resolveInner(e.pos,-1);if(hZ.indexOf(t.name)>-1)return null;var n="VariableName"==t.name||t.to-t.from<20&&fZ.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;for(var r=[],i=t;i;i=i.parent)aZ.has(i.name)&&(r=r.concat(cZ(e.state.doc,i)));return{options:r,from:n?t.from:e.pos,validFor:fZ}}var pZ=dT.define({name:"javascript",parser:nZ.configure({props:[_T.add({IfStatement:IT({except:/^\s*({|else\b)/}),TryStatement:IT({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:function(e){return e.baseIndent},SwitchBody:function(e){var t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:DT({closing:"}"}),ArrowFunction:function(e){return e.baseIndent+e.unit},"TemplateString BlockComment":function(){return null},"Statement Property":IT({except:/^{/}),JSXElement:function(e){var t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape:function(e){var t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":function(e){return e.column(e.node.from)+e.unit}}),VT.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":function(e){var t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null},BlockComment:function(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),vZ={test:function(e){return/^JSX/.test(e.name)},facet:uT({commentTokens:{block:{open:"{/*",close:"*/}"}}})},mZ=pZ.configure({dialect:"ts"},"typescript"),gZ=pZ.configure({dialect:"jsx",props:[cT.add((function(e){return e.isTop?[vZ]:void 0}))]}),yZ=pZ.configure({dialect:"jsx ts",props:[cT.add((function(e){return e.isTop?[vZ]:void 0}))]},"typescript"),OZ=function(e){return{label:e,type:"keyword"}},bZ="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(OZ),wZ=bZ.concat(["declare","implements","private","protected","public"].map(OZ));function kZ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.jsx?e.typescript?yZ:gZ:e.typescript?mZ:pZ,n=e.typescript?iZ.concat(wZ):rZ.concat(bZ);return new xT(t,[pZ.data.of({autocomplete:$A(hZ,TA(n))}),pZ.data.of({autocomplete:dZ}),e.jsx?CZ:[]])}function SZ(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=null===t||void 0===t?void 0:t.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return e.sliceString(r.from,Math.min(r.to,n));return""}var xZ="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),CZ=vP.inputHandler.of((function(e,t,n,r,i){if((xZ?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!pZ.isActiveAt(e.state,t,-1))return!1;var o=i(),a=o.state,s=a.changeByRange((function(e){var t,n,i=e.head,o=pT(a).resolveInner(i-1,-1);if("JSXStartTag"==o.name&&(o=o.parent),a.doc.sliceString(i-1,i)!=r||"JSXAttributeValue"==o.name&&o.to>i);else{if(">"==r&&"JSXFragmentTag"==o.name)return{range:e,changes:{from:i,insert:"</>"}};if("/"==r&&"JSXStartCloseTag"==o.name){var s=o.parent,l=s.parent;if(l&&s.from==i-2&&((n=SZ(a.doc,l.firstChild,i))||"JSXFragmentTag"==(null===(t=l.firstChild)||void 0===t?void 0:t.name))){var u="".concat(n,">");return{range:sw.cursor(i+u.length,-1),changes:{from:i,insert:u}}}}else if(">"==r){var c=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(o);if(c&&!/^\/?>|^<\//.test(a.doc.sliceString(i,i+2))&&(n=SZ(a.doc,c,i)))return{range:e,changes:{from:i,insert:"</".concat(n,">")}}}}return{range:e}}));return!s.changes.empty&&(e.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));var PZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"},EZ=function(e,n){return t.createElement(zg,tt(tt({},e),{},{ref:n,icon:PZ}))};EZ.displayName="MenuUnfoldOutlined";var QZ=t.forwardRef(EZ),TZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"},$Z=function(e,n){return t.createElement(zg,tt(tt({},e),{},{ref:n,icon:TZ}))};$Z.displayName="MenuFoldOutlined";var _Z,RZ=t.forwardRef($Z),AZ=0,MZ={};function NZ(e){var t=AZ++,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return MZ[t]=Wc((function r(){(n-=1)<=0?(e(),delete MZ[t]):MZ[t]=Wc(r)})),t}function ZZ(e){return!e||null===e.offsetParent||e.hidden}NZ.cancel=function(e){void 0!==e&&(Wc.cancel(MZ[e]),delete MZ[e])},NZ.ids=MZ;var DZ=function(e){y(r,e);var n=k(r);function r(){var e;return h(this,r),(e=n.apply(this,arguments)).containerRef=t.createRef(),e.animationStart=!1,e.destroyed=!1,e.onClick=function(t,n){var r,i,o=e.props,a=o.insertExtraNode;if(!o.disabled&&t&&!ZZ(t)&&!t.className.includes("-leave")){e.extraNode=document.createElement("div");var s=w(e).extraNode,l=e.context.getPrefixCls;s.className="".concat(l(""),"-click-animating-node");var u=e.getAttributeName();if(t.setAttribute(u,"true"),n&&"#fff"!==n&&"#ffffff"!==n&&"rgb(255, 255, 255)"!==n&&"rgba(255, 255, 255, 1)"!==n&&function(e){var t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!(t&&t[1]&&t[2]&&t[3])||!(t[1]===t[2]&&t[2]===t[3])}(n)&&!/rgba\((?:\d*, ){3}0\)/.test(n)&&"transparent"!==n){s.style.borderColor=n;var c=(null===(r=t.getRootNode)||void 0===r?void 0:r.call(t))||t.ownerDocument,f=null!==(i=function(e){return e instanceof Document?e.body:Array.from(e.childNodes).find((function(e){return(null===e||void 0===e?void 0:e.nodeType)===Node.ELEMENT_NODE}))}(c))&&void 0!==i?i:c;_Z=$g("\n [".concat(l(""),"-click-animating-without-extra-node='true']::after, .").concat(l(""),"-click-animating-node {\n --antd-wave-shadow-color: ").concat(n,";\n }"),"antd-wave",{csp:e.csp,attachTo:f})}a&&t.appendChild(s),["transition","animation"].forEach((function(n){t.addEventListener("".concat(n,"start"),e.onTransitionStart),t.addEventListener("".concat(n,"end"),e.onTransitionEnd)}))}},e.onTransitionStart=function(t){if(!e.destroyed){var n=e.containerRef.current;t&&t.target===n&&!e.animationStart&&e.resetEffect(n)}},e.onTransitionEnd=function(t){t&&"fadeEffect"===t.animationName&&e.resetEffect(t.target)},e.bindAnimationEvent=function(t){if(t&&t.getAttribute&&!t.getAttribute("disabled")&&!t.className.includes("disabled")){var n=function(n){if("INPUT"!==n.target.tagName&&!ZZ(n.target)){e.resetEffect(t);var r=getComputedStyle(t).getPropertyValue("border-top-color")||getComputedStyle(t).getPropertyValue("border-color")||getComputedStyle(t).getPropertyValue("background-color");e.clickWaveTimeoutId=window.setTimeout((function(){return e.onClick(t,r)}),0),NZ.cancel(e.animationStartId),e.animationStart=!0,e.animationStartId=NZ((function(){e.animationStart=!1}),10)}};return t.addEventListener("click",n,!0),{cancel:function(){t.removeEventListener("click",n,!0)}}}},e.renderWave=function(n){var r=n.csp,i=e.props.children;if(e.csp=r,!t.isValidElement(i))return i;var o=e.containerRef;return Bu(i)&&(o=Xu(i.ref,e.containerRef)),jO(i,{ref:o})},e}return m(r,[{key:"componentDidMount",value:function(){this.destroyed=!1;var e=this.containerRef.current;e&&1===e.nodeType&&(this.instance=this.bindAnimationEvent(e))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var e=this.context.getPrefixCls,t=this.props.insertExtraNode;return"".concat(e(""),t?"-click-animating":"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(e){var t=this;if(e&&e!==this.extraNode&&e instanceof Element){var n=this.props.insertExtraNode,r=this.getAttributeName();e.setAttribute(r,"false"),_Z&&(_Z.innerHTML=""),n&&this.extraNode&&e.contains(this.extraNode)&&e.removeChild(this.extraNode),["transition","animation"].forEach((function(n){e.removeEventListener("".concat(n,"start"),t.onTransitionStart),e.removeEventListener("".concat(n,"end"),t.onTransitionEnd)}))}}},{key:"render",value:function(){return t.createElement(tv,null,this.renderWave)}}]),r}(t.Component);DZ.contextType=ev;var LZ=DZ,IZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},YZ=t.createContext(void 0),VZ=function(e){var n,r=t.useContext(ev),i=r.getPrefixCls,o=r.direction,a=e.prefixCls,s=e.size,l=e.className,u=IZ(e,["prefixCls","size","className"]),c=i("btn-group",a),f="";switch(s){case"large":f="lg";break;case"small":f="sm"}var h=Su()(c,(Je(n={},"".concat(c,"-").concat(f),f),Je(n,"".concat(c,"-rtl"),"rtl"===o),n),l);return t.createElement(YZ.Provider,{value:s},t.createElement("div",wu({},u,{className:h})))},UZ=function(){return{width:0,opacity:0,transform:"scale(0)"}},jZ=function(e){return{width:e.scrollWidth,opacity:1,transform:"scale(1)"}},WZ=function(e){var n=e.prefixCls,r=!!e.loading;return e.existIcon?t.createElement("span",{className:"".concat(n,"-loading-icon")},t.createElement(oy,null)):t.createElement(yh,{visible:r,motionName:"".concat(n,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:UZ,onAppearActive:jZ,onEnterStart:UZ,onEnterActive:jZ,onLeaveStart:jZ,onLeaveActive:UZ},(function(e,r){var i=e.className,o=e.style;return t.createElement("span",{className:"".concat(n,"-loading-icon"),style:o,ref:r},t.createElement(oy,{className:i}))}))},zZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},XZ=/^[\u4e00-\u9fa5]{2}$/,FZ=XZ.test.bind(XZ);function BZ(e){return"text"===e||"link"===e}function qZ(e,n){var r=!1,i=[];return t.Children.forEach(e,(function(e){var t=d(e),n="string"===t||"number"===t;if(r&&n){var o=i.length-1,a=i[o];i[o]="".concat(a).concat(e)}else i.push(e);r=n})),t.Children.map(i,(function(e){return function(e,n){if(null!==e&&void 0!==e){var r=n?" ":"";return"string"!==typeof e&&"number"!==typeof e&&"string"===typeof e.type&&FZ(e.props.children)?jO(e,{children:e.props.children.split("").join(r)}):"string"===typeof e?FZ(e)?t.createElement("span",null,e.split("").join(r)):t.createElement("span",null,e):UO(e)?t.createElement("span",null,e):e}}(e,n)}))}Nm("default","primary","ghost","dashed","link","text"),Nm("default","circle","round"),Nm("submit","button","reset");var HZ=function(e,n){var r,i=e.loading,o=void 0!==i&&i,a=e.prefixCls,s=e.type,l=void 0===s?"default":s,c=e.danger,f=e.shape,h=void 0===f?"default":f,d=e.size,p=e.disabled,v=e.className,m=e.children,g=e.icon,y=e.ghost,O=void 0!==y&&y,b=e.block,w=void 0!==b&&b,k=e.htmlType,S=void 0===k?"button":k,x=zZ(e,["loading","prefixCls","type","danger","shape","size","disabled","className","children","icon","ghost","block","htmlType"]),C=t.useContext(Ov),P=t.useContext(gv),E=null!==p&&void 0!==p?p:P,Q=t.useContext(YZ),T=u(t.useState(!!o),2),$=T[0],_=T[1],R=u(t.useState(!1),2),A=R[0],M=R[1],N=t.useContext(ev),Z=N.getPrefixCls,D=N.autoInsertSpaceInButton,L=N.direction,I=n||t.createRef(),Y=function(){return 1===t.Children.count(m)&&!g&&!BZ(l)},V="boolean"===typeof o?o:(null===o||void 0===o?void 0:o.delay)||!0;t.useEffect((function(){var e=null;return"number"===typeof V?e=window.setTimeout((function(){e=null,_(V)}),V):_(V),function(){e&&(window.clearTimeout(e),e=null)}}),[V]),t.useEffect((function(){if(I&&I.current&&!1!==D){var e=I.current.textContent;Y()&&FZ(e)?A||M(!0):A&&M(!1)}}),[I]);var U=function(t){var n=e.onClick;$||E?t.preventDefault():null===n||void 0===n||n(t)},j=Z("btn",a),W=!1!==D,z=cy(j,L),X=z.compactSize,F=z.compactItemClassnames,B=X||Q||d||C,q=B&&{large:"lg",small:"sm",middle:void 0}[B]||"",H=$?"loading":g,G=gp(x,["navigate"]),K=Su()(j,(Je(r={},"".concat(j,"-").concat(h),"default"!==h&&h),Je(r,"".concat(j,"-").concat(l),l),Je(r,"".concat(j,"-").concat(q),q),Je(r,"".concat(j,"-icon-only"),!m&&0!==m&&!!H),Je(r,"".concat(j,"-background-ghost"),O&&!BZ(l)),Je(r,"".concat(j,"-loading"),$),Je(r,"".concat(j,"-two-chinese-chars"),A&&W&&!$),Je(r,"".concat(j,"-block"),w),Je(r,"".concat(j,"-dangerous"),!!c),Je(r,"".concat(j,"-rtl"),"rtl"===L),Je(r,"".concat(j,"-disabled"),void 0!==G.href&&E),r),F,v),J=g&&!$?g:t.createElement(WZ,{existIcon:!!g,prefixCls:j,loading:!!$}),ee=m||0===m?qZ(m,Y()&&W):null;if(void 0!==G.href)return t.createElement("a",wu({},G,{className:K,onClick:U,ref:I}),J,ee);var te=t.createElement("button",wu({},x,{type:S,className:K,onClick:U,disabled:E,ref:I}),J,ee);return BZ(l)?te:t.createElement(LZ,{disabled:!!$},te)},GZ=t.forwardRef(HZ);GZ.Group=VZ,GZ.__ANT_BUTTON=!0;var KZ=GZ,JZ=0;var eD=function(){var e=u((0,t.useState)(),2),n=e[0],r=e[1],i=(0,t.useRef)(!1),o=(0,t.useRef)(null),a=(0,t.useRef)(),s=(0,t.useRef)(),l=yu(kb),c=yu(wb),f=u(Ou(Sb),2),h=f[0],d=f[1],p=function(e){var t=Gw.create({doc:e,extensions:[mN,SP.of([wR]),jM(),ON,kZ()]}),n=document.querySelector("#htmlEdit");a.current?a.current.setState(t):a.current=new vP({state:t,parent:n})},v=function(){var e,t=document.querySelector("#preview");t.innerHTML="",s.current=document.createElement("iframe"),t.appendChild(s.current);var n,r,i,o=null===(e=a.current)||void 0===e?void 0:e.state.doc.toString();o&&(null===(n=s.current.contentWindow)||void 0===n||n.document.open(),null===(r=s.current.contentWindow)||void 0===r||r.document.write(o),null===(i=s.current.contentWindow)||void 0===i||i.document.close())},m=function(e){if(i.current){var t=e.clientX;if(s.current&&e.view===s.current.contentWindow)t+=s.current.getBoundingClientRect().x;var n=t-JZ,r=o.current;r.style.width="".concat(r.offsetWidth+n,"px"),JZ=t}},g=function(){i.current=!1};return(0,t.useEffect)((function(){return document.addEventListener("mousemove",m),document.addEventListener("mouseup",g),function(){document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)}}),[]),(0,t.useEffect)((function(){if(s.current)return s.current.onload=function(){var e,t,n,r;null===(e=s.current)||void 0===e||null===(t=e.contentWindow)||void 0===t||t.addEventListener("mousemove",m),null===(n=s.current)||void 0===n||null===(r=n.contentWindow)||void 0===r||r.addEventListener("mouseup",g)},function(){var e,t,n,r;null===(e=s.current)||void 0===e||null===(t=e.contentWindow)||void 0===t||t.removeEventListener("mousemove",m),null===(n=s.current)||void 0===n||null===(r=n.contentWindow)||void 0===r||r.removeEventListener("mouseup",g)}}),[s.current]),(0,t.useEffect)((function(){!function(e){e&&fetch(e,{mode:"cors"}).then((function(e){return e.text()})).then((function(e){p(e),r(e),v()}))}(l)}),[l]),(0,xb.jsxs)("div",{className:"code-editor",children:[(0,xb.jsxs)("div",{className:"code-box",ref:o,children:[(0,xb.jsxs)("div",{className:"control",children:[(0,xb.jsx)(KZ,{type:"primary",onClick:function(){d(!h)},style:{height:"100%",marginRight:16},children:h?(0,xb.jsx)(RZ,{}):(0,xb.jsx)(QZ,{})}),(0,xb.jsx)("span",{id:"resetCode",className:"btn",onClick:function(){n&&(p(n),v())},children:"\u5237\u65b0"}),(0,xb.jsx)("span",{id:"runCode",className:"btn",onClick:v,children:"\u8fd0\u884c"}),(0,xb.jsx)("span",{className:"code-title",children:c})]}),(0,xb.jsx)("div",{id:"htmlEdit",className:"editor-box"})]}),(0,xb.jsx)("div",{className:"splitter",onMouseDown:function(e){e.preventDefault(),i.current=!0,JZ=e.clientX}}),(0,xb.jsx)("div",{className:"view-box",id:"preview"})]})};var tD=function(){var e=u((0,t.useState)([]),2),n=e[0],r=e[1];return(0,t.useEffect)((function(){fetch("./config.json").then((function(e){return e.json()})).then((function(e){r(e)}))}),[]),(0,xb.jsxs)("div",{className:"demo",children:[(0,xb.jsx)("div",{className:"menu",children:(0,xb.jsx)(Pb,{menus:n})}),(0,xb.jsx)("div",{className:"content",children:(0,xb.jsx)(eD,{})}),(0,xb.jsxs)("div",{className:"links",children:[(0,xb.jsx)("a",{href:"https://pattern-x.github.io/gemini-viewer-examples/",children:"Examples"}),"\xa0|\xa0",(0,xb.jsx)("a",{href:"https://github.com/pattern-x/gemini-viewer-examples",children:"Github repo"})]})]})};var nD=function(){var e=u((0,t.useState)(!0),2),n=e[0],r=e[1],i=u((0,t.useState)(""),2),o=i[0],a=i[1],s=u((0,t.useState)([]),2),l=s[0],c=s[1],f=u((0,t.useState)([]),2),h=f[0],d=f[1],p=(0,t.useRef)(),v=function(){var e=t.useContext(ve).matches,n=e[e.length-1];return n?n.params:{}}().id,m=function(e){e&&fetch(e,{mode:"cors"}).then((function(e){return e.text()})).then((function(e){!function(e){var t=document.querySelector("#preview");if(t.innerHTML="",p.current=document.createElement("iframe"),t.appendChild(p.current),e){var n,r=null===(n=p.current.contentWindow)||void 0===n?void 0:n.document;r&&(r.open(),r.write(e),r.close())}}(e)}))};return(0,t.useEffect)((function(){fetch("./config.json").then((function(e){return e.json()})).then((function(e){var t=[];e.forEach((function(e){t.push(e.title)})),c(t),d(e)}))}),[]),(0,t.useEffect)((function(){if(v){var e=v.split("_").join(" ");h.forEach((function(t){t.subMenus.forEach((function(t){t.title===e&&(m(t.url),a(t.title))}))}))}}),[v,h]),(0,xb.jsxs)("div",{className:"examples",children:[(0,xb.jsx)("button",{className:"index-button".concat(n?" open":""),onClick:function(){r(!n)},children:n?(0,xb.jsx)(RZ,{}):(0,xb.jsx)(QZ,{})}),(0,xb.jsx)("div",{className:"page-title".concat(n?" open":""),children:o}),(0,xb.jsx)("div",{className:"content-container".concat(n?" open":""),id:"preview"}),(0,xb.jsxs)("div",{className:"menu".concat(n?" open":""),children:[(0,xb.jsxs)("div",{id:"index",children:[(0,xb.jsx)("h1",{children:"Examples"}),(0,xb.jsxs)("div",{children:[(0,xb.jsx)("h2",{children:"Index"}),(0,xb.jsx)("hr",{}),l.map((function(e,t){return(0,xb.jsx)("div",{className:"link",onClick:function(){return function(e){var t=document.getElementById(e.split(" ").join("_"));null===t||void 0===t||t.scrollIntoView()}(e)},children:"".concat(t,"....").concat(e)},"".concat(e,"-").concat(t))})),(0,xb.jsx)("hr",{}),h.map((function(e,t){return(0,xb.jsxs)("div",{children:[(0,xb.jsx)("h2",{id:e.title.split(" ").join("_"),children:"".concat(t,".").concat(e.title)}),(0,xb.jsx)("hr",{}),e.subMenus.map((function(e,t){return(0,xb.jsx)("div",{className:"link",children:(0,xb.jsx)(Xe,{to:"".concat(e.title.split(" ").join("_")),children:e.title})},"".concat(e.title,"_").concat(t))}))]},"".concat(e.title,"_").concat(t))}))]})]}),(0,xb.jsxs)("div",{className:"links",children:[(0,xb.jsx)("a",{href:"https://pattern-x.github.io/gemini-viewer-examples/#/demo/",children:"Demos"}),"\xa0|\xa0",(0,xb.jsx)("a",{href:"https://github.com/pattern-x/gemini-viewer-examples",children:"Github repo"})]})]})]})},rD=function(){return(0,xb.jsx)(mu,{children:(0,xb.jsxs)(Ne,{children:[(0,xb.jsx)(Ae,{path:"/",element:(0,xb.jsx)(nD,{}),children:(0,xb.jsx)(Ae,{path:":id",element:(0,xb.jsx)(nD,{})})}),(0,xb.jsx)(Ae,{path:"/demo",element:(0,xb.jsx)(tD,{})})]})})},iD=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).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)}))};i.createRoot(document.getElementById("root")).render((0,xb.jsx)(t.StrictMode,{children:(0,xb.jsx)(je,{basename:"/",children:(0,xb.jsx)(rD,{})})})),iD()}()}();
//# sourceMappingURL=main.abd1e4ad.js.map