You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
278 KiB
34 lines
278 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[7046],{98280:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return Xo}});function L(f){"@babel/helpers - typeof";return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},L(f)}function F(f,d){if(L(f)!="object"||!f)return f;var c=f[Symbol.toPrimitive];if(c!==void 0){var m=c.call(f,d||"default");if(L(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(f)}function Z(f){var d=F(f,"string");return L(d)=="symbol"?d:d+""}function re(f,d,c){return(d=Z(d))in f?Object.defineProperty(f,d,{value:c,enumerable:!0,configurable:!0,writable:!0}):f[d]=c,f}function T(f,d){var c=Object.keys(f);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(f);d&&(m=m.filter(function(P){return Object.getOwnPropertyDescriptor(f,P).enumerable})),c.push.apply(c,m)}return c}function k(f){for(var d=1;d<arguments.length;d++){var c=arguments[d]!=null?arguments[d]:{};d%2?T(Object(c),!0).forEach(function(m){re(f,m,c[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(c)):T(Object(c)).forEach(function(m){Object.defineProperty(f,m,Object.getOwnPropertyDescriptor(c,m))})}return f}function g(f){if(Array.isArray(f))return f}function Re(f,d){var c=f==null?null:typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(c!=null){var m,P,Y,le,We=[],Se=!0,nt=!1;try{if(Y=(c=c.call(f)).next,d===0){if(Object(c)!==c)return;Se=!1}else for(;!(Se=(m=Y.call(c)).done)&&(We.push(m.value),We.length!==d);Se=!0);}catch(se){nt=!0,P=se}finally{try{if(!Se&&c.return!=null&&(le=c.return(),Object(le)!==le))return}finally{if(nt)throw P}}return We}}function A(f,d){(d==null||d>f.length)&&(d=f.length);for(var c=0,m=Array(d);c<d;c++)m[c]=f[c];return m}function W(f,d){if(f){if(typeof f=="string")return A(f,d);var c={}.toString.call(f).slice(8,-1);return c==="Object"&&f.constructor&&(c=f.constructor.name),c==="Map"||c==="Set"?Array.from(f):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?A(f,d):void 0}}function fe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X(f,d){return g(f)||Re(f,d)||W(f,d)||fe()}function Me(f,d){if(f==null)return{};var c={};for(var m in f)if({}.hasOwnProperty.call(f,m)){if(d.indexOf(m)!==-1)continue;c[m]=f[m]}return c}function q(f,d){if(f==null)return{};var c,m,P=Me(f,d);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(f);for(m=0;m<Y.length;m++)c=Y[m],d.indexOf(c)===-1&&{}.propertyIsEnumerable.call(f,c)&&(P[c]=f[c])}return P}function De(f){if(Array.isArray(f))return f}function ie(f,d){var c=f==null?null:typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(c!=null){var m,P,Y,le,We=[],Se=!0,nt=!1;try{if(Y=(c=c.call(f)).next,d===0){if(Object(c)!==c)return;Se=!1}else for(;!(Se=(m=Y.call(c)).done)&&(We.push(m.value),We.length!==d);Se=!0);}catch(se){nt=!0,P=se}finally{try{if(!Se&&c.return!=null&&(le=c.return(),Object(le)!==le))return}finally{if(nt)throw P}}return We}}function C(f,d){(d==null||d>f.length)&&(d=f.length);for(var c=0,m=new Array(d);c<d;c++)m[c]=f[c];return m}function Ne(f,d){if(f){if(typeof f=="string")return C(f,d);var c=Object.prototype.toString.call(f).slice(8,-1);if(c==="Object"&&f.constructor&&(c=f.constructor.name),c==="Map"||c==="Set")return Array.from(f);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return C(f,d)}}function ot(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J(f,d){return De(f)||ie(f,d)||Ne(f,d)||ot()}var w=p(67294),z=p.t(w,2),he=p(73935);function be(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var He={};function _(f,d){}function B(f,d){}function Ge(){He={}}function $e(f,d,c){!d&&!He[c]&&(f(!1,c),He[c]=!0)}function x(f,d){$e(_,f,d)}function E(f,d){$e(B,f,d)}var R=null;function G(f){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},G(f)}var oe=p(81640);function Qe(f,d,c){var m=w.useRef({});return(!("value"in m.current)||c(m.current.condition,d))&&(m.current.value=f(),m.current.condition=d),m.current.value}function Ue(f,d){typeof f=="function"?f(d):G(f)==="object"&&f&&"current"in f&&(f.current=d)}function Fe(){for(var f=arguments.length,d=new Array(f),c=0;c<f;c++)d[c]=arguments[c];var m=d.filter(function(P){return P});return m.length<=1?m[0]:function(P){d.forEach(function(Y){Ue(Y,P)})}}function Be(){for(var f=arguments.length,d=new Array(f),c=0;c<f;c++)d[c]=arguments[c];return Qe(function(){return Fe.apply(void 0,d)},d,function(m,P){return m.length===P.length&&m.every(function(Y,le){return Y===P[le]})})}function Ce(f){var d,c,m=(0,oe.isMemo)(f)?f.type.type:f.type;return!(typeof m=="function"&&!((d=m.prototype)!==null&&d!==void 0&&d.render)||typeof f=="function"&&!((c=f.prototype)!==null&&c!==void 0&&c.render))}var Ot=w.createContext(null),Nt=Ot;function Je(f){if(Array.isArray(f))return C(f)}function yt(f){if(typeof Symbol!="undefined"&&f[Symbol.iterator]!=null||f["@@iterator"]!=null)return Array.from(f)}function st(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gt(f){return Je(f)||yt(f)||Ne(f)||st()}var ct=be()?w.useLayoutEffect:w.useEffect,bt=ct,qe=function(d,c){var m=React.useRef(!0);ct(function(){if(!m.current)return d()},c),ct(function(){return m.current=!1,function(){m.current=!0}},[])},er=[];function ar(f,d){var c=w.useState(function(){if(!be())return null;var Ie=document.createElement("div");return Ie}),m=J(c,1),P=m[0],Y=w.useRef(!1),le=w.useContext(Nt),We=w.useState(er),Se=J(We,2),nt=Se[0],se=Se[1],te=le||(Y.current?void 0:function(Ie){se(function(fr){var xt=[Ie].concat(Gt(fr));return xt})});function Oe(){P.parentElement||document.body.appendChild(P),Y.current=!0}function we(){var Ie;(Ie=P.parentElement)===null||Ie===void 0||Ie.removeChild(P),Y.current=!1}return bt(function(){return f?le?le(Oe):Oe():we(),we},[f]),bt(function(){nt.length&&(nt.forEach(function(Ie){return Ie()}),se(er))},[nt]),[P,te]}function lr(f,d){if(!f)return!1;if(f.contains)return f.contains(d);for(var c=d;c;){if(c===f)return!0;c=c.parentNode}return!1}var Tt="data-rc-order",mt="rc-util-key",wt=new Map;function Et(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=f.mark;return d?d.startsWith("data-")?d:"data-".concat(d):mt}function _t(f){if(f.attachTo)return f.attachTo;var d=document.querySelector("head");return d||document.body}function Ft(f){return f==="queue"?"prependQueue":f?"prepend":"append"}function Rt(f){return Array.from((wt.get(f)||f).children).filter(function(d){return d.tagName==="STYLE"})}function Wt(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!be())return null;var c=d.csp,m=d.prepend,P=document.createElement("style");P.setAttribute(Tt,Ft(m)),c!=null&&c.nonce&&(P.nonce=c==null?void 0:c.nonce),P.innerHTML=f;var Y=_t(d),le=Y.firstChild;if(m){if(m==="queue"){var We=Rt(Y).filter(function(Se){return["prepend","prependQueue"].includes(Se.getAttribute(Tt))});if(We.length)return Y.insertBefore(P,We[We.length-1].nextSibling),P}Y.insertBefore(P,le)}else Y.appendChild(P);return P}function tr(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=_t(d);return Rt(c).find(function(m){return m.getAttribute(Et(d))===f})}function pr(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=tr(f,d);if(c){var m=_t(d);m.removeChild(c)}}function Rr(f,d){var c=wt.get(f);if(!c||!lr(document,c)){var m=Wt("",d),P=m.parentNode;wt.set(f,P),f.removeChild(m)}}function gr(){wt.clear()}function qn(f,d){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m=_t(c);Rr(m,c);var P=tr(d,c);if(P){var Y,le;if((Y=c.csp)!==null&&Y!==void 0&&Y.nonce&&P.nonce!==((le=c.csp)===null||le===void 0?void 0:le.nonce)){var We;P.nonce=(We=c.csp)===null||We===void 0?void 0:We.nonce}return P.innerHTML!==f&&(P.innerHTML=f),P}var Se=Wt(f,c);return Se.setAttribute(Et(c),d),Se}var Lt;function Fr(f){if(typeof document=="undefined")return 0;if(f||Lt===void 0){var d=document.createElement("div");d.style.width="100%",d.style.height="200px";var c=document.createElement("div"),m=c.style;m.position="absolute",m.top="0",m.left="0",m.pointerEvents="none",m.visibility="hidden",m.width="200px",m.height="150px",m.overflow="hidden",c.appendChild(d),document.body.appendChild(c);var P=d.offsetWidth;c.style.overflow="scroll";var Y=d.offsetWidth;P===Y&&(Y=c.clientWidth),document.body.removeChild(c),Lt=P-Y}return Lt}function me(f){var d=f.match(/^(.*)px$/),c=Number(d==null?void 0:d[1]);return Number.isNaN(c)?Fr():c}function un(f){if(typeof document=="undefined"||!f||!(f instanceof Element))return{width:0,height:0};var d=getComputedStyle(f,"::-webkit-scrollbar"),c=d.width,m=d.height;return{width:me(c),height:me(m)}}function ce(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var ee="rc-util-locker-".concat(Date.now()),ne=0;function ke(f){var d=!!f,c=w.useState(function(){return ne+=1,"".concat(ee,"_").concat(ne)}),m=J(c,1),P=m[0];bt(function(){if(d){var Y=un(document.body).width,le=ce();qn(`
|
|
html body {
|
|
overflow-y: hidden;
|
|
`.concat(le?"width: calc(100% - ".concat(Y,"px);"):"",`
|
|
}`),P)}else pr(P);return function(){pr(P)}},[d,P])}var Pe=!1;function pt(f){return typeof f=="boolean"&&(Pe=f),Pe}var je=function(d){return d===!1?!1:!be()||!d?null:typeof d=="string"?document.querySelector(d):typeof d=="function"?d():d},It=w.forwardRef(function(f,d){var c=f.open,m=f.autoLock,P=f.getContainer,Y=f.debug,le=f.autoDestroy,We=le===void 0?!0:le,Se=f.children,nt=w.useState(c),se=J(nt,2),te=se[0],Oe=se[1],we=te||c;w.useEffect(function(){(We||c)&&Oe(c)},[c,We]);var Ie=w.useState(function(){return je(P)}),fr=J(Ie,2),xt=fr[0],nr=fr[1];w.useEffect(function(){var Ur=je(P);nr(Ur!=null?Ur:null)});var yr=ar(we&&!xt,Y),At=J(yr,2),ir=At[0],or=At[1],ft=xt!=null?xt:ir;ke(m&&c&&be()&&(ft===ir||ft===document.body));var Zn=null;if(Se&&Ce(Se)&&d){var ni=Se;Zn=ni.ref}var Wn=Be(Zn,d);if(!we||!be()||xt===void 0)return null;var _n=ft===!1||pt(),Un=Se;return d&&(Un=w.cloneElement(Se,{ref:Wn})),w.createElement(Nt.Provider,{value:or},_n?Un:(0,he.createPortal)(Un,ft))}),Vt=It,ut=Vt,Ct=p(94184),_e=p.n(Ct),ze=p(48555);function et(f){return f instanceof HTMLElement||f instanceof SVGElement}function jt(f){return f&&_typeof(f)==="object"&&et(f.nativeElement)?f.nativeElement:et(f)?f:null}function dr(f){var d=jt(f);if(d)return d;if(f instanceof React.Component){var c;return(c=ReactDOM.findDOMNode)===null||c===void 0?void 0:c.call(ReactDOM,f)}return null}function sr(f){var d;return f==null||(d=f.getRootNode)===null||d===void 0?void 0:d.call(f)}function b(f){return sr(f)instanceof ShadowRoot}function O(f){return b(f)?sr(f):null}function D(f){var d=w.useRef();d.current=f;var c=w.useCallback(function(){for(var m,P=arguments.length,Y=new Array(P),le=0;le<P;le++)Y[le]=arguments[le];return(m=d.current)===null||m===void 0?void 0:m.call.apply(m,[d].concat(Y))},[]);return c}function H(f){if(Array.isArray(f))return f}function ae(f,d){var c=f==null?null:typeof Symbol!="undefined"&&f[Symbol.iterator]||f["@@iterator"];if(c!=null){var m,P,Y,le,We=[],Se=!0,nt=!1;try{if(Y=(c=c.call(f)).next,d===0){if(Object(c)!==c)return;Se=!1}else for(;!(Se=(m=Y.call(c)).done)&&(We.push(m.value),We.length!==d);Se=!0);}catch(se){nt=!0,P=se}finally{try{if(!Se&&c.return!=null&&(le=c.return(),Object(le)!==le))return}finally{if(nt)throw P}}return We}}function j(f,d){(d==null||d>f.length)&&(d=f.length);for(var c=0,m=new Array(d);c<d;c++)m[c]=f[c];return m}function V(f,d){if(f){if(typeof f=="string")return j(f,d);var c=Object.prototype.toString.call(f).slice(8,-1);if(c==="Object"&&f.constructor&&(c=f.constructor.name),c==="Map"||c==="Set")return Array.from(f);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return j(f,d)}}function Te(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tt(f,d){return H(f)||ae(f,d)||V(f,d)||Te()}function Ke(f){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},Ke(f)}function ge(f,d){if(Ke(f)!=="object"||f===null)return f;var c=f[Symbol.toPrimitive];if(c!==void 0){var m=c.call(f,d||"default");if(Ke(m)!=="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(f)}function ve(f){var d=ge(f,"string");return Ke(d)==="symbol"?d:String(d)}function Ye(f,d,c){return d=ve(d),d in f?Object.defineProperty(f,d,{value:c,enumerable:!0,configurable:!0,writable:!0}):f[d]=c,f}function ye(f,d){var c=Object.keys(f);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(f);d&&(m=m.filter(function(P){return Object.getOwnPropertyDescriptor(f,P).enumerable})),c.push.apply(c,m)}return c}function Xe(f){for(var d=1;d<arguments.length;d++){var c=arguments[d]!=null?arguments[d]:{};d%2?ye(Object(c),!0).forEach(function(m){Ye(f,m,c[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(c)):ye(Object(c)).forEach(function(m){Object.defineProperty(f,m,Object.getOwnPropertyDescriptor(c,m))})}return f}function at(){var f=Xe({},z);return f.useId}var de=0;function K(){}var ht=at(),Yt=ht?function(d){var c=ht();return d||c}:function(d){var c=w.useState("ssr-id"),m=tt(c,2),P=m[0],Y=m[1];return w.useEffect(function(){var le=de;de+=1,Y("rc_unique_".concat(le))},[]),d||P};function St(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var lt=St()?w.useLayoutEffect:w.useEffect,rr=function(d,c){var m=w.useRef(!0);lt(function(){return d(m.current)},c),lt(function(){return m.current=!1,function(){m.current=!0}},[])},kt=function(d,c){rr(function(m){if(!m)return d()},c)},Jt=rr,N=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var f=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(f)||/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(f==null?void 0:f.substr(0,4))};function xe(){return xe=Object.assign?Object.assign.bind():function(f){for(var d=1;d<arguments.length;d++){var c=arguments[d];for(var m in c)({}).hasOwnProperty.call(c,m)&&(f[m]=c[m])}return f},xe.apply(null,arguments)}var mr=p(62874),Ar=p(52481);function Ht(f,d,c){var m=w.useRef({});return(!("value"in m.current)||c(m.current.condition,d))&&(m.current.value=f(),m.current.condition=d),m.current.value}var Dr=Symbol.for("react.element"),Pn=Symbol.for("react.transitional.element"),Ae=Symbol.for("react.fragment");function On(f){return f&&Ke(f)==="object"&&(f.$$typeof===Dr||f.$$typeof===Pn)&&f.type===Ae}var Cr=Number(w.version.split(".")[0]),xr=function(d,c){typeof d=="function"?d(c):Ke(d)==="object"&&d&&"current"in d&&(d.current=c)},vt=function(){for(var d=arguments.length,c=new Array(d),m=0;m<d;m++)c[m]=arguments[m];var P=c.filter(Boolean);return P.length<=1?P[0]:function(Y){c.forEach(function(le){xr(le,Y)})}},Pt=function(){for(var d=arguments.length,c=new Array(d),m=0;m<d;m++)c[m]=arguments[m];return Ht(function(){return vt.apply(void 0,c)},c,function(P,Y){return P.length!==Y.length||P.every(function(le,We){return le!==Y[We]})})},Xt=function(d){var c,m;if(!d)return!1;if(ur(d)&&Cr>=19)return!0;var P=(0,Ar.isMemo)(d)?d.type.type:d.type;return!(typeof P=="function"&&!((c=P.prototype)!==null&&c!==void 0&&c.render)&&P.$$typeof!==Ar.ForwardRef||typeof d=="function"&&!((m=d.prototype)!==null&&m!==void 0&&m.render)&&d.$$typeof!==Ar.ForwardRef)};function ur(f){return(0,w.isValidElement)(f)&&!On(f)}var ho=function(d){return ur(d)&&Xt(d)},yi=function(d){if(d&&ur(d)){var c=d;return c.props.propertyIsEnumerable("ref")?c.props.ref:c.ref}return null};function bi(f){var d=f.prefixCls,c=f.align,m=f.arrow,P=f.arrowPos,Y=m||{},le=Y.className,We=Y.content,Se=P.x,nt=Se===void 0?0:Se,se=P.y,te=se===void 0?0:se,Oe=w.useRef();if(!c||!c.points)return null;var we={position:"absolute"};if(c.autoArrow!==!1){var Ie=c.points[0],fr=c.points[1],xt=Ie[0],nr=Ie[1],yr=fr[0],At=fr[1];xt===yr||!["t","b"].includes(xt)?we.top=te:xt==="t"?we.top=0:we.bottom=0,nr===At||!["l","r"].includes(nr)?we.left=nt:nr==="l"?we.left=0:we.right=0}return w.createElement("div",{ref:Oe,className:_e()("".concat(d,"-arrow"),le),style:we},We)}function Ii(f){var d=f.prefixCls,c=f.open,m=f.zIndex,P=f.mask,Y=f.motion;return P?w.createElement(mr.Z,xe({},Y,{motionAppear:!0,visible:c,removeOnLeave:!0}),function(le){var We=le.className;return w.createElement("div",{style:{zIndex:m},className:_e()("".concat(d,"-mask"),We)})}):null}var Hi=w.memo(function(f){var d=f.children;return d},function(f,d){return d.cache}),Nn=Hi,Er=w.forwardRef(function(f,d){var c=f.popup,m=f.className,P=f.prefixCls,Y=f.style,le=f.target,We=f.onVisibleChanged,Se=f.open,nt=f.keepDom,se=f.fresh,te=f.onClick,Oe=f.mask,we=f.arrow,Ie=f.arrowPos,fr=f.align,xt=f.motion,nr=f.maskMotion,yr=f.forceRender,At=f.getPopupContainer,ir=f.autoDestroy,or=f.portal,ft=f.zIndex,Zn=f.onMouseEnter,ni=f.onMouseLeave,Wn=f.onPointerEnter,_n=f.onPointerDownCapture,Un=f.ready,Ur=f.offsetX,Kr=f.offsetY,wn=f.offsetR,Kn=f.offsetB,dn=f.onAlign,Hr=f.onPrepare,hr=f.stretch,Gr=f.targetWidth,Dt=f.targetHeight,Ui=typeof c=="function"?c():c,Gn=Se||nt,jr=(At==null?void 0:At.length)>0,Bt=w.useState(!At||!jr),Br=X(Bt,2),Qr=Br[0],go=Br[1];if(Jt(function(){!Qr&&jr&&le&&go(!0)},[Qr,jr,le]),!Qr)return null;var jn="auto",Cn={left:"-1000vw",top:"-1000vh",right:jn,bottom:jn};if(Un||!Se){var Ki,ro=fr.points,xn=fr.dynamicInset||((Ki=fr._experimental)===null||Ki===void 0?void 0:Ki.dynamicInset),Yn=xn&&ro[0][1]==="r",rn=xn&&ro[0][0]==="b";Yn?(Cn.right=wn,Cn.left=jn):(Cn.left=Ur,Cn.right=jn),rn?(Cn.bottom=Kn,Cn.top=jn):(Cn.top=Kr,Cn.bottom=jn)}var nn={};return hr&&(hr.includes("height")&&Dt?nn.height=Dt:hr.includes("minHeight")&&Dt&&(nn.minHeight=Dt),hr.includes("width")&&Gr?nn.width=Gr:hr.includes("minWidth")&&Gr&&(nn.minWidth=Gr)),Se||(nn.pointerEvents="none"),w.createElement(or,{open:yr||Gn,getContainer:At&&function(){return At(le)},autoDestroy:ir},w.createElement(Ii,{prefixCls:P,open:Se,zIndex:ft,mask:Oe,motion:nr}),w.createElement(ze.Z,{onResize:dn,disabled:!Se},function(mo){return w.createElement(mr.Z,xe({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:yr,leavedClassName:"".concat(P,"-hidden")},xt,{onAppearPrepare:Hr,onEnterPrepare:Hr,visible:Se,onVisibleChanged:function(on){var Xn;xt==null||(Xn=xt.onVisibleChanged)===null||Xn===void 0||Xn.call(xt,on),We(on)}}),function(ii,on){var Xn=ii.className,Ei=ii.style,qt=_e()(P,Xn,m);return w.createElement("div",{ref:vt(mo,d,on),className:qt,style:k(k(k(k({"--arrow-x":"".concat(Ie.x||0,"px"),"--arrow-y":"".concat(Ie.y||0,"px")},Cn),nn),Ei),{},{boxSizing:"border-box",zIndex:ft},Y),onMouseEnter:Zn,onMouseLeave:ni,onPointerEnter:Wn,onClick:te,onPointerDownCapture:_n},we&&w.createElement(bi,{prefixCls:P,arrow:we,arrowPos:Ie,align:fr}),w.createElement(Nn,{cache:!Se&&!se},Ui))})}))}),Fn=Er,Wr=w.forwardRef(function(f,d){var c=f.children,m=f.getTriggerDOMNode,P=Xt(c),Y=w.useCallback(function(We){xr(d,m?m(We):We)},[m]),le=Pt(Y,yi(c));return P?w.cloneElement(c,{ref:le}):c}),Lr=Wr,kr=w.createContext(null),Ji=kr;function Bi(f){return f?Array.isArray(f)?f:[f]:[]}function ei(f,d,c,m){return w.useMemo(function(){var P=Bi(c!=null?c:d),Y=Bi(m!=null?m:d),le=new Set(P),We=new Set(Y);return f&&(le.has("hover")&&(le.delete("hover"),le.add("click")),We.has("hover")&&(We.delete("hover"),We.add("click"))),[le,We]},[f,d,c,m])}var Si=function(f){if(!f)return!1;if(f instanceof Element){if(f.offsetParent)return!0;if(f.getBBox){var d=f.getBBox(),c=d.width,m=d.height;if(c||m)return!0}if(f.getBoundingClientRect){var P=f.getBoundingClientRect(),Y=P.width,le=P.height;if(Y||le)return!0}}return!1};function zi(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=arguments.length>2?arguments[2]:void 0;return c?f[0]===d[0]:f[0]===d[0]&&f[1]===d[1]}function Po(f,d,c,m){for(var P=c.points,Y=Object.keys(f),le=0;le<Y.length;le+=1){var We,Se=Y[le];if(zi((We=f[Se])===null||We===void 0?void 0:We.points,P,m))return"".concat(d,"-placement-").concat(Se)}return""}function Zi(f,d,c,m){return d||(c?{motionName:"".concat(f,"-").concat(c)}:m?{motionName:m}:null)}function bn(f){return f.ownerDocument.defaultView}function ti(f){for(var d=[],c=f==null?void 0:f.parentElement,m=["hidden","scroll","clip","auto"];c;){var P=bn(c).getComputedStyle(c),Y=P.overflowX,le=P.overflowY,We=P.overflow;[Y,le,We].some(function(Se){return m.includes(Se)})&&d.push(c),c=c.parentElement}return d}function fn(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(f)?d:f}function cn(f){return fn(parseFloat(f),0)}function tn(f,d){var c=k({},f);return(d||[]).forEach(function(m){if(!(m instanceof HTMLBodyElement||m instanceof HTMLHtmlElement)){var P=bn(m).getComputedStyle(m),Y=P.overflow,le=P.overflowClipMargin,We=P.borderTopWidth,Se=P.borderBottomWidth,nt=P.borderLeftWidth,se=P.borderRightWidth,te=m.getBoundingClientRect(),Oe=m.offsetHeight,we=m.clientHeight,Ie=m.offsetWidth,fr=m.clientWidth,xt=cn(We),nr=cn(Se),yr=cn(nt),At=cn(se),ir=fn(Math.round(te.width/Ie*1e3)/1e3),or=fn(Math.round(te.height/Oe*1e3)/1e3),ft=(Ie-fr-yr-At)*ir,Zn=(Oe-we-xt-nr)*or,ni=xt*or,Wn=nr*or,_n=yr*ir,Un=At*ir,Ur=0,Kr=0;if(Y==="clip"){var wn=cn(le);Ur=wn*ir,Kr=wn*or}var Kn=te.x+_n-Ur,dn=te.y+ni-Kr,Hr=Kn+te.width+2*Ur-_n-Un-ft,hr=dn+te.height+2*Kr-ni-Wn-Zn;c.left=Math.max(c.left,Kn),c.top=Math.max(c.top,dn),c.right=Math.min(c.right,Hr),c.bottom=Math.min(c.bottom,hr)}}),c}function wi(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,c="".concat(d),m=c.match(/^(.*)\%$/);return m?f*(parseFloat(m[1])/100):parseFloat(c)}function _i(f,d){var c=d||[],m=X(c,2),P=m[0],Y=m[1];return[wi(f.width,P),wi(f.height,Y)]}function qi(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[f[0],f[1]]}function Hn(f,d){var c=d[0],m=d[1],P,Y;return c==="t"?Y=f.y:c==="b"?Y=f.y+f.height:Y=f.y+f.height/2,m==="l"?P=f.x:m==="r"?P=f.x+f.width:P=f.x+f.width/2,{x:P,y:Y}}function Ir(f,d){var c={t:"b",b:"t",l:"r",r:"l"};return f.map(function(m,P){return P===d?c[m]||"c":m}).join("")}function Go(f,d,c,m,P,Y,le){var We=w.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:P[m]||{}}),Se=X(We,2),nt=Se[0],se=Se[1],te=w.useRef(0),Oe=w.useMemo(function(){return d?ti(d):[]},[d]),we=w.useRef({}),Ie=function(){we.current={}};f||Ie();var fr=D(function(){if(d&&c&&f){let mn=function(uo,gi){var Ni=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yo,Fi=Bt.x+uo,qo=Bt.y+gi,Mo=Fi+Yn,an=qo+xn,ea=Math.max(Fi,Ni.left),Ee=Math.max(qo,Ni.top),it=Math.min(Mo,Ni.right),gt=Math.min(an,Ni.bottom);return Math.max(0,(it-ea)*(gt-Ee))},_o=function(){Ai=Bt.y+zt,Di=Ai+xn,gn=Bt.x+Kt,fi=gn+Yn};var yr,At,ir,or,ft=d,Zn=ft.ownerDocument,ni=bn(ft),Wn=ni.getComputedStyle(ft),_n=Wn.width,Un=Wn.height,Ur=Wn.position,Kr=ft.style.left,wn=ft.style.top,Kn=ft.style.right,dn=ft.style.bottom,Hr=ft.style.overflow,hr=k(k({},P[m]),Y),Gr=Zn.createElement("div");(yr=ft.parentElement)===null||yr===void 0||yr.appendChild(Gr),Gr.style.left="".concat(ft.offsetLeft,"px"),Gr.style.top="".concat(ft.offsetTop,"px"),Gr.style.position=Ur,Gr.style.height="".concat(ft.offsetHeight,"px"),Gr.style.width="".concat(ft.offsetWidth,"px"),ft.style.left="0",ft.style.top="0",ft.style.right="auto",ft.style.bottom="auto",ft.style.overflow="hidden";var Dt;if(Array.isArray(c))Dt={x:c[0],y:c[1],width:0,height:0};else{var Ui,Gn,jr=c.getBoundingClientRect();jr.x=(Ui=jr.x)!==null&&Ui!==void 0?Ui:jr.left,jr.y=(Gn=jr.y)!==null&&Gn!==void 0?Gn:jr.top,Dt={x:jr.x,y:jr.y,width:jr.width,height:jr.height}}var Bt=ft.getBoundingClientRect();Bt.x=(At=Bt.x)!==null&&At!==void 0?At:Bt.left,Bt.y=(ir=Bt.y)!==null&&ir!==void 0?ir:Bt.top;var Br=Zn.documentElement,Qr=Br.clientWidth,go=Br.clientHeight,jn=Br.scrollWidth,Cn=Br.scrollHeight,Ki=Br.scrollTop,ro=Br.scrollLeft,xn=Bt.height,Yn=Bt.width,rn=Dt.height,nn=Dt.width,mo={left:0,top:0,right:Qr,bottom:go},ii={left:-ro,top:-Ki,right:jn-ro,bottom:Cn-Ki},on=hr.htmlRegion,Xn="visible",Ei="visibleFirst";on!=="scroll"&&on!==Ei&&(on=Xn);var qt=on===Ei,$o=tn(ii,Oe),Ut=tn(mo,Oe),yo=on===Xn?Ut:$o,Gi=qt?Ut:yo;ft.style.left="auto",ft.style.top="auto",ft.style.right="0",ft.style.bottom="0";var Vr=ft.getBoundingClientRect();ft.style.left=Kr,ft.style.top=wn,ft.style.right=Kn,ft.style.bottom=dn,ft.style.overflow=Hr,(or=ft.parentElement)===null||or===void 0||or.removeChild(Gr);var oi=fn(Math.round(Yn/parseFloat(_n)*1e3)/1e3),Li=fn(Math.round(xn/parseFloat(Un)*1e3)/1e3);if(oi===0||Li===0||et(c)&&!Si(c))return;var ga=hr.offset,ma=hr.targetOffset,ai=_i(Bt,ga),Jr=X(ai,2),qr=Jr[0],hn=Jr[1],Fo=_i(Dt,ma),ji=X(Fo,2),vn=ji[0],pn=ji[1];Dt.x-=vn,Dt.y-=pn;var Mi=hr.points||[],zr=X(Mi,2),li=zr[0],si=zr[1],En=qi(si),Ln=qi(li),bo=Hn(Dt,En),Pr=Hn(Bt,Ln),Ti=k({},hr),Kt=bo.x-Pr.x+qr,zt=bo.y-Pr.y+hn,$n=mn(Kt,zt),Ri=mn(Kt,zt,Ut),So=Hn(Dt,["t","l"]),Mn=Hn(Bt,["t","l"]),wo=Hn(Dt,["b","r"]),ui=Hn(Bt,["b","r"]),Qn=hr.overflow||{},Wo=Qn.adjustX,Co=Qn.adjustY,Io=Qn.shiftX,xo=Qn.shiftY,Ho=function(gi){return typeof gi=="boolean"?gi:gi>=0},Ai,Di,gn,fi;_o();var no=Ho(Co),io=Ln[0]===En[0];if(no&&Ln[0]==="t"&&(Di>Gi.bottom||we.current.bt)){var Zr=zt;io?Zr-=xn-rn:Zr=So.y-ui.y-hn;var Yi=mn(Kt,Zr),Qo=mn(Kt,Zr,Ut);Yi>$n||Yi===$n&&(!qt||Qo>=Ri)?(we.current.bt=!0,zt=Zr,hn=-hn,Ti.points=[Ir(Ln,0),Ir(En,0)]):we.current.bt=!1}if(no&&Ln[0]==="b"&&(Ai<Gi.top||we.current.tb)){var Tn=zt;io?Tn+=xn-rn:Tn=wo.y-Mn.y-hn;var Xi=mn(Kt,Tn),ki=mn(Kt,Tn,Ut);Xi>$n||Xi===$n&&(!qt||ki>=Ri)?(we.current.tb=!0,zt=Tn,hn=-hn,Ti.points=[Ir(Ln,0),Ir(En,0)]):we.current.tb=!1}var $i=Ho(Wo),Pi=Ln[1]===En[1];if($i&&Ln[1]==="l"&&(fi>Gi.right||we.current.rl)){var Qi=Kt;Pi?Qi-=Yn-nn:Qi=So.x-ui.x-qr;var Bo=mn(Qi,zt),oo=mn(Qi,zt,Ut);Bo>$n||Bo===$n&&(!qt||oo>=Ri)?(we.current.rl=!0,Kt=Qi,qr=-qr,Ti.points=[Ir(Ln,1),Ir(En,1)]):we.current.rl=!1}if($i&&Ln[1]==="r"&&(gn<Gi.left||we.current.lr)){var Oi=Kt;Pi?Oi+=Yn-nn:Oi=wo.x-Mn.x-qr;var ci=mn(Oi,zt),di=mn(Oi,zt,Ut);ci>$n||ci===$n&&(!qt||di>=Ri)?(we.current.lr=!0,Kt=Oi,qr=-qr,Ti.points=[Ir(Ln,1),Ir(En,1)]):we.current.lr=!1}_o();var hi=Io===!0?0:Io;typeof hi=="number"&&(gn<Ut.left&&(Kt-=gn-Ut.left-qr,Dt.x+nn<Ut.left+hi&&(Kt+=Dt.x-Ut.left+nn-hi)),fi>Ut.right&&(Kt-=fi-Ut.right-qr,Dt.x>Ut.right-hi&&(Kt+=Dt.x-Ut.right+hi)));var Vn=xo===!0?0:xo;typeof Vn=="number"&&(Ai<Ut.top&&(zt-=Ai-Ut.top-hn,Dt.y+rn<Ut.top+Vn&&(zt+=Dt.y-Ut.top+rn-Vn)),Di>Ut.bottom&&(zt-=Di-Ut.bottom-hn,Dt.y>Ut.bottom-Vn&&(zt+=Dt.y-Ut.bottom+Vn)));var Eo=Bt.x+Kt,Lo=Eo+Yn,vi=Bt.y+zt,ya=vi+xn,Yr=Dt.x,br=Yr+nn,Mr=Dt.y,Sr=Mr+rn,ao=Math.max(Eo,Yr),ba=Math.min(Lo,br),lo=(ao+ba)/2,Sa=lo-Eo,wa=Math.max(vi,Mr),Vo=Math.min(ya,Sr),zo=(wa+Vo)/2,Jo=zo-vi;le==null||le(d,Ti);var so=Vr.right-Bt.x-(Kt+Bt.width),pi=Vr.bottom-Bt.y-(zt+Bt.height);oi===1&&(Kt=Math.round(Kt),so=Math.round(so)),Li===1&&(zt=Math.round(zt),pi=Math.round(pi));var Zo={ready:!0,offsetX:Kt/oi,offsetY:zt/Li,offsetR:so/oi,offsetB:pi/Li,arrowX:Sa/oi,arrowY:Jo/Li,scaleX:oi,scaleY:Li,align:Ti};se(Zo)}}),xt=function(){te.current+=1;var At=te.current;Promise.resolve().then(function(){te.current===At&&fr()})},nr=function(){se(function(At){return k(k({},At),{},{ready:!1})})};return Jt(nr,[m]),Jt(function(){f||nr()},[f]),[nt.ready,nt.offsetX,nt.offsetY,nt.offsetR,nt.offsetB,nt.arrowX,nt.arrowY,nt.scaleX,nt.scaleY,nt.align,xt]}function vo(f){if(Array.isArray(f))return A(f)}function jo(f){if(typeof Symbol!="undefined"&&f[Symbol.iterator]!=null||f["@@iterator"]!=null)return Array.from(f)}function Oo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sn(f){return vo(f)||jo(f)||W(f)||Oo()}function da(f,d,c,m,P){Jt(function(){if(f&&d&&c){let te=function(){m(),P()};var Y=d,le=c,We=ti(Y),Se=ti(le),nt=bn(le),se=new Set([nt].concat(Sn(We),Sn(Se)));return se.forEach(function(Oe){Oe.addEventListener("scroll",te,{passive:!0})}),nt.addEventListener("resize",te,{passive:!0}),m(),function(){se.forEach(function(Oe){Oe.removeEventListener("scroll",te),nt.removeEventListener("resize",te)})}}},[f,d,c])}var eo={},to=[],Yo=function(d){to.push(d)};function Bn(f,d){if(0)var c}function po(f,d){if(0)var c}function zn(){eo={}}function Ci(f,d,c){!d&&!eo[c]&&(f(!1,c),eo[c]=!0)}function xi(f,d){Ci(Bn,f,d)}function ri(f,d){Ci(po,f,d)}xi.preMessage=Yo,xi.resetWarned=zn,xi.noteOnce=ri;var ha=null;function va(f,d,c,m,P,Y,le,We){var Se=w.useRef(f);Se.current=f;var nt=w.useRef(!1);w.useEffect(function(){if(d&&m&&(!P||Y)){var te=function(){nt.current=!1},Oe=function(ir){var or;Se.current&&!le(((or=ir.composedPath)===null||or===void 0||(or=or.call(ir))===null||or===void 0?void 0:or[0])||ir.target)&&!nt.current&&We(!1)},we=bn(m);we.addEventListener("pointerdown",te,!0),we.addEventListener("mousedown",Oe,!0),we.addEventListener("contextmenu",Oe,!0);var Ie=O(c);if(Ie&&(Ie.addEventListener("mousedown",Oe,!0),Ie.addEventListener("contextmenu",Oe,!0)),0)var fr,xt,nr,yr;return function(){we.removeEventListener("pointerdown",te,!0),we.removeEventListener("mousedown",Oe,!0),we.removeEventListener("contextmenu",Oe,!0),Ie&&(Ie.removeEventListener("mousedown",Oe,!0),Ie.removeEventListener("contextmenu",Oe,!0))}}},[d,c,m,P,Y]);function se(){nt.current=!0}return se}var No=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function pa(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ut,d=w.forwardRef(function(c,m){var P=c.prefixCls,Y=P===void 0?"rc-trigger-popup":P,le=c.children,We=c.action,Se=We===void 0?"hover":We,nt=c.showAction,se=c.hideAction,te=c.popupVisible,Oe=c.defaultPopupVisible,we=c.onPopupVisibleChange,Ie=c.afterPopupVisibleChange,fr=c.mouseEnterDelay,xt=c.mouseLeaveDelay,nr=xt===void 0?.1:xt,yr=c.focusDelay,At=c.blurDelay,ir=c.mask,or=c.maskClosable,ft=or===void 0?!0:or,Zn=c.getPopupContainer,ni=c.forceRender,Wn=c.autoDestroy,_n=c.destroyPopupOnHide,Un=c.popup,Ur=c.popupClassName,Kr=c.popupStyle,wn=c.popupPlacement,Kn=c.builtinPlacements,dn=Kn===void 0?{}:Kn,Hr=c.popupAlign,hr=c.zIndex,Gr=c.stretch,Dt=c.getPopupClassNameFromAlign,Ui=c.fresh,Gn=c.alignPoint,jr=c.onPopupClick,Bt=c.onPopupAlign,Br=c.arrow,Qr=c.popupMotion,go=c.maskMotion,jn=c.popupTransitionName,Cn=c.popupAnimation,Ki=c.maskTransitionName,ro=c.maskAnimation,xn=c.className,Yn=c.getTriggerDOMNode,rn=q(c,No),nn=Wn||_n||!1,mo=w.useState(!1),ii=X(mo,2),on=ii[0],Xn=ii[1];Jt(function(){Xn(N())},[]);var Ei=w.useRef({}),qt=w.useContext(Ji),$o=w.useMemo(function(){return{registerSubPopup:function(it,gt){Ei.current[it]=gt,qt==null||qt.registerSubPopup(it,gt)}}},[qt]),Ut=Yt(),yo=w.useState(null),Gi=X(yo,2),Vr=Gi[0],oi=Gi[1],Li=w.useRef(null),ga=D(function(Ee){Li.current=Ee,et(Ee)&&Vr!==Ee&&oi(Ee),qt==null||qt.registerSubPopup(Ut,Ee)}),ma=w.useState(null),ai=X(ma,2),Jr=ai[0],qr=ai[1],hn=w.useRef(null),Fo=D(function(Ee){et(Ee)&&Jr!==Ee&&(qr(Ee),hn.current=Ee)}),ji=w.Children.only(le),vn=(ji==null?void 0:ji.props)||{},pn={},Mi=D(function(Ee){var it,gt,rt=Jr;return(rt==null?void 0:rt.contains(Ee))||((it=O(rt))===null||it===void 0?void 0:it.host)===Ee||Ee===rt||(Vr==null?void 0:Vr.contains(Ee))||((gt=O(Vr))===null||gt===void 0?void 0:gt.host)===Ee||Ee===Vr||Object.values(Ei.current).some(function(Mt){return(Mt==null?void 0:Mt.contains(Ee))||Ee===Mt})}),zr=Zi(Y,Qr,Cn,jn),li=Zi(Y,go,ro,Ki),si=w.useState(Oe||!1),En=X(si,2),Ln=En[0],bo=En[1],Pr=te!=null?te:Ln,Ti=D(function(Ee){te===void 0&&bo(Ee)});Jt(function(){bo(te||!1)},[te]);var Kt=w.useRef(Pr);Kt.current=Pr;var zt=w.useRef([]);zt.current=[];var $n=D(function(Ee){var it;Ti(Ee),((it=zt.current[zt.current.length-1])!==null&&it!==void 0?it:Pr)!==Ee&&(zt.current.push(Ee),we==null||we(Ee))}),Ri=w.useRef(),So=function(){clearTimeout(Ri.current)},Mn=function(it){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;So(),gt===0?$n(it):Ri.current=setTimeout(function(){$n(it)},gt*1e3)};w.useEffect(function(){return So},[]);var wo=w.useState(!1),ui=X(wo,2),Qn=ui[0],Wo=ui[1];Jt(function(Ee){(!Ee||Pr)&&Wo(!0)},[Pr]);var Co=w.useState(null),Io=X(Co,2),xo=Io[0],Ho=Io[1],Ai=w.useState(null),Di=X(Ai,2),gn=Di[0],fi=Di[1],no=function(it){fi([it.clientX,it.clientY])},io=Go(Pr,Vr,Gn&&gn!==null?gn:Jr,wn,dn,Hr,Bt),Zr=X(io,11),Yi=Zr[0],Qo=Zr[1],Tn=Zr[2],Xi=Zr[3],ki=Zr[4],$i=Zr[5],Pi=Zr[6],Qi=Zr[7],Bo=Zr[8],oo=Zr[9],Oi=Zr[10],ci=ei(on,Se,nt,se),di=X(ci,2),hi=di[0],Vn=di[1],Eo=hi.has("click"),Lo=Vn.has("click")||Vn.has("contextMenu"),vi=D(function(){Qn||Oi()}),ya=function(){Kt.current&&Gn&&Lo&&Mn(!1)};da(Pr,Jr,Vr,vi,ya),Jt(function(){vi()},[gn,wn]),Jt(function(){Pr&&!(dn!=null&&dn[wn])&&vi()},[JSON.stringify(Hr)]);var Yr=w.useMemo(function(){var Ee=Po(dn,Y,oo,Gn);return _e()(Ee,Dt==null?void 0:Dt(oo))},[oo,Dt,dn,Y,Gn]);w.useImperativeHandle(m,function(){return{nativeElement:hn.current,popupElement:Li.current,forceAlign:vi}});var br=w.useState(0),Mr=X(br,2),Sr=Mr[0],ao=Mr[1],ba=w.useState(0),lo=X(ba,2),Sa=lo[0],wa=lo[1],Vo=function(){if(Gr&&Jr){var it=Jr.getBoundingClientRect();ao(it.width),wa(it.height)}},zo=function(){Vo(),vi()},Jo=function(it){Wo(!1),Oi(),Ie==null||Ie(it)},so=function(){return new Promise(function(it){Vo(),Ho(function(){return it})})};Jt(function(){xo&&(Oi(),xo(),Ho(null))},[xo]);function pi(Ee,it,gt,rt){pn[Ee]=function(Mt){var Jn;rt==null||rt(Mt),Mn(it,gt);for(var mi=arguments.length,Ca=new Array(mi>1?mi-1:0),To=1;To<mi;To++)Ca[To-1]=arguments[To];(Jn=vn[Ee])===null||Jn===void 0||Jn.call.apply(Jn,[vn,Mt].concat(Ca))}}(Eo||Lo)&&(pn.onClick=function(Ee){var it;Kt.current&&Lo?Mn(!1):!Kt.current&&Eo&&(no(Ee),Mn(!0));for(var gt=arguments.length,rt=new Array(gt>1?gt-1:0),Mt=1;Mt<gt;Mt++)rt[Mt-1]=arguments[Mt];(it=vn.onClick)===null||it===void 0||it.call.apply(it,[vn,Ee].concat(rt))});var Zo=va(Pr,Lo,Jr,Vr,ir,ft,Mi,Mn),mn=hi.has("hover"),_o=Vn.has("hover"),uo,gi;mn&&(pi("onMouseEnter",!0,fr,function(Ee){no(Ee)}),pi("onPointerEnter",!0,fr,function(Ee){no(Ee)}),uo=function(it){(Pr||Qn)&&Vr!==null&&Vr!==void 0&&Vr.contains(it.target)&&Mn(!0,fr)},Gn&&(pn.onMouseMove=function(Ee){var it;(it=vn.onMouseMove)===null||it===void 0||it.call(vn,Ee)})),_o&&(pi("onMouseLeave",!1,nr),pi("onPointerLeave",!1,nr),gi=function(){Mn(!1,nr)}),hi.has("focus")&&pi("onFocus",!0,yr),Vn.has("focus")&&pi("onBlur",!1,At),hi.has("contextMenu")&&(pn.onContextMenu=function(Ee){var it;Kt.current&&Vn.has("contextMenu")?Mn(!1):(no(Ee),Mn(!0)),Ee.preventDefault();for(var gt=arguments.length,rt=new Array(gt>1?gt-1:0),Mt=1;Mt<gt;Mt++)rt[Mt-1]=arguments[Mt];(it=vn.onContextMenu)===null||it===void 0||it.call.apply(it,[vn,Ee].concat(rt))}),xn&&(pn.className=_e()(vn.className,xn));var Ni=k(k({},vn),pn),Fi={},qo=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];qo.forEach(function(Ee){rn[Ee]&&(Fi[Ee]=function(){for(var it,gt=arguments.length,rt=new Array(gt),Mt=0;Mt<gt;Mt++)rt[Mt]=arguments[Mt];(it=Ni[Ee])===null||it===void 0||it.call.apply(it,[Ni].concat(rt)),rn[Ee].apply(rn,rt)})});var Mo=w.cloneElement(ji,k(k({},Ni),Fi)),an={x:$i,y:Pi},ea=Br?k({},Br!==!0?Br:{}):null;return w.createElement(w.Fragment,null,w.createElement(ze.Z,{disabled:!Pr,ref:Fo,onResize:zo},w.createElement(Lr,{getTriggerDOMNode:Yn},Mo)),w.createElement(Ji.Provider,{value:$o},w.createElement(Fn,{portal:f,ref:ga,prefixCls:Y,popup:Un,className:_e()(Ur,Yr),style:Kr,target:Jr,onMouseEnter:uo,onMouseLeave:gi,onPointerEnter:uo,zIndex:hr,open:Pr,keepDom:Qn,fresh:Ui,onClick:jr,onPointerDownCapture:Zo,mask:ir,motion:zr,maskMotion:li,onVisibleChanged:Jo,onPrepare:so,forceRender:ni,autoDestroy:nn,getPopupContainer:Zn,align:oo,arrow:ea,arrowPos:an,ready:Yi,offsetX:Qo,offsetY:Tn,offsetR:Xi,offsetB:ki,onAlign:vi,stretch:Gr,targetWidth:Sr/Qi,targetHeight:Sa/Bo})))});return d}var Xo=pa(ut)},31632:function(Qt,Le){"use strict";var p;var L=typeof Symbol=="function"&&Symbol.for,F=L?Symbol.for("react.element"):60103,Z=L?Symbol.for("react.portal"):60106,re=L?Symbol.for("react.fragment"):60107,T=L?Symbol.for("react.strict_mode"):60108,k=L?Symbol.for("react.profiler"):60114,g=L?Symbol.for("react.provider"):60109,Re=L?Symbol.for("react.context"):60110,A=L?Symbol.for("react.async_mode"):60111,W=L?Symbol.for("react.concurrent_mode"):60111,fe=L?Symbol.for("react.forward_ref"):60112,X=L?Symbol.for("react.suspense"):60113,Me=L?Symbol.for("react.suspense_list"):60120,q=L?Symbol.for("react.memo"):60115,De=L?Symbol.for("react.lazy"):60116,ie=L?Symbol.for("react.block"):60121,C=L?Symbol.for("react.fundamental"):60117,Ne=L?Symbol.for("react.responder"):60118,ot=L?Symbol.for("react.scope"):60119;function J(z){if(typeof z=="object"&&z!==null){var he=z.$$typeof;switch(he){case F:switch(z=z.type,z){case A:case W:case re:case k:case T:case X:return z;default:switch(z=z&&z.$$typeof,z){case Re:case fe:case De:case q:case g:return z;default:return he}}case Z:return he}}}function w(z){return J(z)===W}p=A,p=W,p=Re,p=g,p=F,p=fe,p=re,p=De,p=q,p=Z,p=k,p=T,p=X,p=function(z){return w(z)||J(z)===A},p=w,p=function(z){return J(z)===Re},p=function(z){return J(z)===g},p=function(z){return typeof z=="object"&&z!==null&&z.$$typeof===F},p=function(z){return J(z)===fe},p=function(z){return J(z)===re},p=function(z){return J(z)===De},Le.isMemo=function(z){return J(z)===q},p=function(z){return J(z)===Z},p=function(z){return J(z)===k},p=function(z){return J(z)===T},p=function(z){return J(z)===X},p=function(z){return typeof z=="string"||typeof z=="function"||z===re||z===W||z===k||z===T||z===X||z===Me||typeof z=="object"&&z!==null&&(z.$$typeof===De||z.$$typeof===q||z.$$typeof===g||z.$$typeof===Re||z.$$typeof===fe||z.$$typeof===C||z.$$typeof===Ne||z.$$typeof===ot||z.$$typeof===ie)},p=J},81640:function(Qt,Le,p){"use strict";Qt.exports=p(31632)},48482:function(Qt,Le){"use strict";var p;var L=Symbol.for("react.element"),F=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),g=Symbol.for("react.context"),Re=Symbol.for("react.server_context"),A=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),Me=Symbol.for("react.lazy"),q=Symbol.for("react.offscreen"),De;De=Symbol.for("react.module.reference");function ie(C){if(typeof C=="object"&&C!==null){var Ne=C.$$typeof;switch(Ne){case L:switch(C=C.type,C){case Z:case T:case re:case W:case fe:return C;default:switch(C=C&&C.$$typeof,C){case Re:case g:case A:case Me:case X:case k:return C;default:return Ne}}case F:return Ne}}}p=g,p=k,p=L,Le.ForwardRef=A,p=Z,p=Me,p=X,p=F,p=T,p=re,p=W,p=fe,p=function(){return!1},p=function(){return!1},p=function(C){return ie(C)===g},p=function(C){return ie(C)===k},p=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===L},p=function(C){return ie(C)===A},p=function(C){return ie(C)===Z},p=function(C){return ie(C)===Me},Le.isMemo=function(C){return ie(C)===X},p=function(C){return ie(C)===F},p=function(C){return ie(C)===T},p=function(C){return ie(C)===re},p=function(C){return ie(C)===W},p=function(C){return ie(C)===fe},p=function(C){return typeof C=="string"||typeof C=="function"||C===Z||C===T||C===re||C===W||C===fe||C===q||typeof C=="object"&&C!==null&&(C.$$typeof===Me||C.$$typeof===X||C.$$typeof===k||C.$$typeof===g||C.$$typeof===A||C.$$typeof===De||C.getModuleId!==void 0)},p=ie},52481:function(Qt,Le,p){"use strict";Qt.exports=p(48482)},71749:function(){"use strict"},30483:function(){"use strict"},96670:function(Qt,Le,p){"use strict";p.d(Le,{t:function(){return X}});var L=p(67294),F=p(85804),Z={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},re=p(94184),T=p.n(re),k=Object.defineProperty,g=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,W=(Me,q,De)=>q in Me?k(Me,q,{enumerable:!0,configurable:!0,writable:!0,value:De}):Me[q]=De,fe=(Me,q)=>{for(var De in q||(q={}))Re.call(q,De)&&W(Me,De,q[De]);if(g)for(var De of g(q))A.call(q,De)&&W(Me,De,q[De]);return Me};const X=({cancelText:Me="\u53D6\u6D88",okText:q="\u786E\u5B9A",loading:De=!1,hasOkBtn:ie=!0,hasCancelBtn:C=!0,okButtonProps:Ne={},onCancel:ot=()=>{},onOk:J=()=>{},className:w=""})=>L.createElement("div",{className:T()(Z.buttonFixed,w)},L.createElement("div",{className:Z.buttonWrap},C&&L.createElement(F.ZP,{size:"middle",className:`${Z.button} mr20`,onClick:ot},Me),ie&&L.createElement(F.ZP,fe({size:"middle",type:"primary",className:`${Z.button} mr20`,loading:De,onClick:J},Ne),q)))},57444:function(Qt,Le,p){"use strict";p.d(Le,{h:function(){return w}});var L=p(67294),F=p(88044),Z=p(91773),re=p(85804),T=p(4631),k=p.n(T),g=p(71749),Re=p(30483),A=Object.defineProperty,W=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,De=(z,he,be)=>he in z?A(z,he,{enumerable:!0,configurable:!0,writable:!0,value:be}):z[he]=be,ie=(z,he)=>{for(var be in he||(he={}))Me.call(he,be)&&De(z,be,he[be]);if(X)for(var be of X(he))q.call(he,be)&&De(z,be,he[be]);return z},C=(z,he)=>W(z,fe(he));const Ne=F.default.Option,ot={labelCol:{span:4},wrapperCol:{span:20}},J={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Le.Z=({callback:z,onCancel:he})=>{const[be,He]=(0,L.useState)("python");function _(Ge){He(J[Ge][1])}function B(Ge){z(Ge)}return L.createElement(Z.default,C(ie({},ot),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:B,style:{width:500}}),L.createElement(Z.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},L.createElement(F.default,{getPopupContainer:Ge=>Ge.parentNode,onChange:_},Object.keys(J).map(Ge=>L.createElement(Ne,{key:Ge,value:Ge},J[Ge][0])))),L.createElement(Z.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},L.createElement(w,{mode:be})),L.createElement("div",{className:"flex-container flex-end"},L.createElement(re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.createElement(re.ZP,{type:"ghost",onClick:he},"\u53D6\u6D88")))};function w({value:z,onChange:he,mode:be,options:He={}}){const _=(0,L.useRef)(),[B,Ge]=(0,L.useState)();return(0,L.useEffect)(()=>{if(B){let $e=function(x){const E=x.getValue();he&&he(E)};return B.on("change",$e),()=>{B.off("change",$e)}}},[B,he]),(0,L.useEffect)(()=>{B&&B.setOption("mode",be)},[B,be]),(0,L.useEffect)(()=>{B&&(z!==B.getValue()||z==="")&&setTimeout(()=>{B.setValue(z||"")},300)},[B,z]),(0,L.useEffect)(()=>{if(_.current&&!B){const $e=k().fromTextArea(_.current,ie({mode:be,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},He));Ge($e)}},[_.current,B]),L.createElement("div",{className:"my-codemirror-container"},L.createElement("textarea",{ref:_}))}},74131:function(Qt,Le,p){"use strict";p.r(Le),p.d(Le,{default:function(){return C}});var L=p(67294),F=p(35973),Z=p(91773),re=p(28802),T=p(57444),k=p(96670),g={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},Re=Object.defineProperty,A=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,X=(Ne,ot,J)=>ot in Ne?Re(Ne,ot,{enumerable:!0,configurable:!0,writable:!0,value:J}):Ne[ot]=J,Me=(Ne,ot)=>{for(var J in ot||(ot={}))W.call(ot,J)&&X(Ne,J,ot[J]);if(A)for(var J of A(ot))fe.call(ot,J)&&X(Ne,J,ot[J]);return Ne},q=(Ne,ot)=>{var J={};for(var w in Ne)W.call(Ne,w)&&ot.indexOf(w)<0&&(J[w]=Ne[w]);if(Ne!=null&&A)for(var w of A(Ne))ot.indexOf(w)<0&&fe.call(Ne,w)&&(J[w]=Ne[w]);return J},De=(Ne,ot,J)=>new Promise((w,z)=>{var he=_=>{try{He(J.next(_))}catch(B){z(B)}},be=_=>{try{He(J.throw(_))}catch(B){z(B)}},He=_=>_.done?w(_.value):Promise.resolve(_.value).then(he,be);He((J=J.apply(Ne,ot)).next())});const ie=Ne=>{var ot=Ne,{shixunsDetail:J,globalSetting:w,loading:z,user:he,dispatch:be}=ot,He=q(ot,["shixunsDetail","globalSetting","loading","user","dispatch"]);const _=(0,F.useLocation)(),[B,Ge]=(0,L.useState)({}),$e=(0,L.useRef)(),x=(0,L.useRef)(),[E]=Z.default.useForm(),[R,G]=(0,L.useState)("");(0,L.useEffect)(()=>(be({type:"globalSetting/footerToggle",payload:!1}),()=>{be({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,L.useEffect)(()=>{const Ue=sessionStorage.getItem("pathArray");if(Ue){const Fe=Ue.split(",").join("/"),Be=Fe.indexOf("/")===0?Fe.substr(1):Fe;G(Be)}},[]),(0,L.useEffect)(()=>{var Ue,Fe,Be,Ce;x.current=(Fe=(Ue=_.pathname)==null?void 0:Ue.split("/"))==null?void 0:Fe[2],$e.current=((Ce=(Be=_.pathname)==null?void 0:Be.split("/"))==null?void 0:Ce[3])==="repository"},[]);const oe=(...Ue)=>De(void 0,[...Ue],function*(Fe={}){if(yield be({type:"shixunsDetail/addRepositoryFile",payload:{id:x.current,message:Fe.commitMessage,content:Fe.codeMirror,path:`${R?`${R}/`:""}${Fe.path||""}`,secret_repository:$e.current?void 0:!0}})){const Ce=$e.current?`/shixuns/${x.current}/repository${R?`/master/shixun_show/${R}`:""}`:`/shixuns/${x.current}/secret_repository`;F.history.replace(Ce)}}),Qe=()=>{var Ue,Fe;F.history.push(`/shixuns/${x.current}/${(Fe=(Ue=_.pathname)==null?void 0:Ue.split("/"))==null?void 0:Fe[3]}${R?`/master/shixun_show/${R}`:""}`)};return L.createElement("section",{className:g.bg},L.createElement("div",{className:g.wrap},L.createElement("div",{className:g.title},"\u65B0\u5EFA\u6587\u4EF6"),L.createElement(Z.default,{className:"mt10",form:E,scrollToFirstError:!0,layout:"vertical",onFinish:oe,onValuesChange:()=>Ge(Me({},E.getFieldsValue()))},L.createElement(Z.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},L.createElement(Z.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},L.createElement("span",null,L.createElement("span",{className:"mr5"},R?`${R}/`:""),L.createElement(re.default,{className:g.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),L.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),L.createElement(Z.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},L.createElement(re.default,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),L.createElement("div",{className:"mt10 mb20"},L.createElement(Z.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},L.createElement(T.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),L.createElement(Z.default.Item,{noStyle:!0},L.createElement(k.t,{okButtonProps:{htmlType:"submit"},onCancel:Qe})))))};var C=(0,F.connect)(({shixunsDetail:Ne,loading:ot,globalSetting:J,user:w})=>({shixunsDetail:Ne,globalSetting:J,user:w,loading:ot.models.index}))(ie)},4631:function(Qt){(function(Le,p){Qt.exports=p()})(this,function(){"use strict";var Le=navigator.userAgent,p=navigator.platform,L=/gecko\/\d/i.test(Le),F=/MSIE \d/.test(Le),Z=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Le),re=/Edge\/(\d+)/.exec(Le),T=F||Z||re,k=T&&(F?document.documentMode||6:+(re||Z)[1]),g=!re&&/WebKit\//.test(Le),Re=g&&/Qt\/\d+\.\d+/.test(Le),A=!re&&/Chrome\//.test(Le),W=/Opera\//.test(Le),fe=/Apple Computer/.test(navigator.vendor),X=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Le),Me=/PhantomJS/.test(Le),q=!re&&/AppleWebKit/.test(Le)&&/Mobile\/\w+/.test(Le),De=/Android/.test(Le),ie=q||De||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Le),C=q||/Mac/.test(p),Ne=/\bCrOS\b/.test(Le),ot=/win/i.test(p),J=W&&Le.match(/Version\/(\d*\.\d*)/);J&&(J=Number(J[1])),J&&J>=15&&(W=!1,g=!0);var w=C&&(Re||W&&(J==null||J<12.11)),z=L||T&&k>=9;function he(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var be=function(e,t){var n=e.className,r=he(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function He(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function _(e,t){return He(e).appendChild(t)}function B(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Ge(e,t,n,r){var i=B(e,t,n,r);return i.setAttribute("role","presentation"),i}var $e;document.createRange?$e=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:$e=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function x(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function E(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function R(e,t){var n=e.className;he(t).test(n)||(e.className+=(n?" ":"")+t)}function G(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!he(n[r]).test(t)&&(t+=" "+n[r]);return t}var oe=function(e){e.select()};q?oe=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:T&&(oe=function(e){try{e.select()}catch(t){}});function Qe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Ue(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Fe(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,a=i||0;;){var l=e.indexOf(" ",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}var Be=function(){this.id=null,this.f=null,this.time=0,this.handler=Qe(this.onTimeout,this)};Be.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Be.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function Ce(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Ot=50,Nt={toString:function(){return"CodeMirror.Pass"}},Je={scroll:!1},yt={origin:"*mouse"},st={origin:"+move"};function Gt(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var ct=[""];function bt(e){for(;ct.length<=e;)ct.push(qe(ct)+" ");return ct[e]}function qe(e){return e[e.length-1]}function er(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function ar(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function lr(){}function Tt(e,t){var n;return Object.create?n=Object.create(e):(lr.prototype=e,n=new lr),t&&Ue(t,n),n}var mt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function wt(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||mt.test(e))}function Et(e,t){return t?t.source.indexOf("\\w")>-1&&wt(e)?!0:t.test(e):wt(e)}function _t(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ft=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Rt(e){return e.charCodeAt(0)>=768&&Ft.test(e)}function Wt(e,t,n){for(;(n<0?t>0:t<e.length)&&Rt(e.charAt(t));)t+=n;return t}function tr(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function pr(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),a.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var Rr=null;function gr(e,t,n){var r;Rr=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:Rr=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:Rr=i)}return r!=null?r:Rr}var qn=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(u,h,v){this.level=u,this.from=h,this.to=v}return function(u,h){var v=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var S=u.length,y=[],M=0;M<S;++M)y.push(n(u.charCodeAt(M)));for(var I=0,U=v;I<S;++I){var $=y[I];$=="m"?y[I]=U:U=$}for(var ue=0,Q=v;ue<S;++ue){var pe=y[ue];pe=="1"&&Q=="r"?y[ue]="n":o.test(pe)&&(Q=pe,pe=="r"&&(y[ue]="R"))}for(var Ve=1,Ze=y[0];Ve<S-1;++Ve){var dt=y[Ve];dt=="+"&&Ze=="1"&&y[Ve+1]=="1"?y[Ve]="1":dt==","&&Ze==y[Ve+1]&&(Ze=="1"||Ze=="n")&&(y[Ve]=Ze),Ze=dt}for(var $t=0;$t<S;++$t){var Xr=y[$t];if(Xr==",")y[$t]="N";else if(Xr=="%"){var vr=void 0;for(vr=$t+1;vr<S&&y[vr]=="%";++vr);for(var In=$t&&y[$t-1]=="!"||vr<S&&y[vr]=="1"?"1":"N",An=$t;An<vr;++An)y[An]=In;$t=vr-1}}for(var Or=0,Dn=v;Or<S;++Or){var en=y[Or];Dn=="L"&&en=="1"?y[Or]="L":o.test(en)&&(Dn=en)}for(var _r=0;_r<S;++_r)if(i.test(y[_r])){var Nr=void 0;for(Nr=_r+1;Nr<S&&i.test(y[Nr]);++Nr);for(var wr=(_r?y[_r-1]:v)=="L",kn=(Nr<S?y[Nr]:v)=="L",fa=wr==kn?wr?"L":"R":v,ko=_r;ko<Nr;++ko)y[ko]=fa;_r=Nr-1}for(var sn=[],Vi,$r=0;$r<S;)if(a.test(y[$r])){var fl=$r;for(++$r;$r<S&&a.test(y[$r]);++$r);sn.push(new s(0,fl,$r))}else{var co=$r,Uo=sn.length,Ko=h=="rtl"?1:0;for(++$r;$r<S&&y[$r]!="L";++$r);for(var yn=co;yn<$r;)if(l.test(y[yn])){co<yn&&(sn.splice(Uo,0,new s(1,co,yn)),Uo+=Ko);var ca=yn;for(++yn;yn<$r&&l.test(y[yn]);++yn);sn.splice(Uo,0,new s(2,ca,yn)),Uo+=Ko,co=yn}else++yn;co<$r&&sn.splice(Uo,0,new s(1,co,$r))}return h=="ltr"&&(sn[0].level==1&&(Vi=u.match(/^\s+/))&&(sn[0].from=Vi[0].length,sn.unshift(new s(0,0,Vi[0].length))),qe(sn).level==1&&(Vi=u.match(/\s+$/))&&(qe(sn).to-=Vi[0].length,sn.push(new s(0,S-Vi[0].length,S)))),h=="rtl"?sn.reverse():sn}}();function Lt(e,t){var n=e.order;return n==null&&(n=e.order=qn(e.text,t)),n}var Fr=[],me=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Fr).concat(n)}};function un(e,t){return e._handlers&&e._handlers[t]||Fr}function ce(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=Ce(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ee(e,t){var n=un(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ne(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ee(e,n||t.type,e,t),Vt(t)||t.codemirrorIgnore}function ke(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)Ce(n,t[r])==-1&&n.push(t[r])}function Pe(e,t){return un(e,t).length>0}function pt(e){e.prototype.on=function(t,n){me(this,t,n)},e.prototype.off=function(t,n){ce(this,t,n)}}function je(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function It(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Vt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ut(e){je(e),It(e)}function Ct(e){return e.target||e.srcElement}function _e(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),C&&e.ctrlKey&&t==1&&(t=3),t}var ze=function(){if(T&&k<9)return!1;var e=B("div");return"draggable"in e||"dragDrop"in e}(),et;function jt(e){if(et==null){var t=B("span","\u200B");_(e,B("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(et=t.offsetWidth<=1&&t.offsetHeight>2&&!(T&&k<8))}var n=et?B("span","\u200B"):B("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var dr;function sr(e){if(dr!=null)return dr;var t=_(e,document.createTextNode("A\u062EA")),n=$e(t,0,1).getBoundingClientRect(),r=$e(t,1,2).getBoundingClientRect();return He(e),!n||n.left==n.right?!1:dr=r.right-n.right<3}var b=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
|
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},O=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},D=function(){var e=B("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),H=null;function ae(e){if(H!=null)return H;var t=_(e,B("span","x")),n=t.getBoundingClientRect(),r=$e(t,0,1).getBoundingClientRect();return H=Math.abs(n.left-r.left)>1}var j={},V={};function Te(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),j[e]=t}function tt(e,t){V[e]=t}function Ke(e){if(typeof e=="string"&&V.hasOwnProperty(e))e=V[e];else if(e&&typeof e.name=="string"&&V.hasOwnProperty(e.name)){var t=V[e.name];typeof t=="string"&&(t={name:t}),e=Tt(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ke("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ke("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function ge(e,t){t=Ke(t);var n=j[t.name];if(!n)return ge(e,"text/plain");var r=n(e,t);if(ve.hasOwnProperty(t.name)){var i=ve[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var ve={};function Ye(e,t){var n=ve.hasOwnProperty(e)?ve[e]:ve[e]={};Ue(t,n)}function ye(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Xe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function at(e,t,n){return e.startState?e.startState(t,n):!0}var de=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};de.prototype.eol=function(){return this.pos>=this.string.length},de.prototype.sol=function(){return this.pos==this.lineStart},de.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},de.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},de.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},de.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},de.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},de.prototype.skipToEnd=function(){this.pos=this.string.length},de.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},de.prototype.backUp=function(e){this.pos-=e},de.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Fe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Fe(this.string,this.lineStart,this.tabSize):0)},de.prototype.indentation=function(){return Fe(this.string,null,this.tabSize)-(this.lineStart?Fe(this.string,this.lineStart,this.tabSize):0)},de.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(a){return n?a.toLowerCase():a},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},de.prototype.current=function(){return this.string.slice(this.start,this.pos)},de.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},de.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},de.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function K(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function ht(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var a=o.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i}),r}function Yt(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function St(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function lt(e){if(e.parent==null)return null;for(var t=e.parent,n=Ce(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function rr(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return n+a}function kt(e,t){return t>=e.first&&t<e.first+e.size}function Jt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function N(e,t,n){if(n===void 0&&(n=null),!(this instanceof N))return new N(e,t,n);this.line=e,this.ch=t,this.sticky=n}function xe(e,t){return e.line-t.line||e.ch-t.ch}function mr(e,t){return e.sticky==t.sticky&&xe(e,t)==0}function Ar(e){return N(e.line,e.ch)}function Ht(e,t){return xe(e,t)<0?t:e}function Dr(e,t){return xe(e,t)<0?e:t}function Pn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ae(e,t){if(t.line<e.first)return N(e.first,0);var n=e.first+e.size-1;return t.line>n?N(n,K(e,n).text.length):On(t,K(e,t.line).text.length)}function On(e,t){var n=e.ch;return n==null||n>t?N(e.line,t):n<0?N(e.line,0):e}function Cr(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Ae(e,t[r]);return n}var xr=function(e,t){this.state=e,this.lookAhead=t},vt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};vt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vt.fromSaved=function(e,t,n){return t instanceof xr?new vt(e,ye(e.mode,t.state),n,t.lookAhead):new vt(e,ye(e.mode,t),n)},vt.prototype.save=function(e){var t=e!==!1?ye(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new xr(t,this.maxLookAhead):t};function Pt(e,t,n,r){var i=[e.state.modeGen],o={};Er(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var a=n.state,l=function(u){n.baseTokens=i;var h=e.state.overlays[u],v=1,S=0;n.state=!0,Er(e,t.text,h.mode,n,function(y,M){for(var I=v;S<y;){var U=i[v];U>y&&i.splice(v,1,y,i[v+1],U),v+=2,S=Math.min(y,U)}if(M)if(h.opaque)i.splice(I,v-I,y,"overlay "+M),v=I+2;else for(;I<v;I+=2){var $=i[I+1];i[I+1]=($?$+" ":"")+"overlay "+M}},o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Xt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ur(e,lt(t)),i=t.text.length>e.options.maxHighlightLength&&ye(e.doc.mode,r.state),o=Pt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ur(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new vt(r,!0,t);var o=Fn(e,t,n),a=o>r.first&&K(r,o-1).stateAfter,l=a?vt.fromSaved(r,a,o):new vt(r,at(r.mode),o);return r.iter(o,t,function(s){ho(e,s.text,l);var u=l.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?l.save():null,l.nextLine()}),n&&(r.modeFrontier=l.line),l}function ho(e,t,n,r){var i=e.doc.mode,o=new de(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&yi(i,n.state);!o.eol();)bi(i,o,n.state),o.start=o.pos}function yi(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Xe(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function bi(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Xe(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ii=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Hi(e,t,n,r){var i=e.doc,o=i.mode,a;t=Ae(i,t);var l=K(i,t.line),s=ur(e,t.line,n),u=new de(l.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=bi(o,u,s.state),r&&h.push(new Ii(u,a,ye(i.mode,s.state)));return r?h:new Ii(u,a,s.state)}function Nn(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Er(e,t,n,r,i,o,a){var l=n.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,h=new de(t,e.options.tabSize,r),v,S=e.options.addModeClass&&[null];for(t==""&&Nn(yi(n,r.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(l=!1,a&&ho(e,t,r,h.pos),h.pos=t.length,v=null):v=Nn(bi(n,h,r.state,S),o),S){var y=S[0].name;y&&(v="m-"+(v?y+" "+v:y))}if(!l||u!=v){for(;s<h.start;)s=Math.min(h.start,s+5e3),i(s,u);u=v}h.start=h.pos}for(;s<h.pos;){var M=Math.min(h.pos,s+5e3);i(M,u),s=M}}function Fn(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=K(o,l-1),u=s.stateAfter;if(u&&(!n||l+(u instanceof xr?u.lookAhead:0)<=o.modeFrontier))return l;var h=Fe(s.text,null,e.options.tabSize);(i==null||r>h)&&(i=l-1,r=h)}return i}function Wr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=K(e,r).stateAfter;if(i&&(!(i instanceof xr)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Lr=!1,kr=!1;function Ji(){Lr=!0}function Bi(){kr=!0}function ei(e,t,n){this.marker=e,this.from=t,this.to=n}function Si(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function zi(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Po(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Zi(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&a.type=="bookmark"&&(!n||!o.marker.insertLeft)){var s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new ei(a,o.from,s?null:o.to))}}return r}function bn(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&a.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new ei(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}function ti(e,t){if(t.full)return null;var n=kt(e,t.from.line)&&K(e,t.from.line).markedSpans,r=kt(e,t.to.line)&&K(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=xe(t.from,t.to)==0,l=Zi(n,i,a),s=bn(r,o,a),u=t.text.length==1,h=qe(t.text).length+(u?i:0);if(l)for(var v=0;v<l.length;++v){var S=l[v];if(S.to==null){var y=Si(s,S.marker);y?u&&(S.to=y.to==null?null:y.to+h):S.to=i}}if(s)for(var M=0;M<s.length;++M){var I=s[M];if(I.to!=null&&(I.to+=h),I.from==null){var U=Si(l,I.marker);U||(I.from=h,u&&(l||(l=[])).push(I))}else I.from+=h,u&&(l||(l=[])).push(I)}l&&(l=fn(l)),s&&s!=l&&(s=fn(s));var $=[l];if(!u){var ue=t.text.length-2,Q;if(ue>0&&l)for(var pe=0;pe<l.length;++pe)l[pe].to==null&&(Q||(Q=[])).push(new ei(l[pe].marker,null,null));for(var Ve=0;Ve<ue;++Ve)$.push(Q);$.push(s)}return $}function fn(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function cn(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(y){if(y.markedSpans)for(var M=0;M<y.markedSpans.length;++M){var I=y.markedSpans[M].marker;I.readOnly&&(!r||Ce(r,I)==-1)&&(r||(r=[])).push(I)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],l=a.find(0),s=0;s<i.length;++s){var u=i[s];if(!(xe(u.to,l.from)<0||xe(u.from,l.to)>0)){var h=[s,1],v=xe(u.from,l.from),S=xe(u.to,l.to);(v<0||!a.inclusiveLeft&&!v)&&h.push({from:u.from,to:l.from}),(S>0||!a.inclusiveRight&&!S)&&h.push({from:l.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function tn(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function wi(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function _i(e){return e.inclusiveLeft?-1:0}function qi(e){return e.inclusiveRight?1:0}function Hn(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=xe(r.from,i.from)||_i(e)-_i(t);if(o)return-o;var a=xe(r.to,i.to)||qi(e)-qi(t);return a||t.id-e.id}function Ir(e,t){var n=kr&&e.markedSpans,r;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||Hn(r,i.marker)<0)&&(r=i.marker);return r}function Go(e){return Ir(e,!0)}function vo(e){return Ir(e,!1)}function jo(e,t){var n=kr&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!r||Hn(r,o.marker)<0)&&(r=o.marker)}return r}function Oo(e,t,n,r,i){var o=K(e,t),a=kr&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),h=xe(u.from,n)||_i(s.marker)-_i(i),v=xe(u.to,r)||qi(s.marker)-qi(i);if(!(h>=0&&v<=0||h<=0&&v>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?xe(u.to,n)>=0:xe(u.to,n)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?xe(u.from,r)<=0:xe(u.from,r)<0)))return!0}}}function Sn(e){for(var t;t=Go(e);)e=t.find(-1,!0).line;return e}function da(e){for(var t;t=vo(e);)e=t.find(1,!0).line;return e}function eo(e){for(var t,n;t=vo(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function to(e,t){var n=K(e,t),r=Sn(n);return n==r?t:lt(r)}function Yo(e,t){if(t>e.lastLine())return t;var n=K(e,t),r;if(!Bn(e,n))return t;for(;r=vo(n);)n=r.find(1,!0).line;return lt(n)+1}function Bn(e,t){var n=kr&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&po(e,t,r))return!0}}}function po(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return po(e,r.line,Si(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&po(e,t,i))return!0}function zn(e){e=Sn(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function Ci(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Go(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=vo(r);){var o=n.find(0,!0);t-=r.text.length-o.from.ch,r=o.to.line,t+=r.text.length-o.to.ch}return t}function xi(e){var t=e.display,n=e.doc;t.maxLine=K(n,n.first),t.maxLineLength=Ci(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=Ci(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var ri=function(e,t,n){this.text=e,wi(this,t),this.height=n?n(this):1};ri.prototype.lineNo=function(){return lt(this)},pt(ri);function ha(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),tn(e),wi(e,n);var i=r?r(e):1;i!=e.height&&St(e,i)}function va(e){e.parent=null,tn(e)}var No={},pa={};function Xo(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?pa:No;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function f(e,t){var n=Ge("span",null,null,g?"padding-right: .1px":null),r={pre:Ge("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=c,sr(e.display.measure)&&(a=Lt(o,e.doc.direction))&&(r.addToken=P(r.addToken,a)),r.map=[];var l=t!=e.display.externalMeasured&<(o);le(o,r,Xt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=G(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=G(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(jt(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(g){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ee(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=G(r.pre.className,r.textClass||"")),r}function d(e){var t=B("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function c(e,t,n,r,i,o,a){if(t){var l=e.splitSpaces?m(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,h),T&&k<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var v=0;;){s.lastIndex=v;var S=s.exec(t),y=S?S.index-v:t.length-v;if(y){var M=document.createTextNode(l.slice(v,v+y));T&&k<9?h.appendChild(B("span",[M])):h.appendChild(M),e.map.push(e.pos,e.pos+y,M),e.col+=y,e.pos+=y}if(!S)break;v+=y+1;var I=void 0;if(S[0]==" "){var U=e.cm.options.tabSize,$=U-e.col%U;I=h.appendChild(B("span",bt($),"cm-tab")),I.setAttribute("role","presentation"),I.setAttribute("cm-text"," "),e.col+=$}else S[0]=="\r"||S[0]==`
|
|
`?(I=h.appendChild(B("span",S[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),I.setAttribute("cm-text",S[0]),e.col+=1):(I=e.cm.options.specialCharPlaceholder(S[0]),I.setAttribute("cm-text",S[0]),T&&k<9?h.appendChild(B("span",[I])):h.appendChild(I),e.col+=1);e.map.push(e.pos,e.pos+1,I),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||u||o||a){var ue=n||"";r&&(ue+=r),i&&(ue+=i);var Q=B("span",[h],ue,o);if(a)for(var pe in a)a.hasOwnProperty(pe)&&pe!="style"&&pe!="class"&&Q.setAttribute(pe,a[pe]);return e.content.appendChild(Q)}e.content.appendChild(h)}}function m(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),r+=o,n=o==" "}return r}function P(e,t){return function(n,r,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,h=u+r.length;;){for(var v=void 0,S=0;S<t.length&&(v=t[S],!(v.to>u&&v.from<=u));S++);if(v.to>=h)return e(n,r,i,o,a,l,s);e(n,r.slice(0,v.to-u),i,o,null,l,s),o=null,r=r.slice(v.to-u),u=v.to}}}function Y(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function le(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var a=1;a<n.length;a+=2)t.addToken(t,i.slice(o,o=n[a]),Xo(n[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,h="",v,S,y=0,M,I,U,$,ue;;){if(y==s){M=I=U=S="",ue=null,$=null,y=1/0;for(var Q=[],pe=void 0,Ve=0;Ve<r.length;++Ve){var Ze=r[Ve],dt=Ze.marker;if(dt.type=="bookmark"&&Ze.from==s&&dt.widgetNode)Q.push(dt);else if(Ze.from<=s&&(Ze.to==null||Ze.to>s||dt.collapsed&&Ze.to==s&&Ze.from==s)){if(Ze.to!=null&&Ze.to!=s&&y>Ze.to&&(y=Ze.to,I=""),dt.className&&(M+=" "+dt.className),dt.css&&(S=(S?S+";":"")+dt.css),dt.startStyle&&Ze.from==s&&(U+=" "+dt.startStyle),dt.endStyle&&Ze.to==y&&(pe||(pe=[])).push(dt.endStyle,Ze.to),dt.title&&((ue||(ue={})).title=dt.title),dt.attributes)for(var $t in dt.attributes)(ue||(ue={}))[$t]=dt.attributes[$t];dt.collapsed&&(!$||Hn($.marker,dt)<0)&&($=Ze)}else Ze.from>s&&y>Ze.from&&(y=Ze.from)}if(pe)for(var Xr=0;Xr<pe.length;Xr+=2)pe[Xr+1]==y&&(I+=" "+pe[Xr]);if(!$||$.from==s)for(var vr=0;vr<Q.length;++vr)Y(t,0,Q[vr]);if($&&($.from||0)==s){if(Y(t,($.to==null?l+1:$.to)-s,$.marker,$.from==null),$.to==null)return;$.to==s&&($=!1)}}if(s>=l)break;for(var In=Math.min(l,y);;){if(h){var An=s+h.length;if(!$){var Or=An>In?h.slice(0,In-s):h;t.addToken(t,Or,v?v+M:M,U,s+Or.length==y?I:"",S,ue)}if(An>=In){h=h.slice(In-s),s=In;break}s=An,U=""}h=i.slice(o,o=n[u++]),v=Xo(n[u++],t.cm.options)}}}function We(e,t,n){this.line=t,this.rest=eo(t),this.size=this.rest?lt(qe(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Bn(e,t)}function Se(e,t,n){for(var r=[],i,o=t;o<n;o=i){var a=new We(e.doc,K(e.doc,o),o);i=o+a.size,r.push(a)}return r}var nt=null;function se(e){nt?nt.ops.push(e):e.ownsGroup=nt={ops:[e],delayedCallbacks:[]}}function te(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Oe(e,t){var n=e.ownsGroup;if(n)try{te(n)}finally{nt=null,t(n)}}var we=null;function Ie(e,t){var n=un(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;nt?i=nt.delayedCallbacks:we?i=we:(i=we=[],setTimeout(fr,0));for(var o=function(l){i.push(function(){return n[l].apply(null,r)})},a=0;a<n.length;++a)o(a)}}function fr(){var e=we;we=null;for(var t=0;t<e.length;++t)e[t]()}function xt(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?ir(e,t):o=="gutter"?ft(e,t,n,r):o=="class"?or(e,t):o=="widget"&&Zn(e,t,r)}t.changes=null}function nr(e){return e.node==e.text&&(e.node=B("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),T&&k<8&&(e.node.style.zIndex=2)),e.node}function yr(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=nr(t);t.background=r.insertBefore(B("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function At(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):f(e,t)}function ir(e,t){var n=t.text.className,r=At(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,or(e,t)):n&&(t.text.className=n)}function or(e,t){yr(e,t),t.line.wrapClass?nr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function ft(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=nr(t);t.gutterBackground=B("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=nr(t),l=t.gutter=B("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(B("div",Jt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,h=o.hasOwnProperty(u)&&o[u];h&&l.appendChild(B("div",[h],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function Zn(e,t,n){t.alignable&&(t.alignable=null);for(var r=he("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Wn(e,t,n)}function ni(e,t,n,r){var i=At(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),or(e,t),ft(e,t,n,r),Wn(e,t,r),t.node}function Wn(e,t,n){if(_n(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)_n(e,t.rest[r],t,n,!1)}function _n(e,t,n,r,i){if(t.widgets)for(var o=nr(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=B("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Un(s,u,n,r),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),Ie(s,"redraw")}}function Un(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Ur(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!x(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),_(t.display.measure,B("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Kr(e,t){for(var n=Ct(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute("cm-ignore-events")=="true"||n.parentNode==e.sizer&&n!=e.mover)return!0}function wn(e){return e.lineSpace.offsetTop}function Kn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function dn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=_(e.measure,B("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function Hr(e){return Ot-e.display.nativeBarWidth}function hr(e){return e.display.scroller.clientWidth-Hr(e)-e.display.barWidth}function Gr(e){return e.display.scroller.clientHeight-Hr(e)-e.display.barHeight}function Dt(e,t,n){var r=e.options.lineWrapping,i=r&&hr(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ui(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(lt(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Gn(e,t){t=Sn(t);var n=lt(t),r=e.display.externalMeasured=new We(e.doc,t,n);r.lineN=n;var i=r.built=f(e,r);return r.text=i.pre,_(e.display.lineMeasure,i.pre),r}function jr(e,t,n,r){return Qr(e,Br(e,t),n,r)}function Bt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Mi(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function Br(e,t){var n=lt(t),r=Bt(e,n);r&&!r.text?r=null:r&&r.changes&&(xt(e,r,n,hn(e)),e.curOp.forceUpdate=!0),r||(r=Gn(e,t));var i=Ui(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Qr(e,t,n,r,i){t.before&&(n=-1);var o=n+(r||""),a;return t.cache.hasOwnProperty(o)?a=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Dt(e,t.view,t.rect),t.hasHeights=!0),a=Ki(e,t,n,r),a.bogus||(t.cache[o]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var go={left:0,right:0,top:0,bottom:0};function jn(e,t,n){for(var r,i,o,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(u==e.length-3||t==s&&e[u+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),i!=null){if(r=e[u+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],a="left";if(n=="right"&&i==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Cn(e,t){var n=go;if(t=="left")for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Ki(e,t,n,r){var i=jn(t.map,n,r),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var h=0;h<4;h++){for(;a&&Rt(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&Rt(t.line.text.charAt(i.coverStart+l));)++l;if(T&&k<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Cn($e(o,a,l).getClientRects(),r),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}T&&k<11&&(u=ro(e.display.measure,u))}else{a>0&&(s=r="right");var v;e.options.lineWrapping&&(v=o.getClientRects()).length>1?u=v[r=="right"?v.length-1:0]:u=o.getBoundingClientRect()}if(T&&k<9&&!a&&(!u||!u.left&&!u.right)){var S=o.parentNode.getClientRects()[0];S?u={left:S.left,right:S.left+qr(e.display),top:S.top,bottom:S.bottom}:u=go}for(var y=u.top-t.rect.top,M=u.bottom-t.rect.top,I=(y+M)/2,U=t.view.measure.heights,$=0;$<U.length-1&&!(I<U[$]);$++);var ue=$?U[$-1]:0,Q=U[$],pe={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:ue,bottom:Q};return!u.left&&!u.right&&(pe.bogus=!0),e.options.singleCursorHeightPerLine||(pe.rtop=y,pe.rbottom=M),pe}function ro(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!ae(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function xn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Yn(e){e.display.externalMeasure=null,He(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)xn(e.display.view[t])}function rn(e){Yn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function nn(){return A&&De?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function mo(){return A&&De?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ii(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=Ur(e.widgets[n]));return t}function on(e,t,n,r,i){if(!i){var o=ii(t);n.top+=o,n.bottom+=o}if(r=="line")return n;r||(r="local");var a=zn(t);if(r=="local"?a+=wn(e.display):a-=e.display.viewOffset,r=="page"||r=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(r=="window"?0:mo());var s=l.left+(r=="window"?0:nn());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function Xn(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=nn(),i-=mo();else if(n=="local"||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Ei(e,t,n,r,i){return r||(r=K(e.doc,t.line)),on(e,r,jr(e,r,t.ch,i),n)}function qt(e,t,n,r,i,o){r=r||K(e.doc,t.line),i||(i=Br(e,r));function a(M,I){var U=Qr(e,i,M,I?"right":"left",o);return I?U.left=U.right:U.right=U.left,on(e,r,U,n)}var l=Lt(r,e.doc.direction),s=t.ch,u=t.sticky;if(s>=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a(u=="before"?s-1:s,u=="before");function h(M,I,U){var $=l[I],ue=$.level==1;return a(U?M-1:M,ue!=U)}var v=gr(l,s,u),S=Rr,y=h(s,v,u=="before");return S!=null&&(y.other=h(s,S,u!="before")),y}function $o(e,t){var n=0;t=Ae(e.doc,t),e.options.lineWrapping||(n=qr(e.display)*t.ch);var r=K(e.doc,t.line),i=zn(r)+wn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ut(e,t,n,r,i){var o=N(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function yo(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ut(r.first,0,null,-1,-1);var i=rr(r,n),o=r.first+r.size-1;if(i>o)return Ut(r.first+r.size-1,K(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=K(r,i);;){var l=Li(e,a,i,t,n),s=jo(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=K(r,i=u.line)}}function Gi(e,t,n,r){r-=ii(t);var i=t.text.length,o=tr(function(a){return Qr(e,n,a-1).bottom<=r},i,0);return i=tr(function(a){return Qr(e,n,a).top>r},o,i),{begin:o,end:i}}function Vr(e,t,n,r){n||(n=Br(e,t));var i=on(e,t,Qr(e,n,r),"line").top;return Gi(e,t,n,i)}function oi(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Li(e,t,n,r,i){i-=zn(t);var o=Br(e,t),a=ii(t),l=0,s=t.text.length,u=!0,h=Lt(t,e.doc.direction);if(h){var v=(e.options.lineWrapping?ma:ga)(e,t,n,o,h,r,i);u=v.level!=1,l=u?v.from:v.to-1,s=u?v.to:v.from-1}var S=null,y=null,M=tr(function(Ve){var Ze=Qr(e,o,Ve);return Ze.top+=a,Ze.bottom+=a,oi(Ze,r,i,!1)?(Ze.top<=i&&Ze.left<=r&&(S=Ve,y=Ze),!0):!1},l,s),I,U,$=!1;if(y){var ue=r-y.left<y.right-r,Q=ue==u;M=S+(Q?0:1),U=Q?"after":"before",I=ue?y.left:y.right}else{!u&&(M==s||M==l)&&M++,U=M==0?"after":M==t.text.length?"before":Qr(e,o,M-(u?1:0)).bottom+a<=i==u?"after":"before";var pe=qt(e,N(n,M,U),"line",t,o);I=pe.left,$=i<pe.top?-1:i>=pe.bottom?1:0}return M=Wt(t.text,M,1),Ut(n,M,U,$,r-I)}function ga(e,t,n,r,i,o,a){var l=tr(function(v){var S=i[v],y=S.level!=1;return oi(qt(e,N(n,y?S.to:S.from,y?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,h=qt(e,N(n,u?s.from:s.to,u?"after":"before"),"line",t,r);oi(h,o,a,!0)&&h.top>a&&(s=i[l-1])}return s}function ma(e,t,n,r,i,o,a){var l=Gi(e,t,r,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var h=null,v=null,S=0;S<i.length;S++){var y=i[S];if(!(y.from>=u||y.to<=s)){var M=y.level!=1,I=Qr(e,r,M?Math.min(u,y.to)-1:Math.max(s,y.from)).right,U=I<o?o-I+1e9:I-o;(!h||v>U)&&(h=y,v=U)}}return h||(h=i[i.length-1]),h.from<s&&(h={from:s,to:h.to,level:h.level}),h.to>u&&(h={from:h.from,to:u,level:h.level}),h}var ai;function Jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ai==null){ai=B("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ai.appendChild(document.createTextNode("x")),ai.appendChild(B("br"));ai.appendChild(document.createTextNode("x"))}_(e.measure,ai);var n=ai.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),He(e.measure),n||1}function qr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=B("span","xxxxxxxxxx"),n=B("pre",[t],"CodeMirror-line-like");_(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function hn(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:Fo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Fo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ji(e){var t=Jr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/qr(e.display)-3);return function(i){if(Bn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function vn(e){var t=e.doc,n=ji(e);t.iter(function(r){var i=n(r);i!=r.height&&St(r,i)})}function pn(e,t,n,r){var i=e.display;if(!n&&Ct(t).getAttribute("cm-not-content")=="true")return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(v){return null}var s=yo(e,o,a),u;if(r&&s.xRel>0&&(u=K(e.doc,s.line).text).length==s.ch){var h=Fe(u,u.length,e.options.tabSize)-u.length;s=N(s.line,Math.max(0,Math.round((o-dn(e.display).left)/qr(e.display))-h))}return s}function Mi(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function zr(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)kr&&to(e.doc,t)<i.viewTo&&si(e);else if(n<=i.viewFrom)kr&&Yo(e.doc,n+r)>i.viewFrom?si(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)si(e);else if(t<=i.viewFrom){var o=En(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):si(e)}else if(n>=i.viewTo){var a=En(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):si(e)}else{var l=En(e,t,t,-1),s=En(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Se(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):si(e)}var u=i.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(i.externalMeasured=null))}function li(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Mi(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);Ce(a,n)==-1&&a.push(n)}}}function si(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function En(e,t,n,r){var i=Mi(e,t),o,a=e.display.view;if(!kr||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(r>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,n+=o}for(;to(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Ln(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Se(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Se(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Mi(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Se(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Mi(e,n)))),r.viewTo=n}function bo(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function Pr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ti(e,t){t===void 0&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(!(!t&&a==n.sel.primIndex)){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Kt(e,l.head,i),s||$n(e,l,o)}}return r}function Kt(e,t,n){var r=qt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(B("div","\xA0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(B("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function zt(e,t){return e.top-t.top||e.left-t.left}function $n(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=dn(e.display),l=a.left,s=Math.max(r.sizerWidth,hr(e)-r.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function h(Q,pe,Ve,Ze){pe<0&&(pe=0),pe=Math.round(pe),Ze=Math.round(Ze),o.appendChild(B("div",null,"CodeMirror-selected","position: absolute; left: "+Q+`px;
|
|
top: `+pe+"px; width: "+(Ve==null?s-Q:Ve)+`px;
|
|
height: `+(Ze-pe)+"px"))}function v(Q,pe,Ve){var Ze=K(i,Q),dt=Ze.text.length,$t,Xr;function vr(Or,Dn){return Ei(e,N(Q,Or),"div",Ze,Dn)}function In(Or,Dn,en){var _r=Vr(e,Ze,null,Or),Nr=Dn=="ltr"==(en=="after")?"left":"right",wr=en=="after"?_r.begin:_r.end-(/\s/.test(Ze.text.charAt(_r.end-1))?2:1);return vr(wr,Nr)[Nr]}var An=Lt(Ze,i.direction);return pr(An,pe||0,Ve==null?dt:Ve,function(Or,Dn,en,_r){var Nr=en=="ltr",wr=vr(Or,Nr?"left":"right"),kn=vr(Dn-1,Nr?"right":"left"),fa=pe==null&&Or==0,ko=Ve==null&&Dn==dt,sn=_r==0,Vi=!An||_r==An.length-1;if(kn.top-wr.top<=3){var $r=(u?fa:ko)&&sn,fl=(u?ko:fa)&&Vi,co=$r?l:(Nr?wr:kn).left,Uo=fl?s:(Nr?kn:wr).right;h(co,wr.top,Uo-co,wr.bottom)}else{var Ko,yn,ca,cl;Nr?(Ko=u&&fa&&sn?l:wr.left,yn=u?s:In(Or,en,"before"),ca=u?l:In(Dn,en,"after"),cl=u&&ko&&Vi?s:kn.right):(Ko=u?In(Or,en,"before"):l,yn=!u&&fa&&sn?s:wr.right,ca=!u&&ko&&Vi?l:kn.left,cl=u?In(Dn,en,"after"):s),h(Ko,wr.top,yn-Ko,wr.bottom),wr.bottom<kn.top&&h(l,wr.bottom,null,kn.top),h(ca,kn.top,cl-ca,kn.bottom)}(!$t||zt(wr,$t)<0)&&($t=wr),zt(kn,$t)<0&&($t=kn),(!Xr||zt(wr,Xr)<0)&&(Xr=wr),zt(kn,Xr)<0&&(Xr=kn)}),{start:$t,end:Xr}}var S=t.from(),y=t.to();if(S.line==y.line)v(S.line,S.ch,y.ch);else{var M=K(i,S.line),I=K(i,y.line),U=Sn(M)==Sn(I),$=v(S.line,S.ch,U?M.text.length+1:null).end,ue=v(y.line,U?0:null,y.ch).start;U&&($.top<ue.top-2?(h($.right,$.top,null,$.bottom),h(l,ue.top,ue.left,ue.bottom)):h($.right,$.top,ue.left-$.right,$.bottom)),$.bottom<ue.top&&h(l,$.bottom,null,ue.top)}n.appendChild(o)}function Ri(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ui(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function So(e){e.state.focused||(e.display.input.focus(),wo(e))}function Mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ui(e))},100)}function wo(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(ee(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),g&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ri(e))}function ui(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ee(e,"blur",e,t),e.state.focused=!1,be(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Qn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(T&&k<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-n,n=s}else{var u=i.node.getBoundingClientRect();a=u.bottom-u.top,!o&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-u.left-1)}var h=i.line.height-a;if((h>.005||h<-.005)&&(St(i.line,a),Wo(i.line),i.rest))for(var v=0;v<i.rest.length;v++)Wo(i.rest[v]);if(l>e.display.sizerWidth){var S=Math.ceil(l/qr(e.display));S>e.display.maxLineLength&&(e.display.maxLineLength=S,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Wo(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Co(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-wn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=rr(t,r),a=rr(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=rr(t,zn(K(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=rr(t,zn(K(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Io(e,t){if(!ne(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!Me){var o=B("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-n.viewOffset-wn(e.display))+`px;
|
|
height: `+(t.bottom-t.top+Hr(e)+n.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function xo(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(t=t.ch?N(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,n=t.sticky=="before"?N(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=qt(e,t),s=!n||n==t?l:qt(e,n);i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r};var u=Ai(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(Yi(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(a=!0)),u.scrollLeft!=null&&(Tn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(a=!0)),!a)break}return i}function Ho(e,t){var n=Ai(e,t);n.scrollTop!=null&&Yi(e,n.scrollTop),n.scrollLeft!=null&&Tn(e,n.scrollLeft)}function Ai(e,t){var n=e.display,r=Jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Gr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Kn(n),s=t.top<r,u=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var h=Math.min(t.top,(u?l:t.bottom)-o);h!=i&&(a.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,S=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,y=hr(e)-n.gutters.offsetWidth,M=t.right-t.left>y;return M&&(t.right=t.left+y),t.left<10?a.scrollLeft=0:t.left<S?a.scrollLeft=Math.max(0,t.left+v-(M?0:10)):t.right>y+S-3&&(a.scrollLeft=t.right+(M?0:10)-y),a}function Di(e,t){t!=null&&(io(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function gn(e){io(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,n){(t!=null||n!=null)&&io(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function no(e,t){io(e),e.curOp.scrollToPos=t}function io(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=$o(e,t.from),r=$o(e,t.to);Zr(e,n,r,t.margin)}}function Zr(e,t,n,r){var i=Ai(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});fi(e,i.scrollLeft,i.scrollTop)}function Yi(e,t){Math.abs(e.doc.scrollTop-t)<2||(L||so(e,{top:t}),Qo(e,t,!0),L&&so(e),ao(e,100))}function Qo(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Tn(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,_o(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Xi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Kn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Hr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var ki=function(e,t,n){this.cm=n;var r=this.vert=B("div",[B("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=B("div",[B("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),me(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),me(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,T&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ki.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},ki.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ki.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ki.prototype.zeroWidthHack=function(){var e=C&&!X?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Be,this.disableVert=new Be},ki.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},ki.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var $i=function(){};$i.prototype.update=function(){return{bottom:0,right:0}},$i.prototype.setScrollLeft=function(){},$i.prototype.setScrollTop=function(){},$i.prototype.clear=function(){};function Pi(e,t){t||(t=Xi(e));var n=e.display.barWidth,r=e.display.barHeight;Qi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Qn(e),Qi(e,Xi(e)),n=e.display.barWidth,r=e.display.barHeight}function Qi(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var Bo={native:ki,null:$i};function oo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&be(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Bo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Tn(e,t):Yi(e,t)},e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Oi=0;function ci(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Oi},se(e.curOp)}function di(e){var t=e.curOp;t&&Oe(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;hi(n)})}function hi(e){for(var t=e.ops,n=0;n<t.length;n++)Vn(t[n]);for(var r=0;r<t.length;r++)Eo(t[r]);for(var i=0;i<t.length;i++)Lo(t[i]);for(var o=0;o<t.length;o++)vi(t[o]);for(var a=0;a<t.length;a++)ya(t[a])}function Vn(e){var t=e.cm,n=t.display;Sa(t),e.updateMaxLine&&xi(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new lo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Eo(e){e.updatedDisplay=e.mustUpdate&&zo(e.cm,e.update)}function Lo(e){var t=e.cm,n=t.display;e.updatedDisplay&&Qn(t),e.barMeasure=Xi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=jr(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Hr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-hr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function vi(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Tn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==E();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Pi(t,e.barMeasure),e.updatedDisplay&&mn(t,e.barMeasure),e.selectionChanged&&Ri(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&So(e.cm)}function ya(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Jo(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&Qo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Tn(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=xo(t,Ae(r,e.scrollToPos.from),Ae(r,e.scrollToPos.to),e.scrollToPos.margin);Io(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||ee(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&ee(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ee(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Yr(e,t){if(e.curOp)return t();ci(e);try{return t()}finally{di(e)}}function br(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ci(e);try{return t.apply(e,arguments)}finally{di(e)}}}function Mr(e){return function(){if(this.curOp)return e.apply(this,arguments);ci(this);try{return e.apply(this,arguments)}finally{di(this)}}}function Sr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ci(t);try{return e.apply(this,arguments)}finally{di(t)}}}function ao(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,Qe(ba,e))}function ba(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ur(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?ye(t.mode,r.state):null,s=Pt(e,o,r,!0);l&&(r.state=l),o.styles=s.styles;var u=o.styleClasses,h=s.classes;h?o.styleClasses=h:u&&(o.styleClasses=null);for(var v=!a||a.length!=o.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),S=0;!v&&S<a.length;++S)v=a[S]!=o.styles[S];v&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&ho(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ao(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Yr(e,function(){for(var o=0;o<i.length;o++)li(e,i[o],"text")})}}var lo=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Co(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=hr(e),this.force=n,this.dims=hn(e),this.events=[]};lo.prototype.signal=function(e,t){Pe(e,t)&&this.events.push(arguments)},lo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ee.apply(null,this.events[e])};function Sa(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Hr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Hr(e)+"px",t.scrollbarsClipped=!0)}function wa(e){if(e.hasFocus())return null;var t=E();if(!t||!x(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&x(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Vo(e){if(!(!e||!e.activeElt||e.activeElt==E())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&x(document.body,e.anchorNode)&&x(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function zo(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return si(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&bo(e)==0)return!1;uo(e)&&(si(e),t.dims=hn(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),kr&&(o=to(e.doc,o),a=Yo(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ln(e,o,a),n.viewOffset=zn(K(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=bo(e);if(!l&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=wa(e);return s>4&&(n.lineDiv.style.display="none"),pi(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Vo(u),He(n.cursorDiv),He(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ao(e,400)),n.updateLineNumbers=null,!0}function Jo(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==hr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Kn(e.display)-Gr(e),n.top)}),t.visible=Co(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Co(e.display,e.doc,n));if(!zo(e,t))break;Qn(e);var i=Xi(e);Pr(e),Pi(e,i),mn(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function so(e,t){var n=new lo(e,t);if(zo(e,n)){Qn(e),Jo(e,n);var r=Xi(e);Pr(e),Pi(e,r),mn(e,r),n.finish()}}function pi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(M){var I=M.nextSibling;return g&&C&&e.display.currentWheelTarget==M?M.style.display="none":M.parentNode.removeChild(M),I}for(var s=r.view,u=r.viewFrom,h=0;h<s.length;h++){var v=s[h];if(!v.hidden)if(!v.node||v.node.parentNode!=o){var S=ni(e,v,u,n);o.insertBefore(S,a)}else{for(;a!=v.node;)a=l(a);var y=i&&t!=null&&t<=u&&v.lineNumber;v.changes&&(Ce(v.changes,"gutter")>-1&&(y=!1),xt(e,v,u,n)),y&&(He(v.lineNumber),v.lineNumber.appendChild(document.createTextNode(Jt(e.options,u)))),a=v.node.nextSibling}u+=v.size}for(;a;)a=l(a)}function Zo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function mn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Hr(e)+"px"}function _o(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Fo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function uo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Jt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(B("div",[B("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Zo(e.display),!0}return!1}function gi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if(typeof o!="string"&&(a=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Ni(e){var t=e.gutters,n=e.gutterSpecs;He(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,l=t.appendChild(B("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),o=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Zo(e)}function Fi(e){Ni(e.display),zr(e),_o(e)}function qo(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=B("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=B("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=Ge("div",null,"CodeMirror-code"),i.selectionDiv=B("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=B("div",null,"CodeMirror-cursors"),i.measure=B("div",null,"CodeMirror-measure"),i.lineMeasure=B("div",null,"CodeMirror-measure"),i.lineSpace=Ge("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=Ge("div",[i.lineSpace],"CodeMirror-lines");i.mover=B("div",[o],null,"position: relative"),i.sizer=B("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=B("div",null,null,"position: absolute; height: "+Ot+"px; width: 1px;"),i.gutters=B("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=B("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=B("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),T&&k<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!g&&!(L&&ie)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=gi(r.gutters,r.lineNumbers),Ni(i),n.init(i)}var Mo=0,an=null;T?an=-.53:L?an=15:A?an=-.7:fe&&(an=-1/3);function ea(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function Ee(e){var t=ea(e);return t.x*=an,t.y*=an,t}function it(e,t){var n=ea(t),r=n.x,i=n.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(r&&l||i&&s){if(i&&C&&g){e:for(var u=t.target,h=o.view;u!=a;u=u.parentNode)for(var v=0;v<h.length;v++)if(h[v].node==u){e.display.currentWheelTarget=u;break e}}if(r&&!L&&!W&&an!=null){i&&s&&Yi(e,Math.max(0,a.scrollTop+i*an)),Tn(e,Math.max(0,a.scrollLeft+r*an)),(!i||i&&s)&&je(t),o.wheelStartX=null;return}if(i&&an!=null){var S=i*an,y=e.doc.scrollTop,M=y+o.wrapper.clientHeight;S<0?y=Math.max(0,y+S-50):M=Math.min(e.doc.height,M+S+50),so(e,{top:y,bottom:M})}Mo<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(o.wheelStartX!=null){var I=a.scrollLeft-o.wheelStartX,U=a.scrollTop-o.wheelStartY,$=U&&o.wheelDY&&U/o.wheelDY||I&&o.wheelDX&&I/o.wheelDX;o.wheelStartX=o.wheelStartY=null,$&&(an=(an*Mo+$)/(Mo+1),++Mo)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}var gt=function(e,t){this.ranges=e,this.primIndex=t};gt.prototype.primary=function(){return this.ranges[this.primIndex]},gt.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!mr(n.anchor,r.anchor)||!mr(n.head,r.head))return!1}return!0},gt.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new rt(Ar(this.ranges[t].anchor),Ar(this.ranges[t].head));return new gt(e,this.primIndex)},gt.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},gt.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(xe(t,r.from())>=0&&xe(e,r.to())<=0)return n}return-1};var rt=function(e,t){this.anchor=e,this.head=t};rt.prototype.from=function(){return Dr(this.anchor,this.head)},rt.prototype.to=function(){return Ht(this.anchor,this.head)},rt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Mt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(S,y){return xe(S.from(),y.from())}),n=Ce(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=xe(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var u=Dr(l.from(),a.from()),h=Ht(l.to(),a.to()),v=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new rt(v?h:u,v?u:h))}}return new gt(t,n)}function Jn(e,t){return new gt([new rt(e,t||e)],0)}function mi(e){return e.text?N(e.from.line+e.text.length-1,qe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ca(e,t){if(xe(e,t.from)<0)return e;if(xe(e,t.to)<=0)return mi(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=mi(t).ch-t.to.ch),N(n,r)}function To(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new rt(Ca(i.anchor,t),Ca(i.head,t)))}return Mt(e.cm,n,e.sel.primIndex)}function dl(e,t,n){return e.line==t.line?N(n.line,e.ch-t.ch+n.ch):N(n.line+(e.line-t.line),e.ch)}function fs(e,t,n){for(var r=[],i=N(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=dl(l.from,i,o),u=dl(mi(l),i,o);if(i=l.to,o=u,n=="around"){var h=e.sel.ranges[a],v=xe(h.head,h.anchor)<0;r[a]=new rt(v?u:s,v?s:u)}else r[a]=new rt(s,s)}return new gt(r,e.sel.primIndex)}function Qa(e){e.doc.mode=ge(e.options,e.doc.modeOption),xa(e)}function xa(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ao(e,100),e.state.modeGen++,e.curOp&&zr(e)}function hl(e,t){return t.from.ch==0&&t.to.ch==0&&qe(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Va(e,t,n,r){function i(ue){return n?n[ue]:null}function o(ue,Q,pe){ha(ue,Q,pe,r),Ie(ue,"change",ue,t)}function a(ue,Q){for(var pe=[],Ve=ue;Ve<Q;++Ve)pe.push(new ri(u[Ve],i(Ve),r));return pe}var l=t.from,s=t.to,u=t.text,h=K(e,l.line),v=K(e,s.line),S=qe(u),y=i(u.length-1),M=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(hl(e,t)){var I=a(0,u.length-1);o(v,v.text,y),M&&e.remove(l.line,M),I.length&&e.insert(l.line,I)}else if(h==v)if(u.length==1)o(h,h.text.slice(0,l.ch)+S+h.text.slice(s.ch),y);else{var U=a(1,u.length-1);U.push(new ri(S+h.text.slice(s.ch),y,r)),o(h,h.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,U)}else if(u.length==1)o(h,h.text.slice(0,l.ch)+u[0]+v.text.slice(s.ch),i(0)),e.remove(l.line+1,M);else{o(h,h.text.slice(0,l.ch)+u[0],i(0)),o(v,S+v.text.slice(s.ch),y);var $=a(1,u.length-1);M>1&&e.remove(l.line+1,M-1),e.insert(l.line+1,$)}Ie(e,"change",e,t)}function Ro(e,t,n){function r(i,o,a){if(i.linked)for(var l=0;l<i.linked.length;++l){var s=i.linked[l];if(s.doc!=o){var u=a&&s.sharedHist;n&&!u||(t(s.doc,u),r(s.doc,i,u))}}}r(e,null,!0)}function vl(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,vn(e),Qa(e),pl(e),e.options.lineWrapping||xi(e),e.options.mode=t.modeOption,zr(e)}function pl(e){(e.doc.direction=="rtl"?R:be)(e.display.lineDiv,"CodeMirror-rtl")}function cs(e){Yr(e,function(){pl(e),zr(e)})}function Ia(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ja(e,t){var n={from:Ar(t.from),to:mi(t),text:ht(e,t.from,t.to)};return yl(e,n,t.from.line,t.to.line+1),Ro(e,function(r){return yl(r,n,t.from.line,t.to.line+1)},!0),n}function gl(e){for(;e.length;){var t=qe(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return gl(e.done),qe(e.done);if(e.done.length&&!qe(e.done).ranges)return qe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),qe(e.done)}function ml(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,a,l;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(a=ds(i,i.lastOp==r)))l=qe(a.changes),xe(t.from,t.to)==0&&xe(t.from,l.to)==0?l.to=mi(t):a.changes.push(Ja(e,t));else{var s=qe(i.done);for((!s||!s.ranges)&&Ha(e.sel,i.done),a={changes:[Ja(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||ee(e,"historyAdded")}function hs(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vs(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||hs(e,o,qe(i.done),t))?i.done[i.done.length-1]=t:Ha(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&gl(i.undone)}function Ha(e,t){var n=qe(t);n&&n.ranges&&n.equals(e)||t.push(e)}function yl(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function ps(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function gs(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(ps(n[i]));return r}function bl(e,t){var n=gs(e,t),r=ti(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function ta(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){r.push(n?gt.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],h=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var v in u)(h=v.match(/^spans_(\d+)$/))&&Ce(t,Number(h[1]))>-1&&(qe(l)[v]=u[v],delete u[v])}}return r}function qa(e,t,n,r){if(r){var i=e.anchor;if(n){var o=xe(t,i)<0;o!=xe(n,i)<0?(i=t,t=n):o!=xe(t,n)<0&&(t=n)}return new rt(i,t)}else return new rt(n||t,t)}function Ba(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),ln(e,new gt([qa(e.sel.primary(),t,n,i)],0),r)}function Sl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=qa(e.sel.ranges[o],t[o],null,i);var a=Mt(e.cm,r,e.sel.primIndex);ln(e,a,n)}function el(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,ln(e,Mt(e.cm,i,e.sel.primIndex),r)}function wl(e,t,n,r){ln(e,Jn(t,n),r)}function ms(e,t,n){var r={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new rt(Ae(e,i[o].anchor),Ae(e,i[o].head))},origin:n&&n.origin};return ee(e,"beforeSelectionChange",e,r),e.cm&&ee(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Mt(e.cm,r.ranges,r.ranges.length-1):t}function Cl(e,t,n){var r=e.history.done,i=qe(r);i&&i.ranges?(r[r.length-1]=t,za(e,t,n)):ln(e,t,n)}function ln(e,t,n){za(e,t,n),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function za(e,t,n){(Pe(e,"beforeSelectionChange")||e.cm&&Pe(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,n));var r=n&&n.bias||(xe(t.primary().head,e.sel.primary().head)<0?-1:1);xl(e,Ll(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&gn(e.cm)}function xl(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ke(e.cm)),Ie(e,"cursorActivity",e))}function El(e){xl(e,Ll(e,e.sel,null,!1))}function Ll(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Za(e,a.anchor,l&&l.anchor,n,r),u=Za(e,a.head,l&&l.head,n,r);(i||s!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new rt(s,u))}return i?Mt(e.cm,i,t.primIndex):t}function ra(e,t,n,r,i){var o=K(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,h="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(h?l.to>=t.ch:l.to>t.ch))){if(i&&(ee(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(n){var v=s.find(r<0?1:-1),S=void 0;if((r<0?h:u)&&(v=Ml(e,v,-r,v&&v.line==t.line?o:null)),v&&v.line==t.line&&(S=xe(v,n))&&(r<0?S<0:S>0))return ra(e,v,t,r,i)}var y=s.find(r<0?-1:1);return(r<0?u:h)&&(y=Ml(e,y,r,y.line==t.line?o:null)),y?ra(e,y,t,r,i):null}}return t}function Za(e,t,n,r,i){var o=r||1,a=ra(e,t,n,o,i)||!i&&ra(e,t,n,o,!0)||ra(e,t,n,-o,i)||!i&&ra(e,t,n,-o,!0);return a||(e.cantEdit=!0,N(e.first,0))}function Ml(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Ae(e,N(t.line-1)):null:n>0&&t.ch==(r||K(e,t.line)).text.length?t.line<e.first+e.size-1?N(t.line+1,0):null:new N(t.line,t.ch+n)}function Tl(e){e.setSelection(N(e.firstLine(),0),N(e.lastLine()),Je)}function Rl(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(i,o,a,l){i&&(r.from=Ae(e,i)),o&&(r.to=Ae(e,o)),a&&(r.text=a),l!==void 0&&(r.origin=l)}),ee(e,"beforeChange",e,r),e.cm&&ee(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function na(e,t,n){if(e.cm){if(!e.cm.curOp)return br(e.cm,na)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((Pe(e,"beforeChange")||e.cm&&Pe(e.cm,"beforeChange"))&&(t=Rl(e,t,!0),!t))){var r=Lr&&!n&&cn(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Al(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Al(e,t)}}function Al(e,t){if(!(t.text.length==1&&t.text[0]==""&&xe(t.from,t.to)==0)){var n=To(e,t);ml(e,t,n,e.cm?e.cm.curOp.id:NaN),Ea(e,t,n,ti(e,t));var r=[];Ro(e,function(i,o){!o&&Ce(r,i.history)==-1&&(Ol(i.history,t),r.push(i.history)),Ea(i,t,null,ti(i,t))})}}function _a(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,a=e.sel,l=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u<l.length&&(o=l[u],!(n?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=l.pop(),o.ranges){if(Ha(o,s),n&&!o.equals(e.sel)){ln(e,o,{clearRedo:!1});return}a=o}else if(r){l.push(o);return}else break;var h=[];Ha(a,s),s.push({changes:h,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var v=Pe(e,"beforeChange")||e.cm&&Pe(e.cm,"beforeChange"),S=function(I){var U=o.changes[I];if(U.origin=t,v&&!Rl(e,U,!1))return l.length=0,{};h.push(Ja(e,U));var $=I?To(e,U):qe(l);Ea(e,U,$,bl(e,U)),!I&&e.cm&&e.cm.scrollIntoView({from:U.from,to:mi(U)});var ue=[];Ro(e,function(Q,pe){!pe&&Ce(ue,Q.history)==-1&&(Ol(Q.history,U),ue.push(Q.history)),Ea(Q,U,null,bl(Q,U))})},y=o.changes.length-1;y>=0;--y){var M=S(y);if(M)return M.v}}}}function Dl(e,t){if(t!=0&&(e.first+=t,e.sel=new gt(er(e.sel.ranges,function(i){return new rt(N(i.anchor.line+t,i.anchor.ch),N(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){zr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)li(e.cm,r,"gutter")}}function Ea(e,t,n,r){if(e.cm&&!e.cm.curOp)return br(e.cm,Ea)(e,t,n,r);if(t.to.line<e.first){Dl(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Dl(e,i),t={from:N(e.first,0),to:N(t.to.line+i,t.to.ch),text:[qe(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:N(o,K(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ht(e,t.from,t.to),n||(n=To(e,t)),e.cm?ys(e.cm,t,r):Va(e,t,r),za(e,n,Je),e.cantEdit&&Za(e,N(e.firstLine(),0))&&(e.cantEdit=!1)}}function ys(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=lt(Sn(K(r,o.line))),r.iter(s,a.line+1,function(y){if(y==i.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ke(e),Va(r,t,n,ji(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(y){var M=Ci(y);M>i.maxLineLength&&(i.maxLine=y,i.maxLineLength=M,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Wr(r,o.line),ao(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?zr(e):o.line==a.line&&t.text.length==1&&!hl(e.doc,t)?li(e,o.line,"text"):zr(e,o.line,a.line+1,u);var h=Pe(e,"changes"),v=Pe(e,"change");if(v||h){var S={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};v&&Ie(e,"change",e,S),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(S)}e.display.selForContextMenu=null}function ia(e,t,n,r,i){var o;r||(r=n),xe(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),na(e,{from:n,to:r,text:t,origin:i})}function kl(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Pl(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)kl(o.ranges[l].anchor,t,n,r),kl(o.ranges[l].head,t,n,r);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(n<u.from.line)u.from=N(u.from.line+r,u.from.ch),u.to=N(u.to.line+r,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function Ol(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Pl(e.done,n,r,i),Pl(e.undone,n,r,i)}function La(e,t,n,r){var i=t,o=t;return typeof t=="number"?o=K(e,Pn(e,t)):i=lt(t),i==null?null:(r(o,i)&&e.cm&&li(e.cm,i,n),o)}function Ma(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}Ma.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,va(i),Ie(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function Ta(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Ta.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ma))){var l=[];this.collapse(l),this.children=[new Ma(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new Ma(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Ta(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=Ce(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new Ta(e.children);r.parent=e,e.children=[r,n],e=r}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if((t-=a)==0)break;e=0}else e-=o}}};var Ra=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Ra.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=lt(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Ur(this);St(n,Math.max(0,n.height-o)),e&&(Yr(e,function(){Nl(e,n,-o),li(e,r,"widget")}),Ie(e,"lineWidgetCleared",e,this,r))}},Ra.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Ur(this)-t;i&&(Bn(this.doc,r)||St(r,r.height+i),n&&Yr(n,function(){n.curOp.forceUpdate=!0,Nl(n,r,i),Ie(n,"lineWidgetChanged",n,e,lt(r))}))},pt(Ra);function Nl(e,t,n){zn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Di(e,n)}function bs(e,t,n,r){var i=new Ra(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),La(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!Bn(e,a)){var s=zn(a)<e.scrollTop;St(a,a.height+Ur(i)),s&&Di(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&Ie(o,"lineWidgetAdded",o,i,typeof t=="number"?t:lt(t)),i}var Fl=0,Ao=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Fl};Ao.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ci(e),Pe(this,"clear")){var n=this.find();n&&Ie(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Si(a.markedSpans,this);e&&!this.collapsed?li(e,lt(a),"text"):e&&(l.to!=null&&(i=lt(a)),l.from!=null&&(r=lt(a))),a.markedSpans=zi(a.markedSpans,l),l.from==null&&this.collapsed&&!Bn(this.doc,a)&&e&&St(a,Jr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=Sn(this.lines[s]),h=Ci(u);h>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&zr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&El(e.doc)),e&&Ie(e,"markerCleared",e,this,r,i),t&&di(e),this.parent&&this.parent.clear()}},Ao.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],a=Si(o.markedSpans,this);if(a.from!=null&&(n=N(t?o:lt(o),a.from),e==-1))return n;if(a.to!=null&&(r=N(t?o:lt(o),a.to),e==1))return r}return n&&{from:n,to:r}},Ao.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||Yr(r,function(){var i=t.line,o=lt(t.line),a=Bt(r,o);if(a&&(xn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Bn(n.doc,i)&&n.height!=null){var l=n.height;n.height=null;var s=Ur(n)-l;s&&St(i,i.height+s)}Ie(r,"markerChanged",r,e)})},Ao.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Ce(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ao.prototype.detachLine=function(e){if(this.lines.splice(Ce(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},pt(Ao);function oa(e,t,n,r,i){if(r&&r.shared)return Ss(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return br(e.cm,oa)(e,t,n,r,i);var o=new Ao(e,i),a=xe(t,n);if(r&&Ue(r,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Ge("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Oo(e,t.line,t,n,o)||t.line!=n.line&&Oo(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Bi()}o.addToHistory&&ml(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,u;if(e.iter(l,n.line+1,function(v){s&&o.collapsed&&!s.options.lineWrapping&&Sn(v)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&St(v,0),Po(v,new ei(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(v){Bn(e,v)&&St(v,0)}),o.clearOnEnter&&me(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Ji(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Fl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)zr(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=n.line;h++)li(s,h,"text");o.atomic&&El(s.doc),Ie(s,"markerAdded",s,o)}return o}var Aa=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Aa.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Ie(this,"clear")}},Aa.prototype.find=function(e,t){return this.primary.find(e,t)},pt(Aa);function Ss(e,t,n,r,i){r=Ue(r),r.shared=!1;var o=[oa(e,t,n,r,i)],a=o[0],l=r.widgetNode;return Ro(e,function(s){l&&(r.widgetNode=l.cloneNode(!0)),o.push(oa(s,Ae(s,t),Ae(s,n),r,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=qe(o)}),new Aa(o,a)}function Wl(e){return e.findMarks(N(e.first,0),e.clipPos(N(e.lastLine())),function(t){return t.parent})}function ws(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(xe(o,a)){var l=oa(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function Cs(e){for(var t=function(r){var i=e[r],o=[i.primary.doc];Ro(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];Ce(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},n=0;n<e.length;n++)t(n)}var xs=0,Rn=function(e,t,n,r,i){if(!(this instanceof Rn))return new Rn(e,t,n,r,i);n==null&&(n=0),Ta.call(this,[new Ma([new ri("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=N(n,0);this.sel=Jn(o),this.history=new Ia(null),this.id=++xs,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Va(this,{from:o,to:o,text:e}),ln(this,Jn(o),Je)};Rn.prototype=Tt(Ta.prototype,{constructor:Rn,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Yt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Sr(function(e){var t=N(this.first,0),n=this.first+this.size-1;na(this,{from:t,to:N(n,K(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&fi(this.cm,0,0),ln(this,Jn(t),Je)}),replaceRange:function(e,t,n,r){t=Ae(this,t),n=n?Ae(this,n):t,ia(this,e,t,n,r)},getRange:function(e,t,n){var r=ht(this,Ae(this,e),Ae(this,t));return n===!1?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(kt(this,e))return K(this,e)},getLineNumber:function(e){return lt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=K(this,e)),Sn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ae(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Sr(function(e,t,n){wl(this,Ae(this,typeof e=="number"?N(e,t||0):e),null,n)}),setSelection:Sr(function(e,t,n){wl(this,Ae(this,e),Ae(this,t||e),n)}),extendSelection:Sr(function(e,t,n){Ba(this,Ae(this,e),t&&Ae(this,t),n)}),extendSelections:Sr(function(e,t){Sl(this,Cr(this,e),t)}),extendSelectionsBy:Sr(function(e,t){var n=er(this.sel.ranges,e);Sl(this,Cr(this,n),t)}),setSelections:Sr(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new rt(Ae(this,e[i].anchor),Ae(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),ln(this,Mt(this.cm,r,t),n)}}),addSelection:Sr(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new rt(Ae(this,e),Ae(this,t||e))),ln(this,Mt(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=ht(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=ht(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Sr(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&t!="end"&&fs(this,r,t),s=r.length-1;s>=0;s--)na(this,r[s]);l?Cl(this,l):this.cm&&gn(this.cm)}),undo:Sr(function(){_a(this,"undo")}),redo:Sr(function(){_a(this,"redo")}),undoSelection:Sr(function(){_a(this,"undo",!0)}),redoSelection:Sr(function(){_a(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Ia(this.history.maxGeneration),Ro(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ta(this.history.done),undone:ta(this.history.undone)}},setHistory:function(e){var t=this.history=new Ia(this.history.maxGeneration);t.done=ta(e.done.slice(0),null,!0),t.undone=ta(e.undone.slice(0),null,!0)},setGutterMarker:Sr(function(e,t,n){return La(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&_t(i)&&(r.gutterMarkers=null),!0})}),clearGutter:Sr(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&La(t,n,"gutter",function(){return n.gutterMarkers[e]=null,_t(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!kt(this,e)||(t=e,e=K(this,e),!e))return null}else if(t=lt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Sr(function(e,t,n){return La(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[i])r[i]=n;else{if(he(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:Sr(function(e,t,n){return La(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=r[i];if(o)if(n==null)r[i]=null;else{var a=o.match(he(n));if(!a)return!1;var l=a.index+a[0].length;r[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:Sr(function(e,t,n){return bs(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return oa(this,Ae(this,e),Ae(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Ae(this,e),oa(this,e,e,n,"bookmark")},findMarksAt:function(e){e=Ae(this,e);var t=[],n=K(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Ae(this,e),t=Ae(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];!(s.to!=null&&i==e.line&&e.ch>=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n}),Ae(this,N(n,t))},indexFromPos:function(e){e=Ae(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+n}),t},copy:function(e){var t=new Rn(Yt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new Rn(Yt(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],ws(r,Wl(this)),r},unlinkDoc:function(e){if(e instanceof cr&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Cs(Wl(this));break}}if(e.history==this.history){var r=[e.id];Ro(e,function(i){return r.push(i.id)},!0),e.history=new Ia(null),e.history.done=ta(this.history.done,r),e.history.undone=ta(this.history.undone,r)}},iterLinkedDocs:function(e){Ro(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):b(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Sr(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&cs(this.cm))})}),Rn.prototype.eachLine=Rn.prototype.iter;var Il=0;function Es(e){var t=this;if(Hl(t),!(ne(t,e)||Kr(t.display,e))){je(e),T&&(Il=+new Date);var n=pn(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(){++a==i&&br(t,function(){n=Ae(t.doc,n);var y={from:n,to:n,text:t.doc.splitLines(o.filter(function(M){return M!=null}).join(t.doc.lineSeparator())),origin:"paste"};na(t.doc,y),Cl(t.doc,Jn(Ae(t.doc,n),Ae(t.doc,mi(y))))})()},s=function(y,M){if(t.options.allowDropFileTypes&&Ce(t.options.allowDropFileTypes,y.type)==-1){l();return}var I=new FileReader;I.onerror=function(){return l()},I.onload=function(){var U=I.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(U)){l();return}o[M]=U,l()},I.readAsText(y)},u=0;u<r.length;u++)s(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),za(t.doc,Jn(n,n)),v)for(var S=0;S<v.length;++S)ia(t.doc,"",v[S].anchor,v[S].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch(y){}}}}function Ls(e,t){if(T&&(!e.state.draggingText||+new Date-Il<100)){ut(t);return}if(!(ne(e,t)||Kr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!fe)){var n=B("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",W&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),W&&n.parentNode.removeChild(n)}}function Ms(e,t){var n=pn(e,t);if(n){var r=document.createDocumentFragment();Kt(e,n,r),e.display.dragCursor||(e.display.dragCursor=B("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),_(e.display.dragCursor,r)}}function Hl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Bl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var o=0;o<n.length;o++)e(n[o])})}}var zl=!1;function Ts(){zl||(Rs(),zl=!0)}function Rs(){var e;me(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Bl(As)},100))}),me(window,"blur",function(){return Bl(ui)})}function As(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Do={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Da=0;Da<10;Da++)Do[Da+48]=Do[Da+96]=String(Da);for(var Ua=65;Ua<=90;Ua++)Do[Ua]=String.fromCharCode(Ua);for(var ka=1;ka<=12;ka++)Do[ka+111]=Do[ka+63235]="F"+ka;var fo={};fo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},fo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},fo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},fo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},fo.default=C?fo.macDefault:fo.pcDefault;function Ds(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function ks(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r=="..."){delete e[n];continue}for(var i=er(n.split(" "),Ds),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=r):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(!s)t[l]=a;else if(s!=a)throw new Error("Inconsistent bindings for "+l)}delete e[n]}for(var u in t)e[u]=t[u];return e}function aa(e,t,n,r){t=Ka(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&n(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return aa(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=aa(e,t.fallthrough[o],n,r);if(a)return a}}}function Zl(e){var t=typeof e=="string"?e:Do[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function _l(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function Ul(e,t){if(W&&e.keyCode==34&&e.char)return!1;var n=Do[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),_l(n,e,t))}function Ka(e){return typeof e=="string"?fo[e]:e}function la(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&xe(o.from,qe(r).to)<=0;){var a=r.pop();if(xe(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Yr(e,function(){for(var l=r.length-1;l>=0;l--)ia(e.doc,"",r[l].from,r[l].to,"+delete");gn(e)})}function tl(e,t,n){var r=Wt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function rl(e,t,n){var r=tl(e,t.ch,n);return r==null?null:new N(t.line,r,n<0?"after":"before")}function nl(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Lt(n,t.doc.direction);if(o){var a=i<0?qe(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var h=Br(t,n);u=i<0?n.text.length-1:0;var v=Qr(t,h,u).top;u=tr(function(S){return Qr(t,h,S).top==v},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=tl(n,u,1))}else u=i<0?a.to:a.from;return new N(r,u,s)}}return new N(r,i<0?n.text.length:0,i<0?"before":"after")}function Ps(e,t,n,r){var i=Lt(t,e.doc.direction);if(!i)return rl(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=gr(i,n.ch,n.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return rl(t,n,r);var l=function($,ue){return tl(t,$ instanceof N?$.ch:$,ue)},s,u=function($){return e.options.lineWrapping?(s=s||Br(e,t),Vr(e,t,s,$)):{begin:0,end:t.text.length}},h=u(n.sticky=="before"?l(n,-1):n.ch);if(e.doc.direction=="rtl"||a.level==1){var v=a.level==1==r<0,S=l(n,v?1:-1);if(S!=null&&(v?S<=a.to&&S<=h.end:S>=a.from&&S>=h.begin)){var y=v?"before":"after";return new N(n.line,S,y)}}var M=function($,ue,Q){for(var pe=function($t,Xr){return Xr?new N(n.line,l($t,1),"before"):new N(n.line,$t,"after")};$>=0&&$<i.length;$+=ue){var Ve=i[$],Ze=ue>0==(Ve.level!=1),dt=Ze?Q.begin:l(Q.end,-1);if(Ve.from<=dt&&dt<Ve.to||(dt=Ze?Ve.from:l(Ve.to,-1),Q.begin<=dt&&dt<Q.end))return pe(dt,Ze)}},I=M(o+r,r,h);if(I)return I;var U=r>0?h.end:l(h.begin,-1);return U!=null&&!(r>0&&U==t.text.length)&&(I=M(r>0?0:i.length-1,r,u(U)),I)?I:null}var Pa={selectAll:Tl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Je)},killLine:function(e){return la(e,function(t){if(t.empty()){var n=K(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:N(t.head.line+1,0)}:{from:t.head,to:N(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return la(e,function(t){return{from:N(t.from().line,0),to:Ae(e.doc,N(t.to().line+1,0))}})},delLineLeft:function(e){return la(e,function(t){return{from:N(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return la(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return la(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(N(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(N(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Kl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Gl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Os(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},st)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},st)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?Gl(e,t.head):r},st)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=Fe(e.getLine(o.line),o.ch,r);t.push(bt(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Yr(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=K(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new N(i.line,i.ch-1)),i.ch>0)i=new N(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),N(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=K(e.doc,i.line-1).text;a&&(i=new N(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),N(i.line-1,a.length-1),i,"+transpose"))}}n.push(new rt(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Yr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);gn(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Kl(e,t){var n=K(e.doc,t),r=Sn(n);return r!=n&&(t=lt(r)),nl(!0,e,r,t,1)}function Os(e,t){var n=K(e.doc,t),r=da(n);return r!=n&&(t=lt(r)),nl(!0,e,n,t,-1)}function Gl(e,t){var n=Kl(e,t.line),r=K(e.doc,n.line),i=Lt(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return N(n.line,a?0:o,n.sticky)}return n}function Ga(e,t,n){if(typeof t=="string"&&(t=Pa[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Nt}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function Ns(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=aa(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&aa(t,e.options.extraKeys,n,e)||aa(t,e.options.keyMap,n,e)}var Fs=new Be;function Oa(e,t,n,r){var i=e.state.keySeq;if(i){if(Zl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Fs.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),jl(e,i+" "+t,n,r))return!0}return jl(e,t,n,r)}function jl(e,t,n,r){var i=Ns(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Ie(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(je(n),Ri(e)),!!i}function Yl(e,t){var n=Ul(t,!0);return n?t.shiftKey&&!e.state.keySeq?Oa(e,"Shift-"+n,t,function(r){return Ga(e,r,!0)})||Oa(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Ga(e,r)}):Oa(e,n,t,function(r){return Ga(e,r)}):!1}function Ws(e,t,n){return Oa(e,"'"+n+"'",t,function(r){return Ga(e,r,!0)})}var il=null;function Xl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=E(),!ne(t,e))){T&&k<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Yl(t,e);W&&(il=r?n:null,!r&&n==88&&!D&&(C?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),L&&!C&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Is(t)}}function Is(e){var t=e.display.lineDiv;R(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(be(t,"CodeMirror-crosshair"),ce(document,"keyup",n),ce(document,"mouseover",n))}me(document,"keyup",n),me(document,"mouseover",n)}function $l(e){e.keyCode==16&&(this.doc.sel.shift=!1),ne(this,e)}function Ql(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Kr(t.display,e)||ne(t,e)||e.ctrlKey&&!e.altKey||C&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(W&&n==il){il=null,je(e);return}if(!(W&&(!e.which||e.which<10)&&Yl(t,e))){var i=String.fromCharCode(r==null?n:r);i!="\b"&&(Ws(t,e,i)||t.display.input.onKeyPress(e))}}}var Hs=400,ol=function(e,t,n){this.time=e,this.pos=t,this.button=n};ol.prototype.compare=function(e,t,n){return this.time+Hs>e&&xe(t,this.pos)==0&&n==this.button};var Na,Fa;function Bs(e,t){var n=+new Date;return Fa&&Fa.compare(n,e,t)?(Na=Fa=null,"triple"):Na&&Na.compare(n,e,t)?(Fa=new ol(n,e,t),Na=null,"double"):(Na=new ol(n,e,t),Fa=null,"single")}function Vl(e){var t=this,n=t.display;if(!(ne(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Kr(n,e)){g||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!al(t,e)){var r=pn(t,e),i=_e(e),o=r?Bs(r,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&zs(t,i,r,o,e))&&(i==1?r?_s(t,r,o,e):Ct(e)==n.scroller&&je(e):i==2?(r&&Ba(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(z?t.display.input.onContextMenu(e):Mn(t)))}}}function zs(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,Oa(e,_l(o,i),i,function(a){if(typeof a=="string"&&(a=Pa[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,n)!=Nt}finally{e.state.suppressEdits=!1}return l})}function Zs(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=Ne?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=C?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(C?n.altKey:n.ctrlKey)),i}function _s(e,t,n,r){T?setTimeout(Qe(So,e),0):e.curOp.focus=E();var i=Zs(e,n,r),o=e.doc.sel,a;e.options.dragDrop&&ze&&!e.isReadOnly()&&n=="single"&&(a=o.contains(t))>-1&&(xe((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(xe(a.to(),t)>0||t.xRel<0)?Us(e,r,t,i):Ks(e,r,t,i)}function Us(e,t,n,r){var i=e.display,o=!1,a=br(e,function(u){g&&(i.scroller.draggable=!1),e.state.draggingText=!1,ce(i.wrapper.ownerDocument,"mouseup",a),ce(i.wrapper.ownerDocument,"mousemove",l),ce(i.scroller,"dragstart",s),ce(i.scroller,"drop",a),o||(je(u),r.addNew||Ba(e.doc,n,null,null,r.extend),g&&!fe||T&&k==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};g&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),me(i.wrapper.ownerDocument,"mouseup",a),me(i.wrapper.ownerDocument,"mousemove",l),me(i.scroller,"dragstart",s),me(i.scroller,"drop",a),Mn(e),setTimeout(function(){return i.input.focus()},20)}function Jl(e,t,n){if(n=="char")return new rt(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new rt(N(t.line,0),Ae(e.doc,N(t.line+1,0)));var r=n(e,t);return new rt(r.from,r.to)}function Ks(e,t,n,r){var i=e.display,o=e.doc;je(t);var a,l,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),l>-1?a=u[l]:a=new rt(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),r.unit=="rectangle")r.addNew||(a=new rt(n,n)),n=pn(e,t,!0,!0),l=-1;else{var h=Jl(e,n,r.unit);r.extend?a=qa(a,h.anchor,h.head,r.extend):a=h}r.addNew?l==-1?(l=u.length,ln(o,Mt(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&r.unit=="char"&&!r.extend?(ln(o,Mt(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):el(o,l,a,yt):(l=0,ln(o,new gt([a],0),yt),s=o.sel);var v=n;function S(Q){if(xe(v,Q)!=0)if(v=Q,r.unit=="rectangle"){for(var pe=[],Ve=e.options.tabSize,Ze=Fe(K(o,n.line).text,n.ch,Ve),dt=Fe(K(o,Q.line).text,Q.ch,Ve),$t=Math.min(Ze,dt),Xr=Math.max(Ze,dt),vr=Math.min(n.line,Q.line),In=Math.min(e.lastLine(),Math.max(n.line,Q.line));vr<=In;vr++){var An=K(o,vr).text,Or=Gt(An,$t,Ve);$t==Xr?pe.push(new rt(N(vr,Or),N(vr,Or))):An.length>Or&&pe.push(new rt(N(vr,Or),N(vr,Gt(An,Xr,Ve))))}pe.length||pe.push(new rt(n,n)),ln(o,Mt(e,s.ranges.slice(0,l).concat(pe),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Q)}else{var Dn=a,en=Jl(e,Q,r.unit),_r=Dn.anchor,Nr;xe(en.anchor,_r)>0?(Nr=en.head,_r=Dr(Dn.from(),en.anchor)):(Nr=en.anchor,_r=Ht(Dn.to(),en.head));var wr=s.ranges.slice(0);wr[l]=Gs(e,new rt(Ae(o,_r),Nr)),ln(o,Mt(e,wr,l),yt)}}var y=i.wrapper.getBoundingClientRect(),M=0;function I(Q){var pe=++M,Ve=pn(e,Q,!0,r.unit=="rectangle");if(Ve)if(xe(Ve,v)!=0){e.curOp.focus=E(),S(Ve);var Ze=Co(i,o);(Ve.line>=Ze.to||Ve.line<Ze.from)&&setTimeout(br(e,function(){M==pe&&I(Q)}),150)}else{var dt=Q.clientY<y.top?-20:Q.clientY>y.bottom?20:0;dt&&setTimeout(br(e,function(){M==pe&&(i.scroller.scrollTop+=dt,I(Q))}),50)}}function U(Q){e.state.selectingText=!1,M=1/0,Q&&(je(Q),i.input.focus()),ce(i.wrapper.ownerDocument,"mousemove",$),ce(i.wrapper.ownerDocument,"mouseup",ue),o.history.lastSelOrigin=null}var $=br(e,function(Q){Q.buttons===0||!_e(Q)?U(Q):I(Q)}),ue=br(e,U);e.state.selectingText=ue,me(i.wrapper.ownerDocument,"mousemove",$),me(i.wrapper.ownerDocument,"mouseup",ue)}function Gs(e,t){var n=t.anchor,r=t.head,i=K(e.doc,n.line);if(xe(n,r)==0&&n.sticky==r.sticky)return t;var o=Lt(i);if(!o)return t;var a=gr(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s=a+(l.from==n.ch==(l.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(r.line!=n.line)u=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var h=gr(o,r.ch,r.sticky),v=h-a||(r.ch-n.ch)*(l.level==1?-1:1);h==s-1||h==s?u=v<0:u=v>0}var S=o[s+(u?-1:0)],y=u==(S.level==1),M=y?S.from:S.to,I=y?"after":"before";return n.ch==M&&n.sticky==I?t:new rt(new N(n.line,M,I),r)}function ql(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(S){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&je(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Pe(e,n))return Vt(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){var h=rr(e.doc,o),v=e.display.gutterSpecs[s];return ee(e,n,e,h,v.className,t),Vt(t)}}}function al(e,t){return ql(e,t,"gutterClick",!0)}function es(e,t){Kr(e.display,t)||js(e,t)||ne(e,t,"contextmenu")||z||e.display.input.onContextMenu(t)}function js(e,t){return Pe(e,"gutterContextMenu")?ql(e,t,"gutterContextMenu",!1):!1}function ts(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),rn(e)}var sa={toString:function(){return"CodeMirror.Init"}},rs={},ja={};function Ys(e){var t=e.optionHandlers;function n(r,i,o,a){e.defaults[r]=i,o&&(t[r]=a?function(l,s,u){u!=sa&&o(l,s,u)}:o)}e.defineOption=n,e.Init=sa,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Qa(r)},!0),n("indentUnit",2,Qa,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){xa(r),rn(r),zr(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],a=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var h=s.text.indexOf(i,u);if(h==-1)break;u=h+i.length,o.push(N(a,h))}a++});for(var l=o.length-1;l>=0;l--)ia(r.doc,i,o[l],N(o[l].line,o[l].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=sa&&r.refresh()}),n("specialCharPlaceholder",d,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",ie?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!ot),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){ts(r),Fi(r)},!0),n("keyMap","default",function(r,i,o){var a=Ka(i),l=o!=sa&&Ka(o);l&&l.detach&&l.detach(r,a),a.attach&&a.attach(r,l||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,$s,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=gi(i,r.options.lineNumbers),Fi(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Fo(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Pi(r)},!0),n("scrollbarStyle","native",function(r){oo(r),Pi(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=gi(r.options.gutters,i),Fi(r)},!0),n("firstLineNumber",1,Fi,!0),n("lineNumberFormatter",function(r){return r},Fi,!0),n("showCursorWhenSelecting",!1,Pr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(ui(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Xs),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Pr,!0),n("singleCursorHeightPerLine",!0,Pr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,xa,!0),n("addModeClass",!1,xa,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,xa,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Xs(e,t,n){var r=n&&n!=sa;if(!t!=!r){var i=e.display.dragFunctions,o=t?me:ce;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function $s(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(be(e.display.wrapper,"CodeMirror-wrap"),xi(e)),vn(e),zr(e),rn(e),setTimeout(function(){return Pi(e)},100)}function cr(e,t){var n=this;if(!(this instanceof cr))return new cr(e,t);this.options=t=t?Ue(t):{},Ue(rs,t,!1);var r=t.value;typeof r=="string"?r=new Rn(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new cr.inputStyles[t.inputStyle](this),o=this.display=new qo(e,r,i,t);o.wrapper.CodeMirror=this,ts(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),oo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Be,keySeq:null,specialChars:null},t.autofocus&&!ie&&o.input.focus(),T&&k<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Qs(this),Ts(),ci(this),this.curOp.forceUpdate=!0,vl(this,r),t.autofocus&&!ie||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&wo(n)},20):ui(this);for(var a in ja)ja.hasOwnProperty(a)&&ja[a](this,t[a],sa);uo(this),t.finishInit&&t.finishInit(this);for(var l=0;l<ll.length;++l)ll[l](this);di(this),g&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}cr.defaults=rs,cr.optionHandlers=ja;function Qs(e){var t=e.display;me(t.scroller,"mousedown",br(e,Vl)),T&&k<11?me(t.scroller,"dblclick",br(e,function(s){if(!ne(e,s)){var u=pn(e,s);if(!(!u||al(e,s)||Kr(e.display,s))){je(s);var h=e.findWordAt(u);Ba(e.doc,h.anchor,h.head)}}})):me(t.scroller,"dblclick",function(s){return ne(e,s)||je(s)}),me(t.scroller,"contextmenu",function(s){return es(e,s)}),me(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||es(e,s)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function o(s){if(s.touches.length!=1)return!1;var u=s.touches[0];return u.radiusX<=1&&u.radiusY<=1}function a(s,u){if(u.left==null)return!0;var h=u.left-s.left,v=u.top-s.top;return h*h+v*v>20*20}me(t.scroller,"touchstart",function(s){if(!ne(e,s)&&!o(s)&&!al(e,s)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),me(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),me(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!Kr(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var h=e.coordsChar(t.activeTouch,"page"),v;!u.prev||a(u,u.prev)?v=new rt(h,h):!u.prev.prev||a(u,u.prev.prev)?v=e.findWordAt(h):v=new rt(N(h.line,0),Ae(e.doc,N(h.line+1,0))),e.setSelection(v.anchor,v.head),e.focus(),je(s)}i()}),me(t.scroller,"touchcancel",i),me(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Yi(e,t.scroller.scrollTop),Tn(e,t.scroller.scrollLeft,!0),ee(e,"scroll",e))}),me(t.scroller,"mousewheel",function(s){return it(e,s)}),me(t.scroller,"DOMMouseScroll",function(s){return it(e,s)}),me(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){ne(e,s)||ut(s)},over:function(s){ne(e,s)||(Ms(e,s),ut(s))},start:function(s){return Ls(e,s)},drop:br(e,Es),leave:function(s){ne(e,s)||Hl(e)}};var l=t.input.getField();me(l,"keyup",function(s){return $l.call(e,s)}),me(l,"keydown",br(e,Xl)),me(l,"keypress",br(e,Ql)),me(l,"focus",function(s){return wo(e,s)}),me(l,"blur",function(s){return ui(e,s)})}var ll=[];cr.defineInitHook=function(e){return ll.push(e)};function Wa(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=ur(e,t).state:n="prev");var a=e.options.tabSize,l=K(i,t),s=Fe(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],h;if(!r&&!/\S/.test(l.text))h=0,n="not";else if(n=="smart"&&(h=i.mode.indent(o,l.text.slice(u.length),l.text),h==Nt||h>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?h=Fe(K(i,t-1).text,null,a):h=0:n=="add"?h=s+e.options.indentUnit:n=="subtract"?h=s-e.options.indentUnit:typeof n=="number"&&(h=s+n),h=Math.max(0,h);var v="",S=0;if(e.options.indentWithTabs)for(var y=Math.floor(h/a);y;--y)S+=a,v+=" ";if(S<h&&(v+=bt(h-S)),v!=u)return ia(i,v,N(t,0),N(t,u.length),"+input"),l.stateAfter=null,!0;for(var M=0;M<i.sel.ranges.length;M++){var I=i.sel.ranges[M];if(I.head.line==t&&I.head.ch<u.length){var U=N(t,u.length);el(i,M,new rt(U,U));break}}}var Wi=null;function Ya(e){Wi=e}function sl(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=b(t),u=null;if(l&&r.ranges.length>1)if(Wi&&Wi.text.join(`
|
|
`)==t){if(r.ranges.length%Wi.text.length==0){u=[];for(var h=0;h<Wi.text.length;h++)u.push(o.splitLines(Wi.text[h]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=er(s,function($){return[$]}));for(var v=e.curOp.updateInput,S=r.ranges.length-1;S>=0;S--){var y=r.ranges[S],M=y.from(),I=y.to();y.empty()&&(n&&n>0?M=N(M.line,M.ch-n):e.state.overwrite&&!l?I=N(I.line,Math.min(K(o,I.line).text.length,I.ch+qe(s).length)):l&&Wi&&Wi.lineWise&&Wi.text.join(`
|
|
`)==s.join(`
|
|
`)&&(M=I=N(M.line,0)));var U={from:M,to:I,text:u?u[S%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};na(e.doc,U),Ie(e,"inputRead",e,U)}t&&!l&&is(e,t),gn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ns(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Yr(t,function(){return sl(t,n,0,null,"paste")}),!0}function is(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Wa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(K(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Wa(e,i.head.line,"smart"));a&&Ie(e,"electricInput",e,i.head.line)}}}function os(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:N(i,0),head:N(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function as(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function ls(){var e=B("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=B("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return g?e.style.width="1000px":e.setAttribute("wrap","off"),q&&(e.style.border="1px solid black"),as(e),t}function Vs(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,a=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&&br(this,t[r])(this,i,a),ee(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](Ka(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:Mr(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");ar(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,zr(this)}),removeOverlay:Mr(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==r||typeof r=="string"&&a.name==r){i.splice(o,1),this.state.modeGen++,zr(this);return}}}),indentLine:Mr(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),kt(this.doc,r)&&Wa(this,r,i,o)}),indentSelection:Mr(function(r){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(Wa(this,l.head.line,r,!0),o=l.head.line,a==this.doc.sel.primIndex&&gn(this));else{var s=l.from(),u=l.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v<o;++v)Wa(this,v,r);var S=this.doc.sel.ranges;s.ch==0&&i.length==S.length&&S[a].from().ch>0&&el(this.doc,a,new rt(s,S[a].to()),Je)}}}),getTokenAt:function(r,i){return Hi(this,r,i)},getLineTokens:function(r,i){return Hi(this,N(r),i,!0)},getTokenTypeAt:function(r){r=Ae(this.doc,r);var i=Xt(this,K(this.doc,r.line)),o=0,a=(i.length-1)/2,l=r.ch,s;if(l==0)s=i[2];else for(;;){var u=o+a>>1;if((u?i[u*2-1]:0)>=l)a=u;else if(i[u*2+1]<l)o=u+1;else{s=i[u*2+2];break}}var h=s?s.indexOf("overlay "):-1;return h<0?s:h==0?null:s.slice(0,h-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var o=[];if(!n.hasOwnProperty(i))return o;var a=n[i],l=this.getModeAt(r);if(typeof l[i]=="string")a[l[i]]&&o.push(a[l[i]]);else if(l[i])for(var s=0;s<l[i].length;s++){var u=a[l[i][s]];u&&o.push(u)}else l.helperType&&a[l.helperType]?o.push(a[l.helperType]):a[l.name]&&o.push(a[l.name]);for(var h=0;h<a._global.length;h++){var v=a._global[h];v.pred(l,this)&&Ce(o,v.val)==-1&&o.push(v.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=Pn(o,r==null?o.first+o.size-1:r),ur(this,r+1,i).state},cursorCoords:function(r,i){var o,a=this.doc.sel.primary();return r==null?o=a.head:typeof r=="object"?o=Ae(this.doc,r):o=r?a.from():a.to(),qt(this,o,i||"page")},charCoords:function(r,i){return Ei(this,Ae(this.doc,r),i||"page")},coordsChar:function(r,i){return r=Xn(this,r,i||"page"),yo(this,r.left,r.top)},lineAtHeight:function(r,i){return r=Xn(this,{top:r,left:0},i||"page").top,rr(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,o){var a=!1,l;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>s&&(r=s,a=!0),l=K(this.doc,r)}else l=r;return on(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-zn(l):0)},defaultTextHeight:function(){return Jr(this.display)},defaultCharWidth:function(){return qr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,a,l){var s=this.display;r=qt(this,Ae(this.doc,r));var u=r.bottom,h=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")u=r.top;else if(a=="above"||a=="near"){var v=Math.max(s.wrapper.clientHeight,this.doc.height),S=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||r.bottom+i.offsetHeight>v)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=v&&(u=r.bottom),h+i.offsetWidth>S&&(h=S-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(h=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?h=0:l=="middle"&&(h=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=h+"px"),o&&Ho(this,{left:h,top:u,right:h+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:Mr(Xl),triggerOnKeyPress:Mr(Ql),triggerOnKeyUp:$l,triggerOnMouseDown:Mr(Vl),execCommand:function(r){if(Pa.hasOwnProperty(r))return Pa[r].call(null,this)},triggerElectric:Mr(function(r){is(this,r)}),findPosH:function(r,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=Ae(this.doc,r),u=0;u<i&&(s=ul(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:Mr(function(r,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?ul(o.doc,a.head,r,i,o.options.rtlMoveVisually):r<0?a.from():a.to()},st)}),deleteH:Mr(function(r,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):la(this,function(l){var s=ul(a,l.head,r,i,!1);return r<0?{from:s,to:l.head}:{from:l.head,to:s}})}),findPosV:function(r,i,o,a){var l=1,s=a;i<0&&(l=-1,i=-i);for(var u=Ae(this.doc,r),h=0;h<i;++h){var v=qt(this,u,"div");if(s==null?s=v.left:v.left=s,u=ss(this,v,l,o),u.hitSide)break}return u},moveV:Mr(function(r,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(h){if(s)return r<0?h.from():h.to();var v=qt(o,h.head,"div");h.goalColumn!=null&&(v.left=h.goalColumn),l.push(v.left);var S=ss(o,v,r,i);return i=="page"&&h==a.sel.primary()&&Di(o,Ei(o,S,"div").top-v.top),S},st),l.length)for(var u=0;u<a.sel.ranges.length;u++)a.sel.ranges[u].goalColumn=l[u]}),findWordAt:function(r){var i=this.doc,o=K(i,r.line).text,a=r.ch,l=r.ch;if(o){var s=this.getHelper(r,"wordChars");(r.sticky=="before"||l==o.length)&&a?--a:++l;for(var u=o.charAt(a),h=Et(u,s)?function(v){return Et(v,s)}:/\s/.test(u)?function(v){return/\s/.test(v)}:function(v){return!/\s/.test(v)&&!Et(v)};a>0&&h(o.charAt(a-1));)--a;for(;l<o.length&&h(o.charAt(l));)++l}return new rt(N(r.line,a),N(r.line,l))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?R(this.display.cursorDiv,"CodeMirror-overwrite"):be(this.display.cursorDiv,"CodeMirror-overwrite"),ee(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==E()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Mr(function(r,i){fi(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-Hr(this)-this.display.barHeight,width:r.scrollWidth-Hr(this)-this.display.barWidth,clientHeight:Gr(this),clientWidth:hr(this)}},scrollIntoView:Mr(function(r,i){r==null?(r={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof r=="number"?r={from:N(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=i||0,r.from.line!=null?no(this,r):Zr(this,r.from,r.to,r.margin)}),setSize:Mr(function(r,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};r!=null&&(this.display.wrapper.style.width=a(r)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&Yn(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){li(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,ee(this,"refresh",this)}),operation:function(r){return Yr(this,r)},startOperation:function(){return ci(this)},endOperation:function(){return di(this)},refresh:Mr(function(){var r=this.display.cachedTextHeight;zr(this),this.curOp.forceUpdate=!0,rn(this),fi(this,this.doc.scrollLeft,this.doc.scrollTop),Zo(this.display),(r==null||Math.abs(r-Jr(this.display))>.5||this.options.lineWrapping)&&vn(this),ee(this,"refresh",this)}),swapDoc:Mr(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),vl(this,r),rn(this),this.display.input.reset(),fi(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,Ie(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},pt(e),e.registerHelper=function(r,i,o){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=o},e.registerGlobalHelper=function(r,i,o,a){e.registerHelper(r,i,a),n[r]._global.push({pred:o,val:a})}}function ul(e,t,n,r,i){var o=t,a=n,l=K(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var ue=t.line+s;return ue<e.first||ue>=e.first+e.size?!1:(t=new N(ue,t.ch,t.sticky),l=K(e,ue))}function h(ue){var Q;if(r=="codepoint"){var pe=l.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(pe)?Q=null:Q=new N(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(pe>=55296&&pe<56320?2:1))),-n)}else i?Q=Ps(e.cm,l,t,n):Q=rl(l,t,n);if(Q==null)if(!ue&&u())t=nl(i,e.cm,l,t.line,s);else return!1;else t=Q;return!0}if(r=="char"||r=="codepoint")h();else if(r=="column")h(!0);else if(r=="word"||r=="group")for(var v=null,S=r=="group",y=e.cm&&e.cm.getHelper(t,"wordChars"),M=!0;!(n<0&&!h(!M));M=!1){var I=l.text.charAt(t.ch)||`
|
|
`,U=Et(I,y)?"w":S&&I==`
|
|
`?"n":!S||/\s/.test(I)?null:"p";if(S&&!M&&!U&&(U="s"),v&&v!=U){n<0&&(n=1,h(),t.sticky="after");break}if(U&&(v=U),n>0&&!h(!M))break}var $=Za(e,t,o,a,!0);return mr(o,$)&&($.hitSide=!0),$}function ss(e,t,n,r){var i=e.doc,o=t.left,a;if(r=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*Jr(e.display),3);a=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(a=n>0?t.bottom+3:t.top-3);for(var u;u=yo(e,o,a),!!u.outside;){if(n<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=n*5}return u}var Zt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Zt.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;as(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(l){for(var s=l.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}me(i,"paste",function(l){!o(l)||ne(r,l)||ns(l,r)||k<=11&&setTimeout(br(r,function(){return t.updateFromDOM()}),20)}),me(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),me(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),me(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),me(i,"touchstart",function(){return n.forceCompositionEnd()}),me(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||ne(r,l))){if(r.somethingSelected())Ya({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=os(r);Ya({lineWise:!0,text:s.text}),l.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Je),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=Wi.text.join(`
|
|
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var h=ls(),v=h.firstChild;r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Wi.text.join(`
|
|
`);var S=document.activeElement;oe(v),setTimeout(function(){r.display.lineSpace.removeChild(h),S.focus(),S==i&&n.showPrimarySelection()},50)}}me(i,"copy",a),me(i,"cut",a)},Zt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Zt.prototype.prepareSelection=function(){var e=Ti(this.cm,!1);return e.focus=document.activeElement==this.div,e},Zt.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Zt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Zt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=Xa(t,e.anchorNode,e.anchorOffset),a=Xa(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&xe(Dr(o,a),r)==0&&xe(Ht(o,a),i)==0)){var l=t.display.view,s=r.line>=t.display.viewFrom&&us(t,r)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&us(t,i);if(!u){var h=l[l.length-1].measure,v=h.maps?h.maps[h.maps.length-1]:h.map;u={node:v[v.length-1],offset:v[v.length-2]-v[v.length-3]}}if(!s||!u){e.removeAllRanges();return}var S=e.rangeCount&&e.getRangeAt(0),y;try{y=$e(s.node,s.offset,u.offset,u.node)}catch(M){}y&&(!L&&t.state.focused?(e.collapse(s.node,s.offset),y.collapsed||(e.removeAllRanges(),e.addRange(y))):(e.removeAllRanges(),e.addRange(y)),S&&e.anchorNode==null?e.addRange(S):L&&this.startGracePeriod()),this.rememberSelection()}},Zt.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Zt.prototype.showMultipleSelections=function(e){_(this.cm.display.cursorDiv,e.cursors),_(this.cm.display.selectionDiv,e.selection)},Zt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Zt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return x(this.div,t)},Zt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Zt.prototype.blur=function(){this.div.blur()},Zt.prototype.getField=function(){return this.div},Zt.prototype.supportsTouch=function(){return!0},Zt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Yr(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},Zt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Zt.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(De&&A&&this.cm.display.gutterSpecs.length&&Js(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=Xa(t,e.anchorNode,e.anchorOffset),r=Xa(t,e.focusNode,e.focusOffset);n&&r&&Yr(t,function(){ln(t.doc,Jn(n,r),Je),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Zt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=N(r.line-1,K(e.doc,r.line-1).length)),i.ch==K(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=N(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;r.line==t.viewFrom||(o=Mi(e,r.line))==0?(a=lt(t.view[0].line),l=t.view[0].node):(a=lt(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=Mi(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=lt(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!l)return!1;for(var v=e.doc.splitLines(qs(e,l,h,a,u)),S=ht(e.doc,N(a,0),N(u,K(e.doc,u).text.length));v.length>1&&S.length>1;)if(qe(v)==qe(S))v.pop(),S.pop(),u--;else if(v[0]==S[0])v.shift(),S.shift(),a++;else break;for(var y=0,M=0,I=v[0],U=S[0],$=Math.min(I.length,U.length);y<$&&I.charCodeAt(y)==U.charCodeAt(y);)++y;for(var ue=qe(v),Q=qe(S),pe=Math.min(ue.length-(v.length==1?y:0),Q.length-(S.length==1?y:0));M<pe&&ue.charCodeAt(ue.length-M-1)==Q.charCodeAt(Q.length-M-1);)++M;if(v.length==1&&S.length==1&&a==r.line)for(;y&&y>r.ch&&ue.charCodeAt(ue.length-M-1)==Q.charCodeAt(Q.length-M-1);)y--,M++;v[v.length-1]=ue.slice(0,ue.length-M).replace(/^\u200b+/,""),v[0]=v[0].slice(y).replace(/\u200b+$/,"");var Ve=N(a,y),Ze=N(u,S.length?qe(S).length-M:0);if(v.length>1||v[0]||xe(Ve,Ze))return ia(e.doc,v,Ve,Ze,"+input"),!0},Zt.prototype.ensurePolled=function(){this.forceCompositionEnd()},Zt.prototype.reset=function(){this.forceCompositionEnd()},Zt.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Zt.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Zt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Yr(this.cm,function(){return zr(e.cm)})},Zt.prototype.setUneditable=function(e){e.contentEditable="false"},Zt.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||br(this.cm,sl)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Zt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Zt.prototype.onContextMenu=function(){},Zt.prototype.resetPosition=function(){},Zt.prototype.needsContentAttribute=!0;function us(e,t){var n=Bt(e,t.line);if(!n||n.hidden)return null;var r=K(e.doc,t.line),i=Ui(n,r,t.line),o=Lt(r,e.doc.direction),a="left";if(o){var l=gr(o,t.ch);a=l%2?"right":"left"}var s=jn(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function Js(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ua(e,t){return t&&(e.bad=!0),e}function qs(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(y){return function(M){return M.id==y}}function h(){a&&(o+=l,s&&(o+=l),a=s=!1)}function v(y){y&&(h(),o+=y)}function S(y){if(y.nodeType==1){var M=y.getAttribute("cm-text");if(M){v(M);return}var I=y.getAttribute("cm-marker"),U;if(I){var $=e.findMarks(N(r,0),N(i+1,0),u(+I));$.length&&(U=$[0].find(0))&&v(ht(e.doc,U.from,U.to).join(l));return}if(y.getAttribute("contenteditable")=="false")return;var ue=/^(pre|div|p|li|table|br)$/i.test(y.nodeName);if(!/^br$/i.test(y.nodeName)&&y.textContent.length==0)return;ue&&h();for(var Q=0;Q<y.childNodes.length;Q++)S(y.childNodes[Q]);/^(pre|p)$/i.test(y.nodeName)&&(s=!0),ue&&(a=!0)}else y.nodeType==3&&v(y.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;S(t),t!=n;)t=t.nextSibling,s=!1;return o}function Xa(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return ua(e.clipPos(N(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return eu(o,t,n)}}function eu(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!x(r,t))return ua(N(lt(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?qe(e.rest):e.line;return ua(N(lt(o),o.text.length),i)}var a=t.nodeType==3?t:null,l=t;for(!a&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var s=e.measure,u=s.maps;function h(U,$,ue){for(var Q=-1;Q<(u?u.length:0);Q++)for(var pe=Q<0?s.map:u[Q],Ve=0;Ve<pe.length;Ve+=3){var Ze=pe[Ve+2];if(Ze==U||Ze==$){var dt=lt(Q<0?e.line:e.rest[Q]),$t=pe[Ve]+ue;return(ue<0||Ze!=U)&&($t=pe[Ve+(ue?1:0)]),N(dt,$t)}}}var v=h(a,l,n);if(v)return ua(v,i);for(var S=l.nextSibling,y=a?a.nodeValue.length-n:0;S;S=S.nextSibling){if(v=h(S,S.firstChild,0),v)return ua(N(v.line,v.ch-y),i);y+=S.textContent.length}for(var M=l.previousSibling,I=n;M;M=M.previousSibling){if(v=h(M,M.firstChild,-1),v)return ua(N(v.line,v.ch+I),i);I+=M.textContent.length}}var Tr=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Be,this.hasSelection=!1,this.composing=null};Tr.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),q&&(i.style.width="0px"),me(i,"input",function(){T&&k>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),me(i,"paste",function(a){ne(r,a)||ns(a,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(a){if(!ne(r,a)){if(r.somethingSelected())Ya({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var l=os(r);Ya({lineWise:!0,text:l.text}),a.type=="cut"?r.setSelections(l.ranges,null,Je):(n.prevInput="",i.value=l.text.join(`
|
|
`),oe(i))}else return;a.type=="cut"&&(r.state.cutIncoming=+new Date)}}me(i,"cut",o),me(i,"copy",o),me(e.scroller,"paste",function(a){if(!(Kr(e,a)||ne(r,a))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var l=new Event("paste");l.clipboardData=a.clipboardData,i.dispatchEvent(l)}}),me(e.lineSpace,"selectstart",function(a){Kr(e,a)||je(a)}),me(i,"compositionstart",function(){var a=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:a,range:r.markText(a,r.getCursor("to"),{className:"CodeMirror-composing"})}}),me(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Tr.prototype.createField=function(e){this.wrapper=ls(),this.textarea=this.wrapper.firstChild},Tr.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Tr.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ti(e);if(e.options.moveInputWithCursor){var i=qt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Tr.prototype.showSelection=function(e){var t=this.cm,n=t.display;_(n.cursorDiv,e.cursors),_(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Tr.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&oe(this.textarea),T&&k>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",T&&k>=9&&(this.hasSelection=null))}},Tr.prototype.getField=function(){return this.textarea},Tr.prototype.supportsTouch=function(){return!1},Tr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ie||E()!=this.textarea))try{this.textarea.focus()}catch(e){}},Tr.prototype.blur=function(){this.textarea.blur()},Tr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Tr.prototype.receivedFocus=function(){this.slowPoll()},Tr.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Tr.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},Tr.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||O(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(T&&k>=9&&this.hasSelection===i||C&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,i.length);a<l&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return Yr(t,function(){sl(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Tr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Tr.prototype.onKeyPress=function(){T&&k>=9&&(this.hasSelection=null),this.fastPoll()},Tr.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=pn(n,e),a=r.scroller.scrollTop;if(!o||W)return;var l=n.options.resetSelectionOnContextMenu;l&&n.doc.sel.contains(o)==-1&&br(n,ln)(n.doc,Jn(o),Je);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px;
|
|
z-index: 1000; background: `+(T?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;g&&(v=window.scrollY),r.input.focus(),g&&window.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function S(){if(i.selectionStart!=null){var I=n.somethingSelected(),U="\u200B"+(I?i.value:"");i.value="\u21DA",i.value=U,t.prevInput=I?"":"\u200B",i.selectionStart=1,i.selectionEnd=U.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,T&&k<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),i.selectionStart!=null)){(!T||T&&k<9)&&S();var I=0,U=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?br(n,Tl)(n):I++<10?r.detectingSelectAll=setTimeout(U,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(U,200)}}if(T&&k>=9&&S(),z){ut(e);var M=function(){ce(window,"mouseup",M),setTimeout(y,20)};me(window,"mouseup",M)}else setTimeout(y,50)},Tr.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Tr.prototype.setUneditable=function(){},Tr.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?Ue(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=E();t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(me(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(s){}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(ce(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=cr(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function ru(e){e.off=ce,e.on=me,e.wheelEventPixels=Ee,e.Doc=Rn,e.splitLines=b,e.countColumn=Fe,e.findColumn=Gt,e.isWordChar=wt,e.Pass=Nt,e.signal=ee,e.Line=ri,e.changeEnd=mi,e.scrollbarModel=Bo,e.Pos=N,e.cmpPos=xe,e.modes=j,e.mimeModes=V,e.resolveMode=Ke,e.getMode=ge,e.modeExtensions=ve,e.extendMode=Ye,e.copyState=ye,e.startState=at,e.innerMode=Xe,e.commands=Pa,e.keyMap=fo,e.keyName=Ul,e.isModifierKey=Zl,e.lookupKey=aa,e.normalizeKeyMap=ks,e.StringStream=de,e.SharedTextMarker=Aa,e.TextMarker=Ao,e.LineWidget=Ra,e.e_preventDefault=je,e.e_stopPropagation=It,e.e_stop=ut,e.addClass=R,e.contains=x,e.rmClass=be,e.keyNames=Do}Ys(cr),Vs(cr);var nu="iter insert remove copy getEditor constructor".split(" ");for(var $a in Rn.prototype)Rn.prototype.hasOwnProperty($a)&&Ce(nu,$a)<0&&(cr.prototype[$a]=function(e){return function(){return e.apply(this.doc,arguments)}}(Rn.prototype[$a]));return pt(Rn),cr.inputStyles={textarea:Tr,contenteditable:Zt},cr.defineMode=function(e){!cr.defaults.mode&&e!="null"&&(cr.defaults.mode=e),Te.apply(this,arguments)},cr.defineMIME=tt,cr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),cr.defineMIME("text/plain","null"),cr.defineExtension=function(e,t){cr.prototype[e]=t},cr.defineDocExtension=function(e,t){Rn.prototype[e]=t},cr.fromTextArea=tu,ru(cr),cr.version="5.58.2",cr})},82234:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return g}});var L=p(45987),F=p(1413),Z=p(71002),re=p(67294),T=["show"];function k(Re,A){if(!A.max)return!0;var W=A.strategy(Re);return W<=A.max}function g(Re,A){return re.useMemo(function(){var W={};A&&(W.show=(0,Z.Z)(A)==="object"&&A.formatter?A.formatter:!!A),W=(0,F.Z)((0,F.Z)({},W),Re);var fe=W,X=fe.show,Me=(0,L.Z)(fe,T);return(0,F.Z)((0,F.Z)({},Me),{},{show:!!X,showFormatter:typeof X=="function"?X:void 0,strategy:Me.strategy||function(q){return q.length}})},[Re,A])}},67656:function(Qt,Le,p){"use strict";p.r(Le),p.d(Le,{BaseInput:function(){return W},default:function(){return J}});var L=p(1413),F=p(87462),Z=p(4942),re=p(71002),T=p(94184),k=p.n(T),g=p(67294),Re=p(87887),A=g.forwardRef(function(w,z){var he,be,He,_=w.inputElement,B=w.children,Ge=w.prefixCls,$e=w.prefix,x=w.suffix,E=w.addonBefore,R=w.addonAfter,G=w.className,oe=w.style,Qe=w.disabled,Ue=w.readOnly,Fe=w.focused,Be=w.triggerFocus,Ce=w.allowClear,Ot=w.value,Nt=w.handleReset,Je=w.hidden,yt=w.classes,st=w.classNames,Gt=w.dataAttrs,ct=w.styles,bt=w.components,qe=w.onClear,er=B!=null?B:_,ar=(bt==null?void 0:bt.affixWrapper)||"span",lr=(bt==null?void 0:bt.groupWrapper)||"span",Tt=(bt==null?void 0:bt.wrapper)||"span",mt=(bt==null?void 0:bt.groupAddon)||"span",wt=(0,g.useRef)(null),Et=function(ke){var Pe;(Pe=wt.current)!==null&&Pe!==void 0&&Pe.contains(ke.target)&&(Be==null||Be())},_t=(0,Re.X3)(w),Ft=(0,g.cloneElement)(er,{value:Ot,className:k()((he=er.props)===null||he===void 0?void 0:he.className,!_t&&(st==null?void 0:st.variant))||null}),Rt=(0,g.useRef)(null);if(g.useImperativeHandle(z,function(){return{nativeElement:Rt.current||wt.current}}),_t){var Wt=null;if(Ce){var tr=!Qe&&!Ue&&Ot,pr="".concat(Ge,"-clear-icon"),Rr=(0,re.Z)(Ce)==="object"&&Ce!==null&&Ce!==void 0&&Ce.clearIcon?Ce.clearIcon:"\u2716";Wt=g.createElement("button",{type:"button",tabIndex:-1,onClick:function(ke){Nt==null||Nt(ke),qe==null||qe()},onMouseDown:function(ke){return ke.preventDefault()},className:k()(pr,(0,Z.Z)((0,Z.Z)({},"".concat(pr,"-hidden"),!tr),"".concat(pr,"-has-suffix"),!!x))},Rr)}var gr="".concat(Ge,"-affix-wrapper"),qn=k()(gr,(0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)((0,Z.Z)({},"".concat(Ge,"-disabled"),Qe),"".concat(gr,"-disabled"),Qe),"".concat(gr,"-focused"),Fe),"".concat(gr,"-readonly"),Ue),"".concat(gr,"-input-with-clear-btn"),x&&Ce&&Ot),yt==null?void 0:yt.affixWrapper,st==null?void 0:st.affixWrapper,st==null?void 0:st.variant),Lt=(x||Ce)&&g.createElement("span",{className:k()("".concat(Ge,"-suffix"),st==null?void 0:st.suffix),style:ct==null?void 0:ct.suffix},Wt,x);Ft=g.createElement(ar,(0,F.Z)({className:qn,style:ct==null?void 0:ct.affixWrapper,onClick:Et},Gt==null?void 0:Gt.affixWrapper,{ref:wt}),$e&&g.createElement("span",{className:k()("".concat(Ge,"-prefix"),st==null?void 0:st.prefix),style:ct==null?void 0:ct.prefix},$e),Ft,Lt)}if((0,Re.He)(w)){var Fr="".concat(Ge,"-group"),me="".concat(Fr,"-addon"),un="".concat(Fr,"-wrapper"),ce=k()("".concat(Ge,"-wrapper"),Fr,yt==null?void 0:yt.wrapper,st==null?void 0:st.wrapper),ee=k()(un,(0,Z.Z)({},"".concat(un,"-disabled"),Qe),yt==null?void 0:yt.group,st==null?void 0:st.groupWrapper);Ft=g.createElement(lr,{className:ee,ref:Rt},g.createElement(Tt,{className:ce},E&&g.createElement(mt,{className:me},E),Ft,R&&g.createElement(mt,{className:me},R)))}return g.cloneElement(Ft,{className:k()((be=Ft.props)===null||be===void 0?void 0:be.className,G)||null,style:(0,L.Z)((0,L.Z)({},(He=Ft.props)===null||He===void 0?void 0:He.style),oe),hidden:Je})}),W=A,fe=p(74902),X=p(97685),Me=p(45987),q=p(21770),De=p(98423),ie=p(82234),C=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],Ne=(0,g.forwardRef)(function(w,z){var he=w.autoComplete,be=w.onChange,He=w.onFocus,_=w.onBlur,B=w.onPressEnter,Ge=w.onKeyDown,$e=w.onKeyUp,x=w.prefixCls,E=x===void 0?"rc-input":x,R=w.disabled,G=w.htmlSize,oe=w.className,Qe=w.maxLength,Ue=w.suffix,Fe=w.showCount,Be=w.count,Ce=w.type,Ot=Ce===void 0?"text":Ce,Nt=w.classes,Je=w.classNames,yt=w.styles,st=w.onCompositionStart,Gt=w.onCompositionEnd,ct=(0,Me.Z)(w,C),bt=(0,g.useState)(!1),qe=(0,X.Z)(bt,2),er=qe[0],ar=qe[1],lr=(0,g.useRef)(!1),Tt=(0,g.useRef)(!1),mt=(0,g.useRef)(null),wt=(0,g.useRef)(null),Et=function(ze){mt.current&&(0,Re.nH)(mt.current,ze)},_t=(0,q.Z)(w.defaultValue,{value:w.value}),Ft=(0,X.Z)(_t,2),Rt=Ft[0],Wt=Ft[1],tr=Rt==null?"":String(Rt),pr=(0,g.useState)(null),Rr=(0,X.Z)(pr,2),gr=Rr[0],qn=Rr[1],Lt=(0,ie.Z)(Be,Fe),Fr=Lt.max||Qe,me=Lt.strategy(tr),un=!!Fr&&me>Fr;(0,g.useImperativeHandle)(z,function(){var _e;return{focus:Et,blur:function(){var et;(et=mt.current)===null||et===void 0||et.blur()},setSelectionRange:function(et,jt,dr){var sr;(sr=mt.current)===null||sr===void 0||sr.setSelectionRange(et,jt,dr)},select:function(){var et;(et=mt.current)===null||et===void 0||et.select()},input:mt.current,nativeElement:((_e=wt.current)===null||_e===void 0?void 0:_e.nativeElement)||mt.current}}),(0,g.useEffect)(function(){Tt.current&&(Tt.current=!1),ar(function(_e){return _e&&R?!1:_e})},[R]);var ce=function(ze,et,jt){var dr=et;if(!lr.current&&Lt.exceedFormatter&&Lt.max&&Lt.strategy(et)>Lt.max){if(dr=Lt.exceedFormatter(et,{max:Lt.max}),et!==dr){var sr,b;qn([((sr=mt.current)===null||sr===void 0?void 0:sr.selectionStart)||0,((b=mt.current)===null||b===void 0?void 0:b.selectionEnd)||0])}}else if(jt.source==="compositionEnd")return;Wt(dr),mt.current&&(0,Re.rJ)(mt.current,ze,be,dr)};(0,g.useEffect)(function(){if(gr){var _e;(_e=mt.current)===null||_e===void 0||_e.setSelectionRange.apply(_e,(0,fe.Z)(gr))}},[gr]);var ee=function(ze){ce(ze,ze.target.value,{source:"change"})},ne=function(ze){lr.current=!1,ce(ze,ze.currentTarget.value,{source:"compositionEnd"}),Gt==null||Gt(ze)},ke=function(ze){B&&ze.key==="Enter"&&!Tt.current&&(Tt.current=!0,B(ze)),Ge==null||Ge(ze)},Pe=function(ze){ze.key==="Enter"&&(Tt.current=!1),$e==null||$e(ze)},pt=function(ze){ar(!0),He==null||He(ze)},je=function(ze){Tt.current&&(Tt.current=!1),ar(!1),_==null||_(ze)},It=function(ze){Wt(""),Et(),mt.current&&(0,Re.rJ)(mt.current,ze,be)},Vt=un&&"".concat(E,"-out-of-range"),ut=function(){var ze=(0,De.Z)(w,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return g.createElement("input",(0,F.Z)({autoComplete:he},ze,{onChange:ee,onFocus:pt,onBlur:je,onKeyDown:ke,onKeyUp:Pe,className:k()(E,(0,Z.Z)({},"".concat(E,"-disabled"),R),Je==null?void 0:Je.input),style:yt==null?void 0:yt.input,ref:mt,size:G,type:Ot,onCompositionStart:function(jt){lr.current=!0,st==null||st(jt)},onCompositionEnd:ne}))},Ct=function(){var ze=Number(Fr)>0;if(Ue||Lt.show){var et=Lt.showFormatter?Lt.showFormatter({value:tr,count:me,maxLength:Fr}):"".concat(me).concat(ze?" / ".concat(Fr):"");return g.createElement(g.Fragment,null,Lt.show&&g.createElement("span",{className:k()("".concat(E,"-show-count-suffix"),(0,Z.Z)({},"".concat(E,"-show-count-has-suffix"),!!Ue),Je==null?void 0:Je.count),style:(0,L.Z)({},yt==null?void 0:yt.count)},et),Ue)}return null};return g.createElement(W,(0,F.Z)({},ct,{prefixCls:E,className:k()(oe,Vt),handleReset:It,value:tr,focused:er,triggerFocus:Et,suffix:Ct(),disabled:R,classes:Nt,classNames:Je,styles:yt}),ut())}),ot=Ne,J=ot},87887:function(Qt,Le,p){"use strict";p.d(Le,{He:function(){return L},X3:function(){return F},nH:function(){return T},rJ:function(){return re}});function L(k){return!!(k.addonBefore||k.addonAfter)}function F(k){return!!(k.prefix||k.suffix||k.allowClear)}function Z(k,g,Re){var A=g.cloneNode(!0),W=Object.create(k,{target:{value:A},currentTarget:{value:A}});return A.value=Re,typeof g.selectionStart=="number"&&typeof g.selectionEnd=="number"&&(A.selectionStart=g.selectionStart,A.selectionEnd=g.selectionEnd),A.setSelectionRange=function(){g.setSelectionRange.apply(g,arguments)},W}function re(k,g,Re,A){if(Re){var W=g;if(g.type==="click"){W=Z(g,k,""),Re(W);return}if(k.type!=="file"&&A!==void 0){W=Z(g,k,A),Re(W);return}Re(W)}}function T(k,g){if(k){k.focus(g);var Re=g||{},A=Re.cursor;if(A){var W=k.value.length;switch(A){case"start":k.setSelectionRange(0,0);break;case"end":k.setSelectionRange(W,W);break;default:k.setSelectionRange(0,W)}}}}},62874:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return un}});var L=p(4942),F=p(1413),Z=p(97685),re=p(71002),T=p(67294),k=p(34203),g=p(42550),Re=p(94184),A=p.n(Re),W=p(98924);function fe(ce,ee){var ne={};return ne[ce.toLowerCase()]=ee.toLowerCase(),ne["Webkit".concat(ce)]="webkit".concat(ee),ne["Moz".concat(ce)]="moz".concat(ee),ne["ms".concat(ce)]="MS".concat(ee),ne["O".concat(ce)]="o".concat(ee.toLowerCase()),ne}function X(ce,ee){var ne={animationend:fe("Animation","AnimationEnd"),transitionend:fe("Transition","TransitionEnd")};return ce&&("AnimationEvent"in ee||delete ne.animationend.animation,"TransitionEvent"in ee||delete ne.transitionend.transition),ne}var Me=X((0,W.Z)(),typeof window!="undefined"?window:{}),q={};if((0,W.Z)()){var De=document.createElement("div");q=De.style}var ie={};function C(ce){if(ie[ce])return ie[ce];var ee=Me[ce];if(ee)for(var ne=Object.keys(ee),ke=ne.length,Pe=0;Pe<ke;Pe+=1){var pt=ne[Pe];if(Object.prototype.hasOwnProperty.call(ee,pt)&&pt in q)return ie[ce]=ee[pt],ie[ce]}return""}var Ne=C("animationend"),ot=C("transitionend"),J=!!(Ne&&ot),w=Ne||"animationend",z=ot||"transitionend";function he(ce,ee){if(!ce)return null;if((0,re.Z)(ce)==="object"){var ne=ee.replace(/-\w/g,function(ke){return ke[1].toUpperCase()});return ce[ne]}return"".concat(ce,"-").concat(ee)}var be="none",He="appear",_="enter",B="leave",Ge="none",$e="prepare",x="start",E="active",R="end",G=p(63896),oe=p(75164),Qe=function(){var ce=T.useRef(null);function ee(){oe.Z.cancel(ce.current)}function ne(ke){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;ee();var pt=(0,oe.Z)(function(){Pe<=1?ke({isCanceled:function(){return pt!==ce.current}}):ne(ke,Pe-1)});ce.current=pt}return T.useEffect(function(){return function(){ee()}},[]),[ne,ee]},Ue=(0,W.Z)()?T.useLayoutEffect:T.useEffect,Fe=Ue,Be=[$e,x,E,R],Ce=!1,Ot=!0;function Nt(ce){return ce===E||ce===R}var Je=function(ce,ee){var ne=(0,G.Z)(Ge),ke=(0,Z.Z)(ne,2),Pe=ke[0],pt=ke[1],je=Qe(),It=(0,Z.Z)(je,2),Vt=It[0],ut=It[1];function Ct(){pt($e,!0)}return Fe(function(){if(Pe!==Ge&&Pe!==R){var _e=Be.indexOf(Pe),ze=Be[_e+1],et=ee(Pe);et===Ce?pt(ze,!0):Vt(function(jt){function dr(){jt.isCanceled()||pt(ze,!0)}et===!0?dr():Promise.resolve(et).then(dr)})}},[ce,Pe]),T.useEffect(function(){return function(){ut()}},[]),[Ct,Pe]},yt=function(ce){var ee=(0,T.useRef)(),ne=(0,T.useRef)(ce);ne.current=ce;var ke=T.useCallback(function(je){ne.current(je)},[]);function Pe(je){je&&(je.removeEventListener(z,ke),je.removeEventListener(w,ke))}function pt(je){ee.current&&ee.current!==je&&Pe(ee.current),je&&je!==ee.current&&(je.addEventListener(z,ke),je.addEventListener(w,ke),ee.current=je)}return T.useEffect(function(){return function(){Pe(ee.current)}},[]),[pt,Pe]};function st(ce,ee,ne,ke){var Pe=ke.motionEnter,pt=Pe===void 0?!0:Pe,je=ke.motionAppear,It=je===void 0?!0:je,Vt=ke.motionLeave,ut=Vt===void 0?!0:Vt,Ct=ke.motionDeadline,_e=ke.motionLeaveImmediately,ze=ke.onAppearPrepare,et=ke.onEnterPrepare,jt=ke.onLeavePrepare,dr=ke.onAppearStart,sr=ke.onEnterStart,b=ke.onLeaveStart,O=ke.onAppearActive,D=ke.onEnterActive,H=ke.onLeaveActive,ae=ke.onAppearEnd,j=ke.onEnterEnd,V=ke.onLeaveEnd,Te=ke.onVisibleChanged,tt=(0,G.Z)(),Ke=(0,Z.Z)(tt,2),ge=Ke[0],ve=Ke[1],Ye=(0,G.Z)(be),ye=(0,Z.Z)(Ye,2),Xe=ye[0],at=ye[1],de=(0,G.Z)(null),K=(0,Z.Z)(de,2),ht=K[0],Yt=K[1],St=(0,T.useRef)(!1),lt=(0,T.useRef)(null);function rr(){return ne()}var kt=(0,T.useRef)(!1);function Jt(vt){var Pt=rr();if(!(vt&&!vt.deadline&&vt.target!==Pt)){var Xt=kt.current,ur;Xe===He&&Xt?ur=ae==null?void 0:ae(Pt,vt):Xe===_&&Xt?ur=j==null?void 0:j(Pt,vt):Xe===B&&Xt&&(ur=V==null?void 0:V(Pt,vt)),Xe!==be&&Xt&&ur!==!1&&(at(be,!0),Yt(null,!0))}}var N=yt(Jt),xe=(0,Z.Z)(N,1),mr=xe[0],Ar=T.useMemo(function(){var vt,Pt,Xt;switch(Xe){case He:return vt={},(0,L.Z)(vt,$e,ze),(0,L.Z)(vt,x,dr),(0,L.Z)(vt,E,O),vt;case _:return Pt={},(0,L.Z)(Pt,$e,et),(0,L.Z)(Pt,x,sr),(0,L.Z)(Pt,E,D),Pt;case B:return Xt={},(0,L.Z)(Xt,$e,jt),(0,L.Z)(Xt,x,b),(0,L.Z)(Xt,E,H),Xt;default:return{}}},[Xe]),Ht=Je(Xe,function(vt){if(vt===$e){var Pt=Ar[$e];return Pt?Pt(rr()):Ce}if(Ae in Ar){var Xt;Yt(((Xt=Ar[Ae])===null||Xt===void 0?void 0:Xt.call(Ar,rr(),null))||null)}return Ae===E&&(mr(rr()),Ct>0&&(clearTimeout(lt.current),lt.current=setTimeout(function(){Jt({deadline:!0})},Ct))),Ot}),Dr=(0,Z.Z)(Ht,2),Pn=Dr[0],Ae=Dr[1],On=Nt(Ae);kt.current=On,Fe(function(){ve(ee);var vt=St.current;if(St.current=!0,!!ce){var Pt;!vt&&ee&&It&&(Pt=He),vt&&ee&&pt&&(Pt=_),(vt&&!ee&&ut||!vt&&_e&&!ee&&ut)&&(Pt=B),Pt&&(at(Pt),Pn())}},[ee]),(0,T.useEffect)(function(){(Xe===He&&!It||Xe===_&&!pt||Xe===B&&!ut)&&at(be)},[It,pt,ut]),(0,T.useEffect)(function(){return function(){St.current=!1,clearTimeout(lt.current)}},[]);var Cr=T.useRef(!1);(0,T.useEffect)(function(){ge&&(Cr.current=!0),ge!==void 0&&Xe===be&&((Cr.current||ge)&&(Te==null||Te(ge)),Cr.current=!0)},[ge,Xe]);var xr=ht;return Ar[$e]&&Ae===x&&(xr=(0,F.Z)({transition:"none"},xr)),[Xe,Ae,xr,ge!=null?ge:ee]}var Gt=p(15671),ct=p(43144),bt=p(60136),qe=p(29388),er=function(ce){(0,bt.Z)(ne,ce);var ee=(0,qe.Z)(ne);function ne(){return(0,Gt.Z)(this,ne),ee.apply(this,arguments)}return(0,ct.Z)(ne,[{key:"render",value:function(){return this.props.children}}]),ne}(T.Component),ar=er;function lr(ce){var ee=ce;(0,re.Z)(ce)==="object"&&(ee=ce.transitionSupport);function ne(Pe){return!!(Pe.motionName&&ee)}var ke=T.forwardRef(function(Pe,pt){var je=Pe.visible,It=je===void 0?!0:je,Vt=Pe.removeOnLeave,ut=Vt===void 0?!0:Vt,Ct=Pe.forceRender,_e=Pe.children,ze=Pe.motionName,et=Pe.leavedClassName,jt=Pe.eventProps,dr=ne(Pe),sr=(0,T.useRef)(),b=(0,T.useRef)();function O(){try{return sr.current instanceof HTMLElement?sr.current:(0,k.Z)(b.current)}catch(de){return null}}var D=st(dr,It,O,Pe),H=(0,Z.Z)(D,4),ae=H[0],j=H[1],V=H[2],Te=H[3],tt=T.useRef(Te);Te&&(tt.current=!0);var Ke=T.useCallback(function(de){sr.current=de,(0,g.mH)(pt,de)},[pt]),ge,ve=(0,F.Z)((0,F.Z)({},jt),{},{visible:It});if(!_e)ge=null;else if(ae===be||!ne(Pe))Te?ge=_e((0,F.Z)({},ve),Ke):!ut&&tt.current&&et?ge=_e((0,F.Z)((0,F.Z)({},ve),{},{className:et}),Ke):Ct||!ut&&!et?ge=_e((0,F.Z)((0,F.Z)({},ve),{},{style:{display:"none"}}),Ke):ge=null;else{var Ye,ye;j===$e?ye="prepare":Nt(j)?ye="active":j===x&&(ye="start"),ge=_e((0,F.Z)((0,F.Z)({},ve),{},{className:A()(he(ze,ae),(Ye={},(0,L.Z)(Ye,he(ze,"".concat(ae,"-").concat(ye)),ye),(0,L.Z)(Ye,ze,typeof ze=="string"),Ye)),style:V}),Ke)}if(T.isValidElement(ge)&&(0,g.Yr)(ge)){var Xe=ge,at=Xe.ref;at||(ge=T.cloneElement(ge,{ref:Ke}))}return T.createElement(ar,{ref:b},ge)});return ke.displayName="CSSMotion",ke}var Tt=lr(J),mt=p(87462),wt=p(45987),Et=p(97326),_t="add",Ft="keep",Rt="remove",Wt="removed";function tr(ce){var ee;return ce&&(0,re.Z)(ce)==="object"&&"key"in ce?ee=ce:ee={key:ce},(0,F.Z)((0,F.Z)({},ee),{},{key:String(ee.key)})}function pr(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ce.map(tr)}function Rr(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ne=[],ke=0,Pe=ee.length,pt=pr(ce),je=pr(ee);pt.forEach(function(ut){for(var Ct=!1,_e=ke;_e<Pe;_e+=1){var ze=je[_e];if(ze.key===ut.key){ke<_e&&(ne=ne.concat(je.slice(ke,_e).map(function(et){return(0,F.Z)((0,F.Z)({},et),{},{status:_t})})),ke=_e),ne.push((0,F.Z)((0,F.Z)({},ze),{},{status:Ft})),ke+=1,Ct=!0;break}}Ct||ne.push((0,F.Z)((0,F.Z)({},ut),{},{status:Rt}))}),ke<Pe&&(ne=ne.concat(je.slice(ke).map(function(ut){return(0,F.Z)((0,F.Z)({},ut),{},{status:_t})})));var It={};ne.forEach(function(ut){var Ct=ut.key;It[Ct]=(It[Ct]||0)+1});var Vt=Object.keys(It).filter(function(ut){return It[ut]>1});return Vt.forEach(function(ut){ne=ne.filter(function(Ct){var _e=Ct.key,ze=Ct.status;return _e!==ut||ze!==Rt}),ne.forEach(function(Ct){Ct.key===ut&&(Ct.status=Ft)})}),ne}var gr=["component","children","onVisibleChanged","onAllRemoved"],qn=["status"],Lt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Fr(ce){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Tt,ne=function(ke){(0,bt.Z)(pt,ke);var Pe=(0,qe.Z)(pt);function pt(){var je;(0,Gt.Z)(this,pt);for(var It=arguments.length,Vt=new Array(It),ut=0;ut<It;ut++)Vt[ut]=arguments[ut];return je=Pe.call.apply(Pe,[this].concat(Vt)),(0,L.Z)((0,Et.Z)(je),"state",{keyEntities:[]}),(0,L.Z)((0,Et.Z)(je),"removeKey",function(Ct){var _e=je.state.keyEntities,ze=_e.map(function(et){return et.key!==Ct?et:(0,F.Z)((0,F.Z)({},et),{},{status:Wt})});return je.setState({keyEntities:ze}),ze.filter(function(et){var jt=et.status;return jt!==Wt}).length}),je}return(0,ct.Z)(pt,[{key:"render",value:function(){var It=this,Vt=this.state.keyEntities,ut=this.props,Ct=ut.component,_e=ut.children,ze=ut.onVisibleChanged,et=ut.onAllRemoved,jt=(0,wt.Z)(ut,gr),dr=Ct||T.Fragment,sr={};return Lt.forEach(function(b){sr[b]=jt[b],delete jt[b]}),delete jt.keys,T.createElement(dr,jt,Vt.map(function(b){var O=b.status,D=(0,wt.Z)(b,qn),H=O===_t||O===Ft;return T.createElement(ee,(0,mt.Z)({},sr,{key:D.key,visible:H,eventProps:D,onVisibleChanged:function(j){if(ze==null||ze(j,{key:D.key}),!j){var V=It.removeKey(D.key);V===0&&et&&et()}}}),_e)}))}}],[{key:"getDerivedStateFromProps",value:function(It,Vt){var ut=It.keys,Ct=Vt.keyEntities,_e=pr(ut),ze=Rr(Ct,_e);return{keyEntities:ze.filter(function(et){var jt=Ct.find(function(dr){var sr=dr.key;return et.key===sr});return!(jt&&jt.status===Wt&&et.status===Rt)})}}}]),pt}(T.Component);return(0,L.Z)(ne,"defaultProps",{component:"div"}),ne}var me=Fr(J),un=Tt},48555:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return $e}});var L=p(87462),F=p(67294),Z=p(50344),re=p(80334),T=p(1413),k=p(42550),g=p(34203),Re=p(91033),A=new Map;function W(x){x.forEach(function(E){var R,G=E.target;(R=A.get(G))===null||R===void 0||R.forEach(function(oe){return oe(G)})})}var fe=new Re.Z(W),X=null,Me=null;function q(x,E){A.has(x)||(A.set(x,new Set),fe.observe(x)),A.get(x).add(E)}function De(x,E){A.has(x)&&(A.get(x).delete(E),A.get(x).size||(fe.unobserve(x),A.delete(x)))}var ie=p(15671),C=p(43144),Ne=p(60136),ot=p(29388),J=function(x){(0,Ne.Z)(R,x);var E=(0,ot.Z)(R);function R(){return(0,ie.Z)(this,R),E.apply(this,arguments)}return(0,C.Z)(R,[{key:"render",value:function(){return this.props.children}}]),R}(F.Component),w=F.createContext(null);function z(x){var E=x.children,R=x.onBatchResize,G=F.useRef(0),oe=F.useRef([]),Qe=F.useContext(w),Ue=F.useCallback(function(Fe,Be,Ce){G.current+=1;var Ot=G.current;oe.current.push({size:Fe,element:Be,data:Ce}),Promise.resolve().then(function(){Ot===G.current&&(R==null||R(oe.current),oe.current=[])}),Qe==null||Qe(Fe,Be,Ce)},[R,Qe]);return F.createElement(w.Provider,{value:Ue},E)}function he(x,E){var R=x.children,G=x.disabled,oe=F.useRef(null),Qe=F.useRef(null),Ue=F.useContext(w),Fe=typeof R=="function",Be=Fe?R(oe):R,Ce=F.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Ot=!Fe&&F.isValidElement(Be)&&(0,k.Yr)(Be),Nt=Ot?Be.ref:null,Je=F.useMemo(function(){return(0,k.sQ)(Nt,oe)},[Nt,oe]),yt=function(){return(0,g.Z)(oe.current)||(0,g.Z)(Qe.current)};F.useImperativeHandle(E,function(){return yt()});var st=F.useRef(x);st.current=x;var Gt=F.useCallback(function(ct){var bt=st.current,qe=bt.onResize,er=bt.data,ar=ct.getBoundingClientRect(),lr=ar.width,Tt=ar.height,mt=ct.offsetWidth,wt=ct.offsetHeight,Et=Math.floor(lr),_t=Math.floor(Tt);if(Ce.current.width!==Et||Ce.current.height!==_t||Ce.current.offsetWidth!==mt||Ce.current.offsetHeight!==wt){var Ft={width:Et,height:_t,offsetWidth:mt,offsetHeight:wt};Ce.current=Ft;var Rt=mt===Math.round(lr)?lr:mt,Wt=wt===Math.round(Tt)?Tt:wt,tr=(0,T.Z)((0,T.Z)({},Ft),{},{offsetWidth:Rt,offsetHeight:Wt});Ue==null||Ue(tr,ct,er),qe&&Promise.resolve().then(function(){qe(tr,ct)})}},[]);return F.useEffect(function(){var ct=yt();return ct&&!G&&q(ct,Gt),function(){return De(ct,Gt)}},[oe.current,G]),F.createElement(J,{ref:Qe},Ot?F.cloneElement(Be,{ref:Je}):Be)}var be=F.forwardRef(he),He=be,_="rc-observer-key";function B(x,E){var R=x.children,G=typeof R=="function"?[R]:(0,Z.Z)(R);return G.map(function(oe,Qe){var Ue=(oe==null?void 0:oe.key)||"".concat(_,"-").concat(Qe);return F.createElement(He,(0,L.Z)({},x,{key:Ue,ref:Qe===0?E:void 0}),oe)})}var Ge=F.forwardRef(B);Ge.Collection=z;var $e=Ge},36697:function(Qt,Le,p){"use strict";p.d(Le,{G:function(){return T},Z:function(){return be}});var L=p(94184),F=p.n(L),Z=p(67294),re=p.t(Z,2);function T(He){var _=He.children,B=He.prefixCls,Ge=He.id,$e=He.overlayInnerStyle,x=He.bodyClassName,E=He.className,R=He.style;return Z.createElement("div",{className:F()("".concat(B,"-content"),E),style:R},Z.createElement("div",{className:F()("".concat(B,"-inner"),x),id:Ge,role:"tooltip",style:$e},typeof _=="function"?_():_))}var k=p(87462),g=p(1413),Re=p(45987),A=p(98280),W={shiftX:64,adjustY:1},fe={adjustX:1,shiftY:!0},X=[0,0],Me={left:{points:["cr","cl"],overflow:fe,offset:[-4,0],targetOffset:X},right:{points:["cl","cr"],overflow:fe,offset:[4,0],targetOffset:X},top:{points:["bc","tc"],overflow:W,offset:[0,-4],targetOffset:X},bottom:{points:["tc","bc"],overflow:W,offset:[0,4],targetOffset:X},topLeft:{points:["bl","tl"],overflow:W,offset:[0,-4],targetOffset:X},leftTop:{points:["tr","tl"],overflow:fe,offset:[-4,0],targetOffset:X},topRight:{points:["br","tr"],overflow:W,offset:[0,-4],targetOffset:X},rightTop:{points:["tl","tr"],overflow:fe,offset:[4,0],targetOffset:X},bottomRight:{points:["tr","br"],overflow:W,offset:[0,4],targetOffset:X},rightBottom:{points:["bl","br"],overflow:fe,offset:[4,0],targetOffset:X},bottomLeft:{points:["tl","bl"],overflow:W,offset:[0,4],targetOffset:X},leftBottom:{points:["br","bl"],overflow:fe,offset:[-4,0],targetOffset:X}},q=null,De=p(97685);function ie(){var He=(0,g.Z)({},re);return He.useId}var C=0;function Ne(){}var ot=ie(),J=ot?function(_){var B=ot();return _||B}:function(_){var B=Z.useState("ssr-id"),Ge=(0,De.Z)(B,2),$e=Ge[0],x=Ge[1];return Z.useEffect(function(){var E=C;C+=1,x("rc_unique_".concat(E))},[]),_||$e},w=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],z=function(_,B){var Ge=_.overlayClassName,$e=_.trigger,x=$e===void 0?["hover"]:$e,E=_.mouseEnterDelay,R=E===void 0?0:E,G=_.mouseLeaveDelay,oe=G===void 0?.1:G,Qe=_.overlayStyle,Ue=_.prefixCls,Fe=Ue===void 0?"rc-tooltip":Ue,Be=_.children,Ce=_.onVisibleChange,Ot=_.afterVisibleChange,Nt=_.transitionName,Je=_.animation,yt=_.motion,st=_.placement,Gt=st===void 0?"right":st,ct=_.align,bt=ct===void 0?{}:ct,qe=_.destroyTooltipOnHide,er=qe===void 0?!1:qe,ar=_.defaultVisible,lr=_.getTooltipContainer,Tt=_.overlayInnerStyle,mt=_.arrowContent,wt=_.overlay,Et=_.id,_t=_.showArrow,Ft=_t===void 0?!0:_t,Rt=_.classNames,Wt=_.styles,tr=(0,Re.Z)(_,w),pr=J(Et),Rr=(0,Z.useRef)(null);(0,Z.useImperativeHandle)(B,function(){return Rr.current});var gr=(0,g.Z)({},tr);"visible"in _&&(gr.popupVisible=_.visible);var qn=function(){return Z.createElement(T,{key:"content",prefixCls:Fe,id:pr,bodyClassName:Rt==null?void 0:Rt.body,overlayInnerStyle:(0,g.Z)((0,g.Z)({},Tt),Wt==null?void 0:Wt.body)},wt)},Lt=function(){var me=Z.Children.only(Be),un=(me==null?void 0:me.props)||{},ce=(0,g.Z)((0,g.Z)({},un),{},{"aria-describedby":wt?pr:null});return Z.cloneElement(Be,ce)};return Z.createElement(A.Z,(0,k.Z)({popupClassName:F()(Ge,Rt==null?void 0:Rt.root),prefixCls:Fe,popup:qn,action:x,builtinPlacements:Me,popupPlacement:Gt,ref:Rr,popupAlign:bt,getPopupContainer:lr,onPopupVisibleChange:Ce,afterPopupVisibleChange:Ot,popupTransitionName:Nt,popupAnimation:Je,popupMotion:yt,defaultPopupVisible:ar,autoDestroy:er,mouseLeaveDelay:oe,popupStyle:(0,g.Z)((0,g.Z)({},Qe),Wt==null?void 0:Wt.root),mouseEnterDelay:R,arrow:Ft},gr),Lt())},he=(0,Z.forwardRef)(z),be=he},50344:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return Z}});var L=p(67294),F=p(59864);function Z(re){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=[];return L.Children.forEach(re,function(g){g==null&&!T.keepEmpty||(Array.isArray(g)?k=k.concat(Z(g)):(0,F.isFragment)(g)&&g.props?k=k.concat(Z(g.props.children,T)):k.push(g))}),k}},66680:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return F}});var L=p(67294);function F(Z){var re=L.useRef();re.current=Z;var T=L.useCallback(function(){for(var k,g=arguments.length,Re=new Array(g),A=0;A<g;A++)Re[A]=arguments[A];return(k=re.current)===null||k===void 0?void 0:k.call.apply(k,[re].concat(Re))},[]);return T}},21770:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return k}});var L=p(97685),F=p(66680),Z=p(8410),re=p(63896);function T(g){return g!==void 0}function k(g,Re){var A=Re||{},W=A.defaultValue,fe=A.value,X=A.onChange,Me=A.postState,q=(0,re.Z)(function(){return T(fe)?fe:T(W)?typeof W=="function"?W():W:typeof g=="function"?g():g}),De=(0,L.Z)(q,2),ie=De[0],C=De[1],Ne=fe!==void 0?fe:ie,ot=Me?Me(Ne):Ne,J=(0,F.Z)(X),w=(0,re.Z)([Ne]),z=(0,L.Z)(w,2),he=z[0],be=z[1];(0,Z.o)(function(){var _=he[0];ie!==_&&J(ie,_)},[he]),(0,Z.o)(function(){T(fe)||C(fe)},[fe]);var He=(0,F.Z)(function(_,B){C(_,B),be([Ne],B)});return[ot,He]}},98423:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return F}});var L=p(1413);function F(Z,re){var T=(0,L.Z)({},Z);return Array.isArray(re)&&re.forEach(function(k){delete T[k]}),T}},80334:function(Qt,Le,p){"use strict";var L={};function F(Re,A){}function Z(Re,A){}function re(){L={}}function T(Re,A,W){!A&&!L[W]&&(Re(!1,W),L[W]=!0)}function k(Re,A){T(F,Re,A)}function g(Re,A){T(Z,Re,A)}Le.ZP=k},73299:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return sr}});var L=p(87462),F=p(1413),Z=p(71002),re=p(97685),T=p(4942),k=p(45987),g=p(67294),Re=p(73935),A=p(94184),W=p.n(A),fe=p(48555),X=g.forwardRef(function(b,O){var D=b.height,H=b.offsetY,ae=b.offsetX,j=b.children,V=b.prefixCls,Te=b.onInnerResize,tt=b.innerProps,Ke=b.rtl,ge=b.extra,ve={},Ye={display:"flex",flexDirection:"column"};if(H!==void 0){var ye;ve={height:D,position:"relative",overflow:"hidden"},Ye=(0,F.Z)((0,F.Z)({},Ye),{},(ye={transform:"translateY(".concat(H,"px)")},(0,T.Z)(ye,Ke?"marginRight":"marginLeft",-ae),(0,T.Z)(ye,"position","absolute"),(0,T.Z)(ye,"left",0),(0,T.Z)(ye,"right",0),(0,T.Z)(ye,"top",0),ye))}return g.createElement("div",{style:ve},g.createElement(fe.Z,{onResize:function(at){var de=at.offsetHeight;de&&Te&&Te()}},g.createElement("div",(0,L.Z)({style:Ye,className:W()((0,T.Z)({},"".concat(V,"-holder-inner"),V)),ref:O},tt),j,ge)))});X.displayName="Filler";var Me=X,q=function(O){return+setTimeout(O,16)},De=function(O){return clearTimeout(O)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(q=function(O){return window.requestAnimationFrame(O)},De=function(O){return window.cancelAnimationFrame(O)});var ie=0,C=new Map;function Ne(b){C.delete(b)}var ot=function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ie+=1;var H=ie;function ae(j){if(j===0)Ne(H),O();else{var V=q(function(){ae(j-1)});C.set(H,V)}}return ae(D),H};ot.cancel=function(b){var O=C.get(b);return Ne(O),De(O)};var J=ot;function w(b,O){var D="touches"in b?b.touches[0]:b;return D[O?"pageX":"pageY"]}var z=g.forwardRef(function(b,O){var D,H=b.prefixCls,ae=b.rtl,j=b.scrollOffset,V=b.scrollRange,Te=b.onStartMove,tt=b.onStopMove,Ke=b.onScroll,ge=b.horizontal,ve=b.spinSize,Ye=b.containerSize,ye=b.style,Xe=b.thumbStyle,at=g.useState(!1),de=(0,re.Z)(at,2),K=de[0],ht=de[1],Yt=g.useState(null),St=(0,re.Z)(Yt,2),lt=St[0],rr=St[1],kt=g.useState(null),Jt=(0,re.Z)(kt,2),N=Jt[0],xe=Jt[1],mr=!ae,Ar=g.useRef(),Ht=g.useRef(),Dr=g.useState(!1),Pn=(0,re.Z)(Dr,2),Ae=Pn[0],On=Pn[1],Cr=g.useRef(),xr=function(){clearTimeout(Cr.current),On(!0),Cr.current=setTimeout(function(){On(!1)},3e3)},vt=V-Ye||0,Pt=Ye-ve||0,Xt=vt>0,ur=g.useMemo(function(){if(j===0||vt===0)return 0;var Wr=j/vt;return Wr*Pt},[j,vt,Pt]),ho=function(Lr){Lr.stopPropagation(),Lr.preventDefault()},yi=g.useRef({top:ur,dragging:K,pageY:lt,startTop:N});yi.current={top:ur,dragging:K,pageY:lt,startTop:N};var bi=function(Lr){ht(!0),rr(w(Lr,ge)),xe(yi.current.top),Te(),Lr.stopPropagation(),Lr.preventDefault()};g.useEffect(function(){var Wr=function(Bi){Bi.preventDefault()},Lr=Ar.current,kr=Ht.current;return Lr.addEventListener("touchstart",Wr),kr.addEventListener("touchstart",bi),function(){Lr.removeEventListener("touchstart",Wr),kr.removeEventListener("touchstart",bi)}},[]);var Ii=g.useRef();Ii.current=vt;var Hi=g.useRef();Hi.current=Pt,g.useEffect(function(){if(K){var Wr,Lr=function(Bi){var ei=yi.current,Si=ei.dragging,zi=ei.pageY,Po=ei.startTop;if(J.cancel(Wr),Si){var Zi=w(Bi,ge)-zi,bn=Po;!mr&&ge?bn-=Zi:bn+=Zi;var ti=Ii.current,fn=Hi.current,cn=fn?bn/fn:0,tn=Math.ceil(cn*ti);tn=Math.max(tn,0),tn=Math.min(tn,ti),Wr=J(function(){Ke(tn,ge)})}},kr=function(){ht(!1),tt()};return window.addEventListener("mousemove",Lr),window.addEventListener("touchmove",Lr),window.addEventListener("mouseup",kr),window.addEventListener("touchend",kr),function(){window.removeEventListener("mousemove",Lr),window.removeEventListener("touchmove",Lr),window.removeEventListener("mouseup",kr),window.removeEventListener("touchend",kr),J.cancel(Wr)}}},[K]),g.useEffect(function(){xr()},[j]),g.useImperativeHandle(O,function(){return{delayHidden:xr}});var Nn="".concat(H,"-scrollbar"),Er={position:"absolute",visibility:Ae&&Xt?null:"hidden"},Fn={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ge?(Er.height=8,Er.left=0,Er.right=0,Er.bottom=0,Fn.height="100%",Fn.width=ve,mr?Fn.left=ur:Fn.right=ur):(Er.width=8,Er.top=0,Er.bottom=0,mr?Er.right=0:Er.left=0,Fn.width="100%",Fn.height=ve,Fn.top=ur),g.createElement("div",{ref:Ar,className:W()(Nn,(D={},(0,T.Z)(D,"".concat(Nn,"-horizontal"),ge),(0,T.Z)(D,"".concat(Nn,"-vertical"),!ge),(0,T.Z)(D,"".concat(Nn,"-visible"),Ae),D)),style:(0,F.Z)((0,F.Z)({},Er),ye),onMouseDown:ho,onMouseMove:xr},g.createElement("div",{ref:Ht,className:W()("".concat(Nn,"-thumb"),(0,T.Z)({},"".concat(Nn,"-thumb-moving"),K)),style:(0,F.Z)((0,F.Z)({},Fn),Xe),onMouseDown:bi}))}),he=z;function be(b){var O=b.children,D=b.setRef,H=g.useCallback(function(ae){D(ae)},[]);return g.cloneElement(O,{ref:H})}function He(b,O,D,H,ae,j,V){var Te=V.getKey;return b.slice(O,D+1).map(function(tt,Ke){var ge=O+Ke,ve=j(tt,ge,{style:{width:H}}),Ye=Te(tt);return g.createElement(be,{key:Ye,setRef:function(Xe){return ae(tt,Xe)}},ve)})}function _(b){return b instanceof HTMLElement||b instanceof SVGElement}function B(b){return _(b)?b:b instanceof g.Component?Re.findDOMNode(b):null}var Ge=p(15671),$e=p(43144),x=function(){function b(){(0,Ge.Z)(this,b),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,$e.Z)(b,[{key:"set",value:function(D,H){this.maps[D]=H,this.id+=1}},{key:"get",value:function(D){return this.maps[D]}}]),b}(),E=x;function R(b,O,D){var H=g.useState(0),ae=(0,re.Z)(H,2),j=ae[0],V=ae[1],Te=(0,g.useRef)(new Map),tt=(0,g.useRef)(new E),Ke=(0,g.useRef)();function ge(){J.cancel(Ke.current)}function ve(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ge();var Xe=function(){Te.current.forEach(function(de,K){if(de&&de.offsetParent){var ht=B(de),Yt=ht.offsetHeight;tt.current.get(K)!==Yt&&tt.current.set(K,ht.offsetHeight)}}),V(function(de){return de+1})};ye?Xe():Ke.current=J(Xe)}function Ye(ye,Xe){var at=b(ye),de=Te.current.get(at);Xe?(Te.current.set(at,Xe),ve()):Te.current.delete(at),!de!=!Xe&&(Xe?O==null||O(ye):D==null||D(ye))}return(0,g.useEffect)(function(){return ge},[]),[Ye,ve,tt.current,j]}function G(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var oe=G()?g.useLayoutEffect:g.useEffect,Qe=function(O,D){var H=g.useRef(!0);oe(function(){return O(H.current)},D),oe(function(){return H.current=!1,function(){H.current=!0}},[])},Ue=function(O,D){Qe(function(H){if(!H)return O()},D)},Fe=Qe;function Be(b){var O=g.useRef();O.current=b;var D=g.useCallback(function(){for(var H,ae=arguments.length,j=new Array(ae),V=0;V<ae;V++)j[V]=arguments[V];return(H=O.current)===null||H===void 0?void 0:H.call.apply(H,[O].concat(j))},[]);return D}function Ce(b){var O=React.useRef(!1),D=React.useState(b),H=_slicedToArray(D,2),ae=H[0],j=H[1];React.useEffect(function(){return O.current=!1,function(){O.current=!0}},[]);function V(Te,tt){tt&&O.current||j(Te)}return[ae,V]}function Ot(b){return b!==void 0}function Nt(b,O){var D=O||{},H=D.defaultValue,ae=D.value,j=D.onChange,V=D.postState,Te=useState(function(){return Ot(ae)?ae:Ot(H)?typeof H=="function"?H():H:typeof b=="function"?b():b}),tt=_slicedToArray(Te,2),Ke=tt[0],ge=tt[1],ve=ae!==void 0?ae:Ke,Ye=V?V(ve):ve,ye=useEvent(j),Xe=useState([ve]),at=_slicedToArray(Xe,2),de=at[0],K=at[1];useLayoutUpdateEffect(function(){var Yt=de[0];Ke!==Yt&&ye(Ke,Yt)},[de]),useLayoutUpdateEffect(function(){Ot(ae)||ge(ae)},[ae]);var ht=useEvent(function(Yt,St){ge(Yt,St),K([ve],St)});return[Ye,ht]}var Je=p(31461);function yt(b,O,D){var H=React.useRef({});return(!("value"in H.current)||D(H.current.condition,O))&&(H.current.value=b(),H.current.condition=O),H.current.value}function st(b,O){typeof b=="function"?b(O):_typeof(b)==="object"&&b&&"current"in b&&(b.current=O)}function Gt(){for(var b=arguments.length,O=new Array(b),D=0;D<b;D++)O[D]=arguments[D];var H=O.filter(function(ae){return ae});return H.length<=1?H[0]:function(ae){O.forEach(function(j){st(j,ae)})}}function ct(){for(var b=arguments.length,O=new Array(b),D=0;D<b;D++)O[D]=arguments[D];return useMemo(function(){return Gt.apply(void 0,O)},O,function(H,ae){return H.length!==ae.length||H.every(function(j,V){return j!==ae[V]})})}function bt(b){var O,D,H=isMemo(b)?b.type.type:b.type;return!(typeof H=="function"&&!((O=H.prototype)!==null&&O!==void 0&&O.render)||typeof b=="function"&&!((D=b.prototype)!==null&&D!==void 0&&D.render))}function qe(b){return!isValidElement(b)||isFragment(b)?!1:bt(b)}function er(b,O,D,H){if(!O.length)return D;var ae=_toArray(O),j=ae[0],V=ae.slice(1),Te;return!b&&typeof j=="number"?Te=[]:Array.isArray(b)?Te=_toConsumableArray(b):Te=_objectSpread({},b),H&&D===void 0&&V.length===1?delete Te[j][V[0]]:Te[j]=er(Te[j],V,D,H),Te}function ar(b,O,D){var H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return O.length&&H&&D===void 0&&!get(b,O.slice(0,-1))?b:er(b,O,D,H)}function lr(b){return _typeof(b)==="object"&&b!==null&&Object.getPrototypeOf(b)===Object.prototype}function Tt(b){return Array.isArray(b)?[]:{}}var mt=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function wt(){for(var b=arguments.length,O=new Array(b),D=0;D<b;D++)O[D]=arguments[D];var H=Tt(O[0]);return O.forEach(function(ae){function j(V,Te){var tt=new Set(Te),Ke=get(ae,V),ge=Array.isArray(Ke);if(ge||lr(Ke)){if(!tt.has(Ke)){tt.add(Ke);var ve=get(H,V);ge?H=ar(H,V,[]):(!ve||_typeof(ve)!=="object")&&(H=ar(H,V,Tt(Ke))),mt(Ke).forEach(function(Ye){j([].concat(_toConsumableArray(V),[Ye]),tt)})}}else H=ar(H,V,Ke)}j([])}),H}var Et={},_t=[],Ft=function(O){_t.push(O)};function Rt(b,O){if(0)var D}function Wt(b,O){if(0)var D}function tr(){Et={}}function pr(b,O,D){!O&&!Et[D]&&(b(!1,D),Et[D]=!0)}function Rr(b,O){pr(Rt,b,O)}function gr(b,O){pr(Wt,b,O)}Rr.preMessage=Ft,Rr.resetWarned=tr,Rr.noteOnce=gr;var qn=null,Lt=10;function Fr(b,O,D,H,ae,j,V,Te){var tt=g.useRef(),Ke=g.useState(null),ge=(0,re.Z)(Ke,2),ve=ge[0],Ye=ge[1];return Fe(function(){if(ve&&ve.times<Lt){if(!b.current){Ye(function(xr){return(0,F.Z)({},xr)});return}j();var ye=ve.targetAlign,Xe=ve.originAlign,at=ve.index,de=ve.offset,K=b.current.clientHeight,ht=!1,Yt=ye,St=null;if(K){for(var lt=ye||Xe,rr=0,kt=0,Jt=0,N=Math.min(O.length-1,at),xe=0;xe<=N;xe+=1){var mr=ae(O[xe]);kt=rr;var Ar=D.get(mr);Jt=kt+(Ar===void 0?H:Ar),rr=Jt}for(var Ht=lt==="top"?de:K-de,Dr=N;Dr>=0;Dr-=1){var Pn=ae(O[Dr]),Ae=D.get(Pn);if(Ae===void 0){ht=!0;break}if(Ht-=Ae,Ht<=0)break}switch(lt){case"top":St=kt-de;break;case"bottom":St=Jt-K+de;break;default:{var On=b.current.scrollTop,Cr=On+K;kt<On?Yt="top":Jt>Cr&&(Yt="bottom")}}St!==null&&V(St),St!==ve.lastTop&&(ht=!0)}ht&&Ye(function(xr){return(0,F.Z)((0,F.Z)({},xr),{},{times:xr.times+1,targetAlign:Yt,lastTop:St})})}},[ve,b.current]),function(ye){if(ye==null){Te();return}if(J.cancel(tt.current),typeof ye=="number")V(ye);else if(ye&&(0,Z.Z)(ye)==="object"){var Xe,at=ye.align;"index"in ye?Xe=ye.index:Xe=O.findIndex(function(ht){return ae(ht)===ye.key});var de=ye.offset,K=de===void 0?0:de;Ye({times:0,index:Xe,offset:K,originAlign:at})}}}function me(b,O,D,H){var ae=D-b,j=O-D,V=Math.min(ae,j)*2;if(H<=V){var Te=Math.floor(H/2);return H%2?D+Te+1:D-Te}return ae>j?D-(H-j):D+(H-ae)}function un(b,O,D){var H=b.length,ae=O.length,j,V;if(H===0&&ae===0)return null;H<ae?(j=b,V=O):(j=O,V=b);var Te={__EMPTY_ITEM__:!0};function tt(Xe){return Xe!==void 0?D(Xe):Te}for(var Ke=null,ge=Math.abs(H-ae)!==1,ve=0;ve<V.length;ve+=1){var Ye=tt(j[ve]),ye=tt(V[ve]);if(Ye!==ye){Ke=ve,ge=ge||Ye!==tt(V[ve+1]);break}}return Ke===null?null:{index:Ke,multiple:ge}}function ce(b,O,D){var H=g.useState(b),ae=(0,re.Z)(H,2),j=ae[0],V=ae[1],Te=g.useState(null),tt=(0,re.Z)(Te,2),Ke=tt[0],ge=tt[1];return g.useEffect(function(){var ve=un(j||[],b||[],O);(ve==null?void 0:ve.index)!==void 0&&(D==null||D(ve.index),ge(b[ve.index])),V(b)},[b]),[Ke]}var ee=(typeof navigator=="undefined"?"undefined":(0,Z.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),ne=ee,ke=function(b,O){var D=(0,g.useRef)(!1),H=(0,g.useRef)(null);function ae(){clearTimeout(H.current),D.current=!0,H.current=setTimeout(function(){D.current=!1},50)}var j=(0,g.useRef)({top:b,bottom:O});return j.current.top=b,j.current.bottom=O,function(V){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=V<0&&j.current.top||V>0&&j.current.bottom;return Te&&tt?(clearTimeout(H.current),D.current=!1):(!tt||D.current)&&ae(),!D.current&&tt}};function Pe(b,O,D,H,ae){var j=(0,g.useRef)(0),V=(0,g.useRef)(null),Te=(0,g.useRef)(null),tt=(0,g.useRef)(!1),Ke=ke(O,D);function ge(de,K){J.cancel(V.current),j.current+=K,Te.current=K,!Ke(K)&&(ne||de.preventDefault(),V.current=J(function(){var ht=tt.current?10:1;ae(j.current*ht),j.current=0}))}function ve(de,K){ae(K,!0),ne||de.preventDefault()}var Ye=(0,g.useRef)(null),ye=(0,g.useRef)(null);function Xe(de){if(b){J.cancel(ye.current),ye.current=J(function(){Ye.current=null},2);var K=de.deltaX,ht=de.deltaY,Yt=de.shiftKey,St=K,lt=ht;(Ye.current==="sx"||!Ye.current&&Yt&&ht&&!K)&&(St=ht,lt=0,Ye.current="sx");var rr=Math.abs(St),kt=Math.abs(lt);Ye.current===null&&(Ye.current=H&&rr>kt?"x":"y"),Ye.current==="y"?ge(de,lt):ve(de,St)}}function at(de){b&&(tt.current=de.detail===Te.current)}return[Xe,at]}var pt=14/15;function je(b,O,D){var H=(0,g.useRef)(!1),ae=(0,g.useRef)(0),j=(0,g.useRef)(null),V=(0,g.useRef)(null),Te,tt=function(Ye){if(H.current){var ye=Math.ceil(Ye.touches[0].pageY),Xe=ae.current-ye;ae.current=ye,D(Xe)&&Ye.preventDefault(),clearInterval(V.current),V.current=setInterval(function(){Xe*=pt,(!D(Xe,!0)||Math.abs(Xe)<=.1)&&clearInterval(V.current)},16)}},Ke=function(){H.current=!1,Te()},ge=function(Ye){Te(),Ye.touches.length===1&&!H.current&&(H.current=!0,ae.current=Math.ceil(Ye.touches[0].pageY),j.current=Ye.target,j.current.addEventListener("touchmove",tt),j.current.addEventListener("touchend",Ke))};Te=function(){j.current&&(j.current.removeEventListener("touchmove",tt),j.current.removeEventListener("touchend",Ke))},Fe(function(){return b&&O.current.addEventListener("touchstart",ge),function(){var ve;(ve=O.current)===null||ve===void 0||ve.removeEventListener("touchstart",ge),Te(),clearInterval(V.current)}},[b])}var It=20;function Vt(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=b/O*100;return isNaN(D)&&(D=0),D=Math.max(D,It),D=Math.min(D,b/2),Math.floor(D)}function ut(b,O,D,H){var ae=g.useMemo(function(){return[new Map,[]]},[b,D.id,H]),j=(0,re.Z)(ae,2),V=j[0],Te=j[1],tt=function(ge){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge,Ye=V.get(ge),ye=V.get(ve);if(Ye===void 0||ye===void 0)for(var Xe=b.length,at=Te.length;at<Xe;at+=1){var de,K=b[at],ht=O(K);V.set(ht,at);var Yt=(de=D.get(ht))!==null&&de!==void 0?de:H;if(Te[at]=(Te[at-1]||0)+Yt,ht===ge&&(Ye=at),ht===ve&&(ye=at),Ye!==void 0&&ye!==void 0)break}return{top:Te[Ye-1]||0,bottom:Te[ye]}};return tt}var Ct=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],_e=[],ze={overflowY:"auto",overflowAnchor:"none"};function et(b,O){var D=b.prefixCls,H=D===void 0?"rc-virtual-list":D,ae=b.className,j=b.height,V=b.itemHeight,Te=b.fullHeight,tt=Te===void 0?!0:Te,Ke=b.style,ge=b.data,ve=b.children,Ye=b.itemKey,ye=b.virtual,Xe=b.direction,at=b.scrollWidth,de=b.component,K=de===void 0?"div":de,ht=b.onScroll,Yt=b.onVirtualScroll,St=b.onVisibleChange,lt=b.innerProps,rr=b.extraRender,kt=b.styles,Jt=(0,k.Z)(b,Ct),N=!!(ye!==!1&&j&&V),xe=N&&ge&&(V*ge.length>j||!!at),mr=Xe==="rtl",Ar=W()(H,(0,T.Z)({},"".concat(H,"-rtl"),mr),ae),Ht=ge||_e,Dr=(0,g.useRef)(),Pn=(0,g.useRef)(),Ae=(0,g.useState)(0),On=(0,re.Z)(Ae,2),Cr=On[0],xr=On[1],vt=(0,g.useState)(0),Pt=(0,re.Z)(vt,2),Xt=Pt[0],ur=Pt[1],ho=(0,g.useState)(!1),yi=(0,re.Z)(ho,2),bi=yi[0],Ii=yi[1],Hi=function(){Ii(!0)},Nn=function(){Ii(!1)},Er=g.useCallback(function(se){return typeof Ye=="function"?Ye(se):se==null?void 0:se[Ye]},[Ye]),Fn={getKey:Er};function Wr(se){xr(function(te){var Oe;typeof se=="function"?Oe=se(te):Oe=se;var we=Yo(Oe);return Dr.current.scrollTop=we,we})}var Lr=(0,g.useRef)({start:0,end:Ht.length}),kr=(0,g.useRef)(),Ji=ce(Ht,Er),Bi=(0,re.Z)(Ji,1),ei=Bi[0];kr.current=ei;var Si=R(Er,null,null),zi=(0,re.Z)(Si,4),Po=zi[0],Zi=zi[1],bn=zi[2],ti=zi[3],fn=g.useMemo(function(){if(!N)return{scrollHeight:void 0,start:0,end:Ht.length-1,offset:void 0};if(!xe){var se;return{scrollHeight:((se=Pn.current)===null||se===void 0?void 0:se.offsetHeight)||0,start:0,end:Ht.length-1,offset:void 0}}for(var te=0,Oe,we,Ie,fr=Ht.length,xt=0;xt<fr;xt+=1){var nr=Ht[xt],yr=Er(nr),At=bn.get(yr),ir=te+(At===void 0?V:At);ir>=Cr&&Oe===void 0&&(Oe=xt,we=te),ir>Cr+j&&Ie===void 0&&(Ie=xt),te=ir}return Oe===void 0&&(Oe=0,we=0,Ie=Math.ceil(j/V)),Ie===void 0&&(Ie=Ht.length-1),Ie=Math.min(Ie+1,Ht.length-1),{scrollHeight:te,start:Oe,end:Ie,offset:we}},[xe,N,Cr,Ht,ti,j]),cn=fn.scrollHeight,tn=fn.start,wi=fn.end,_i=fn.offset;Lr.current.start=tn,Lr.current.end=wi;var qi=g.useState({width:0,height:j}),Hn=(0,re.Z)(qi,2),Ir=Hn[0],Go=Hn[1],vo=function(te){Go({width:te.width||te.offsetWidth,height:te.height||te.offsetHeight})},jo=(0,g.useRef)(),Oo=(0,g.useRef)(),Sn=g.useMemo(function(){return Vt(Ir.width,at)},[Ir.width,at]),da=g.useMemo(function(){return Vt(Ir.height,cn)},[Ir.height,cn]),eo=cn-j,to=(0,g.useRef)(eo);to.current=eo;function Yo(se){var te=se;return Number.isNaN(to.current)||(te=Math.min(te,to.current)),te=Math.max(te,0),te}var Bn=Cr<=0,po=Cr>=eo,zn=ke(Bn,po),Ci=function(){return{x:mr?-Xt:Xt,y:Cr}},xi=(0,g.useRef)(Ci()),ri=Be(function(){if(Yt){var se=Ci();(xi.current.x!==se.x||xi.current.y!==se.y)&&(Yt(se),xi.current=se)}});function ha(se,te){var Oe=se;te?((0,Re.flushSync)(function(){ur(Oe)}),ri()):Wr(Oe)}function va(se){var te=se.currentTarget.scrollTop;te!==Cr&&Wr(te),ht==null||ht(se),ri()}var No=function(te){var Oe=te,we=at-Ir.width;return Oe=Math.max(Oe,0),Oe=Math.min(Oe,we),Oe},pa=Be(function(se,te){te?((0,Re.flushSync)(function(){ur(function(Oe){var we=Oe+(mr?-se:se);return No(we)})}),ri()):Wr(function(Oe){var we=Oe+se;return we})}),Xo=Pe(N,Bn,po,!!at,pa),f=(0,re.Z)(Xo,2),d=f[0],c=f[1];je(N,Dr,function(se,te){return zn(se,te)?!1:(d({preventDefault:function(){},deltaY:se}),!0)}),Fe(function(){function se(Oe){N&&Oe.preventDefault()}var te=Dr.current;return te.addEventListener("wheel",d),te.addEventListener("DOMMouseScroll",c),te.addEventListener("MozMousePixelScroll",se),function(){te.removeEventListener("wheel",d),te.removeEventListener("DOMMouseScroll",c),te.removeEventListener("MozMousePixelScroll",se)}},[N]),Fe(function(){at&&ur(function(se){return No(se)})},[Ir.width,at]);var m=function(){var te,Oe;(te=jo.current)===null||te===void 0||te.delayHidden(),(Oe=Oo.current)===null||Oe===void 0||Oe.delayHidden()},P=Fr(Dr,Ht,bn,V,Er,function(){return Zi(!0)},Wr,m);g.useImperativeHandle(O,function(){return{getScrollInfo:Ci,scrollTo:function(te){function Oe(we){return we&&(0,Z.Z)(we)==="object"&&("left"in we||"top"in we)}Oe(te)?(te.left!==void 0&&ur(No(te.left)),P(te.top)):P(te)}}}),Fe(function(){if(St){var se=Ht.slice(tn,wi+1);St(se,Ht)}},[tn,wi,Ht]);var Y=ut(Ht,Er,bn,V),le=rr==null?void 0:rr({start:tn,end:wi,virtual:xe,offsetX:Xt,offsetY:_i,rtl:mr,getSize:Y}),We=He(Ht,tn,wi,at,Po,ve,Fn),Se=null;j&&(Se=(0,F.Z)((0,T.Z)({},tt?"height":"maxHeight",j),ze),N&&(Se.overflowY="hidden",at&&(Se.overflowX="hidden"),bi&&(Se.pointerEvents="none")));var nt={};return mr&&(nt.dir="rtl"),g.createElement("div",(0,L.Z)({style:(0,F.Z)((0,F.Z)({},Ke),{},{position:"relative"}),className:Ar},nt,Jt),g.createElement(fe.Z,{onResize:vo},g.createElement(K,{className:"".concat(H,"-holder"),style:Se,ref:Dr,onScroll:va,onMouseEnter:m},g.createElement(Me,{prefixCls:H,height:cn,offsetX:Xt,offsetY:_i,scrollWidth:at,onInnerResize:Zi,ref:Pn,innerProps:lt,rtl:mr,extra:le},We))),xe&&cn>j&&g.createElement(he,{ref:jo,prefixCls:H,scrollOffset:Cr,scrollRange:cn,rtl:mr,onScroll:ha,onStartMove:Hi,onStopMove:Nn,spinSize:da,containerSize:Ir.height,style:kt==null?void 0:kt.verticalScrollBar,thumbStyle:kt==null?void 0:kt.verticalScrollBarThumb}),xe&&at&&g.createElement(he,{ref:Oo,prefixCls:H,scrollOffset:Xt,scrollRange:at,rtl:mr,onScroll:ha,onStartMove:Hi,onStopMove:Nn,spinSize:Sn,containerSize:Ir.width,horizontal:!0,style:kt==null?void 0:kt.horizontalScrollBar,thumbStyle:kt==null?void 0:kt.horizontalScrollBarThumb}))}var jt=g.forwardRef(et);jt.displayName="List";var dr=jt,sr=dr},66392:function(Qt,Le){"use strict";var p;var L=Symbol.for("react.element"),F=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),g=Symbol.for("react.context"),Re=Symbol.for("react.server_context"),A=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),Me=Symbol.for("react.lazy"),q=Symbol.for("react.offscreen"),De;De=Symbol.for("react.module.reference");function ie(C){if(typeof C=="object"&&C!==null){var Ne=C.$$typeof;switch(Ne){case L:switch(C=C.type,C){case Z:case T:case re:case W:case fe:return C;default:switch(C=C&&C.$$typeof,C){case Re:case g:case A:case Me:case X:case k:return C;default:return Ne}}case F:return Ne}}}p=g,p=k,p=L,p=A,p=Z,p=Me,p=X,p=F,p=T,p=re,p=W,p=fe,p=function(){return!1},p=function(){return!1},p=function(C){return ie(C)===g},p=function(C){return ie(C)===k},p=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===L},p=function(C){return ie(C)===A},p=function(C){return ie(C)===Z},p=function(C){return ie(C)===Me},p=function(C){return ie(C)===X},p=function(C){return ie(C)===F},p=function(C){return ie(C)===T},p=function(C){return ie(C)===re},p=function(C){return ie(C)===W},p=function(C){return ie(C)===fe},p=function(C){return typeof C=="string"||typeof C=="function"||C===Z||C===T||C===re||C===W||C===fe||C===q||typeof C=="object"&&C!==null&&(C.$$typeof===Me||C.$$typeof===X||C.$$typeof===k||C.$$typeof===g||C.$$typeof===A||C.$$typeof===De||C.getModuleId!==void 0)},p=ie},31461:function(Qt,Le,p){"use strict";p(66392)},91033:function(Qt,Le,p){"use strict";var L=function(){if(typeof Map!="undefined")return Map;function x(E,R){var G=-1;return E.some(function(oe,Qe){return oe[0]===R?(G=Qe,!0):!1}),G}return function(){function E(){this.__entries__=[]}return Object.defineProperty(E.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),E.prototype.get=function(R){var G=x(this.__entries__,R),oe=this.__entries__[G];return oe&&oe[1]},E.prototype.set=function(R,G){var oe=x(this.__entries__,R);~oe?this.__entries__[oe][1]=G:this.__entries__.push([R,G])},E.prototype.delete=function(R){var G=this.__entries__,oe=x(G,R);~oe&&G.splice(oe,1)},E.prototype.has=function(R){return!!~x(this.__entries__,R)},E.prototype.clear=function(){this.__entries__.splice(0)},E.prototype.forEach=function(R,G){G===void 0&&(G=null);for(var oe=0,Qe=this.__entries__;oe<Qe.length;oe++){var Ue=Qe[oe];R.call(G,Ue[1],Ue[0])}},E}()}(),F=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Z=function(){return typeof p.g!="undefined"&&p.g.Math===Math?p.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),re=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Z):function(x){return setTimeout(function(){return x(Date.now())},1e3/60)}}(),T=2;function k(x,E){var R=!1,G=!1,oe=0;function Qe(){R&&(R=!1,x()),G&&Fe()}function Ue(){re(Qe)}function Fe(){var Be=Date.now();if(R){if(Be-oe<T)return;G=!0}else R=!0,G=!1,setTimeout(Ue,E);oe=Be}return Fe}var g=20,Re=["top","right","bottom","left","width","height","size","weight"],A=typeof MutationObserver!="undefined",W=function(){function x(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=k(this.refresh.bind(this),g)}return x.prototype.addObserver=function(E){~this.observers_.indexOf(E)||this.observers_.push(E),this.connected_||this.connect_()},x.prototype.removeObserver=function(E){var R=this.observers_,G=R.indexOf(E);~G&&R.splice(G,1),!R.length&&this.connected_&&this.disconnect_()},x.prototype.refresh=function(){var E=this.updateObservers_();E&&this.refresh()},x.prototype.updateObservers_=function(){var E=this.observers_.filter(function(R){return R.gatherActive(),R.hasActive()});return E.forEach(function(R){return R.broadcastActive()}),E.length>0},x.prototype.connect_=function(){!F||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),A?(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)},x.prototype.disconnect_=function(){!F||!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)},x.prototype.onTransitionEnd_=function(E){var R=E.propertyName,G=R===void 0?"":R,oe=Re.some(function(Qe){return!!~G.indexOf(Qe)});oe&&this.refresh()},x.getInstance=function(){return this.instance_||(this.instance_=new x),this.instance_},x.instance_=null,x}(),fe=function(x,E){for(var R=0,G=Object.keys(E);R<G.length;R++){var oe=G[R];Object.defineProperty(x,oe,{value:E[oe],enumerable:!1,writable:!1,configurable:!0})}return x},X=function(x){var E=x&&x.ownerDocument&&x.ownerDocument.defaultView;return E||Z},Me=he(0,0,0,0);function q(x){return parseFloat(x)||0}function De(x){for(var E=[],R=1;R<arguments.length;R++)E[R-1]=arguments[R];return E.reduce(function(G,oe){var Qe=x["border-"+oe+"-width"];return G+q(Qe)},0)}function ie(x){for(var E=["top","right","bottom","left"],R={},G=0,oe=E;G<oe.length;G++){var Qe=oe[G],Ue=x["padding-"+Qe];R[Qe]=q(Ue)}return R}function C(x){var E=x.getBBox();return he(0,0,E.width,E.height)}function Ne(x){var E=x.clientWidth,R=x.clientHeight;if(!E&&!R)return Me;var G=X(x).getComputedStyle(x),oe=ie(G),Qe=oe.left+oe.right,Ue=oe.top+oe.bottom,Fe=q(G.width),Be=q(G.height);if(G.boxSizing==="border-box"&&(Math.round(Fe+Qe)!==E&&(Fe-=De(G,"left","right")+Qe),Math.round(Be+Ue)!==R&&(Be-=De(G,"top","bottom")+Ue)),!J(x)){var Ce=Math.round(Fe+Qe)-E,Ot=Math.round(Be+Ue)-R;Math.abs(Ce)!==1&&(Fe-=Ce),Math.abs(Ot)!==1&&(Be-=Ot)}return he(oe.left,oe.top,Fe,Be)}var ot=function(){return typeof SVGGraphicsElement!="undefined"?function(x){return x instanceof X(x).SVGGraphicsElement}:function(x){return x instanceof X(x).SVGElement&&typeof x.getBBox=="function"}}();function J(x){return x===X(x).document.documentElement}function w(x){return F?ot(x)?C(x):Ne(x):Me}function z(x){var E=x.x,R=x.y,G=x.width,oe=x.height,Qe=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,Ue=Object.create(Qe.prototype);return fe(Ue,{x:E,y:R,width:G,height:oe,top:R,right:E+G,bottom:oe+R,left:E}),Ue}function he(x,E,R,G){return{x,y:E,width:R,height:G}}var be=function(){function x(E){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=he(0,0,0,0),this.target=E}return x.prototype.isActive=function(){var E=w(this.target);return this.contentRect_=E,E.width!==this.broadcastWidth||E.height!==this.broadcastHeight},x.prototype.broadcastRect=function(){var E=this.contentRect_;return this.broadcastWidth=E.width,this.broadcastHeight=E.height,E},x}(),He=function(){function x(E,R){var G=z(R);fe(this,{target:E,contentRect:G})}return x}(),_=function(){function x(E,R,G){if(this.activeObservations_=[],this.observations_=new L,typeof E!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=E,this.controller_=R,this.callbackCtx_=G}return x.prototype.observe=function(E){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(E instanceof X(E).Element))throw new TypeError('parameter 1 is not of type "Element".');var R=this.observations_;R.has(E)||(R.set(E,new be(E)),this.controller_.addObserver(this),this.controller_.refresh())}},x.prototype.unobserve=function(E){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(E instanceof X(E).Element))throw new TypeError('parameter 1 is not of type "Element".');var R=this.observations_;R.has(E)&&(R.delete(E),R.size||this.controller_.removeObserver(this))}},x.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},x.prototype.gatherActive=function(){var E=this;this.clearActive(),this.observations_.forEach(function(R){R.isActive()&&E.activeObservations_.push(R)})},x.prototype.broadcastActive=function(){if(this.hasActive()){var E=this.callbackCtx_,R=this.activeObservations_.map(function(G){return new He(G.target,G.broadcastRect())});this.callback_.call(E,R,E),this.clearActive()}},x.prototype.clearActive=function(){this.activeObservations_.splice(0)},x.prototype.hasActive=function(){return this.activeObservations_.length>0},x}(),B=typeof WeakMap!="undefined"?new WeakMap:new L,Ge=function(){function x(E){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var R=W.getInstance(),G=new _(E,R,this);B.set(this,G)}return x}();["observe","unobserve","disconnect"].forEach(function(x){Ge.prototype[x]=function(){var E;return(E=B.get(this))[x].apply(E,arguments)}});var $e=function(){return typeof Z.ResizeObserver!="undefined"?Z.ResizeObserver:Ge}();Le.Z=$e},17423:function(Qt,Le,p){"use strict";p.d(Le,{Z:function(){return Re}});const L=A=>typeof A=="object"&&A!=null&&A.nodeType===1,F=(A,W)=>(!W||A!=="hidden")&&A!=="visible"&&A!=="clip",Z=(A,W)=>{if(A.clientHeight<A.scrollHeight||A.clientWidth<A.scrollWidth){const fe=getComputedStyle(A,null);return F(fe.overflowY,W)||F(fe.overflowX,W)||(X=>{const Me=(q=>{if(!q.ownerDocument||!q.ownerDocument.defaultView)return null;try{return q.ownerDocument.defaultView.frameElement}catch(De){return null}})(X);return!!Me&&(Me.clientHeight<X.scrollHeight||Me.clientWidth<X.scrollWidth)})(A)}return!1},re=(A,W,fe,X,Me,q,De,ie)=>q<A&&De>W||q>A&&De<W?0:q<=A&&ie<=fe||De>=W&&ie>=fe?q-A-X:De>W&&ie<fe||q<A&&ie>fe?De-W+Me:0,T=A=>{const W=A.parentElement;return W==null?A.getRootNode().host||null:W},k=(A,W)=>{var fe,X,Me,q;if(typeof document=="undefined")return[];const{scrollMode:De,block:ie,inline:C,boundary:Ne,skipOverflowHiddenElements:ot}=W,J=typeof Ne=="function"?Ne:Nt=>Nt!==Ne;if(!L(A))throw new TypeError("Invalid target");const w=document.scrollingElement||document.documentElement,z=[];let he=A;for(;L(he)&&J(he);){if(he=T(he),he===w){z.push(he);break}he!=null&&he===document.body&&Z(he)&&!Z(document.documentElement)||he!=null&&Z(he,ot)&&z.push(he)}const be=(X=(fe=window.visualViewport)==null?void 0:fe.width)!=null?X:innerWidth,He=(q=(Me=window.visualViewport)==null?void 0:Me.height)!=null?q:innerHeight,{scrollX:_,scrollY:B}=window,{height:Ge,width:$e,top:x,right:E,bottom:R,left:G}=A.getBoundingClientRect(),{top:oe,right:Qe,bottom:Ue,left:Fe}=(Nt=>{const Je=window.getComputedStyle(Nt);return{top:parseFloat(Je.scrollMarginTop)||0,right:parseFloat(Je.scrollMarginRight)||0,bottom:parseFloat(Je.scrollMarginBottom)||0,left:parseFloat(Je.scrollMarginLeft)||0}})(A);let Be=ie==="start"||ie==="nearest"?x-oe:ie==="end"?R+Ue:x+Ge/2-oe+Ue,Ce=C==="center"?G+$e/2-Fe+Qe:C==="end"?E+Qe:G-Fe;const Ot=[];for(let Nt=0;Nt<z.length;Nt++){const Je=z[Nt],{height:yt,width:st,top:Gt,right:ct,bottom:bt,left:qe}=Je.getBoundingClientRect();if(De==="if-needed"&&x>=0&&G>=0&&R<=He&&E<=be&&x>=Gt&&R<=bt&&G>=qe&&E<=ct)return Ot;const er=getComputedStyle(Je),ar=parseInt(er.borderLeftWidth,10),lr=parseInt(er.borderTopWidth,10),Tt=parseInt(er.borderRightWidth,10),mt=parseInt(er.borderBottomWidth,10);let wt=0,Et=0;const _t="offsetWidth"in Je?Je.offsetWidth-Je.clientWidth-ar-Tt:0,Ft="offsetHeight"in Je?Je.offsetHeight-Je.clientHeight-lr-mt:0,Rt="offsetWidth"in Je?Je.offsetWidth===0?0:st/Je.offsetWidth:0,Wt="offsetHeight"in Je?Je.offsetHeight===0?0:yt/Je.offsetHeight:0;if(w===Je)wt=ie==="start"?Be:ie==="end"?Be-He:ie==="nearest"?re(B,B+He,He,lr,mt,B+Be,B+Be+Ge,Ge):Be-He/2,Et=C==="start"?Ce:C==="center"?Ce-be/2:C==="end"?Ce-be:re(_,_+be,be,ar,Tt,_+Ce,_+Ce+$e,$e),wt=Math.max(0,wt+B),Et=Math.max(0,Et+_);else{wt=ie==="start"?Be-Gt-lr:ie==="end"?Be-bt+mt+Ft:ie==="nearest"?re(Gt,bt,yt,lr,mt+Ft,Be,Be+Ge,Ge):Be-(Gt+yt/2)+Ft/2,Et=C==="start"?Ce-qe-ar:C==="center"?Ce-(qe+st/2)+_t/2:C==="end"?Ce-ct+Tt+_t:re(qe,ct,st,ar,Tt+_t,Ce,Ce+$e,$e);const{scrollLeft:tr,scrollTop:pr}=Je;wt=Wt===0?0:Math.max(0,Math.min(pr+wt/Wt,Je.scrollHeight-yt/Wt+Ft)),Et=Rt===0?0:Math.max(0,Math.min(tr+Et/Rt,Je.scrollWidth-st/Rt+_t)),Be+=pr-wt,Ce+=tr-Et}Ot.push({el:Je,top:wt,left:Et})}return Ot},g=A=>A===!1?{block:"end",inline:"nearest"}:(W=>W===Object(W)&&Object.keys(W).length!==0)(A)?A:{block:"start",inline:"nearest"};function Re(A,W){if(!A.isConnected||!(Me=>{let q=Me;for(;q&&q.parentNode;){if(q.parentNode===document)return!0;q=q.parentNode instanceof ShadowRoot?q.parentNode.host:q.parentNode}return!1})(A))return;const fe=(Me=>{const q=window.getComputedStyle(Me);return{top:parseFloat(q.scrollMarginTop)||0,right:parseFloat(q.scrollMarginRight)||0,bottom:parseFloat(q.scrollMarginBottom)||0,left:parseFloat(q.scrollMarginLeft)||0}})(A);if((Me=>typeof Me=="object"&&typeof Me.behavior=="function")(W))return W.behavior(k(A,W));const X=typeof W=="boolean"||W==null?void 0:W.behavior;for(const{el:Me,top:q,left:De}of k(A,g(W))){const ie=q-fe.top+fe.bottom,C=De-fe.left+fe.right;Me.scroll({top:ie,left:C,behavior:X})}}}}]);
|