|
|
(self.webpackChunk=self.webpackChunk||[]).push([[5230],{40001:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return be}});var P=f(54476),w=f(59301),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},W=x,v=f(7657),A=function(y,Me){return w.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},N=w.forwardRef(A),be=N},84105:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return be}});var P=f(54476),w=f(59301),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},W=x,v=f(7657),A=function(y,Me){return w.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},N=w.forwardRef(A),be=N},73331:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return be}});var P=f(54476),w=f(59301),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},W=x,v=f(7657),A=function(y,Me){return w.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},N=w.forwardRef(A),be=N},15277:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return be}});var P=f(54476),w=f(59301),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},W=x,v=f(7657),A=function(y,Me){return w.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},N=w.forwardRef(A),be=N},61485:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return be}});var P=f(54476),w=f(59301),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},W=x,v=f(7657),A=function(y,Me){return w.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},N=w.forwardRef(A),be=N},47472:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return be}});var P=f(54476),w=f(59301),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},W=x,v=f(7657),A=function(y,Me){return w.createElement(v.Z,(0,P.Z)({},y,{ref:Me,icon:W}))},N=w.forwardRef(A),be=N},4887:function(){"use strict"},37068:function(){"use strict"},64179:function(rn,Te,f){"use strict";f.d(Te,{t:function(){return H}});var P=f(59301),w=f(3113),x={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},W=f(92310),v=f.n(W),A=Object.defineProperty,N=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,y=(ye,Pe,J)=>Pe in ye?A(ye,Pe,{enumerable:!0,configurable:!0,writable:!0,value:J}):ye[Pe]=J,Me=(ye,Pe)=>{for(var J in Pe||(Pe={}))be.call(Pe,J)&&y(ye,J,Pe[J]);if(N)for(var J of N(Pe))oe.call(Pe,J)&&y(ye,J,Pe[J]);return ye};const H=({cancelText:ye="\u53D6\u6D88",okText:Pe="\u786E\u5B9A",loading:J=!1,hasOkBtn:qe=!0,hasCancelBtn:ot=!0,okButtonProps:bt={},onCancel:It=()=>{},onOk:re=()=>{},className:Q=""})=>P.createElement("div",{className:v()(x.buttonFixed,Q)},P.createElement("div",{className:x.buttonWrap},ot&&P.createElement(w.ZP,{size:"middle",className:`${x.button} mr20`,onClick:It},ye),qe&&P.createElement(w.ZP,Me({size:"middle",type:"primary",className:`${x.button} mr20`,loading:J,onClick:re},bt),Pe)))},63347:function(rn,Te,f){"use strict";f.d(Te,{h:function(){return Q}});var P=f(59301),w=f(57809),x=f(78241),W=f(3113),v=f(89780),A=f.n(v),N=f(4887),be=f(37068),oe=Object.defineProperty,y=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,J=(S,c,b)=>c in S?oe(S,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):S[c]=b,qe=(S,c)=>{for(var b in c||(c={}))ye.call(c,b)&&J(S,b,c[b]);if(H)for(var b of H(c))Pe.call(c,b)&&J(S,b,c[b]);return S},ot=(S,c)=>y(S,Me(c));const bt=w.default.Option,It={labelCol:{span:4},wrapperCol:{span:20}},re={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"]};Te.Z=({callback:S,onCancel:c})=>{const[b,L]=(0,P.useState)("python");function X(we){L(re[we][1])}function D(we){S(we)}return P.createElement(x.default,ot(qe({},It),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:D,style:{width:500}}),P.createElement(x.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},P.createElement(w.default,{getPopupContainer:we=>we.parentNode,onChange:X},Object.keys(re).map(we=>P.createElement(bt,{key:we,value:we},re[we][0])))),P.createElement(x.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},P.createElement(Q,{mode:b})),P.createElement("div",{className:"flex-container flex-end"},P.createElement(W.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),P.createElement(W.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function Q({value:S,onChange:c,mode:b,options:L={}}){const X=(0,P.useRef)(),[D,we]=(0,P.useState)();return(0,P.useEffect)(()=>{if(D){let ke=function(He){const Oe=He.getValue();c&&c(Oe)};return D.on("change",ke),()=>{D.off("change",ke)}}},[D,c]),(0,P.useEffect)(()=>{D&&D.setOption("mode",b)},[D,b]),(0,P.useEffect)(()=>{D&&(S!==D.getValue()||S==="")&&setTimeout(()=>{D.setValue(S||"")},300)},[D,S]),(0,P.useEffect)(()=>{if(X.current&&!D){const ke=A().fromTextArea(X.current,qe({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},L));we(ke)}},[X.current,D]),P.createElement("div",{className:"my-codemirror-container"},P.createElement("textarea",{ref:X}))}},73312:function(rn,Te,f){"use strict";f.r(Te),f.d(Te,{default:function(){return se}});var P=f(76936),w=f(59301),x=f(95392),W=f(78241),v=f(92832),A=f(63347),N=f(64179),be={bg:"bg___RM4en",wrap:"wrap___ne3nd",title:"title___Nr8TZ",path:"path___mVozd",colorBlue:"colorBlue___jBwMu",width240:"width240___XDhtB"},oe=Object.defineProperty,y=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,ye=(E,I,M)=>I in E?oe(E,I,{enumerable:!0,configurable:!0,writable:!0,value:M}):E[I]=M,Pe=(E,I)=>{for(var M in I||(I={}))Me.call(I,M)&&ye(E,M,I[M]);if(y)for(var M of y(I))H.call(I,M)&&ye(E,M,I[M]);return E},J=(E,I)=>{var M={};for(var $ in E)Me.call(E,$)&&I.indexOf($)<0&&(M[$]=E[$]);if(E!=null&&y)for(var $ of y(E))I.indexOf($)<0&&H.call(E,$)&&(M[$]=E[$]);return M},qe=(E,I,M)=>new Promise(($,q)=>{var xe=z=>{try{Fe(M.next(z))}catch(le){q(le)}},_=z=>{try{Fe(M.throw(z))}catch(le){q(le)}},Fe=z=>z.done?$(z.value):Promise.resolve(z.value).then(xe,_);Fe((M=M.apply(E,I)).next())});const ot=E=>{var I=E,{shixunsDetail:M,globalSetting:$,loading:q,user:xe,dispatch:_}=I,Fe=J(I,["shixunsDetail","globalSetting","loading","user","dispatch"]);const z=(0,x.useLocation)(),[le,Re]=(0,w.useState)({}),ue=(0,w.useRef)(),Ie=(0,w.useRef)(),[U]=W.default.useForm(),[me,Ae]=(0,w.useState)("");(0,w.useEffect)(()=>(_({type:"globalSetting/footerToggle",payload:!1}),()=>{_({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,w.useEffect)(()=>{const je=sessionStorage.getItem("pathArray");if(je){const Ce=je.split(",").join("/"),rt=Ce.indexOf("/")===0?Ce.substr(1):Ce;Ae(rt)}},[]),(0,w.useEffect)(()=>{var je,Ce,rt,lt;Ie.current=(Ce=(je=z.pathname)==null?void 0:je.split("/"))==null?void 0:Ce[2],ue.current=((lt=(rt=z.pathname)==null?void 0:rt.split("/"))==null?void 0:lt[3])==="repository"},[]);const tt=(...je)=>qe(void 0,[...je],function*(Ce={}){if(yield _({type:"shixunsDetail/addRepositoryFile",payload:{id:Ie.current,message:Ce.commitMessage,content:Ce.codeMirror,path:`${me?`${me}/`:""}${Ce.path||""}`,secret_repository:ue.current?void 0:!0}})){const lt=ue.current?`/shixuns/${Ie.current}/repository${me?`/master/shixun_show/${me}`:""}`:`/shixuns/${Ie.current}/secret_repository`;x.history.replace(lt)}}),it=()=>{var je,Ce;x.history.push(`/shixuns/${Ie.current}/${(Ce=(je=z.pathname)==null?void 0:je.split("/"))==null?void 0:Ce[3]}${me?`/master/shixun_show/${me}`:""}`)};return w.createElement("section",{className:be.bg},w.createElement("div",{className:be.wrap},w.createElement("div",{className:be.title},"\u65B0\u5EFA\u6587\u4EF6"),w.createElement(W.default,{className:"mt10",form:U,scrollToFirstError:!0,layout:"vertical",onFinish:tt,onValuesChange:()=>Re(Pe({},U.getFieldsValue()))},w.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},w.createElement(W.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},w.createElement("span",null,w.createElement("span",{className:"mr5"},me?`${me}/`:""),w.createElement(v.default,{className:be.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),w.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")),w.createElement(W.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"}]},w.createElement(v.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"})),w.createElement("div",{className:"mt10 mb20"},w.createElement(W.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},w.createElement(A.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"]}}))),w.createElement(W.default.Item,{noStyle:!0},w.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:it})))))};var bt=(0,x.connect)(({shixunsDetail:E,loading:I,globalSetting:M,user:$})=>({shixunsDetail:E,globalSetting:M,user:$,loading:I.models.index}))(ot),It={bg:"bg___hW0a5",wrap:"wrap___qsjmY",title:"title___TYQ3w",path:"path___J3ICf",colorBlue:"colorBlue___r1F5X",width240:"width240___Vbbdg"},re=Object.defineProperty,Q=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,b=(E,I,M)=>I in E?re(E,I,{enumerable:!0,configurable:!0,writable:!0,value:M}):E[I]=M,L=(E,I)=>{for(var M in I||(I={}))S.call(I,M)&&b(E,M,I[M]);if(Q)for(var M of Q(I))c.call(I,M)&&b(E,M,I[M]);return E},X=(E,I)=>{var M={};for(var $ in E)S.call(E,$)&&I.indexOf($)<0&&(M[$]=E[$]);if(E!=null&&Q)for(var $ of Q(E))I.indexOf($)<0&&c.call(E,$)&&(M[$]=E[$]);return M},D=(E,I,M)=>new Promise(($,q)=>{var xe=z=>{try{Fe(M.next(z))}catch(le){q(le)}},_=z=>{try{Fe(M.throw(z))}catch(le){q(le)}},Fe=z=>z.done?$(z.value):Promise.resolve(z.value).then(xe,_);Fe((M=M.apply(E,I)).next())});const we=E=>{var I=E,{shixunsDetail:M,globalSetting:$,loading:q,user:xe,dispatch:_}=I,Fe=X(I,["shixunsDetail","globalSetting","loading","user","dispatch"]);const z=(0,x.useLocation)(),[le,Re]=(0,w.useState)({}),ue=(0,w.useRef)(),Ie=(0,w.useRef)(),[U]=W.default.useForm(),[me,Ae]=(0,w.useState)("");(0,w.useEffect)(()=>(_({type:"globalSetting/footerToggle",payload:!1}),()=>{_({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,w.useEffect)(()=>{const je=sessionStorage.getItem("pathArray");if(je){const Ce=je.split(",").join("/"),rt=Ce.indexOf("/")===0?Ce.substr(1):Ce;Ae(rt)}},[]),(0,w.useEffect)(()=>{var je,Ce,rt,lt;Ie.current=(Ce=(je=z.pathname)==null?void 0:je.split("/"))==null?void 0:Ce[2],ue.current=((lt=(rt=z.pathname)==null?void 0:rt.split("/"))==null?void 0:lt[3])==="repository"},[]);const tt=(...je)=>D(void 0,[...je],function*(Ce={}){if(yield _({type:"shixunsDetail/addRepositoryFile",payload:{id:Ie.current,message:Ce.commitMessage,content:Ce.codeMirror,path:`${me?`${me}/`:""}${Ce.path||""}`,secret_repository:ue.current?void 0:!0}})){const lt=ue.current?`/shixuns/${Ie.current}/repository${me?`/master/shixun_show/${me}`:""}`:`/shixuns/${Ie.current}/secret_repository`;x.history.replace(lt)}}),it=()=>{var je,Ce;x.history.push(`/shixuns/${Ie.current}/${(Ce=(je=z.pathname)==null?void 0:je.split("/"))==null?void 0:Ce[3]}${me?`/master/shixun_show/${me}`:""}`)};return w.createElement("section",{className:It.bg},w.createElement("div",{className:It.wrap},w.createElement("div",{className:It.title},"\u65B0\u5EFA\u6587\u4EF6"),w.createElement(W.default,{className:"mt10",form:U,scrollToFirstError:!0,layout:"vertical",onFinish:tt,onValuesChange:()=>Re(L({},U.getFieldsValue()))},w.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},w.createElement(W.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},w.createElement("span",null,w.createElement("span",{className:"mr5"},me?`${me}/`:""),w.createElement(v.default,{className:It.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),w.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")),w.createElement(W.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"}]},w.createElement(v.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"})),w.createElement("div",{className:"mt10 mb20"},w.createElement(W.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},w.createElement(A.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"]}}))),w.createElement(W.default.Item,{noStyle:!0},w.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:it})))))};var ke=(0,x.connect)(({shixunsDetail:E,loading:I,globalSetting:M,user:$})=>({shixunsDetail:E,globalSetting:M,user:$,loading:I.models.index}))(we),He={bg:"bg___mZRyL",wrap:"wrap___PZp9Q",title:"title___k98J0",path:"path___rTXhN",colorBlue:"colorBlue___Jn7qR",width240:"width240___RvfYr"},Oe=Object.defineProperty,mt=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,fe=(E,I,M)=>I in E?Oe(E,I,{enumerable:!0,configurable:!0,writable:!0,value:M}):E[I]=M,Y=(E,I)=>{for(var M in I||(I={}))Qe.call(I,M)&&fe(E,M,I[M]);if(mt)for(var M of mt(I))Je.call(I,M)&&fe(E,M,I[M]);return E},de=(E,I)=>{var M={};for(var $ in E)Qe.call(E,$)&&I.indexOf($)<0&&(M[$]=E[$]);if(E!=null&&mt)for(var $ of mt(E))I.indexOf($)<0&&Je.call(E,$)&&(M[$]=E[$]);return M},ae=(E,I,M)=>new Promise(($,q)=>{var xe=z=>{try{Fe(M.next(z))}catch(le){q(le)}},_=z=>{try{Fe(M.throw(z))}catch(le){q(le)}},Fe=z=>z.done?$(z.value):Promise.resolve(z.value).then(xe,_);Fe((M=M.apply(E,I)).next())});const ie=E=>{var I=E,{shixunsDetail:M,globalSetting:$,loading:q,user:xe,dispatch:_}=I,Fe=de(I,["shixunsDetail","globalSetting","loading","user","dispatch"]);const z=(0,x.useLocation)(),[le,Re]=(0,w.useState)({}),ue=(0,w.useRef)(),Ie=(0,w.useRef)(),[U]=W.default.useForm(),[me,Ae]=(0,w.useState)("");(0,w.useEffect)(()=>(_({type:"globalSetting/footerToggle",payload:!1}),()=>{_({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,w.useEffect)(()=>{const je=sessionStorage.getItem("pathArray");if(je){const Ce=je.split(",").join("/"),rt=Ce.indexOf("/")===0?Ce.substr(1):Ce;Ae(rt)}},[]),(0,w.useEffect)(()=>{var je,Ce,rt,lt;Ie.current=(Ce=(je=z.pathname)==null?void 0:je.split("/"))==null?void 0:Ce[2],ue.current=((lt=(rt=z.pathname)==null?void 0:rt.split("/"))==null?void 0:lt[3])==="repository"},[]);const tt=(...je)=>ae(void 0,[...je],function*(Ce={}){if(yield _({type:"shixunsDetail/addRepositoryFile",payload:{id:Ie.current,message:Ce.commitMessage,content:Ce.codeMirror,path:`${me?`${me}/`:""}${Ce.path||""}`,secret_repository:ue.current?void 0:!0}})){const lt=ue.current?`/shixuns/${Ie.current}/repository${me?`/master/shixun_show/${me}`:""}`:`/shixuns/${Ie.current}/secret_repository`;x.history.replace(lt)}}),it=()=>{var je,Ce;x.history.push(`/shixuns/${Ie.current}/${(Ce=(je=z.pathname)==null?void 0:je.split("/"))==null?void 0:Ce[3]}${me?`/master/shixun_show/${me}`:""}`)};return w.createElement("section",{className:He.bg},w.createElement("div",{className:He.wrap},w.createElement("div",{className:He.title},"\u65B0\u5EFA\u6587\u4EF6"),w.createElement(W.default,{className:"mt10",form:U,scrollToFirstError:!0,layout:"vertical",onFinish:tt,onValuesChange:()=>Re(Y({},U.getFieldsValue()))},w.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},w.createElement(W.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},w.createElement("span",null,w.createElement("span",{className:"mr5"},me?`${me}/`:""),w.createElement(v.default,{className:He.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),w.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")),w.createElement(W.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"}]},w.createElement(v.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"})),w.createElement("div",{className:"mt10 mb20"},w.createElement(W.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},w.createElement(A.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"]}}))),w.createElement(W.default.Item,{noStyle:!0},w.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:it})))))};var Ve=(0,x.connect)(({shixunsDetail:E,loading:I,globalSetting:M,user:$})=>({shixunsDetail:E,globalSetting:M,user:$,loading:I.models.index}))(ie),ze={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},he=Object.defineProperty,De=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,Lt=(E,I,M)=>I in E?he(E,I,{enumerable:!0,configurable:!0,writable:!0,value:M}):E[I]=M,xt=(E,I)=>{for(var M in I||(I={}))pe.call(I,M)&&Lt(E,M,I[M]);if(De)for(var M of De(I))St.call(I,M)&&Lt(E,M,I[M]);return E},et=(E,I)=>{var M={};for(var $ in E)pe.call(E,$)&&I.indexOf($)<0&&(M[$]=E[$]);if(E!=null&&De)for(var $ of De(E))I.indexOf($)<0&&St.call(E,$)&&(M[$]=E[$]);return M},Mt=(E,I,M)=>new Promise(($,q)=>{var xe=z=>{try{Fe(M.next(z))}catch(le){q(le)}},_=z=>{try{Fe(M.throw(z))}catch(le){q(le)}},Fe=z=>z.done?$(z.value):Promise.resolve(z.value).then(xe,_);Fe((M=M.apply(E,I)).next())});const at=E=>{var I=E,{shixunsDetail:M,globalSetting:$,loading:q,user:xe,dispatch:_}=I,Fe=et(I,["shixunsDetail","globalSetting","loading","user","dispatch"]);const z=(0,x.useLocation)(),[le,Re]=(0,w.useState)({}),ue=(0,w.useRef)(),Ie=(0,w.useRef)(),[U]=W.default.useForm(),[me,Ae]=(0,w.useState)("");(0,w.useEffect)(()=>(_({type:"globalSetting/footerToggle",payload:!1}),()=>{_({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,w.useEffect)(()=>{const je=sessionStorage.getItem("pathArray");if(je){const Ce=je.split(",").join("/"),rt=Ce.indexOf("/")===0?Ce.substr(1):Ce;Ae(rt)}},[]),(0,w.useEffect)(()=>{var je,Ce,rt,lt;Ie.current=(Ce=(je=z.pathname)==null?void 0:je.split("/"))==null?void 0:Ce[2],ue.current=((lt=(rt=z.pathname)==null?void 0:rt.split("/"))==null?void 0:lt[3])==="repository"},[]);const tt=(...je)=>Mt(void 0,[...je],function*(Ce={}){if(yield _({type:"shixunsDetail/addRepositoryFile",payload:{id:Ie.current,message:Ce.commitMessage,content:Ce.codeMirror,path:`${me?`${me}/`:""}${Ce.path||""}`,secret_repository:ue.current?void 0:!0}})){const lt=ue.current?`/shixuns/${Ie.current}/repository${me?`/master/shixun_show/${me}`:""}`:`/shixuns/${Ie.current}/secret_repository`;x.history.replace(lt)}}),it=()=>{var je,Ce;x.history.push(`/shixuns/${Ie.current}/${(Ce=(je=z.pathname)==null?void 0:je.split("/"))==null?void 0:Ce[3]}${me?`/master/shixun_show/${me}`:""}`)};return w.createElement("section",{className:ze.bg},w.createElement("div",{className:ze.wrap},w.createElement("div",{className:ze.title},"\u65B0\u5EFA\u6587\u4EF6"),w.createElement(W.default,{className:"mt10",form:U,scrollToFirstError:!0,layout:"vertical",onFinish:tt,onValuesChange:()=>Re(xt({},U.getFieldsValue()))},w.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},w.createElement(W.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},w.createElement("span",null,w.createElement("span",{className:"mr5"},me?`${me}/`:""),w.createElement(v.default,{className:ze.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),w.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")),w.createElement(W.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"}]},w.createElement(v.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"})),w.createElement("div",{className:"mt10 mb20"},w.createElement(W.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},w.createElement(A.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"]}}))),w.createElement(W.default.Item,{noStyle:!0},w.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:it})))))};var Z=(0,x.connect)(({shixunsDetail:E,loading:I,globalSetting:M,user:$})=>({shixunsDetail:E,globalSetting:M,user:$,loading:I.models.index}))(at);const Le=({globalSetting:E})=>{var I;switch(Number((I=E==null?void 0:E.setting)==null?void 0:I.theme)){case P.Fy.THEMEONE:return w.createElement(bt,null);case P.Fy.THEMETWO:return w.createElement(ke,null);case P.Fy.THEMETHREE:return w.createElement(Ve,null);case P.Fy.DEFAULT:default:return w.createElement(Z,null)}};var se=(0,x.connect)(({globalSetting:E})=>({globalSetting:E}))(Le)},19080:function(rn,Te,f){"use strict";f.d(Te,{F:function(){return v},Z:function(){return W}});var P=f(92310),w=f.n(P);const x=null;function W(A,N,be){return w()({[`${A}-status-success`]:N==="success",[`${A}-status-warning`]:N==="warning",[`${A}-status-error`]:N==="error",[`${A}-status-validating`]:N==="validating",[`${A}-has-feedback`]:be})}const v=(A,N)=>N||A},93891:function(rn,Te,f){"use strict";var P=f(59301),w=f(36355),x=f(64165);const W=v=>{const{componentName:A}=v,{getPrefixCls:N}=(0,P.useContext)(w.E_),be=N("empty");switch(A){case"Table":case"List":return P.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return P.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE,className:`${be}-small`});default:return P.createElement(x.Z,null)}};Te.Z=W},64165:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return re}});var P=f(92310),w=f.n(P),x=f(59301),W=f(36355),v=f(9763),A=f(64993),N=f(88088),oe=()=>{const[,Q]=(0,N.Z)(),c=new A.C(Q.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return x.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{fill:"none",fillRule:"evenodd"},x.createElement("g",{transform:"translate(24 31.67)"},x.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),x.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),x.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),x.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),x.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),x.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),x.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},x.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),x.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Me=()=>{const[,Q]=(0,N.Z)(),{colorFill:S,colorFillTertiary:c,colorFillQuaternary:b,colorBgContainer:L}=Q,{borderColor:X,shadowColor:D,contentColor:we}=(0,x.useMemo)(()=>({borderColor:new A.C(S).onBackground(L).toHexShortString(),shadowColor:new A.C(c).onBackground(L).toHexShortString(),contentColor:new A.C(b).onBackground(L).toHexShortString()}),[S,c,b,L]);return x.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},x.createElement("ellipse",{fill:D,cx:"32",cy:"33",rx:"32",ry:"7"}),x.createElement("g",{fillRule:"nonzero",stroke:X},x.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),x.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:we}))))},H=f(83116),ye=f(37613);const Pe=Q=>{const{componentCls:S,margin:c,marginXS:b,marginXL:L,fontSize:X,lineHeight:D}=Q;return{[S]:{marginInline:b,fontSize:X,lineHeight:D,textAlign:"center",[`${S}-image`]:{height:Q.emptyImgHeight,marginBottom:b,opacity:Q.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${S}-description`]:{color:Q.colorText},[`${S}-footer`]:{marginTop:c},"&-normal":{marginBlock:L,color:Q.colorTextDisabled,[`${S}-description`]:{color:Q.colorTextDisabled},[`${S}-image`]:{height:Q.emptyImgHeightMD}},"&-small":{marginBlock:b,color:Q.colorTextDisabled,[`${S}-image`]:{height:Q.emptyImgHeightSM}}}}};var J=(0,H.Z)("Empty",Q=>{const{componentCls:S,controlHeightLG:c}=Q,b=(0,ye.TS)(Q,{emptyImgCls:`${S}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Pe(b)]}),qe=function(Q,S){var c={};for(var b in Q)Object.prototype.hasOwnProperty.call(Q,b)&&S.indexOf(b)<0&&(c[b]=Q[b]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,b=Object.getOwnPropertySymbols(Q);L<b.length;L++)S.indexOf(b[L])<0&&Object.prototype.propertyIsEnumerable.call(Q,b[L])&&(c[b[L]]=Q[b[L]]);return c};const ot=x.createElement(oe,null),bt=x.createElement(Me,null),It=Q=>{var{className:S,rootClassName:c,prefixCls:b,image:L=ot,description:X,children:D,imageStyle:we,style:ke}=Q,He=qe(Q,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Oe,direction:mt,empty:Qe}=x.useContext(W.E_),Je=Oe("empty",b),[fe,Y]=J(Je),[de]=(0,v.Z)("Empty"),ae=typeof X!="undefined"?X:de==null?void 0:de.description,ie=typeof ae=="string"?ae:"empty";let Ve=null;return typeof L=="string"?Ve=x.createElement("img",{alt:ie,src:L}):Ve=L,fe(x.createElement("div",Object.assign({className:w()(Y,Je,Qe==null?void 0:Qe.className,{[`${Je}-normal`]:L===bt,[`${Je}-rtl`]:mt==="rtl"},S,c),style:Object.assign(Object.assign({},Qe==null?void 0:Qe.style),ke)},He),x.createElement("div",{className:`${Je}-image`,style:we},Ve),ae&&x.createElement("div",{className:`${Je}-description`},ae),D&&x.createElement("div",{className:`${Je}-footer`},D)))};It.PRESENTED_IMAGE_DEFAULT=ot,It.PRESENTED_IMAGE_SIMPLE=bt;var re=It},78241:function(rn,Te,f){"use strict";f.d(Te,{default:function(){return Ht}});var P=f(94480),w=f(92310),x=f.n(w),W=f(77900),v=f(59301),A=f(62892),N=f(32441);function be(g){const[B,k]=v.useState(g);return v.useEffect(()=>{const d=setTimeout(()=>{k(g)},g.length?0:10);return()=>{clearTimeout(d)}},[g]),B}var oe=f(17313),y=f(29878),Me=f(8378),H=f(37613),ye=f(83116),J=g=>{const{componentCls:B}=g,k=`${B}-show-help`,d=`${B}-show-help-item`;return{[k]:{transition:`opacity ${g.motionDurationSlow} ${g.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[d]:{overflow:"hidden",transition:`height ${g.motionDurationSlow} ${g.motionEaseInOut},
|
|
|
opacity ${g.motionDurationSlow} ${g.motionEaseInOut},
|
|
|
transform ${g.motionDurationSlow} ${g.motionEaseInOut} !important`,[`&${d}-appear, &${d}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${d}-leave-active`]:{transform:"translateY(-5px)"}}}}};const qe=g=>({legend:{display:"block",width:"100%",marginBottom:g.marginLG,padding:0,color:g.colorTextDescription,fontSize:g.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${g.lineWidth}px ${g.lineType} ${g.colorBorder}`},label:{fontSize:g.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${g.controlOutlineWidth}px ${g.controlOutline}`},output:{display:"block",paddingTop:15,color:g.colorText,fontSize:g.fontSize,lineHeight:g.lineHeight}}),ot=(g,B)=>{const{formItemCls:k}=g;return{[k]:{[`${k}-label > label`]:{height:B},[`${k}-control-input`]:{minHeight:B}}}},bt=g=>{const{componentCls:B}=g;return{[g.componentCls]:Object.assign(Object.assign(Object.assign({},(0,oe.Wf)(g)),qe(g)),{[`${B}-text`]:{display:"inline-block",paddingInlineEnd:g.paddingSM},"&-small":Object.assign({},ot(g,g.controlHeightSM)),"&-large":Object.assign({},ot(g,g.controlHeightLG))})}},It=g=>{const{formItemCls:B,iconCls:k,componentCls:d,rootPrefixCls:h,labelRequiredMarkColor:C,labelColor:T,labelFontSize:ne,labelHeight:G,labelColonMarginInlineStart:K,labelColonMarginInlineEnd:ge,itemMarginBottom:ce}=g;return{[B]:Object.assign(Object.assign({},(0,oe.Wf)(g)),{marginBottom:ce,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${h}-row`]:{display:"none"},"&-has-warning":{[`${B}-split`]:{color:g.colorError}},"&-has-error":{[`${B}-split`]:{color:g.colorWarning}},[`${B}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${g.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:G,color:T,fontSize:ne,[`> ${k}`]:{fontSize:g.fontSize,verticalAlign:"top"},[`&${B}-required:not(${B}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:g.marginXXS,color:C,fontSize:g.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${d}-hide-required-mark &`]:{display:"none"}},[`${B}-optional`]:{display:"inline-block",marginInlineStart:g.marginXXS,color:g.colorTextDescription,[`${d}-hide-required-mark &`]:{display:"none"}},[`${B}-tooltip`]:{color:g.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:g.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:K,marginInlineEnd:ge},[`&${B}-no-colon::after`]:{content:'"\\a0"'}}},[`${B}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${h}-col-'"]):not([class*="' ${h}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:g.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[B]:{"&-explain, &-extra":{clear:"both",color:g.colorTextDescription,fontSize:g.fontSize,lineHeight:g.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:g.controlHeightSM,transition:`color ${g.motionDurationMid} ${g.motionEaseOut}`},"&-explain":{"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning}}},[`&-with-help ${B}-explain`]:{height:"auto",opacity:1},[`${B}-feedback-icon`]:{fontSize:g.fontSize,textAlign:"center",visibility:"visible",animationName:y.kr,animationDuration:g.motionDurationMid,animationTimingFunction:g.motionEaseOutBack,pointerEvents:"none","&-success":{color:g.colorSuccess},"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning},"&-validating":{color:g.colorPrimary}}})}},re=g=>{const{componentCls:B,formItemCls:k}=g;return{[`${B}-horizontal`]:{[`${k}-label`]:{flexGrow:0},[`${k}-control`]:{flex:"1 1 0",minWidth:0},[`${k}-label[class$='-24'], ${k}-label[class*='-24 ']`]:{[`& + ${k}-control`]:{minWidth:"unset"}}}}},Q=g=>{const{componentCls:B,formItemCls:k}=g;return{[`${B}-inline`]:{display:"flex",flexWrap:"wrap",[k]:{flex:"none",marginInlineEnd:g.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${k}-label,
|
|
|
> ${k}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${k}-label`]:{flex:"none"},[`${B}-text`]:{display:"inline-block"},[`${k}-has-feedback`]:{display:"inline-block"}}}}},S=g=>({padding:g.verticalLabelPadding,margin:g.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=g=>{const{componentCls:B,formItemCls:k,rootPrefixCls:d}=g;return{[`${k} ${k}-label`]:S(g),[B]:{[k]:{flexWrap:"wrap",[`${k}-label, ${k}-control`]:{[`&:not([class*=" ${d}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},b=g=>{const{componentCls:B,formItemCls:k,rootPrefixCls:d}=g;return{[`${B}-vertical`]:{[k]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${B}-item-control`]:{width:"100%"}}},[`${B}-vertical ${k}-label,
|
|
|
.${d}-col-24${k}-label,
|
|
|
.${d}-col-xl-24${k}-label`]:S(g),[`@media (max-width: ${g.screenXSMax}px)`]:[c(g),{[B]:{[`.${d}-col-xs-24${k}-label`]:S(g)}}],[`@media (max-width: ${g.screenSMMax}px)`]:{[B]:{[`.${d}-col-sm-24${k}-label`]:S(g)}},[`@media (max-width: ${g.screenMDMax}px)`]:{[B]:{[`.${d}-col-md-24${k}-label`]:S(g)}},[`@media (max-width: ${g.screenLGMax}px)`]:{[B]:{[`.${d}-col-lg-24${k}-label`]:S(g)}}}},L=(g,B)=>(0,H.TS)(g,{formItemCls:`${g.componentCls}-item`,rootPrefixCls:B});var X=(0,ye.Z)("Form",(g,B)=>{let{rootPrefixCls:k}=B;const d=L(g,k);return[bt(d),It(d),J(d),re(d),Q(d),b(d),(0,Me.Z)(d),y.kr]},g=>({labelRequiredMarkColor:g.colorError,labelColor:g.colorTextHeading,labelFontSize:g.fontSize,labelHeight:g.controlHeight,labelColonMarginInlineStart:g.marginXXS/2,labelColonMarginInlineEnd:g.marginXS,itemMarginBottom:g.marginLG,verticalLabelPadding:`0 0 ${g.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const D=[];function we(g,B,k){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof g=="string"?g:`${B}-${d}`,error:g,errorStatus:k}}var He=g=>{let{help:B,helpStatus:k,errors:d=D,warnings:h=D,className:C,fieldId:T,onVisibleChanged:ne}=g;const{prefixCls:G}=v.useContext(N.Rk),K=`${G}-item-explain`,[,ge]=X(G),ce=(0,v.useMemo)(()=>(0,A.Z)(G),[G]),Ze=be(d),F=be(h),V=v.useMemo(()=>B!=null?[we(B,"help",k)]:[].concat((0,P.Z)(Ze.map((Se,Ke)=>we(Se,"error","error",Ke))),(0,P.Z)(F.map((Se,Ke)=>we(Se,"warning","warning",Ke)))),[B,k,Ze,F]),Ue={};return T&&(Ue.id=`${T}_help`),v.createElement(W.default,{motionDeadline:ce.motionDeadline,motionName:`${G}-show-help`,visible:!!V.length,onVisibleChanged:ne},Se=>{const{className:Ke,style:Ne}=Se;return v.createElement("div",Object.assign({},Ue,{className:x()(K,Ke,C,ge),style:Ne,role:"alert"}),v.createElement(W.CSSMotionList,Object.assign({keys:V},(0,A.Z)(G),{motionName:`${G}-show-help-item`,component:!1}),ht=>{const{key:te,error:ve,errorStatus:Be,className:ut,style:Ge}=ht;return v.createElement("div",{key:te,className:x()(ut,{[`${K}-${Be}`]:Be}),style:Ge},ve)}))})},Oe=f(95013),mt=f(36355),Qe=f(1684),Je=f(52946),fe=f(19716),Y=f(16722);const de=["parentNode"],ae="form_item";function ie(g){return g===void 0||g===!1?[]:Array.isArray(g)?g:[g]}function Ve(g,B){if(!g.length)return;const k=g.join("_");return B?`${B}_${k}`:de.includes(k)?`${ae}_${k}`:k}function ze(g,B,k,d,h,C){let T=d;return C!==void 0?T=C:k.validating?T="validating":g.length?T="error":B.length?T="warning":(k.touched||h&&k.validated)&&(T="success"),T}function he(g){return ie(g).join("_")}function De(g){const[B]=(0,Oe.useForm)(),k=v.useRef({}),d=v.useMemo(()=>g!=null?g:Object.assign(Object.assign({},B),{__INTERNAL__:{itemRef:h=>C=>{const T=he(h);C?k.current[T]=C:delete k.current[T]}},scrollToField:function(h){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const T=ie(h),ne=Ve(T,d.__INTERNAL__.name),G=ne?document.getElementById(ne):null;G&&(0,Y.Z)(G,Object.assign({scrollMode:"if-needed",block:"nearest"},C))},getFieldInstance:h=>{const C=he(h);return k.current[C]}}),[g,B]);return[d]}var pe=f(28726),St=function(g,B){var k={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&B.indexOf(d)<0&&(k[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)B.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(k[d[h]]=g[d[h]]);return k};const Lt=(g,B)=>{const k=v.useContext(Qe.Z),{getPrefixCls:d,direction:h,form:C}=v.useContext(mt.E_),{prefixCls:T,className:ne,rootClassName:G,size:K,disabled:ge=k,form:ce,colon:Ze,labelAlign:F,labelWrap:V,labelCol:Ue,wrapperCol:Se,hideRequiredMark:Ke,layout:Ne="horizontal",scrollToFirstError:ht,requiredMark:te,onFinishFailed:ve,name:Be,style:ut,feedbackIcons:Ge}=g,ft=St(g,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),jt=(0,fe.Z)(K),Tt=v.useContext(pe.Z),$t=(0,v.useMemo)(()=>te!==void 0?te:C&&C.requiredMark!==void 0?C.requiredMark:!Ke,[Ke,te,C]),Wt=Ze!=null?Ze:C==null?void 0:C.colon,Rt=d("form",T),[en,Ut]=X(Rt),kt=x()(Rt,`${Rt}-${Ne}`,{[`${Rt}-hide-required-mark`]:$t===!1,[`${Rt}-rtl`]:h==="rtl",[`${Rt}-${jt}`]:jt},Ut,C==null?void 0:C.className,ne,G),[Gt]=De(ce),{__INTERNAL__:Pt}=Gt;Pt.name=Be;const Ot=(0,v.useMemo)(()=>({name:Be,labelAlign:F,labelCol:Ue,labelWrap:V,wrapperCol:Se,vertical:Ne==="vertical",colon:Wt,requiredMark:$t,itemRef:Pt.itemRef,form:Gt,feedbackIcons:Ge}),[Be,F,Ue,Se,Ne,Wt,$t,Gt,Ge]);v.useImperativeHandle(B,()=>Gt);const zt=(fn,Nt)=>{if(fn){let Zt={block:"nearest"};typeof fn=="object"&&(Zt=fn),Gt.scrollToField(Nt,Zt)}},Ft=fn=>{if(ve==null||ve(fn),fn.errorFields.length){const Nt=fn.errorFields[0].name;if(ht!==void 0){zt(ht,Nt);return}C&&C.scrollToFirstError!==void 0&&zt(C.scrollToFirstError,Nt)}};return en(v.createElement(Qe.n,{disabled:ge},v.createElement(Je.q,{size:jt},v.createElement(N.RV,Object.assign({},{validateMessages:Tt}),v.createElement(N.q3.Provider,{value:Ot},v.createElement(Oe.default,Object.assign({id:Be},ft,{name:Be,onFinishFailed:Ft,form:Gt,style:Object.assign(Object.assign({},C==null?void 0:C.style),ut),className:kt})))))))};var et=v.forwardRef(Lt),Mt=f(41799),at=f(8654),Z=f(92343),Le=f(11592);function se(g){if(typeof g=="function")return g;const B=(0,Le.Z)(g);return B.length<=1?B[0]:B}const E=()=>{const{status:g,errors:B=[],warnings:k=[]}=(0,v.useContext)(N.aM);return{status:g,errors:B,warnings:k}};E.Context=N.aM;var I=E,M=f(16089);function $(g){const[B,k]=v.useState(g),d=(0,v.useRef)(null),h=(0,v.useRef)([]),C=(0,v.useRef)(!1);v.useEffect(()=>(C.current=!1,()=>{C.current=!0,M.Z.cancel(d.current),d.current=null}),[]);function T(ne){C.current||(d.current===null&&(h.current=[],d.current=(0,M.Z)(()=>{d.current=null,k(G=>{let K=G;return h.current.forEach(ge=>{K=ge(K)}),K})})),h.current.push(ne))}return[B,T]}function q(){const{itemRef:g}=v.useContext(N.q3),B=v.useRef({});function k(d,h){const C=h&&typeof h=="object"&&h.ref,T=d.join("_");return(B.current.name!==T||B.current.originRef!==C)&&(B.current.name=T,B.current.originRef=C,B.current.ref=(0,at.sQ)(g(d),C)),B.current.ref}return k}var xe=f(29194),_=f(34280),Fe=f(2738),z=f(27382),le=f(37028);const Re=g=>{const{formItemCls:B}=g;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${B}-control`]:{display:"flex"}}}};var ue=(0,ye.b)(["Form","item-item"],(g,B)=>{let{rootPrefixCls:k}=B;const d=L(g,k);return[Re(d)]}),U=g=>{const{prefixCls:B,status:k,wrapperCol:d,children:h,errors:C,warnings:T,_internalItemRender:ne,extra:G,help:K,fieldId:ge,marginBottom:ce,onErrorVisibleChanged:Ze}=g,F=`${B}-item`,V=v.useContext(N.q3),Ue=d||V.wrapperCol||{},Se=x()(`${F}-control`,Ue.className),Ke=v.useMemo(()=>Object.assign({},V),[V]);delete Ke.labelCol,delete Ke.wrapperCol;const Ne=v.createElement("div",{className:`${F}-control-input`},v.createElement("div",{className:`${F}-control-input-content`},h)),ht=v.useMemo(()=>({prefixCls:B,status:k}),[B,k]),te=ce!==null||C.length||T.length?v.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},v.createElement(N.Rk.Provider,{value:ht},v.createElement(He,{fieldId:ge,errors:C,warnings:T,help:K,helpStatus:k,className:`${F}-explain-connected`,onVisibleChanged:Ze})),!!ce&&v.createElement("div",{style:{width:0,height:ce}})):null,ve={};ge&&(ve.id=`${ge}_extra`);const Be=G?v.createElement("div",Object.assign({},ve,{className:`${F}-extra`}),G):null,ut=ne&&ne.mark==="pro_table_render"&&ne.render?ne.render(g,{input:Ne,errorList:te,extra:Be}):v.createElement(v.Fragment,null,Ne,te,Be);return v.createElement(N.q3.Provider,{value:Ke},v.createElement(le.Z,Object.assign({},Ue,{className:Se}),ut),v.createElement(ue,{prefixCls:B}))},me=f(61485),Ae=f(31724),tt=f(9763),it=f(6848),je=function(g,B){var k={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&B.indexOf(d)<0&&(k[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)B.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(k[d[h]]=g[d[h]]);return k};function Ce(g){return g?typeof g=="object"&&!v.isValidElement(g)?g:{title:g}:null}var lt=g=>{let{prefixCls:B,label:k,htmlFor:d,labelCol:h,labelAlign:C,colon:T,required:ne,requiredMark:G,tooltip:K}=g;var ge;const[ce]=(0,tt.Z)("Form"),{vertical:Ze,labelAlign:F,labelCol:V,labelWrap:Ue,colon:Se}=v.useContext(N.q3);if(!k)return null;const Ke=h||V||{},Ne=C||F,ht=`${B}-item-label`,te=x()(ht,Ne==="left"&&`${ht}-left`,Ke.className,{[`${ht}-wrap`]:!!Ue});let ve=k;const Be=T===!0||Se!==!1&&T!==!1;Be&&!Ze&&typeof k=="string"&&k.trim()!==""&&(ve=k.replace(/[:|:]\s*$/,""));const Ge=Ce(K);if(Ge){const{icon:$t=v.createElement(me.Z,null)}=Ge,Wt=je(Ge,["icon"]),Rt=v.createElement(it.Z,Object.assign({},Wt),v.cloneElement($t,{className:`${B}-item-tooltip`,title:""}));ve=v.createElement(v.Fragment,null,ve,Rt)}const ft=G==="optional",jt=typeof G=="function";jt?ve=G(ve,{required:!!ne}):ft&&!ne&&(ve=v.createElement(v.Fragment,null,ve,v.createElement("span",{className:`${B}-item-optional`,title:""},(ce==null?void 0:ce.optional)||((ge=Ae.Z.Form)===null||ge===void 0?void 0:ge.optional))));const Tt=x()({[`${B}-item-required`]:ne,[`${B}-item-required-mark-optional`]:ft||jt,[`${B}-item-no-colon`]:!Be});return v.createElement(le.Z,Object.assign({},Ke,{className:te}),v.createElement("label",{htmlFor:d,className:Tt,title:typeof k=="string"?k:""},ve))},Yt=f(29679),Qt=f(19248),sn=f(96512),xn=f(58617);const un={success:Yt.Z,warning:sn.Z,error:Qt.Z,validating:xn.Z};function Bn(g){let{children:B,errors:k,warnings:d,hasFeedback:h,validateStatus:C,prefixCls:T,meta:ne,noStyle:G}=g;const K=`${T}-item`,{feedbackIcons:ge}=v.useContext(N.q3),ce=ze(k,d,ne,null,!!h,C),{isFormItemInput:Ze,status:F}=v.useContext(N.aM),V=v.useMemo(()=>{var Ue;let Se;if(h){const ht=h!==!0&&h.icons||ge,te=ce&&((Ue=ht==null?void 0:ht({status:ce,errors:k,warnings:d}))===null||Ue===void 0?void 0:Ue[ce]),ve=ce&&un[ce];Se=te!==!1&&ve?v.createElement("span",{className:x()(`${K}-feedback-icon`,`${K}-feedback-icon-${ce}`)},te||v.createElement(ve,null)):null}let Ke=!0,Ne=ce||"";return G&&(Ke=Ze,Ne=(ce!=null?ce:F)||""),{status:Ne,errors:k,warnings:d,hasFeedback:!!h,feedbackIcon:Se,isFormItemInput:Ke}},[ce,h,G,Ze,F]);return v.createElement(N.aM.Provider,{value:V},B)}var $n=function(g,B){var k={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&B.indexOf(d)<0&&(k[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)B.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(k[d[h]]=g[d[h]]);return k};function pn(g){const{prefixCls:B,className:k,rootClassName:d,style:h,help:C,errors:T,warnings:ne,validateStatus:G,meta:K,hasFeedback:ge,hidden:ce,children:Ze,fieldId:F,required:V,isRequired:Ue,onSubItemMetaChange:Se}=g,Ke=$n(g,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Ne=`${B}-item`,{requiredMark:ht}=v.useContext(N.q3),te=v.useRef(null),ve=be(T),Be=be(ne),ut=C!=null,Ge=!!(ut||T.length||ne.length),ft=!!te.current&&(0,xe.Z)(te.current),[jt,Tt]=v.useState(null);(0,_.Z)(()=>{if(Ge&&te.current){const Ut=getComputedStyle(te.current);Tt(parseInt(Ut.marginBottom,10))}},[Ge,ft]);const $t=Ut=>{Ut||Tt(null)},Rt=function(){let Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const kt=Ut?ve:K.errors,Gt=Ut?Be:K.warnings;return ze(kt,Gt,K,"",!!ge,G)}(),en=x()(Ne,k,d,{[`${Ne}-with-help`]:ut||ve.length||Be.length,[`${Ne}-has-feedback`]:Rt&&ge,[`${Ne}-has-success`]:Rt==="success",[`${Ne}-has-warning`]:Rt==="warning",[`${Ne}-has-error`]:Rt==="error",[`${Ne}-is-validating`]:Rt==="validating",[`${Ne}-hidden`]:ce});return v.createElement("div",{className:en,style:h,ref:te},v.createElement(z.Z,Object.assign({className:`${Ne}-row`},(0,Fe.Z)(Ke,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),v.createElement(lt,Object.assign({htmlFor:F},g,{requiredMark:ht,required:V!=null?V:Ue,prefixCls:B})),v.createElement(U,Object.assign({},g,K,{errors:ve,warnings:Be,prefixCls:B,status:Rt,help:C,marginBottom:jt,onErrorVisibleChanged:$t}),v.createElement(N.qI.Provider,{value:Se},v.createElement(Bn,{prefixCls:B,meta:K,errors:K.errors,warnings:K.warnings,hasFeedback:ge,validateStatus:Rt},Ze)))),!!jt&&v.createElement("div",{className:`${Ne}-margin-offset`,style:{marginBottom:-jt}}))}const Fn="__SPLIT__",En=null,In=v.memo(g=>{let{children:B}=g;return B},(g,B)=>g.value===B.value&&g.update===B.update&&g.childProps.length===B.childProps.length&&g.childProps.every((k,d)=>k===B.childProps[d]));function Cn(g){return g!=null}function dn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Wn(g){const{name:B,noStyle:k,className:d,dependencies:h,prefixCls:C,shouldUpdate:T,rules:ne,children:G,required:K,label:ge,messageVariables:ce,trigger:Ze="onChange",validateTrigger:F,hidden:V,help:Ue}=g,{getPrefixCls:Se}=v.useContext(mt.E_),{name:Ke}=v.useContext(N.q3),Ne=se(G),ht=typeof Ne=="function",te=v.useContext(N.qI),{validateTrigger:ve}=v.useContext(Oe.FieldContext),Be=F!==void 0?F:ve,ut=Cn(B),Ge=Se("form",C),[ft,jt]=X(Ge),Tt=v.useContext(Oe.ListContext),$t=v.useRef(),[Wt,Rt]=$({}),[en,Ut]=(0,Mt.Z)(()=>dn()),kt=Nt=>{const Zt=Tt==null?void 0:Tt.getKey(Nt.name);if(Ut(Nt.destroy?dn():Nt,!0),k&&Ue!==!1&&te){let an=Nt.name;if(Nt.destroy)an=$t.current||an;else if(Zt!==void 0){const[Vt,wn]=Zt;an=[Vt].concat((0,P.Z)(wn)),$t.current=an}te(Nt,an)}},Gt=(Nt,Zt)=>{Rt(an=>{const Vt=Object.assign({},an),Un=[].concat((0,P.Z)(Nt.name.slice(0,-1)),(0,P.Z)(Zt)).join(Fn);return Nt.destroy?delete Vt[Un]:Vt[Un]=Nt,Vt})},[Pt,Ot]=v.useMemo(()=>{const Nt=(0,P.Z)(en.errors),Zt=(0,P.Z)(en.warnings);return Object.values(Wt).forEach(an=>{Nt.push.apply(Nt,(0,P.Z)(an.errors||[])),Zt.push.apply(Zt,(0,P.Z)(an.warnings||[]))}),[Nt,Zt]},[Wt,en.errors,en.warnings]),zt=q();function Ft(Nt,Zt,an){return k&&!V?v.createElement(Bn,{prefixCls:Ge,hasFeedback:g.hasFeedback,validateStatus:g.validateStatus,meta:en,errors:Pt,warnings:Ot,noStyle:!0},Nt):v.createElement(pn,Object.assign({key:"row"},g,{className:x()(d,jt),prefixCls:Ge,fieldId:Zt,isRequired:an,errors:Pt,warnings:Ot,meta:en,onSubItemMetaChange:Gt}),Nt)}if(!ut&&!ht&&!h)return ft(Ft(Ne));let fn={};return typeof ge=="string"?fn.label=ge:B&&(fn.label=String(B)),ce&&(fn=Object.assign(Object.assign({},fn),ce)),ft(v.createElement(Oe.Field,Object.assign({},g,{messageVariables:fn,trigger:Ze,validateTrigger:Be,onMetaChange:kt}),(Nt,Zt,an)=>{const Vt=ie(B).length&&Zt?Zt.name:[],wn=Ve(Vt,Ke),Un=K!==void 0?K:!!(ne&&ne.some(vt=>{if(vt&&typeof vt=="object"&&vt.required&&!vt.warningOnly)return!0;if(typeof vt=="function"){const tn=vt(an);return tn&&tn.required&&!tn.warningOnly}return!1})),Dt=Object.assign({},Nt);let dt=null;if(Array.isArray(Ne)&&ut)dt=Ne;else if(!(ht&&(!(T||h)||ut))){if(!(h&&!ht&&!ut))if((0,Z.l$)(Ne)){const vt=Object.assign(Object.assign({},Ne.props),Dt);if(vt.id||(vt.id=wn),Ue||Pt.length>0||Ot.length>0||g.extra){const Xt=[];(Ue||Pt.length>0)&&Xt.push(`${wn}_help`),g.extra&&Xt.push(`${wn}_extra`),vt["aria-describedby"]=Xt.join(" ")}Pt.length>0&&(vt["aria-invalid"]="true"),Un&&(vt["aria-required"]="true"),(0,at.Yr)(Ne)&&(vt.ref=zt(Vt,Ne)),new Set([].concat((0,P.Z)(ie(Ze)),(0,P.Z)(ie(Be)))).forEach(Xt=>{vt[Xt]=function(){for(var Bt,ln,gn,mn,Ln,Xe=arguments.length,_e=new Array(Xe),yt=0;yt<Xe;yt++)_e[yt]=arguments[yt];(gn=Dt[Xt])===null||gn===void 0||(Bt=gn).call.apply(Bt,[Dt].concat(_e)),(Ln=(mn=Ne.props)[Xt])===null||Ln===void 0||(ln=Ln).call.apply(ln,[mn].concat(_e))}});const nn=[vt["aria-required"],vt["aria-invalid"],vt["aria-describedby"]];dt=v.createElement(In,{value:Dt[g.valuePropName||"value"],update:Ne,childProps:nn},(0,Z.Tm)(Ne,vt))}else ht&&(T||h)&&!ut?dt=Ne(an):dt=Ne}return Ft(dt,wn,Un)}))}const Jt=Wn;Jt.useStatus=I;var Pn=Jt,zn=function(g,B){var k={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&B.indexOf(d)<0&&(k[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)B.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(k[d[h]]=g[d[h]]);return k},pr=g=>{var{prefixCls:B,children:k}=g,d=zn(g,["prefixCls","children"]);const{getPrefixCls:h}=v.useContext(mt.E_),C=h("form",B),T=v.useMemo(()=>({prefixCls:C,status:"error"}),[C]);return v.createElement(Oe.List,Object.assign({},d),(ne,G,K)=>v.createElement(N.Rk.Provider,{value:T},k(ne.map(ge=>Object.assign(Object.assign({},ge),{fieldKey:ge.key})),G,{errors:K.errors,warnings:K.warnings})))};function on(){const{form:g}=(0,v.useContext)(N.q3);return g}const st=et;st.Item=Pn,st.List=pr,st.ErrorList=He,st.useForm=De,st.useFormInstance=on,st.useWatch=Oe.useWatch,st.Provider=N.RV,st.create=()=>{};var Ht=st},9432:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return It},n:function(){return ot}});var P=f(19248),w=f(92310),x=f.n(w),W=f(93681),v=f(8654),A=f(59301),N=f(19080),be=f(36355),oe=f(1684),y=f(19716),Me=f(32441),H=f(33234),ye=f(59412),Pe=f(9937);function J(re){return!!(re.prefix||re.suffix||re.allowClear)}var qe=function(re,Q){var S={};for(var c in re)Object.prototype.hasOwnProperty.call(re,c)&&Q.indexOf(c)<0&&(S[c]=re[c]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,c=Object.getOwnPropertySymbols(re);b<c.length;b++)Q.indexOf(c[b])<0&&Object.prototype.propertyIsEnumerable.call(re,c[b])&&(S[c[b]]=re[c[b]]);return S};function ot(re,Q){if(!re)return;re.focus(Q);const{cursor:S}=Q||{};if(S){const c=re.value.length;switch(S){case"start":re.setSelectionRange(0,0);break;case"end":re.setSelectionRange(c,c);break;default:re.setSelectionRange(0,c);break}}}var It=(0,A.forwardRef)((re,Q)=>{var S;const{prefixCls:c,bordered:b=!0,status:L,size:X,disabled:D,onBlur:we,onFocus:ke,suffix:He,allowClear:Oe,addonAfter:mt,addonBefore:Qe,className:Je,style:fe,styles:Y,rootClassName:de,onChange:ae,classNames:ie}=re,Ve=qe(re,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:ze,direction:he,input:De}=A.useContext(be.E_),pe=ze("input",c),St=(0,A.useRef)(null),[Lt,xt]=(0,Pe.ZP)(pe),{compactSize:et,compactItemClassnames:Mt}=(0,H.ri)(pe,he),at=(0,y.Z)(ue=>{var Ie;return(Ie=X!=null?X:et)!==null&&Ie!==void 0?Ie:ue}),Z=A.useContext(oe.Z),Le=D!=null?D:Z,{status:se,hasFeedback:E,feedbackIcon:I}=(0,A.useContext)(Me.aM),M=(0,N.F)(se,L),$=J(re)||!!E,q=(0,A.useRef)($);(0,A.useEffect)(()=>{var ue;$&&q.current,q.current=$},[$]);const xe=(0,ye.Z)(St,!0),_=ue=>{xe(),we==null||we(ue)},Fe=ue=>{xe(),ke==null||ke(ue)},z=ue=>{xe(),ae==null||ae(ue)},le=(E||He)&&A.createElement(A.Fragment,null,He,E&&I);let Re;return typeof Oe=="object"&&(Oe!=null&&Oe.clearIcon)?Re=Oe:Oe&&(Re={clearIcon:A.createElement(P.Z,null)}),Lt(A.createElement(W.default,Object.assign({ref:(0,v.sQ)(Q,St),prefixCls:pe,autoComplete:De==null?void 0:De.autoComplete},Ve,{disabled:Le,onBlur:_,onFocus:Fe,style:Object.assign(Object.assign({},De==null?void 0:De.style),fe),styles:Object.assign(Object.assign({},De==null?void 0:De.styles),Y),suffix:le,allowClear:Re,className:x()(Je,de,Mt,De==null?void 0:De.className),onChange:z,addonAfter:mt&&A.createElement(H.BR,null,A.createElement(Me.Ux,{override:!0,status:!0},mt)),addonBefore:Qe&&A.createElement(H.BR,null,A.createElement(Me.Ux,{override:!0,status:!0},Qe)),classNames:Object.assign(Object.assign(Object.assign({},ie),De==null?void 0:De.classNames),{input:x()({[`${pe}-sm`]:at==="small",[`${pe}-lg`]:at==="large",[`${pe}-rtl`]:he==="rtl",[`${pe}-borderless`]:!b},!$&&(0,N.Z)(pe,M),ie==null?void 0:ie.input,(S=De==null?void 0:De.classNames)===null||S===void 0?void 0:S.input,xt)}),classes:{affixWrapper:x()({[`${pe}-affix-wrapper-sm`]:at==="small",[`${pe}-affix-wrapper-lg`]:at==="large",[`${pe}-affix-wrapper-rtl`]:he==="rtl",[`${pe}-affix-wrapper-borderless`]:!b},(0,N.Z)(`${pe}-affix-wrapper`,M,E),xt),wrapper:x()({[`${pe}-group-rtl`]:he==="rtl"},xt),group:x()({[`${pe}-group-wrapper-sm`]:at==="small",[`${pe}-group-wrapper-lg`]:at==="large",[`${pe}-group-wrapper-rtl`]:he==="rtl",[`${pe}-group-wrapper-disabled`]:Le},(0,N.Z)(`${pe}-group-wrapper`,M,E),xt)}})))})},1643:function(rn,Te,f){"use strict";var P=f(19248),w=f(92310),x=f.n(w),W=f(9296),v=f(59301),A=f(19080),N=f(36355),be=f(1684),oe=f(19716),y=f(32441),Me=f(9432),H=f(9937),ye=function(J,qe){var ot={};for(var bt in J)Object.prototype.hasOwnProperty.call(J,bt)&&qe.indexOf(bt)<0&&(ot[bt]=J[bt]);if(J!=null&&typeof Object.getOwnPropertySymbols=="function")for(var It=0,bt=Object.getOwnPropertySymbols(J);It<bt.length;It++)qe.indexOf(bt[It])<0&&Object.prototype.propertyIsEnumerable.call(J,bt[It])&&(ot[bt[It]]=J[bt[It]]);return ot};const Pe=(0,v.forwardRef)((J,qe)=>{const{prefixCls:ot,bordered:bt=!0,size:It,disabled:re,status:Q,allowClear:S,showCount:c,classNames:b,rootClassName:L,className:X}=J,D=ye(J,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:we,direction:ke}=v.useContext(N.E_),He=(0,oe.Z)(It),Oe=v.useContext(be.Z),mt=re!=null?re:Oe,{status:Qe,hasFeedback:Je,feedbackIcon:fe}=v.useContext(y.aM),Y=(0,A.F)(Qe,Q),de=v.useRef(null);v.useImperativeHandle(qe,()=>{var he;return{resizableTextArea:(he=de.current)===null||he===void 0?void 0:he.resizableTextArea,focus:De=>{var pe,St;(0,Me.n)((St=(pe=de.current)===null||pe===void 0?void 0:pe.resizableTextArea)===null||St===void 0?void 0:St.textArea,De)},blur:()=>{var De;return(De=de.current)===null||De===void 0?void 0:De.blur()}}});const ae=we("input",ot);let ie;typeof S=="object"&&(S!=null&&S.clearIcon)?ie=S:S&&(ie={clearIcon:v.createElement(P.Z,null)});const[Ve,ze]=(0,H.ZP)(ae);return Ve(v.createElement(W.default,Object.assign({},D,{disabled:mt,allowClear:ie,className:x()(X,L),classes:{affixWrapper:x()(`${ae}-textarea-affix-wrapper`,{[`${ae}-affix-wrapper-rtl`]:ke==="rtl",[`${ae}-affix-wrapper-borderless`]:!bt,[`${ae}-affix-wrapper-sm`]:He==="small",[`${ae}-affix-wrapper-lg`]:He==="large",[`${ae}-textarea-show-count`]:c},(0,A.Z)(`${ae}-affix-wrapper`,Y),ze)},classNames:Object.assign(Object.assign({},b),{textarea:x()({[`${ae}-borderless`]:!bt,[`${ae}-sm`]:He==="small",[`${ae}-lg`]:He==="large"},(0,A.Z)(ae,Y),ze,b==null?void 0:b.textarea)}),prefixCls:ae,suffix:Je&&v.createElement("span",{className:`${ae}-textarea-suffix`},fe),showCount:c,ref:de})))});Te.Z=Pe},59412:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return w}});var P=f(59301);function w(x,W){const v=(0,P.useRef)([]),A=()=>{v.current.push(setTimeout(()=>{var N,be,oe,y;!((N=x.current)===null||N===void 0)&&N.input&&((be=x.current)===null||be===void 0?void 0:be.input.getAttribute("type"))==="password"&&(!((oe=x.current)===null||oe===void 0)&&oe.input.hasAttribute("value"))&&((y=x.current)===null||y===void 0||y.input.removeAttribute("value"))}))};return(0,P.useEffect)(()=>(W&&A(),()=>v.current.forEach(N=>{N&&clearTimeout(N)})),[]),A}},92832:function(rn,Te,f){"use strict";f.d(Te,{default:function(){return He}});var P=f(92310),w=f.n(P),x=f(59301),W=f(36355),v=f(32441),A=f(9937),be=Oe=>{const{getPrefixCls:mt,direction:Qe}=(0,x.useContext)(W.E_),{prefixCls:Je,className:fe}=Oe,Y=mt("input-group",Je),de=mt("input"),[ae,ie]=(0,A.ZP)(de),Ve=w()(Y,{[`${Y}-lg`]:Oe.size==="large",[`${Y}-sm`]:Oe.size==="small",[`${Y}-compact`]:Oe.compact,[`${Y}-rtl`]:Qe==="rtl"},ie,fe),ze=(0,x.useContext)(v.aM),he=(0,x.useMemo)(()=>Object.assign(Object.assign({},ze),{isFormItemInput:!1}),[ze]);return ae(x.createElement("span",{className:Ve,style:Oe.style,onMouseEnter:Oe.onMouseEnter,onMouseLeave:Oe.onMouseLeave,onFocus:Oe.onFocus,onBlur:Oe.onBlur},x.createElement(v.aM.Provider,{value:he},Oe.children)))},oe=f(9432),y=f(73331),Me=f(15277),H=f(2738),ye=f(8654),Pe=f(59412),J=function(Oe,mt){var Qe={};for(var Je in Oe)Object.prototype.hasOwnProperty.call(Oe,Je)&&mt.indexOf(Je)<0&&(Qe[Je]=Oe[Je]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,Je=Object.getOwnPropertySymbols(Oe);fe<Je.length;fe++)mt.indexOf(Je[fe])<0&&Object.prototype.propertyIsEnumerable.call(Oe,Je[fe])&&(Qe[Je[fe]]=Oe[Je[fe]]);return Qe};const qe=Oe=>Oe?x.createElement(Me.Z,null):x.createElement(y.Z,null),ot={click:"onClick",hover:"onMouseOver"};var It=x.forwardRef((Oe,mt)=>{const{visibilityToggle:Qe=!0}=Oe,Je=typeof Qe=="object"&&Qe.visible!==void 0,[fe,Y]=(0,x.useState)(()=>Je?Qe.visible:!1),de=(0,x.useRef)(null);x.useEffect(()=>{Je&&Y(Qe.visible)},[Je,Qe]);const ae=(0,Pe.Z)(de),ie=()=>{const{disabled:Le}=Oe;Le||(fe&&ae(),Y(se=>{var E;const I=!se;return typeof Qe=="object"&&((E=Qe.onVisibleChange)===null||E===void 0||E.call(Qe,I)),I}))},Ve=Le=>{const{action:se="click",iconRender:E=qe}=Oe,I=ot[se]||"",M=E(fe),$={[I]:ie,className:`${Le}-icon`,key:"passwordIcon",onMouseDown:q=>{q.preventDefault()},onMouseUp:q=>{q.preventDefault()}};return x.cloneElement(x.isValidElement(M)?M:x.createElement("span",null,M),$)},{className:ze,prefixCls:he,inputPrefixCls:De,size:pe}=Oe,St=J(Oe,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Lt}=x.useContext(W.E_),xt=Lt("input",De),et=Lt("input-password",he),Mt=Qe&&Ve(et),at=w()(et,ze,{[`${et}-${pe}`]:!!pe}),Z=Object.assign(Object.assign({},(0,H.Z)(St,["suffix","iconRender","visibilityToggle"])),{type:fe?"text":"password",className:at,prefixCls:xt,suffix:Mt});return pe&&(Z.size=pe),x.createElement(oe.Z,Object.assign({ref:(0,ye.sQ)(mt,de)},Z))}),re=f(47472),Q=f(92343),S=f(3113),c=f(19716),b=f(33234),L=function(Oe,mt){var Qe={};for(var Je in Oe)Object.prototype.hasOwnProperty.call(Oe,Je)&&mt.indexOf(Je)<0&&(Qe[Je]=Oe[Je]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,Je=Object.getOwnPropertySymbols(Oe);fe<Je.length;fe++)mt.indexOf(Je[fe])<0&&Object.prototype.propertyIsEnumerable.call(Oe,Je[fe])&&(Qe[Je[fe]]=Oe[Je[fe]]);return Qe},D=x.forwardRef((Oe,mt)=>{const{prefixCls:Qe,inputPrefixCls:Je,className:fe,size:Y,suffix:de,enterButton:ae=!1,addonAfter:ie,loading:Ve,disabled:ze,onSearch:he,onChange:De,onCompositionStart:pe,onCompositionEnd:St}=Oe,Lt=L(Oe,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:xt,direction:et}=x.useContext(W.E_),Mt=x.useRef(!1),at=xt("input-search",Qe),Z=xt("input",Je),{compactSize:Le}=(0,b.ri)(at,et),se=(0,c.Z)(U=>{var me;return(me=Y!=null?Y:Le)!==null&&me!==void 0?me:U}),E=x.useRef(null),I=U=>{U&&U.target&&U.type==="click"&&he&&he(U.target.value,U,{source:"clear"}),De&&De(U)},M=U=>{var me;document.activeElement===((me=E.current)===null||me===void 0?void 0:me.input)&&U.preventDefault()},$=U=>{var me,Ae;he&&he((Ae=(me=E.current)===null||me===void 0?void 0:me.input)===null||Ae===void 0?void 0:Ae.value,U,{source:"input"})},q=U=>{Mt.current||Ve||$(U)},xe=typeof ae=="boolean"?x.createElement(re.Z,null):null,_=`${at}-button`;let Fe;const z=ae||{},le=z.type&&z.type.__ANT_BUTTON===!0;le||z.type==="button"?Fe=(0,Q.Tm)(z,Object.assign({onMouseDown:M,onClick:U=>{var me,Ae;(Ae=(me=z==null?void 0:z.props)===null||me===void 0?void 0:me.onClick)===null||Ae===void 0||Ae.call(me,U),$(U)},key:"enterButton"},le?{className:_,size:se}:{})):Fe=x.createElement(S.ZP,{className:_,type:ae?"primary":void 0,size:se,disabled:ze,key:"enterButton",onMouseDown:M,onClick:$,loading:Ve,icon:xe},ae),ie&&(Fe=[Fe,(0,Q.Tm)(ie,{key:"addonAfter"})]);const Re=w()(at,{[`${at}-rtl`]:et==="rtl",[`${at}-${se}`]:!!se,[`${at}-with-button`]:!!ae},fe),ue=U=>{Mt.current=!0,pe==null||pe(U)},Ie=U=>{Mt.current=!1,St==null||St(U)};return x.createElement(oe.Z,Object.assign({ref:(0,ye.sQ)(E,mt),onPressEnter:q},Lt,{size:se,onCompositionStart:ue,onCompositionEnd:Ie,prefixCls:Z,addonAfter:Fe,suffix:de,onChange:I,className:Re,disabled:ze}))}),we=f(1643);const ke=oe.Z;ke.Group=be,ke.Search=D,ke.TextArea=we.Z,ke.Password=It;var He=ke},9937:function(rn,Te,f){"use strict";f.d(Te,{M1:function(){return N},TM:function(){return Q},Xy:function(){return be},bi:function(){return Me},e5:function(){return re},ik:function(){return H},nz:function(){return v},pU:function(){return A},s7:function(){return ye},x0:function(){return y}});var P=f(17313),w=f(74207),x=f(37613),W=f(83116);const v=S=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:S,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),A=S=>({borderColor:S.hoverBorderColor}),N=S=>({borderColor:S.activeBorderColor,boxShadow:S.activeShadow,outline:0}),be=S=>({color:S.colorTextDisabled,backgroundColor:S.colorBgContainerDisabled,borderColor:S.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},A((0,x.TS)(S,{hoverBorderColor:S.colorBorder})))}),oe=S=>{const{paddingBlockLG:c,fontSizeLG:b,lineHeightLG:L,borderRadiusLG:X,paddingInlineLG:D}=S;return{padding:`${c}px ${D}px`,fontSize:b,lineHeight:L,borderRadius:X}},y=S=>({padding:`${S.paddingBlockSM}px ${S.paddingInlineSM}px`,borderRadius:S.borderRadiusSM}),Me=(S,c)=>{const{componentCls:b,colorError:L,colorWarning:X,errorActiveShadow:D,warningActiveShadow:we,colorErrorBorderHover:ke,colorWarningBorderHover:He}=S;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:L,"&:hover":{borderColor:ke},"&:focus, &-focused":Object.assign({},N((0,x.TS)(S,{activeBorderColor:L,activeShadow:D}))),[`${b}-prefix, ${b}-suffix`]:{color:L}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:X,"&:hover":{borderColor:He},"&:focus, &-focused":Object.assign({},N((0,x.TS)(S,{activeBorderColor:X,activeShadow:we}))),[`${b}-prefix, ${b}-suffix`]:{color:X}}}},H=S=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${S.paddingBlock}px ${S.paddingInline}px`,color:S.colorText,fontSize:S.fontSize,lineHeight:S.lineHeight,backgroundColor:S.colorBgContainer,backgroundImage:"none",borderWidth:S.lineWidth,borderStyle:S.lineType,borderColor:S.colorBorder,borderRadius:S.borderRadius,transition:`all ${S.motionDurationMid}`},v(S.colorTextPlaceholder)),{"&:hover":Object.assign({},A(S)),"&:focus, &-focused":Object.assign({},N(S)),"&-disabled, &[disabled]":Object.assign({},be(S)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:S.controlHeight,lineHeight:S.lineHeight,verticalAlign:"bottom",transition:`all ${S.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},oe(S)),"&-sm":Object.assign({},y(S)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),ye=S=>{const{componentCls:c,antCls:b}=S;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:S.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${c}, &-lg > ${c}-group-addon`]:Object.assign({},oe(S)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},y(S)),[`&-lg ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightLG},[`&-sm ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightSM},[`> ${c}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${c}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${S.paddingInline}px`,color:S.colorText,fontWeight:"normal",fontSize:S.fontSize,textAlign:"center",backgroundColor:S.colorFillAlter,border:`${S.lineWidth}px ${S.lineType} ${S.colorBorder}`,borderRadius:S.borderRadius,transition:`all ${S.motionDurationSlow}`,lineHeight:1,[`${b}-select`]:{margin:`-${S.paddingBlock+1}px -${S.paddingInline}px`,[`&${b}-select-single:not(${b}-select-customize-input)`]:{[`${b}-select-selector`]:{backgroundColor:"inherit",border:`${S.lineWidth}px ${S.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${b}-select-selector`]:{color:S.colorPrimary}}},[`${b}-cascader-picker`]:{margin:`-9px -${S.paddingInline}px`,backgroundColor:"transparent",[`${b}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${c}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${c}-search-with-button &`]:{zIndex:0}}},[`> ${c}:first-child, ${c}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}-affix-wrapper`]:{[`&:not(:first-child) ${c}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${c}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}:last-child, ${c}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${c}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${c}-search &`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius}},[`&:not(:first-child), ${c}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${c}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,P.dF)()),{[`${c}-group-addon, ${c}-group-wrap, > ${c}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:S.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${c}-affix-wrapper,
|
|
|
& > ${c}-number-affix-wrapper,
|
|
|
& > ${b}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-S.lineWidth,borderInlineEndWidth:S.lineWidth},[`${c}`]:{float:"none"},[`& > ${b}-select > ${b}-select-selector,
|
|
|
& > ${b}-select-auto-complete ${c},
|
|
|
& > ${b}-cascader-picker ${c},
|
|
|
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:S.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${b}-select-focused`]:{zIndex:1},[`& > ${b}-select > ${b}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${b}-select:first-child > ${b}-select-selector,
|
|
|
& > ${b}-select-auto-complete:first-child ${c},
|
|
|
& > ${b}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius},[`& > *:last-child,
|
|
|
& > ${b}-select:last-child > ${b}-select-selector,
|
|
|
& > ${b}-cascader-picker:last-child ${c},
|
|
|
& > ${b}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:S.lineWidth,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius},[`& > ${b}-select-auto-complete ${c}`]:{verticalAlign:"top"},[`${c}-group-wrapper + ${c}-group-wrapper`]:{marginInlineStart:-S.lineWidth,[`${c}-affix-wrapper`]:{borderRadius:0}},[`${c}-group-wrapper:not(:last-child)`]:{[`&${c}-search > ${c}-group`]:{[`& > ${c}-group-addon > ${c}-search-button`]:{borderRadius:0},[`& > ${c}`]:{borderStartStartRadius:S.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:S.borderRadius}}}})}},Pe=S=>{const{componentCls:c,controlHeightSM:b,lineWidth:L}=S,D=(b-L*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,P.Wf)(S)),H(S)),Me(S,c)),{'&[type="color"]':{height:S.controlHeight,[`&${c}-lg`]:{height:S.controlHeightLG},[`&${c}-sm`]:{height:b,paddingTop:D,paddingBottom:D}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},J=S=>{const{componentCls:c}=S;return{[`${c}-clear-icon`]:{margin:0,color:S.colorTextQuaternary,fontSize:S.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${S.motionDurationSlow}`,"&:hover":{color:S.colorTextTertiary},"&:active":{color:S.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${S.inputAffixPadding}px`}}}},qe=S=>{const{componentCls:c,inputAffixPadding:b,colorTextDescription:L,motionDurationSlow:X,colorIcon:D,colorIconHover:we,iconCls:ke}=S;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},H(S)),{display:"inline-flex",[`&:not(${c}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},A(S)),{zIndex:1,[`${c}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${c}[disabled]`]:{background:"transparent"}},[`> input${c}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${c}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:S.paddingXS}},"&-show-count-suffix":{color:L},"&-show-count-has-suffix":{marginInlineEnd:S.paddingXXS},"&-prefix":{marginInlineEnd:b},"&-suffix":{marginInlineStart:b}}}),J(S)),{[`${ke}${c}-password-icon`]:{color:D,cursor:"pointer",transition:`all ${X}`,"&:hover":{color:we}}}),Me(S,`${c}-affix-wrapper`))}},ot=S=>{const{componentCls:c,colorError:b,colorWarning:L,borderRadiusLG:X,borderRadiusSM:D}=S;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,P.Wf)(S)),ye(S)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:X,fontSize:S.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:D}},"&-status-error":{[`${c}-group-addon`]:{color:b,borderColor:b}},"&-status-warning":{[`${c}-group-addon`]:{color:L,borderColor:L}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},be(S))},[`&:not(${c}-compact-first-item):not(${c}-compact-last-item)${c}-compact-item`]:{[`${c}, ${c}-group-addon`]:{borderRadius:0}},[`&:not(${c}-compact-last-item)${c}-compact-first-item`]:{[`${c}, ${c}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${c}-compact-first-item)${c}-compact-last-item`]:{[`${c}, ${c}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},bt=S=>{const{componentCls:c,antCls:b}=S,L=`${c}-search`;return{[L]:{[`${c}`]:{"&:hover, &:focus":{borderColor:S.colorPrimaryHover,[`+ ${c}-group-addon ${L}-button:not(${b}-btn-primary)`]:{borderInlineStartColor:S.colorPrimaryHover}}},[`${c}-affix-wrapper`]:{borderRadius:0},[`${c}-lg`]:{lineHeight:S.lineHeightLG-2e-4},[`> ${c}-group`]:{[`> ${c}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${L}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${L}-button:not(${b}-btn-primary)`]:{color:S.colorTextDescription,"&:hover":{color:S.colorPrimaryHover},"&:active":{color:S.colorPrimaryActive},[`&${b}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${L}-button`]:{height:S.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${L}-button`]:{height:S.controlHeightLG},[`&-small ${L}-button`]:{height:S.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${c}-compact-item`]:{[`&:not(${c}-compact-last-item)`]:{[`${c}-group-addon`]:{[`${c}-search-button`]:{marginInlineEnd:-S.lineWidth,borderRadius:0}}},[`&:not(${c}-compact-first-item)`]:{[`${c},${c}-affix-wrapper`]:{borderRadius:0}},[`> ${c}-group-addon ${c}-search-button,
|
|
|
> ${c},
|
|
|
${c}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${c}-affix-wrapper-focused`]:{zIndex:2}}}}},It=S=>{const{componentCls:c,paddingLG:b}=S,L=`${c}-textarea`;return{[L]:{position:"relative","&-show-count":{[`> ${c}`]:{height:"100%"},[`${c}-data-count`]:{position:"absolute",bottom:-S.fontSize*S.lineHeight,insetInlineEnd:0,color:S.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${c}`]:{paddingInlineEnd:b}},[`&-affix-wrapper${L}-has-feedback`]:{[`${c}`]:{paddingInlineEnd:b}},[`&-affix-wrapper${c}-affix-wrapper`]:{padding:0,[`> textarea${c}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${c}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${c}-clear-icon`]:{position:"absolute",insetInlineEnd:S.paddingXS,insetBlockStart:S.paddingXS},[`${L}-suffix`]:{position:"absolute",top:0,insetInlineEnd:S.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function re(S){return(0,x.TS)(S,{inputAffixPadding:S.paddingXXS})}const Q=S=>{const{controlHeight:c,fontSize:b,lineHeight:L,lineWidth:X,controlHeightSM:D,controlHeightLG:we,fontSizeLG:ke,lineHeightLG:He,paddingSM:Oe,controlPaddingHorizontalSM:mt,controlPaddingHorizontal:Qe,colorFillAlter:Je,colorPrimaryHover:fe,controlOutlineWidth:Y,controlOutline:de,colorErrorOutline:ae,colorWarningOutline:ie}=S;return{paddingBlock:Math.max(Math.round((c-b*L)/2*10)/10-X,3),paddingBlockSM:Math.max(Math.round((D-b*L)/2*10)/10-X,0),paddingBlockLG:Math.ceil((we-ke*He)/2*10)/10-X,paddingInline:Oe-X,paddingInlineSM:mt-X,paddingInlineLG:Qe-X,addonBg:Je,activeBorderColor:fe,hoverBorderColor:fe,activeShadow:`0 0 0 ${Y}px ${de}`,errorActiveShadow:`0 0 0 ${Y}px ${ae}`,warningActiveShadow:`0 0 0 ${Y}px ${ie}`}};Te.ZP=(0,W.Z)("Input",S=>{const c=(0,x.TS)(S,re(S));return[Pe(c),It(c),qe(c),ot(c),bt(c),(0,w.c)(c)]},Q)},57809:function(rn,Te,f){"use strict";var P=f(92310),w=f.n(P),x=f(77861),W=f(2738),v=f(59301),A=f(53487),N=f(62892),be=f(19080),oe=f(36355),y=f(1684),Me=f(93891),H=f(19716),ye=f(32441),Pe=f(33234),J=f(14154),qe=f(58582),ot=f(84443),bt=f(66339),It=function(b,L){var X={};for(var D in b)Object.prototype.hasOwnProperty.call(b,D)&&L.indexOf(D)<0&&(X[D]=b[D]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,D=Object.getOwnPropertySymbols(b);we<D.length;we++)L.indexOf(D[we])<0&&Object.prototype.propertyIsEnumerable.call(b,D[we])&&(X[D[we]]=b[D[we]]);return X};const re="SECRET_COMBOBOX_MODE_DO_NOT_USE",Q=(b,L)=>{var X,{prefixCls:D,bordered:we=!0,className:ke,rootClassName:He,getPopupContainer:Oe,popupClassName:mt,dropdownClassName:Qe,listHeight:Je=256,placement:fe,listItemHeight:Y=24,size:de,disabled:ae,notFoundContent:ie,status:Ve,builtinPlacements:ze,dropdownMatchSelectWidth:he,popupMatchSelectWidth:De,direction:pe,style:St,allowClear:Lt}=b,xt=It(b,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:et,getPrefixCls:Mt,renderEmpty:at,direction:Z,virtual:Le,popupMatchSelectWidth:se,popupOverflow:E,select:I}=v.useContext(oe.E_),M=Mt("select",D),$=Mt(),q=pe!=null?pe:Z,{compactSize:xe,compactItemClassnames:_}=(0,Pe.ri)(M,q),[Fe,z]=(0,J.Z)(M),le=v.useMemo(()=>{const{mode:In}=xt;if(In!=="combobox")return In===re?"combobox":In},[xt.mode]),Re=le==="multiple"||le==="tags",ue=(0,ot.Z)(xt.suffixIcon,xt.showArrow),Ie=(X=De!=null?De:he)!==null&&X!==void 0?X:se,{status:U,hasFeedback:me,isFormItemInput:Ae,feedbackIcon:tt}=v.useContext(ye.aM),it=(0,be.F)(U,Ve);let je;ie!==void 0?je=ie:le==="combobox"?je=null:je=(at==null?void 0:at("Select"))||v.createElement(Me.Z,{componentName:"Select"});const{suffixIcon:Ce,itemIcon:rt,removeIcon:lt,clearIcon:Yt}=(0,bt.Z)(Object.assign(Object.assign({},xt),{multiple:Re,hasFeedback:me,feedbackIcon:tt,showSuffixIcon:ue,prefixCls:M,showArrow:xt.showArrow,componentName:"Select"})),Qt=Lt===!0?{clearIcon:Yt}:Lt,sn=(0,W.Z)(xt,["suffixIcon","itemIcon"]),xn=w()(mt||Qe,{[`${M}-dropdown-${q}`]:q==="rtl"},He,z),un=(0,H.Z)(In=>{var Cn;return(Cn=de!=null?de:xe)!==null&&Cn!==void 0?Cn:In}),Bn=v.useContext(y.Z),$n=ae!=null?ae:Bn,pn=w()({[`${M}-lg`]:un==="large",[`${M}-sm`]:un==="small",[`${M}-rtl`]:q==="rtl",[`${M}-borderless`]:!we,[`${M}-in-form-item`]:Ae},(0,be.Z)(M,it,me),_,I==null?void 0:I.className,ke,He,z),Fn=v.useMemo(()=>fe!==void 0?fe:q==="rtl"?"bottomRight":"bottomLeft",[fe,q]),En=(0,qe.Z)(ze,E);return Fe(v.createElement(x.ZP,Object.assign({ref:L,virtual:Le,showSearch:I==null?void 0:I.showSearch},sn,{style:Object.assign(Object.assign({},I==null?void 0:I.style),St),dropdownMatchSelectWidth:Ie,builtinPlacements:En,transitionName:(0,N.m)($,"slide-up",xt.transitionName),listHeight:Je,listItemHeight:Y,mode:le,prefixCls:M,placement:Fn,direction:q,suffixIcon:Ce,menuItemSelectedIcon:rt,removeIcon:lt,allowClear:Qt,notFoundContent:je,className:pn,getPopupContainer:Oe||et,dropdownClassName:xn,disabled:$n})))},S=v.forwardRef(Q),c=(0,A.Z)(S);S.SECRET_COMBOBOX_MODE_DO_NOT_USE=re,S.Option=x.Wx,S.OptGroup=x.Xo,S._InternalPanelDoNotUseOrYouWillBeFired=c,Te.default=S},14154:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return S}});var P=f(17313),w=f(74207),x=f(37613),W=f(83116),v=f(13826),A=f(92899);const N=c=>{const{optionHeight:b,optionFontSize:L,optionLineHeight:X,optionPadding:D}=c;return{position:"relative",display:"block",minHeight:b,padding:D,color:c.colorText,fontWeight:"normal",fontSize:L,lineHeight:X,boxSizing:"border-box"}};var oe=c=>{const{antCls:b,componentCls:L}=c,X=`${L}-item`,D=`&${b}-slide-up-enter${b}-slide-up-enter-active`,we=`&${b}-slide-up-appear${b}-slide-up-appear-active`,ke=`&${b}-slide-up-leave${b}-slide-up-leave-active`,He=`${L}-dropdown-placement-`;return[{[`${L}-dropdown`]:Object.assign(Object.assign({},(0,P.Wf)(c)),{position:"absolute",top:-9999,zIndex:c.zIndexPopup,boxSizing:"border-box",padding:c.paddingXXS,overflow:"hidden",fontSize:c.fontSize,fontVariant:"initial",backgroundColor:c.colorBgElevated,borderRadius:c.borderRadiusLG,outline:"none",boxShadow:c.boxShadowSecondary,[`
|
|
|
${D}${He}bottomLeft,
|
|
|
${we}${He}bottomLeft
|
|
|
`]:{animationName:v.fJ},[`
|
|
|
${D}${He}topLeft,
|
|
|
${we}${He}topLeft,
|
|
|
${D}${He}topRight,
|
|
|
${we}${He}topRight
|
|
|
`]:{animationName:v.Qt},[`${ke}${He}bottomLeft`]:{animationName:v.Uw},[`
|
|
|
${ke}${He}topLeft,
|
|
|
${ke}${He}topRight
|
|
|
`]:{animationName:v.ly},"&-hidden":{display:"none"},[`${X}`]:Object.assign(Object.assign({},N(c)),{cursor:"pointer",transition:`background ${c.motionDurationSlow} ease`,borderRadius:c.borderRadiusSM,"&-group":{color:c.colorTextDescription,fontSize:c.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},P.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${X}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${X}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${X}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${X}-option-selected`]:{backgroundColor:c.colorBgContainerDisabled},color:c.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:c.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,v.oN)(c,"slide-up"),(0,v.oN)(c,"slide-down"),(0,A.Fm)(c,"move-up"),(0,A.Fm)(c,"move-down")]};const y=2,Me=c=>{let{controlHeightSM:b,controlHeight:L,lineWidth:X}=c;const D=(L-b)/2-X,we=Math.ceil(D/2);return[D,we]};function H(c,b){const{componentCls:L,iconCls:X}=c,D=`${L}-selection-overflow`,we=c.multipleSelectItemHeight,[ke]=Me(c),He=b?`${L}-${b}`:"";return{[`${L}-multiple${He}`]:{fontSize:c.fontSize,[D]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${L}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${ke-y}px ${y*2}px`,borderRadius:c.borderRadius,[`${L}-show-search&`]:{cursor:"text"},[`${L}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${y}px 0`,lineHeight:`${we}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${L}-show-arrow ${L}-selector,
|
|
|
&${L}-allow-clear ${L}-selector
|
|
|
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${L}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:we,marginTop:y,marginBottom:y,lineHeight:`${we-c.lineWidth*2}px`,background:c.multipleItemBg,border:`${c.lineWidth}px ${c.lineType} ${c.multipleItemBorderColor}`,borderRadius:c.borderRadiusSM,cursor:"default",transition:`font-size ${c.motionDurationSlow}, line-height ${c.motionDurationSlow}, height ${c.motionDurationSlow}`,userSelect:"none",marginInlineEnd:y*2,paddingInlineStart:c.paddingXS,paddingInlineEnd:c.paddingXS/2,[`${L}-disabled&`]:{color:c.multipleItemColorDisabled,borderColor:c.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:c.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,P.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${X}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${D}-item + ${D}-item`]:{[`${L}-selection-search`]:{marginInlineStart:0}},[`${L}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-ke,"\n &-input,\n &-mirror\n ":{height:we,fontFamily:c.fontFamily,lineHeight:`${we}px`,transition:`all ${c.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${L}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var Pe=c=>{const{componentCls:b}=c,L=(0,x.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),X=(0,x.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,D]=Me(c);return[H(c),H(L,"sm"),{[`${b}-multiple${b}-sm`]:{[`${b}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${b}-selection-search`]:{marginInlineStart:D}}},H(X,"lg")]};function J(c,b){const{componentCls:L,inputPaddingHorizontalBase:X,borderRadius:D}=c,we=c.controlHeight-c.lineWidth*2,ke=Math.ceil(c.fontSize*1.25),He=b?`${L}-${b}`:"";return{[`${L}-single${He}`]:{fontSize:c.fontSize,[`${L}-selector`]:Object.assign(Object.assign({},(0,P.Wf)(c)),{display:"flex",borderRadius:D,[`${L}-selection-search`]:{position:"absolute",top:0,insetInlineStart:X,insetInlineEnd:X,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${L}-selection-item,
|
|
|
${L}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${we}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${we}px`}},[`${L}-selection-item`]:{position:"relative",userSelect:"none"},[`${L}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${L}-selection-item:after`,`${L}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${L}-show-arrow ${L}-selection-item,
|
|
|
&${L}-show-arrow ${L}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:ke},[`&${L}-open ${L}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${L}-customize-input)`]:{[`${L}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${X}px`,[`${L}-selection-search-input`]:{height:we},"&:after":{lineHeight:`${we}px`}}},[`&${L}-customize-input`]:{[`${L}-selector`]:{"&:after":{display:"none"},[`${L}-selection-search`]:{position:"static",width:"100%"},[`${L}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${X}px`,"&:after":{display:"none"}}}}}}}function qe(c){const{componentCls:b}=c,L=c.controlPaddingHorizontalSM-c.lineWidth;return[J(c),J((0,x.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${b}-single${b}-sm`]:{[`&:not(${b}-customize-input)`]:{[`${b}-selection-search`]:{insetInlineStart:L,insetInlineEnd:L},[`${b}-selector`]:{padding:`0 ${L}px`},[`&${b}-show-arrow ${b}-selection-search`]:{insetInlineEnd:L+c.fontSize*1.5},[`
|
|
|
&${b}-show-arrow ${b}-selection-item,
|
|
|
&${b}-show-arrow ${b}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:c.fontSize*1.5}}}},J((0,x.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const ot=c=>{const{componentCls:b,selectorBg:L}=c;return{position:"relative",backgroundColor:L,border:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`,transition:`all ${c.motionDurationMid} ${c.motionEaseInOut}`,input:{cursor:"pointer"},[`${b}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${b}-disabled&`]:{color:c.colorTextDisabled,background:c.colorBgContainerDisabled,cursor:"not-allowed",[`${b}-multiple&`]:{background:c.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},bt=function(c,b){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:X,borderHoverColor:D,outlineColor:we,antCls:ke}=b,He=L?{[`${X}-selector`]:{borderColor:D}}:{};return{[c]:{[`&:not(${X}-disabled):not(${X}-customize-input):not(${ke}-pagination-size-changer)`]:Object.assign(Object.assign({},He),{[`${X}-focused& ${X}-selector`]:{borderColor:D,boxShadow:`0 0 0 ${b.controlOutlineWidth}px ${we}`,outline:0},[`&:hover ${X}-selector`]:{borderColor:D}})}}},It=c=>{const{componentCls:b}=c;return{[`${b}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},re=c=>{const{componentCls:b,inputPaddingHorizontalBase:L,iconCls:X}=c;return{[b]:Object.assign(Object.assign({},(0,P.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${b}-customize-input) ${b}-selector`]:Object.assign(Object.assign({},ot(c)),It(c)),[`${b}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},P.vS),[`${b}-selection-placeholder`]:Object.assign(Object.assign({},P.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${b}-arrow`]:Object.assign(Object.assign({},(0,P.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:L,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[X]:{verticalAlign:"top",transition:`transform ${c.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${b}-suffix)`]:{pointerEvents:"auto"}},[`${b}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${b}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:L,zIndex:1,display:"inline-block",width:c.fontSizeIcon,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:c.clearBg,cursor:"pointer",opacity:0,transition:`color ${c.motionDurationMid} ease, opacity ${c.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:c.colorTextTertiary}},"&:hover":{[`${b}-clear`]:{opacity:1}}}),[`${b}-has-feedback`]:{[`${b}-clear`]:{insetInlineEnd:L+c.fontSize+c.paddingXS}}}},Q=c=>{const{componentCls:b}=c;return[{[b]:{[`&-borderless ${b}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${b}-in-form-item`]:{width:"100%"}}},re(c),qe(c),Pe(c),oe(c),{[`${b}-rtl`]:{direction:"rtl"}},bt(b,(0,x.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),bt(`${b}-status-error`,(0,x.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),bt(`${b}-status-warning`,(0,x.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,w.c)(c,{borderElCls:`${b}-selector`,focusElCls:`${b}-focused`})]};var S=(0,W.Z)("Select",(c,b)=>{let{rootPrefixCls:L}=b;const X=(0,x.TS)(c,{rootPrefixCls:L,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[Q(X)]},c=>{const{fontSize:b,lineHeight:L,controlHeight:X,controlPaddingHorizontal:D,zIndexPopupBase:we,colorText:ke,fontWeightStrong:He,controlItemBgActive:Oe,controlItemBgHover:mt,colorBgContainer:Qe,colorFillSecondary:Je,controlHeightLG:fe,controlHeightSM:Y,colorBgContainerDisabled:de,colorTextDisabled:ae}=c;return{zIndexPopup:we+50,optionSelectedColor:ke,optionSelectedFontWeight:He,optionSelectedBg:Oe,optionActiveBg:mt,optionPadding:`${(X-b*L)/2}px ${D}px`,optionFontSize:b,optionLineHeight:L,optionHeight:X,selectorBg:Qe,clearBg:Qe,singleItemHeightLG:fe,multipleItemBg:Je,multipleItemBorderColor:"transparent",multipleItemHeight:Y,multipleItemHeightLG:X,multipleSelectorBgDisabled:de,multipleItemColorDisabled:ae,multipleItemBorderColorDisabled:"transparent"}})},58582:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return w}});const P=x=>{const v={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:x==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},v),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},v),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},v),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},v),{points:["br","tr"],offset:[0,-4]})}};function w(x,W){return x||P(W)}},84443:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return P}});function P(w,x){return x!==void 0?x:w!==null}},66339:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return be}});var P=f(40001),w=f(19248),x=f(99267),W=f(84105),v=f(58617),A=f(47472),N=f(59301);function be(oe){let{suffixIcon:y,clearIcon:Me,menuItemSelectedIcon:H,removeIcon:ye,loading:Pe,multiple:J,hasFeedback:qe,prefixCls:ot,showSuffixIcon:bt,feedbackIcon:It,showArrow:re,componentName:Q}=oe;const S=Me!=null?Me:N.createElement(w.Z,null),c=D=>y===null&&!qe&&!re?null:N.createElement(N.Fragment,null,bt!==!1&&D,qe&&It);let b=null;if(y!==void 0)b=c(y);else if(Pe)b=c(N.createElement(v.Z,{spin:!0}));else{const D=`${ot}-suffix`;b=we=>{let{open:ke,showSearch:He}=we;return c(ke&&He?N.createElement(A.Z,{className:D}):N.createElement(W.Z,{className:D}))}}let L=null;H!==void 0?L=H:J?L=N.createElement(P.Z,null):L=null;let X=null;return ye!==void 0?X=ye:X=N.createElement(x.Z,null),{clearIcon:S,suffixIcon:b,itemIcon:L,removeIcon:X}}},8378:function(rn,Te){"use strict";const f=P=>({[P.componentCls]:{[`${P.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${P.motionDurationMid} ${P.motionEaseInOut},
|
|
|
opacity ${P.motionDurationMid} ${P.motionEaseInOut} !important`}},[`${P.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${P.motionDurationMid} ${P.motionEaseInOut},
|
|
|
opacity ${P.motionDurationMid} ${P.motionEaseInOut} !important`}}});Te.Z=f},92899:function(rn,Te,f){"use strict";f.d(Te,{Fm:function(){return H}});var P=f(36237),w=f(95406);const x=new P.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),W=new P.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),v=new P.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),A=new P.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),N=new P.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),be=new P.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),oe=new P.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),y=new P.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Me={"move-up":{inKeyframes:oe,outKeyframes:y},"move-down":{inKeyframes:x,outKeyframes:W},"move-left":{inKeyframes:v,outKeyframes:A},"move-right":{inKeyframes:N,outKeyframes:be}},H=(ye,Pe)=>{const{antCls:J}=ye,qe=`${J}-${Pe}`,{inKeyframes:ot,outKeyframes:bt}=Me[Pe];return[(0,w.R)(qe,ot,bt,ye.motionDurationMid),{[`
|
|
|
${qe}-enter,
|
|
|
${qe}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:ye.motionEaseOutCirc},[`${qe}-leave`]:{animationTimingFunction:ye.motionEaseInOutCirc}}]}},13826:function(rn,Te,f){"use strict";f.d(Te,{Qt:function(){return v},Uw:function(){return W},fJ:function(){return x},ly:function(){return A},oN:function(){return H}});var P=f(36237),w=f(95406);const x=new P.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),W=new P.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),v=new P.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),A=new P.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),N=new P.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),be=new P.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),oe=new P.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),y=new P.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Me={"slide-up":{inKeyframes:x,outKeyframes:W},"slide-down":{inKeyframes:v,outKeyframes:A},"slide-left":{inKeyframes:N,outKeyframes:be},"slide-right":{inKeyframes:oe,outKeyframes:y}},H=(ye,Pe)=>{const{antCls:J}=ye,qe=`${J}-${Pe}`,{inKeyframes:ot,outKeyframes:bt}=Me[Pe];return[(0,w.R)(qe,ot,bt,ye.motionDurationMid),{[`
|
|
|
${qe}-enter,
|
|
|
${qe}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:ye.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${qe}-leave`]:{animationTimingFunction:ye.motionEaseInQuint}}]}},89780:function(rn){(function(Te,f){rn.exports=f()})(this,function(){"use strict";var Te=navigator.userAgent,f=navigator.platform,P=/gecko\/\d/i.test(Te),w=/MSIE \d/.test(Te),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Te),W=/Edge\/(\d+)/.exec(Te),v=w||x||W,A=v&&(w?document.documentMode||6:+(W||x)[1]),N=!W&&/WebKit\//.test(Te),be=N&&/Qt\/\d+\.\d+/.test(Te),oe=!W&&/Chrome\//.test(Te),y=/Opera\//.test(Te),Me=/Apple Computer/.test(navigator.vendor),H=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Te),ye=/PhantomJS/.test(Te),Pe=!W&&/AppleWebKit/.test(Te)&&/Mobile\/\w+/.test(Te),J=/Android/.test(Te),qe=Pe||J||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Te),ot=Pe||/Mac/.test(f),bt=/\bCrOS\b/.test(Te),It=/win/i.test(f),re=y&&Te.match(/Version\/(\d*\.\d*)/);re&&(re=Number(re[1])),re&&re>=15&&(y=!1,N=!0);var Q=ot&&(be||y&&(re==null||re<12.11)),S=P||v&&A>=9;function c(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,t){var r=e.className,n=c(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function L(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function X(e,t){return L(e).appendChild(t)}function D(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),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 we(e,t,r,n){var i=D(e,t,r,n);return i.setAttribute("role","presentation"),i}var ke;document.createRange?ke=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:ke=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function He(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 Oe(){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 mt(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function Qe(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!c(r[n]).test(t)&&(t+=" "+r[n]);return t}var Je=function(e){e.select()};Pe?Je=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:v&&(Je=function(e){try{e.select()}catch(t){}});function fe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Y(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function de(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=n||0,a=i||0;;){var l=e.indexOf(" ",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}var ae=function(){this.id=null,this.f=null,this.time=0,this.handler=fe(this.onTimeout,this)};ae.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ae.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function ie(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Ve=50,ze={toString:function(){return"CodeMirror.Pass"}},he={scroll:!1},De={origin:"*mouse"},pe={origin:"+move"};function St(e,t,r){for(var n=0,i=0;;){var o=e.indexOf(" ",n);o==-1&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}var Lt=[""];function xt(e){for(;Lt.length<=e;)Lt.push(et(Lt)+" ");return Lt[e]}function et(e){return e[e.length-1]}function Mt(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function at(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function Z(){}function Le(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&Y(t,r),r}var se=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function E(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||se.test(e))}function I(e,t){return t?t.source.indexOf("\\w")>-1&&E(e)?!0:t.test(e):E(e)}function M(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var $=/[\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 q(e){return e.charCodeAt(0)>=768&&$.test(e)}function xe(e,t,r){for(;(r<0?t>0:t<e.length)&&q(e.charAt(t));)t+=r;return t}function _(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function Fe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),a.level==1?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var z=null;function le(e,t,r){var n;z=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&&r=="before"?n=i:z=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:z=i)}return n!=null?n:z}var Re=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(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 n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(u,p,m){this.level=u,this.from=p,this.to=m}return function(u,p){var m=p=="ltr"?"L":"R";if(u.length==0||p=="ltr"&&!n.test(u))return!1;for(var R=u.length,O=[],j=0;j<R;++j)O.push(r(u.charCodeAt(j)));for(var ee=0,Ee=m;ee<R;++ee){var $e=O[ee];$e=="m"?O[ee]=Ee:Ee=$e}for(var Ye=0,We=m;Ye<R;++Ye){var nt=O[Ye];nt=="1"&&We=="r"?O[Ye]="n":o.test(nt)&&(We=nt,nt=="r"&&(O[Ye]="R"))}for(var wt=1,gt=O[0];wt<R-1;++wt){var Kt=O[wt];Kt=="+"&>=="1"&&O[wt+1]=="1"?O[wt]="1":Kt==","&>==O[wt+1]&&(gt=="1"||gt=="n")&&(O[wt]=gt),gt=Kt}for(var Sn=0;Sn<R;++Sn){var Qn=O[Sn];if(Qn==",")O[Sn]="N";else if(Qn=="%"){var Dn=void 0;for(Dn=Sn+1;Dn<R&&O[Dn]=="%";++Dn);for(var br=Sn&&O[Sn-1]=="!"||Dn<R&&O[Dn]=="1"?"1":"N",dr=Sn;dr<Dn;++dr)O[dr]=br;Sn=Dn-1}}for(var Hn=0,hr=m;Hn<R;++Hn){var er=O[Hn];hr=="L"&&er=="1"?O[Hn]="L":o.test(er)&&(hr=er)}for(var jn=0;jn<R;++jn)if(i.test(O[jn])){var Zn=void 0;for(Zn=jn+1;Zn<R&&i.test(O[Zn]);++Zn);for(var Tn=(jn?O[jn-1]:m)=="L",vr=(Zn<R?O[Zn]:m)=="L",Wi=Tn==vr?Tn?"L":"R":m,ai=jn;ai<Zn;++ai)O[ai]=Wi;jn=Zn-1}for(var ir=[],Zr,Jn=0;Jn<R;)if(a.test(O[Jn])){var ba=Jn;for(++Jn;Jn<R&&a.test(O[Jn]);++Jn);ir.push(new s(0,ba,Jn))}else{var Vr=Jn,yi=ir.length,bi=p=="rtl"?1:0;for(++Jn;Jn<R&&O[Jn]!="L";++Jn);for(var lr=Vr;lr<Jn;)if(l.test(O[lr])){Vr<lr&&(ir.splice(yi,0,new s(1,Vr,lr)),yi+=bi);var zi=lr;for(++lr;lr<Jn&&l.test(O[lr]);++lr);ir.splice(yi,0,new s(2,zi,lr)),yi+=bi,Vr=lr}else++lr;Vr<Jn&&ir.splice(yi,0,new s(1,Vr,Jn))}return p=="ltr"&&(ir[0].level==1&&(Zr=u.match(/^\s+/))&&(ir[0].from=Zr[0].length,ir.unshift(new s(0,0,Zr[0].length))),et(ir).level==1&&(Zr=u.match(/\s+$/))&&(et(ir).to-=Zr[0].length,ir.push(new s(0,R-Zr[0].length,R)))),p=="rtl"?ir.reverse():ir}}();function ue(e,t){var r=e.order;return r==null&&(r=e.order=Re(e.text,t)),r}var Ie=[],U=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Ie).concat(r)}};function me(e,t){return e._handlers&&e._handlers[t]||Ie}function Ae(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=ie(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function tt(e,t){var r=me(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function it(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),tt(e,r||t.type,e,t),Qt(t)||t.codemirrorIgnore}function je(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)ie(r,t[n])==-1&&r.push(t[n])}function Ce(e,t){return me(e,t).length>0}function rt(e){e.prototype.on=function(t,r){U(this,t,r)},e.prototype.off=function(t,r){Ae(this,t,r)}}function lt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Yt(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Qt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function sn(e){lt(e),Yt(e)}function xn(e){return e.target||e.srcElement}function un(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ot&&e.ctrlKey&&t==1&&(t=3),t}var Bn=function(){if(v&&A<9)return!1;var e=D("div");return"draggable"in e||"dragDrop"in e}(),$n;function pn(e){if($n==null){var t=D("span","\u200B");X(e,D("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&($n=t.offsetWidth<=1&&t.offsetHeight>2&&!(v&&A<8))}var r=$n?D("span","\u200B"):D("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Fn;function En(e){if(Fn!=null)return Fn;var t=X(e,document.createTextNode("A\u062EA")),r=ke(t,0,1).getBoundingClientRect(),n=ke(t,1,2).getBoundingClientRect();return L(e),!r||r.left==r.right?!1:Fn=n.right-r.right<3}var In=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){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?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Cn=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(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},dn=function(){var e=D("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Wn=null;function Jt(e){if(Wn!=null)return Wn;var t=X(e,D("span","x")),r=t.getBoundingClientRect(),n=ke(t,0,1).getBoundingClientRect();return Wn=Math.abs(r.left-n.left)>1}var Pn={},zn={};function Sr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pn[e]=t}function pr(e,t){zn[e]=t}function on(e){if(typeof e=="string"&&zn.hasOwnProperty(e))e=zn[e];else if(e&&typeof e.name=="string"&&zn.hasOwnProperty(e.name)){var t=zn[e.name];typeof t=="string"&&(t={name:t}),e=Le(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return on("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return on("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function st(e,t){t=on(t);var r=Pn[t.name];if(!r)return st(e,"text/plain");var n=r(e,t);if(Ht.hasOwnProperty(t.name)){var i=Ht[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Ht={};function g(e,t){var r=Ht.hasOwnProperty(e)?Ht[e]:Ht[e]={};Y(t,r)}function B(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function k(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),!(!r||r.mode==e));)t=r.state,e=r.mode;return r||{mode:e,state:t}}function d(e,t,r){return e.startState?e.startState(t,r):!0}var h=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};h.prototype.eol=function(){return this.pos>=this.string.length},h.prototype.sol=function(){return this.pos==this.lineStart},h.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},h.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},h.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},h.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},h.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},h.prototype.skipToEnd=function(){this.pos=this.string.length},h.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},h.prototype.backUp=function(e){this.pos-=e},h.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=de(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?de(this.string,this.lineStart,this.tabSize):0)},h.prototype.indentation=function(){return de(this.string,null,this.tabSize)-(this.lineStart?de(this.string,this.lineStart,this.tabSize):0)},h.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(a){return r?a.toLowerCase():a},i=this.string.substr(this.pos,e.length);if(n(i)==n(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)}},h.prototype.current=function(){return this.string.slice(this.start,this.pos)},h.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},h.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},h.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function C(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 r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function T(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(o){var a=o.text;i==r.line&&(a=a.slice(0,r.ch)),i==t.line&&(a=a.slice(t.ch)),n.push(a),++i}),n}function ne(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function G(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function K(e){if(e.parent==null)return null;for(var t=e.parent,r=ie(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function ge(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}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 r+a}function ce(e,t){return t>=e.first&&t<e.first+e.size}function Ze(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function F(e,t,r){if(r===void 0&&(r=null),!(this instanceof F))return new F(e,t,r);this.line=e,this.ch=t,this.sticky=r}function V(e,t){return e.line-t.line||e.ch-t.ch}function Ue(e,t){return e.sticky==t.sticky&&V(e,t)==0}function Se(e){return F(e.line,e.ch)}function Ke(e,t){return V(e,t)<0?t:e}function Ne(e,t){return V(e,t)<0?e:t}function ht(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function te(e,t){if(t.line<e.first)return F(e.first,0);var r=e.first+e.size-1;return t.line>r?F(r,C(e,r).text.length):ve(t,C(e,t.line).text.length)}function ve(e,t){var r=e.ch;return r==null||r>t?F(e.line,t):r<0?F(e.line,0):e}function Be(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=te(e,t[n]);return r}var ut=function(e,t){this.state=e,this.lookAhead=t},Ge=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Ge.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ge.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}},Ge.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ge.fromSaved=function(e,t,r){return t instanceof ut?new Ge(e,B(e.mode,t.state),r,t.lookAhead):new Ge(e,B(e.mode,t),r)},Ge.prototype.save=function(e){var t=e!==!1?B(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};function ft(e,t,r,n){var i=[e.state.modeGen],o={};Gt(e,t.text,e.doc.mode,r,function(u,p){return i.push(u,p)},o,n);for(var a=r.state,l=function(u){r.baseTokens=i;var p=e.state.overlays[u],m=1,R=0;r.state=!0,Gt(e,t.text,p.mode,r,function(O,j){for(var ee=m;R<O;){var Ee=i[m];Ee>O&&i.splice(m,1,O,i[m+1],Ee),m+=2,R=Math.min(O,Ee)}if(j)if(p.opaque)i.splice(ee,m-ee,O,"overlay "+j),m=ee+2;else for(;ee<m;ee+=2){var $e=i[ee+1];i[ee+1]=($e?$e+" ":"")+"overlay "+j}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function jt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Tt(e,K(t)),i=t.text.length>e.options.maxHighlightLength&&B(e.doc.mode,n.state),o=ft(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Tt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Ge(n,!0,t);var o=Pt(e,t,r),a=o>n.first&&C(n,o-1).stateAfter,l=a?Ge.fromSaved(n,a,o):new Ge(n,d(n.mode),o);return n.iter(o,t,function(s){$t(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()}),r&&(n.modeFrontier=l.line),l}function $t(e,t,r,n){var i=e.doc.mode,o=new h(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&Wt(i,r.state);!o.eol();)Rt(i,o,r.state),o.start=o.pos}function Wt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=k(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function Rt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=k(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var en=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ut(e,t,r,n){var i=e.doc,o=i.mode,a;t=te(i,t);var l=C(i,t.line),s=Tt(e,t.line,r),u=new h(l.text,e.options.tabSize,s),p;for(n&&(p=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=Rt(o,u,s.state),n&&p.push(new en(u,a,B(i.mode,s.state)));return n?p:new en(u,a,s.state)}function kt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Gt(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,p=new h(t,e.options.tabSize,n),m,R=e.options.addModeClass&&[null];for(t==""&&kt(Wt(r,n.state),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(l=!1,a&&$t(e,t,n,p.pos),p.pos=t.length,m=null):m=kt(Rt(r,p,n.state,R),o),R){var O=R[0].name;O&&(m="m-"+(m?O+" "+m:O))}if(!l||u!=m){for(;s<p.start;)s=Math.min(p.start,s+5e3),i(s,u);u=m}p.start=p.pos}for(;s<p.pos;){var j=Math.min(p.pos,s+5e3);i(j,u),s=j}}function Pt(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=C(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof ut?u.lookAhead:0)<=o.modeFrontier))return l;var p=de(s.text,null,e.options.tabSize);(i==null||n>p)&&(i=l-1,n=p)}return i}function Ot(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=C(e,n).stateAfter;if(i&&(!(i instanceof ut)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var zt=!1,Ft=!1;function fn(){zt=!0}function Nt(){Ft=!0}function Zt(e,t,r){this.marker=e,this.from=t,this.to=r}function an(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Vt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function wn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Un(e,t,r){var n;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"&&(!r||!o.marker.insertLeft)){var s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Zt(a,o.from,s?null:o.to))}}return n}function Dt(e,t,r){var n;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"&&(!r||o.marker.insertLeft)){var s=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Zt(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function dt(e,t){if(t.full)return null;var r=ce(e,t.from.line)&&C(e,t.from.line).markedSpans,n=ce(e,t.to.line)&&C(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=V(t.from,t.to)==0,l=Un(r,i,a),s=Dt(n,o,a),u=t.text.length==1,p=et(t.text).length+(u?i:0);if(l)for(var m=0;m<l.length;++m){var R=l[m];if(R.to==null){var O=an(s,R.marker);O?u&&(R.to=O.to==null?null:O.to+p):R.to=i}}if(s)for(var j=0;j<s.length;++j){var ee=s[j];if(ee.to!=null&&(ee.to+=p),ee.from==null){var Ee=an(l,ee.marker);Ee||(ee.from=p,u&&(l||(l=[])).push(ee))}else ee.from+=p,u&&(l||(l=[])).push(ee)}l&&(l=vt(l)),s&&s!=l&&(s=vt(s));var $e=[l];if(!u){var Ye=t.text.length-2,We;if(Ye>0&&l)for(var nt=0;nt<l.length;++nt)l[nt].to==null&&(We||(We=[])).push(new Zt(l[nt].marker,null,null));for(var wt=0;wt<Ye;++wt)$e.push(We);$e.push(s)}return $e}function vt(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function tn(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(O){if(O.markedSpans)for(var j=0;j<O.markedSpans.length;++j){var ee=O.markedSpans[j].marker;ee.readOnly&&(!n||ie(n,ee)==-1)&&(n||(n=[])).push(ee)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var u=i[s];if(!(V(u.to,l.from)<0||V(u.from,l.to)>0)){var p=[s,1],m=V(u.from,l.from),R=V(u.to,l.to);(m<0||!a.inclusiveLeft&&!m)&&p.push({from:u.from,to:l.from}),(R>0||!a.inclusiveRight&&!R)&&p.push({from:l.to,to:u.to}),i.splice.apply(i,p),s+=p.length-3}}return i}function nn(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Xt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Bt(e){return e.inclusiveLeft?-1:0}function ln(e){return e.inclusiveRight?1:0}function gn(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=V(n.from,i.from)||Bt(e)-Bt(t);if(o)return-o;var a=V(n.to,i.to)||ln(e)-ln(t);return a||t.id-e.id}function mn(e,t){var r=Ft&&e.markedSpans,n;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||gn(n,i.marker)<0)&&(n=i.marker);return n}function Ln(e){return mn(e,!0)}function Xe(e){return mn(e,!1)}function _e(e,t){var r=Ft&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!n||gn(n,o.marker)<0)&&(n=o.marker)}return n}function yt(e,t,r,n,i){var o=C(e,t),a=Ft&&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),p=V(u.from,r)||Bt(s.marker)-Bt(i),m=V(u.to,n)||ln(s.marker)-ln(i);if(!(p>=0&&m<=0||p<=0&&m>=0)&&(p<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?V(u.to,r)>=0:V(u.to,r)>0)||p>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?V(u.from,n)<=0:V(u.from,n)<0)))return!0}}}function Ct(e){for(var t;t=Ln(e);)e=t.find(-1,!0).line;return e}function vn(e){for(var t;t=Xe(e);)e=t.find(1,!0).line;return e}function xr(e){for(var t,r;t=Xe(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function _n(e,t){var r=C(e,t),n=Ct(r);return r==n?t:K(n)}function Kn(e,t){if(t>e.lastLine())return t;var r=C(e,t),n;if(!An(e,r))return t;for(;n=Xe(r);)r=n.find(1,!0).line;return K(r)+1}function An(e,t){var r=Ft&&t.markedSpans;if(r){for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&kn(e,t,n))return!0}}}function kn(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return kn(e,n.line,an(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.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==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&kn(e,t,i))return!0}function Mn(e){e=Ct(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function sr(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ln(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Xe(n);){var o=r.find(0,!0);t-=n.text.length-o.from.ch,n=o.to.line,t+=n.text.length-o.to.ch}return t}function qn(e){var t=e.display,r=e.doc;t.maxLine=C(r,r.first),t.maxLineLength=sr(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=sr(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var tr=function(e,t,r){this.text=e,Xt(this,t),this.height=r?r(this):1};tr.prototype.lineNo=function(){return K(this)},rt(tr);function _r(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),nn(e),Xt(e,r);var i=n?n(e):1;i!=e.height&&G(e,i)}function Xr(e){e.parent=null,nn(e)}var li={},Yr={};function Cr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yr:li;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Qr(e,t){var r=we("span",null,null,N?"padding-right: .1px":null),n={pre:we("pre",[r],"CodeMirror-line"),content:r,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;n.pos=0,n.addToken=Hi,En(e.display.measure)&&(a=ue(o,e.doc.direction))&&(n.addToken=si(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&K(o);xi(o,n,jt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=Qe(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=Qe(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(pn(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(N){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return tt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Qe(n.pre.className,n.textClass||"")),n}function Ir(e){var t=D("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Hi(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?Si(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,p;if(!s.test(t))e.col+=t.length,p=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,p),v&&A<9&&(u=!0),e.pos+=t.length;else{p=document.createDocumentFragment();for(var m=0;;){s.lastIndex=m;var R=s.exec(t),O=R?R.index-m:t.length-m;if(O){var j=document.createTextNode(l.slice(m,m+O));v&&A<9?p.appendChild(D("span",[j])):p.appendChild(j),e.map.push(e.pos,e.pos+O,j),e.col+=O,e.pos+=O}if(!R)break;m+=O+1;var ee=void 0;if(R[0]==" "){var Ee=e.cm.options.tabSize,$e=Ee-e.col%Ee;ee=p.appendChild(D("span",xt($e),"cm-tab")),ee.setAttribute("role","presentation"),ee.setAttribute("cm-text"," "),e.col+=$e}else R[0]=="\r"||R[0]==`
|
|
|
`?(ee=p.appendChild(D("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ee.setAttribute("cm-text",R[0]),e.col+=1):(ee=e.cm.options.specialCharPlaceholder(R[0]),ee.setAttribute("cm-text",R[0]),v&&A<9?p.appendChild(D("span",[ee])):p.appendChild(ee),e.col+=1);e.map.push(e.pos,e.pos+1,ee),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var Ye=r||"";n&&(Ye+=n),i&&(Ye+=i);var We=D("span",[p],Ye,o);if(a)for(var nt in a)a.hasOwnProperty(nt)&&nt!="style"&&nt!="class"&&We.setAttribute(nt,a[nt]);return e.content.appendChild(We)}e.content.appendChild(p)}}function Si(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),n+=o,r=o==" "}return n}function si(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,p=u+n.length;;){for(var m=void 0,R=0;R<t.length&&(m=t[R],!(m.to>u&&m.from<=u));R++);if(m.to>=p)return e(r,n,i,o,a,l,s);e(r,n.slice(0,m.to-u),i,o,null,l,s),o=null,n=n.slice(m.to-u),u=m.to}}}function Kr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function xi(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var a=1;a<r.length;a+=2)t.addToken(t,i.slice(o,o=r[a]),Cr(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,p="",m,R,O=0,j,ee,Ee,$e,Ye;;){if(O==s){j=ee=Ee=R="",Ye=null,$e=null,O=1/0;for(var We=[],nt=void 0,wt=0;wt<n.length;++wt){var gt=n[wt],Kt=gt.marker;if(Kt.type=="bookmark"&>.from==s&&Kt.widgetNode)We.push(Kt);else if(gt.from<=s&&(gt.to==null||gt.to>s||Kt.collapsed&>.to==s&>.from==s)){if(gt.to!=null&>.to!=s&&O>gt.to&&(O=gt.to,ee=""),Kt.className&&(j+=" "+Kt.className),Kt.css&&(R=(R?R+";":"")+Kt.css),Kt.startStyle&>.from==s&&(Ee+=" "+Kt.startStyle),Kt.endStyle&>.to==O&&(nt||(nt=[])).push(Kt.endStyle,gt.to),Kt.title&&((Ye||(Ye={})).title=Kt.title),Kt.attributes)for(var Sn in Kt.attributes)(Ye||(Ye={}))[Sn]=Kt.attributes[Sn];Kt.collapsed&&(!$e||gn($e.marker,Kt)<0)&&($e=gt)}else gt.from>s&&O>gt.from&&(O=gt.from)}if(nt)for(var Qn=0;Qn<nt.length;Qn+=2)nt[Qn+1]==O&&(ee+=" "+nt[Qn]);if(!$e||$e.from==s)for(var Dn=0;Dn<We.length;++Dn)Kr(t,0,We[Dn]);if($e&&($e.from||0)==s){if(Kr(t,($e.to==null?l+1:$e.to)-s,$e.marker,$e.from==null),$e.to==null)return;$e.to==s&&($e=!1)}}if(s>=l)break;for(var br=Math.min(l,O);;){if(p){var dr=s+p.length;if(!$e){var Hn=dr>br?p.slice(0,br-s):p;t.addToken(t,Hn,m?m+j:j,Ee,s+Hn.length==O?ee:"",R,Ye)}if(dr>=br){p=p.slice(br-s),s=br;break}s=dr,Ee=""}p=i.slice(o,o=r[u++]),m=Cr(r[u++],t.cm.options)}}}function Ci(e,t,r){this.line=t,this.rest=xr(t),this.size=this.rest?K(et(this.rest))-r+1:1,this.node=this.text=null,this.hidden=An(e,t)}function jr(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new Ci(e.doc,C(e.doc,o),o);i=o+a.size,n.push(a)}return n}var Ar=null;function ui(e){Ar?Ar.ops.push(e):e.ownsGroup=Ar={ops:[e],delayedCallbacks:[]}}function pt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function At(e,t){var r=e.ownsGroup;if(r)try{pt(r)}finally{Ar=null,t(r)}}var Et=null;function ct(e,t){var r=me(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ar?i=Ar.delayedCallbacks:Et?i=Et:(i=Et=[],setTimeout(yn,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function yn(){var e=Et;Et=null;for(var t=0;t<e.length;++t)e[t]()}function bn(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Gn(e,t):o=="gutter"?ci(e,t,r,n):o=="class"?Rr(e,t):o=="widget"&&Zi(e,t,n)}t.changes=null}function ur(e){return e.node==e.text&&(e.node=D("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),v&&A<8&&(e.node.style.zIndex=2)),e.node}function Mr(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ur(t);t.background=n.insertBefore(D("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Nr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Qr(e,t)}function Gn(e,t){var r=t.text.className,n=Nr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Rr(e,t)):r&&(t.text.className=r)}function Rr(e,t){Mr(e,t),t.line.wrapClass?ur(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function ci(e,t,r,n){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=ur(t);t.gutterBackground=D("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.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=ur(t),l=t.gutter=D("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.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(D("div",Ze(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.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,p=o.hasOwnProperty(u)&&o[u];p&&l.appendChild(D("div",[p],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Zi(e,t,r){t.alignable&&(t.alignable=null);for(var n=c("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);zr(e,t,r)}function mo(e,t,r,n){var i=Nr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Rr(e,t),ci(e,t,r,n),zr(e,t,n),t.node}function zr(e,t,r){if(Fr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Fr(e,t.rest[n],t,r,!1)}function Fr(e,t,r,n,i){if(t.widgets)for(var o=ur(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=D("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Zo(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),ct(s,"redraw")}}function Zo(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Lr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!He(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),X(t.display.measure,D("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Br(e,t){for(var r=xn(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Ei(e){return e.lineSpace.offsetTop}function _i(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function yo(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=X(e.measure,D("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Dr(e){return Ve-e.display.nativeBarWidth}function Hr(e){return e.display.scroller.clientWidth-Dr(e)-e.display.barWidth}function Ki(e){return e.display.scroller.clientHeight-Dr(e)-e.display.barHeight}function bo(e,t,r){var n=e.options.lineWrapping,i=n&&Hr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){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-r.top)}}o.push(r.bottom-r.top)}}function ji(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(K(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function _o(e,t){t=Ct(t);var r=K(t),n=e.display.externalMeasured=new Ci(e.doc,t,r);n.lineN=r;var i=n.built=Qr(e,n);return n.text=i.pre,X(e.display.lineMeasure,i.pre),n}function Ui(e,t,r,n){return Tr(e,Jr(e,t),r,n)}function ki(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[hi(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Jr(e,t){var r=K(t),n=ki(e,r);n&&!n.text?n=null:n&&n.changes&&(bn(e,n,r,ko(e)),e.curOp.forceUpdate=!0),n||(n=_o(e,t));var i=ji(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Tr(e,t,r,n,i){t.before&&(r=-1);var o=r+(n||""),a;return t.cache.hasOwnProperty(o)?a=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(bo(e,t.view,t.rect),t.hasHeights=!0),a=qt(e,t,r,n),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 So={left:0,right:0,top:0,bottom:0};function Gi(e,t,r){for(var n,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(n=e[u+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),r=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],a="left";if(r=="right"&&i==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Vi(e,t){var r=So;if(t=="left")for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function qt(e,t,r,n){var i=Gi(t.map,r,n),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var p=0;p<4;p++){for(;a&&q(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&q(t.line.text.charAt(i.coverStart+l));)++l;if(v&&A<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Vi(ke(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}v&&A<11&&(u=_t(e.display.measure,u))}else{a>0&&(s=n="right");var m;e.options.lineWrapping&&(m=o.getClientRects()).length>1?u=m[n=="right"?m.length-1:0]:u=o.getBoundingClientRect()}if(v&&A<9&&!a&&(!u||!u.left&&!u.right)){var R=o.parentNode.getClientRects()[0];R?u={left:R.left,right:R.left+Oi(e.display),top:R.top,bottom:R.bottom}:u=So}for(var O=u.top-t.rect.top,j=u.bottom-t.rect.top,ee=(O+j)/2,Ee=t.view.measure.heights,$e=0;$e<Ee.length-1&&!(ee<Ee[$e]);$e++);var Ye=$e?Ee[$e-1]:0,We=Ee[$e],nt={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:Ye,bottom:We};return!u.left&&!u.right&&(nt.bogus=!0),e.options.singleCursorHeightPerLine||(nt.rtop=O,nt.rbottom=j),nt}function _t(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Jt(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Vn(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 nr(e){e.display.externalMeasure=null,L(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Vn(e.display.view[t])}function On(e){nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function or(){return oe&&J?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function gr(){return oe&&J?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ur(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Lr(e.widgets[r]));return t}function Er(e,t,r,n,i){if(!i){var o=Ur(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Mn(t);if(n=="local"?a+=Ei(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(n=="window"?0:gr());var s=l.left+(n=="window"?0:or());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function kr(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=or(),i-=gr();else if(r=="local"||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Pr(e,t,r,n,i){return n||(n=C(e.doc,t.line)),Er(e,n,Ui(e,n,t.ch,i),r)}function mr(e,t,r,n,i,o){n=n||C(e.doc,t.line),i||(i=Jr(e,n));function a(j,ee){var Ee=Tr(e,i,j,ee?"right":"left",o);return ee?Ee.left=Ee.right:Ee.right=Ee.left,Er(e,n,Ee,r)}var l=ue(n,e.doc.direction),s=t.ch,u=t.sticky;if(s>=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a(u=="before"?s-1:s,u=="before");function p(j,ee,Ee){var $e=l[ee],Ye=$e.level==1;return a(Ee?j-1:j,Ye!=Ee)}var m=le(l,s,u),R=z,O=p(s,m,u=="before");return R!=null&&(O.other=p(s,R,u!="before")),O}function xa(e,t){var r=0;t=te(e.doc,t),e.options.lineWrapping||(r=Oi(e.display)*t.ch);var n=C(e.doc,t.line),i=Mn(n)+Ei(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Ko(e,t,r,n,i){var o=F(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function jo(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return Ko(n.first,0,null,-1,-1);var i=ge(n,r),o=n.first+n.size-1;if(i>o)return Ko(n.first+n.size-1,C(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=C(n,i);;){var l=Zl(e,a,i,t,r),s=_e(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=C(n,i=u.line)}}function Ca(e,t,r,n){n-=Ur(t);var i=t.text.length,o=_(function(a){return Tr(e,r,a-1).bottom<=n},i,0);return i=_(function(a){return Tr(e,r,a).top>n},o,i),{begin:o,end:i}}function Ea(e,t,r,n){r||(r=Jr(e,t));var i=Er(e,t,Tr(e,r,n),"line").top;return Ca(e,t,r,i)}function Uo(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Zl(e,t,r,n,i){i-=Mn(t);var o=Jr(e,t),a=Ur(t),l=0,s=t.text.length,u=!0,p=ue(t,e.doc.direction);if(p){var m=(e.options.lineWrapping?Kl:_l)(e,t,r,o,p,n,i);u=m.level!=1,l=u?m.from:m.to-1,s=u?m.to:m.from-1}var R=null,O=null,j=_(function(wt){var gt=Tr(e,o,wt);return gt.top+=a,gt.bottom+=a,Uo(gt,n,i,!1)?(gt.top<=i&>.left<=n&&(R=wt,O=gt),!0):!1},l,s),ee,Ee,$e=!1;if(O){var Ye=n-O.left<O.right-n,We=Ye==u;j=R+(We?0:1),Ee=We?"after":"before",ee=Ye?O.left:O.right}else{!u&&(j==s||j==l)&&j++,Ee=j==0?"after":j==t.text.length?"before":Tr(e,o,j-(u?1:0)).bottom+a<=i==u?"after":"before";var nt=mr(e,F(r,j,Ee),"line",t,o);ee=nt.left,$e=i<nt.top?-1:i>=nt.bottom?1:0}return j=xe(t.text,j,1),Ko(r,j,Ee,$e,n-ee)}function _l(e,t,r,n,i,o,a){var l=_(function(m){var R=i[m],O=R.level!=1;return Uo(mr(e,F(r,O?R.to:R.from,O?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,p=mr(e,F(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Uo(p,o,a,!0)&&p.top>a&&(s=i[l-1])}return s}function Kl(e,t,r,n,i,o,a){var l=Ca(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var p=null,m=null,R=0;R<i.length;R++){var O=i[R];if(!(O.from>=u||O.to<=s)){var j=O.level!=1,ee=Tr(e,n,j?Math.min(u,O.to)-1:Math.max(s,O.from)).right,Ee=ee<o?o-ee+1e9:ee-o;(!p||m>Ee)&&(p=O,m=Ee)}}return p||(p=i[i.length-1]),p.from<s&&(p={from:s,to:p.to,level:p.level}),p.to>u&&(p={from:p.from,to:u,level:p.level}),p}var fi;function wi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(fi==null){fi=D("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)fi.appendChild(document.createTextNode("x")),fi.appendChild(D("br"));fi.appendChild(document.createTextNode("x"))}X(e.measure,fi);var r=fi.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),L(e.measure),r||1}function Oi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=D("span","xxxxxxxxxx"),r=D("pre",[t],"CodeMirror-line-like");X(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ko(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=o.offsetLeft+o.clientLeft+i,n[l]=o.clientWidth}return{fixedPos:Go(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Go(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function wa(e){var t=wi(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Oi(e.display)-3);return function(i){if(An(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 r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Vo(e){var t=e.doc,r=wa(e);t.iter(function(n){var i=r(n);i!=n.height&&G(n,i)})}function di(e,t,r,n){var i=e.display;if(!r&&xn(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(m){return null}var s=jo(e,o,a),u;if(n&&s.xRel>0&&(u=C(e.doc,s.line).text).length==s.ch){var p=de(u,u.length,e.options.tabSize)-u.length;s=F(s.line,Math.max(0,Math.round((o-yo(e.display).left)/Oi(e.display))-p))}return s}function hi(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function cr(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ft&&_n(e.doc,t)<i.viewTo&&ei(e);else if(r<=i.viewFrom)Ft&&Kn(e.doc,r+n)>i.viewFrom?ei(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)ei(e);else if(t<=i.viewFrom){var o=xo(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):ei(e)}else if(r>=i.viewTo){var a=xo(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):ei(e)}else{var l=xo(e,t,t,-1),s=xo(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(jr(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):ei(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function qr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[hi(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);ie(a,r)==-1&&a.push(r)}}}function ei(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function xo(e,t,r,n){var i=hi(e,t),o,a=e.display.view;if(!Ft||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(n>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,r+=o}for(;_n(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function jl(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=jr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=jr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(hi(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(jr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,hi(e,r)))),n.viewTo=r}function Oa(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function Xi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ia(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(!(!t&&a==r.sel.primIndex)){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Ma(e,l.head,i),s||Ul(e,l,o)}}return n}function Ma(e,t,r){var n=mr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(D("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(D("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Co(e,t){return e.top-t.top||e.left-t.left}function Ul(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=yo(e.display),l=a.left,s=Math.max(n.sizerWidth,Hr(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function p(We,nt,wt,gt){nt<0&&(nt=0),nt=Math.round(nt),gt=Math.round(gt),o.appendChild(D("div",null,"CodeMirror-selected","position: absolute; left: "+We+`px;
|
|
|
top: `+nt+"px; width: "+(wt==null?s-We:wt)+`px;
|
|
|
height: `+(gt-nt)+"px"))}function m(We,nt,wt){var gt=C(i,We),Kt=gt.text.length,Sn,Qn;function Dn(Hn,hr){return Pr(e,F(We,Hn),"div",gt,hr)}function br(Hn,hr,er){var jn=Ea(e,gt,null,Hn),Zn=hr=="ltr"==(er=="after")?"left":"right",Tn=er=="after"?jn.begin:jn.end-(/\s/.test(gt.text.charAt(jn.end-1))?2:1);return Dn(Tn,Zn)[Zn]}var dr=ue(gt,i.direction);return Fe(dr,nt||0,wt==null?Kt:wt,function(Hn,hr,er,jn){var Zn=er=="ltr",Tn=Dn(Hn,Zn?"left":"right"),vr=Dn(hr-1,Zn?"right":"left"),Wi=nt==null&&Hn==0,ai=wt==null&&hr==Kt,ir=jn==0,Zr=!dr||jn==dr.length-1;if(vr.top-Tn.top<=3){var Jn=(u?Wi:ai)&&ir,ba=(u?ai:Wi)&&Zr,Vr=Jn?l:(Zn?Tn:vr).left,yi=ba?s:(Zn?vr:Tn).right;p(Vr,Tn.top,yi-Vr,Tn.bottom)}else{var bi,lr,zi,Sa;Zn?(bi=u&&Wi&&ir?l:Tn.left,lr=u?s:br(Hn,er,"before"),zi=u?l:br(hr,er,"after"),Sa=u&&ai&&Zr?s:vr.right):(bi=u?br(Hn,er,"before"):l,lr=!u&&Wi&&ir?s:Tn.right,zi=!u&&ai&&Zr?l:vr.left,Sa=u?br(hr,er,"after"):s),p(bi,Tn.top,lr-bi,Tn.bottom),Tn.bottom<vr.top&&p(l,Tn.bottom,null,vr.top),p(zi,vr.top,Sa-zi,vr.bottom)}(!Sn||Co(Tn,Sn)<0)&&(Sn=Tn),Co(vr,Sn)<0&&(Sn=vr),(!Qn||Co(Tn,Qn)<0)&&(Qn=Tn),Co(vr,Qn)<0&&(Qn=vr)}),{start:Sn,end:Qn}}var R=t.from(),O=t.to();if(R.line==O.line)m(R.line,R.ch,O.ch);else{var j=C(i,R.line),ee=C(i,O.line),Ee=Ct(j)==Ct(ee),$e=m(R.line,R.ch,Ee?j.text.length+1:null).end,Ye=m(O.line,Ee?0:null,O.ch).start;Ee&&($e.top<Ye.top-2?(p($e.right,$e.top,null,$e.bottom),p(l,Ye.top,Ye.left,Ye.bottom)):p($e.right,$e.top,Ye.left-$e.right,$e.bottom)),$e.bottom<Ye.top&&p(l,$e.bottom,null,Ye.top)}r.appendChild(o)}function Xo(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ii(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ra(e){e.state.focused||(e.display.input.focus(),Yo(e))}function Fa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ii(e))},100)}function Yo(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(tt(e,"focus",e,t),e.state.focused=!0,mt(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),N&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xo(e))}function Ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(tt(e,"blur",e,t),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Eo(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(v&&A<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-r,r=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 p=i.line.height-a;if((p>.005||p<-.005)&&(G(i.line,a),La(i.line),i.rest))for(var m=0;m<i.rest.length;m++)La(i.rest[m]);if(l>e.display.sizerWidth){var R=Math.ceil(l/Oi(e.display));R>e.display.maxLineLength&&(e.display.maxLineLength=R,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function La(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function wo(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ei(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=ge(t,n),a=ge(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=ge(t,Mn(C(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=ge(t,Mn(C(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function kl(e,t){if(!it(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!ye){var o=D("div","\u200B",null,`position: absolute;
|
|
|
top: `+(t.top-r.viewOffset-Ei(e.display))+`px;
|
|
|
height: `+(t.bottom-t.top+Dr(e)+r.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 Gl(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?F(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?F(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=mr(e,t),s=!r||r==t?l:mr(e,r);i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n};var u=Qo(e,i),p=e.doc.scrollTop,m=e.doc.scrollLeft;if(u.scrollTop!=null&&(Qi(e,u.scrollTop),Math.abs(e.doc.scrollTop-p)>1&&(a=!0)),u.scrollLeft!=null&&(vi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-m)>1&&(a=!0)),!a)break}return i}function Vl(e,t){var r=Qo(e,t);r.scrollTop!=null&&Qi(e,r.scrollTop),r.scrollLeft!=null&&vi(e,r.scrollLeft)}function Qo(e,t){var r=e.display,n=wi(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=Ki(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+_i(r),s=t.top<n,u=t.bottom>l-n;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var p=Math.min(t.top,(u?l:t.bottom)-o);p!=i&&(a.scrollTop=p)}var m=e.options.fixedGutter?0:r.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-m,O=Hr(e)-r.gutters.offsetWidth,j=t.right-t.left>O;return j&&(t.right=t.left+O),t.left<10?a.scrollLeft=0:t.left<R?a.scrollLeft=Math.max(0,t.left+m-(j?0:10)):t.right>O+R-3&&(a.scrollLeft=t.right+(j?0:10)-O),a}function Jo(e,t){t!=null&&(Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mi(e){Oo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yi(e,t,r){(t!=null||r!=null)&&Oo(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Xl(e,t){Oo(e),e.curOp.scrollToPos=t}function Oo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=xa(e,t.from),n=xa(e,t.to);Da(e,r,n,t.margin)}}function Da(e,t,r,n){var i=Qo(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yi(e,i.scrollLeft,i.scrollTop)}function Qi(e,t){Math.abs(e.doc.scrollTop-t)<2||(P||ea(e,{top:t}),Ta(e,t,!0),P&&ea(e),eo(e,100))}function Ta(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function vi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,$a(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ji(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+_i(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?r:0,docHeight:n,scrollHeight:n+Dr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var pi=function(e,t,r){this.cm=r;var n=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),U(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),U(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,v&&A<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},pi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pi.prototype.zeroWidthHack=function(){var e=ot&&!H?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ae,this.disableVert=new ae},pi.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),o=r=="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,n)}t.set(1e3,n)},pi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qi=function(){};qi.prototype.update=function(){return{bottom:0,right:0}},qi.prototype.setScrollLeft=function(){},qi.prototype.setScrollTop=function(){},qi.prototype.clear=function(){};function Ri(e,t){t||(t=Ji(e));var r=e.display.barWidth,n=e.display.barHeight;Pa(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Eo(e),Pa(e,Ji(e)),r=e.display.barWidth,n=e.display.barHeight}function Pa(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Aa={native:pi,null:qi};function Na(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Aa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),U(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?vi(e,t):Qi(e,t)},e),e.display.scrollbars.addClass&&mt(e.display.wrapper,e.display.scrollbars.addClass)}var Yl=0;function gi(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:++Yl},ui(e.curOp)}function mi(e){var t=e.curOp;t&&At(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Ql(r)})}function Ql(e){for(var t=e.ops,r=0;r<t.length;r++)Jl(t[r]);for(var n=0;n<t.length;n++)ql(t[n]);for(var i=0;i<t.length;i++)es(t[i]);for(var o=0;o<t.length;o++)ts(t[o]);for(var a=0;a<t.length;a++)ns(t[a])}function Jl(e){var t=e.cm,r=t.display;is(t),e.updateMaxLine&&qn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ql(e){e.updatedDisplay=e.mustUpdate&&qo(e.cm,e.update)}function es(e){var t=e.cm,r=t.display;e.updatedDisplay&&Eo(t),e.barMeasure=Ji(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ui(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Dr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Hr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function ts(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&vi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==Oe();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ri(t,e.barMeasure),e.updatedDisplay&&na(t,e.barMeasure),e.selectionChanged&&Xo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Ra(e.cm)}function ns(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&Ba(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Ta(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&vi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Gl(t,te(n,e.scrollToPos.from),te(n,e.scrollToPos.to),e.scrollToPos.margin);kl(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||tt(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&tt(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&tt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function yr(e,t){if(e.curOp)return t();gi(e);try{return t()}finally{mi(e)}}function Xn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);gi(e);try{return t.apply(e,arguments)}finally{mi(e)}}}function ar(e){return function(){if(this.curOp)return e.apply(this,arguments);gi(this);try{return e.apply(this,arguments)}finally{mi(this)}}}function Yn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);gi(t);try{return e.apply(this,arguments)}finally{mi(t)}}}function eo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,fe(rs,e))}function rs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Tt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?B(t.mode,n.state):null,s=ft(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,p=s.classes;p?o.styleClasses=p:u&&(o.styleClasses=null);for(var m=!a||a.length!=o.styles.length||u!=p&&(!u||!p||u.bgClass!=p.bgClass||u.textClass!=p.textClass),R=0;!m&&R<a.length;++R)m=a[R]!=o.styles[R];m&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&$t(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return eo(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&yr(e,function(){for(var o=0;o<i.length;o++)qr(e,i[o],"text")})}}var Io=function(e,t,r){var n=e.display;this.viewport=t,this.visible=wo(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Hr(e),this.force=r,this.dims=ko(e),this.events=[]};Io.prototype.signal=function(e,t){Ce(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)tt.apply(null,this.events[e])};function is(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Dr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Dr(e)+"px",t.scrollbarsClipped=!0)}function os(e){if(e.hasFocus())return null;var t=Oe();if(!t||!He(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&He(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function as(e){if(!(!e||!e.activeElt||e.activeElt==Oe())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&He(document.body,e.anchorNode)&&He(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function qo(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return ei(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&Oa(e)==0)return!1;Wa(e)&&(ei(e),t.dims=ko(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Ft&&(o=_n(e.doc,o),a=Kn(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jl(e,o,a),r.viewOffset=Mn(C(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Oa(e);if(!l&&s==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=os(e);return s>4&&(r.lineDiv.style.display="none"),ls(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,as(u),L(r.cursorDiv),L(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,eo(e,400)),r.updateLineNumbers=null,!0}function Ba(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Hr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+_i(e.display)-Ki(e),r.top)}),t.visible=wo(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=wo(e.display,e.doc,r));if(!qo(e,t))break;Eo(e);var i=Ji(e);Xi(e),Ri(e,i),na(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 ea(e,t){var r=new Io(e,t);if(qo(e,r)){Eo(e),Ba(e,r);var n=Ji(e);Xi(e),Ri(e,n),na(e,n),r.finish()}}function ls(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function l(j){var ee=j.nextSibling;return N&&ot&&e.display.currentWheelTarget==j?j.style.display="none":j.parentNode.removeChild(j),ee}for(var s=n.view,u=n.viewFrom,p=0;p<s.length;p++){var m=s[p];if(!m.hidden)if(!m.node||m.node.parentNode!=o){var R=mo(e,m,u,r);o.insertBefore(R,a)}else{for(;a!=m.node;)a=l(a);var O=i&&t!=null&&t<=u&&m.lineNumber;m.changes&&(ie(m.changes,"gutter")>-1&&(O=!1),bn(e,m,u,r)),O&&(L(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(Ze(e.options,u)))),a=m.node.nextSibling}u+=m.size}for(;a;)a=l(a)}function ta(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function na(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+Dr(e)+"px"}function $a(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=Go(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Wa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Ze(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(D("div",[D("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ta(e.display),!0}return!1}function ra(e,t){for(var r=[],n=!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)n=!0;else continue;r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function za(e){var t=e.gutters,r=e.gutterSpecs;L(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,l=t.appendChild(D("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=r.length?"":"none",ta(e)}function to(e){za(e.display),cr(e),$a(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=D("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=D("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=we("div",null,"CodeMirror-code"),i.selectionDiv=D("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=D("div",null,"CodeMirror-cursors"),i.measure=D("div",null,"CodeMirror-measure"),i.lineMeasure=D("div",null,"CodeMirror-measure"),i.lineSpace=we("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=we("div",[i.lineSpace],"CodeMirror-lines");i.mover=D("div",[o],null,"position: relative"),i.sizer=D("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=D("div",null,null,"position: absolute; height: "+Ve+"px; width: 1px;"),i.gutters=D("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=D("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=D("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),v&&A<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!N&&!(P&&qe)&&(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=ra(n.gutters,n.lineNumbers),za(i),r.init(i)}var Mo=0,wr=null;v?wr=-.53:P?wr=15:oe?wr=-.7:Me&&(wr=-1/3);function Ha(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function us(e){var t=Ha(e);return t.x*=wr,t.y*=wr,t}function Za(e,t){var r=Ha(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&ot&&N){e:for(var u=t.target,p=o.view;u!=a;u=u.parentNode)for(var m=0;m<p.length;m++)if(p[m].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!P&&!y&&wr!=null){i&&s&&Qi(e,Math.max(0,a.scrollTop+i*wr)),vi(e,Math.max(0,a.scrollLeft+n*wr)),(!i||i&&s)&<(t),o.wheelStartX=null;return}if(i&&wr!=null){var R=i*wr,O=e.doc.scrollTop,j=O+o.wrapper.clientHeight;R<0?O=Math.max(0,O+R-50):j=Math.min(e.doc.height,j+R+50),ea(e,{top:O,bottom:j})}Mo<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(o.wheelStartX!=null){var ee=a.scrollLeft-o.wheelStartX,Ee=a.scrollTop-o.wheelStartY,$e=Ee&&o.wheelDY&&Ee/o.wheelDY||ee&&o.wheelDX&&ee/o.wheelDX;o.wheelStartX=o.wheelStartY=null,$e&&(wr=(wr*Mo+$e)/(Mo+1),++Mo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Or=function(e,t){this.ranges=e,this.primIndex=t};Or.prototype.primary=function(){return this.ranges[this.primIndex]},Or.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 r=this.ranges[t],n=e.ranges[t];if(!Ue(r.anchor,n.anchor)||!Ue(r.head,n.head))return!1}return!0},Or.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new cn(Se(this.ranges[t].anchor),Se(this.ranges[t].head));return new Or(e,this.primIndex)},Or.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Or.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(V(t,n.from())>=0&&V(e,n.to())<=0)return r}return-1};var cn=function(e,t){this.anchor=e,this.head=t};cn.prototype.from=function(){return Ne(this.anchor,this.head)},cn.prototype.to=function(){return Ke(this.anchor,this.head)},cn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function $r(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(R,O){return V(R.from(),O.from())}),r=ie(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=V(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=Ne(l.from(),a.from()),p=Ke(l.to(),a.to()),m=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new cn(m?p:u,m?u:p))}}return new Or(t,r)}function ti(e,t){return new Or([new cn(e,t||e)],0)}function ni(e){return e.text?F(e.from.line+e.text.length-1,et(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function _a(e,t){if(V(e,t.from)<0)return e;if(V(e,t.to)<=0)return ni(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ni(t).ch-t.to.ch),F(r,n)}function ia(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new cn(_a(i.anchor,t),_a(i.head,t)))}return $r(e.cm,r,e.sel.primIndex)}function Ka(e,t,r){return e.line==t.line?F(r.line,e.ch-t.ch+r.ch):F(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=F(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ka(l.from,i,o),u=Ka(ni(l),i,o);if(i=l.to,o=u,r=="around"){var p=e.sel.ranges[a],m=V(p.head,p.anchor)<0;n[a]=new cn(m?u:s,m?s:u)}else n[a]=new cn(s,s)}return new Or(n,e.sel.primIndex)}function oa(e){e.doc.mode=st(e.options,e.doc.modeOption),no(e)}function no(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,eo(e,100),e.state.modeGen++,e.curOp&&cr(e)}function ja(e,t){return t.from.ch==0&&t.to.ch==0&&et(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function aa(e,t,r,n){function i(Ye){return r?r[Ye]:null}function o(Ye,We,nt){_r(Ye,We,nt,n),ct(Ye,"change",Ye,t)}function a(Ye,We){for(var nt=[],wt=Ye;wt<We;++wt)nt.push(new tr(u[wt],i(wt),n));return nt}var l=t.from,s=t.to,u=t.text,p=C(e,l.line),m=C(e,s.line),R=et(u),O=i(u.length-1),j=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(ja(e,t)){var ee=a(0,u.length-1);o(m,m.text,O),j&&e.remove(l.line,j),ee.length&&e.insert(l.line,ee)}else if(p==m)if(u.length==1)o(p,p.text.slice(0,l.ch)+R+p.text.slice(s.ch),O);else{var Ee=a(1,u.length-1);Ee.push(new tr(R+p.text.slice(s.ch),O,n)),o(p,p.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,Ee)}else if(u.length==1)o(p,p.text.slice(0,l.ch)+u[0]+m.text.slice(s.ch),i(0)),e.remove(l.line+1,j);else{o(p,p.text.slice(0,l.ch)+u[0],i(0)),o(m,R+m.text.slice(s.ch),O);var $e=a(1,u.length-1);j>1&&e.remove(l.line+1,j-1),e.insert(l.line+1,$e)}ct(e,"change",e,t)}function ri(e,t,r){function n(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;r&&!u||(t(s.doc,u),n(s.doc,i,u))}}}n(e,null,!0)}function Ua(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Vo(e),oa(e),ka(e),e.options.lineWrapping||qn(e),e.options.mode=t.modeOption,cr(e)}function ka(e){(e.doc.direction=="rtl"?mt:b)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){yr(e,function(){ka(e),cr(e)})}function Ro(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 la(e,t){var r={from:Se(t.from),to:ni(t),text:T(e,t.from,t.to)};return Xa(e,r,t.from.line,t.to.line+1),ri(e,function(n){return Xa(n,r,t.from.line,t.to.line+1)},!0),r}function Ga(e){for(;e.length;){var t=et(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return Ga(e.done),et(e.done);if(e.done.length&&!et(e.done).ranges)return et(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),et(e.done)}function Va(e,t,r,n){var i=e.history;i.undone.length=0;var o=+new Date,a,l;if((i.lastOp==n||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==n)))l=et(a.changes),V(t.from,t.to)==0&&V(t.from,l.to)==0?l.to=ni(t):a.changes.push(la(e,t));else{var s=et(i.done);for((!s||!s.ranges)&&Fo(e.sel,i.done),a={changes:[la(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||tt(e,"historyAdded")}function hs(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vs(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||hs(e,o,et(i.done),t))?i.done[i.done.length-1]=t:Fo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Ga(i.undone)}function Fo(e,t){var r=et(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Xa(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function ps(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function gs(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ps(r[i]));return n}function Ya(e,t){var r=gs(e,t),n=dt(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[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&&(r[i]=a)}return r}function Fi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?Or.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],p=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var m in u)(p=m.match(/^spans_(\d+)$/))&&ie(t,Number(p[1]))>-1&&(et(l)[m]=u[m],delete u[m])}}return n}function sa(e,t,r,n){if(n){var i=e.anchor;if(r){var o=V(t,i)<0;o!=V(r,i)<0?(i=t,t=r):o!=V(t,r)<0&&(t=r)}return new cn(i,t)}else return new cn(r||t,t)}function Lo(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),rr(e,new Or([sa(e.sel.primary(),t,r,i)],0),n)}function Qa(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=sa(e.sel.ranges[o],t[o],null,i);var a=$r(e.cm,n,e.sel.primIndex);rr(e,a,r)}function ua(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,rr(e,$r(e.cm,i,e.sel.primIndex),n)}function Ja(e,t,r,n){rr(e,ti(t,r),n)}function ms(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new cn(te(e,i[o].anchor),te(e,i[o].head))},origin:r&&r.origin};return tt(e,"beforeSelectionChange",e,n),e.cm&&tt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?$r(e.cm,n.ranges,n.ranges.length-1):t}function qa(e,t,r){var n=e.history.done,i=et(n);i&&i.ranges?(n[n.length-1]=t,Do(e,t,r)):rr(e,t,r)}function rr(e,t,r){Do(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Do(e,t,r){(Ce(e,"beforeSelectionChange")||e.cm&&Ce(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(V(t.primary().head,e.sel.primary().head)<0?-1:1);el(e,nl(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Mi(e.cm)}function el(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,je(e.cm)),ct(e,"cursorActivity",e))}function tl(e){el(e,nl(e,e.sel,null,!1))}function nl(e,t,r,n){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=To(e,a.anchor,l&&l.anchor,r,n),u=To(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new cn(s,u))}return i?$r(e.cm,i,t.primIndex):t}function Li(e,t,r,n,i){var o=C(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,p="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(p?l.to>=t.ch:l.to>t.ch))){if(i&&(tt(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var m=s.find(n<0?1:-1),R=void 0;if((n<0?p:u)&&(m=rl(e,m,-n,m&&m.line==t.line?o:null)),m&&m.line==t.line&&(R=V(m,r))&&(n<0?R<0:R>0))return Li(e,m,t,n,i)}var O=s.find(n<0?-1:1);return(n<0?u:p)&&(O=rl(e,O,n,O.line==t.line?o:null)),O?Li(e,O,t,n,i):null}}return t}function To(e,t,r,n,i){var o=n||1,a=Li(e,t,r,o,i)||!i&&Li(e,t,r,o,!0)||Li(e,t,r,-o,i)||!i&&Li(e,t,r,-o,!0);return a||(e.cantEdit=!0,F(e.first,0))}function rl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?te(e,F(t.line-1)):null:r>0&&t.ch==(n||C(e,t.line)).text.length?t.line<e.first+e.size-1?F(t.line+1,0):null:new F(t.line,t.ch+r)}function il(e){e.setSelection(F(e.firstLine(),0),F(e.lastLine()),he)}function ol(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,o,a,l){i&&(n.from=te(e,i)),o&&(n.to=te(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),tt(e,"beforeChange",e,n),e.cm&&tt(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Di(e,t,r){if(e.cm){if(!e.cm.curOp)return Xn(e.cm,Di)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((Ce(e,"beforeChange")||e.cm&&Ce(e.cm,"beforeChange"))&&(t=ol(e,t,!0),!t))){var n=zt&&!r&&tn(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)al(e,{from:n[i].from,to:n[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]==""&&V(t.from,t.to)==0)){var r=ia(e,t);Va(e,t,r,e.cm?e.cm.curOp.id:NaN),ro(e,t,r,dt(e,t));var n=[];ri(e,function(i,o){!o&&ie(n,i.history)==-1&&(cl(i.history,t),n.push(i.history)),ro(i,t,null,dt(i,t))})}}function Po(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!r)){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],!(r?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(Fo(o,s),r&&!o.equals(e.sel)){rr(e,o,{clearRedo:!1});return}a=o}else if(n){l.push(o);return}else break;var p=[];Fo(a,s),s.push({changes:p,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var m=Ce(e,"beforeChange")||e.cm&&Ce(e.cm,"beforeChange"),R=function(ee){var Ee=o.changes[ee];if(Ee.origin=t,m&&!ol(e,Ee,!1))return l.length=0,{};p.push(la(e,Ee));var $e=ee?ia(e,Ee):et(l);ro(e,Ee,$e,Ya(e,Ee)),!ee&&e.cm&&e.cm.scrollIntoView({from:Ee.from,to:ni(Ee)});var Ye=[];ri(e,function(We,nt){!nt&&ie(Ye,We.history)==-1&&(cl(We.history,Ee),Ye.push(We.history)),ro(We,Ee,null,Ya(We,Ee))})},O=o.changes.length-1;O>=0;--O){var j=R(O);if(j)return j.v}}}}function ll(e,t){if(t!=0&&(e.first+=t,e.sel=new Or(Mt(e.sel.ranges,function(i){return new cn(F(i.anchor.line+t,i.anchor.ch),F(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){cr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)qr(e.cm,n,"gutter")}}function ro(e,t,r,n){if(e.cm&&!e.cm.curOp)return Xn(e.cm,ro)(e,t,r,n);if(t.to.line<e.first){ll(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);ll(e,i),t={from:F(e.first,0),to:F(t.to.line+i,t.to.ch),text:[et(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:F(o,C(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=T(e,t.from,t.to),r||(r=ia(e,t)),e.cm?ys(e.cm,t,n):aa(e,t,n),Do(e,r,he),e.cantEdit&&To(e,F(e.firstLine(),0))&&(e.cantEdit=!1)}}function ys(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=K(Ct(C(n,o.line))),n.iter(s,a.line+1,function(O){if(O==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&je(e),aa(n,t,r,wa(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(O){var j=sr(O);j>i.maxLineLength&&(i.maxLine=O,i.maxLineLength=j,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Ot(n,o.line),eo(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?cr(e):o.line==a.line&&t.text.length==1&&!ja(e.doc,t)?qr(e,o.line,"text"):cr(e,o.line,a.line+1,u);var p=Ce(e,"changes"),m=Ce(e,"change");if(m||p){var R={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};m&&ct(e,"change",e,R),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function Ti(e,t,r,n,i){var o;n||(n=r),V(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Di(e,{from:r,to:n,text:t,origin:i})}function sl(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ul(e,t,r,n){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++)sl(o.ranges[l].anchor,t,r,n),sl(o.ranges[l].head,t,r,n);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(r<u.from.line)u.from=F(u.from.line+n,u.from.ch),u.to=F(u.to.line+n,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function cl(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ul(e.done,r,n,i),ul(e.undone,r,n,i)}function io(e,t,r,n){var i=t,o=t;return typeof t=="number"?o=C(e,ht(e,t)):i=K(t),i==null?null:(n(o,i)&&e.cm&&qr(e.cm,i,r),o)}function oo(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}oo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Xr(i),ct(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function ao(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}ao.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof oo))){var l=[];this.collapse(l),this.children=[new oo(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,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new oo(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,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),r=new ao(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=ie(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ao(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if((t-=a)==0)break;e=0}else e-=o}}};var lo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};lo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=K(r);if(!(n==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Lr(this);G(r,Math.max(0,r.height-o)),e&&(yr(e,function(){fl(e,r,-o),qr(e,n,"widget")}),ct(e,"lineWidgetCleared",e,this,n))}},lo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Lr(this)-t;i&&(An(this.doc,n)||G(n,n.height+i),r&&yr(r,function(){r.curOp.forceUpdate=!0,fl(r,n,i),ct(r,"lineWidgetChanged",r,e,K(n))}))},rt(lo);function fl(e,t,r){Mn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Jo(e,r)}function bs(e,t,r,n){var i=new lo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),io(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&&!An(e,a)){var s=Mn(a)<e.scrollTop;G(a,a.height+Lr(i)),s&&Jo(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&ct(o,"lineWidgetAdded",o,i,typeof t=="number"?t:K(t)),i}var dl=0,ii=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++dl};ii.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&gi(e),Ce(this,"clear")){var r=this.find();r&&ct(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=an(a.markedSpans,this);e&&!this.collapsed?qr(e,K(a),"text"):e&&(l.to!=null&&(i=K(a)),l.from!=null&&(n=K(a))),a.markedSpans=Vt(a.markedSpans,l),l.from==null&&this.collapsed&&!An(this.doc,a)&&e&&G(a,wi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=Ct(this.lines[s]),p=sr(u);p>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=p,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&cr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&tl(e.doc)),e&&ct(e,"markerCleared",e,this,n,i),t&&mi(e),this.parent&&this.parent.clear()}},ii.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=an(o.markedSpans,this);if(a.from!=null&&(r=F(t?o:K(o),a.from),e==-1))return r;if(a.to!=null&&(n=F(t?o:K(o),a.to),e==1))return n}return r&&{from:r,to:n}},ii.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||yr(n,function(){var i=t.line,o=K(t.line),a=ki(n,o);if(a&&(Vn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!An(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=Lr(r)-l;s&&G(i,i.height+s)}ct(n,"markerChanged",n,e)})},ii.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ie(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ii.prototype.detachLine=function(e){if(this.lines.splice(ie(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},rt(ii);function Pi(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Xn(e.cm,Pi)(e,t,r,n,i);var o=new ii(e,i),a=V(t,r);if(n&&Y(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=we("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(yt(e,t.line,t,r,o)||t.line!=r.line&&yt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nt()}o.addToHistory&&Va(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,u;if(e.iter(l,r.line+1,function(m){s&&o.collapsed&&!s.options.lineWrapping&&Ct(m)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&G(m,0),wn(m,new Zt(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(m){An(e,m)&&G(m,0)}),o.clearOnEnter&&U(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(fn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++dl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)cr(s,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var p=t.line;p<=r.line;p++)qr(s,p,"text");o.atomic&&tl(s.doc),ct(s,"markerAdded",s,o)}return o}var so=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};so.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ct(this,"clear")}},so.prototype.find=function(e,t){return this.primary.find(e,t)},rt(so);function Ss(e,t,r,n,i){n=Y(n),n.shared=!1;var o=[Pi(e,t,r,n,i)],a=o[0],l=n.widgetNode;return ri(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Pi(s,te(s,t),te(s,r),n,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=et(o)}),new so(o,a)}function hl(e){return e.findMarks(F(e.first,0),e.clipPos(F(e.lastLine())),function(t){return t.parent})}function xs(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(V(o,a)){var l=Pi(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Cs(e){for(var t=function(n){var i=e[n],o=[i.primary.doc];ri(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];ie(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var Es=0,fr=function(e,t,r,n,i){if(!(this instanceof fr))return new fr(e,t,r,n,i);r==null&&(r=0),ao.call(this,[new oo([new tr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=F(r,0);this.sel=ti(o),this.history=new Ro(null),this.id=++Es,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),aa(this,{from:o,to:o,text:e}),rr(this,ti(o),he)};fr.prototype=Le(ao.prototype,{constructor:fr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ne(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=F(this.first,0),r=this.first+this.size-1;Di(this,{from:t,to:F(r,C(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yi(this.cm,0,0),rr(this,ti(t),he)}),replaceRange:function(e,t,r,n){t=te(this,t),r=r?te(this,r):t,Ti(this,e,t,r,n)},getRange:function(e,t,r){var n=T(this,te(this,e),te(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ce(this,e))return C(this,e)},getLineNumber:function(e){return K(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=C(this,e)),Ct(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return te(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yn(function(e,t,r){Ja(this,te(this,typeof e=="number"?F(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ja(this,te(this,e),te(this,t||e),r)}),extendSelection:Yn(function(e,t,r){Lo(this,te(this,e),t&&te(this,t),r)}),extendSelections:Yn(function(e,t){Qa(this,Be(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=Mt(this.sel.ranges,e);Qa(this,Be(this,r),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new cn(te(this,e[i].anchor),te(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),rr(this,$r(this.cm,n,t),r)}}),addSelection:Yn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new cn(te(this,e),te(this,t||e))),rr(this,$r(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=T(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=T(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Yn(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&t!="end"&&cs(this,n,t),s=n.length-1;s>=0;s--)Di(this,n[s]);l?qa(this,l):this.cm&&Mi(this.cm)}),undo:Yn(function(){Po(this,"undo")}),redo:Yn(function(){Po(this,"redo")}),undoSelection:Yn(function(){Po(this,"undo",!0)}),redoSelection:Yn(function(){Po(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ro(this.history.maxGeneration),ri(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:Fi(this.history.done),undone:Fi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history.maxGeneration);t.done=Fi(e.done.slice(0),null,!0),t.undone=Fi(e.undone.slice(0),null,!0)},setGutterMarker:Yn(function(e,t,r){return io(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&M(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Yn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&io(t,r,"gutter",function(){return r.gutterMarkers[e]=null,M(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!ce(this,e)||(t=e,e=C(this,e),!e))return null}else if(t=K(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:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(c(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=n[i];if(o)if(r==null)n[i]=null;else{var a=o.match(c(r));if(!a)return!1;var l=a.index+a[0].length;n[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:Yn(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Pi(this,te(this,e),te(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=te(this,e),Pi(this,e,e,r,"bookmark")},findMarksAt:function(e){e=te(this,e);var t=[],r=C(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(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,r){e=te(this,e),t=te(this,t);var n=[],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)&&(!r||r(s.marker))&&n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),te(this,F(r,t))},indexFromPos:function(e){e=te(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new fr(ne(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,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new fr(ne(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],xs(n,hl(this)),n},unlinkDoc:function(e){if(e instanceof Rn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Cs(hl(this));break}}if(e.history==this.history){var n=[e.id];ri(e,function(i){return n.push(i.id)},!0),e.history=new Ro(null),e.history.done=Fi(this.history.done,n),e.history.undone=Fi(this.history.undone,n)}},iterLinkedDocs:function(e){ri(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):In(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Yn(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fs(this.cm))})}),fr.prototype.eachLine=fr.prototype.iter;var vl=0;function ws(e){var t=this;if(pl(t),!(it(t,e)||Br(t.display,e))){lt(e),v&&(vl=+new Date);var r=di(t,e,!0),n=e.dataTransfer.files;if(!(!r||t.isReadOnly()))if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(){++a==i&&Xn(t,function(){r=te(t.doc,r);var O={from:r,to:r,text:t.doc.splitLines(o.filter(function(j){return j!=null}).join(t.doc.lineSeparator())),origin:"paste"};Di(t.doc,O),qa(t.doc,ti(te(t.doc,r),te(t.doc,ni(O))))})()},s=function(O,j){if(t.options.allowDropFileTypes&&ie(t.options.allowDropFileTypes,O.type)==-1){l();return}var ee=new FileReader;ee.onerror=function(){return l()},ee.onload=function(){var Ee=ee.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ee)){l();return}o[j]=Ee,l()},ee.readAsText(O)},u=0;u<n.length;u++)s(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var p=e.dataTransfer.getData("Text");if(p){var m;if(t.state.draggingText&&!t.state.draggingText.copy&&(m=t.listSelections()),Do(t.doc,ti(r,r)),m)for(var R=0;R<m.length;++R)Ti(t.doc,"",m[R].anchor,m[R].head,"drag");t.replaceSelection(p,"around","paste"),t.display.input.focus()}}catch(O){}}}}function Os(e,t){if(v&&(!e.state.draggingText||+new Date-vl<100)){sn(t);return}if(!(it(e,t)||Br(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Me)){var r=D("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",y&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),y&&r.parentNode.removeChild(r)}}function Is(e,t){var r=di(e,t);if(r){var n=document.createDocumentFragment();Ma(e,r,n),e.display.dragCursor||(e.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),X(e.display.dragCursor,n)}}function pl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function gl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var o=0;o<r.length;o++)e(r[o])})}}var ml=!1;function Ms(){ml||(Rs(),ml=!0)}function Rs(){var e;U(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gl(Fs)},100))}),U(window,"blur",function(){return gl(Ii)})}function Fs(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var oi={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"},uo=0;uo<10;uo++)oi[uo+48]=oi[uo+96]=String(uo);for(var Ao=65;Ao<=90;Ao++)oi[Ao]=String.fromCharCode(Ao);for(var co=1;co<=12;co++)oi[co+111]=oi[co+63235]="F"+co;var Gr={};Gr.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"},Gr.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"},Gr.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"},Gr.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"]},Gr.default=ot?Gr.macDefault:Gr.pcDefault;function Ls(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,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))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Ds(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=Mt(r.split(" "),Ls),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(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[r]}for(var u in t)e[u]=t[u];return e}function Ai(e,t,r,n){t=No(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ai(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Ai(e,t.fallthrough[o],r,n);if(a)return a}}}function yl(e){var t=typeof e=="string"?e:oi[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function bl(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Q?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Q?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Sl(e,t){if(y&&e.keyCode==34&&e.char)return!1;var r=oi[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),bl(r,e,t))}function No(e){return typeof e=="string"?Gr[e]:e}function Ni(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&V(o.from,et(n).to)<=0;){var a=n.pop();if(V(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}yr(e,function(){for(var l=n.length-1;l>=0;l--)Ti(e.doc,"",n[l].from,n[l].to,"+delete");Mi(e)})}function ca(e,t,r){var n=xe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function fa(e,t,r){var n=ca(e,t.ch,r);return n==null?null:new F(t.line,n,r<0?"after":"before")}function da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=ue(r,t.doc.direction);if(o){var a=i<0?et(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var p=Jr(t,r);u=i<0?r.text.length-1:0;var m=Tr(t,p,u).top;u=_(function(R){return Tr(t,p,R).top==m},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=ca(r,u,1))}else u=i<0?a.to:a.from;return new F(n,u,s)}}return new F(n,i<0?r.text.length:0,i<0?"before":"after")}function Ts(e,t,r,n){var i=ue(t,e.doc.direction);if(!i)return fa(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=le(i,r.ch,r.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return fa(t,r,n);var l=function($e,Ye){return ca(t,$e instanceof F?$e.ch:$e,Ye)},s,u=function($e){return e.options.lineWrapping?(s=s||Jr(e,t),Ea(e,t,s,$e)):{begin:0,end:t.text.length}},p=u(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var m=a.level==1==n<0,R=l(r,m?1:-1);if(R!=null&&(m?R<=a.to&&R<=p.end:R>=a.from&&R>=p.begin)){var O=m?"before":"after";return new F(r.line,R,O)}}var j=function($e,Ye,We){for(var nt=function(Sn,Qn){return Qn?new F(r.line,l(Sn,1),"before"):new F(r.line,Sn,"after")};$e>=0&&$e<i.length;$e+=Ye){var wt=i[$e],gt=Ye>0==(wt.level!=1),Kt=gt?We.begin:l(We.end,-1);if(wt.from<=Kt&&Kt<wt.to||(Kt=gt?wt.from:l(wt.to,-1),We.begin<=Kt&&Kt<We.end))return nt(Kt,gt)}},ee=j(o+n,n,p);if(ee)return ee;var Ee=n>0?p.end:l(p.begin,-1);return Ee!=null&&!(n>0&&Ee==t.text.length)&&(ee=j(n>0?0:i.length-1,n,u(Ee)),ee)?ee:null}var fo={selectAll:il,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),he)},killLine:function(e){return Ni(e,function(t){if(t.empty()){var r=C(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:F(t.head.line+1,0)}:{from:t.head,to:F(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ni(e,function(t){return{from:F(t.from().line,0),to:te(e.doc,F(t.to().line+1,0))}})},delLineLeft:function(e){return Ni(e,function(t){return{from:F(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Ni(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Ni(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},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(F(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(F(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return xl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Cl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ps(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},pe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},pe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Cl(e,t.head):n},pe)},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=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=de(e.getLine(o.line),o.ch,n);t.push(xt(n-a%n))}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(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=C(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new F(i.line,i.ch-1)),i.ch>0)i=new F(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),F(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=C(e.doc,i.line-1).text;a&&(i=new F(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),F(i.line-1,a.length-1),i,"+transpose"))}}r.push(new cn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return yr(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Mi(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function xl(e,t){var r=C(e.doc,t),n=Ct(r);return n!=r&&(t=K(n)),da(!0,e,n,t,1)}function Ps(e,t){var r=C(e.doc,t),n=vn(r);return n!=r&&(t=K(n)),da(!0,e,r,t,-1)}function Cl(e,t){var r=xl(e,t.line),n=C(e.doc,r.line),i=ue(n,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return F(r.line,a?0:o,r.sticky)}return r}function Bo(e,t,r){if(typeof t=="string"&&(t=fo[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=ze}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function As(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ai(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ai(t,e.options.extraKeys,r,e)||Ai(t,e.options.keyMap,r,e)}var Ns=new ae;function ho(e,t,r,n){var i=e.state.keySeq;if(i){if(yl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ns.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),El(e,i+" "+t,r,n))return!0}return El(e,t,r,n)}function El(e,t,r,n){var i=As(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ct(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(lt(r),Xo(e)),!!i}function wl(e,t){var r=Sl(t,!0);return r?t.shiftKey&&!e.state.keySeq?ho(e,"Shift-"+r,t,function(n){return Bo(e,n,!0)})||ho(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Bo(e,n)}):ho(e,r,t,function(n){return Bo(e,n)}):!1}function Bs(e,t,r){return ho(e,"'"+r+"'",t,function(n){return Bo(e,n,!0)})}var ha=null;function Ol(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=Oe(),!it(t,e))){v&&A<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=wl(t,e);y&&(ha=n?r:null,!n&&r==88&&!dn&&(ot?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),P&&!ot&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&$s(t)}}function $s(e){var t=e.display.lineDiv;mt(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(b(t,"CodeMirror-crosshair"),Ae(document,"keyup",r),Ae(document,"mouseover",r))}U(document,"keyup",r),U(document,"mouseover",r)}function Il(e){e.keyCode==16&&(this.doc.sel.shift=!1),it(this,e)}function Ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Br(t.display,e)||it(t,e)||e.ctrlKey&&!e.altKey||ot&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(y&&r==ha){ha=null,lt(e);return}if(!(y&&(!e.which||e.which<10)&&wl(t,e))){var i=String.fromCharCode(n==null?r:n);i!="\b"&&(Bs(t,e,i)||t.display.input.onKeyPress(e))}}}var Ws=400,va=function(e,t,r){this.time=e,this.pos=t,this.button=r};va.prototype.compare=function(e,t,r){return this.time+Ws>e&&V(t,this.pos)==0&&r==this.button};var vo,po;function zs(e,t){var r=+new Date;return po&&po.compare(r,e,t)?(vo=po=null,"triple"):vo&&vo.compare(r,e,t)?(po=new va(r,e,t),vo=null,"double"):(vo=new va(r,e,t),po=null,"single")}function Rl(e){var t=this,r=t.display;if(!(it(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,Br(r,e)){N||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!pa(t,e)){var n=di(t,e),i=un(e),o=n?zs(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Hs(t,i,n,o,e))&&(i==1?n?_s(t,n,o,e):xn(e)==r.scroller&<(e):i==2?(n&&Lo(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(S?t.display.input.onContextMenu(e):Fa(t)))}}}function Hs(e,t,r,n,i){var o="Click";return n=="double"?o="Double"+o:n=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,ho(e,bl(o,i),i,function(a){if(typeof a=="string"&&(a=fo[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,r)!=ze}finally{e.state.suppressEdits=!1}return l})}function Zs(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var o=bt?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=ot?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ot?r.altKey:r.ctrlKey)),i}function _s(e,t,r,n){v?setTimeout(fe(Ra,e),0):e.curOp.focus=Oe();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&Bn&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(V((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(V(a.to(),t)>0||t.xRel<0)?Ks(e,n,t,i):js(e,n,t,i)}function Ks(e,t,r,n){var i=e.display,o=!1,a=Xn(e,function(u){N&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ae(i.wrapper.ownerDocument,"mouseup",a),Ae(i.wrapper.ownerDocument,"mousemove",l),Ae(i.scroller,"dragstart",s),Ae(i.scroller,"drop",a),o||(lt(u),n.addNew||Lo(e.doc,r,null,null,n.extend),N&&!Me||v&&A==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};N&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),U(i.wrapper.ownerDocument,"mouseup",a),U(i.wrapper.ownerDocument,"mousemove",l),U(i.scroller,"dragstart",s),U(i.scroller,"drop",a),Fa(e),setTimeout(function(){return i.input.focus()},20)}function Fl(e,t,r){if(r=="char")return new cn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new cn(F(t.line,0),te(e.doc,F(t.line+1,0)));var n=r(e,t);return new cn(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;lt(t);var a,l,s=o.sel,u=s.ranges;if(n.addNew&&!n.extend?(l=o.sel.contains(r),l>-1?a=u[l]:a=new cn(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new cn(r,r)),r=di(e,t,!0,!0),l=-1;else{var p=Fl(e,r,n.unit);n.extend?a=sa(a,p.anchor,p.head,n.extend):a=p}n.addNew?l==-1?(l=u.length,rr(o,$r(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(rr(o,$r(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):ua(o,l,a,De):(l=0,rr(o,new Or([a],0),De),s=o.sel);var m=r;function R(We){if(V(m,We)!=0)if(m=We,n.unit=="rectangle"){for(var nt=[],wt=e.options.tabSize,gt=de(C(o,r.line).text,r.ch,wt),Kt=de(C(o,We.line).text,We.ch,wt),Sn=Math.min(gt,Kt),Qn=Math.max(gt,Kt),Dn=Math.min(r.line,We.line),br=Math.min(e.lastLine(),Math.max(r.line,We.line));Dn<=br;Dn++){var dr=C(o,Dn).text,Hn=St(dr,Sn,wt);Sn==Qn?nt.push(new cn(F(Dn,Hn),F(Dn,Hn))):dr.length>Hn&&nt.push(new cn(F(Dn,Hn),F(Dn,St(dr,Qn,wt))))}nt.length||nt.push(new cn(r,r)),rr(o,$r(e,s.ranges.slice(0,l).concat(nt),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(We)}else{var hr=a,er=Fl(e,We,n.unit),jn=hr.anchor,Zn;V(er.anchor,jn)>0?(Zn=er.head,jn=Ne(hr.from(),er.anchor)):(Zn=er.anchor,jn=Ke(hr.to(),er.head));var Tn=s.ranges.slice(0);Tn[l]=Us(e,new cn(te(o,jn),Zn)),rr(o,$r(e,Tn,l),De)}}var O=i.wrapper.getBoundingClientRect(),j=0;function ee(We){var nt=++j,wt=di(e,We,!0,n.unit=="rectangle");if(wt)if(V(wt,m)!=0){e.curOp.focus=Oe(),R(wt);var gt=wo(i,o);(wt.line>=gt.to||wt.line<gt.from)&&setTimeout(Xn(e,function(){j==nt&&ee(We)}),150)}else{var Kt=We.clientY<O.top?-20:We.clientY>O.bottom?20:0;Kt&&setTimeout(Xn(e,function(){j==nt&&(i.scroller.scrollTop+=Kt,ee(We))}),50)}}function Ee(We){e.state.selectingText=!1,j=1/0,We&&(lt(We),i.input.focus()),Ae(i.wrapper.ownerDocument,"mousemove",$e),Ae(i.wrapper.ownerDocument,"mouseup",Ye),o.history.lastSelOrigin=null}var $e=Xn(e,function(We){We.buttons===0||!un(We)?Ee(We):ee(We)}),Ye=Xn(e,Ee);e.state.selectingText=Ye,U(i.wrapper.ownerDocument,"mousemove",$e),U(i.wrapper.ownerDocument,"mouseup",Ye)}function Us(e,t){var r=t.anchor,n=t.head,i=C(e.doc,r.line);if(V(r,n)==0&&r.sticky==n.sticky)return t;var o=ue(i);if(!o)return t;var a=le(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s=a+(l.from==r.ch==(l.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var p=le(o,n.ch,n.sticky),m=p-a||(n.ch-r.ch)*(l.level==1?-1:1);p==s-1||p==s?u=m<0:u=m>0}var R=o[s+(u?-1:0)],O=u==(R.level==1),j=O?R.from:R.to,ee=O?"after":"before";return r.ch==j&&r.sticky==ee?t:new cn(new F(r.line,j,ee),n)}function Ll(e,t,r,n){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(R){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&<(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Ce(e,r))return Qt(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 p=ge(e.doc,o),m=e.display.gutterSpecs[s];return tt(e,r,e,p,m.className,t),Qt(t)}}}function pa(e,t){return Ll(e,t,"gutterClick",!0)}function Dl(e,t){Br(e.display,t)||ks(e,t)||it(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function ks(e,t){return Ce(e,"gutterContextMenu")?Ll(e,t,"gutterContextMenu",!1):!1}function Tl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),On(e)}var Bi={toString:function(){return"CodeMirror.Init"}},Pl={},$o={};function Gs(e){var t=e.optionHandlers;function r(n,i,o,a){e.defaults[n]=i,o&&(t[n]=a?function(l,s,u){u!=Bi&&o(l,s,u)}:o)}e.defineOption=r,e.Init=Bi,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,oa(n)},!0),r("indentUnit",2,oa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){no(n),On(n),cr(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!!i){var o=[],a=n.doc.first;n.doc.iter(function(s){for(var u=0;;){var p=s.text.indexOf(i,u);if(p==-1)break;u=p+i.length,o.push(F(a,p))}a++});for(var l=o.length-1;l>=0;l--)Ti(n.doc,i,o[l],F(o[l].line,o[l].ch+i.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,o){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=Bi&&n.refresh()}),r("specialCharPlaceholder",Ir,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",qe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!It),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Tl(n),to(n)},!0),r("keyMap","default",function(n,i,o){var a=No(i),l=o!=Bi&&No(o);l&&l.detach&&l.detach(n,a),a.attach&&a.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Xs,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=ra(i,n.options.lineNumbers),to(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?Go(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Ri(n)},!0),r("scrollbarStyle","native",function(n){Na(n),Ri(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=ra(n.options.gutters,i),to(n)},!0),r("firstLineNumber",1,to,!0),r("lineNumberFormatter",function(n){return n},to,!0),r("showCursorWhenSelecting",!1,Xi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Ii(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Vs),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Xi,!0),r("singleCursorHeightPerLine",!0,Xi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,no,!0),r("addModeClass",!1,no,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,no,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Vs(e,t,r){var n=r&&r!=Bi;if(!t!=!n){var i=e.display.dragFunctions,o=t?U:Ae;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 Xs(e){e.options.lineWrapping?(mt(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),qn(e)),Vo(e),cr(e),On(e),setTimeout(function(){return Ri(e)},100)}function Rn(e,t){var r=this;if(!(this instanceof Rn))return new Rn(e,t);this.options=t=t?Y(t):{},Y(Pl,t,!1);var n=t.value;typeof n=="string"?n=new fr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Rn.inputStyles[t.inputStyle](this),o=this.display=new ss(e,n,i,t);o.wrapper.CodeMirror=this,Tl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Na(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 ae,keySeq:null,specialChars:null},t.autofocus&&!qe&&o.input.focus(),v&&A<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Ms(),gi(this),this.curOp.forceUpdate=!0,Ua(this,n),t.autofocus&&!qe||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Yo(r)},20):Ii(this);for(var a in $o)$o.hasOwnProperty(a)&&$o[a](this,t[a],Bi);Wa(this),t.finishInit&&t.finishInit(this);for(var l=0;l<ga.length;++l)ga[l](this);mi(this),N&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Rn.defaults=Pl,Rn.optionHandlers=$o;function Ys(e){var t=e.display;U(t.scroller,"mousedown",Xn(e,Rl)),v&&A<11?U(t.scroller,"dblclick",Xn(e,function(s){if(!it(e,s)){var u=di(e,s);if(!(!u||pa(e,s)||Br(e.display,s))){lt(s);var p=e.findWordAt(u);Lo(e.doc,p.anchor,p.head)}}})):U(t.scroller,"dblclick",function(s){return it(e,s)||lt(s)}),U(t.scroller,"contextmenu",function(s){return Dl(e,s)}),U(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Dl(e,s)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.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 p=u.left-s.left,m=u.top-s.top;return p*p+m*m>20*20}U(t.scroller,"touchstart",function(s){if(!it(e,s)&&!o(s)&&!pa(e,s)){t.input.ensurePolled(),clearTimeout(r);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-n.end<=300?n:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),U(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),U(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!Br(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var p=e.coordsChar(t.activeTouch,"page"),m;!u.prev||a(u,u.prev)?m=new cn(p,p):!u.prev.prev||a(u,u.prev.prev)?m=e.findWordAt(p):m=new cn(F(p.line,0),te(e.doc,F(p.line+1,0))),e.setSelection(m.anchor,m.head),e.focus(),lt(s)}i()}),U(t.scroller,"touchcancel",i),U(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),tt(e,"scroll",e))}),U(t.scroller,"mousewheel",function(s){return Za(e,s)}),U(t.scroller,"DOMMouseScroll",function(s){return Za(e,s)}),U(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){it(e,s)||sn(s)},over:function(s){it(e,s)||(Is(e,s),sn(s))},start:function(s){return Os(e,s)},drop:Xn(e,ws),leave:function(s){it(e,s)||pl(e)}};var l=t.input.getField();U(l,"keyup",function(s){return Il.call(e,s)}),U(l,"keydown",Xn(e,Ol)),U(l,"keypress",Xn(e,Ml)),U(l,"focus",function(s){return Yo(e,s)}),U(l,"blur",function(s){return Ii(e,s)})}var ga=[];Rn.defineInitHook=function(e){return ga.push(e)};function go(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=Tt(e,t).state:r="prev");var a=e.options.tabSize,l=C(i,t),s=de(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],p;if(!n&&!/\S/.test(l.text))p=0,r="not";else if(r=="smart"&&(p=i.mode.indent(o,l.text.slice(u.length),l.text),p==ze||p>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?p=de(C(i,t-1).text,null,a):p=0:r=="add"?p=s+e.options.indentUnit:r=="subtract"?p=s-e.options.indentUnit:typeof r=="number"&&(p=s+r),p=Math.max(0,p);var m="",R=0;if(e.options.indentWithTabs)for(var O=Math.floor(p/a);O;--O)R+=a,m+=" ";if(R<p&&(m+=xt(p-R)),m!=u)return Ti(i,m,F(t,0),F(t,u.length),"+input"),l.stateAfter=null,!0;for(var j=0;j<i.sel.ranges.length;j++){var ee=i.sel.ranges[j];if(ee.head.line==t&&ee.head.ch<u.length){var Ee=F(t,u.length);ua(i,j,new cn(Ee,Ee));break}}}var Wr=null;function Wo(e){Wr=e}function ma(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=In(t),u=null;if(l&&n.ranges.length>1)if(Wr&&Wr.text.join(`
|
|
|
`)==t){if(n.ranges.length%Wr.text.length==0){u=[];for(var p=0;p<Wr.text.length;p++)u.push(o.splitLines(Wr.text[p]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=Mt(s,function($e){return[$e]}));for(var m=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var O=n.ranges[R],j=O.from(),ee=O.to();O.empty()&&(r&&r>0?j=F(j.line,j.ch-r):e.state.overwrite&&!l?ee=F(ee.line,Math.min(C(o,ee.line).text.length,ee.ch+et(s).length)):l&&Wr&&Wr.lineWise&&Wr.text.join(`
|
|
|
`)==s.join(`
|
|
|
`)&&(j=ee=F(j.line,0)));var Ee={from:j,to:ee,text:u?u[R%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Di(e.doc,Ee),ct(e,"inputRead",e,Ee)}t&&!l&&Nl(e,t),Mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=m),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Al(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&yr(t,function(){return ma(t,r,0,null,"paste")}),!0}function Nl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-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=go(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(C(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=go(e,i.head.line,"smart"));a&&ct(e,"electricInput",e,i.head.line)}}}function Bl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:F(i,0),head:F(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function $l(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Wl(){var e=D("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=D("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return N?e.style.width="1000px":e.setAttribute("wrap","off"),Pe&&(e.style.border="1px solid black"),$l(e),t}function Qs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var o=this.options,a=o[n];o[n]==i&&n!="mode"||(o[n]=i,t.hasOwnProperty(n)&&Xn(this,t[n])(this,i,a),tt(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](No(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==n||i[o].name==n)return i.splice(o,1),!0},addOverlay:ar(function(n,i){var o=n.token?n:e.getMode(this.options,n);if(o.startState)throw new Error("Overlays may not be stateful.");at(this.state.overlays,{mode:o,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,cr(this)}),removeOverlay:ar(function(n){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==n||typeof n=="string"&&a.name==n){i.splice(o,1),this.state.modeGen++,cr(this);return}}}),indentLine:ar(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),ce(this.doc,n)&&go(this,n,i,o)}),indentSelection:ar(function(n){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&&(go(this,l.head.line,n,!0),o=l.head.line,a==this.doc.sel.primIndex&&Mi(this));else{var s=l.from(),u=l.to(),p=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var m=p;m<o;++m)go(this,m,n);var R=this.doc.sel.ranges;s.ch==0&&i.length==R.length&&R[a].from().ch>0&&ua(this.doc,a,new cn(s,R[a].to()),he)}}}),getTokenAt:function(n,i){return Ut(this,n,i)},getLineTokens:function(n,i){return Ut(this,F(n),i,!0)},getTokenTypeAt:function(n){n=te(this.doc,n);var i=jt(this,C(this.doc,n.line)),o=0,a=(i.length-1)/2,l=n.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 p=s?s.indexOf("overlay "):-1;return p<0?s:p==0?null:s.slice(0,p-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var o=[];if(!r.hasOwnProperty(i))return o;var a=r[i],l=this.getModeAt(n);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 p=0;p<a._global.length;p++){var m=a._global[p];m.pred(l,this)&&ie(o,m.val)==-1&&o.push(m.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=ht(o,n==null?o.first+o.size-1:n),Tt(this,n+1,i).state},cursorCoords:function(n,i){var o,a=this.doc.sel.primary();return n==null?o=a.head:typeof n=="object"?o=te(this.doc,n):o=n?a.from():a.to(),mr(this,o,i||"page")},charCoords:function(n,i){return Pr(this,te(this.doc,n),i||"page")},coordsChar:function(n,i){return n=kr(this,n,i||"page"),jo(this,n.left,n.top)},lineAtHeight:function(n,i){return n=kr(this,{top:n,left:0},i||"page").top,ge(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,o){var a=!1,l;if(typeof n=="number"){var s=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>s&&(n=s,a=!0),l=C(this.doc,n)}else l=n;return Er(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Mn(l):0)},defaultTextHeight:function(){return wi(this.display)},defaultCharWidth:function(){return Oi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,o,a,l){var s=this.display;n=mr(this,te(this.doc,n));var u=n.bottom,p=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")u=n.top;else if(a=="above"||a=="near"){var m=Math.max(s.wrapper.clientHeight,this.doc.height),R=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>m)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=m&&(u=n.bottom),p+i.offsetWidth>R&&(p=R-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(p=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?p=0:l=="middle"&&(p=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=p+"px"),o&&Vl(this,{left:p,top:u,right:p+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:ar(Ol),triggerOnKeyPress:ar(Ml),triggerOnKeyUp:Il,triggerOnMouseDown:ar(Rl),execCommand:function(n){if(fo.hasOwnProperty(n))return fo[n].call(null,this)},triggerElectric:ar(function(n){Nl(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=te(this.doc,n),u=0;u<i&&(s=ya(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:ar(function(n,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?ya(o.doc,a.head,n,i,o.options.rtlMoveVisually):n<0?a.from():a.to()},pe)}),deleteH:ar(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Ni(this,function(l){var s=ya(a,l.head,n,i,!1);return n<0?{from:s,to:l.head}:{from:l.head,to:s}})}),findPosV:function(n,i,o,a){var l=1,s=a;i<0&&(l=-1,i=-i);for(var u=te(this.doc,n),p=0;p<i;++p){var m=mr(this,u,"div");if(s==null?s=m.left:m.left=s,u=zl(this,m,l,o),u.hitSide)break}return u},moveV:ar(function(n,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(p){if(s)return n<0?p.from():p.to();var m=mr(o,p.head,"div");p.goalColumn!=null&&(m.left=p.goalColumn),l.push(m.left);var R=zl(o,m,n,i);return i=="page"&&p==a.sel.primary()&&Jo(o,Pr(o,R,"div").top-m.top),R},pe),l.length)for(var u=0;u<a.sel.ranges.length;u++)a.sel.ranges[u].goalColumn=l[u]}),findWordAt:function(n){var i=this.doc,o=C(i,n.line).text,a=n.ch,l=n.ch;if(o){var s=this.getHelper(n,"wordChars");(n.sticky=="before"||l==o.length)&&a?--a:++l;for(var u=o.charAt(a),p=I(u,s)?function(m){return I(m,s)}:/\s/.test(u)?function(m){return/\s/.test(m)}:function(m){return!/\s/.test(m)&&!I(m)};a>0&&p(o.charAt(a-1));)--a;for(;l<o.length&&p(o.charAt(l));)++l}return new cn(F(n.line,a),F(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?mt(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),tt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Oe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ar(function(n,i){Yi(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Dr(this)-this.display.barHeight,width:n.scrollWidth-Dr(this)-this.display.barWidth,clientHeight:Ki(this),clientWidth:Hr(this)}},scrollIntoView:ar(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:F(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Xl(this,n):Da(this,n.from,n.to,n.margin)}),setSize:ar(function(n,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};n!=null&&(this.display.wrapper.style.width=a(n)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&nr(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){qr(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,tt(this,"refresh",this)}),operation:function(n){return yr(this,n)},startOperation:function(){return gi(this)},endOperation:function(){return mi(this)},refresh:ar(function(){var n=this.display.cachedTextHeight;cr(this),this.curOp.forceUpdate=!0,On(this),Yi(this,this.doc.scrollLeft,this.doc.scrollTop),ta(this.display),(n==null||Math.abs(n-wi(this.display))>.5||this.options.lineWrapping)&&Vo(this),tt(this,"refresh",this)}),swapDoc:ar(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Ua(this,n),On(this),this.display.input.reset(),Yi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,ct(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},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}},rt(e),e.registerHelper=function(n,i,o){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=o},e.registerGlobalHelper=function(n,i,o,a){e.registerHelper(n,i,a),r[n]._global.push({pred:o,val:a})}}function ya(e,t,r,n,i){var o=t,a=r,l=C(e,t.line),s=i&&e.direction=="rtl"?-r:r;function u(){var Ye=t.line+s;return Ye<e.first||Ye>=e.first+e.size?!1:(t=new F(Ye,t.ch,t.sticky),l=C(e,Ye))}function p(Ye){var We;if(n=="codepoint"){var nt=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(nt)?We=null:We=new F(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(nt>=55296&&nt<56320?2:1))),-r)}else i?We=Ts(e.cm,l,t,r):We=fa(l,t,r);if(We==null)if(!Ye&&u())t=da(i,e.cm,l,t.line,s);else return!1;else t=We;return!0}if(n=="char"||n=="codepoint")p();else if(n=="column")p(!0);else if(n=="word"||n=="group")for(var m=null,R=n=="group",O=e.cm&&e.cm.getHelper(t,"wordChars"),j=!0;!(r<0&&!p(!j));j=!1){var ee=l.text.charAt(t.ch)||`
|
|
|
`,Ee=I(ee,O)?"w":R&&ee==`
|
|
|
`?"n":!R||/\s/.test(ee)?null:"p";if(R&&!j&&!Ee&&(Ee="s"),m&&m!=Ee){r<0&&(r=1,p(),t.sticky="after");break}if(Ee&&(m=Ee),r>0&&!p(!j))break}var $e=To(e,t,o,a,!0);return Ue(o,$e)&&($e.hitSide=!0),$e}function zl(e,t,r,n){var i=e.doc,o=t.left,a;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*wi(e.display),3);a=(r>0?t.bottom:t.top)+r*s}else n=="line"&&(a=r>0?t.bottom+3:t.top-3);for(var u;u=jo(e,o,a),!!u.outside;){if(r<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=r*5}return u}var hn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ae,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};hn.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;$l(i,n.options.spellcheck,n.options.autocorrect,n.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}U(i,"paste",function(l){!o(l)||it(n,l)||Al(l,n)||A<=11&&setTimeout(Xn(n,function(){return t.updateFromDOM()}),20)}),U(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),U(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),U(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),U(i,"touchstart",function(){return r.forceCompositionEnd()}),U(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||it(n,l))){if(n.somethingSelected())Wo({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var s=Bl(n);Wo({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,he),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=Wr.text.join(`
|
|
|
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var p=Wl(),m=p.firstChild;n.display.lineSpace.insertBefore(p,n.display.lineSpace.firstChild),m.value=Wr.text.join(`
|
|
|
`);var R=document.activeElement;Je(m),setTimeout(function(){n.display.lineSpace.removeChild(p),R.focus(),R==i&&r.showPrimarySelection()},50)}}U(i,"copy",a),U(i,"cut",a)},hn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var e=Ia(this.cm,!1);return e.focus=document.activeElement==this.div,e},hn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},hn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},hn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=zo(t,e.anchorNode,e.anchorOffset),a=zo(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&V(Ne(o,a),n)==0&&V(Ke(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Hl(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Hl(t,i);if(!u){var p=l[l.length-1].measure,m=p.maps?p.maps[p.maps.length-1]:p.map;u={node:m[m.length-1],offset:m[m.length-2]-m[m.length-3]}}if(!s||!u){e.removeAllRanges();return}var R=e.rangeCount&&e.getRangeAt(0),O;try{O=ke(s.node,s.offset,u.offset,u.node)}catch(j){}O&&(!P&&t.state.focused?(e.collapse(s.node,s.offset),O.collapsed||(e.removeAllRanges(),e.addRange(O))):(e.removeAllRanges(),e.addRange(O)),R&&e.anchorNode==null?e.addRange(R):P&&this.startGracePeriod()),this.rememberSelection()}},hn.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)},hn.prototype.showMultipleSelections=function(e){X(this.cm.display.cursorDiv,e.cursors),X(this.cm.display.selectionDiv,e.selection)},hn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},hn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return He(this.div,t)},hn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},hn.prototype.blur=function(){this.div.blur()},hn.prototype.getField=function(){return this.div},hn.prototype.supportsTouch=function(){return!0},hn.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)},hn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},hn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(J&&oe&&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 r=zo(t,e.anchorNode,e.anchorOffset),n=zo(t,e.focusNode,e.focusOffset);r&&n&&yr(t,function(){rr(t.doc,ti(r,n),he),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},hn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=F(n.line-1,C(e.doc,n.line-1).length)),i.ch==C(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=F(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||(o=hi(e,n.line))==0?(a=K(t.view[0].line),l=t.view[0].node):(a=K(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=hi(e,i.line),u,p;if(s==t.view.length-1?(u=t.viewTo-1,p=t.lineDiv.lastChild):(u=K(t.view[s+1].line)-1,p=t.view[s+1].node.previousSibling),!l)return!1;for(var m=e.doc.splitLines(qs(e,l,p,a,u)),R=T(e.doc,F(a,0),F(u,C(e.doc,u).text.length));m.length>1&&R.length>1;)if(et(m)==et(R))m.pop(),R.pop(),u--;else if(m[0]==R[0])m.shift(),R.shift(),a++;else break;for(var O=0,j=0,ee=m[0],Ee=R[0],$e=Math.min(ee.length,Ee.length);O<$e&&ee.charCodeAt(O)==Ee.charCodeAt(O);)++O;for(var Ye=et(m),We=et(R),nt=Math.min(Ye.length-(m.length==1?O:0),We.length-(R.length==1?O:0));j<nt&&Ye.charCodeAt(Ye.length-j-1)==We.charCodeAt(We.length-j-1);)++j;if(m.length==1&&R.length==1&&a==n.line)for(;O&&O>n.ch&&Ye.charCodeAt(Ye.length-j-1)==We.charCodeAt(We.length-j-1);)O--,j++;m[m.length-1]=Ye.slice(0,Ye.length-j).replace(/^\u200b+/,""),m[0]=m[0].slice(O).replace(/\u200b+$/,"");var wt=F(a,O),gt=F(u,R.length?et(R).length-j:0);if(m.length>1||m[0]||V(wt,gt))return Ti(e.doc,m,wt,gt,"+input"),!0},hn.prototype.ensurePolled=function(){this.forceCompositionEnd()},hn.prototype.reset=function(){this.forceCompositionEnd()},hn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},hn.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))},hn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&yr(this.cm,function(){return cr(e.cm)})},hn.prototype.setUneditable=function(e){e.contentEditable="false"},hn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Xn(this.cm,ma)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},hn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},hn.prototype.onContextMenu=function(){},hn.prototype.resetPosition=function(){},hn.prototype.needsContentAttribute=!0;function Hl(e,t){var r=ki(e,t.line);if(!r||r.hidden)return null;var n=C(e.doc,t.line),i=ji(r,n,t.line),o=ue(n,e.doc.direction),a="left";if(o){var l=le(o,t.ch);a=l%2?"right":"left"}var s=Gi(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 $i(e,t){return t&&(e.bad=!0),e}function qs(e,t,r,n,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(O){return function(j){return j.id==O}}function p(){a&&(o+=l,s&&(o+=l),a=s=!1)}function m(O){O&&(p(),o+=O)}function R(O){if(O.nodeType==1){var j=O.getAttribute("cm-text");if(j){m(j);return}var ee=O.getAttribute("cm-marker"),Ee;if(ee){var $e=e.findMarks(F(n,0),F(i+1,0),u(+ee));$e.length&&(Ee=$e[0].find(0))&&m(T(e.doc,Ee.from,Ee.to).join(l));return}if(O.getAttribute("contenteditable")=="false")return;var Ye=/^(pre|div|p|li|table|br)$/i.test(O.nodeName);if(!/^br$/i.test(O.nodeName)&&O.textContent.length==0)return;Ye&&p();for(var We=0;We<O.childNodes.length;We++)R(O.childNodes[We]);/^(pre|p)$/i.test(O.nodeName)&&(s=!0),Ye&&(a=!0)}else O.nodeType==3&&m(O.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;R(t),t!=r;)t=t.nextSibling,s=!1;return o}function zo(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return $i(e.clipPos(F(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return eu(o,t,r)}}function eu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!He(n,t))return $i(F(K(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?et(e.rest):e.line;return $i(F(K(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,r&&(r=a.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var s=e.measure,u=s.maps;function p(Ee,$e,Ye){for(var We=-1;We<(u?u.length:0);We++)for(var nt=We<0?s.map:u[We],wt=0;wt<nt.length;wt+=3){var gt=nt[wt+2];if(gt==Ee||gt==$e){var Kt=K(We<0?e.line:e.rest[We]),Sn=nt[wt]+Ye;return(Ye<0||gt!=Ee)&&(Sn=nt[wt+(Ye?1:0)]),F(Kt,Sn)}}}var m=p(a,l,r);if(m)return $i(m,i);for(var R=l.nextSibling,O=a?a.nodeValue.length-r:0;R;R=R.nextSibling){if(m=p(R,R.firstChild,0),m)return $i(F(m.line,m.ch-O),i);O+=R.textContent.length}for(var j=l.previousSibling,ee=r;j;j=j.previousSibling){if(m=p(j,j.firstChild,-1),m)return $i(F(m.line,m.ch+ee),i);ee+=j.textContent.length}}var Nn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ae,this.hasSelection=!1,this.composing=null};Nn.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),Pe&&(i.style.width="0px"),U(i,"input",function(){v&&A>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),U(i,"paste",function(a){it(n,a)||Al(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!it(n,a)){if(n.somethingSelected())Wo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=Bl(n);Wo({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,he):(r.prevInput="",i.value=l.text.join(`
|
|
|
`),Je(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}U(i,"cut",o),U(i,"copy",o),U(e.scroller,"paste",function(a){if(!(Br(e,a)||it(n,a))){if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=a.clipboardData,i.dispatchEvent(l)}}),U(e.lineSpace,"selectstart",function(a){Br(e,a)||lt(a)}),U(i,"compositionstart",function(){var a=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:a,range:n.markText(a,n.getCursor("to"),{className:"CodeMirror-composing"})}}),U(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Nn.prototype.createField=function(e){this.wrapper=Wl(),this.textarea=this.wrapper.firstChild},Nn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Nn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Ia(e);if(e.options.moveInputWithCursor){var i=mr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},Nn.prototype.showSelection=function(e){var t=this.cm,r=t.display;X(r.cursorDiv,e.cursors),X(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Nn.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&Je(this.textarea),v&&A>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",v&&A>=9&&(this.hasSelection=null))}},Nn.prototype.getField=function(){return this.textarea},Nn.prototype.supportsTouch=function(){return!1},Nn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!qe||Oe()!=this.textarea))try{this.textarea.focus()}catch(e){}},Nn.prototype.blur=function(){this.textarea.blur()},Nn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Nn.prototype.receivedFocus=function(){this.slowPoll()},Nn.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Nn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Nn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Cn(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(v&&A>=9&&this.hasSelection===i||ot&&/[\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&&!n&&(n="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return yr(t,function(){ma(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
|
`)>-1?r.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},Nn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Nn.prototype.onKeyPress=function(){v&&A>=9&&(this.hasSelection=null),this.fastPoll()},Nn.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=di(r,e),a=n.scroller.scrollTop;if(!o||y)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Xn(r,rr)(r.doc,ti(o),he);var s=i.style.cssText,u=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+`px;
|
|
|
z-index: 1000; background: `+(v?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var m;N&&(m=window.scrollY),n.input.focus(),N&&window.scrollTo(null,m),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=O,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(i.selectionStart!=null){var ee=r.somethingSelected(),Ee="\u200B"+(ee?i.value:"");i.value="\u21DA",i.value=Ee,t.prevInput=ee?"":"\u200B",i.selectionStart=1,i.selectionEnd=Ee.length,n.selForContextMenu=r.doc.sel}}function O(){if(t.contextMenuPending==O&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,v&&A<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!v||v&&A<9)&&R();var ee=0,Ee=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Xn(r,il)(r):ee++<10?n.detectingSelectAll=setTimeout(Ee,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Ee,200)}}if(v&&A>=9&&R(),S){sn(e);var j=function(){Ae(window,"mouseup",j),setTimeout(O,20)};U(window,"mouseup",j)}else setTimeout(O,50)},Nn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Nn.prototype.setUneditable=function(){},Nn.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?Y(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 r=Oe();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(U(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(s){}}t.finishInit=function(s){s.save=n,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,n(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(Ae(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Rn(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=Ae,e.on=U,e.wheelEventPixels=us,e.Doc=fr,e.splitLines=In,e.countColumn=de,e.findColumn=St,e.isWordChar=E,e.Pass=ze,e.signal=tt,e.Line=tr,e.changeEnd=ni,e.scrollbarModel=Aa,e.Pos=F,e.cmpPos=V,e.modes=Pn,e.mimeModes=zn,e.resolveMode=on,e.getMode=st,e.modeExtensions=Ht,e.extendMode=g,e.copyState=B,e.startState=d,e.innerMode=k,e.commands=fo,e.keyMap=Gr,e.keyName=Sl,e.isModifierKey=yl,e.lookupKey=Ai,e.normalizeKeyMap=Ds,e.StringStream=h,e.SharedTextMarker=so,e.TextMarker=ii,e.LineWidget=lo,e.e_preventDefault=lt,e.e_stopPropagation=Yt,e.e_stop=sn,e.addClass=mt,e.contains=He,e.rmClass=b,e.keyNames=oi}Gs(Rn),Qs(Rn);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Ho in fr.prototype)fr.prototype.hasOwnProperty(Ho)&&ie(ru,Ho)<0&&(Rn.prototype[Ho]=function(e){return function(){return e.apply(this.doc,arguments)}}(fr.prototype[Ho]));return rt(fr),Rn.inputStyles={textarea:Nn,contenteditable:hn},Rn.defineMode=function(e){!Rn.defaults.mode&&e!="null"&&(Rn.defaults.mode=e),Sr.apply(this,arguments)},Rn.defineMIME=pr,Rn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Rn.defineMIME("text/plain","null"),Rn.defineExtension=function(e,t){Rn.prototype[e]=t},Rn.defineDocExtension=function(e,t){fr.prototype[e]=t},Rn.fromTextArea=tu,nu(Rn),Rn.version="5.58.2",Rn})},93681:function(rn,Te,f){"use strict";f.r(Te),f.d(Te,{BaseInput:function(){return y},default:function(){return It}});var P=f(54476),w=f(33885),x=f(20068),W=f(76190),v=f(92310),A=f.n(v),N=f(59301),be=f(5643),oe=function(Q){var S,c,b=Q.inputElement,L=Q.prefixCls,X=Q.prefix,D=Q.suffix,we=Q.addonBefore,ke=Q.addonAfter,He=Q.className,Oe=Q.style,mt=Q.disabled,Qe=Q.readOnly,Je=Q.focused,fe=Q.triggerFocus,Y=Q.allowClear,de=Q.value,ae=Q.handleReset,ie=Q.hidden,Ve=Q.classes,ze=Q.classNames,he=Q.dataAttrs,De=Q.styles,pe=Q.components,St=(pe==null?void 0:pe.affixWrapper)||"span",Lt=(pe==null?void 0:pe.groupWrapper)||"span",xt=(pe==null?void 0:pe.wrapper)||"span",et=(pe==null?void 0:pe.groupAddon)||"span",Mt=(0,N.useRef)(null),at=function(z){var le;(le=Mt.current)!==null&&le!==void 0&&le.contains(z.target)&&(fe==null||fe())},Z=function(){var z;if(!Y)return null;var le=!mt&&!Qe&&de,Re="".concat(L,"-clear-icon"),ue=(0,W.Z)(Y)==="object"&&Y!==null&&Y!==void 0&&Y.clearIcon?Y.clearIcon:"\u2716";return N.createElement("span",{onClick:ae,onMouseDown:function(U){return U.preventDefault()},className:A()(Re,(z={},(0,x.Z)(z,"".concat(Re,"-hidden"),!le),(0,x.Z)(z,"".concat(Re,"-has-suffix"),!!D),z)),role:"button",tabIndex:-1},ue)},Le=(0,N.cloneElement)(b,{value:de,hidden:ie,className:A()((S=b.props)===null||S===void 0?void 0:S.className,!(0,be.X3)(Q)&&!(0,be.He)(Q)&&He)||null,style:(0,w.Z)((0,w.Z)({},(c=b.props)===null||c===void 0?void 0:c.style),!(0,be.X3)(Q)&&!(0,be.He)(Q)?Oe:{})});if((0,be.X3)(Q)){var se,E="".concat(L,"-affix-wrapper"),I=A()(E,(se={},(0,x.Z)(se,"".concat(E,"-disabled"),mt),(0,x.Z)(se,"".concat(E,"-focused"),Je),(0,x.Z)(se,"".concat(E,"-readonly"),Qe),(0,x.Z)(se,"".concat(E,"-input-with-clear-btn"),D&&Y&&de),se),!(0,be.He)(Q)&&He,Ve==null?void 0:Ve.affixWrapper,ze==null?void 0:ze.affixWrapper),M=(D||Y)&&N.createElement("span",{className:A()("".concat(L,"-suffix"),ze==null?void 0:ze.suffix),style:De==null?void 0:De.suffix},Z(),D);Le=N.createElement(St,(0,P.Z)({className:I,style:(0,w.Z)((0,w.Z)({},(0,be.He)(Q)?void 0:Oe),De==null?void 0:De.affixWrapper),hidden:!(0,be.He)(Q)&&ie,onClick:at},he==null?void 0:he.affixWrapper,{ref:Mt}),X&&N.createElement("span",{className:A()("".concat(L,"-prefix"),ze==null?void 0:ze.prefix),style:De==null?void 0:De.prefix},X),(0,N.cloneElement)(b,{value:de,hidden:null}),M)}if((0,be.He)(Q)){var $="".concat(L,"-group"),q="".concat($,"-addon"),xe=A()("".concat(L,"-wrapper"),$,Ve==null?void 0:Ve.wrapper),_=A()("".concat(L,"-group-wrapper"),He,Ve==null?void 0:Ve.group);return N.createElement(Lt,{className:_,style:Oe,hidden:ie},N.createElement(xt,{className:xe},we&&N.createElement(et,{className:q},we),(0,N.cloneElement)(Le,{hidden:null}),ke&&N.createElement(et,{className:q},ke)))}return Le},y=oe,Me=f(94480),H=f(42978),ye=f(75931),Pe=f(18929),J=f(2738),qe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],ot=(0,N.forwardRef)(function(re,Q){var S=re.autoComplete,c=re.onChange,b=re.onFocus,L=re.onBlur,X=re.onPressEnter,D=re.onKeyDown,we=re.prefixCls,ke=we===void 0?"rc-input":we,He=re.disabled,Oe=re.htmlSize,mt=re.className,Qe=re.maxLength,Je=re.suffix,fe=re.showCount,Y=re.type,de=Y===void 0?"text":Y,ae=re.classes,ie=re.classNames,Ve=re.styles,ze=(0,ye.Z)(re,qe),he=(0,Pe.Z)(re.defaultValue,{value:re.value}),De=(0,H.Z)(he,2),pe=De[0],St=De[1],Lt=(0,N.useState)(!1),xt=(0,H.Z)(Lt,2),et=xt[0],Mt=xt[1],at=(0,N.useRef)(null),Z=function(_){at.current&&(0,be.nH)(at.current,_)};(0,N.useImperativeHandle)(Q,function(){return{focus:Z,blur:function(){var _;(_=at.current)===null||_===void 0||_.blur()},setSelectionRange:function(_,Fe,z){var le;(le=at.current)===null||le===void 0||le.setSelectionRange(_,Fe,z)},select:function(){var _;(_=at.current)===null||_===void 0||_.select()},input:at.current}}),(0,N.useEffect)(function(){Mt(function(xe){return xe&&He?!1:xe})},[He]);var Le=function(_){re.value===void 0&&St(_.target.value),at.current&&(0,be.rJ)(at.current,_,c)},se=function(_){X&&_.key==="Enter"&&X(_),D==null||D(_)},E=function(_){Mt(!0),b==null||b(_)},I=function(_){Mt(!1),L==null||L(_)},M=function(_){St(""),Z(),at.current&&(0,be.rJ)(at.current,_,c)},$=function(){var _=(0,J.Z)(re,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return N.createElement("input",(0,P.Z)({autoComplete:S},_,{onChange:Le,onFocus:E,onBlur:I,onKeyDown:se,className:A()(ke,(0,x.Z)({},"".concat(ke,"-disabled"),He),ie==null?void 0:ie.input),style:Ve==null?void 0:Ve.input,ref:at,size:Oe,type:de}))},q=function(){var _=Number(Qe)>0;if(Je||fe){var Fe=(0,be.D7)(pe),z=(0,Me.Z)(Fe).length,le=(0,W.Z)(fe)==="object"?fe.formatter({value:Fe,count:z,maxLength:Qe}):"".concat(z).concat(_?" / ".concat(Qe):"");return N.createElement(N.Fragment,null,!!fe&&N.createElement("span",{className:A()("".concat(ke,"-show-count-suffix"),(0,x.Z)({},"".concat(ke,"-show-count-has-suffix"),!!Je),ie==null?void 0:ie.count),style:(0,w.Z)({},Ve==null?void 0:Ve.count)},le),Je)}return null};return N.createElement(y,(0,P.Z)({},ze,{prefixCls:ke,className:mt,inputElement:$(),handleReset:M,value:(0,be.D7)(pe),focused:et,triggerFocus:Z,suffix:q(),disabled:He,classes:ae,classNames:ie,styles:Ve}))}),bt=ot,It=bt},5643:function(rn,Te,f){"use strict";f.d(Te,{D7:function(){return v},He:function(){return P},X3:function(){return w},nH:function(){return W},rJ:function(){return x}});function P(A){return!!(A.addonBefore||A.addonAfter)}function w(A){return!!(A.prefix||A.suffix||A.allowClear)}function x(A,N,be,oe){if(be){var y=N;if(N.type==="click"){var Me=A.cloneNode(!0);y=Object.create(N,{target:{value:Me},currentTarget:{value:Me}}),Me.value="",be(y);return}if(oe!==void 0){y=Object.create(N,{target:{value:A},currentTarget:{value:A}}),A.value=oe,be(y);return}be(y)}}function W(A,N){if(A){A.focus(N);var be=N||{},oe=be.cursor;if(oe){var y=A.value.length;switch(oe){case"start":A.setSelectionRange(0,0);break;case"end":A.setSelectionRange(y,y);break;default:A.setSelectionRange(0,y)}}}}function v(A){return typeof A=="undefined"||A===null?"":String(A)}},11780:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return fe}});var P=f(54476),w=f(33885),x=f(42978),W=f(75931),v=f(59301),A=f(92310),N=f.n(A),be=f(29301),oe=f(34280),y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Me=void 0;function H(Y,de){var ae=Y.prefixCls,ie=Y.invalidate,Ve=Y.item,ze=Y.renderItem,he=Y.responsive,De=Y.responsiveDisabled,pe=Y.registerSize,St=Y.itemKey,Lt=Y.className,xt=Y.style,et=Y.children,Mt=Y.display,at=Y.order,Z=Y.component,Le=Z===void 0?"div":Z,se=(0,W.Z)(Y,y),E=he&&!Mt;function I(_){pe(St,_)}v.useEffect(function(){return function(){I(null)}},[]);var M=ze&&Ve!==Me?ze(Ve,{index:at}):et,$;ie||($={opacity:E?0:1,height:E?0:Me,overflowY:E?"hidden":Me,order:he?at:Me,pointerEvents:E?"none":Me,position:E?"absolute":Me});var q={};E&&(q["aria-hidden"]=!0);var xe=v.createElement(Le,(0,P.Z)({className:N()(!ie&&ae,Lt),style:(0,w.Z)((0,w.Z)({},$),xt)},q,se,{ref:de}),M);return he&&(xe=v.createElement(be.Z,{onResize:function(Fe){var z=Fe.offsetWidth;I(z)},disabled:De},xe)),xe}var ye=v.forwardRef(H);ye.displayName="Item";var Pe=ye,J=f(6089),qe=f(4676),ot=f(16089);function bt(Y){if(typeof MessageChannel=="undefined")(0,ot.Z)(Y);else{var de=new MessageChannel;de.port1.onmessage=function(){return Y()},de.port2.postMessage(void 0)}}function It(){var Y=v.useRef(null),de=function(ie){Y.current||(Y.current=[],bt(function(){(0,qe.unstable_batchedUpdates)(function(){Y.current.forEach(function(Ve){Ve()}),Y.current=null})})),Y.current.push(ie)};return de}function re(Y,de){var ae=v.useState(de),ie=(0,x.Z)(ae,2),Ve=ie[0],ze=ie[1],he=(0,J.Z)(function(De){Y(function(){ze(De)})});return[Ve,he]}var Q=v.createContext(null),S=["component"],c=["className"],b=["className"],L=function(de,ae){var ie=v.useContext(Q);if(!ie){var Ve=de.component,ze=Ve===void 0?"div":Ve,he=(0,W.Z)(de,S);return v.createElement(ze,(0,P.Z)({},he,{ref:ae}))}var De=ie.className,pe=(0,W.Z)(ie,c),St=de.className,Lt=(0,W.Z)(de,b);return v.createElement(Q.Provider,{value:null},v.createElement(Pe,(0,P.Z)({ref:ae,className:N()(De,St)},pe,Lt)))},X=v.forwardRef(L);X.displayName="RawItem";var D=X,we=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],ke="responsive",He="invalidate";function Oe(Y){return"+ ".concat(Y.length," ...")}function mt(Y,de){var ae=Y.prefixCls,ie=ae===void 0?"rc-overflow":ae,Ve=Y.data,ze=Ve===void 0?[]:Ve,he=Y.renderItem,De=Y.renderRawItem,pe=Y.itemKey,St=Y.itemWidth,Lt=St===void 0?10:St,xt=Y.ssr,et=Y.style,Mt=Y.className,at=Y.maxCount,Z=Y.renderRest,Le=Y.renderRawRest,se=Y.suffix,E=Y.component,I=E===void 0?"div":E,M=Y.itemComponent,$=Y.onVisibleChange,q=(0,W.Z)(Y,we),xe=xt==="full",_=It(),Fe=re(_,null),z=(0,x.Z)(Fe,2),le=z[0],Re=z[1],ue=le||0,Ie=re(_,new Map),U=(0,x.Z)(Ie,2),me=U[0],Ae=U[1],tt=re(_,0),it=(0,x.Z)(tt,2),je=it[0],Ce=it[1],rt=re(_,0),lt=(0,x.Z)(rt,2),Yt=lt[0],Qt=lt[1],sn=re(_,0),xn=(0,x.Z)(sn,2),un=xn[0],Bn=xn[1],$n=(0,v.useState)(null),pn=(0,x.Z)($n,2),Fn=pn[0],En=pn[1],In=(0,v.useState)(null),Cn=(0,x.Z)(In,2),dn=Cn[0],Wn=Cn[1],Jt=v.useMemo(function(){return dn===null&&xe?Number.MAX_SAFE_INTEGER:dn||0},[dn,le]),Pn=(0,v.useState)(!1),zn=(0,x.Z)(Pn,2),Sr=zn[0],pr=zn[1],on="".concat(ie,"-item"),st=Math.max(je,Yt),Ht=at===ke,g=ze.length&&Ht,B=at===He,k=g||typeof at=="number"&&ze.length>at,d=(0,v.useMemo)(function(){var ve=ze;return g?le===null&&xe?ve=ze:ve=ze.slice(0,Math.min(ze.length,ue/Lt)):typeof at=="number"&&(ve=ze.slice(0,at)),ve},[ze,Lt,le,at,g]),h=(0,v.useMemo)(function(){return g?ze.slice(Jt+1):ze.slice(d.length)},[ze,d,g,Jt]),C=(0,v.useCallback)(function(ve,Be){var ut;return typeof pe=="function"?pe(ve):(ut=pe&&(ve==null?void 0:ve[pe]))!==null&&ut!==void 0?ut:Be},[pe]),T=(0,v.useCallback)(he||function(ve){return ve},[he]);function ne(ve,Be,ut){dn===ve&&(Be===void 0||Be===Fn)||(Wn(ve),ut||(pr(ve<ze.length-1),$==null||$(ve)),Be!==void 0&&En(Be))}function G(ve,Be){Re(Be.clientWidth)}function K(ve,Be){Ae(function(ut){var Ge=new Map(ut);return Be===null?Ge.delete(ve):Ge.set(ve,Be),Ge})}function ge(ve,Be){Qt(Be),Ce(Yt)}function ce(ve,Be){Bn(Be)}function Ze(ve){return me.get(C(d[ve],ve))}(0,oe.Z)(function(){if(ue&&typeof st=="number"&&d){var ve=un,Be=d.length,ut=Be-1;if(!Be){ne(0,null);return}for(var Ge=0;Ge<Be;Ge+=1){var ft=Ze(Ge);if(xe&&(ft=ft||0),ft===void 0){ne(Ge-1,void 0,!0);break}if(ve+=ft,ut===0&&ve<=ue||Ge===ut-1&&ve+Ze(ut)<=ue){ne(ut,null);break}else if(ve+st>ue){ne(Ge-1,ve-ft-un+Yt);break}}se&&Ze(0)+un>ue&&En(null)}},[ue,me,Yt,un,C,d]);var F=Sr&&!!h.length,V={};Fn!==null&&g&&(V={position:"absolute",left:Fn,top:0});var Ue={prefixCls:on,responsive:g,component:M,invalidate:B},Se=De?function(ve,Be){var ut=C(ve,Be);return v.createElement(Q.Provider,{key:ut,value:(0,w.Z)((0,w.Z)({},Ue),{},{order:Be,item:ve,itemKey:ut,registerSize:K,display:Be<=Jt})},De(ve,Be))}:function(ve,Be){var ut=C(ve,Be);return v.createElement(Pe,(0,P.Z)({},Ue,{order:Be,key:ut,item:ve,renderItem:T,itemKey:ut,registerSize:K,display:Be<=Jt}))},Ke={order:F?Jt:Number.MAX_SAFE_INTEGER,className:"".concat(on,"-rest"),registerSize:ge,display:F},Ne=Z||Oe,ht=Le?v.createElement(Q.Provider,{value:(0,w.Z)((0,w.Z)({},Ue),Ke)},Le(h)):v.createElement(Pe,(0,P.Z)({},Ue,Ke),typeof Ne=="function"?Ne(h):Ne),te=v.createElement(I,(0,P.Z)({className:N()(!B&&ie,Mt),style:et,ref:de},q),d.map(Se),k?ht:null,se&&v.createElement(Pe,(0,P.Z)({},Ue,{responsive:Ht,responsiveDisabled:!g,order:Jt,className:"".concat(on,"-suffix"),registerSize:ce,display:!0,style:V}),se));return Ht?v.createElement(be.Z,{onResize:G,disabled:!g},te):te}var Qe=v.forwardRef(mt);Qe.displayName="Overflow",Qe.Item=D,Qe.RESPONSIVE=ke,Qe.INVALIDATE=He;var Je=Qe,fe=Je},17115:function(rn,Te,f){"use strict";f.d(Te,{ZP:function(){return N}});var P=f(42978),w=f(59301),x=f(47273),W=0,v=(0,x.Z)();function A(){var be;return v?(be=W,W+=1):be="TEST_OR_SSR",be}function N(be){var oe=w.useState(),y=(0,P.Z)(oe,2),Me=y[0],H=y[1];return w.useEffect(function(){H("rc_select_".concat(A()))},[]),be||Me}},77861:function(rn,Te,f){"use strict";f.d(Te,{Ac:function(){return Re},Xo:function(){return Qt},Wx:function(){return xn},ZP:function(){return k},lk:function(){return Q}});var P=f(54476),w=f(94480),x=f(20068),W=f(33885),v=f(42978),A=f(75931),N=f(76190),be=f(18929),oe=f(48736),y=f(59301),Me=f(92310),H=f.n(Me),ye=f(34280),Pe=f(49658),J=f(10228),qe=f(8654),ot=function(h){var C=h.className,T=h.customizeIcon,ne=h.customizeIconProps,G=h.onMouseDown,K=h.onClick,ge=h.children,ce;return typeof T=="function"?ce=T(ne):ce=T,y.createElement("span",{className:C,onMouseDown:function(F){F.preventDefault(),G&&G(F)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:K,"aria-hidden":!0},ce!==void 0?ce:y.createElement("span",{className:H()(C.split(/\s+/).map(function(Ze){return"".concat(Ze,"-icon")}))},ge))},bt=ot;function It(d,h,C,T,ne){var G=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,K=arguments.length>6?arguments[6]:void 0,ge=arguments.length>7?arguments[7]:void 0,ce=y.useMemo(function(){if((0,N.Z)(T)==="object")return T.clearIcon;if(ne)return ne},[T,ne]),Ze=y.useMemo(function(){return!!(!G&&T&&(C.length||K)&&!(ge==="combobox"&&K===""))},[T,G,C.length,K,ge]);return{allowClear:Ze,clearIcon:y.createElement(bt,{className:"".concat(d,"-clear"),onMouseDown:h,customizeIcon:ce},"\xD7")}}var re=y.createContext(null);function Q(){return y.useContext(re)}function S(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,h=y.useState(!1),C=(0,v.Z)(h,2),T=C[0],ne=C[1],G=y.useRef(null),K=function(){window.clearTimeout(G.current)};y.useEffect(function(){return K},[]);var ge=function(Ze,F){K(),G.current=window.setTimeout(function(){ne(Ze),F&&F()},d)};return[T,ge,K]}function c(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,h=y.useRef(null),C=y.useRef(null);y.useEffect(function(){return function(){window.clearTimeout(C.current)}},[]);function T(ne){(ne||h.current===null)&&(h.current=ne),window.clearTimeout(C.current),C.current=window.setTimeout(function(){h.current=null},d)}return[function(){return h.current},T]}function b(d,h,C,T){var ne=y.useRef(null);ne.current={open:h,triggerOpen:C,customizedTrigger:T},y.useEffect(function(){function G(K){var ge;if(!((ge=ne.current)!==null&&ge!==void 0&&ge.customizedTrigger)){var ce=K.target;ce.shadowRoot&&K.composed&&(ce=K.composedPath()[0]||ce),ne.current.open&&d().filter(function(Ze){return Ze}).every(function(Ze){return!Ze.contains(ce)&&Ze!==ce})&&ne.current.triggerOpen(!1)}}return window.addEventListener("mousedown",G),function(){return window.removeEventListener("mousedown",G)}},[])}var L=f(26112),X=f(11780),D=function(h,C){var T,ne,G=h.prefixCls,K=h.id,ge=h.inputElement,ce=h.disabled,Ze=h.tabIndex,F=h.autoFocus,V=h.autoComplete,Ue=h.editable,Se=h.activeDescendantId,Ke=h.value,Ne=h.maxLength,ht=h.onKeyDown,te=h.onMouseDown,ve=h.onChange,Be=h.onPaste,ut=h.onCompositionStart,Ge=h.onCompositionEnd,ft=h.open,jt=h.attrs,Tt=ge||y.createElement("input",null),$t=Tt,Wt=$t.ref,Rt=$t.props,en=Rt.onKeyDown,Ut=Rt.onChange,kt=Rt.onMouseDown,Gt=Rt.onCompositionStart,Pt=Rt.onCompositionEnd,Ot=Rt.style;return(0,oe.Kp)(!("maxLength"in Tt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Tt=y.cloneElement(Tt,(0,W.Z)((0,W.Z)((0,W.Z)({type:"search"},Rt),{},{id:K,ref:(0,qe.sQ)(C,Wt),disabled:ce,tabIndex:Ze,autoComplete:V||"off",autoFocus:F,className:H()("".concat(G,"-selection-search-input"),(T=Tt)===null||T===void 0||(ne=T.props)===null||ne===void 0?void 0:ne.className),role:"combobox","aria-label":"Search","aria-expanded":ft||!1,"aria-haspopup":"listbox","aria-owns":"".concat(K,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(K,"_list"),"aria-activedescendant":ft?Se:void 0},jt),{},{value:Ue?Ke:"",maxLength:Ne,readOnly:!Ue,unselectable:Ue?null:"on",style:(0,W.Z)((0,W.Z)({},Ot),{},{opacity:Ue?null:0}),onKeyDown:function(Ft){ht(Ft),en&&en(Ft)},onMouseDown:function(Ft){te(Ft),kt&&kt(Ft)},onChange:function(Ft){ve(Ft),Ut&&Ut(Ft)},onCompositionStart:function(Ft){ut(Ft),Gt&&Gt(Ft)},onCompositionEnd:function(Ft){Ge(Ft),Pt&&Pt(Ft)},onPaste:Be})),Tt},we=y.forwardRef(D);we.displayName="Input";var ke=we;function He(d){return Array.isArray(d)?d:d!==void 0?[d]:[]}var Oe=typeof window!="undefined"&&window.document&&window.document.documentElement,mt=Oe;function Qe(d){return d!=null}function Je(d){return!d&&d!==0}function fe(d){return["string","number"].includes((0,N.Z)(d))}function Y(d){var h=void 0;return d&&(fe(d.title)?h=d.title.toString():fe(d.label)&&(h=d.label.toString())),h}function de(d,h){mt?y.useLayoutEffect(d,h):y.useEffect(d,h)}function ae(d){var h;return(h=d.key)!==null&&h!==void 0?h:d.value}var ie=function(h){h.preventDefault(),h.stopPropagation()},Ve=function(h){var C=h.id,T=h.prefixCls,ne=h.values,G=h.open,K=h.searchValue,ge=h.autoClearSearchValue,ce=h.inputRef,Ze=h.placeholder,F=h.disabled,V=h.mode,Ue=h.showSearch,Se=h.autoFocus,Ke=h.autoComplete,Ne=h.activeDescendantId,ht=h.tabIndex,te=h.removeIcon,ve=h.maxTagCount,Be=h.maxTagTextLength,ut=h.maxTagPlaceholder,Ge=ut===void 0?function(Bt){return"+ ".concat(Bt.length," ...")}:ut,ft=h.tagRender,jt=h.onToggleOpen,Tt=h.onRemove,$t=h.onInputChange,Wt=h.onInputPaste,Rt=h.onInputKeyDown,en=h.onInputMouseDown,Ut=h.onInputCompositionStart,kt=h.onInputCompositionEnd,Gt=y.useRef(null),Pt=(0,y.useState)(0),Ot=(0,v.Z)(Pt,2),zt=Ot[0],Ft=Ot[1],fn=(0,y.useState)(!1),Nt=(0,v.Z)(fn,2),Zt=Nt[0],an=Nt[1],Vt="".concat(T,"-selection"),wn=G||V==="multiple"&&ge===!1||V==="tags"?K:"",Un=V==="tags"||V==="multiple"&&ge===!1||Ue&&(G||Zt);de(function(){Ft(Gt.current.scrollWidth)},[wn]);function Dt(Bt,ln,gn,mn,Ln){return y.createElement("span",{className:H()("".concat(Vt,"-item"),(0,x.Z)({},"".concat(Vt,"-item-disabled"),gn)),title:Y(Bt)},y.createElement("span",{className:"".concat(Vt,"-item-content")},ln),mn&&y.createElement(bt,{className:"".concat(Vt,"-item-remove"),onMouseDown:ie,onClick:Ln,customizeIcon:te},"\xD7"))}function dt(Bt,ln,gn,mn,Ln){var Xe=function(yt){ie(yt),jt(!G)};return y.createElement("span",{onMouseDown:Xe},ft({label:ln,value:Bt,disabled:gn,closable:mn,onClose:Ln}))}function vt(Bt){var ln=Bt.disabled,gn=Bt.label,mn=Bt.value,Ln=!F&&!ln,Xe=gn;if(typeof Be=="number"&&(typeof gn=="string"||typeof gn=="number")){var _e=String(Xe);_e.length>Be&&(Xe="".concat(_e.slice(0,Be),"..."))}var yt=function(vn){vn&&vn.stopPropagation(),Tt(Bt)};return typeof ft=="function"?dt(mn,Xe,ln,Ln,yt):Dt(Bt,Xe,ln,Ln,yt)}function tn(Bt){var ln=typeof Ge=="function"?Ge(Bt):Ge;return Dt({title:ln},ln,!1)}var nn=y.createElement("div",{className:"".concat(Vt,"-search"),style:{width:zt},onFocus:function(){an(!0)},onBlur:function(){an(!1)}},y.createElement(ke,{ref:ce,open:G,prefixCls:T,id:C,inputElement:null,disabled:F,autoFocus:Se,autoComplete:Ke,editable:Un,activeDescendantId:Ne,value:wn,onKeyDown:Rt,onMouseDown:en,onChange:$t,onPaste:Wt,onCompositionStart:Ut,onCompositionEnd:kt,tabIndex:ht,attrs:(0,L.Z)(h,!0)}),y.createElement("span",{ref:Gt,className:"".concat(Vt,"-search-mirror"),"aria-hidden":!0},wn,"\xA0")),Xt=y.createElement(X.Z,{prefixCls:"".concat(Vt,"-overflow"),data:ne,renderItem:vt,renderRest:tn,suffix:nn,itemKey:ae,maxCount:ve});return y.createElement(y.Fragment,null,Xt,!ne.length&&!wn&&y.createElement("span",{className:"".concat(Vt,"-placeholder")},Ze))},ze=Ve,he=function(h){var C=h.inputElement,T=h.prefixCls,ne=h.id,G=h.inputRef,K=h.disabled,ge=h.autoFocus,ce=h.autoComplete,Ze=h.activeDescendantId,F=h.mode,V=h.open,Ue=h.values,Se=h.placeholder,Ke=h.tabIndex,Ne=h.showSearch,ht=h.searchValue,te=h.activeValue,ve=h.maxLength,Be=h.onInputKeyDown,ut=h.onInputMouseDown,Ge=h.onInputChange,ft=h.onInputPaste,jt=h.onInputCompositionStart,Tt=h.onInputCompositionEnd,$t=h.title,Wt=y.useState(!1),Rt=(0,v.Z)(Wt,2),en=Rt[0],Ut=Rt[1],kt=F==="combobox",Gt=kt||Ne,Pt=Ue[0],Ot=ht||"";kt&&te&&!en&&(Ot=te),y.useEffect(function(){kt&&Ut(!1)},[kt,te]);var zt=F!=="combobox"&&!V&&!Ne?!1:!!Ot,Ft=$t===void 0?Y(Pt):$t,fn=function(){if(Pt)return null;var Zt=zt?{visibility:"hidden"}:void 0;return y.createElement("span",{className:"".concat(T,"-selection-placeholder"),style:Zt},Se)};return y.createElement(y.Fragment,null,y.createElement("span",{className:"".concat(T,"-selection-search")},y.createElement(ke,{ref:G,prefixCls:T,id:ne,open:V,inputElement:C,disabled:K,autoFocus:ge,autoComplete:ce,editable:Gt,activeDescendantId:Ze,value:Ot,onKeyDown:Be,onMouseDown:ut,onChange:function(Zt){Ut(!0),Ge(Zt)},onPaste:ft,onCompositionStart:jt,onCompositionEnd:Tt,tabIndex:Ke,attrs:(0,L.Z)(h,!0),maxLength:kt?ve:void 0})),!kt&&Pt?y.createElement("span",{className:"".concat(T,"-selection-item"),title:Ft,style:zt?{visibility:"hidden"}:void 0},Pt.label):null,fn())},De=he;function pe(d){return![J.Z.ESC,J.Z.SHIFT,J.Z.BACKSPACE,J.Z.TAB,J.Z.WIN_KEY,J.Z.ALT,J.Z.META,J.Z.WIN_KEY_RIGHT,J.Z.CTRL,J.Z.SEMICOLON,J.Z.EQUALS,J.Z.CAPS_LOCK,J.Z.CONTEXT_MENU,J.Z.F1,J.Z.F2,J.Z.F3,J.Z.F4,J.Z.F5,J.Z.F6,J.Z.F7,J.Z.F8,J.Z.F9,J.Z.F10,J.Z.F11,J.Z.F12].includes(d)}var St=function(h,C){var T=(0,y.useRef)(null),ne=(0,y.useRef)(!1),G=h.prefixCls,K=h.open,ge=h.mode,ce=h.showSearch,Ze=h.tokenWithEnter,F=h.autoClearSearchValue,V=h.onSearch,Ue=h.onSearchSubmit,Se=h.onToggleOpen,Ke=h.onInputKeyDown,Ne=h.domRef;y.useImperativeHandle(C,function(){return{focus:function(){T.current.focus()},blur:function(){T.current.blur()}}});var ht=c(0),te=(0,v.Z)(ht,2),ve=te[0],Be=te[1],ut=function(Ot){var zt=Ot.which;(zt===J.Z.UP||zt===J.Z.DOWN)&&Ot.preventDefault(),Ke&&Ke(Ot),zt===J.Z.ENTER&&ge==="tags"&&!ne.current&&!K&&(Ue==null||Ue(Ot.target.value)),pe(zt)&&Se(!0)},Ge=function(){Be(!0)},ft=(0,y.useRef)(null),jt=function(Ot){V(Ot,!0,ne.current)!==!1&&Se(!0)},Tt=function(){ne.current=!0},$t=function(Ot){ne.current=!1,ge!=="combobox"&&jt(Ot.target.value)},Wt=function(Ot){var zt=Ot.target.value;if(Ze&&ft.current&&/[\r\n]/.test(ft.current)){var Ft=ft.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");zt=zt.replace(Ft,ft.current)}ft.current=null,jt(zt)},Rt=function(Ot){var zt=Ot.clipboardData,Ft=zt.getData("text");ft.current=Ft},en=function(Ot){var zt=Ot.target;if(zt!==T.current){var Ft=document.body.style.msTouchAction!==void 0;Ft?setTimeout(function(){T.current.focus()}):T.current.focus()}},Ut=function(Ot){var zt=ve();Ot.target!==T.current&&!zt&&ge!=="combobox"&&Ot.preventDefault(),(ge!=="combobox"&&(!ce||!zt)||!K)&&(K&&F!==!1&&V("",!0,!1),Se())},kt={inputRef:T,onInputKeyDown:ut,onInputMouseDown:Ge,onInputChange:Wt,onInputPaste:Rt,onInputCompositionStart:Tt,onInputCompositionEnd:$t},Gt=ge==="multiple"||ge==="tags"?y.createElement(ze,(0,P.Z)({},h,kt)):y.createElement(De,(0,P.Z)({},h,kt));return y.createElement("div",{ref:Ne,className:"".concat(G,"-selector"),onClick:en,onMouseDown:Ut},Gt)},Lt=y.forwardRef(St);Lt.displayName="Selector";var xt=Lt,et=f(35593),Mt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],at=function(h){var C=h===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"}}},Z=function(h,C){var T=h.prefixCls,ne=h.disabled,G=h.visible,K=h.children,ge=h.popupElement,ce=h.animation,Ze=h.transitionName,F=h.dropdownStyle,V=h.dropdownClassName,Ue=h.direction,Se=Ue===void 0?"ltr":Ue,Ke=h.placement,Ne=h.builtinPlacements,ht=h.dropdownMatchSelectWidth,te=h.dropdownRender,ve=h.dropdownAlign,Be=h.getPopupContainer,ut=h.empty,Ge=h.getTriggerDOMNode,ft=h.onPopupVisibleChange,jt=h.onPopupMouseEnter,Tt=(0,A.Z)(h,Mt),$t="".concat(T,"-dropdown"),Wt=ge;te&&(Wt=te(ge));var Rt=y.useMemo(function(){return Ne||at(ht)},[Ne,ht]),en=ce?"".concat($t,"-").concat(ce):Ze,Ut=typeof ht=="number",kt=y.useMemo(function(){return Ut?null:ht===!1?"minWidth":"width"},[ht,Ut]),Gt=F;Ut&&(Gt=(0,W.Z)((0,W.Z)({},Gt),{},{width:ht}));var Pt=y.useRef(null);return y.useImperativeHandle(C,function(){return{getPopupElement:function(){return Pt.current}}}),y.createElement(et.Z,(0,P.Z)({},Tt,{showAction:ft?["click"]:[],hideAction:ft?["click"]:[],popupPlacement:Ke||(Se==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Rt,prefixCls:$t,popupTransitionName:en,popup:y.createElement("div",{ref:Pt,onMouseEnter:jt},Wt),stretch:kt,popupAlign:ve,popupVisible:G,getPopupContainer:Be,popupClassName:H()(V,(0,x.Z)({},"".concat($t,"-empty"),ut)),popupStyle:Gt,getTriggerDOMNode:Ge,onPopupVisibleChange:ft}),K)},Le=y.forwardRef(Z);Le.displayName="SelectTrigger";var se=Le,E=f(66712);function I(d,h){var C=d.key,T;return"value"in d&&(T=d.value),C!=null?C:T!==void 0?T:"rc-index-key-".concat(h)}function M(d,h){var C=d||{},T=C.label,ne=C.value,G=C.options,K=C.groupLabel,ge=T||(h?"children":"label");return{label:ge,value:ne||"value",options:G||"options",groupLabel:K||ge}}function $(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=h.fieldNames,T=h.childrenAsData,ne=[],G=M(C,!1),K=G.label,ge=G.value,ce=G.options,Ze=G.groupLabel;function F(V,Ue){V.forEach(function(Se){if(Ue||!(ce in Se)){var Ke=Se[ge];ne.push({key:I(Se,ne.length),groupOption:Ue,data:Se,label:Se[K],value:Ke})}else{var Ne=Se[Ze];Ne===void 0&&T&&(Ne=Se.label),ne.push({key:I(Se,ne.length),group:!0,data:Se,label:Ne}),F(Se[ce],!0)}})}return F(d,!1),ne}function q(d){var h=(0,W.Z)({},d);return"props"in h||Object.defineProperty(h,"props",{get:function(){return(0,oe.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),h}}),h}function xe(d,h){if(!h||!h.length)return null;var C=!1;function T(G,K){var ge=(0,E.Z)(K),ce=ge[0],Ze=ge.slice(1);if(!ce)return[G];var F=G.split(ce);return C=C||F.length>1,F.reduce(function(V,Ue){return[].concat((0,w.Z)(V),(0,w.Z)(T(Ue,Ze)))},[]).filter(function(V){return V})}var ne=T(d,h);return C?ne:null}var _=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Fe=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function z(d){return d==="tags"||d==="multiple"}var le=y.forwardRef(function(d,h){var C,T,ne=d.id,G=d.prefixCls,K=d.className,ge=d.showSearch,ce=d.tagRender,Ze=d.direction,F=d.omitDomProps,V=d.displayValues,Ue=d.onDisplayValuesChange,Se=d.emptyOptions,Ke=d.notFoundContent,Ne=Ke===void 0?"Not Found":Ke,ht=d.onClear,te=d.mode,ve=d.disabled,Be=d.loading,ut=d.getInputElement,Ge=d.getRawInputElement,ft=d.open,jt=d.defaultOpen,Tt=d.onDropdownVisibleChange,$t=d.activeValue,Wt=d.onActiveValueChange,Rt=d.activeDescendantId,en=d.searchValue,Ut=d.autoClearSearchValue,kt=d.onSearch,Gt=d.onSearchSplit,Pt=d.tokenSeparators,Ot=d.allowClear,zt=d.suffixIcon,Ft=d.clearIcon,fn=d.OptionList,Nt=d.animation,Zt=d.transitionName,an=d.dropdownStyle,Vt=d.dropdownClassName,wn=d.dropdownMatchSelectWidth,Un=d.dropdownRender,Dt=d.dropdownAlign,dt=d.placement,vt=d.builtinPlacements,tn=d.getPopupContainer,nn=d.showAction,Xt=nn===void 0?[]:nn,Bt=d.onFocus,ln=d.onBlur,gn=d.onKeyUp,mn=d.onKeyDown,Ln=d.onMouseDown,Xe=(0,A.Z)(d,_),_e=z(te),yt=(ge!==void 0?ge:_e)||te==="combobox",Ct=(0,W.Z)({},Xe);Fe.forEach(function(qt){delete Ct[qt]}),F==null||F.forEach(function(qt){delete Ct[qt]});var vn=y.useState(!1),xr=(0,v.Z)(vn,2),_n=xr[0],Kn=xr[1];y.useEffect(function(){Kn((0,Pe.Z)())},[]);var An=y.useRef(null),kn=y.useRef(null),Mn=y.useRef(null),sr=y.useRef(null),qn=y.useRef(null),tr=S(),_r=(0,v.Z)(tr,3),Xr=_r[0],li=_r[1],Yr=_r[2];y.useImperativeHandle(h,function(){var qt,_t;return{focus:(qt=sr.current)===null||qt===void 0?void 0:qt.focus,blur:(_t=sr.current)===null||_t===void 0?void 0:_t.blur,scrollTo:function(nr){var On;return(On=qn.current)===null||On===void 0?void 0:On.scrollTo(nr)}}});var Cr=y.useMemo(function(){var qt;if(te!=="combobox")return en;var _t=(qt=V[0])===null||qt===void 0?void 0:qt.value;return typeof _t=="string"||typeof _t=="number"?String(_t):""},[en,te,V]),Qr=te==="combobox"&&typeof ut=="function"&&ut()||null,Ir=typeof Ge=="function"&&Ge(),Hi=(0,qe.x1)(kn,Ir==null||(C=Ir.props)===null||C===void 0?void 0:C.ref),Si=y.useState(!1),si=(0,v.Z)(Si,2),Kr=si[0],xi=si[1];(0,ye.Z)(function(){xi(!0)},[]);var Ci=(0,be.Z)(!1,{defaultValue:jt,value:ft}),jr=(0,v.Z)(Ci,2),Ar=jr[0],ui=jr[1],pt=Kr?Ar:!1,At=!Ne&&Se;(ve||At&&pt&&te==="combobox")&&(pt=!1);var Et=At?!1:pt,ct=y.useCallback(function(qt){var _t=qt!==void 0?qt:!pt;ve||(ui(_t),pt!==_t&&(Tt==null||Tt(_t)))},[ve,pt,ui,Tt]),yn=y.useMemo(function(){return(Pt||[]).some(function(qt){return[`
|
|
|
`,`\r
|
|
|
`].includes(qt)})},[Pt]),bn=function(_t,Vn,nr){var On=!0,or=_t;Wt==null||Wt(null);var gr=nr?null:xe(_t,Pt);return te!=="combobox"&&gr&&(or="",Gt==null||Gt(gr),ct(!1),On=!1),kt&&Cr!==or&&kt(or,{source:Vn?"typing":"effect"}),On},ur=function(_t){!_t||!_t.trim()||kt(_t,{source:"submit"})};y.useEffect(function(){!pt&&!_e&&te!=="combobox"&&bn("",!1,!1)},[pt]),y.useEffect(function(){Ar&&ve&&ui(!1),ve&&li(!1)},[ve]);var Mr=c(),Nr=(0,v.Z)(Mr,2),Gn=Nr[0],Rr=Nr[1],ci=function(_t){var Vn=Gn(),nr=_t.which;if(nr===J.Z.ENTER&&(te!=="combobox"&&_t.preventDefault(),pt||ct(!0)),Rr(!!Cr),nr===J.Z.BACKSPACE&&!Vn&&_e&&!Cr&&V.length){for(var On=(0,w.Z)(V),or=null,gr=On.length-1;gr>=0;gr-=1){var Ur=On[gr];if(!Ur.disabled){On.splice(gr,1),or=Ur;break}}or&&Ue(On,{type:"remove",values:[or]})}for(var Er=arguments.length,kr=new Array(Er>1?Er-1:0),Pr=1;Pr<Er;Pr++)kr[Pr-1]=arguments[Pr];if(pt&&qn.current){var mr;(mr=qn.current).onKeyDown.apply(mr,[_t].concat(kr))}mn==null||mn.apply(void 0,[_t].concat(kr))},Zi=function(_t){for(var Vn=arguments.length,nr=new Array(Vn>1?Vn-1:0),On=1;On<Vn;On++)nr[On-1]=arguments[On];if(pt&&qn.current){var or;(or=qn.current).onKeyUp.apply(or,[_t].concat(nr))}gn==null||gn.apply(void 0,[_t].concat(nr))},mo=function(_t){var Vn=V.filter(function(nr){return nr!==_t});Ue(Vn,{type:"remove",values:[_t]})},zr=y.useRef(!1),Fr=function(){li(!0),ve||(Bt&&!zr.current&&Bt.apply(void 0,arguments),Xt.includes("focus")&&ct(!0)),zr.current=!0},Zo=function(){li(!1,function(){zr.current=!1,ct(!1)}),!ve&&(Cr&&(te==="tags"?kt(Cr,{source:"submit"}):te==="multiple"&&kt("",{source:"blur"})),ln&&ln.apply(void 0,arguments))},Lr=[];y.useEffect(function(){return function(){Lr.forEach(function(qt){return clearTimeout(qt)}),Lr.splice(0,Lr.length)}},[]);var Br=function(_t){var Vn,nr=_t.target,On=(Vn=Mn.current)===null||Vn===void 0?void 0:Vn.getPopupElement();if(On&&On.contains(nr)){var or=setTimeout(function(){var kr=Lr.indexOf(or);if(kr!==-1&&Lr.splice(kr,1),Yr(),!_n&&!On.contains(document.activeElement)){var Pr;(Pr=sr.current)===null||Pr===void 0||Pr.focus()}});Lr.push(or)}for(var gr=arguments.length,Ur=new Array(gr>1?gr-1:0),Er=1;Er<gr;Er++)Ur[Er-1]=arguments[Er];Ln==null||Ln.apply(void 0,[_t].concat(Ur))},Ei=y.useState({}),_i=(0,v.Z)(Ei,2),yo=_i[1];function Dr(){yo({})}var Hr;Ir&&(Hr=function(_t){ct(_t)}),b(function(){var qt;return[An.current,(qt=Mn.current)===null||qt===void 0?void 0:qt.getPopupElement()]},Et,ct,!!Ir);var Ki=y.useMemo(function(){return(0,W.Z)((0,W.Z)({},d),{},{notFoundContent:Ne,open:pt,triggerOpen:Et,id:ne,showSearch:yt,multiple:_e,toggleOpen:ct})},[d,Ne,Et,pt,ne,yt,_e,ct]),bo=!!zt||Be,ji;bo&&(ji=y.createElement(bt,{className:H()("".concat(G,"-arrow"),(0,x.Z)({},"".concat(G,"-arrow-loading"),Be)),customizeIcon:zt,customizeIconProps:{loading:Be,searchValue:Cr,open:pt,focused:Xr,showSearch:yt}}));var _o=function(){var _t;ht==null||ht(),(_t=sr.current)===null||_t===void 0||_t.focus(),Ue([],{type:"clear",values:V}),bn("",!1,!1)},Ui=It(G,_o,V,Ot,Ft,ve,Cr,te),ki=Ui.allowClear,Jr=Ui.clearIcon,Tr=y.createElement(fn,{ref:qn}),So=H()(G,K,(T={},(0,x.Z)(T,"".concat(G,"-focused"),Xr),(0,x.Z)(T,"".concat(G,"-multiple"),_e),(0,x.Z)(T,"".concat(G,"-single"),!_e),(0,x.Z)(T,"".concat(G,"-allow-clear"),Ot),(0,x.Z)(T,"".concat(G,"-show-arrow"),bo),(0,x.Z)(T,"".concat(G,"-disabled"),ve),(0,x.Z)(T,"".concat(G,"-loading"),Be),(0,x.Z)(T,"".concat(G,"-open"),pt),(0,x.Z)(T,"".concat(G,"-customize-input"),Qr),(0,x.Z)(T,"".concat(G,"-show-search"),yt),T)),Gi=y.createElement(se,{ref:Mn,disabled:ve,prefixCls:G,visible:Et,popupElement:Tr,animation:Nt,transitionName:Zt,dropdownStyle:an,dropdownClassName:Vt,direction:Ze,dropdownMatchSelectWidth:wn,dropdownRender:Un,dropdownAlign:Dt,placement:dt,builtinPlacements:vt,getPopupContainer:tn,empty:Se,getTriggerDOMNode:function(){return kn.current},onPopupVisibleChange:Hr,onPopupMouseEnter:Dr},Ir?y.cloneElement(Ir,{ref:Hi}):y.createElement(xt,(0,P.Z)({},d,{domRef:kn,prefixCls:G,inputElement:Qr,ref:sr,id:ne,showSearch:yt,autoClearSearchValue:Ut,mode:te,activeDescendantId:Rt,tagRender:ce,values:V,open:pt,onToggleOpen:ct,activeValue:$t,searchValue:Cr,onSearch:bn,onSearchSubmit:ur,onRemove:mo,tokenWithEnter:yn}))),Vi;return Ir?Vi=Gi:Vi=y.createElement("div",(0,P.Z)({className:So},Ct,{ref:An,onMouseDown:Br,onKeyDown:ci,onKeyUp:Zi,onFocus:Fr,onBlur:Zo}),Xr&&!pt&&y.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(V.map(function(qt){var _t=qt.label,Vn=qt.value;return["number","string"].includes((0,N.Z)(_t))?_t:Vn}).join(", "))),Gi,ji,ki&&Jr),y.createElement(re.Provider,{value:Ki},Vi)}),Re=le,ue=function(d,h){var C=y.useRef({values:new Map,options:new Map}),T=y.useMemo(function(){var G=C.current,K=G.values,ge=G.options,ce=d.map(function(V){if(V.label===void 0){var Ue;return(0,W.Z)((0,W.Z)({},V),{},{label:(Ue=K.get(V.value))===null||Ue===void 0?void 0:Ue.label})}return V}),Ze=new Map,F=new Map;return ce.forEach(function(V){Ze.set(V.value,V),F.set(V.value,h.get(V.value)||ge.get(V.value))}),C.current.values=Ze,C.current.options=F,ce},[d,h]),ne=y.useCallback(function(G){return h.get(G)||C.current.options.get(G)},[h]);return[T,ne]};function Ie(d,h){return He(d).join("").toUpperCase().includes(h)}var U=function(d,h,C,T,ne){return y.useMemo(function(){if(!C||T===!1)return d;var G=h.options,K=h.label,ge=h.value,ce=[],Ze=typeof T=="function",F=C.toUpperCase(),V=Ze?T:function(Se,Ke){return ne?Ie(Ke[ne],F):Ke[G]?Ie(Ke[K!=="children"?K:"label"],F):Ie(Ke[ge],F)},Ue=Ze?function(Se){return q(Se)}:function(Se){return Se};return d.forEach(function(Se){if(Se[G]){var Ke=V(C,Ue(Se));if(Ke)ce.push(Se);else{var Ne=Se[G].filter(function(ht){return V(C,Ue(ht))});Ne.length&&ce.push((0,W.Z)((0,W.Z)({},Se),{},(0,x.Z)({},G,Ne)))}return}V(C,Ue(Se))&&ce.push(Se)}),ce},[d,T,ne,C,h])},me=f(17115),Ae=f(11592),tt=["children","value"],it=["children"];function je(d){var h=d,C=h.key,T=h.props,ne=T.children,G=T.value,K=(0,A.Z)(T,tt);return(0,W.Z)({key:C,value:G!==void 0?G:C,children:ne},K)}function Ce(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Ae.Z)(d).map(function(C,T){if(!y.isValidElement(C)||!C.type)return null;var ne=C,G=ne.type.isSelectOptGroup,K=ne.key,ge=ne.props,ce=ge.children,Ze=(0,A.Z)(ge,it);return h||!G?je(C):(0,W.Z)((0,W.Z)({key:"__RC_SELECT_GRP__".concat(K===null?T:K,"__"),label:K},Ze),{},{options:Ce(ce)})}).filter(function(C){return C})}function rt(d,h,C,T,ne){return y.useMemo(function(){var G=d,K=!d;K&&(G=Ce(h));var ge=new Map,ce=new Map,Ze=function(Ue,Se,Ke){Ke&&typeof Ke=="string"&&Ue.set(Se[Ke],Se)};function F(V){for(var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=0;Se<V.length;Se+=1){var Ke=V[Se];!Ke[C.options]||Ue?(ge.set(Ke[C.value],Ke),Ze(ce,Ke,C.label),Ze(ce,Ke,T),Ze(ce,Ke,ne)):F(Ke[C.options],!0)}}return F(G),{options:G,valueOptions:ge,labelOptions:ce}},[d,h,C,T,ne])}function lt(d){var h=y.useRef();h.current=d;var C=y.useCallback(function(){return h.current.apply(h,arguments)},[]);return C}var Yt=function(){return null};Yt.isSelectOptGroup=!0;var Qt=Yt,sn=function(){return null};sn.isSelectOption=!0;var xn=sn,un=f(80547),Bn=f(2738),$n=f(48911),pn=y.createContext(null),Fn=pn;function En(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var In=["disabled","title","children","style","className"];function Cn(d){return typeof d=="string"||typeof d=="number"}var dn=function(h,C){var T=Q(),ne=T.prefixCls,G=T.id,K=T.open,ge=T.multiple,ce=T.mode,Ze=T.searchValue,F=T.toggleOpen,V=T.notFoundContent,Ue=T.onPopupScroll,Se=y.useContext(Fn),Ke=Se.flattenOptions,Ne=Se.onActiveValue,ht=Se.defaultActiveFirstOption,te=Se.onSelect,ve=Se.menuItemSelectedIcon,Be=Se.rawValues,ut=Se.fieldNames,Ge=Se.virtual,ft=Se.direction,jt=Se.listHeight,Tt=Se.listItemHeight,$t="".concat(ne,"-item"),Wt=(0,un.Z)(function(){return Ke},[K,Ke],function(Dt,dt){return dt[0]&&Dt[1]!==dt[1]}),Rt=y.useRef(null),en=function(dt){dt.preventDefault()},Ut=function(dt){Rt.current&&Rt.current.scrollTo(typeof dt=="number"?{index:dt}:dt)},kt=function(dt){for(var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,tn=Wt.length,nn=0;nn<tn;nn+=1){var Xt=(dt+nn*vt+tn)%tn,Bt=Wt[Xt],ln=Bt.group,gn=Bt.data;if(!ln&&!gn.disabled)return Xt}return-1},Gt=y.useState(function(){return kt(0)}),Pt=(0,v.Z)(Gt,2),Ot=Pt[0],zt=Pt[1],Ft=function(dt){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;zt(dt);var tn={source:vt?"keyboard":"mouse"},nn=Wt[dt];if(!nn){Ne(null,-1,tn);return}Ne(nn.value,dt,tn)};(0,y.useEffect)(function(){Ft(ht!==!1?kt(0):-1)},[Wt.length,Ze]);var fn=y.useCallback(function(Dt){return Be.has(Dt)&&ce!=="combobox"},[ce,(0,w.Z)(Be).toString(),Be.size]);(0,y.useEffect)(function(){var Dt=setTimeout(function(){if(!ge&&K&&Be.size===1){var vt=Array.from(Be)[0],tn=Wt.findIndex(function(nn){var Xt=nn.data;return Xt.value===vt});tn!==-1&&(Ft(tn),Ut(tn))}});if(K){var dt;(dt=Rt.current)===null||dt===void 0||dt.scrollTo(void 0)}return function(){return clearTimeout(Dt)}},[K,Ze,Ke.length]);var Nt=function(dt){dt!==void 0&&te(dt,{selected:!Be.has(dt)}),ge||F(!1)};if(y.useImperativeHandle(C,function(){return{onKeyDown:function(dt){var vt=dt.which,tn=dt.ctrlKey;switch(vt){case J.Z.N:case J.Z.P:case J.Z.UP:case J.Z.DOWN:{var nn=0;if(vt===J.Z.UP?nn=-1:vt===J.Z.DOWN?nn=1:En()&&tn&&(vt===J.Z.N?nn=1:vt===J.Z.P&&(nn=-1)),nn!==0){var Xt=kt(Ot+nn,nn);Ut(Xt),Ft(Xt,!0)}break}case J.Z.ENTER:{var Bt=Wt[Ot];Bt&&!Bt.data.disabled?Nt(Bt.value):Nt(void 0),K&&dt.preventDefault();break}case J.Z.ESC:F(!1),K&&dt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(dt){Ut(dt)}}}),Wt.length===0)return y.createElement("div",{role:"listbox",id:"".concat(G,"_list"),className:"".concat($t,"-empty"),onMouseDown:en},V);var Zt=Object.keys(ut).map(function(Dt){return ut[Dt]}),an=function(dt){return dt.label};function Vt(Dt,dt){var vt=Dt.group;return{role:vt?"presentation":"option",id:"".concat(G,"_list_").concat(dt)}}var wn=function(dt){var vt=Wt[dt];if(!vt)return null;var tn=vt.data||{},nn=tn.value,Xt=vt.group,Bt=(0,L.Z)(tn,!0),ln=an(vt);return vt?y.createElement("div",(0,P.Z)({"aria-label":typeof ln=="string"&&!Xt?ln:null},Bt,{key:dt},Vt(vt,dt),{"aria-selected":fn(nn)}),nn):null},Un={role:"listbox",id:"".concat(G,"_list")};return y.createElement(y.Fragment,null,Ge&&y.createElement("div",(0,P.Z)({},Un,{style:{height:0,width:0,overflow:"hidden"}}),wn(Ot-1),wn(Ot),wn(Ot+1)),y.createElement($n.Z,{itemKey:"key",ref:Rt,data:Wt,height:jt,itemHeight:Tt,fullHeight:!1,onMouseDown:en,onScroll:Ue,virtual:Ge,direction:ft,innerProps:Ge?null:Un},function(Dt,dt){var vt,tn=Dt.group,nn=Dt.groupOption,Xt=Dt.data,Bt=Dt.label,ln=Dt.value,gn=Xt.key;if(tn){var mn,Ln=(mn=Xt.title)!==null&&mn!==void 0?mn:Cn(Bt)?Bt.toString():void 0;return y.createElement("div",{className:H()($t,"".concat($t,"-group")),title:Ln},Bt!==void 0?Bt:gn)}var Xe=Xt.disabled,_e=Xt.title,yt=Xt.children,Ct=Xt.style,vn=Xt.className,xr=(0,A.Z)(Xt,In),_n=(0,Bn.Z)(xr,Zt),Kn=fn(ln),An="".concat($t,"-option"),kn=H()($t,An,vn,(vt={},(0,x.Z)(vt,"".concat(An,"-grouped"),nn),(0,x.Z)(vt,"".concat(An,"-active"),Ot===dt&&!Xe),(0,x.Z)(vt,"".concat(An,"-disabled"),Xe),(0,x.Z)(vt,"".concat(An,"-selected"),Kn),vt)),Mn=an(Dt),sr=!ve||typeof ve=="function"||Kn,qn=typeof Mn=="number"?Mn:Mn||ln,tr=Cn(qn)?qn.toString():void 0;return _e!==void 0&&(tr=_e),y.createElement("div",(0,P.Z)({},(0,L.Z)(_n),Ge?{}:Vt(Dt,dt),{"aria-selected":Kn,className:kn,title:tr,onMouseMove:function(){Ot===dt||Xe||Ft(dt)},onClick:function(){Xe||Nt(ln)},style:Ct}),y.createElement("div",{className:"".concat(An,"-content")},qn),y.isValidElement(ve)||Kn,sr&&y.createElement(bt,{className:"".concat($t,"-option-state"),customizeIcon:ve,customizeIconProps:{isSelected:Kn}},Kn?"\u2713":null))}))},Wn=y.forwardRef(dn);Wn.displayName="OptionList";var Jt=Wn;function Pn(d){var h=d.mode,C=d.options,T=d.children,ne=d.backfill,G=d.allowClear,K=d.placeholder,ge=d.getInputElement,ce=d.showSearch,Ze=d.onSearch,F=d.defaultOpen,V=d.autoFocus,Ue=d.labelInValue,Se=d.value,Ke=d.inputValue,Ne=d.optionLabelProp,ht=isMultiple(h),te=ce!==void 0?ce:ht||h==="combobox",ve=C||convertChildrenToData(T);if(warning(h!=="tags"||ve.every(function(ft){return!ft.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),h==="tags"||h==="combobox"){var Be=ve.some(function(ft){return ft.options?ft.options.some(function(jt){return typeof("value"in jt?jt.value:jt.key)=="number"}):typeof("value"in ft?ft.value:ft.key)=="number"});warning(!Be,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(h!=="combobox"||!Ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(h==="combobox"||!ne,"`backfill` only works with `combobox` mode."),warning(h==="combobox"||!ge,"`getInputElement` only work with `combobox` mode."),noteOnce(h!=="combobox"||!ge||!G||!K,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ze&&!te&&h!=="combobox"&&h!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!F||V,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Se!=null){var ut=toArray(Se);warning(!Ue||ut.every(function(ft){return _typeof(ft)==="object"&&("key"in ft||"value"in ft)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ht||Array.isArray(Se),"`value` should be array when `mode` is `multiple` or `tags`")}if(T){var Ge=null;toNodeArray(T).some(function(ft){if(!React.isValidElement(ft)||!ft.type)return!1;var jt=ft,Tt=jt.type;if(Tt.isSelectOption)return!1;if(Tt.isSelectOptGroup){var $t=toNodeArray(ft.props.children).every(function(Wt){return!React.isValidElement(Wt)||!ft.type||Wt.type.isSelectOption?!0:(Ge=Wt.type,!1)});return!$t}return Ge=Tt,!0}),Ge&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ge.displayName||Ge.name||Ge,"`.")),warning(Ke===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function zn(d,h){if(d){var C=function T(ne){for(var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,K=0;K<ne.length;K++){var ge=ne[K];if(ge[h==null?void 0:h.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!G&&Array.isArray(ge[h==null?void 0:h.options])&&T(ge[h==null?void 0:h.options],!0))break}};C(d)}}var Sr=null,pr=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],on=["inputValue"];function st(d){return!d||(0,N.Z)(d)!=="object"}var Ht=y.forwardRef(function(d,h){var C=d.id,T=d.mode,ne=d.prefixCls,G=ne===void 0?"rc-select":ne,K=d.backfill,ge=d.fieldNames,ce=d.inputValue,Ze=d.searchValue,F=d.onSearch,V=d.autoClearSearchValue,Ue=V===void 0?!0:V,Se=d.onSelect,Ke=d.onDeselect,Ne=d.dropdownMatchSelectWidth,ht=Ne===void 0?!0:Ne,te=d.filterOption,ve=d.filterSort,Be=d.optionFilterProp,ut=d.optionLabelProp,Ge=d.options,ft=d.children,jt=d.defaultActiveFirstOption,Tt=d.menuItemSelectedIcon,$t=d.virtual,Wt=d.direction,Rt=d.listHeight,en=Rt===void 0?200:Rt,Ut=d.listItemHeight,kt=Ut===void 0?20:Ut,Gt=d.value,Pt=d.defaultValue,Ot=d.labelInValue,zt=d.onChange,Ft=(0,A.Z)(d,pr),fn=(0,me.ZP)(C),Nt=z(T),Zt=!!(!Ge&&ft),an=y.useMemo(function(){return te===void 0&&T==="combobox"?!1:te},[te,T]),Vt=y.useMemo(function(){return M(ge,Zt)},[JSON.stringify(ge),Zt]),wn=(0,be.Z)("",{value:Ze!==void 0?Ze:ce,postState:function(At){return At||""}}),Un=(0,v.Z)(wn,2),Dt=Un[0],dt=Un[1],vt=rt(Ge,ft,Vt,Be,ut),tn=vt.valueOptions,nn=vt.labelOptions,Xt=vt.options,Bt=y.useCallback(function(pt){var At=He(pt);return At.map(function(Et){var ct,yn,bn,ur,Mr;if(st(Et))ct=Et;else{var Nr;bn=Et.key,yn=Et.label,ct=(Nr=Et.value)!==null&&Nr!==void 0?Nr:bn}var Gn=tn.get(ct);if(Gn){var Rr;if(yn===void 0&&(yn=Gn==null?void 0:Gn[ut||Vt.label]),bn===void 0&&(bn=(Rr=Gn==null?void 0:Gn.key)!==null&&Rr!==void 0?Rr:ct),ur=Gn==null?void 0:Gn.disabled,Mr=Gn==null?void 0:Gn.title,0)var ci}return{label:yn,value:ct,key:bn,disabled:ur,title:Mr}})},[Vt,ut,tn]),ln=(0,be.Z)(Pt,{value:Gt}),gn=(0,v.Z)(ln,2),mn=gn[0],Ln=gn[1],Xe=y.useMemo(function(){var pt,At=Bt(mn);return T==="combobox"&&Je((pt=At[0])===null||pt===void 0?void 0:pt.value)?[]:At},[mn,Bt,T]),_e=ue(Xe,tn),yt=(0,v.Z)(_e,2),Ct=yt[0],vn=yt[1],xr=y.useMemo(function(){if(!T&&Ct.length===1){var pt=Ct[0];if(pt.value===null&&(pt.label===null||pt.label===void 0))return[]}return Ct.map(function(At){var Et;return(0,W.Z)((0,W.Z)({},At),{},{label:(Et=At.label)!==null&&Et!==void 0?Et:At.value})})},[T,Ct]),_n=y.useMemo(function(){return new Set(Ct.map(function(pt){return pt.value}))},[Ct]);y.useEffect(function(){if(T==="combobox"){var pt,At=(pt=Ct[0])===null||pt===void 0?void 0:pt.value;dt(Qe(At)?String(At):"")}},[Ct]);var Kn=lt(function(pt,At){var Et,ct=At!=null?At:pt;return Et={},(0,x.Z)(Et,Vt.value,pt),(0,x.Z)(Et,Vt.label,ct),Et}),An=y.useMemo(function(){if(T!=="tags")return Xt;var pt=(0,w.Z)(Xt),At=function(ct){return tn.has(ct)};return(0,w.Z)(Ct).sort(function(Et,ct){return Et.value<ct.value?-1:1}).forEach(function(Et){var ct=Et.value;At(ct)||pt.push(Kn(ct,Et.label))}),pt},[Kn,Xt,tn,Ct,T]),kn=U(An,Vt,Dt,an,Be),Mn=y.useMemo(function(){return T!=="tags"||!Dt||kn.some(function(pt){return pt[Be||"value"]===Dt})||kn.some(function(pt){return pt[Vt.value]===Dt})?kn:[Kn(Dt)].concat((0,w.Z)(kn))},[Kn,Be,T,kn,Dt,Vt]),sr=y.useMemo(function(){return ve?(0,w.Z)(Mn).sort(function(pt,At){return ve(pt,At)}):Mn},[Mn,ve]),qn=y.useMemo(function(){return $(sr,{fieldNames:Vt,childrenAsData:Zt})},[sr,Vt,Zt]),tr=function(At){var Et=Bt(At);if(Ln(Et),zt&&(Et.length!==Ct.length||Et.some(function(bn,ur){var Mr;return((Mr=Ct[ur])===null||Mr===void 0?void 0:Mr.value)!==(bn==null?void 0:bn.value)}))){var ct=Ot?Et:Et.map(function(bn){return bn.value}),yn=Et.map(function(bn){return q(vn(bn.value))});zt(Nt?ct:ct[0],Nt?yn:yn[0])}},_r=y.useState(null),Xr=(0,v.Z)(_r,2),li=Xr[0],Yr=Xr[1],Cr=y.useState(0),Qr=(0,v.Z)(Cr,2),Ir=Qr[0],Hi=Qr[1],Si=jt!==void 0?jt:T!=="combobox",si=y.useCallback(function(pt,At){var Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ct=Et.source,yn=ct===void 0?"keyboard":ct;Hi(At),K&&T==="combobox"&&pt!==null&&yn==="keyboard"&&Yr(String(pt))},[K,T]),Kr=function(At,Et,ct){var yn=function(){var zr,Fr=vn(At);return[Ot?{label:Fr==null?void 0:Fr[Vt.label],value:At,key:(zr=Fr==null?void 0:Fr.key)!==null&&zr!==void 0?zr:At}:At,q(Fr)]};if(Et&&Se){var bn=yn(),ur=(0,v.Z)(bn,2),Mr=ur[0],Nr=ur[1];Se(Mr,Nr)}else if(!Et&&Ke&&ct!=="clear"){var Gn=yn(),Rr=(0,v.Z)(Gn,2),ci=Rr[0],Zi=Rr[1];Ke(ci,Zi)}},xi=lt(function(pt,At){var Et,ct=Nt?At.selected:!0;ct?Et=Nt?[].concat((0,w.Z)(Ct),[pt]):[pt]:Et=Ct.filter(function(yn){return yn.value!==pt}),tr(Et),Kr(pt,ct),T==="combobox"?Yr(""):(!z||Ue)&&(dt(""),Yr(""))}),Ci=function(At,Et){tr(At);var ct=Et.type,yn=Et.values;(ct==="remove"||ct==="clear")&&yn.forEach(function(bn){Kr(bn.value,!1,ct)})},jr=function(At,Et){if(dt(At),Yr(null),Et.source==="submit"){var ct=(At||"").trim();if(ct){var yn=Array.from(new Set([].concat((0,w.Z)(_n),[ct])));tr(yn),Kr(ct,!0),dt("")}return}Et.source!=="blur"&&(T==="combobox"&&tr(At),F==null||F(At))},Ar=function(At){var Et=At;T!=="tags"&&(Et=At.map(function(yn){var bn=nn.get(yn);return bn==null?void 0:bn.value}).filter(function(yn){return yn!==void 0}));var ct=Array.from(new Set([].concat((0,w.Z)(_n),(0,w.Z)(Et))));tr(ct),ct.forEach(function(yn){Kr(yn,!0)})},ui=y.useMemo(function(){var pt=$t!==!1&&ht!==!1;return(0,W.Z)((0,W.Z)({},vt),{},{flattenOptions:qn,onActiveValue:si,defaultActiveFirstOption:Si,onSelect:xi,menuItemSelectedIcon:Tt,rawValues:_n,fieldNames:Vt,virtual:pt,direction:Wt,listHeight:en,listItemHeight:kt,childrenAsData:Zt})},[vt,qn,si,Si,xi,Tt,_n,Vt,$t,ht,en,kt,Zt]);return y.createElement(Fn.Provider,{value:ui},y.createElement(Re,(0,P.Z)({},Ft,{id:fn,prefixCls:G,ref:h,omitDomProps:on,mode:T,displayValues:xr,onDisplayValuesChange:Ci,direction:Wt,searchValue:Dt,onSearch:jr,autoClearSearchValue:Ue,onSearchSplit:Ar,dropdownMatchSelectWidth:ht,OptionList:Jt,emptyOptions:!qn.length,activeValue:li,activeDescendantId:"".concat(fn,"_list_").concat(Ir)})))}),g=Ht;g.Option=xn,g.OptGroup=Qt;var B=g,k=B},9296:function(rn,Te,f){"use strict";f.r(Te),f.d(Te,{ResizableTextArea:function(){return we},default:function(){return Je}});var P=f(54476),w=f(33885),x=f(20068),W=f(76190),v=f(42978),A=f(75931),N=f(94480),be=f(92310),oe=f.n(be),y=f(93681),Me=f(5643),H=f(18929),ye=f(59301),Pe=f(29301),J=f(34280),qe=f(16089),ot=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,bt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],It={},re;function Q(fe){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=fe.getAttribute("id")||fe.getAttribute("data-reactid")||fe.getAttribute("name");if(Y&&It[de])return It[de];var ae=window.getComputedStyle(fe),ie=ae.getPropertyValue("box-sizing")||ae.getPropertyValue("-moz-box-sizing")||ae.getPropertyValue("-webkit-box-sizing"),Ve=parseFloat(ae.getPropertyValue("padding-bottom"))+parseFloat(ae.getPropertyValue("padding-top")),ze=parseFloat(ae.getPropertyValue("border-bottom-width"))+parseFloat(ae.getPropertyValue("border-top-width")),he=bt.map(function(pe){return"".concat(pe,":").concat(ae.getPropertyValue(pe))}).join(";"),De={sizingStyle:he,paddingSize:Ve,borderSize:ze,boxSizing:ie};return Y&&de&&(It[de]=De),De}function S(fe){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;re||(re=document.createElement("textarea"),re.setAttribute("tab-index","-1"),re.setAttribute("aria-hidden","true"),document.body.appendChild(re)),fe.getAttribute("wrap")?re.setAttribute("wrap",fe.getAttribute("wrap")):re.removeAttribute("wrap");var ie=Q(fe,Y),Ve=ie.paddingSize,ze=ie.borderSize,he=ie.boxSizing,De=ie.sizingStyle;re.setAttribute("style","".concat(De,";").concat(ot)),re.value=fe.value||fe.placeholder||"";var pe=void 0,St=void 0,Lt,xt=re.scrollHeight;if(he==="border-box"?xt+=ze:he==="content-box"&&(xt-=Ve),de!==null||ae!==null){re.value=" ";var et=re.scrollHeight-Ve;de!==null&&(pe=et*de,he==="border-box"&&(pe=pe+Ve+ze),xt=Math.max(pe,xt)),ae!==null&&(St=et*ae,he==="border-box"&&(St=St+Ve+ze),Lt=xt>St?"":"hidden",xt=Math.min(St,xt))}var Mt={height:xt,overflowY:Lt,resize:"none"};return pe&&(Mt.minHeight=pe),St&&(Mt.maxHeight=St),Mt}var c=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],b=0,L=1,X=2,D=ye.forwardRef(function(fe,Y){var de=fe,ae=de.prefixCls,ie=de.onPressEnter,Ve=de.defaultValue,ze=de.value,he=de.autoSize,De=de.onResize,pe=de.className,St=de.style,Lt=de.disabled,xt=de.onChange,et=de.onInternalAutoSize,Mt=(0,A.Z)(de,c),at=(0,H.Z)(Ve,{value:ze,postState:function(Qt){return Qt!=null?Qt:""}}),Z=(0,v.Z)(at,2),Le=Z[0],se=Z[1],E=function(Qt){se(Qt.target.value),xt==null||xt(Qt)},I=ye.useRef();ye.useImperativeHandle(Y,function(){return{textArea:I.current}});var M=ye.useMemo(function(){return he&&(0,W.Z)(he)==="object"?[he.minRows,he.maxRows]:[]},[he]),$=(0,v.Z)(M,2),q=$[0],xe=$[1],_=!!he,Fe=function(){try{if(document.activeElement===I.current){var Qt=I.current,sn=Qt.selectionStart,xn=Qt.selectionEnd,un=Qt.scrollTop;I.current.setSelectionRange(sn,xn),I.current.scrollTop=un}}catch(Bn){}},z=ye.useState(X),le=(0,v.Z)(z,2),Re=le[0],ue=le[1],Ie=ye.useState(),U=(0,v.Z)(Ie,2),me=U[0],Ae=U[1],tt=function(){ue(b)};(0,J.Z)(function(){_&&tt()},[ze,q,xe,_]),(0,J.Z)(function(){if(Re===b)ue(L);else if(Re===L){var Yt=S(I.current,!1,q,xe);ue(X),Ae(Yt)}else Fe()},[Re]);var it=ye.useRef(),je=function(){qe.Z.cancel(it.current)},Ce=function(Qt){Re===X&&(De==null||De(Qt),he&&(je(),it.current=(0,qe.Z)(function(){tt()})))};ye.useEffect(function(){return je},[]);var rt=_?me:null,lt=(0,w.Z)((0,w.Z)({},St),rt);return(Re===b||Re===L)&&(lt.overflowY="hidden",lt.overflowX="hidden"),ye.createElement(Pe.Z,{onResize:Ce,disabled:!(he||De)},ye.createElement("textarea",(0,P.Z)({},Mt,{ref:I,style:lt,className:oe()(ae,pe,(0,x.Z)({},"".concat(ae,"-disabled"),Lt)),disabled:Lt,value:Le,onChange:E})))}),we=D,ke=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function He(fe,Y){return(0,N.Z)(fe||"").slice(0,Y).join("")}function Oe(fe,Y,de,ae){var ie=de;return fe?ie=He(de,ae):(0,N.Z)(Y||"").length<de.length&&(0,N.Z)(de||"").length>ae&&(ie=Y),ie}var mt=ye.forwardRef(function(fe,Y){var de,ae=fe.defaultValue,ie=fe.value,Ve=fe.onFocus,ze=fe.onBlur,he=fe.onChange,De=fe.allowClear,pe=fe.maxLength,St=fe.onCompositionStart,Lt=fe.onCompositionEnd,xt=fe.suffix,et=fe.prefixCls,Mt=et===void 0?"rc-textarea":et,at=fe.classes,Z=fe.showCount,Le=fe.className,se=fe.style,E=fe.disabled,I=fe.hidden,M=fe.classNames,$=fe.styles,q=fe.onResize,xe=(0,A.Z)(fe,ke),_=(0,H.Z)(ae,{value:ie,defaultValue:ae}),Fe=(0,v.Z)(_,2),z=Fe[0],le=Fe[1],Re=(0,ye.useRef)(null),ue=ye.useState(!1),Ie=(0,v.Z)(ue,2),U=Ie[0],me=Ie[1],Ae=ye.useState(!1),tt=(0,v.Z)(Ae,2),it=tt[0],je=tt[1],Ce=ye.useRef(),rt=ye.useRef(0),lt=ye.useState(null),Yt=(0,v.Z)(lt,2),Qt=Yt[0],sn=Yt[1],xn=function(){var st;(st=Re.current)===null||st===void 0||st.textArea.focus()};(0,ye.useImperativeHandle)(Y,function(){return{resizableTextArea:Re.current,focus:xn,blur:function(){var st;(st=Re.current)===null||st===void 0||st.textArea.blur()}}}),(0,ye.useEffect)(function(){me(function(on){return!E&&on})},[E]);var un=Number(pe)>0,Bn=function(st){je(!0),Ce.current=z,rt.current=st.currentTarget.selectionStart,St==null||St(st)},$n=function(st){je(!1);var Ht=st.currentTarget.value;if(un){var g,B=rt.current>=pe+1||rt.current===((g=Ce.current)===null||g===void 0?void 0:g.length);Ht=Oe(B,Ce.current,Ht,pe)}Ht!==z&&(le(Ht),(0,Me.rJ)(st.currentTarget,st,he,Ht)),Lt==null||Lt(st)},pn=function(st){var Ht=st.target.value;if(!it&&un){var g=st.target.selectionStart>=pe+1||st.target.selectionStart===Ht.length||!st.target.selectionStart;Ht=Oe(g,z,Ht,pe)}le(Ht),(0,Me.rJ)(st.currentTarget,st,he,Ht)},Fn=function(st){var Ht=xe.onPressEnter,g=xe.onKeyDown;st.key==="Enter"&&Ht&&Ht(st),g==null||g(st)},En=function(st){me(!0),Ve==null||Ve(st)},In=function(st){me(!1),ze==null||ze(st)},Cn=function(st){var Ht;le(""),xn(),(0,Me.rJ)((Ht=Re.current)===null||Ht===void 0?void 0:Ht.textArea,st,he)},dn=(0,Me.D7)(z);!it&&un&&ie==null&&(dn=He(dn,pe));var Wn=xt,Jt;if(Z){var Pn=(0,N.Z)(dn).length;(0,W.Z)(Z)==="object"?Jt=Z.formatter({value:dn,count:Pn,maxLength:pe}):Jt="".concat(Pn).concat(un?" / ".concat(pe):""),Wn=ye.createElement(ye.Fragment,null,Wn,ye.createElement("span",{className:oe()("".concat(Mt,"-data-count"),M==null?void 0:M.count),style:$==null?void 0:$.count},Jt))}var zn=function(st){var Ht;q==null||q(st),(Ht=Re.current)!==null&&Ht!==void 0&&Ht.textArea.style.height&&sn(!0)},Sr=!xe.autoSize&&!Z&&!De,pr=ye.createElement(y.BaseInput,{value:dn,allowClear:De,handleReset:Cn,suffix:Wn,prefixCls:Mt,classes:{affixWrapper:oe()(at==null?void 0:at.affixWrapper,(de={},(0,x.Z)(de,"".concat(Mt,"-show-count"),Z),(0,x.Z)(de,"".concat(Mt,"-textarea-allow-clear"),De),de))},disabled:E,focused:U,className:Le,style:(0,w.Z)((0,w.Z)({},se),Qt&&!Sr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Jt=="string"?Jt:void 0}},hidden:I,inputElement:ye.createElement(we,(0,P.Z)({},xe,{onKeyDown:Fn,onChange:pn,onFocus:En,onBlur:In,onCompositionStart:Bn,onCompositionEnd:$n,className:M==null?void 0:M.textarea,style:(0,w.Z)((0,w.Z)({},$==null?void 0:$.textarea),{},{resize:se==null?void 0:se.resize}),disabled:E,prefixCls:Mt,onResize:zn,ref:Re}))});return pr}),Qe=mt,Je=Qe},48911:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return at}});var P=f(54476),w=f(76190),x=f(33885),W=f(20068),v=f(42978),A=f(75931),N=f(92310),be=f.n(N),oe=f(29301),y=f(70425),Me=f(34280),H=f(59301),ye=f(4676),Pe=H.forwardRef(function(Z,Le){var se=Z.height,E=Z.offsetY,I=Z.offsetX,M=Z.children,$=Z.prefixCls,q=Z.onInnerResize,xe=Z.innerProps,_=Z.rtl,Fe=Z.extra,z={},le={display:"flex",flexDirection:"column"};return E!==void 0&&(z={height:se,position:"relative",overflow:"hidden"},le=(0,x.Z)((0,x.Z)({},le),{},(0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)({transform:"translateY(".concat(E,"px)")},_?"marginRight":"marginLeft",-I),"position","absolute"),"left",0),"right",0),"top",0))),H.createElement("div",{style:z},H.createElement(oe.Z,{onResize:function(ue){var Ie=ue.offsetHeight;Ie&&q&&q()}},H.createElement("div",(0,P.Z)({style:le,className:be()((0,W.Z)({},"".concat($,"-holder-inner"),$)),ref:Le},xe),M,Fe)))});Pe.displayName="Filler";var J=Pe;function qe(Z){var Le=Z.children,se=Z.setRef,E=H.useCallback(function(I){se(I)},[]);return H.cloneElement(Le,{ref:E})}function ot(Z,Le,se,E,I,M,$,q){var xe=q.getKey;return Z.slice(Le,se+1).map(function(_,Fe){var z=Le+Fe,le=$(_,z,{style:{width:E},offsetX:I}),Re=xe(_);return H.createElement(qe,{key:Re,setRef:function(Ie){return M(_,Ie)}},le)})}function bt(Z,Le,se,E){var I=se-Z,M=Le-se,$=Math.min(I,M)*2;if(E<=$){var q=Math.floor(E/2);return E%2?se+q+1:se-q}return I>M?se-(E-M):se+(E-I)}function It(Z,Le,se){var E=Z.length,I=Le.length,M,$;if(E===0&&I===0)return null;E<I?(M=Z,$=Le):(M=Le,$=Z);var q={__EMPTY_ITEM__:!0};function xe(ue){return ue!==void 0?se(ue):q}for(var _=null,Fe=Math.abs(E-I)!==1,z=0;z<$.length;z+=1){var le=xe(M[z]),Re=xe($[z]);if(le!==Re){_=z,Fe=Fe||le!==xe($[z+1]);break}}return _===null?null:{index:_,multiple:Fe}}function re(Z,Le,se){var E=H.useState(Z),I=(0,v.Z)(E,2),M=I[0],$=I[1],q=H.useState(null),xe=(0,v.Z)(q,2),_=xe[0],Fe=xe[1];return H.useEffect(function(){var z=It(M||[],Z||[],Le);(z==null?void 0:z.index)!==void 0&&(se==null||se(z.index),Fe(Z[z.index])),$(Z)},[Z]),[_]}var Q=f(16089),S=(typeof navigator=="undefined"?"undefined":(0,w.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),c=S,b=function(Z,Le,se,E){var I=(0,H.useRef)(!1),M=(0,H.useRef)(null);function $(){clearTimeout(M.current),I.current=!0,M.current=setTimeout(function(){I.current=!1},50)}var q=(0,H.useRef)({top:Z,bottom:Le,left:se,right:E});return q.current.top=Z,q.current.bottom=Le,q.current.left=se,q.current.right=E,function(xe,_){var Fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,z=xe?_<0&&q.current.left||_>0&&q.current.right:_<0&&q.current.top||_>0&&q.current.bottom;return Fe&&z?(clearTimeout(M.current),I.current=!1):(!z||I.current)&&$(),!I.current&&z}};function L(Z,Le,se,E,I,M,$){var q=(0,H.useRef)(0),xe=(0,H.useRef)(null),_=(0,H.useRef)(null),Fe=(0,H.useRef)(!1),z=b(Le,se,E,I);function le(Ae,tt){if(Q.Z.cancel(xe.current),!z(!1,tt)){var it=Ae;if(!it._virtualHandled)it._virtualHandled=!0;else return;q.current+=tt,_.current=tt,c||it.preventDefault(),xe.current=(0,Q.Z)(function(){var je=Fe.current?10:1;$(q.current*je,!1),q.current=0})}}function Re(Ae,tt){$(tt,!0),c||Ae.preventDefault()}var ue=(0,H.useRef)(null),Ie=(0,H.useRef)(null);function U(Ae){if(Z){Q.Z.cancel(Ie.current),Ie.current=(0,Q.Z)(function(){ue.current=null},2);var tt=Ae.deltaX,it=Ae.deltaY,je=Ae.shiftKey,Ce=tt,rt=it;(ue.current==="sx"||!ue.current&&je&&it&&!tt)&&(Ce=it,rt=0,ue.current="sx");var lt=Math.abs(Ce),Yt=Math.abs(rt);ue.current===null&&(ue.current=M&<>Yt?"x":"y"),ue.current==="y"?le(Ae,rt):Re(Ae,Ce)}}function me(Ae){Z&&(Fe.current=Ae.detail===_.current)}return[U,me]}function X(Z,Le,se,E){var I=H.useMemo(function(){return[new Map,[]]},[Z,se.id,E]),M=(0,v.Z)(I,2),$=M[0],q=M[1],xe=function(Fe){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe,le=$.get(Fe),Re=$.get(z);if(le===void 0||Re===void 0)for(var ue=Z.length,Ie=q.length;Ie<ue;Ie+=1){var U,me=Z[Ie],Ae=Le(me);$.set(Ae,Ie);var tt=(U=se.get(Ae))!==null&&U!==void 0?U:E;if(q[Ie]=(q[Ie-1]||0)+tt,Ae===Fe&&(le=Ie),Ae===z&&(Re=Ie),le!==void 0&&Re!==void 0)break}return{top:q[le-1]||0,bottom:q[Re]}};return xe}var D=f(67732),we=f(83652),ke=function(){function Z(){(0,D.Z)(this,Z),(0,W.Z)(this,"maps",void 0),(0,W.Z)(this,"id",0),(0,W.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,we.Z)(Z,[{key:"set",value:function(se,E){this.diffRecords.set(se,this.maps[se]),this.maps[se]=E,this.id+=1}},{key:"get",value:function(se){return this.maps[se]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Z}(),He=ke;function Oe(Z){var Le=parseFloat(Z);return isNaN(Le)?0:Le}function mt(Z,Le,se){var E=H.useState(0),I=(0,v.Z)(E,2),M=I[0],$=I[1],q=(0,H.useRef)(new Map),xe=(0,H.useRef)(new He),_=(0,H.useRef)(0);function Fe(){_.current+=1}function z(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Fe();var ue=function(){var me=!1;q.current.forEach(function(Ae,tt){if(Ae&&Ae.offsetParent){var it=Ae.offsetHeight,je=getComputedStyle(Ae),Ce=je.marginTop,rt=je.marginBottom,lt=Oe(Ce),Yt=Oe(rt),Qt=it+lt+Yt;xe.current.get(tt)!==Qt&&(xe.current.set(tt,Qt),me=!0)}}),me&&$(function(Ae){return Ae+1})};if(Re)ue();else{_.current+=1;var Ie=_.current;Promise.resolve().then(function(){Ie===_.current&&ue()})}}function le(Re,ue){var Ie=Z(Re),U=q.current.get(Ie);ue?(q.current.set(Ie,ue),z()):q.current.delete(Ie),!U!=!ue&&(ue?Le==null||Le(Re):se==null||se(Re))}return(0,H.useEffect)(function(){return Fe},[]),[le,z,xe.current,M]}var Qe=14/15;function Je(Z,Le,se){var E=(0,H.useRef)(!1),I=(0,H.useRef)(0),M=(0,H.useRef)(0),$=(0,H.useRef)(null),q=(0,H.useRef)(null),xe,_=function(Re){if(E.current){var ue=Math.ceil(Re.touches[0].pageX),Ie=Math.ceil(Re.touches[0].pageY),U=I.current-ue,me=M.current-Ie,Ae=Math.abs(U)>Math.abs(me);Ae?I.current=ue:M.current=Ie;var tt=se(Ae,Ae?U:me,!1,Re);tt&&Re.preventDefault(),clearInterval(q.current),tt&&(q.current=setInterval(function(){Ae?U*=Qe:me*=Qe;var it=Math.floor(Ae?U:me);(!se(Ae,it,!0)||Math.abs(it)<=.1)&&clearInterval(q.current)},16))}},Fe=function(){E.current=!1,xe()},z=function(Re){xe(),Re.touches.length===1&&!E.current&&(E.current=!0,I.current=Math.ceil(Re.touches[0].pageX),M.current=Math.ceil(Re.touches[0].pageY),$.current=Re.target,$.current.addEventListener("touchmove",_,{passive:!1}),$.current.addEventListener("touchend",Fe,{passive:!0}))};xe=function(){$.current&&($.current.removeEventListener("touchmove",_),$.current.removeEventListener("touchend",Fe))},(0,Me.Z)(function(){return Z&&Le.current.addEventListener("touchstart",z,{passive:!0}),function(){var le;(le=Le.current)===null||le===void 0||le.removeEventListener("touchstart",z),xe(),clearInterval(q.current)}},[Z])}function fe(Z){return Math.floor(Math.pow(Z,.5))}function Y(Z,Le){var se="touches"in Z?Z.touches[0]:Z;return se[Le?"pageX":"pageY"]-window[Le?"scrollX":"scrollY"]}function de(Z,Le,se){H.useEffect(function(){var E=Le.current;if(Z&&E){var I=!1,M,$,q=function(){Q.Z.cancel(M)},xe=function le(){q(),M=(0,Q.Z)(function(){se($),le()})},_=function(){I=!1,q()},Fe=function(Re){if(!(Re.target.draggable||Re.button!==0)){var ue=Re;ue._virtualHandled||(ue._virtualHandled=!0,I=!0)}},z=function(Re){if(I){var ue=Y(Re,!1),Ie=E.getBoundingClientRect(),U=Ie.top,me=Ie.bottom;if(ue<=U){var Ae=U-ue;$=-fe(Ae),xe()}else if(ue>=me){var tt=ue-me;$=fe(tt),xe()}else q()}};return E.addEventListener("mousedown",Fe),E.ownerDocument.addEventListener("mouseup",_),E.ownerDocument.addEventListener("mousemove",z),E.ownerDocument.addEventListener("dragend",_),function(){E.removeEventListener("mousedown",Fe),E.ownerDocument.removeEventListener("mouseup",_),E.ownerDocument.removeEventListener("mousemove",z),E.ownerDocument.removeEventListener("dragend",_),q()}}},[Z])}var ae=10;function ie(Z,Le,se,E,I,M,$,q){var xe=H.useRef(),_=H.useState(null),Fe=(0,v.Z)(_,2),z=Fe[0],le=Fe[1];return(0,Me.Z)(function(){if(z&&z.times<ae){if(!Z.current){le(function(In){return(0,x.Z)({},In)});return}M();var Re=z.targetAlign,ue=z.originAlign,Ie=z.index,U=z.offset,me=Z.current.clientHeight,Ae=!1,tt=Re,it=null;if(me){for(var je=Re||ue,Ce=0,rt=0,lt=0,Yt=Math.min(Le.length-1,Ie),Qt=0;Qt<=Yt;Qt+=1){var sn=I(Le[Qt]);rt=Ce;var xn=se.get(sn);lt=rt+(xn===void 0?E:xn),Ce=lt}for(var un=je==="top"?U:me-U,Bn=Yt;Bn>=0;Bn-=1){var $n=I(Le[Bn]),pn=se.get($n);if(pn===void 0){Ae=!0;break}if(un-=pn,un<=0)break}switch(je){case"top":it=rt-U;break;case"bottom":it=lt-me+U;break;default:{var Fn=Z.current.scrollTop,En=Fn+me;rt<Fn?tt="top":lt>En&&(tt="bottom")}}it!==null&&$(it),it!==z.lastTop&&(Ae=!0)}Ae&&le((0,x.Z)((0,x.Z)({},z),{},{times:z.times+1,targetAlign:tt,lastTop:it}))}},[z,Z.current]),function(Re){if(Re==null){q();return}if(Q.Z.cancel(xe.current),typeof Re=="number")$(Re);else if(Re&&(0,w.Z)(Re)==="object"){var ue,Ie=Re.align;"index"in Re?ue=Re.index:ue=Le.findIndex(function(Ae){return I(Ae)===Re.key});var U=Re.offset,me=U===void 0?0:U;le({times:0,index:ue,offset:me,originAlign:Ie})}}}var Ve=H.forwardRef(function(Z,Le){var se=Z.prefixCls,E=Z.rtl,I=Z.scrollOffset,M=Z.scrollRange,$=Z.onStartMove,q=Z.onStopMove,xe=Z.onScroll,_=Z.horizontal,Fe=Z.spinSize,z=Z.containerSize,le=Z.style,Re=Z.thumbStyle,ue=Z.showScrollBar,Ie=H.useState(!1),U=(0,v.Z)(Ie,2),me=U[0],Ae=U[1],tt=H.useState(null),it=(0,v.Z)(tt,2),je=it[0],Ce=it[1],rt=H.useState(null),lt=(0,v.Z)(rt,2),Yt=lt[0],Qt=lt[1],sn=!E,xn=H.useRef(),un=H.useRef(),Bn=H.useState(ue),$n=(0,v.Z)(Bn,2),pn=$n[0],Fn=$n[1],En=H.useRef(),In=function(){ue===!0||ue===!1||(clearTimeout(En.current),Fn(!0),En.current=setTimeout(function(){Fn(!1)},3e3))},Cn=M-z||0,dn=z-Fe||0,Wn=H.useMemo(function(){if(I===0||Cn===0)return 0;var g=I/Cn;return g*dn},[I,Cn,dn]),Jt=function(B){B.stopPropagation(),B.preventDefault()},Pn=H.useRef({top:Wn,dragging:me,pageY:je,startTop:Yt});Pn.current={top:Wn,dragging:me,pageY:je,startTop:Yt};var zn=function(B){Ae(!0),Ce(Y(B,_)),Qt(Pn.current.top),$(),B.stopPropagation(),B.preventDefault()};H.useEffect(function(){var g=function(h){h.preventDefault()},B=xn.current,k=un.current;return B.addEventListener("touchstart",g,{passive:!1}),k.addEventListener("touchstart",zn,{passive:!1}),function(){B.removeEventListener("touchstart",g),k.removeEventListener("touchstart",zn)}},[]);var Sr=H.useRef();Sr.current=Cn;var pr=H.useRef();pr.current=dn,H.useEffect(function(){if(me){var g,B=function(h){var C=Pn.current,T=C.dragging,ne=C.pageY,G=C.startTop;Q.Z.cancel(g);var K=xn.current.getBoundingClientRect(),ge=z/(_?K.width:K.height);if(T){var ce=(Y(h,_)-ne)*ge,Ze=G;!sn&&_?Ze-=ce:Ze+=ce;var F=Sr.current,V=pr.current,Ue=V?Ze/V:0,Se=Math.ceil(Ue*F);Se=Math.max(Se,0),Se=Math.min(Se,F),g=(0,Q.Z)(function(){xe(Se,_)})}},k=function(){Ae(!1),q()};return window.addEventListener("mousemove",B,{passive:!0}),window.addEventListener("touchmove",B,{passive:!0}),window.addEventListener("mouseup",k,{passive:!0}),window.addEventListener("touchend",k,{passive:!0}),function(){window.removeEventListener("mousemove",B),window.removeEventListener("touchmove",B),window.removeEventListener("mouseup",k),window.removeEventListener("touchend",k),Q.Z.cancel(g)}}},[me]),H.useEffect(function(){return In(),function(){clearTimeout(En.current)}},[I]),H.useImperativeHandle(Le,function(){return{delayHidden:In}});var on="".concat(se,"-scrollbar"),st={position:"absolute",visibility:pn?null:"hidden"},Ht={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return _?(Object.assign(st,{height:8,left:0,right:0,bottom:0}),Object.assign(Ht,(0,W.Z)({height:"100%",width:Fe},sn?"left":"right",Wn))):(Object.assign(st,(0,W.Z)({width:8,top:0,bottom:0},sn?"right":"left",0)),Object.assign(Ht,{width:"100%",height:Fe,top:Wn})),H.createElement("div",{ref:xn,className:be()(on,(0,W.Z)((0,W.Z)((0,W.Z)({},"".concat(on,"-horizontal"),_),"".concat(on,"-vertical"),!_),"".concat(on,"-visible"),pn)),style:(0,x.Z)((0,x.Z)({},st),le),onMouseDown:Jt,onMouseMove:In},H.createElement("div",{ref:un,className:be()("".concat(on,"-thumb"),(0,W.Z)({},"".concat(on,"-thumb-moving"),me)),style:(0,x.Z)((0,x.Z)({},Ht),Re),onMouseDown:zn}))}),ze=Ve,he=20;function De(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,se=Z/Le*Z;return isNaN(se)&&(se=0),se=Math.max(se,he),Math.floor(se)}var pe=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],St=[],Lt={overflowY:"auto",overflowAnchor:"none"};function xt(Z,Le){var se=Z.prefixCls,E=se===void 0?"rc-virtual-list":se,I=Z.className,M=Z.height,$=Z.itemHeight,q=Z.fullHeight,xe=q===void 0?!0:q,_=Z.style,Fe=Z.data,z=Z.children,le=Z.itemKey,Re=Z.virtual,ue=Z.direction,Ie=Z.scrollWidth,U=Z.component,me=U===void 0?"div":U,Ae=Z.onScroll,tt=Z.onVirtualScroll,it=Z.onVisibleChange,je=Z.innerProps,Ce=Z.extraRender,rt=Z.styles,lt=Z.showScrollBar,Yt=lt===void 0?"optional":lt,Qt=(0,A.Z)(Z,pe),sn=H.useCallback(function(Xe){return typeof le=="function"?le(Xe):Xe==null?void 0:Xe[le]},[le]),xn=mt(sn,null,null),un=(0,v.Z)(xn,4),Bn=un[0],$n=un[1],pn=un[2],Fn=un[3],En=!!(Re!==!1&&M&&$),In=H.useMemo(function(){return Object.values(pn.maps).reduce(function(Xe,_e){return Xe+_e},0)},[pn.id,pn.maps]),Cn=En&&Fe&&(Math.max($*Fe.length,In)>M||!!Ie),dn=ue==="rtl",Wn=be()(E,(0,W.Z)({},"".concat(E,"-rtl"),dn),I),Jt=Fe||St,Pn=(0,H.useRef)(),zn=(0,H.useRef)(),Sr=(0,H.useRef)(),pr=(0,H.useState)(0),on=(0,v.Z)(pr,2),st=on[0],Ht=on[1],g=(0,H.useState)(0),B=(0,v.Z)(g,2),k=B[0],d=B[1],h=(0,H.useState)(!1),C=(0,v.Z)(h,2),T=C[0],ne=C[1],G=function(){ne(!0)},K=function(){ne(!1)},ge={getKey:sn};function ce(Xe){Ht(function(_e){var yt;typeof Xe=="function"?yt=Xe(_e):yt=Xe;var Ct=kt(yt);return Pn.current.scrollTop=Ct,Ct})}var Ze=(0,H.useRef)({start:0,end:Jt.length}),F=(0,H.useRef)(),V=re(Jt,sn),Ue=(0,v.Z)(V,1),Se=Ue[0];F.current=Se;var Ke=H.useMemo(function(){if(!En)return{scrollHeight:void 0,start:0,end:Jt.length-1,offset:void 0};if(!Cn){var Xe;return{scrollHeight:((Xe=zn.current)===null||Xe===void 0?void 0:Xe.offsetHeight)||0,start:0,end:Jt.length-1,offset:void 0}}for(var _e=0,yt,Ct,vn,xr=Jt.length,_n=0;_n<xr;_n+=1){var Kn=Jt[_n],An=sn(Kn),kn=pn.get(An),Mn=_e+(kn===void 0?$:kn);Mn>=st&&yt===void 0&&(yt=_n,Ct=_e),Mn>st+M&&vn===void 0&&(vn=_n),_e=Mn}return yt===void 0&&(yt=0,Ct=0,vn=Math.ceil(M/$)),vn===void 0&&(vn=Jt.length-1),vn=Math.min(vn+1,Jt.length-1),{scrollHeight:_e,start:yt,end:vn,offset:Ct}},[Cn,En,st,Jt,Fn,M]),Ne=Ke.scrollHeight,ht=Ke.start,te=Ke.end,ve=Ke.offset;Ze.current.start=ht,Ze.current.end=te,H.useLayoutEffect(function(){var Xe=pn.getRecord();if(Xe.size===1){var _e=Array.from(Xe.keys())[0],yt=Xe.get(_e),Ct=Jt[ht];if(Ct&&yt===void 0){var vn=sn(Ct);if(vn===_e){var xr=pn.get(_e),_n=xr-$;ce(function(Kn){return Kn+_n})}}}pn.resetRecord()},[Ne]);var Be=H.useState({width:0,height:M}),ut=(0,v.Z)(Be,2),Ge=ut[0],ft=ut[1],jt=function(_e){ft({width:_e.offsetWidth,height:_e.offsetHeight})},Tt=(0,H.useRef)(),$t=(0,H.useRef)(),Wt=H.useMemo(function(){return De(Ge.width,Ie)},[Ge.width,Ie]),Rt=H.useMemo(function(){return De(Ge.height,Ne)},[Ge.height,Ne]),en=Ne-M,Ut=(0,H.useRef)(en);Ut.current=en;function kt(Xe){var _e=Xe;return Number.isNaN(Ut.current)||(_e=Math.min(_e,Ut.current)),_e=Math.max(_e,0),_e}var Gt=st<=0,Pt=st>=en,Ot=k<=0,zt=k>=Ie,Ft=b(Gt,Pt,Ot,zt),fn=function(){return{x:dn?-k:k,y:st}},Nt=(0,H.useRef)(fn()),Zt=(0,y.useEvent)(function(Xe){if(tt){var _e=(0,x.Z)((0,x.Z)({},fn()),Xe);(Nt.current.x!==_e.x||Nt.current.y!==_e.y)&&(tt(_e),Nt.current=_e)}});function an(Xe,_e){var yt=Xe;_e?((0,ye.flushSync)(function(){d(yt)}),Zt()):ce(yt)}function Vt(Xe){var _e=Xe.currentTarget.scrollTop;_e!==st&&ce(_e),Ae==null||Ae(Xe),Zt()}var wn=function(_e){var yt=_e,Ct=Ie?Ie-Ge.width:0;return yt=Math.max(yt,0),yt=Math.min(yt,Ct),yt},Un=(0,y.useEvent)(function(Xe,_e){_e?((0,ye.flushSync)(function(){d(function(yt){var Ct=yt+(dn?-Xe:Xe);return wn(Ct)})}),Zt()):ce(function(yt){var Ct=yt+Xe;return Ct})}),Dt=L(En,Gt,Pt,Ot,zt,!!Ie,Un),dt=(0,v.Z)(Dt,2),vt=dt[0],tn=dt[1];Je(En,Pn,function(Xe,_e,yt,Ct){var vn=Ct;return Ft(Xe,_e,yt)?!1:!vn||!vn._virtualHandled?(vn&&(vn._virtualHandled=!0),vt({preventDefault:function(){},deltaX:Xe?_e:0,deltaY:Xe?0:_e}),!0):!1}),de(Cn,Pn,function(Xe){ce(function(_e){return _e+Xe})}),(0,Me.Z)(function(){function Xe(yt){var Ct=Gt&&yt.detail<0,vn=Pt&&yt.detail>0;En&&!Ct&&!vn&&yt.preventDefault()}var _e=Pn.current;return _e.addEventListener("wheel",vt,{passive:!1}),_e.addEventListener("DOMMouseScroll",tn,{passive:!0}),_e.addEventListener("MozMousePixelScroll",Xe,{passive:!1}),function(){_e.removeEventListener("wheel",vt),_e.removeEventListener("DOMMouseScroll",tn),_e.removeEventListener("MozMousePixelScroll",Xe)}},[En,Gt,Pt]),(0,Me.Z)(function(){if(Ie){var Xe=wn(k);d(Xe),Zt({x:Xe})}},[Ge.width,Ie]);var nn=function(){var _e,yt;(_e=Tt.current)===null||_e===void 0||_e.delayHidden(),(yt=$t.current)===null||yt===void 0||yt.delayHidden()},Xt=ie(Pn,Jt,pn,$,sn,function(){return $n(!0)},ce,nn);H.useImperativeHandle(Le,function(){return{nativeElement:Sr.current,getScrollInfo:fn,scrollTo:function(_e){function yt(Ct){return Ct&&(0,w.Z)(Ct)==="object"&&("left"in Ct||"top"in Ct)}yt(_e)?(_e.left!==void 0&&d(wn(_e.left)),Xt(_e.top)):Xt(_e)}}}),(0,Me.Z)(function(){if(it){var Xe=Jt.slice(ht,te+1);it(Xe,Jt)}},[ht,te,Jt]);var Bt=X(Jt,sn,pn,$),ln=Ce==null?void 0:Ce({start:ht,end:te,virtual:Cn,offsetX:k,offsetY:ve,rtl:dn,getSize:Bt}),gn=ot(Jt,ht,te,Ie,k,Bn,z,ge),mn=null;M&&(mn=(0,x.Z)((0,W.Z)({},xe?"height":"maxHeight",M),Lt),En&&(mn.overflowY="hidden",Ie&&(mn.overflowX="hidden"),T&&(mn.pointerEvents="none")));var Ln={};return dn&&(Ln.dir="rtl"),H.createElement("div",(0,P.Z)({ref:Sr,style:(0,x.Z)((0,x.Z)({},_),{},{position:"relative"}),className:Wn},Ln,Qt),H.createElement(oe.Z,{onResize:jt},H.createElement(me,{className:"".concat(E,"-holder"),style:mn,ref:Pn,onScroll:Vt,onMouseEnter:nn},H.createElement(J,{prefixCls:E,height:Ne,offsetX:k,offsetY:ve,scrollWidth:Ie,onInnerResize:$n,ref:zn,innerProps:je,rtl:dn,extra:ln},gn))),Cn&&Ne>M&&H.createElement(ze,{ref:Tt,prefixCls:E,scrollOffset:st,scrollRange:Ne,rtl:dn,onScroll:an,onStartMove:G,onStopMove:K,spinSize:Rt,containerSize:Ge.height,style:rt==null?void 0:rt.verticalScrollBar,thumbStyle:rt==null?void 0:rt.verticalScrollBarThumb,showScrollBar:Yt}),Cn&&Ie>Ge.width&&H.createElement(ze,{ref:$t,prefixCls:E,scrollOffset:k,scrollRange:Ie,rtl:dn,onScroll:an,onStartMove:G,onStopMove:K,spinSize:Wt,containerSize:Ge.width,horizontal:!0,style:rt==null?void 0:rt.horizontalScrollBar,thumbStyle:rt==null?void 0:rt.horizontalScrollBarThumb,showScrollBar:Yt}))}var et=H.forwardRef(xt);et.displayName="List";var Mt=et,at=Mt},16722:function(rn,Te,f){"use strict";f.d(Te,{Z:function(){return be}});const P=oe=>typeof oe=="object"&&oe!=null&&oe.nodeType===1,w=(oe,y)=>(!y||oe!=="hidden")&&oe!=="visible"&&oe!=="clip",x=(oe,y)=>{if(oe.clientHeight<oe.scrollHeight||oe.clientWidth<oe.scrollWidth){const Me=getComputedStyle(oe,null);return w(Me.overflowY,y)||w(Me.overflowX,y)||(H=>{const ye=(Pe=>{if(!Pe.ownerDocument||!Pe.ownerDocument.defaultView)return null;try{return Pe.ownerDocument.defaultView.frameElement}catch(J){return null}})(H);return!!ye&&(ye.clientHeight<H.scrollHeight||ye.clientWidth<H.scrollWidth)})(oe)}return!1},W=(oe,y,Me,H,ye,Pe,J,qe)=>Pe<oe&&J>y||Pe>oe&&J<y?0:Pe<=oe&&qe<=Me||J>=y&&qe>=Me?Pe-oe-H:J>y&&qe<Me||Pe<oe&&qe>Me?J-y+ye:0,v=oe=>{const y=oe.parentElement;return y==null?oe.getRootNode().host||null:y},A=(oe,y)=>{var Me,H,ye,Pe;if(typeof document=="undefined")return[];const{scrollMode:J,block:qe,inline:ot,boundary:bt,skipOverflowHiddenElements:It}=y,re=typeof bt=="function"?bt:ze=>ze!==bt;if(!P(oe))throw new TypeError("Invalid target");const Q=document.scrollingElement||document.documentElement,S=[];let c=oe;for(;P(c)&&re(c);){if(c=v(c),c===Q){S.push(c);break}c!=null&&c===document.body&&x(c)&&!x(document.documentElement)||c!=null&&x(c,It)&&S.push(c)}const b=(H=(Me=window.visualViewport)==null?void 0:Me.width)!=null?H:innerWidth,L=(Pe=(ye=window.visualViewport)==null?void 0:ye.height)!=null?Pe:innerHeight,{scrollX:X,scrollY:D}=window,{height:we,width:ke,top:He,right:Oe,bottom:mt,left:Qe}=oe.getBoundingClientRect(),{top:Je,right:fe,bottom:Y,left:de}=(ze=>{const he=window.getComputedStyle(ze);return{top:parseFloat(he.scrollMarginTop)||0,right:parseFloat(he.scrollMarginRight)||0,bottom:parseFloat(he.scrollMarginBottom)||0,left:parseFloat(he.scrollMarginLeft)||0}})(oe);let ae=qe==="start"||qe==="nearest"?He-Je:qe==="end"?mt+Y:He+we/2-Je+Y,ie=ot==="center"?Qe+ke/2-de+fe:ot==="end"?Oe+fe:Qe-de;const Ve=[];for(let ze=0;ze<S.length;ze++){const he=S[ze],{height:De,width:pe,top:St,right:Lt,bottom:xt,left:et}=he.getBoundingClientRect();if(J==="if-needed"&&He>=0&&Qe>=0&&mt<=L&&Oe<=b&&(he===Q&&!x(he)||He>=St&&mt<=xt&&Qe>=et&&Oe<=Lt))return Ve;const Mt=getComputedStyle(he),at=parseInt(Mt.borderLeftWidth,10),Z=parseInt(Mt.borderTopWidth,10),Le=parseInt(Mt.borderRightWidth,10),se=parseInt(Mt.borderBottomWidth,10);let E=0,I=0;const M="offsetWidth"in he?he.offsetWidth-he.clientWidth-at-Le:0,$="offsetHeight"in he?he.offsetHeight-he.clientHeight-Z-se:0,q="offsetWidth"in he?he.offsetWidth===0?0:pe/he.offsetWidth:0,xe="offsetHeight"in he?he.offsetHeight===0?0:De/he.offsetHeight:0;if(Q===he)E=qe==="start"?ae:qe==="end"?ae-L:qe==="nearest"?W(D,D+L,L,Z,se,D+ae,D+ae+we,we):ae-L/2,I=ot==="start"?ie:ot==="center"?ie-b/2:ot==="end"?ie-b:W(X,X+b,b,at,Le,X+ie,X+ie+ke,ke),E=Math.max(0,E+D),I=Math.max(0,I+X);else{E=qe==="start"?ae-St-Z:qe==="end"?ae-xt+se+$:qe==="nearest"?W(St,xt,De,Z,se+$,ae,ae+we,we):ae-(St+De/2)+$/2,I=ot==="start"?ie-et-at:ot==="center"?ie-(et+pe/2)+M/2:ot==="end"?ie-Lt+Le+M:W(et,Lt,pe,at,Le+M,ie,ie+ke,ke);const{scrollLeft:_,scrollTop:Fe}=he;E=xe===0?0:Math.max(0,Math.min(Fe+E/xe,he.scrollHeight-De/xe+$)),I=q===0?0:Math.max(0,Math.min(_+I/q,he.scrollWidth-pe/q+M)),ae+=Fe-E,ie+=_-I}Ve.push({el:he,top:E,left:I})}return Ve},N=oe=>oe===!1?{block:"end",inline:"nearest"}:(y=>y===Object(y)&&Object.keys(y).length!==0)(oe)?oe:{block:"start",inline:"nearest"};function be(oe,y){if(!oe.isConnected||!(ye=>{let Pe=ye;for(;Pe&&Pe.parentNode;){if(Pe.parentNode===document)return!0;Pe=Pe.parentNode instanceof ShadowRoot?Pe.parentNode.host:Pe.parentNode}return!1})(oe))return;const Me=(ye=>{const Pe=window.getComputedStyle(ye);return{top:parseFloat(Pe.scrollMarginTop)||0,right:parseFloat(Pe.scrollMarginRight)||0,bottom:parseFloat(Pe.scrollMarginBottom)||0,left:parseFloat(Pe.scrollMarginLeft)||0}})(oe);if((ye=>typeof ye=="object"&&typeof ye.behavior=="function")(y))return y.behavior(A(oe,y));const H=typeof y=="boolean"||y==null?void 0:y.behavior;for(const{el:ye,top:Pe,left:J}of A(oe,N(y))){const qe=Pe-Me.top+Me.bottom,ot=J-Me.left+Me.right;ye.scroll({top:qe,left:ot,behavior:H})}}}}]);
|