You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Shixuns__Detail__Reposit...

107 lines
368 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[35230],{18299:function(sn,he,f){"use strict";f.d(he,{Z:function(){return m}});var L=f(87462),x=f(67294),E={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"},z=E,b=f(84089),O=function(V,h){return x.createElement(b.Z,(0,L.Z)({},V,{ref:h,icon:z}))},m=x.forwardRef(O)},42922:function(sn,he,f){"use strict";f.d(he,{Z:function(){return m}});var L=f(87462),x=f(67294),E={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"},z=E,b=f(84089),O=function(V,h){return x.createElement(b.Z,(0,L.Z)({},V,{ref:h,icon:z}))},m=x.forwardRef(O)},63237:function(sn,he,f){"use strict";f.d(he,{Z:function(){return m}});var L=f(87462),x=f(67294),E={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"},z=E,b=f(84089),O=function(V,h){return x.createElement(b.Z,(0,L.Z)({},V,{ref:h,icon:z}))},m=x.forwardRef(O)},99569:function(sn,he,f){"use strict";f.d(he,{Z:function(){return m}});var L=f(87462),x=f(67294),E={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"},z=E,b=f(84089),O=function(V,h){return x.createElement(b.Z,(0,L.Z)({},V,{ref:h,icon:z}))},m=x.forwardRef(O)},17663:function(sn,he,f){"use strict";f.d(he,{Z:function(){return m}});var L=f(87462),x=f(67294),E={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"},z=E,b=f(84089),O=function(V,h){return x.createElement(b.Z,(0,L.Z)({},V,{ref:h,icon:z}))},m=x.forwardRef(O)},72395:function(sn,he,f){"use strict";f.d(he,{Z:function(){return m}});var L=f(87462),x=f(67294),E={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"},z=E,b=f(84089),O=function(V,h){return x.createElement(b.Z,(0,L.Z)({},V,{ref:h,icon:z}))},m=x.forwardRef(O)},71749:function(){"use strict"},30483:function(){"use strict"},96670:function(sn,he,f){"use strict";f.d(he,{t:function(){return ue}});var L=f(67294),x=f(71577),E={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},z=f(94184),b=f.n(z),O=Object.defineProperty,m=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,h=(Le,be,Oe)=>be in Le?O(Le,be,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Le[be]=Oe,xe=(Le,be)=>{for(var Oe in be||(be={}))ce.call(be,Oe)&&h(Le,Oe,be[Oe]);if(m)for(var Oe of m(be))V.call(be,Oe)&&h(Le,Oe,be[Oe]);return Le};const ue=({cancelText:Le="\u53D6\u6D88",okText:be="\u786E\u5B9A",loading:Oe=!1,hasOkBtn:Se=!0,hasCancelBtn:k=!0,okButtonProps:Je={},onCancel:Ot=()=>{},onOk:ee=()=>{},className:ne=""})=>L.createElement("div",{className:b()(E.buttonFixed,ne)},L.createElement("div",{className:E.buttonWrap},k&&L.createElement(x.ZP,{size:"middle",className:`${E.button} mr20`,onClick:Ot},Le),Se&&L.createElement(x.ZP,xe({size:"middle",type:"primary",className:`${E.button} mr20`,loading:Oe,onClick:ee},Je),be)))},57444:function(sn,he,f){"use strict";f.d(he,{h:function(){return ne}});var L=f(67294),x=f(11713),E=f(22150),z=f(71577),b=f(4631),O=f.n(b),m=f(71749),ce=f(30483),V=Object.defineProperty,h=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,Oe=(p,c,C)=>c in p?V(p,c,{enumerable:!0,configurable:!0,writable:!0,value:C}):p[c]=C,Se=(p,c)=>{for(var C in c||(c={}))Le.call(c,C)&&Oe(p,C,c[C]);if(ue)for(var C of ue(c))be.call(c,C)&&Oe(p,C,c[C]);return p},k=(p,c)=>h(p,xe(c));const Je=x.default.Option,Ot={labelCol:{span:4},wrapperCol:{span:20}},ee={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"]};he.Z=({callback:p,onCancel:c})=>{const[C,T]=(0,L.useState)("python");function Q(j){T(ee[j][1])}function N(j){p(j)}return L.createElement(E.default,k(Se({},Ot),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:N,style:{width:500}}),L.createElement(E.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},L.createElement(x.default,{getPopupContainer:j=>j.parentNode,onChange:Q},Object.keys(ee).map(j=>L.createElement(Je,{key:j,value:j},ee[j][0])))),L.createElement(E.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},L.createElement(ne,{mode:C})),L.createElement("div",{className:"flex-container flex-end"},L.createElement(z.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.createElement(z.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function ne({value:p,onChange:c,mode:C,options:T={}}){const Q=(0,L.useRef)(),[N,j]=(0,L.useState)();return(0,L.useEffect)(()=>{if(N){let te=function(ke){const ge=ke.getValue();c&&c(ge)};return N.on("change",te),()=>{N.off("change",te)}}},[N,c]),(0,L.useEffect)(()=>{N&&N.setOption("mode",C)},[N,C]),(0,L.useEffect)(()=>{N&&(p!==N.getValue()||p==="")&&setTimeout(()=>{N.setValue(p||"")},300)},[N,p]),(0,L.useEffect)(()=>{if(Q.current&&!N){const te=O().fromTextArea(Q.current,Se({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},T));j(te)}},[Q.current,N]),L.createElement("div",{className:"my-codemirror-container"},L.createElement("textarea",{ref:Q}))}},63794:function(sn,he,f){"use strict";f.r(he),f.d(he,{default:function(){return dt}});var L=f(52810),x=f(67294),E=f(35973),z=f(22150),b=f(69677),O=f(57444),m=f(96670),ce={bg:"bg___RM4en",wrap:"wrap___ne3nd",title:"title___Nr8TZ",path:"path___mVozd",colorBlue:"colorBlue___jBwMu",width240:"width240___XDhtB"},V=Object.defineProperty,h=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,Le=(P,W,H)=>W in P?V(P,W,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[W]=H,be=(P,W)=>{for(var H in W||(W={}))xe.call(W,H)&&Le(P,H,W[H]);if(h)for(var H of h(W))ue.call(W,H)&&Le(P,H,W[H]);return P},Oe=(P,W)=>{var H={};for(var re in P)xe.call(P,re)&&W.indexOf(re)<0&&(H[re]=P[re]);if(P!=null&&h)for(var re of h(P))W.indexOf(re)<0&&ue.call(P,re)&&(H[re]=P[re]);return H},Se=(P,W,H)=>new Promise((re,bt)=>{var lt=ye=>{try{ht(H.next(ye))}catch(it){bt(it)}},De=ye=>{try{ht(H.throw(ye))}catch(it){bt(it)}},ht=ye=>ye.done?re(ye.value):Promise.resolve(ye.value).then(lt,De);ht((H=H.apply(P,W)).next())});const k=P=>{var W=P,{shixunsDetail:H,globalSetting:re,loading:bt,user:lt,dispatch:De}=W,ht=Oe(W,["shixunsDetail","globalSetting","loading","user","dispatch"]);const ye=(0,E.useLocation)(),[it,In]=(0,x.useState)({}),Rt=(0,x.useRef)(),Nt=(0,x.useRef)(),[oe]=z.default.useForm(),[Ge,_t]=(0,x.useState)("");(0,x.useEffect)(()=>(De({type:"globalSetting/footerToggle",payload:!1}),()=>{De({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,x.useEffect)(()=>{const vt=sessionStorage.getItem("pathArray");if(vt){const Be=vt.split(",").join("/"),Jt=Be.indexOf("/")===0?Be.substr(1):Be;_t(Jt)}},[]),(0,x.useEffect)(()=>{var vt,Be,Jt,Ht;Nt.current=(Be=(vt=ye.pathname)==null?void 0:vt.split("/"))==null?void 0:Be[2],Rt.current=((Ht=(Jt=ye.pathname)==null?void 0:Jt.split("/"))==null?void 0:Ht[3])==="repository"},[]);const Yt=(...vt)=>Se(void 0,[...vt],function*(Be={}){if(yield De({type:"shixunsDetail/addRepositoryFile",payload:{id:Nt.current,message:Be.commitMessage,content:Be.codeMirror,path:`${Ge?`${Ge}/`:""}${Be.path||""}`,secret_repository:Rt.current?void 0:!0}})){const Ht=Rt.current?`/shixuns/${Nt.current}/repository${Ge?`/master/shixun_show/${Ge}`:""}`:`/shixuns/${Nt.current}/secret_repository`;E.history.replace(Ht)}}),Qt=()=>{var vt,Be;E.history.push(`/shixuns/${Nt.current}/${(Be=(vt=ye.pathname)==null?void 0:vt.split("/"))==null?void 0:Be[3]}${Ge?`/master/shixun_show/${Ge}`:""}`)};return x.createElement("section",{className:ce.bg},x.createElement("div",{className:ce.wrap},x.createElement("div",{className:ce.title},"\u65B0\u5EFA\u6587\u4EF6"),x.createElement(z.default,{className:"mt10",form:oe,scrollToFirstError:!0,layout:"vertical",onFinish:Yt,onValuesChange:()=>In(be({},oe.getFieldsValue()))},x.createElement(z.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},x.createElement(z.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},x.createElement("span",null,x.createElement("span",{className:"mr5"},Ge?`${Ge}/`:""),x.createElement(b.default,{className:ce.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),x.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")),x.createElement(z.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},x.createElement(b.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"})),x.createElement("div",{className:"mt10 mb20"},x.createElement(z.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},x.createElement(O.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"]}}))),x.createElement(z.default.Item,{noStyle:!0},x.createElement(m.t,{okButtonProps:{htmlType:"submit"},onCancel:Qt})))))};var Je=(0,E.connect)(({shixunsDetail:P,loading:W,globalSetting:H,user:re})=>({shixunsDetail:P,globalSetting:H,user:re,loading:W.models.index}))(k),Ot={bg:"bg___hW0a5",wrap:"wrap___qsjmY",title:"title___TYQ3w",path:"path___J3ICf",colorBlue:"colorBlue___r1F5X",width240:"width240___Vbbdg"},ee=Object.defineProperty,ne=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,C=(P,W,H)=>W in P?ee(P,W,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[W]=H,T=(P,W)=>{for(var H in W||(W={}))p.call(W,H)&&C(P,H,W[H]);if(ne)for(var H of ne(W))c.call(W,H)&&C(P,H,W[H]);return P},Q=(P,W)=>{var H={};for(var re in P)p.call(P,re)&&W.indexOf(re)<0&&(H[re]=P[re]);if(P!=null&&ne)for(var re of ne(P))W.indexOf(re)<0&&c.call(P,re)&&(H[re]=P[re]);return H},N=(P,W,H)=>new Promise((re,bt)=>{var lt=ye=>{try{ht(H.next(ye))}catch(it){bt(it)}},De=ye=>{try{ht(H.throw(ye))}catch(it){bt(it)}},ht=ye=>ye.done?re(ye.value):Promise.resolve(ye.value).then(lt,De);ht((H=H.apply(P,W)).next())});const j=P=>{var W=P,{shixunsDetail:H,globalSetting:re,loading:bt,user:lt,dispatch:De}=W,ht=Q(W,["shixunsDetail","globalSetting","loading","user","dispatch"]);const ye=(0,E.useLocation)(),[it,In]=(0,x.useState)({}),Rt=(0,x.useRef)(),Nt=(0,x.useRef)(),[oe]=z.default.useForm(),[Ge,_t]=(0,x.useState)("");(0,x.useEffect)(()=>(De({type:"globalSetting/footerToggle",payload:!1}),()=>{De({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,x.useEffect)(()=>{const vt=sessionStorage.getItem("pathArray");if(vt){const Be=vt.split(",").join("/"),Jt=Be.indexOf("/")===0?Be.substr(1):Be;_t(Jt)}},[]),(0,x.useEffect)(()=>{var vt,Be,Jt,Ht;Nt.current=(Be=(vt=ye.pathname)==null?void 0:vt.split("/"))==null?void 0:Be[2],Rt.current=((Ht=(Jt=ye.pathname)==null?void 0:Jt.split("/"))==null?void 0:Ht[3])==="repository"},[]);const Yt=(...vt)=>N(void 0,[...vt],function*(Be={}){if(yield De({type:"shixunsDetail/addRepositoryFile",payload:{id:Nt.current,message:Be.commitMessage,content:Be.codeMirror,path:`${Ge?`${Ge}/`:""}${Be.path||""}`,secret_repository:Rt.current?void 0:!0}})){const Ht=Rt.current?`/shixuns/${Nt.current}/repository${Ge?`/master/shixun_show/${Ge}`:""}`:`/shixuns/${Nt.current}/secret_repository`;E.history.replace(Ht)}}),Qt=()=>{var vt,Be;E.history.push(`/shixuns/${Nt.current}/${(Be=(vt=ye.pathname)==null?void 0:vt.split("/"))==null?void 0:Be[3]}${Ge?`/master/shixun_show/${Ge}`:""}`)};return x.createElement("section",{className:Ot.bg},x.createElement("div",{className:Ot.wrap},x.createElement("div",{className:Ot.title},"\u65B0\u5EFA\u6587\u4EF6"),x.createElement(z.default,{className:"mt10",form:oe,scrollToFirstError:!0,layout:"vertical",onFinish:Yt,onValuesChange:()=>In(T({},oe.getFieldsValue()))},x.createElement(z.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},x.createElement(z.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},x.createElement("span",null,x.createElement("span",{className:"mr5"},Ge?`${Ge}/`:""),x.createElement(b.default,{className:Ot.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),x.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")),x.createElement(z.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},x.createElement(b.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"})),x.createElement("div",{className:"mt10 mb20"},x.createElement(z.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},x.createElement(O.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"]}}))),x.createElement(z.default.Item,{noStyle:!0},x.createElement(m.t,{okButtonProps:{htmlType:"submit"},onCancel:Qt})))))};var te=(0,E.connect)(({shixunsDetail:P,loading:W,globalSetting:H,user:re})=>({shixunsDetail:P,globalSetting:H,user:re,loading:W.models.index}))(j),ke={bg:"bg___mZRyL",wrap:"wrap___PZp9Q",title:"title___k98J0",path:"path___rTXhN",colorBlue:"colorBlue___Jn7qR",width240:"width240___RvfYr"},ge=Object.defineProperty,tt=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,mt=(P,W,H)=>W in P?ge(P,W,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[W]=H,yt=(P,W)=>{for(var H in W||(W={}))qe.call(W,H)&&mt(P,H,W[H]);if(tt)for(var H of tt(W))_e.call(W,H)&&mt(P,H,W[H]);return P},at=(P,W)=>{var H={};for(var re in P)qe.call(P,re)&&W.indexOf(re)<0&&(H[re]=P[re]);if(P!=null&&tt)for(var re of tt(P))W.indexOf(re)<0&&_e.call(P,re)&&(H[re]=P[re]);return H},Ue=(P,W,H)=>new Promise((re,bt)=>{var lt=ye=>{try{ht(H.next(ye))}catch(it){bt(it)}},De=ye=>{try{ht(H.throw(ye))}catch(it){bt(it)}},ht=ye=>ye.done?re(ye.value):Promise.resolve(ye.value).then(lt,De);ht((H=H.apply(P,W)).next())});const Ke=P=>{var W=P,{shixunsDetail:H,globalSetting:re,loading:bt,user:lt,dispatch:De}=W,ht=at(W,["shixunsDetail","globalSetting","loading","user","dispatch"]);const ye=(0,E.useLocation)(),[it,In]=(0,x.useState)({}),Rt=(0,x.useRef)(),Nt=(0,x.useRef)(),[oe]=z.default.useForm(),[Ge,_t]=(0,x.useState)("");(0,x.useEffect)(()=>(De({type:"globalSetting/footerToggle",payload:!1}),()=>{De({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,x.useEffect)(()=>{const vt=sessionStorage.getItem("pathArray");if(vt){const Be=vt.split(",").join("/"),Jt=Be.indexOf("/")===0?Be.substr(1):Be;_t(Jt)}},[]),(0,x.useEffect)(()=>{var vt,Be,Jt,Ht;Nt.current=(Be=(vt=ye.pathname)==null?void 0:vt.split("/"))==null?void 0:Be[2],Rt.current=((Ht=(Jt=ye.pathname)==null?void 0:Jt.split("/"))==null?void 0:Ht[3])==="repository"},[]);const Yt=(...vt)=>Ue(void 0,[...vt],function*(Be={}){if(yield De({type:"shixunsDetail/addRepositoryFile",payload:{id:Nt.current,message:Be.commitMessage,content:Be.codeMirror,path:`${Ge?`${Ge}/`:""}${Be.path||""}`,secret_repository:Rt.current?void 0:!0}})){const Ht=Rt.current?`/shixuns/${Nt.current}/repository${Ge?`/master/shixun_show/${Ge}`:""}`:`/shixuns/${Nt.current}/secret_repository`;E.history.replace(Ht)}}),Qt=()=>{var vt,Be;E.history.push(`/shixuns/${Nt.current}/${(Be=(vt=ye.pathname)==null?void 0:vt.split("/"))==null?void 0:Be[3]}${Ge?`/master/shixun_show/${Ge}`:""}`)};return x.createElement("section",{className:ke.bg},x.createElement("div",{className:ke.wrap},x.createElement("div",{className:ke.title},"\u65B0\u5EFA\u6587\u4EF6"),x.createElement(z.default,{className:"mt10",form:oe,scrollToFirstError:!0,layout:"vertical",onFinish:Yt,onValuesChange:()=>In(yt({},oe.getFieldsValue()))},x.createElement(z.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},x.createElement(z.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},x.createElement("span",null,x.createElement("span",{className:"mr5"},Ge?`${Ge}/`:""),x.createElement(b.default,{className:ke.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),x.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")),x.createElement(z.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},x.createElement(b.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"})),x.createElement("div",{className:"mt10 mb20"},x.createElement(z.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},x.createElement(O.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"]}}))),x.createElement(z.default.Item,{noStyle:!0},x.createElement(m.t,{okButtonProps:{htmlType:"submit"},onCancel:Qt})))))};var It=(0,E.connect)(({shixunsDetail:P,loading:W,globalSetting:H,user:re})=>({shixunsDetail:P,globalSetting:H,user:re,loading:W.models.index}))(Ke),At={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},Ve=Object.defineProperty,rt=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,Hn=(P,W,H)=>W in P?Ve(P,W,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[W]=H,Ee=(P,W)=>{for(var H in W||(W={}))Ye.call(W,H)&&Hn(P,H,W[H]);if(rt)for(var H of rt(W))vn.call(W,H)&&Hn(P,H,W[H]);return P},de=(P,W)=>{var H={};for(var re in P)Ye.call(P,re)&&W.indexOf(re)<0&&(H[re]=P[re]);if(P!=null&&rt)for(var re of rt(P))W.indexOf(re)<0&&vn.call(P,re)&&(H[re]=P[re]);return H},He=(P,W,H)=>new Promise((re,bt)=>{var lt=ye=>{try{ht(H.next(ye))}catch(it){bt(it)}},De=ye=>{try{ht(H.throw(ye))}catch(it){bt(it)}},ht=ye=>ye.done?re(ye.value):Promise.resolve(ye.value).then(lt,De);ht((H=H.apply(P,W)).next())});const me=P=>{var W=P,{shixunsDetail:H,globalSetting:re,loading:bt,user:lt,dispatch:De}=W,ht=de(W,["shixunsDetail","globalSetting","loading","user","dispatch"]);const ye=(0,E.useLocation)(),[it,In]=(0,x.useState)({}),Rt=(0,x.useRef)(),Nt=(0,x.useRef)(),[oe]=z.default.useForm(),[Ge,_t]=(0,x.useState)("");(0,x.useEffect)(()=>(De({type:"globalSetting/footerToggle",payload:!1}),()=>{De({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,x.useEffect)(()=>{const vt=sessionStorage.getItem("pathArray");if(vt){const Be=vt.split(",").join("/"),Jt=Be.indexOf("/")===0?Be.substr(1):Be;_t(Jt)}},[]),(0,x.useEffect)(()=>{var vt,Be,Jt,Ht;Nt.current=(Be=(vt=ye.pathname)==null?void 0:vt.split("/"))==null?void 0:Be[2],Rt.current=((Ht=(Jt=ye.pathname)==null?void 0:Jt.split("/"))==null?void 0:Ht[3])==="repository"},[]);const Yt=(...vt)=>He(void 0,[...vt],function*(Be={}){if(yield De({type:"shixunsDetail/addRepositoryFile",payload:{id:Nt.current,message:Be.commitMessage,content:Be.codeMirror,path:`${Ge?`${Ge}/`:""}${Be.path||""}`,secret_repository:Rt.current?void 0:!0}})){const Ht=Rt.current?`/shixuns/${Nt.current}/repository${Ge?`/master/shixun_show/${Ge}`:""}`:`/shixuns/${Nt.current}/secret_repository`;E.history.replace(Ht)}}),Qt=()=>{var vt,Be;E.history.push(`/shixuns/${Nt.current}/${(Be=(vt=ye.pathname)==null?void 0:vt.split("/"))==null?void 0:Be[3]}${Ge?`/master/shixun_show/${Ge}`:""}`)};return x.createElement("section",{className:At.bg},x.createElement("div",{className:At.wrap},x.createElement("div",{className:At.title},"\u65B0\u5EFA\u6587\u4EF6"),x.createElement(z.default,{className:"mt10",form:oe,scrollToFirstError:!0,layout:"vertical",onFinish:Yt,onValuesChange:()=>In(Ee({},oe.getFieldsValue()))},x.createElement(z.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},x.createElement(z.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},x.createElement("span",null,x.createElement("span",{className:"mr5"},Ge?`${Ge}/`:""),x.createElement(b.default,{className:At.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),x.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")),x.createElement(z.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},x.createElement(b.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"})),x.createElement("div",{className:"mt10 mb20"},x.createElement(z.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},x.createElement(O.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"]}}))),x.createElement(z.default.Item,{noStyle:!0},x.createElement(m.t,{okButtonProps:{htmlType:"submit"},onCancel:Qt})))))};var ut=(0,E.connect)(({shixunsDetail:P,loading:W,globalSetting:H,user:re})=>({shixunsDetail:P,globalSetting:H,user:re,loading:W.models.index}))(me);const Mt=({globalSetting:P})=>{var W;switch(Number((W=P==null?void 0:P.setting)==null?void 0:W.theme)){case L.Fy.THEMEONE:return x.createElement(Je,null);case L.Fy.THEMETWO:return x.createElement(te,null);case L.Fy.THEMETHREE:return x.createElement(It,null);case L.Fy.DEFAULT:default:return x.createElement(ut,null)}};var dt=(0,E.connect)(({globalSetting:P})=>({globalSetting:P}))(Mt)},9708:function(sn,he,f){"use strict";f.d(he,{F:function(){return b},Z:function(){return z}});var L=f(94184),x=f.n(L);const E=null;function z(O,m,ce){return x()({[`${O}-status-success`]:m==="success",[`${O}-status-warning`]:m==="warning",[`${O}-status-error`]:m==="error",[`${O}-status-validating`]:m==="validating",[`${O}-has-feedback`]:ce})}const b=(O,m)=>m||O},88258:function(sn,he,f){"use strict";var L=f(67294),x=f(53124),E=f(32983);const z=b=>{const{componentName:O}=b,{getPrefixCls:m}=(0,L.useContext)(x.E_),ce=m("empty");switch(O){case"Table":case"List":return L.createElement(E.Z,{image:E.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return L.createElement(E.Z,{image:E.Z.PRESENTED_IMAGE_SIMPLE,className:`${ce}-small`});default:return L.createElement(E.Z,null)}};he.Z=z},32983:function(sn,he,f){"use strict";f.d(he,{Z:function(){return ee}});var L=f(94184),x=f.n(L),E=f(67294),z=f(53124),b=f(10110),O=f(84780),m=f(29691),V=()=>{const[,ne]=(0,m.Z)(),c=new O.C(ne.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return E.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},E.createElement("g",{fill:"none",fillRule:"evenodd"},E.createElement("g",{transform:"translate(24 31.67)"},E.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),E.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"}),E.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)"}),E.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"}),E.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"})),E.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"}),E.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},E.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),E.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},xe=()=>{const[,ne]=(0,m.Z)(),{colorFill:p,colorFillTertiary:c,colorFillQuaternary:C,colorBgContainer:T}=ne,{borderColor:Q,shadowColor:N,contentColor:j}=(0,E.useMemo)(()=>({borderColor:new O.C(p).onBackground(T).toHexShortString(),shadowColor:new O.C(c).onBackground(T).toHexShortString(),contentColor:new O.C(C).onBackground(T).toHexShortString()}),[p,c,C,T]);return E.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},E.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},E.createElement("ellipse",{fill:N,cx:"32",cy:"33",rx:"32",ry:"7"}),E.createElement("g",{fillRule:"nonzero",stroke:Q},E.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"}),E.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:j}))))},ue=f(67968),Le=f(45503);const be=ne=>{const{componentCls:p,margin:c,marginXS:C,marginXL:T,fontSize:Q,lineHeight:N}=ne;return{[p]:{marginInline:C,fontSize:Q,lineHeight:N,textAlign:"center",[`${p}-image`]:{height:ne.emptyImgHeight,marginBottom:C,opacity:ne.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${p}-description`]:{color:ne.colorText},[`${p}-footer`]:{marginTop:c},"&-normal":{marginBlock:T,color:ne.colorTextDisabled,[`${p}-description`]:{color:ne.colorTextDisabled},[`${p}-image`]:{height:ne.emptyImgHeightMD}},"&-small":{marginBlock:C,color:ne.colorTextDisabled,[`${p}-image`]:{height:ne.emptyImgHeightSM}}}}};var Oe=(0,ue.Z)("Empty",ne=>{const{componentCls:p,controlHeightLG:c}=ne,C=(0,Le.TS)(ne,{emptyImgCls:`${p}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[be(C)]}),Se=function(ne,p){var c={};for(var C in ne)Object.prototype.hasOwnProperty.call(ne,C)&&p.indexOf(C)<0&&(c[C]=ne[C]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var T=0,C=Object.getOwnPropertySymbols(ne);T<C.length;T++)p.indexOf(C[T])<0&&Object.prototype.propertyIsEnumerable.call(ne,C[T])&&(c[C[T]]=ne[C[T]]);return c};const k=E.createElement(V,null),Je=E.createElement(xe,null),Ot=ne=>{var{className:p,rootClassName:c,prefixCls:C,image:T=k,description:Q,children:N,imageStyle:j,style:te}=ne,ke=Se(ne,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ge,direction:tt,empty:qe}=E.useContext(z.E_),_e=ge("empty",C),[mt,yt]=Oe(_e),[at]=(0,b.Z)("Empty"),Ue=typeof Q!="undefined"?Q:at==null?void 0:at.description,Ke=typeof Ue=="string"?Ue:"empty";let It=null;return typeof T=="string"?It=E.createElement("img",{alt:Ke,src:T}):It=T,mt(E.createElement("div",Object.assign({className:x()(yt,_e,qe==null?void 0:qe.className,{[`${_e}-normal`]:T===Je,[`${_e}-rtl`]:tt==="rtl"},p,c),style:Object.assign(Object.assign({},qe==null?void 0:qe.style),te)},ke),E.createElement("div",{className:`${_e}-image`,style:j},It),Ue&&E.createElement("div",{className:`${_e}-description`},Ue),N&&E.createElement("div",{className:`${_e}-footer`},N)))};Ot.PRESENTED_IMAGE_DEFAULT=k,Ot.PRESENTED_IMAGE_SIMPLE=Je;var ee=Ot},22150:function(sn,he,f){"use strict";f.d(he,{default:function(){return Qe}});var L=f(74902),x=f(94184),E=f.n(x),z=f(38379),b=f(67294),O=f(33603),m=f(65223);function ce(y){const[F,$]=b.useState(y);return b.useEffect(()=>{const A=setTimeout(()=>{$(y)},y.length?0:10);return()=>{clearTimeout(A)}},[y]),F}var V=f(14747),h=f(50438),xe=f(33507),ue=f(45503),Le=f(67968),Oe=y=>{const{componentCls:F}=y,$=`${F}-show-help`,A=`${F}-show-help-item`;return{[$]:{transition:`opacity ${y.motionDurationSlow} ${y.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[A]:{overflow:"hidden",transition:`height ${y.motionDurationSlow} ${y.motionEaseInOut},
opacity ${y.motionDurationSlow} ${y.motionEaseInOut},
transform ${y.motionDurationSlow} ${y.motionEaseInOut} !important`,[`&${A}-appear, &${A}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${A}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Se=y=>({legend:{display:"block",width:"100%",marginBottom:y.marginLG,padding:0,color:y.colorTextDescription,fontSize:y.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${y.lineWidth}px ${y.lineType} ${y.colorBorder}`},label:{fontSize:y.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 ${y.controlOutlineWidth}px ${y.controlOutline}`},output:{display:"block",paddingTop:15,color:y.colorText,fontSize:y.fontSize,lineHeight:y.lineHeight}}),k=(y,F)=>{const{formItemCls:$}=y;return{[$]:{[`${$}-label > label`]:{height:F},[`${$}-control-input`]:{minHeight:F}}}},Je=y=>{const{componentCls:F}=y;return{[y.componentCls]:Object.assign(Object.assign(Object.assign({},(0,V.Wf)(y)),Se(y)),{[`${F}-text`]:{display:"inline-block",paddingInlineEnd:y.paddingSM},"&-small":Object.assign({},k(y,y.controlHeightSM)),"&-large":Object.assign({},k(y,y.controlHeightLG))})}},Ot=y=>{const{formItemCls:F,iconCls:$,componentCls:A,rootPrefixCls:Z,labelRequiredMarkColor:B,labelColor:$e,labelFontSize:Ct,labelHeight:et,labelColonMarginInlineStart:Ce,labelColonMarginInlineEnd:Te,itemMarginBottom:Pe}=y;return{[F]:Object.assign(Object.assign({},(0,V.Wf)(y)),{marginBottom:Pe,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${Z}-row`]:{display:"none"},"&-has-warning":{[`${F}-split`]:{color:y.colorError}},"&-has-error":{[`${F}-split`]:{color:y.colorWarning}},[`${F}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${y.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:et,color:$e,fontSize:Ct,[`> ${$}`]:{fontSize:y.fontSize,verticalAlign:"top"},[`&${F}-required:not(${F}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:y.marginXXS,color:B,fontSize:y.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${A}-hide-required-mark &`]:{display:"none"}},[`${F}-optional`]:{display:"inline-block",marginInlineStart:y.marginXXS,color:y.colorTextDescription,[`${A}-hide-required-mark &`]:{display:"none"}},[`${F}-tooltip`]:{color:y.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:y.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Ce,marginInlineEnd:Te},[`&${F}-no-colon::after`]:{content:'"\\a0"'}}},[`${F}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Z}-col-'"]):not([class*="' ${Z}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:y.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[F]:{"&-explain, &-extra":{clear:"both",color:y.colorTextDescription,fontSize:y.fontSize,lineHeight:y.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:y.controlHeightSM,transition:`color ${y.motionDurationMid} ${y.motionEaseOut}`},"&-explain":{"&-error":{color:y.colorError},"&-warning":{color:y.colorWarning}}},[`&-with-help ${F}-explain`]:{height:"auto",opacity:1},[`${F}-feedback-icon`]:{fontSize:y.fontSize,textAlign:"center",visibility:"visible",animationName:h.kr,animationDuration:y.motionDurationMid,animationTimingFunction:y.motionEaseOutBack,pointerEvents:"none","&-success":{color:y.colorSuccess},"&-error":{color:y.colorError},"&-warning":{color:y.colorWarning},"&-validating":{color:y.colorPrimary}}})}},ee=y=>{const{componentCls:F,formItemCls:$}=y;return{[`${F}-horizontal`]:{[`${$}-label`]:{flexGrow:0},[`${$}-control`]:{flex:"1 1 0",minWidth:0},[`${$}-label[class$='-24'], ${$}-label[class*='-24 ']`]:{[`& + ${$}-control`]:{minWidth:"unset"}}}}},ne=y=>{const{componentCls:F,formItemCls:$}=y;return{[`${F}-inline`]:{display:"flex",flexWrap:"wrap",[$]:{flex:"none",marginInlineEnd:y.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${$}-label,
> ${$}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${$}-label`]:{flex:"none"},[`${F}-text`]:{display:"inline-block"},[`${$}-has-feedback`]:{display:"inline-block"}}}}},p=y=>({padding:y.verticalLabelPadding,margin:y.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=y=>{const{componentCls:F,formItemCls:$,rootPrefixCls:A}=y;return{[`${$} ${$}-label`]:p(y),[F]:{[$]:{flexWrap:"wrap",[`${$}-label, ${$}-control`]:{[`&:not([class*=" ${A}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},C=y=>{const{componentCls:F,formItemCls:$,rootPrefixCls:A}=y;return{[`${F}-vertical`]:{[$]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${F}-item-control`]:{width:"100%"}}},[`${F}-vertical ${$}-label,
.${A}-col-24${$}-label,
.${A}-col-xl-24${$}-label`]:p(y),[`@media (max-width: ${y.screenXSMax}px)`]:[c(y),{[F]:{[`.${A}-col-xs-24${$}-label`]:p(y)}}],[`@media (max-width: ${y.screenSMMax}px)`]:{[F]:{[`.${A}-col-sm-24${$}-label`]:p(y)}},[`@media (max-width: ${y.screenMDMax}px)`]:{[F]:{[`.${A}-col-md-24${$}-label`]:p(y)}},[`@media (max-width: ${y.screenLGMax}px)`]:{[F]:{[`.${A}-col-lg-24${$}-label`]:p(y)}}}},T=(y,F)=>(0,ue.TS)(y,{formItemCls:`${y.componentCls}-item`,rootPrefixCls:F});var Q=(0,Le.Z)("Form",(y,F)=>{let{rootPrefixCls:$}=F;const A=T(y,$);return[Je(A),Ot(A),Oe(A),ee(A),ne(A),C(A),(0,xe.Z)(A),h.kr]},y=>({labelRequiredMarkColor:y.colorError,labelColor:y.colorTextHeading,labelFontSize:y.fontSize,labelHeight:y.controlHeight,labelColonMarginInlineStart:y.marginXXS/2,labelColonMarginInlineEnd:y.marginXS,itemMarginBottom:y.marginLG,verticalLabelPadding:`0 0 ${y.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const N=[];function j(y,F,$){let A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof y=="string"?y:`${F}-${A}`,error:y,errorStatus:$}}var ke=y=>{let{help:F,helpStatus:$,errors:A=N,warnings:Z=N,className:B,fieldId:$e,onVisibleChanged:Ct}=y;const{prefixCls:et}=b.useContext(m.Rk),Ce=`${et}-item-explain`,[,Te]=Q(et),Pe=(0,b.useMemo)(()=>(0,O.Z)(et),[et]),Vt=ce(A),U=ce(Z),ze=b.useMemo(()=>F!=null?[j(F,"help",$)]:[].concat((0,L.Z)(Vt.map((xn,Pt)=>j(xn,"error","error",Pt))),(0,L.Z)(U.map((xn,Pt)=>j(xn,"warning","warning",Pt)))),[F,$,Vt,U]),rn={};return $e&&(rn.id=`${$e}_help`),b.createElement(z.default,{motionDeadline:Pe.motionDeadline,motionName:`${et}-show-help`,visible:!!ze.length,onVisibleChanged:Ct},xn=>{const{className:Pt,style:xt}=xn;return b.createElement("div",Object.assign({},rn,{className:E()(Ce,Pt,B,Te),style:xt,role:"alert"}),b.createElement(z.CSSMotionList,Object.assign({keys:ze},(0,O.Z)(et),{motionName:`${et}-show-help-item`,component:!1}),On=>{const{key:Ne,error:cn,errorStatus:on,className:Rn,style:Sn}=On;return b.createElement("div",{key:Ne,className:E()(Rn,{[`${Ce}-${on}`]:on}),style:Sn},cn)}))})},ge=f(46660),tt=f(53124),qe=f(98866),_e=f(97647),mt=f(98675),yt=f(17423);const at=["parentNode"],Ue="form_item";function Ke(y){return y===void 0||y===!1?[]:Array.isArray(y)?y:[y]}function It(y,F){if(!y.length)return;const $=y.join("_");return F?`${F}_${$}`:at.includes($)?`${Ue}_${$}`:$}function At(y,F,$,A,Z,B){let $e=A;return B!==void 0?$e=B:$.validating?$e="validating":y.length?$e="error":F.length?$e="warning":($.touched||Z&&$.validated)&&($e="success"),$e}function Ve(y){return Ke(y).join("_")}function rt(y){const[F]=(0,ge.useForm)(),$=b.useRef({}),A=b.useMemo(()=>y!=null?y:Object.assign(Object.assign({},F),{__INTERNAL__:{itemRef:Z=>B=>{const $e=Ve(Z);B?$.current[$e]=B:delete $.current[$e]}},scrollToField:function(Z){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const $e=Ke(Z),Ct=It($e,A.__INTERNAL__.name),et=Ct?document.getElementById(Ct):null;et&&(0,yt.Z)(et,Object.assign({scrollMode:"if-needed",block:"nearest"},B))},getFieldInstance:Z=>{const B=Ve(Z);return $.current[B]}}),[y,F]);return[A]}var Ye=f(37920),vn=function(y,F){var $={};for(var A in y)Object.prototype.hasOwnProperty.call(y,A)&&F.indexOf(A)<0&&($[A]=y[A]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,A=Object.getOwnPropertySymbols(y);Z<A.length;Z++)F.indexOf(A[Z])<0&&Object.prototype.propertyIsEnumerable.call(y,A[Z])&&($[A[Z]]=y[A[Z]]);return $};const Hn=(y,F)=>{const $=b.useContext(qe.Z),{getPrefixCls:A,direction:Z,form:B}=b.useContext(tt.E_),{prefixCls:$e,className:Ct,rootClassName:et,size:Ce,disabled:Te=$,form:Pe,colon:Vt,labelAlign:U,labelWrap:ze,labelCol:rn,wrapperCol:xn,hideRequiredMark:Pt,layout:xt="horizontal",scrollToFirstError:On,requiredMark:Ne,onFinishFailed:cn,name:on,style:Rn,feedbackIcons:Sn}=y,Sr=vn(y,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Vn=(0,mt.Z)(Ce),Wn=b.useContext(Ye.Z),Rr=(0,b.useMemo)(()=>Ne!==void 0?Ne:B&&B.requiredMark!==void 0?B.requiredMark:!Pt,[Pt,Ne,B]),Fr=Vt!=null?Vt:B==null?void 0:B.colon,An=A("form",$e),[Cr,dr]=Q(An),xr=E()(An,`${An}-${xt}`,{[`${An}-hide-required-mark`]:Rr===!1,[`${An}-rtl`]:Z==="rtl",[`${An}-${Vn}`]:Vn},dr,B==null?void 0:B.className,Ct,et),[Mn]=rt(Pe),{__INTERNAL__:ar}=Mn;ar.name=on;const Gn=(0,b.useMemo)(()=>({name:on,labelAlign:U,labelCol:rn,labelWrap:ze,wrapperCol:xn,vertical:xt==="vertical",colon:Fr,requiredMark:Rr,itemRef:ar.itemRef,form:Mn,feedbackIcons:Sn}),[on,U,rn,xn,xt,Fr,Rr,Mn,Sn]);b.useImperativeHandle(F,()=>Mn);const Xn=(hr,En)=>{if(hr){let Zn={block:"nearest"};typeof hr=="object"&&(Zn=hr),Mn.scrollToField(En,Zn)}},tr=hr=>{if(cn==null||cn(hr),hr.errorFields.length){const En=hr.errorFields[0].name;if(On!==void 0){Xn(On,En);return}B&&B.scrollToFirstError!==void 0&&Xn(B.scrollToFirstError,En)}};return Cr(b.createElement(qe.n,{disabled:Te},b.createElement(_e.q,{size:Vn},b.createElement(m.RV,Object.assign({},{validateMessages:Wn}),b.createElement(m.q3.Provider,{value:Gn},b.createElement(ge.default,Object.assign({id:on},Sr,{name:on,onFinishFailed:tr,form:Mn,style:Object.assign(Object.assign({},B==null?void 0:B.style),Rn),className:xr})))))))};var de=b.forwardRef(Hn),He=f(9475),me=f(17799),ut=f(96159),Mt=f(37419);function dt(y){if(typeof y=="function")return y;const F=(0,Mt.Z)(y);return F.length<=1?F[0]:F}const P=()=>{const{status:y,errors:F=[],warnings:$=[]}=(0,b.useContext)(m.aM);return{status:y,errors:F,warnings:$}};P.Context=m.aM;var W=P,H=f(96523);function re(y){const[F,$]=b.useState(y),A=(0,b.useRef)(null),Z=(0,b.useRef)([]),B=(0,b.useRef)(!1);b.useEffect(()=>(B.current=!1,()=>{B.current=!0,H.Z.cancel(A.current),A.current=null}),[]);function $e(Ct){B.current||(A.current===null&&(Z.current=[],A.current=(0,H.Z)(()=>{A.current=null,$(et=>{let Ce=et;return Z.current.forEach(Te=>{Ce=Te(Ce)}),Ce})})),Z.current.push(Ct))}return[F,$e]}function bt(){const{itemRef:y}=b.useContext(m.q3),F=b.useRef({});function $(A,Z){const B=Z&&typeof Z=="object"&&Z.ref,$e=A.join("_");return(F.current.name!==$e||F.current.originRef!==B)&&(F.current.name=$e,F.current.originRef=B,F.current.ref=(0,me.sQ)(y(A),B)),F.current.ref}return $}var lt=f(48130),De=f(14075),ht=f(10366),ye=f(92820),it=f(21584);const In=y=>{const{formItemCls:F}=y;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${F}-control`]:{display:"flex"}}}};var Rt=(0,Le.b)(["Form","item-item"],(y,F)=>{let{rootPrefixCls:$}=F;const A=T(y,$);return[In(A)]}),oe=y=>{const{prefixCls:F,status:$,wrapperCol:A,children:Z,errors:B,warnings:$e,_internalItemRender:Ct,extra:et,help:Ce,fieldId:Te,marginBottom:Pe,onErrorVisibleChanged:Vt}=y,U=`${F}-item`,ze=b.useContext(m.q3),rn=A||ze.wrapperCol||{},xn=E()(`${U}-control`,rn.className),Pt=b.useMemo(()=>Object.assign({},ze),[ze]);delete Pt.labelCol,delete Pt.wrapperCol;const xt=b.createElement("div",{className:`${U}-control-input`},b.createElement("div",{className:`${U}-control-input-content`},Z)),On=b.useMemo(()=>({prefixCls:F,status:$}),[F,$]),Ne=Pe!==null||B.length||$e.length?b.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},b.createElement(m.Rk.Provider,{value:On},b.createElement(ke,{fieldId:Te,errors:B,warnings:$e,help:Ce,helpStatus:$,className:`${U}-explain-connected`,onVisibleChanged:Vt})),!!Pe&&b.createElement("div",{style:{width:0,height:Pe}})):null,cn={};Te&&(cn.id=`${Te}_extra`);const on=et?b.createElement("div",Object.assign({},cn,{className:`${U}-extra`}),et):null,Rn=Ct&&Ct.mark==="pro_table_render"&&Ct.render?Ct.render(y,{input:xt,errorList:Ne,extra:on}):b.createElement(b.Fragment,null,xt,Ne,on);return b.createElement(m.q3.Provider,{value:Pt},b.createElement(it.Z,Object.assign({},rn,{className:xn}),Rn),b.createElement(Rt,{prefixCls:F}))},Ge=f(17663),_t=f(24457),Yt=f(10110),Qt=f(83062),vt=function(y,F){var $={};for(var A in y)Object.prototype.hasOwnProperty.call(y,A)&&F.indexOf(A)<0&&($[A]=y[A]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,A=Object.getOwnPropertySymbols(y);Z<A.length;Z++)F.indexOf(A[Z])<0&&Object.prototype.propertyIsEnumerable.call(y,A[Z])&&($[A[Z]]=y[A[Z]]);return $};function Be(y){return y?typeof y=="object"&&!b.isValidElement(y)?y:{title:y}:null}var Ht=y=>{let{prefixCls:F,label:$,htmlFor:A,labelCol:Z,labelAlign:B,colon:$e,required:Ct,requiredMark:et,tooltip:Ce}=y;var Te;const[Pe]=(0,Yt.Z)("Form"),{vertical:Vt,labelAlign:U,labelCol:ze,labelWrap:rn,colon:xn}=b.useContext(m.q3);if(!$)return null;const Pt=Z||ze||{},xt=B||U,On=`${F}-item-label`,Ne=E()(On,xt==="left"&&`${On}-left`,Pt.className,{[`${On}-wrap`]:!!rn});let cn=$;const on=$e===!0||xn!==!1&&$e!==!1;on&&!Vt&&typeof $=="string"&&$.trim()!==""&&(cn=$.replace(/[:|]\s*$/,""));const Sn=Be(Ce);if(Sn){const{icon:Rr=b.createElement(Ge.Z,null)}=Sn,Fr=vt(Sn,["icon"]),An=b.createElement(Qt.Z,Object.assign({},Fr),b.cloneElement(Rr,{className:`${F}-item-tooltip`,title:""}));cn=b.createElement(b.Fragment,null,cn,An)}const Sr=et==="optional",Vn=typeof et=="function";Vn?cn=et(cn,{required:!!Ct}):Sr&&!Ct&&(cn=b.createElement(b.Fragment,null,cn,b.createElement("span",{className:`${F}-item-optional`,title:""},(Pe==null?void 0:Pe.optional)||((Te=_t.Z.Form)===null||Te===void 0?void 0:Te.optional))));const Wn=E()({[`${F}-item-required`]:Ct,[`${F}-item-required-mark-optional`]:Sr||Vn,[`${F}-item-no-colon`]:!on});return b.createElement(it.Z,Object.assign({},Pt,{className:Ne}),b.createElement("label",{htmlFor:A,className:Wn,title:typeof $=="string"?$:""},cn))},er=f(87725),jr=f(16646),kr=f(87995),Si=f(3407);const li={success:er.Z,warning:kr.Z,error:jr.Z,validating:Si.Z};function Mi(y){let{children:F,errors:$,warnings:A,hasFeedback:Z,validateStatus:B,prefixCls:$e,meta:Ct,noStyle:et}=y;const Ce=`${$e}-item`,{feedbackIcons:Te}=b.useContext(m.q3),Pe=At($,A,Ct,null,!!Z,B),{isFormItemInput:Vt,status:U}=b.useContext(m.aM),ze=b.useMemo(()=>{var rn;let xn;if(Z){const On=Z!==!0&&Z.icons||Te,Ne=Pe&&((rn=On==null?void 0:On({status:Pe,errors:$,warnings:A}))===null||rn===void 0?void 0:rn[Pe]),cn=Pe&&li[Pe];xn=Ne!==!1&&cn?b.createElement("span",{className:E()(`${Ce}-feedback-icon`,`${Ce}-feedback-icon-${Pe}`)},Ne||b.createElement(cn,null)):null}let Pt=!0,xt=Pe||"";return et&&(Pt=Vt,xt=(Pe!=null?Pe:U)||""),{status:xt,errors:$,warnings:A,hasFeedback:!!Z,feedbackIcon:xn,isFormItemInput:Pt}},[Pe,Z,et,Vt,U]);return b.createElement(m.aM.Provider,{value:ze},F)}var _r=function(y,F){var $={};for(var A in y)Object.prototype.hasOwnProperty.call(y,A)&&F.indexOf(A)<0&&($[A]=y[A]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,A=Object.getOwnPropertySymbols(y);Z<A.length;Z++)F.indexOf(A[Z])<0&&Object.prototype.propertyIsEnumerable.call(y,A[Z])&&($[A[Z]]=y[A[Z]]);return $};function Ci(y){const{prefixCls:F,className:$,rootClassName:A,style:Z,help:B,errors:$e,warnings:Ct,validateStatus:et,meta:Ce,hasFeedback:Te,hidden:Pe,children:Vt,fieldId:U,required:ze,isRequired:rn,onSubItemMetaChange:xn}=y,Pt=_r(y,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),xt=`${F}-item`,{requiredMark:On}=b.useContext(m.q3),Ne=b.useRef(null),cn=ce($e),on=ce(Ct),Rn=B!=null,Sn=!!(Rn||$e.length||Ct.length),Sr=!!Ne.current&&(0,lt.Z)(Ne.current),[Vn,Wn]=b.useState(null);(0,De.Z)(()=>{if(Sn&&Ne.current){const dr=getComputedStyle(Ne.current);Wn(parseInt(dr.marginBottom,10))}},[Sn,Sr]);const Rr=dr=>{dr||Wn(null)},An=function(){let dr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const xr=dr?cn:Ce.errors,Mn=dr?on:Ce.warnings;return At(xr,Mn,Ce,"",!!Te,et)}(),Cr=E()(xt,$,A,{[`${xt}-with-help`]:Rn||cn.length||on.length,[`${xt}-has-feedback`]:An&&Te,[`${xt}-has-success`]:An==="success",[`${xt}-has-warning`]:An==="warning",[`${xt}-has-error`]:An==="error",[`${xt}-is-validating`]:An==="validating",[`${xt}-hidden`]:Pe});return b.createElement("div",{className:Cr,style:Z,ref:Ne},b.createElement(ye.Z,Object.assign({className:`${xt}-row`},(0,ht.Z)(Pt,["_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"])),b.createElement(Ht,Object.assign({htmlFor:U},y,{requiredMark:On,required:ze!=null?ze:rn,prefixCls:F})),b.createElement(oe,Object.assign({},y,Ce,{errors:cn,warnings:on,prefixCls:F,status:An,help:B,marginBottom:Vn,onErrorVisibleChanged:Rr}),b.createElement(m.qI.Provider,{value:xn},b.createElement(Mi,{prefixCls:F,meta:Ce,errors:Ce.errors,warnings:Ce.warnings,hasFeedback:Te,validateStatus:An},Vt)))),!!Vn&&b.createElement("div",{className:`${xt}-margin-offset`,style:{marginBottom:-Vn}}))}const si="__SPLIT__",Pi=null,I=b.memo(y=>{let{children:F}=y;return F},(y,F)=>y.value===F.value&&y.update===F.update&&y.childProps.length===F.childProps.length&&y.childProps.every(($,A)=>$===F.childProps[A]));function Y(y){return y!=null}function _(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function X(y){const{name:F,noStyle:$,className:A,dependencies:Z,prefixCls:B,shouldUpdate:$e,rules:Ct,children:et,required:Ce,label:Te,messageVariables:Pe,trigger:Vt="onChange",validateTrigger:U,hidden:ze,help:rn}=y,{getPrefixCls:xn}=b.useContext(tt.E_),{name:Pt}=b.useContext(m.q3),xt=dt(et),On=typeof xt=="function",Ne=b.useContext(m.qI),{validateTrigger:cn}=b.useContext(ge.FieldContext),on=U!==void 0?U:cn,Rn=Y(F),Sn=xn("form",B),[Sr,Vn]=Q(Sn),Wn=b.useContext(ge.ListContext),Rr=b.useRef(),[Fr,An]=re({}),[Cr,dr]=(0,He.Z)(()=>_()),xr=En=>{const Zn=Wn==null?void 0:Wn.getKey(En.name);if(dr(En.destroy?_():En,!0),$&&rn!==!1&&Ne){let Yn=En.name;if(En.destroy)Yn=Rr.current||Yn;else if(Zn!==void 0){const[Lr,ui]=Zn;Yn=[Lr].concat((0,L.Z)(ui)),Rr.current=Yn}Ne(En,Yn)}},Mn=(En,Zn)=>{An(Yn=>{const Lr=Object.assign({},Yn),Vr=[].concat((0,L.Z)(En.name.slice(0,-1)),(0,L.Z)(Zn)).join(si);return En.destroy?delete Lr[Vr]:Lr[Vr]=En,Lr})},[ar,Gn]=b.useMemo(()=>{const En=(0,L.Z)(Cr.errors),Zn=(0,L.Z)(Cr.warnings);return Object.values(Fr).forEach(Yn=>{En.push.apply(En,(0,L.Z)(Yn.errors||[])),Zn.push.apply(Zn,(0,L.Z)(Yn.warnings||[]))}),[En,Zn]},[Fr,Cr.errors,Cr.warnings]),Xn=bt();function tr(En,Zn,Yn){return $&&!ze?b.createElement(Mi,{prefixCls:Sn,hasFeedback:y.hasFeedback,validateStatus:y.validateStatus,meta:Cr,errors:ar,warnings:Gn,noStyle:!0},En):b.createElement(Ci,Object.assign({key:"row"},y,{className:E()(A,Vn),prefixCls:Sn,fieldId:Zn,isRequired:Yn,errors:ar,warnings:Gn,meta:Cr,onSubItemMetaChange:Mn}),En)}if(!Rn&&!On&&!Z)return Sr(tr(xt));let hr={};return typeof Te=="string"?hr.label=Te:F&&(hr.label=String(F)),Pe&&(hr=Object.assign(Object.assign({},hr),Pe)),Sr(b.createElement(ge.Field,Object.assign({},y,{messageVariables:hr,trigger:Vt,validateTrigger:on,onMetaChange:xr}),(En,Zn,Yn)=>{const Lr=Ke(F).length&&Zn?Zn.name:[],ui=It(Lr,Pt),Vr=Ce!==void 0?Ce:!!(Ct&&Ct.some(Bn=>{if(Bn&&typeof Bn=="object"&&Bn.required&&!Bn.warningOnly)return!0;if(typeof Bn=="function"){const Xr=Bn(Yn);return Xr&&Xr.required&&!Xr.warningOnly}return!1})),Gr=Object.assign({},En);let ci=null;if(Array.isArray(xt)&&Rn)ci=xt;else if(!(On&&(!($e||Z)||Rn))){if(!(Z&&!On&&!Rn))if((0,ut.l$)(xt)){const Bn=Object.assign(Object.assign({},xt.props),Gr);if(Bn.id||(Bn.id=ui),rn||ar.length>0||Gn.length>0||y.extra){const Br=[];(rn||ar.length>0)&&Br.push(`${ui}_help`),y.extra&&Br.push(`${ui}_extra`),Bn["aria-describedby"]=Br.join(" ")}ar.length>0&&(Bn["aria-invalid"]="true"),Vr&&(Bn["aria-required"]="true"),(0,me.Yr)(xt)&&(Bn.ref=Xn(Lr,xt)),new Set([].concat((0,L.Z)(Ke(Vt)),(0,L.Z)(Ke(on)))).forEach(Br=>{Bn[Br]=function(){for(var Ai,zi,xi,Yr,_i,Hi=arguments.length,Vi=new Array(Hi),Ni=0;Ni<Hi;Ni++)Vi[Ni]=arguments[Ni];(xi=Gr[Br])===null||xi===void 0||(Ai=xi).call.apply(Ai,[Gr].concat(Vi)),(_i=(Yr=xt.props)[Br])===null||_i===void 0||(zi=_i).call.apply(zi,[Yr].concat(Vi))}});const $r=[Bn["aria-required"],Bn["aria-invalid"],Bn["aria-describedby"]];ci=b.createElement(I,{value:Gr[y.valuePropName||"value"],update:xt,childProps:$r},(0,ut.Tm)(xt,Bn))}else On&&($e||Z)&&!Rn?ci=xt(Yn):ci=xt}return tr(ci,ui,Vr)}))}const We=X;We.useStatus=W;var we=We,Ie=function(y,F){var $={};for(var A in y)Object.prototype.hasOwnProperty.call(y,A)&&F.indexOf(A)<0&&($[A]=y[A]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,A=Object.getOwnPropertySymbols(y);Z<A.length;Z++)F.indexOf(A[Z])<0&&Object.prototype.propertyIsEnumerable.call(y,A[Z])&&($[A[Z]]=y[A[Z]]);return $},Dt=y=>{var{prefixCls:F,children:$}=y,A=Ie(y,["prefixCls","children"]);const{getPrefixCls:Z}=b.useContext(tt.E_),B=Z("form",F),$e=b.useMemo(()=>({prefixCls:B,status:"error"}),[B]);return b.createElement(ge.List,Object.assign({},A),(Ct,et,Ce)=>b.createElement(m.Rk.Provider,{value:$e},$(Ct.map(Te=>Object.assign(Object.assign({},Te),{fieldKey:Te.key})),et,{errors:Ce.errors,warnings:Ce.warnings})))};function Ut(){const{form:y}=(0,b.useContext)(m.q3);return y}const pt=de;pt.Item=we,pt.List=Dt,pt.ErrorList=ke,pt.useForm=rt,pt.useFormInstance=Ut,pt.useWatch=ge.useWatch,pt.Provider=m.RV,pt.create=()=>{};var Qe=pt},82586:function(sn,he,f){"use strict";f.d(he,{Z:function(){return Ot},n:function(){return k}});var L=f(16646),x=f(94184),E=f.n(x),z=f(67656),b=f(17799),O=f(67294),m=f(9708),ce=f(53124),V=f(98866),h=f(98675),xe=f(65223),ue=f(4173),Le=f(72922),be=f(47673);function Oe(ee){return!!(ee.prefix||ee.suffix||ee.allowClear)}var Se=function(ee,ne){var p={};for(var c in ee)Object.prototype.hasOwnProperty.call(ee,c)&&ne.indexOf(c)<0&&(p[c]=ee[c]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var C=0,c=Object.getOwnPropertySymbols(ee);C<c.length;C++)ne.indexOf(c[C])<0&&Object.prototype.propertyIsEnumerable.call(ee,c[C])&&(p[c[C]]=ee[c[C]]);return p};function k(ee,ne){if(!ee)return;ee.focus(ne);const{cursor:p}=ne||{};if(p){const c=ee.value.length;switch(p){case"start":ee.setSelectionRange(0,0);break;case"end":ee.setSelectionRange(c,c);break;default:ee.setSelectionRange(0,c);break}}}var Ot=(0,O.forwardRef)((ee,ne)=>{var p;const{prefixCls:c,bordered:C=!0,status:T,size:Q,disabled:N,onBlur:j,onFocus:te,suffix:ke,allowClear:ge,addonAfter:tt,addonBefore:qe,className:_e,style:mt,styles:yt,rootClassName:at,onChange:Ue,classNames:Ke}=ee,It=Se(ee,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:At,direction:Ve,input:rt}=O.useContext(ce.E_),Ye=At("input",c),vn=(0,O.useRef)(null),[Hn,Ee]=(0,be.ZP)(Ye),{compactSize:de,compactItemClassnames:He}=(0,ue.ri)(Ye,Ve),me=(0,h.Z)(Rt=>{var Nt;return(Nt=Q!=null?Q:de)!==null&&Nt!==void 0?Nt:Rt}),ut=O.useContext(V.Z),Mt=N!=null?N:ut,{status:dt,hasFeedback:P,feedbackIcon:W}=(0,O.useContext)(xe.aM),H=(0,m.F)(dt,T),re=Oe(ee)||!!P,bt=(0,O.useRef)(re);(0,O.useEffect)(()=>{var Rt;re&&bt.current,bt.current=re},[re]);const lt=(0,Le.Z)(vn,!0),De=Rt=>{lt(),j==null||j(Rt)},ht=Rt=>{lt(),te==null||te(Rt)},ye=Rt=>{lt(),Ue==null||Ue(Rt)},it=(P||ke)&&O.createElement(O.Fragment,null,ke,P&&W);let In;return typeof ge=="object"&&(ge!=null&&ge.clearIcon)?In=ge:ge&&(In={clearIcon:O.createElement(L.Z,null)}),Hn(O.createElement(z.default,Object.assign({ref:(0,b.sQ)(ne,vn),prefixCls:Ye,autoComplete:rt==null?void 0:rt.autoComplete},It,{disabled:Mt,onBlur:De,onFocus:ht,style:Object.assign(Object.assign({},rt==null?void 0:rt.style),mt),styles:Object.assign(Object.assign({},rt==null?void 0:rt.styles),yt),suffix:it,allowClear:In,className:E()(_e,at,He,rt==null?void 0:rt.className),onChange:ye,addonAfter:tt&&O.createElement(ue.BR,null,O.createElement(xe.Ux,{override:!0,status:!0},tt)),addonBefore:qe&&O.createElement(ue.BR,null,O.createElement(xe.Ux,{override:!0,status:!0},qe)),classNames:Object.assign(Object.assign(Object.assign({},Ke),rt==null?void 0:rt.classNames),{input:E()({[`${Ye}-sm`]:me==="small",[`${Ye}-lg`]:me==="large",[`${Ye}-rtl`]:Ve==="rtl",[`${Ye}-borderless`]:!C},!re&&(0,m.Z)(Ye,H),Ke==null?void 0:Ke.input,(p=rt==null?void 0:rt.classNames)===null||p===void 0?void 0:p.input,Ee)}),classes:{affixWrapper:E()({[`${Ye}-affix-wrapper-sm`]:me==="small",[`${Ye}-affix-wrapper-lg`]:me==="large",[`${Ye}-affix-wrapper-rtl`]:Ve==="rtl",[`${Ye}-affix-wrapper-borderless`]:!C},(0,m.Z)(`${Ye}-affix-wrapper`,H,P),Ee),wrapper:E()({[`${Ye}-group-rtl`]:Ve==="rtl"},Ee),group:E()({[`${Ye}-group-wrapper-sm`]:me==="small",[`${Ye}-group-wrapper-lg`]:me==="large",[`${Ye}-group-wrapper-rtl`]:Ve==="rtl",[`${Ye}-group-wrapper-disabled`]:Mt},(0,m.Z)(`${Ye}-group-wrapper`,H,P),Ee)}})))})},96330:function(sn,he,f){"use strict";var L=f(16646),x=f(94184),E=f.n(x),z=f(64701),b=f(67294),O=f(9708),m=f(53124),ce=f(98866),V=f(98675),h=f(65223),xe=f(82586),ue=f(47673),Le=function(Oe,Se){var k={};for(var Je in Oe)Object.prototype.hasOwnProperty.call(Oe,Je)&&Se.indexOf(Je)<0&&(k[Je]=Oe[Je]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ot=0,Je=Object.getOwnPropertySymbols(Oe);Ot<Je.length;Ot++)Se.indexOf(Je[Ot])<0&&Object.prototype.propertyIsEnumerable.call(Oe,Je[Ot])&&(k[Je[Ot]]=Oe[Je[Ot]]);return k};const be=(0,b.forwardRef)((Oe,Se)=>{const{prefixCls:k,bordered:Je=!0,size:Ot,disabled:ee,status:ne,allowClear:p,showCount:c,classNames:C,rootClassName:T,className:Q}=Oe,N=Le(Oe,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:j,direction:te}=b.useContext(m.E_),ke=(0,V.Z)(Ot),ge=b.useContext(ce.Z),tt=ee!=null?ee:ge,{status:qe,hasFeedback:_e,feedbackIcon:mt}=b.useContext(h.aM),yt=(0,O.F)(qe,ne),at=b.useRef(null);b.useImperativeHandle(Se,()=>{var Ve;return{resizableTextArea:(Ve=at.current)===null||Ve===void 0?void 0:Ve.resizableTextArea,focus:rt=>{var Ye,vn;(0,xe.n)((vn=(Ye=at.current)===null||Ye===void 0?void 0:Ye.resizableTextArea)===null||vn===void 0?void 0:vn.textArea,rt)},blur:()=>{var rt;return(rt=at.current)===null||rt===void 0?void 0:rt.blur()}}});const Ue=j("input",k);let Ke;typeof p=="object"&&(p!=null&&p.clearIcon)?Ke=p:p&&(Ke={clearIcon:b.createElement(L.Z,null)});const[It,At]=(0,ue.ZP)(Ue);return It(b.createElement(z.default,Object.assign({},N,{disabled:tt,allowClear:Ke,className:E()(Q,T),classes:{affixWrapper:E()(`${Ue}-textarea-affix-wrapper`,{[`${Ue}-affix-wrapper-rtl`]:te==="rtl",[`${Ue}-affix-wrapper-borderless`]:!Je,[`${Ue}-affix-wrapper-sm`]:ke==="small",[`${Ue}-affix-wrapper-lg`]:ke==="large",[`${Ue}-textarea-show-count`]:c},(0,O.Z)(`${Ue}-affix-wrapper`,yt),At)},classNames:Object.assign(Object.assign({},C),{textarea:E()({[`${Ue}-borderless`]:!Je,[`${Ue}-sm`]:ke==="small",[`${Ue}-lg`]:ke==="large"},(0,O.Z)(Ue,yt),At,C==null?void 0:C.textarea)}),prefixCls:Ue,suffix:_e&&b.createElement("span",{className:`${Ue}-textarea-suffix`},mt),showCount:c,ref:at})))});he.Z=be},72922:function(sn,he,f){"use strict";f.d(he,{Z:function(){return x}});var L=f(67294);function x(E,z){const b=(0,L.useRef)([]),O=()=>{b.current.push(setTimeout(()=>{var m,ce,V,h;!((m=E.current)===null||m===void 0)&&m.input&&((ce=E.current)===null||ce===void 0?void 0:ce.input.getAttribute("type"))==="password"&&(!((V=E.current)===null||V===void 0)&&V.input.hasAttribute("value"))&&((h=E.current)===null||h===void 0||h.input.removeAttribute("value"))}))};return(0,L.useEffect)(()=>(z&&O(),()=>b.current.forEach(m=>{m&&clearTimeout(m)})),[]),O}},69677:function(sn,he,f){"use strict";f.d(he,{default:function(){return ke}});var L=f(94184),x=f.n(L),E=f(67294),z=f(53124),b=f(65223),O=f(47673),ce=ge=>{const{getPrefixCls:tt,direction:qe}=(0,E.useContext)(z.E_),{prefixCls:_e,className:mt}=ge,yt=tt("input-group",_e),at=tt("input"),[Ue,Ke]=(0,O.ZP)(at),It=x()(yt,{[`${yt}-lg`]:ge.size==="large",[`${yt}-sm`]:ge.size==="small",[`${yt}-compact`]:ge.compact,[`${yt}-rtl`]:qe==="rtl"},Ke,mt),At=(0,E.useContext)(b.aM),Ve=(0,E.useMemo)(()=>Object.assign(Object.assign({},At),{isFormItemInput:!1}),[At]);return Ue(E.createElement("span",{className:It,style:ge.style,onMouseEnter:ge.onMouseEnter,onMouseLeave:ge.onMouseLeave,onFocus:ge.onFocus,onBlur:ge.onBlur},E.createElement(b.aM.Provider,{value:Ve},ge.children)))},V=f(82586),h=f(63237),xe=f(99569),ue=f(10366),Le=f(17799),be=f(72922),Oe=function(ge,tt){var qe={};for(var _e in ge)Object.prototype.hasOwnProperty.call(ge,_e)&&tt.indexOf(_e)<0&&(qe[_e]=ge[_e]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,_e=Object.getOwnPropertySymbols(ge);mt<_e.length;mt++)tt.indexOf(_e[mt])<0&&Object.prototype.propertyIsEnumerable.call(ge,_e[mt])&&(qe[_e[mt]]=ge[_e[mt]]);return qe};const Se=ge=>ge?E.createElement(xe.Z,null):E.createElement(h.Z,null),k={click:"onClick",hover:"onMouseOver"};var Ot=E.forwardRef((ge,tt)=>{const{visibilityToggle:qe=!0}=ge,_e=typeof qe=="object"&&qe.visible!==void 0,[mt,yt]=(0,E.useState)(()=>_e?qe.visible:!1),at=(0,E.useRef)(null);E.useEffect(()=>{_e&&yt(qe.visible)},[_e,qe]);const Ue=(0,be.Z)(at),Ke=()=>{const{disabled:Mt}=ge;Mt||(mt&&Ue(),yt(dt=>{var P;const W=!dt;return typeof qe=="object"&&((P=qe.onVisibleChange)===null||P===void 0||P.call(qe,W)),W}))},It=Mt=>{const{action:dt="click",iconRender:P=Se}=ge,W=k[dt]||"",H=P(mt),re={[W]:Ke,className:`${Mt}-icon`,key:"passwordIcon",onMouseDown:bt=>{bt.preventDefault()},onMouseUp:bt=>{bt.preventDefault()}};return E.cloneElement(E.isValidElement(H)?H:E.createElement("span",null,H),re)},{className:At,prefixCls:Ve,inputPrefixCls:rt,size:Ye}=ge,vn=Oe(ge,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Hn}=E.useContext(z.E_),Ee=Hn("input",rt),de=Hn("input-password",Ve),He=qe&&It(de),me=x()(de,At,{[`${de}-${Ye}`]:!!Ye}),ut=Object.assign(Object.assign({},(0,ue.Z)(vn,["suffix","iconRender","visibilityToggle"])),{type:mt?"text":"password",className:me,prefixCls:Ee,suffix:He});return Ye&&(ut.size=Ye),E.createElement(V.Z,Object.assign({ref:(0,Le.sQ)(tt,at)},ut))}),ee=f(72395),ne=f(96159),p=f(71577),c=f(98675),C=f(4173),T=function(ge,tt){var qe={};for(var _e in ge)Object.prototype.hasOwnProperty.call(ge,_e)&&tt.indexOf(_e)<0&&(qe[_e]=ge[_e]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,_e=Object.getOwnPropertySymbols(ge);mt<_e.length;mt++)tt.indexOf(_e[mt])<0&&Object.prototype.propertyIsEnumerable.call(ge,_e[mt])&&(qe[_e[mt]]=ge[_e[mt]]);return qe},N=E.forwardRef((ge,tt)=>{const{prefixCls:qe,inputPrefixCls:_e,className:mt,size:yt,suffix:at,enterButton:Ue=!1,addonAfter:Ke,loading:It,disabled:At,onSearch:Ve,onChange:rt,onCompositionStart:Ye,onCompositionEnd:vn}=ge,Hn=T(ge,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Ee,direction:de}=E.useContext(z.E_),He=E.useRef(!1),me=Ee("input-search",qe),ut=Ee("input",_e),{compactSize:Mt}=(0,C.ri)(me,de),dt=(0,c.Z)(oe=>{var Ge;return(Ge=yt!=null?yt:Mt)!==null&&Ge!==void 0?Ge:oe}),P=E.useRef(null),W=oe=>{oe&&oe.target&&oe.type==="click"&&Ve&&Ve(oe.target.value,oe,{source:"clear"}),rt&&rt(oe)},H=oe=>{var Ge;document.activeElement===((Ge=P.current)===null||Ge===void 0?void 0:Ge.input)&&oe.preventDefault()},re=oe=>{var Ge,_t;Ve&&Ve((_t=(Ge=P.current)===null||Ge===void 0?void 0:Ge.input)===null||_t===void 0?void 0:_t.value,oe,{source:"input"})},bt=oe=>{He.current||It||re(oe)},lt=typeof Ue=="boolean"?E.createElement(ee.Z,null):null,De=`${me}-button`;let ht;const ye=Ue||{},it=ye.type&&ye.type.__ANT_BUTTON===!0;it||ye.type==="button"?ht=(0,ne.Tm)(ye,Object.assign({onMouseDown:H,onClick:oe=>{var Ge,_t;(_t=(Ge=ye==null?void 0:ye.props)===null||Ge===void 0?void 0:Ge.onClick)===null||_t===void 0||_t.call(Ge,oe),re(oe)},key:"enterButton"},it?{className:De,size:dt}:{})):ht=E.createElement(p.ZP,{className:De,type:Ue?"primary":void 0,size:dt,disabled:At,key:"enterButton",onMouseDown:H,onClick:re,loading:It,icon:lt},Ue),Ke&&(ht=[ht,(0,ne.Tm)(Ke,{key:"addonAfter"})]);const In=x()(me,{[`${me}-rtl`]:de==="rtl",[`${me}-${dt}`]:!!dt,[`${me}-with-button`]:!!Ue},mt),Rt=oe=>{He.current=!0,Ye==null||Ye(oe)},Nt=oe=>{He.current=!1,vn==null||vn(oe)};return E.createElement(V.Z,Object.assign({ref:(0,Le.sQ)(P,tt),onPressEnter:bt},Hn,{size:dt,onCompositionStart:Rt,onCompositionEnd:Nt,prefixCls:ut,addonAfter:ht,suffix:at,onChange:W,className:In,disabled:At}))}),j=f(96330);const te=V.Z;te.Group=ce,te.Search=N,te.TextArea=j.Z,te.Password=Ot;var ke=te},47673:function(sn,he,f){"use strict";f.d(he,{M1:function(){return m},TM:function(){return ne},Xy:function(){return ce},bi:function(){return xe},e5:function(){return ee},ik:function(){return ue},nz:function(){return b},pU:function(){return O},s7:function(){return Le},x0:function(){return h}});var L=f(14747),x=f(80110),E=f(45503),z=f(67968);const b=p=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:p,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),O=p=>({borderColor:p.hoverBorderColor}),m=p=>({borderColor:p.activeBorderColor,boxShadow:p.activeShadow,outline:0}),ce=p=>({color:p.colorTextDisabled,backgroundColor:p.colorBgContainerDisabled,borderColor:p.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},O((0,E.TS)(p,{hoverBorderColor:p.colorBorder})))}),V=p=>{const{paddingBlockLG:c,fontSizeLG:C,lineHeightLG:T,borderRadiusLG:Q,paddingInlineLG:N}=p;return{padding:`${c}px ${N}px`,fontSize:C,lineHeight:T,borderRadius:Q}},h=p=>({padding:`${p.paddingBlockSM}px ${p.paddingInlineSM}px`,borderRadius:p.borderRadiusSM}),xe=(p,c)=>{const{componentCls:C,colorError:T,colorWarning:Q,errorActiveShadow:N,warningActiveShadow:j,colorErrorBorderHover:te,colorWarningBorderHover:ke}=p;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:T,"&:hover":{borderColor:te},"&:focus, &-focused":Object.assign({},m((0,E.TS)(p,{activeBorderColor:T,activeShadow:N}))),[`${C}-prefix, ${C}-suffix`]:{color:T}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:Q,"&:hover":{borderColor:ke},"&:focus, &-focused":Object.assign({},m((0,E.TS)(p,{activeBorderColor:Q,activeShadow:j}))),[`${C}-prefix, ${C}-suffix`]:{color:Q}}}},ue=p=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${p.paddingBlock}px ${p.paddingInline}px`,color:p.colorText,fontSize:p.fontSize,lineHeight:p.lineHeight,backgroundColor:p.colorBgContainer,backgroundImage:"none",borderWidth:p.lineWidth,borderStyle:p.lineType,borderColor:p.colorBorder,borderRadius:p.borderRadius,transition:`all ${p.motionDurationMid}`},b(p.colorTextPlaceholder)),{"&:hover":Object.assign({},O(p)),"&:focus, &-focused":Object.assign({},m(p)),"&-disabled, &[disabled]":Object.assign({},ce(p)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:p.controlHeight,lineHeight:p.lineHeight,verticalAlign:"bottom",transition:`all ${p.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},V(p)),"&-sm":Object.assign({},h(p)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),Le=p=>{const{componentCls:c,antCls:C}=p;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:p.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${c}, &-lg > ${c}-group-addon`]:Object.assign({},V(p)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},h(p)),[`&-lg ${C}-select-single ${C}-select-selector`]:{height:p.controlHeightLG},[`&-sm ${C}-select-single ${C}-select-selector`]:{height:p.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 ${p.paddingInline}px`,color:p.colorText,fontWeight:"normal",fontSize:p.fontSize,textAlign:"center",backgroundColor:p.colorFillAlter,border:`${p.lineWidth}px ${p.lineType} ${p.colorBorder}`,borderRadius:p.borderRadius,transition:`all ${p.motionDurationSlow}`,lineHeight:1,[`${C}-select`]:{margin:`-${p.paddingBlock+1}px -${p.paddingInline}px`,[`&${C}-select-single:not(${C}-select-customize-input)`]:{[`${C}-select-selector`]:{backgroundColor:"inherit",border:`${p.lineWidth}px ${p.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${C}-select-selector`]:{color:p.colorPrimary}}},[`${C}-cascader-picker`]:{margin:`-9px -${p.paddingInline}px`,backgroundColor:"transparent",[`${C}-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,[`${C}-select ${C}-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,[`${C}-select ${C}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${c}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${c}-search &`]:{borderStartStartRadius:p.borderRadius,borderEndStartRadius:p.borderRadius}},[`&:not(:first-child), ${c}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${c}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,L.dF)()),{[`${c}-group-addon, ${c}-group-wrap, > ${c}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:p.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${c}-affix-wrapper,
& > ${c}-number-affix-wrapper,
& > ${C}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-p.lineWidth,borderInlineEndWidth:p.lineWidth},[`${c}`]:{float:"none"},[`& > ${C}-select > ${C}-select-selector,
& > ${C}-select-auto-complete ${c},
& > ${C}-cascader-picker ${c},
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:p.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${C}-select-focused`]:{zIndex:1},[`& > ${C}-select > ${C}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${C}-select:first-child > ${C}-select-selector,
& > ${C}-select-auto-complete:first-child ${c},
& > ${C}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:p.borderRadius,borderEndStartRadius:p.borderRadius},[`& > *:last-child,
& > ${C}-select:last-child > ${C}-select-selector,
& > ${C}-cascader-picker:last-child ${c},
& > ${C}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:p.lineWidth,borderStartEndRadius:p.borderRadius,borderEndEndRadius:p.borderRadius},[`& > ${C}-select-auto-complete ${c}`]:{verticalAlign:"top"},[`${c}-group-wrapper + ${c}-group-wrapper`]:{marginInlineStart:-p.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:p.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:p.borderRadius}}}})}},be=p=>{const{componentCls:c,controlHeightSM:C,lineWidth:T}=p,N=(C-T*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,L.Wf)(p)),ue(p)),xe(p,c)),{'&[type="color"]':{height:p.controlHeight,[`&${c}-lg`]:{height:p.controlHeightLG},[`&${c}-sm`]:{height:C,paddingTop:N,paddingBottom:N}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},Oe=p=>{const{componentCls:c}=p;return{[`${c}-clear-icon`]:{margin:0,color:p.colorTextQuaternary,fontSize:p.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${p.motionDurationSlow}`,"&:hover":{color:p.colorTextTertiary},"&:active":{color:p.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${p.inputAffixPadding}px`}}}},Se=p=>{const{componentCls:c,inputAffixPadding:C,colorTextDescription:T,motionDurationSlow:Q,colorIcon:N,colorIconHover:j,iconCls:te}=p;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ue(p)),{display:"inline-flex",[`&:not(${c}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},O(p)),{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:p.paddingXS}},"&-show-count-suffix":{color:T},"&-show-count-has-suffix":{marginInlineEnd:p.paddingXXS},"&-prefix":{marginInlineEnd:C},"&-suffix":{marginInlineStart:C}}}),Oe(p)),{[`${te}${c}-password-icon`]:{color:N,cursor:"pointer",transition:`all ${Q}`,"&:hover":{color:j}}}),xe(p,`${c}-affix-wrapper`))}},k=p=>{const{componentCls:c,colorError:C,colorWarning:T,borderRadiusLG:Q,borderRadiusSM:N}=p;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,L.Wf)(p)),Le(p)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:Q,fontSize:p.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:N}},"&-status-error":{[`${c}-group-addon`]:{color:C,borderColor:C}},"&-status-warning":{[`${c}-group-addon`]:{color:T,borderColor:T}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},ce(p))},[`&: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}}}})}},Je=p=>{const{componentCls:c,antCls:C}=p,T=`${c}-search`;return{[T]:{[`${c}`]:{"&:hover, &:focus":{borderColor:p.colorPrimaryHover,[`+ ${c}-group-addon ${T}-button:not(${C}-btn-primary)`]:{borderInlineStartColor:p.colorPrimaryHover}}},[`${c}-affix-wrapper`]:{borderRadius:0},[`${c}-lg`]:{lineHeight:p.lineHeightLG-2e-4},[`> ${c}-group`]:{[`> ${c}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${T}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:p.borderRadius,borderEndEndRadius:p.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${T}-button:not(${C}-btn-primary)`]:{color:p.colorTextDescription,"&:hover":{color:p.colorPrimaryHover},"&:active":{color:p.colorPrimaryActive},[`&${C}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${T}-button`]:{height:p.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${T}-button`]:{height:p.controlHeightLG},[`&-small ${T}-button`]:{height:p.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${c}-compact-item`]:{[`&:not(${c}-compact-last-item)`]:{[`${c}-group-addon`]:{[`${c}-search-button`]:{marginInlineEnd:-p.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}}}}},Ot=p=>{const{componentCls:c,paddingLG:C}=p,T=`${c}-textarea`;return{[T]:{position:"relative","&-show-count":{[`> ${c}`]:{height:"100%"},[`${c}-data-count`]:{position:"absolute",bottom:-p.fontSize*p.lineHeight,insetInlineEnd:0,color:p.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${c}`]:{paddingInlineEnd:C}},[`&-affix-wrapper${T}-has-feedback`]:{[`${c}`]:{paddingInlineEnd:C}},[`&-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:p.paddingXS,insetBlockStart:p.paddingXS},[`${T}-suffix`]:{position:"absolute",top:0,insetInlineEnd:p.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function ee(p){return(0,E.TS)(p,{inputAffixPadding:p.paddingXXS})}const ne=p=>{const{controlHeight:c,fontSize:C,lineHeight:T,lineWidth:Q,controlHeightSM:N,controlHeightLG:j,fontSizeLG:te,lineHeightLG:ke,paddingSM:ge,controlPaddingHorizontalSM:tt,controlPaddingHorizontal:qe,colorFillAlter:_e,colorPrimaryHover:mt,controlOutlineWidth:yt,controlOutline:at,colorErrorOutline:Ue,colorWarningOutline:Ke}=p;return{paddingBlock:Math.max(Math.round((c-C*T)/2*10)/10-Q,3),paddingBlockSM:Math.max(Math.round((N-C*T)/2*10)/10-Q,0),paddingBlockLG:Math.ceil((j-te*ke)/2*10)/10-Q,paddingInline:ge-Q,paddingInlineSM:tt-Q,paddingInlineLG:qe-Q,addonBg:_e,activeBorderColor:mt,hoverBorderColor:mt,activeShadow:`0 0 0 ${yt}px ${at}`,errorActiveShadow:`0 0 0 ${yt}px ${Ue}`,warningActiveShadow:`0 0 0 ${yt}px ${Ke}`}};he.ZP=(0,z.Z)("Input",p=>{const c=(0,E.TS)(p,ee(p));return[be(c),Ot(c),Se(c),k(c),Je(c),(0,x.c)(c)]},ne)},11713:function(sn,he,f){"use strict";f.d(he,{default:function(){return Eo}});var L=f(94184),x=f.n(L),E=f(87462),z=f(74902),b=f(4942),O=f(1413),m=f(97685),ce=f(45987),V=f(71002),h=f(67294);function xe(d){var v=h.useRef();v.current=d;var D=h.useCallback(function(){for(var M,G=arguments.length,J=new Array(G),ve=0;ve<G;ve++)J[ve]=arguments[ve];return(M=v.current)===null||M===void 0?void 0:M.call.apply(M,[v].concat(J))},[]);return D}function ue(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Le=ue()?h.useLayoutEffect:h.useEffect,be=Le,Oe=function(v,D){var M=h.useRef(!0);Le(function(){if(!M.current)return v()},D),Le(function(){return M.current=!1,function(){M.current=!0}},[])};function Se(d){var v=h.useRef(!1),D=h.useState(d),M=(0,m.Z)(D,2),G=M[0],J=M[1];h.useEffect(function(){return v.current=!1,function(){v.current=!0}},[]);function ve(Me,Ae){Ae&&v.current||J(Me)}return[G,ve]}function k(d){return d!==void 0}function Je(d,v){var D=v||{},M=D.defaultValue,G=D.value,J=D.onChange,ve=D.postState,Me=Se(function(){return k(G)?G:k(M)?typeof M=="function"?M():M:typeof d=="function"?d():d}),Ae=(0,m.Z)(Me,2),ie=Ae[0],ae=Ae[1],le=G!==void 0?G:ie,je=ve?ve(le):le,se=xe(J),st=Se([le]),$t=(0,m.Z)(st,2),Wt=$t[0],zt=$t[1];Oe(function(){var Bt=Wt[0];ie!==Bt&&se(ie,Bt)},[Wt]),Oe(function(){k(G)||ae(G)},[G]);var Ft=xe(function(Bt,pn){ae(Bt,pn),zt([le],pn)});return[je,Ft]}var Ot={};function ee(d,v){}function ne(d,v){}function p(){Ot={}}function c(d,v,D){!v&&!Ot[D]&&(d(!1,D),Ot[D]=!0)}function C(d,v){c(ee,d,v)}function T(d,v){c(ne,d,v)}var Q=C,N=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var d=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(d)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(d==null?void 0:d.substr(0,4))},j={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(v){var D=v.keyCode;if(v.altKey&&!v.ctrlKey||v.metaKey||D>=j.F1&&D<=j.F12)return!1;switch(D){case j.ALT:case j.CAPS_LOCK:case j.CONTEXT_MENU:case j.CTRL:case j.DOWN:case j.END:case j.ESC:case j.HOME:case j.INSERT:case j.LEFT:case j.MAC_FF_META:case j.META:case j.NUMLOCK:case j.NUM_CENTER:case j.PAGE_DOWN:case j.PAGE_UP:case j.PAUSE:case j.PRINT_SCREEN:case j.RIGHT:case j.SHIFT:case j.UP:case j.WIN_KEY:case j.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(v){if(v>=j.ZERO&&v<=j.NINE||v>=j.NUM_ZERO&&v<=j.NUM_MULTIPLY||v>=j.A&&v<=j.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&v===0)return!0;switch(v){case j.SPACE:case j.QUESTION_MARK:case j.NUM_PLUS:case j.NUM_MINUS:case j.NUM_PERIOD:case j.NUM_DIVISION:case j.SEMICOLON:case j.DASH:case j.EQUALS:case j.COMMA:case j.PERIOD:case j.SLASH:case j.APOSTROPHE:case j.SINGLE_QUOTE:case j.OPEN_SQUARE_BRACKET:case j.BACKSLASH:case j.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},te=j,ke=f(47655);function ge(d,v,D){var M=h.useRef({});return(!("value"in M.current)||D(M.current.condition,v))&&(M.current.value=d(),M.current.condition=v),M.current.value}function tt(d,v){typeof d=="function"?d(v):(0,V.Z)(d)==="object"&&d&&"current"in d&&(d.current=v)}function qe(){for(var d=arguments.length,v=new Array(d),D=0;D<d;D++)v[D]=arguments[D];var M=v.filter(function(G){return G});return M.length<=1?M[0]:function(G){v.forEach(function(J){tt(J,G)})}}function _e(){for(var d=arguments.length,v=new Array(d),D=0;D<d;D++)v[D]=arguments[D];return ge(function(){return qe.apply(void 0,v)},v,function(M,G){return M.length===G.length&&M.every(function(J,ve){return J===G[ve]})})}function mt(d){var v,D,M=isMemo(d)?d.type.type:d.type;return!(typeof M=="function"&&!((v=M.prototype)!==null&&v!==void 0&&v.render)||typeof d=="function"&&!((D=d.prototype)!==null&&D!==void 0&&D.render))}var yt=function(v){var D=v.className,M=v.customizeIcon,G=v.customizeIconProps,J=v.onMouseDown,ve=v.onClick,Me=v.children,Ae;return typeof M=="function"?Ae=M(G):Ae=M,h.createElement("span",{className:D,onMouseDown:function(ae){ae.preventDefault(),J&&J(ae)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:ve,"aria-hidden":!0},Ae!==void 0?Ae:h.createElement("span",{className:x()(D.split(/\s+/).map(function(ie){return"".concat(ie,"-icon")}))},Me))},at=yt;function Ue(d,v,D,M,G){var J=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,ve=arguments.length>6?arguments[6]:void 0,Me=arguments.length>7?arguments[7]:void 0,Ae=h.useMemo(function(){if((0,V.Z)(M)==="object")return M.clearIcon;if(G)return G},[M,G]),ie=h.useMemo(function(){return!!(!J&&M&&(D.length||ve)&&!(Me==="combobox"&&ve===""))},[M,J,D.length,ve,Me]);return{allowClear:ie,clearIcon:h.createElement(at,{className:"".concat(d,"-clear"),onMouseDown:v,customizeIcon:Ae},"\xD7")}}var Ke=h.createContext(null);function It(){return h.useContext(Ke)}function At(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,v=h.useState(!1),D=(0,m.Z)(v,2),M=D[0],G=D[1],J=h.useRef(null),ve=function(){window.clearTimeout(J.current)};h.useEffect(function(){return ve},[]);var Me=function(ie,ae){ve(),J.current=window.setTimeout(function(){G(ie),ae&&ae()},d)};return[M,Me,ve]}function Ve(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,v=h.useRef(null),D=h.useRef(null);h.useEffect(function(){return function(){window.clearTimeout(D.current)}},[]);function M(G){(G||v.current===null)&&(v.current=G),window.clearTimeout(D.current),D.current=window.setTimeout(function(){v.current=null},d)}return[function(){return v.current},M]}function rt(d,v,D,M){var G=h.useRef(null);G.current={open:v,triggerOpen:D,customizedTrigger:M},h.useEffect(function(){function J(ve){var Me;if(!((Me=G.current)!==null&&Me!==void 0&&Me.customizedTrigger)){var Ae=ve.target;Ae.shadowRoot&&ve.composed&&(Ae=ve.composedPath()[0]||Ae),G.current.open&&d().filter(function(ie){return ie}).every(function(ie){return!ie.contains(Ae)&&ie!==Ae})&&G.current.triggerOpen(!1)}}return window.addEventListener("mousedown",J),function(){return window.removeEventListener("mousedown",J)}},[])}var Ye=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,vn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Hn="".concat(Ye," ").concat(vn).split(/[\s\n]+/),Ee="aria-",de="data-";function He(d,v){return d.indexOf(v)===0}function me(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D;v===!1?D={aria:!0,data:!0,attr:!0}:v===!0?D={aria:!0}:D=(0,O.Z)({},v);var M={};return Object.keys(d).forEach(function(G){(D.aria&&(G==="role"||He(G,Ee))||D.data&&He(G,de)||D.attr&&Hn.includes(G))&&(M[G]=d[G])}),M}var ut=f(48555),Mt=f(14075),dt=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],P=void 0;function W(d,v){var D=d.prefixCls,M=d.invalidate,G=d.item,J=d.renderItem,ve=d.responsive,Me=d.responsiveDisabled,Ae=d.registerSize,ie=d.itemKey,ae=d.className,le=d.style,je=d.children,se=d.display,st=d.order,$t=d.component,Wt=$t===void 0?"div":$t,zt=(0,ce.Z)(d,dt),Ft=ve&&!se;function Bt(en){Ae(ie,en)}h.useEffect(function(){return function(){Bt(null)}},[]);var pn=J&&G!==P?J(G):je,an;M||(an={opacity:Ft?0:1,height:Ft?0:P,overflowY:Ft?"hidden":P,order:ve?st:P,pointerEvents:Ft?"none":P,position:Ft?"absolute":P});var Lt={};Ft&&(Lt["aria-hidden"]=!0);var qt=h.createElement(Wt,(0,E.Z)({className:x()(!M&&D,ae),style:(0,O.Z)((0,O.Z)({},an),le)},Lt,zt,{ref:v}),pn);return ve&&(qt=h.createElement(ut.Z,{onResize:function(gn){var tn=gn.offsetWidth;Bt(tn)},disabled:Me},qt)),qt}var H=h.forwardRef(W);H.displayName="Item";var re=H,bt=f(77527),lt=f(73935),De=f(96523);function ht(d){if(typeof MessageChannel=="undefined")(0,De.Z)(d);else{var v=new MessageChannel;v.port1.onmessage=function(){return d()},v.port2.postMessage(void 0)}}function ye(){var d=h.useRef(null),v=function(M){d.current||(d.current=[],ht(function(){(0,lt.unstable_batchedUpdates)(function(){d.current.forEach(function(G){G()}),d.current=null})})),d.current.push(M)};return v}function it(d,v){var D=h.useState(v),M=(0,m.Z)(D,2),G=M[0],J=M[1],ve=(0,bt.Z)(function(Me){d(function(){J(Me)})});return[G,ve]}var In=h.createContext(null),Rt=["component"],Nt=["className"],oe=["className"],Ge=function(v,D){var M=h.useContext(In);if(!M){var G=v.component,J=G===void 0?"div":G,ve=(0,ce.Z)(v,Rt);return h.createElement(J,(0,E.Z)({},ve,{ref:D}))}var Me=M.className,Ae=(0,ce.Z)(M,Nt),ie=v.className,ae=(0,ce.Z)(v,oe);return h.createElement(In.Provider,{value:null},h.createElement(re,(0,E.Z)({ref:D,className:x()(Me,ie)},Ae,ae)))},_t=h.forwardRef(Ge);_t.displayName="RawItem";var Yt=_t,Qt=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],vt="responsive",Be="invalidate";function Jt(d){return"+ ".concat(d.length," ...")}function Ht(d,v){var D=d.prefixCls,M=D===void 0?"rc-overflow":D,G=d.data,J=G===void 0?[]:G,ve=d.renderItem,Me=d.renderRawItem,Ae=d.itemKey,ie=d.itemWidth,ae=ie===void 0?10:ie,le=d.ssr,je=d.style,se=d.className,st=d.maxCount,$t=d.renderRest,Wt=d.renderRawRest,zt=d.suffix,Ft=d.component,Bt=Ft===void 0?"div":Ft,pn=d.itemComponent,an=d.onVisibleChange,Lt=(0,ce.Z)(d,Qt),qt=le==="full",en=ye(),gn=it(en,null),tn=(0,m.Z)(gn,2),fn=tn[0],Fn=tn[1],mn=fn||0,yn=it(en,new Map),bn=(0,m.Z)(yn,2),St=bn[0],Tt=bn[1],Kt=it(en,0),un=(0,m.Z)(Kt,2),zr=un[0],Er=un[1],lr=it(en,0),wr=(0,m.Z)(lr,2),ln=wr[0],Qn=wr[1],Qr=it(en,0),Zt=(0,m.Z)(Qr,2),ft=Zt[0],Gt=Zt[1],Ln=(0,h.useState)(null),Cn=(0,m.Z)(Ln,2),dn=Cn[0],jt=Cn[1],Nn=(0,h.useState)(null),nr=(0,m.Z)(Nn,2),Jn=nr[0],cr=nr[1],qn=h.useMemo(function(){return Jn===null&&qt?Number.MAX_SAFE_INTEGER:Jn||0},[Jn,fn]),sr=(0,h.useState)(!1),Dn=(0,m.Z)(sr,2),jn=Dn[0],Zr=Dn[1],Jr="".concat(M,"-item"),qr=Math.max(zr,ln),vr=st===vt,$n=J.length&&vr,Or=st===Be,di=$n||typeof st=="number"&&J.length>st,Tr=(0,h.useMemo)(function(){var kt=J;return $n?fn===null&&qt?kt=J:kt=J.slice(0,Math.min(J.length,mn/ae)):typeof st=="number"&&(kt=J.slice(0,st)),kt},[J,ae,fn,st,$n]),rr=(0,h.useMemo)(function(){return $n?J.slice(qn+1):J.slice(Tr.length)},[J,Tr,$n,qn]),pr=(0,h.useCallback)(function(kt,pe){var nt;return typeof Ae=="function"?Ae(kt):(nt=Ae&&(kt==null?void 0:kt[Ae]))!==null&&nt!==void 0?nt:pe},[Ae]),ei=(0,h.useCallback)(ve||function(kt){return kt},[ve]);function hi(kt,pe,nt){Jn===kt&&(pe===void 0||pe===dn)||(cr(kt),nt||(Zr(kt<J.length-1),an==null||an(kt)),pe!==void 0&&jt(pe))}function Wi(kt,pe){Fn(pe.clientWidth)}function Bi(kt,pe){Tt(function(nt){var ot=new Map(nt);return pe===null?ot.delete(kt):ot.set(kt,pe),ot})}function ti(kt,pe){Qn(pe),Er(ln)}function vi(kt,pe){Gt(pe)}function gr(kt){return St.get(pr(Tr[kt],kt))}(0,Mt.Z)(function(){if(mn&&typeof qr=="number"&&Tr){var kt=ft,pe=Tr.length,nt=pe-1;if(!pe){hi(0,null);return}for(var ot=0;ot<pe;ot+=1){var Et=gr(ot);if(qt&&(Et=Et||0),Et===void 0){hi(ot-1,void 0,!0);break}if(kt+=Et,nt===0&&kt<=mn||ot===nt-1&&kt+gr(nt)<=mn){hi(nt,null);break}else if(kt+qr>mn){hi(ot-1,kt-Et-ft+ln);break}}zt&&gr(0)+ft>mn&&jt(null)}},[mn,St,ln,ft,pr,Tr]);var mr=jn&&!!rr.length,ni={};dn!==null&&$n&&(ni={position:"absolute",left:dn,top:0});var Dr={prefixCls:Jr,responsive:$n,component:pn,invalidate:Or},Fi=Me?function(kt,pe){var nt=pr(kt,pe);return h.createElement(In.Provider,{key:nt,value:(0,O.Z)((0,O.Z)({},Dr),{},{order:pe,item:kt,itemKey:nt,registerSize:Bi,display:pe<=qn})},Me(kt,pe))}:function(kt,pe){var nt=pr(kt,pe);return h.createElement(re,(0,E.Z)({},Dr,{order:pe,key:nt,item:kt,renderItem:ei,itemKey:nt,registerSize:Bi,display:pe<=qn}))},Yi,to={order:mr?qn:Number.MAX_SAFE_INTEGER,className:"".concat(Jr,"-rest"),registerSize:ti,display:mr};if(Wt)Wt&&(Yi=h.createElement(In.Provider,{value:(0,O.Z)((0,O.Z)({},Dr),to)},Wt(rr)));else{var Ei=$t||Jt;Yi=h.createElement(re,(0,E.Z)({},Dr,to),typeof Ei=="function"?Ei(rr):Ei)}var Zi=h.createElement(Bt,(0,E.Z)({className:x()(!Or&&M,se),style:je,ref:v},Lt),Tr.map(Fi),di?Yi:null,zt&&h.createElement(re,(0,E.Z)({},Dr,{responsive:vr,responsiveDisabled:!$n,order:qn,className:"".concat(Jr,"-suffix"),registerSize:vi,display:!0,style:ni}),zt));return vr&&(Zi=h.createElement(ut.Z,{onResize:Wi,disabled:!$n},Zi)),Zi}var er=h.forwardRef(Ht);er.displayName="Overflow",er.Item=Yt,er.RESPONSIVE=vt,er.INVALIDATE=Be;var jr=er,kr=jr,Si=function(v,D){var M,G,J=v.prefixCls,ve=v.id,Me=v.inputElement,Ae=v.disabled,ie=v.tabIndex,ae=v.autoFocus,le=v.autoComplete,je=v.editable,se=v.activeDescendantId,st=v.value,$t=v.maxLength,Wt=v.onKeyDown,zt=v.onMouseDown,Ft=v.onChange,Bt=v.onPaste,pn=v.onCompositionStart,an=v.onCompositionEnd,Lt=v.open,qt=v.attrs,en=Me||h.createElement("input",null),gn=en,tn=gn.ref,fn=gn.props,Fn=fn.onKeyDown,mn=fn.onChange,yn=fn.onMouseDown,bn=fn.onCompositionStart,St=fn.onCompositionEnd,Tt=fn.style;return"maxLength"in en.props,en=h.cloneElement(en,(0,O.Z)((0,O.Z)((0,O.Z)({type:"search"},fn),{},{id:ve,ref:qe(D,tn),disabled:Ae,tabIndex:ie,autoComplete:le||"off",autoFocus:ae,className:x()("".concat(J,"-selection-search-input"),(M=en)===null||M===void 0||(G=M.props)===null||G===void 0?void 0:G.className),role:"combobox","aria-label":"Search","aria-expanded":Lt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ve,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ve,"_list"),"aria-activedescendant":Lt?se:void 0},qt),{},{value:je?st:"",maxLength:$t,readOnly:!je,unselectable:je?null:"on",style:(0,O.Z)((0,O.Z)({},Tt),{},{opacity:je?null:0}),onKeyDown:function(un){Wt(un),Fn&&Fn(un)},onMouseDown:function(un){zt(un),yn&&yn(un)},onChange:function(un){Ft(un),mn&&mn(un)},onCompositionStart:function(un){pn(un),bn&&bn(un)},onCompositionEnd:function(un){an(un),St&&St(un)},onPaste:Bt})),en},li=h.forwardRef(Si);li.displayName="Input";var Mi=li;function _r(d){return Array.isArray(d)?d:d!==void 0?[d]:[]}var Ci=typeof window!="undefined"&&window.document&&window.document.documentElement,si=Ci;function Pi(d){return d!=null}function I(d){return!d&&d!==0}function Y(d){return["string","number"].includes((0,V.Z)(d))}function _(d){var v=void 0;return d&&(Y(d.title)?v=d.title.toString():Y(d.label)&&(v=d.label.toString())),v}function X(d,v){si?h.useLayoutEffect(d,v):h.useEffect(d,v)}function We(d){var v;return(v=d.key)!==null&&v!==void 0?v:d.value}var we=function(v){v.preventDefault(),v.stopPropagation()},Ie=function(v){var D=v.id,M=v.prefixCls,G=v.values,J=v.open,ve=v.searchValue,Me=v.autoClearSearchValue,Ae=v.inputRef,ie=v.placeholder,ae=v.disabled,le=v.mode,je=v.showSearch,se=v.autoFocus,st=v.autoComplete,$t=v.activeDescendantId,Wt=v.tabIndex,zt=v.removeIcon,Ft=v.maxTagCount,Bt=v.maxTagTextLength,pn=v.maxTagPlaceholder,an=pn===void 0?function(jt){return"+ ".concat(jt.length," ...")}:pn,Lt=v.tagRender,qt=v.onToggleOpen,en=v.onRemove,gn=v.onInputChange,tn=v.onInputPaste,fn=v.onInputKeyDown,Fn=v.onInputMouseDown,mn=v.onInputCompositionStart,yn=v.onInputCompositionEnd,bn=h.useRef(null),St=(0,h.useState)(0),Tt=(0,m.Z)(St,2),Kt=Tt[0],un=Tt[1],zr=(0,h.useState)(!1),Er=(0,m.Z)(zr,2),lr=Er[0],wr=Er[1],ln="".concat(M,"-selection"),Qn=J||le==="multiple"&&Me===!1||le==="tags"?ve:"",Qr=le==="tags"||le==="multiple"&&Me===!1||je&&(J||lr);X(function(){un(bn.current.scrollWidth)},[Qn]);function Zt(jt,Nn,nr,Jn,cr){return h.createElement("span",{className:x()("".concat(ln,"-item"),(0,b.Z)({},"".concat(ln,"-item-disabled"),nr)),title:_(jt)},h.createElement("span",{className:"".concat(ln,"-item-content")},Nn),Jn&&h.createElement(at,{className:"".concat(ln,"-item-remove"),onMouseDown:we,onClick:cr,customizeIcon:zt},"\xD7"))}function ft(jt,Nn,nr,Jn,cr){var qn=function(Dn){we(Dn),qt(!J)};return h.createElement("span",{onMouseDown:qn},Lt({label:Nn,value:jt,disabled:nr,closable:Jn,onClose:cr}))}function Gt(jt){var Nn=jt.disabled,nr=jt.label,Jn=jt.value,cr=!ae&&!Nn,qn=nr;if(typeof Bt=="number"&&(typeof nr=="string"||typeof nr=="number")){var sr=String(qn);sr.length>Bt&&(qn="".concat(sr.slice(0,Bt),"..."))}var Dn=function(Zr){Zr&&Zr.stopPropagation(),en(jt)};return typeof Lt=="function"?ft(Jn,qn,Nn,cr,Dn):Zt(jt,qn,Nn,cr,Dn)}function Ln(jt){var Nn=typeof an=="function"?an(jt):an;return Zt({title:Nn},Nn,!1)}var Cn=h.createElement("div",{className:"".concat(ln,"-search"),style:{width:Kt},onFocus:function(){wr(!0)},onBlur:function(){wr(!1)}},h.createElement(Mi,{ref:Ae,open:J,prefixCls:M,id:D,inputElement:null,disabled:ae,autoFocus:se,autoComplete:st,editable:Qr,activeDescendantId:$t,value:Qn,onKeyDown:fn,onMouseDown:Fn,onChange:gn,onPaste:tn,onCompositionStart:mn,onCompositionEnd:yn,tabIndex:Wt,attrs:me(v,!0)}),h.createElement("span",{ref:bn,className:"".concat(ln,"-search-mirror"),"aria-hidden":!0},Qn,"\xA0")),dn=h.createElement(kr,{prefixCls:"".concat(ln,"-overflow"),data:G,renderItem:Gt,renderRest:Ln,suffix:Cn,itemKey:We,maxCount:Ft});return h.createElement(h.Fragment,null,dn,!G.length&&!Qn&&h.createElement("span",{className:"".concat(ln,"-placeholder")},ie))},ct=Ie,Dt=function(v){var D=v.inputElement,M=v.prefixCls,G=v.id,J=v.inputRef,ve=v.disabled,Me=v.autoFocus,Ae=v.autoComplete,ie=v.activeDescendantId,ae=v.mode,le=v.open,je=v.values,se=v.placeholder,st=v.tabIndex,$t=v.showSearch,Wt=v.searchValue,zt=v.activeValue,Ft=v.maxLength,Bt=v.onInputKeyDown,pn=v.onInputMouseDown,an=v.onInputChange,Lt=v.onInputPaste,qt=v.onInputCompositionStart,en=v.onInputCompositionEnd,gn=v.title,tn=h.useState(!1),fn=(0,m.Z)(tn,2),Fn=fn[0],mn=fn[1],yn=ae==="combobox",bn=yn||$t,St=je[0],Tt=Wt||"";yn&&zt&&!Fn&&(Tt=zt),h.useEffect(function(){yn&&mn(!1)},[yn,zt]);var Kt=ae!=="combobox"&&!le&&!$t?!1:!!Tt,un=gn===void 0?_(St):gn,zr=function(){if(St)return null;var lr=Kt?{visibility:"hidden"}:void 0;return h.createElement("span",{className:"".concat(M,"-selection-placeholder"),style:lr},se)};return h.createElement(h.Fragment,null,h.createElement("span",{className:"".concat(M,"-selection-search")},h.createElement(Mi,{ref:J,prefixCls:M,id:G,open:le,inputElement:D,disabled:ve,autoFocus:Me,autoComplete:Ae,editable:bn,activeDescendantId:ie,value:Tt,onKeyDown:Bt,onMouseDown:pn,onChange:function(lr){mn(!0),an(lr)},onPaste:Lt,onCompositionStart:qt,onCompositionEnd:en,tabIndex:st,attrs:me(v,!0),maxLength:yn?Ft:void 0})),!yn&&St?h.createElement("span",{className:"".concat(M,"-selection-item"),title:un,style:Kt?{visibility:"hidden"}:void 0},St.label):null,zr())},Ut=Dt;function pt(d){return![te.ESC,te.SHIFT,te.BACKSPACE,te.TAB,te.WIN_KEY,te.ALT,te.META,te.WIN_KEY_RIGHT,te.CTRL,te.SEMICOLON,te.EQUALS,te.CAPS_LOCK,te.CONTEXT_MENU,te.F1,te.F2,te.F3,te.F4,te.F5,te.F6,te.F7,te.F8,te.F9,te.F10,te.F11,te.F12].includes(d)}var Qe=function(v,D){var M=(0,h.useRef)(null),G=(0,h.useRef)(!1),J=v.prefixCls,ve=v.open,Me=v.mode,Ae=v.showSearch,ie=v.tokenWithEnter,ae=v.autoClearSearchValue,le=v.onSearch,je=v.onSearchSubmit,se=v.onToggleOpen,st=v.onInputKeyDown,$t=v.domRef;h.useImperativeHandle(D,function(){return{focus:function(){M.current.focus()},blur:function(){M.current.blur()}}});var Wt=Ve(0),zt=(0,m.Z)(Wt,2),Ft=zt[0],Bt=zt[1],pn=function(Tt){var Kt=Tt.which;(Kt===te.UP||Kt===te.DOWN)&&Tt.preventDefault(),st&&st(Tt),Kt===te.ENTER&&Me==="tags"&&!G.current&&!ve&&(je==null||je(Tt.target.value)),pt(Kt)&&se(!0)},an=function(){Bt(!0)},Lt=(0,h.useRef)(null),qt=function(Tt){le(Tt,!0,G.current)!==!1&&se(!0)},en=function(){G.current=!0},gn=function(Tt){G.current=!1,Me!=="combobox"&&qt(Tt.target.value)},tn=function(Tt){var Kt=Tt.target.value;if(ie&&Lt.current&&/[\r\n]/.test(Lt.current)){var un=Lt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Kt=Kt.replace(un,Lt.current)}Lt.current=null,qt(Kt)},fn=function(Tt){var Kt=Tt.clipboardData,un=Kt.getData("text");Lt.current=un},Fn=function(Tt){var Kt=Tt.target;if(Kt!==M.current){var un=document.body.style.msTouchAction!==void 0;un?setTimeout(function(){M.current.focus()}):M.current.focus()}},mn=function(Tt){var Kt=Ft();Tt.target!==M.current&&!Kt&&Me!=="combobox"&&Tt.preventDefault(),(Me!=="combobox"&&(!Ae||!Kt)||!ve)&&(ve&&ae!==!1&&le("",!0,!1),se())},yn={inputRef:M,onInputKeyDown:pn,onInputMouseDown:an,onInputChange:tn,onInputPaste:fn,onInputCompositionStart:en,onInputCompositionEnd:gn},bn=Me==="multiple"||Me==="tags"?h.createElement(ct,(0,E.Z)({},v,yn)):h.createElement(Ut,(0,E.Z)({},v,yn));return h.createElement("div",{ref:$t,className:"".concat(J,"-selector"),onClick:Fn,onMouseDown:mn},bn)},y=h.forwardRef(Qe);y.displayName="Selector";var F=y,$=f(62709),A=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Z=function(v){var D=v===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:D,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:D,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:D,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:D,adjustY:1},htmlRegion:"scroll"}}},B=function(v,D){var M=v.prefixCls,G=v.disabled,J=v.visible,ve=v.children,Me=v.popupElement,Ae=v.animation,ie=v.transitionName,ae=v.dropdownStyle,le=v.dropdownClassName,je=v.direction,se=je===void 0?"ltr":je,st=v.placement,$t=v.builtinPlacements,Wt=v.dropdownMatchSelectWidth,zt=v.dropdownRender,Ft=v.dropdownAlign,Bt=v.getPopupContainer,pn=v.empty,an=v.getTriggerDOMNode,Lt=v.onPopupVisibleChange,qt=v.onPopupMouseEnter,en=(0,ce.Z)(v,A),gn="".concat(M,"-dropdown"),tn=Me;zt&&(tn=zt(Me));var fn=h.useMemo(function(){return $t||Z(Wt)},[$t,Wt]),Fn=Ae?"".concat(gn,"-").concat(Ae):ie,mn=typeof Wt=="number",yn=h.useMemo(function(){return mn?null:Wt===!1?"minWidth":"width"},[Wt,mn]),bn=ae;mn&&(bn=(0,O.Z)((0,O.Z)({},bn),{},{width:Wt}));var St=h.useRef(null);return h.useImperativeHandle(D,function(){return{getPopupElement:function(){return St.current}}}),h.createElement($.Z,(0,E.Z)({},en,{showAction:Lt?["click"]:[],hideAction:Lt?["click"]:[],popupPlacement:st||(se==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:fn,prefixCls:gn,popupTransitionName:Fn,popup:h.createElement("div",{ref:St,onMouseEnter:qt},tn),stretch:yn,popupAlign:Ft,popupVisible:J,getPopupContainer:Bt,popupClassName:x()(le,(0,b.Z)({},"".concat(gn,"-empty"),pn)),popupStyle:bn,getTriggerDOMNode:an,onPopupVisibleChange:Lt}),ve)},$e=h.forwardRef(B);$e.displayName="SelectTrigger";var Ct=$e,et=f(84506);function Ce(d,v){var D=d.key,M;return"value"in d&&(M=d.value),D!=null?D:M!==void 0?M:"rc-index-key-".concat(v)}function Te(d,v){var D=d||{},M=D.label,G=D.value,J=D.options,ve=D.groupLabel,Me=M||(v?"children":"label");return{label:Me,value:G||"value",options:J||"options",groupLabel:ve||Me}}function Pe(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=v.fieldNames,M=v.childrenAsData,G=[],J=Te(D,!1),ve=J.label,Me=J.value,Ae=J.options,ie=J.groupLabel;function ae(le,je){le.forEach(function(se){if(je||!(Ae in se)){var st=se[Me];G.push({key:Ce(se,G.length),groupOption:je,data:se,label:se[ve],value:st})}else{var $t=se[ie];$t===void 0&&M&&($t=se.label),G.push({key:Ce(se,G.length),group:!0,data:se,label:$t}),ae(se[Ae],!0)}})}return ae(d,!1),G}function Vt(d){var v=(0,O.Z)({},d);return"props"in v||Object.defineProperty(v,"props",{get:function(){return Q(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),v}}),v}function U(d,v){if(!v||!v.length)return null;var D=!1;function M(J,ve){var Me=(0,et.Z)(ve),Ae=Me[0],ie=Me.slice(1);if(!Ae)return[J];var ae=J.split(Ae);return D=D||ae.length>1,ae.reduce(function(le,je){return[].concat((0,z.Z)(le),(0,z.Z)(M(je,ie)))},[]).filter(function(le){return le})}var G=M(d,v);return D?G:null}var ze=["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"],rn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function xn(d){return d==="tags"||d==="multiple"}var Pt=h.forwardRef(function(d,v){var D,M,G=d.id,J=d.prefixCls,ve=d.className,Me=d.showSearch,Ae=d.tagRender,ie=d.direction,ae=d.omitDomProps,le=d.displayValues,je=d.onDisplayValuesChange,se=d.emptyOptions,st=d.notFoundContent,$t=st===void 0?"Not Found":st,Wt=d.onClear,zt=d.mode,Ft=d.disabled,Bt=d.loading,pn=d.getInputElement,an=d.getRawInputElement,Lt=d.open,qt=d.defaultOpen,en=d.onDropdownVisibleChange,gn=d.activeValue,tn=d.onActiveValueChange,fn=d.activeDescendantId,Fn=d.searchValue,mn=d.autoClearSearchValue,yn=d.onSearch,bn=d.onSearchSplit,St=d.tokenSeparators,Tt=d.allowClear,Kt=d.suffixIcon,un=d.clearIcon,zr=d.OptionList,Er=d.animation,lr=d.transitionName,wr=d.dropdownStyle,ln=d.dropdownClassName,Qn=d.dropdownMatchSelectWidth,Qr=d.dropdownRender,Zt=d.dropdownAlign,ft=d.placement,Gt=d.builtinPlacements,Ln=d.getPopupContainer,Cn=d.showAction,dn=Cn===void 0?[]:Cn,jt=d.onFocus,Nn=d.onBlur,nr=d.onKeyUp,Jn=d.onKeyDown,cr=d.onMouseDown,qn=(0,ce.Z)(d,ze),sr=xn(zt),Dn=(Me!==void 0?Me:sr)||zt==="combobox",jn=(0,O.Z)({},qn);rn.forEach(function(hn){delete jn[hn]}),ae==null||ae.forEach(function(hn){delete jn[hn]});var Zr=h.useState(!1),Jr=(0,m.Z)(Zr,2),qr=Jr[0],vr=Jr[1];h.useEffect(function(){vr(N())},[]);var $n=h.useRef(null),Or=h.useRef(null),di=h.useRef(null),Tr=h.useRef(null),rr=h.useRef(null),pr=At(),ei=(0,m.Z)(pr,3),hi=ei[0],Wi=ei[1],Bi=ei[2];h.useImperativeHandle(v,function(){var hn,Xt;return{focus:(hn=Tr.current)===null||hn===void 0?void 0:hn.focus,blur:(Xt=Tr.current)===null||Xt===void 0?void 0:Xt.blur,scrollTo:function(oi){var wn;return(wn=rr.current)===null||wn===void 0?void 0:wn.scrollTo(oi)}}});var ti=h.useMemo(function(){var hn;if(zt!=="combobox")return Fn;var Xt=(hn=le[0])===null||hn===void 0?void 0:hn.value;return typeof Xt=="string"||typeof Xt=="number"?String(Xt):""},[Fn,zt,le]),vi=zt==="combobox"&&typeof pn=="function"&&pn()||null,gr=typeof an=="function"&&an(),mr=_e(Or,gr==null||(D=gr.props)===null||D===void 0?void 0:D.ref),ni=h.useState(!1),Dr=(0,m.Z)(ni,2),Fi=Dr[0],Yi=Dr[1];be(function(){Yi(!0)},[]);var to=Je(!1,{defaultValue:qt,value:Lt}),Ei=(0,m.Z)(to,2),Zi=Ei[0],kt=Ei[1],pe=Fi?Zi:!1,nt=!$t&&se;(Ft||nt&&pe&&zt==="combobox")&&(pe=!1);var ot=nt?!1:pe,Et=h.useCallback(function(hn){var Xt=hn!==void 0?hn:!pe;Ft||(kt(Xt),pe!==Xt&&(en==null||en(Xt)))},[Ft,pe,kt,en]),Un=h.useMemo(function(){return(St||[]).some(function(hn){return[`
`,`\r
`].includes(hn)})},[St]),Kn=function(Xt,Hr,oi){var wn=!0,Tn=Xt;tn==null||tn(null);var kn=oi?null:U(Xt,St);return zt!=="combobox"&&kn&&(Tn="",bn==null||bn(kn),Et(!1),wn=!1),yn&&ti!==Tn&&yn(Tn,{source:Hr?"typing":"effect"}),wn},ri=function(Xt){!Xt||!Xt.trim()||yn(Xt,{source:"submit"})};h.useEffect(function(){!pe&&!sr&&zt!=="combobox"&&Kn("",!1,!1)},[pe]),h.useEffect(function(){Zi&&Ft&&kt(!1),Ft&&Wi(!1)},[Ft]);var pi=Ve(),Ui=(0,m.Z)(pi,2),yr=Ui[0],Qi=Ui[1],Do=function(Xt){var Hr=yr(),oi=Xt.which;if(oi===te.ENTER&&(zt!=="combobox"&&Xt.preventDefault(),pe||Et(!0)),Qi(!!ti),oi===te.BACKSPACE&&!Hr&&sr&&!ti&&le.length){for(var wn=(0,z.Z)(le),Tn=null,kn=wn.length-1;kn>=0;kn-=1){var ir=wn[kn];if(!ir.disabled){wn.splice(kn,1),Tn=ir;break}}Tn&&je(wn,{type:"remove",values:[Tn]})}for(var wi=arguments.length,vo=new Array(wi>1?wi-1:0),Li=1;Li<wi;Li++)vo[Li-1]=arguments[Li];if(pe&&rr.current){var ga;(ga=rr.current).onKeyDown.apply(ga,[Xt].concat(vo))}Jn==null||Jn.apply(void 0,[Xt].concat(vo))},Vo=function(Xt){for(var Hr=arguments.length,oi=new Array(Hr>1?Hr-1:0),wn=1;wn<Hr;wn++)oi[wn-1]=arguments[wn];if(pe&&rr.current){var Tn;(Tn=rr.current).onKeyUp.apply(Tn,[Xt].concat(oi))}nr==null||nr.apply(void 0,[Xt].concat(oi))},Po=function(Xt){var Hr=le.filter(function(oi){return oi!==Xt});je(Hr,{type:"remove",values:[Xt]})},Ki=h.useRef(!1),ii=function(){Wi(!0),Ft||(jt&&!Ki.current&&jt.apply(void 0,arguments),dn.includes("focus")&&Et(!0)),Ki.current=!0},wo=function(){Wi(!1,function(){Ki.current=!1,Et(!1)}),!Ft&&(ti&&(zt==="tags"?yn(ti,{source:"submit"}):zt==="multiple"&&yn("",{source:"blur"})),Nn&&Nn.apply(void 0,arguments))},co=[];h.useEffect(function(){return function(){co.forEach(function(hn){return clearTimeout(hn)}),co.splice(0,co.length)}},[]);var Ao=function(Xt){var Hr,oi=Xt.target,wn=(Hr=di.current)===null||Hr===void 0?void 0:Hr.getPopupElement();if(wn&&wn.contains(oi)){var Tn=setTimeout(function(){var vo=co.indexOf(Tn);if(vo!==-1&&co.splice(vo,1),Bi(),!qr&&!wn.contains(document.activeElement)){var Li;(Li=Tr.current)===null||Li===void 0||Li.focus()}});co.push(Tn)}for(var kn=arguments.length,ir=new Array(kn>1?kn-1:0),wi=1;wi<kn;wi++)ir[wi-1]=arguments[wi];cr==null||cr.apply(void 0,[Xt].concat(ir))},fa=h.useState({}),Oo=(0,m.Z)(fa,2),da=Oo[1];function no(){da({})}var fo;gr&&(fo=function(Xt){Et(Xt)}),rt(function(){var hn;return[$n.current,(hn=di.current)===null||hn===void 0?void 0:hn.getPopupElement()]},ot,Et,!!gr);var ro=h.useMemo(function(){return(0,O.Z)((0,O.Z)({},d),{},{notFoundContent:$t,open:pe,triggerOpen:ot,id:G,showSearch:Dn,multiple:sr,toggleOpen:Et})},[d,$t,ot,pe,G,Dn,sr,Et]),ho=!!Kt||Bt,io;ho&&(io=h.createElement(at,{className:x()("".concat(J,"-arrow"),(0,b.Z)({},"".concat(J,"-arrow-loading"),Bt)),customizeIcon:Kt,customizeIconProps:{loading:Bt,searchValue:ti,open:pe,focused:hi,showSearch:Dn}}));var ha=function(){var Xt;Wt==null||Wt(),(Xt=Tr.current)===null||Xt===void 0||Xt.focus(),je([],{type:"clear",values:le}),Kn("",!1,!1)},Go=Ue(J,ha,le,Tt,un,Ft,ti,zt),va=Go.allowClear,Ta=Go.clearIcon,oo=h.createElement(zr,{ref:rr}),ao=x()(J,ve,(M={},(0,b.Z)(M,"".concat(J,"-focused"),hi),(0,b.Z)(M,"".concat(J,"-multiple"),sr),(0,b.Z)(M,"".concat(J,"-single"),!sr),(0,b.Z)(M,"".concat(J,"-allow-clear"),Tt),(0,b.Z)(M,"".concat(J,"-show-arrow"),ho),(0,b.Z)(M,"".concat(J,"-disabled"),Ft),(0,b.Z)(M,"".concat(J,"-loading"),Bt),(0,b.Z)(M,"".concat(J,"-open"),pe),(0,b.Z)(M,"".concat(J,"-customize-input"),vi),(0,b.Z)(M,"".concat(J,"-show-search"),Dn),M)),pa=h.createElement(Ct,{ref:di,disabled:Ft,prefixCls:J,visible:ot,popupElement:oo,animation:Er,transitionName:lr,dropdownStyle:wr,dropdownClassName:ln,direction:ie,dropdownMatchSelectWidth:Qn,dropdownRender:Qr,dropdownAlign:Zt,placement:ft,builtinPlacements:Gt,getPopupContainer:Ln,empty:se,getTriggerDOMNode:function(){return Or.current},onPopupVisibleChange:fo,onPopupMouseEnter:no},gr?h.cloneElement(gr,{ref:mr}):h.createElement(F,(0,E.Z)({},d,{domRef:Or,prefixCls:J,inputElement:vi,ref:Tr,id:G,showSearch:Dn,autoClearSearchValue:mn,mode:zt,activeDescendantId:fn,tagRender:Ae,values:le,open:pe,onToggleOpen:Et,activeValue:gn,searchValue:ti,onSearch:Kn,onSearchSubmit:ri,onRemove:Po,tokenWithEnter:Un}))),Xo;return gr?Xo=pa:Xo=h.createElement("div",(0,E.Z)({className:ao},jn,{ref:$n,onMouseDown:Ao,onKeyDown:Do,onKeyUp:Vo,onFocus:ii,onBlur:wo}),hi&&!pe&&h.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(le.map(function(hn){var Xt=hn.label,Hr=hn.value;return["number","string"].includes((0,V.Z)(Xt))?Xt:Hr}).join(", "))),pa,io,va&&Ta),h.createElement(Ke.Provider,{value:ro},Xo)}),xt=Pt,On=function(d,v){var D=h.useRef({values:new Map,options:new Map}),M=h.useMemo(function(){var J=D.current,ve=J.values,Me=J.options,Ae=d.map(function(le){if(le.label===void 0){var je;return(0,O.Z)((0,O.Z)({},le),{},{label:(je=ve.get(le.value))===null||je===void 0?void 0:je.label})}return le}),ie=new Map,ae=new Map;return Ae.forEach(function(le){ie.set(le.value,le),ae.set(le.value,v.get(le.value)||Me.get(le.value))}),D.current.values=ie,D.current.options=ae,Ae},[d,v]),G=h.useCallback(function(J){return v.get(J)||D.current.options.get(J)},[v]);return[M,G]};function Ne(d,v){return _r(d).join("").toUpperCase().includes(v)}var cn=function(d,v,D,M,G){return h.useMemo(function(){if(!D||M===!1)return d;var J=v.options,ve=v.label,Me=v.value,Ae=[],ie=typeof M=="function",ae=D.toUpperCase(),le=ie?M:function(se,st){return G?Ne(st[G],ae):st[J]?Ne(st[ve!=="children"?ve:"label"],ae):Ne(st[Me],ae)},je=ie?function(se){return Vt(se)}:function(se){return se};return d.forEach(function(se){if(se[J]){var st=le(D,je(se));if(st)Ae.push(se);else{var $t=se[J].filter(function(Wt){return le(D,je(Wt))});$t.length&&Ae.push((0,O.Z)((0,O.Z)({},se),{},(0,b.Z)({},J,$t)))}return}le(D,je(se))&&Ae.push(se)}),Ae},[d,M,G,D,v])},on=0,Rn=ue();function Sn(){var d;return Rn?(d=on,on+=1):d="TEST_OR_SSR",d}function Sr(d){var v=h.useState(),D=(0,m.Z)(v,2),M=D[0],G=D[1];return h.useEffect(function(){G("rc_select_".concat(Sn()))},[]),d||M}function Vn(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=[];return h.Children.forEach(d,function(M){M==null&&!v.keepEmpty||(Array.isArray(M)?D=D.concat(Vn(M)):(0,ke.isFragment)(M)&&M.props?D=D.concat(Vn(M.props.children,v)):D.push(M))}),D}var Wn=["children","value"],Rr=["children"];function Fr(d){var v=d,D=v.key,M=v.props,G=M.children,J=M.value,ve=(0,ce.Z)(M,Wn);return(0,O.Z)({key:D,value:J!==void 0?J:D,children:G},ve)}function An(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Vn(d).map(function(D,M){if(!h.isValidElement(D)||!D.type)return null;var G=D,J=G.type.isSelectOptGroup,ve=G.key,Me=G.props,Ae=Me.children,ie=(0,ce.Z)(Me,Rr);return v||!J?Fr(D):(0,O.Z)((0,O.Z)({key:"__RC_SELECT_GRP__".concat(ve===null?M:ve,"__"),label:ve},ie),{},{options:An(Ae)})}).filter(function(D){return D})}function Cr(d,v,D,M,G){return h.useMemo(function(){var J=d,ve=!d;ve&&(J=An(v));var Me=new Map,Ae=new Map,ie=function(je,se,st){st&&typeof st=="string"&&je.set(se[st],se)};function ae(le){for(var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,se=0;se<le.length;se+=1){var st=le[se];!st[D.options]||je?(Me.set(st[D.value],st),ie(Ae,st,D.label),ie(Ae,st,M),ie(Ae,st,G)):ae(st[D.options],!0)}}return ae(J),{options:J,valueOptions:Me,labelOptions:Ae}},[d,v,D,M,G])}function dr(d){var v=h.useRef();v.current=d;var D=h.useCallback(function(){return v.current.apply(v,arguments)},[]);return D}var xr=function(){return null};xr.isSelectOptGroup=!0;var Mn=xr,ar=function(){return null};ar.isSelectOption=!0;var Gn=ar;function Xn(d,v){var D=(0,O.Z)({},d);return Array.isArray(v)&&v.forEach(function(M){delete D[M]}),D}var tr=f(73299),hr=h.createContext(null),En=hr;function Zn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Yn=["disabled","title","children","style","className"];function Lr(d){return typeof d=="string"||typeof d=="number"}var ui=function(v,D){var M=It(),G=M.prefixCls,J=M.id,ve=M.open,Me=M.multiple,Ae=M.mode,ie=M.searchValue,ae=M.toggleOpen,le=M.notFoundContent,je=M.onPopupScroll,se=h.useContext(En),st=se.flattenOptions,$t=se.onActiveValue,Wt=se.defaultActiveFirstOption,zt=se.onSelect,Ft=se.menuItemSelectedIcon,Bt=se.rawValues,pn=se.fieldNames,an=se.virtual,Lt=se.direction,qt=se.listHeight,en=se.listItemHeight,gn="".concat(G,"-item"),tn=ge(function(){return st},[ve,st],function(Zt,ft){return ft[0]&&Zt[1]!==ft[1]}),fn=h.useRef(null),Fn=function(ft){ft.preventDefault()},mn=function(ft){fn.current&&fn.current.scrollTo(typeof ft=="number"?{index:ft}:ft)},yn=function(ft){for(var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ln=tn.length,Cn=0;Cn<Ln;Cn+=1){var dn=(ft+Cn*Gt+Ln)%Ln,jt=tn[dn],Nn=jt.group,nr=jt.data;if(!Nn&&!nr.disabled)return dn}return-1},bn=h.useState(function(){return yn(0)}),St=(0,m.Z)(bn,2),Tt=St[0],Kt=St[1],un=function(ft){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Kt(ft);var Ln={source:Gt?"keyboard":"mouse"},Cn=tn[ft];if(!Cn){$t(null,-1,Ln);return}$t(Cn.value,ft,Ln)};(0,h.useEffect)(function(){un(Wt!==!1?yn(0):-1)},[tn.length,ie]);var zr=h.useCallback(function(Zt){return Bt.has(Zt)&&Ae!=="combobox"},[Ae,(0,z.Z)(Bt).toString(),Bt.size]);(0,h.useEffect)(function(){var Zt=setTimeout(function(){if(!Me&&ve&&Bt.size===1){var Gt=Array.from(Bt)[0],Ln=tn.findIndex(function(Cn){var dn=Cn.data;return dn.value===Gt});Ln!==-1&&(un(Ln),mn(Ln))}});if(ve){var ft;(ft=fn.current)===null||ft===void 0||ft.scrollTo(void 0)}return function(){return clearTimeout(Zt)}},[ve,ie,st.length]);var Er=function(ft){ft!==void 0&&zt(ft,{selected:!Bt.has(ft)}),Me||ae(!1)};if(h.useImperativeHandle(D,function(){return{onKeyDown:function(ft){var Gt=ft.which,Ln=ft.ctrlKey;switch(Gt){case te.N:case te.P:case te.UP:case te.DOWN:{var Cn=0;if(Gt===te.UP?Cn=-1:Gt===te.DOWN?Cn=1:Zn()&&Ln&&(Gt===te.N?Cn=1:Gt===te.P&&(Cn=-1)),Cn!==0){var dn=yn(Tt+Cn,Cn);mn(dn),un(dn,!0)}break}case te.ENTER:{var jt=tn[Tt];jt&&!jt.data.disabled?Er(jt.value):Er(void 0),ve&&ft.preventDefault();break}case te.ESC:ae(!1),ve&&ft.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ft){mn(ft)}}}),tn.length===0)return h.createElement("div",{role:"listbox",id:"".concat(J,"_list"),className:"".concat(gn,"-empty"),onMouseDown:Fn},le);var lr=Object.keys(pn).map(function(Zt){return pn[Zt]}),wr=function(ft){return ft.label};function ln(Zt,ft){var Gt=Zt.group;return{role:Gt?"presentation":"option",id:"".concat(J,"_list_").concat(ft)}}var Qn=function(ft){var Gt=tn[ft];if(!Gt)return null;var Ln=Gt.data||{},Cn=Ln.value,dn=Gt.group,jt=me(Ln,!0),Nn=wr(Gt);return Gt?h.createElement("div",(0,E.Z)({"aria-label":typeof Nn=="string"&&!dn?Nn:null},jt,{key:ft},ln(Gt,ft),{"aria-selected":zr(Cn)}),Cn):null},Qr={role:"listbox",id:"".concat(J,"_list")};return h.createElement(h.Fragment,null,an&&h.createElement("div",(0,E.Z)({},Qr,{style:{height:0,width:0,overflow:"hidden"}}),Qn(Tt-1),Qn(Tt),Qn(Tt+1)),h.createElement(tr.Z,{itemKey:"key",ref:fn,data:tn,height:qt,itemHeight:en,fullHeight:!1,onMouseDown:Fn,onScroll:je,virtual:an,direction:Lt,innerProps:an?null:Qr},function(Zt,ft){var Gt,Ln=Zt.group,Cn=Zt.groupOption,dn=Zt.data,jt=Zt.label,Nn=Zt.value,nr=dn.key;if(Ln){var Jn,cr=(Jn=dn.title)!==null&&Jn!==void 0?Jn:Lr(jt)?jt.toString():void 0;return h.createElement("div",{className:x()(gn,"".concat(gn,"-group")),title:cr},jt!==void 0?jt:nr)}var qn=dn.disabled,sr=dn.title,Dn=dn.children,jn=dn.style,Zr=dn.className,Jr=(0,ce.Z)(dn,Yn),qr=Xn(Jr,lr),vr=zr(Nn),$n="".concat(gn,"-option"),Or=x()(gn,$n,Zr,(Gt={},(0,b.Z)(Gt,"".concat($n,"-grouped"),Cn),(0,b.Z)(Gt,"".concat($n,"-active"),Tt===ft&&!qn),(0,b.Z)(Gt,"".concat($n,"-disabled"),qn),(0,b.Z)(Gt,"".concat($n,"-selected"),vr),Gt)),di=wr(Zt),Tr=!Ft||typeof Ft=="function"||vr,rr=typeof di=="number"?di:di||Nn,pr=Lr(rr)?rr.toString():void 0;return sr!==void 0&&(pr=sr),h.createElement("div",(0,E.Z)({},me(qr),an?{}:ln(Zt,ft),{"aria-selected":vr,className:Or,title:pr,onMouseMove:function(){Tt===ft||qn||un(ft)},onClick:function(){qn||Er(Nn)},style:jn}),h.createElement("div",{className:"".concat($n,"-content")},rr),h.isValidElement(Ft)||vr,Tr&&h.createElement(at,{className:"".concat(gn,"-option-state"),customizeIcon:Ft,customizeIconProps:{isSelected:vr}},vr?"\u2713":null))}))},Vr=h.forwardRef(ui);Vr.displayName="OptionList";var Gr=Vr;function ci(d){var v=d.mode,D=d.options,M=d.children,G=d.backfill,J=d.allowClear,ve=d.placeholder,Me=d.getInputElement,Ae=d.showSearch,ie=d.onSearch,ae=d.defaultOpen,le=d.autoFocus,je=d.labelInValue,se=d.value,st=d.inputValue,$t=d.optionLabelProp,Wt=isMultiple(v),zt=Ae!==void 0?Ae:Wt||v==="combobox",Ft=D||convertChildrenToData(M);if(warning(v!=="tags"||Ft.every(function(Lt){return!Lt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),v==="tags"||v==="combobox"){var Bt=Ft.some(function(Lt){return Lt.options?Lt.options.some(function(qt){return typeof("value"in qt?qt.value:qt.key)=="number"}):typeof("value"in Lt?Lt.value:Lt.key)=="number"});warning(!Bt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(v!=="combobox"||!$t,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(v==="combobox"||!G,"`backfill` only works with `combobox` mode."),warning(v==="combobox"||!Me,"`getInputElement` only work with `combobox` mode."),noteOnce(v!=="combobox"||!Me||!J||!ve,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ie&&!zt&&v!=="combobox"&&v!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!ae||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),se!=null){var pn=toArray(se);warning(!je||pn.every(function(Lt){return _typeof(Lt)==="object"&&("key"in Lt||"value"in Lt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Wt||Array.isArray(se),"`value` should be array when `mode` is `multiple` or `tags`")}if(M){var an=null;toNodeArray(M).some(function(Lt){if(!React.isValidElement(Lt)||!Lt.type)return!1;var qt=Lt,en=qt.type;if(en.isSelectOption)return!1;if(en.isSelectOptGroup){var gn=toNodeArray(Lt.props.children).every(function(tn){return!React.isValidElement(tn)||!Lt.type||tn.type.isSelectOption?!0:(an=tn.type,!1)});return!gn}return an=en,!0}),an&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(an.displayName||an.name||an,"`.")),warning(st===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Bn(d,v){if(d){var D=function M(G){for(var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=0;ve<G.length;ve++){var Me=G[ve];if(Me[v==null?void 0:v.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!J&&Array.isArray(Me[v==null?void 0:v.options])&&M(Me[v==null?void 0:v.options],!0))break}};D(d)}}var Xr=null,$r=["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"],Br=["inputValue"];function Ai(d){return!d||(0,V.Z)(d)!=="object"}var zi=h.forwardRef(function(d,v){var D=d.id,M=d.mode,G=d.prefixCls,J=G===void 0?"rc-select":G,ve=d.backfill,Me=d.fieldNames,Ae=d.inputValue,ie=d.searchValue,ae=d.onSearch,le=d.autoClearSearchValue,je=le===void 0?!0:le,se=d.onSelect,st=d.onDeselect,$t=d.dropdownMatchSelectWidth,Wt=$t===void 0?!0:$t,zt=d.filterOption,Ft=d.filterSort,Bt=d.optionFilterProp,pn=d.optionLabelProp,an=d.options,Lt=d.children,qt=d.defaultActiveFirstOption,en=d.menuItemSelectedIcon,gn=d.virtual,tn=d.direction,fn=d.listHeight,Fn=fn===void 0?200:fn,mn=d.listItemHeight,yn=mn===void 0?20:mn,bn=d.value,St=d.defaultValue,Tt=d.labelInValue,Kt=d.onChange,un=(0,ce.Z)(d,$r),zr=Sr(D),Er=xn(M),lr=!!(!an&&Lt),wr=h.useMemo(function(){return zt===void 0&&M==="combobox"?!1:zt},[zt,M]),ln=h.useMemo(function(){return Te(Me,lr)},[JSON.stringify(Me),lr]),Qn=Je("",{value:ie!==void 0?ie:Ae,postState:function(nt){return nt||""}}),Qr=(0,m.Z)(Qn,2),Zt=Qr[0],ft=Qr[1],Gt=Cr(an,Lt,ln,Bt,pn),Ln=Gt.valueOptions,Cn=Gt.labelOptions,dn=Gt.options,jt=h.useCallback(function(pe){var nt=_r(pe);return nt.map(function(ot){var Et,Un,Kn,ri,pi;if(Ai(ot))Et=ot;else{var Ui;Kn=ot.key,Un=ot.label,Et=(Ui=ot.value)!==null&&Ui!==void 0?Ui:Kn}var yr=Ln.get(Et);if(yr){var Qi;if(Un===void 0&&(Un=yr==null?void 0:yr[pn||ln.label]),Kn===void 0&&(Kn=(Qi=yr==null?void 0:yr.key)!==null&&Qi!==void 0?Qi:Et),ri=yr==null?void 0:yr.disabled,pi=yr==null?void 0:yr.title,0)var Do}return{label:Un,value:Et,key:Kn,disabled:ri,title:pi}})},[ln,pn,Ln]),Nn=Je(St,{value:bn}),nr=(0,m.Z)(Nn,2),Jn=nr[0],cr=nr[1],qn=h.useMemo(function(){var pe,nt=jt(Jn);return M==="combobox"&&I((pe=nt[0])===null||pe===void 0?void 0:pe.value)?[]:nt},[Jn,jt,M]),sr=On(qn,Ln),Dn=(0,m.Z)(sr,2),jn=Dn[0],Zr=Dn[1],Jr=h.useMemo(function(){if(!M&&jn.length===1){var pe=jn[0];if(pe.value===null&&(pe.label===null||pe.label===void 0))return[]}return jn.map(function(nt){var ot;return(0,O.Z)((0,O.Z)({},nt),{},{label:(ot=nt.label)!==null&&ot!==void 0?ot:nt.value})})},[M,jn]),qr=h.useMemo(function(){return new Set(jn.map(function(pe){return pe.value}))},[jn]);h.useEffect(function(){if(M==="combobox"){var pe,nt=(pe=jn[0])===null||pe===void 0?void 0:pe.value;ft(Pi(nt)?String(nt):"")}},[jn]);var vr=dr(function(pe,nt){var ot,Et=nt!=null?nt:pe;return ot={},(0,b.Z)(ot,ln.value,pe),(0,b.Z)(ot,ln.label,Et),ot}),$n=h.useMemo(function(){if(M!=="tags")return dn;var pe=(0,z.Z)(dn),nt=function(Et){return Ln.has(Et)};return(0,z.Z)(jn).sort(function(ot,Et){return ot.value<Et.value?-1:1}).forEach(function(ot){var Et=ot.value;nt(Et)||pe.push(vr(Et,ot.label))}),pe},[vr,dn,Ln,jn,M]),Or=cn($n,ln,Zt,wr,Bt),di=h.useMemo(function(){return M!=="tags"||!Zt||Or.some(function(pe){return pe[Bt||"value"]===Zt})||Or.some(function(pe){return pe[ln.value]===Zt})?Or:[vr(Zt)].concat((0,z.Z)(Or))},[vr,Bt,M,Or,Zt,ln]),Tr=h.useMemo(function(){return Ft?(0,z.Z)(di).sort(function(pe,nt){return Ft(pe,nt)}):di},[di,Ft]),rr=h.useMemo(function(){return Pe(Tr,{fieldNames:ln,childrenAsData:lr})},[Tr,ln,lr]),pr=function(nt){var ot=jt(nt);if(cr(ot),Kt&&(ot.length!==jn.length||ot.some(function(Kn,ri){var pi;return((pi=jn[ri])===null||pi===void 0?void 0:pi.value)!==(Kn==null?void 0:Kn.value)}))){var Et=Tt?ot:ot.map(function(Kn){return Kn.value}),Un=ot.map(function(Kn){return Vt(Zr(Kn.value))});Kt(Er?Et:Et[0],Er?Un:Un[0])}},ei=h.useState(null),hi=(0,m.Z)(ei,2),Wi=hi[0],Bi=hi[1],ti=h.useState(0),vi=(0,m.Z)(ti,2),gr=vi[0],mr=vi[1],ni=qt!==void 0?qt:M!=="combobox",Dr=h.useCallback(function(pe,nt){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Et=ot.source,Un=Et===void 0?"keyboard":Et;mr(nt),ve&&M==="combobox"&&pe!==null&&Un==="keyboard"&&Bi(String(pe))},[ve,M]),Fi=function(nt,ot,Et){var Un=function(){var Ki,ii=Zr(nt);return[Tt?{label:ii==null?void 0:ii[ln.label],value:nt,key:(Ki=ii==null?void 0:ii.key)!==null&&Ki!==void 0?Ki:nt}:nt,Vt(ii)]};if(ot&&se){var Kn=Un(),ri=(0,m.Z)(Kn,2),pi=ri[0],Ui=ri[1];se(pi,Ui)}else if(!ot&&st&&Et!=="clear"){var yr=Un(),Qi=(0,m.Z)(yr,2),Do=Qi[0],Vo=Qi[1];st(Do,Vo)}},Yi=dr(function(pe,nt){var ot,Et=Er?nt.selected:!0;Et?ot=Er?[].concat((0,z.Z)(jn),[pe]):[pe]:ot=jn.filter(function(Un){return Un.value!==pe}),pr(ot),Fi(pe,Et),M==="combobox"?Bi(""):(!xn||je)&&(ft(""),Bi(""))}),to=function(nt,ot){pr(nt);var Et=ot.type,Un=ot.values;(Et==="remove"||Et==="clear")&&Un.forEach(function(Kn){Fi(Kn.value,!1,Et)})},Ei=function(nt,ot){if(ft(nt),Bi(null),ot.source==="submit"){var Et=(nt||"").trim();if(Et){var Un=Array.from(new Set([].concat((0,z.Z)(qr),[Et])));pr(Un),Fi(Et,!0),ft("")}return}ot.source!=="blur"&&(M==="combobox"&&pr(nt),ae==null||ae(nt))},Zi=function(nt){var ot=nt;M!=="tags"&&(ot=nt.map(function(Un){var Kn=Cn.get(Un);return Kn==null?void 0:Kn.value}).filter(function(Un){return Un!==void 0}));var Et=Array.from(new Set([].concat((0,z.Z)(qr),(0,z.Z)(ot))));pr(Et),Et.forEach(function(Un){Fi(Un,!0)})},kt=h.useMemo(function(){var pe=gn!==!1&&Wt!==!1;return(0,O.Z)((0,O.Z)({},Gt),{},{flattenOptions:rr,onActiveValue:Dr,defaultActiveFirstOption:ni,onSelect:Yi,menuItemSelectedIcon:en,rawValues:qr,fieldNames:ln,virtual:pe,direction:tn,listHeight:Fn,listItemHeight:yn,childrenAsData:lr})},[Gt,rr,Dr,ni,Yi,en,qr,ln,gn,Wt,Fn,yn,lr]);return h.createElement(En.Provider,{value:kt},h.createElement(xt,(0,E.Z)({},un,{id:zr,prefixCls:J,ref:v,omitDomProps:Br,mode:M,displayValues:Jr,onDisplayValuesChange:to,direction:tn,searchValue:Zt,onSearch:Ei,autoClearSearchValue:je,onSearchSplit:Zi,dropdownMatchSelectWidth:Wt,OptionList:Gr,emptyOptions:!rr.length,activeValue:Wi,activeDescendantId:"".concat(zr,"_list_").concat(gr)})))}),xi=zi;xi.Option=Gn,xi.OptGroup=Mn;var Yr=xi,_i=Yr,Hi=f(10366),Vi=f(8745),Ni=f(33603),fi=f(9708),_o=f(53124),Co=f(98866),qi=f(88258),Ro=f(98675),Ii=f(65223),uo=f(4173),Ri=f(87244),Gi=f(13458),eo=f(78642),$i=f(46163),Fo=function(d,v){var D={};for(var M in d)Object.prototype.hasOwnProperty.call(d,M)&&v.indexOf(M)<0&&(D[M]=d[M]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,M=Object.getOwnPropertySymbols(d);G<M.length;G++)v.indexOf(M[G])<0&&Object.prototype.propertyIsEnumerable.call(d,M[G])&&(D[M[G]]=d[M[G]]);return D};const Lo="SECRET_COMBOBOX_MODE_DO_NOT_USE",xo=(d,v)=>{var D,{prefixCls:M,bordered:G=!0,className:J,rootClassName:ve,getPopupContainer:Me,popupClassName:Ae,dropdownClassName:ie,listHeight:ae=256,placement:le,listItemHeight:je=24,size:se,disabled:st,notFoundContent:$t,status:Wt,builtinPlacements:zt,dropdownMatchSelectWidth:Ft,popupMatchSelectWidth:Bt,direction:pn,style:an,allowClear:Lt}=d,qt=Fo(d,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:en,getPrefixCls:gn,renderEmpty:tn,direction:fn,virtual:Fn,popupMatchSelectWidth:mn,popupOverflow:yn,select:bn}=h.useContext(_o.E_),St=gn("select",M),Tt=gn(),Kt=pn!=null?pn:fn,{compactSize:un,compactItemClassnames:zr}=(0,uo.ri)(St,Kt),[Er,lr]=(0,Ri.Z)(St),wr=h.useMemo(()=>{const{mode:$n}=qt;if($n!=="combobox")return $n===Lo?"combobox":$n},[qt.mode]),ln=wr==="multiple"||wr==="tags",Qn=(0,eo.Z)(qt.suffixIcon,qt.showArrow),Qr=(D=Bt!=null?Bt:Ft)!==null&&D!==void 0?D:mn,{status:Zt,hasFeedback:ft,isFormItemInput:Gt,feedbackIcon:Ln}=h.useContext(Ii.aM),Cn=(0,fi.F)(Zt,Wt);let dn;$t!==void 0?dn=$t:wr==="combobox"?dn=null:dn=(tn==null?void 0:tn("Select"))||h.createElement(qi.Z,{componentName:"Select"});const{suffixIcon:jt,itemIcon:Nn,removeIcon:nr,clearIcon:Jn}=(0,$i.Z)(Object.assign(Object.assign({},qt),{multiple:ln,hasFeedback:ft,feedbackIcon:Ln,showSuffixIcon:Qn,prefixCls:St,showArrow:qt.showArrow,componentName:"Select"})),cr=Lt===!0?{clearIcon:Jn}:Lt,qn=(0,Hi.Z)(qt,["suffixIcon","itemIcon"]),sr=x()(Ae||ie,{[`${St}-dropdown-${Kt}`]:Kt==="rtl"},ve,lr),Dn=(0,Ro.Z)($n=>{var Or;return(Or=se!=null?se:un)!==null&&Or!==void 0?Or:$n}),jn=h.useContext(Co.Z),Zr=st!=null?st:jn,Jr=x()({[`${St}-lg`]:Dn==="large",[`${St}-sm`]:Dn==="small",[`${St}-rtl`]:Kt==="rtl",[`${St}-borderless`]:!G,[`${St}-in-form-item`]:Gt},(0,fi.Z)(St,Cn,ft),zr,bn==null?void 0:bn.className,J,ve,lr),qr=h.useMemo(()=>le!==void 0?le:Kt==="rtl"?"bottomRight":"bottomLeft",[le,Kt]),vr=(0,Gi.Z)(zt,yn);return Er(h.createElement(_i,Object.assign({ref:v,virtual:Fn,showSearch:bn==null?void 0:bn.showSearch},qn,{style:Object.assign(Object.assign({},bn==null?void 0:bn.style),an),dropdownMatchSelectWidth:Qr,builtinPlacements:vr,transitionName:(0,Ni.m)(Tt,"slide-up",qt.transitionName),listHeight:ae,listItemHeight:je,mode:wr,prefixCls:St,placement:qr,direction:Kt,suffixIcon:jt,menuItemSelectedIcon:Nn,removeIcon:nr,allowClear:cr,notFoundContent:dn,className:Jr,getPopupContainer:Me||en,dropdownClassName:sr,disabled:Zr})))},Xi=h.forwardRef(xo),To=(0,Vi.Z)(Xi);Xi.SECRET_COMBOBOX_MODE_DO_NOT_USE=Lo,Xi.Option=Gn,Xi.OptGroup=Mn,Xi._InternalPanelDoNotUseOrYouWillBeFired=To;var Eo=Xi},87244:function(sn,he,f){"use strict";f.d(he,{Z:function(){return p}});var L=f(14747),x=f(80110),E=f(45503),z=f(67968),b=f(67771),O=f(33297);const m=c=>{const{optionHeight:C,optionFontSize:T,optionLineHeight:Q,optionPadding:N}=c;return{position:"relative",display:"block",minHeight:C,padding:N,color:c.colorText,fontWeight:"normal",fontSize:T,lineHeight:Q,boxSizing:"border-box"}};var V=c=>{const{antCls:C,componentCls:T}=c,Q=`${T}-item`,N=`&${C}-slide-up-enter${C}-slide-up-enter-active`,j=`&${C}-slide-up-appear${C}-slide-up-appear-active`,te=`&${C}-slide-up-leave${C}-slide-up-leave-active`,ke=`${T}-dropdown-placement-`;return[{[`${T}-dropdown`]:Object.assign(Object.assign({},(0,L.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,[`
${N}${ke}bottomLeft,
${j}${ke}bottomLeft
`]:{animationName:b.fJ},[`
${N}${ke}topLeft,
${j}${ke}topLeft,
${N}${ke}topRight,
${j}${ke}topRight
`]:{animationName:b.Qt},[`${te}${ke}bottomLeft`]:{animationName:b.Uw},[`
${te}${ke}topLeft,
${te}${ke}topRight
`]:{animationName:b.ly},"&-hidden":{display:"none"},[`${Q}`]:Object.assign(Object.assign({},m(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"},L.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Q}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${Q}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${Q}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${Q}-option-selected`]:{backgroundColor:c.colorBgContainerDisabled},color:c.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:c.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,b.oN)(c,"slide-up"),(0,b.oN)(c,"slide-down"),(0,O.Fm)(c,"move-up"),(0,O.Fm)(c,"move-down")]};const h=2,xe=c=>{let{controlHeightSM:C,controlHeight:T,lineWidth:Q}=c;const N=(T-C)/2-Q,j=Math.ceil(N/2);return[N,j]};function ue(c,C){const{componentCls:T,iconCls:Q}=c,N=`${T}-selection-overflow`,j=c.multipleSelectItemHeight,[te]=xe(c),ke=C?`${T}-${C}`:"";return{[`${T}-multiple${ke}`]:{fontSize:c.fontSize,[N]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${T}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${te-h}px ${h*2}px`,borderRadius:c.borderRadius,[`${T}-show-search&`]:{cursor:"text"},[`${T}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${h}px 0`,lineHeight:`${j}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${T}-show-arrow ${T}-selector,
&${T}-allow-clear ${T}-selector
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${T}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:j,marginTop:h,marginBottom:h,lineHeight:`${j-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:h*2,paddingInlineStart:c.paddingXS,paddingInlineEnd:c.paddingXS/2,[`${T}-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,L.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Q}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${N}-item + ${N}-item`]:{[`${T}-selection-search`]:{marginInlineStart:0}},[`${T}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-te,"\n &-input,\n &-mirror\n ":{height:j,fontFamily:c.fontFamily,lineHeight:`${j}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"}},[`${T}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var be=c=>{const{componentCls:C}=c,T=(0,E.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),Q=(0,E.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,N]=xe(c);return[ue(c),ue(T,"sm"),{[`${C}-multiple${C}-sm`]:{[`${C}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${C}-selection-search`]:{marginInlineStart:N}}},ue(Q,"lg")]};function Oe(c,C){const{componentCls:T,inputPaddingHorizontalBase:Q,borderRadius:N}=c,j=c.controlHeight-c.lineWidth*2,te=Math.ceil(c.fontSize*1.25),ke=C?`${T}-${C}`:"";return{[`${T}-single${ke}`]:{fontSize:c.fontSize,[`${T}-selector`]:Object.assign(Object.assign({},(0,L.Wf)(c)),{display:"flex",borderRadius:N,[`${T}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Q,insetInlineEnd:Q,bottom:0,"&-input":{width:"100%"}},[`
${T}-selection-item,
${T}-selection-placeholder
`]:{padding:0,lineHeight:`${j}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${j}px`}},[`${T}-selection-item`]:{position:"relative",userSelect:"none"},[`${T}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${T}-selection-item:after`,`${T}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${T}-show-arrow ${T}-selection-item,
&${T}-show-arrow ${T}-selection-placeholder
`]:{paddingInlineEnd:te},[`&${T}-open ${T}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${T}-customize-input)`]:{[`${T}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${Q}px`,[`${T}-selection-search-input`]:{height:j},"&:after":{lineHeight:`${j}px`}}},[`&${T}-customize-input`]:{[`${T}-selector`]:{"&:after":{display:"none"},[`${T}-selection-search`]:{position:"static",width:"100%"},[`${T}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Q}px`,"&:after":{display:"none"}}}}}}}function Se(c){const{componentCls:C}=c,T=c.controlPaddingHorizontalSM-c.lineWidth;return[Oe(c),Oe((0,E.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${C}-single${C}-sm`]:{[`&:not(${C}-customize-input)`]:{[`${C}-selection-search`]:{insetInlineStart:T,insetInlineEnd:T},[`${C}-selector`]:{padding:`0 ${T}px`},[`&${C}-show-arrow ${C}-selection-search`]:{insetInlineEnd:T+c.fontSize*1.5},[`
&${C}-show-arrow ${C}-selection-item,
&${C}-show-arrow ${C}-selection-placeholder
`]:{paddingInlineEnd:c.fontSize*1.5}}}},Oe((0,E.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const k=c=>{const{componentCls:C,selectorBg:T}=c;return{position:"relative",backgroundColor:T,border:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`,transition:`all ${c.motionDurationMid} ${c.motionEaseInOut}`,input:{cursor:"pointer"},[`${C}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${C}-disabled&`]:{color:c.colorTextDisabled,background:c.colorBgContainerDisabled,cursor:"not-allowed",[`${C}-multiple&`]:{background:c.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},Je=function(c,C){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Q,borderHoverColor:N,outlineColor:j,antCls:te}=C,ke=T?{[`${Q}-selector`]:{borderColor:N}}:{};return{[c]:{[`&:not(${Q}-disabled):not(${Q}-customize-input):not(${te}-pagination-size-changer)`]:Object.assign(Object.assign({},ke),{[`${Q}-focused& ${Q}-selector`]:{borderColor:N,boxShadow:`0 0 0 ${C.controlOutlineWidth}px ${j}`,outline:0},[`&:hover ${Q}-selector`]:{borderColor:N}})}}},Ot=c=>{const{componentCls:C}=c;return{[`${C}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ee=c=>{const{componentCls:C,inputPaddingHorizontalBase:T,iconCls:Q}=c;return{[C]:Object.assign(Object.assign({},(0,L.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${C}-customize-input) ${C}-selector`]:Object.assign(Object.assign({},k(c)),Ot(c)),[`${C}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},L.vS),[`${C}-selection-placeholder`]:Object.assign(Object.assign({},L.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${C}-arrow`]:Object.assign(Object.assign({},(0,L.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:T,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Q]:{verticalAlign:"top",transition:`transform ${c.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${C}-suffix)`]:{pointerEvents:"auto"}},[`${C}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${C}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:T,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":{[`${C}-clear`]:{opacity:1}}}),[`${C}-has-feedback`]:{[`${C}-clear`]:{insetInlineEnd:T+c.fontSize+c.paddingXS}}}},ne=c=>{const{componentCls:C}=c;return[{[C]:{[`&-borderless ${C}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${C}-in-form-item`]:{width:"100%"}}},ee(c),Se(c),be(c),V(c),{[`${C}-rtl`]:{direction:"rtl"}},Je(C,(0,E.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),Je(`${C}-status-error`,(0,E.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),Je(`${C}-status-warning`,(0,E.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,x.c)(c,{borderElCls:`${C}-selector`,focusElCls:`${C}-focused`})]};var p=(0,z.Z)("Select",(c,C)=>{let{rootPrefixCls:T}=C;const Q=(0,E.TS)(c,{rootPrefixCls:T,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[ne(Q)]},c=>{const{fontSize:C,lineHeight:T,controlHeight:Q,controlPaddingHorizontal:N,zIndexPopupBase:j,colorText:te,fontWeightStrong:ke,controlItemBgActive:ge,controlItemBgHover:tt,colorBgContainer:qe,colorFillSecondary:_e,controlHeightLG:mt,controlHeightSM:yt,colorBgContainerDisabled:at,colorTextDisabled:Ue}=c;return{zIndexPopup:j+50,optionSelectedColor:te,optionSelectedFontWeight:ke,optionSelectedBg:ge,optionActiveBg:tt,optionPadding:`${(Q-C*T)/2}px ${N}px`,optionFontSize:C,optionLineHeight:T,optionHeight:Q,selectorBg:qe,clearBg:qe,singleItemHeightLG:mt,multipleItemBg:_e,multipleItemBorderColor:"transparent",multipleItemHeight:yt,multipleItemHeightLG:Q,multipleSelectorBgDisabled:at,multipleItemColorDisabled:Ue,multipleItemBorderColorDisabled:"transparent"}})},13458:function(sn,he,f){"use strict";f.d(he,{Z:function(){return x}});const L=E=>{const b={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:E==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},b),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},b),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},b),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},b),{points:["br","tr"],offset:[0,-4]})}};function x(E,z){return E||L(z)}},78642:function(sn,he,f){"use strict";f.d(he,{Z:function(){return L}});function L(x,E){return E!==void 0?E:x!==null}},46163:function(sn,he,f){"use strict";f.d(he,{Z:function(){return ce}});var L=f(18299),x=f(16646),E=f(73475),z=f(42922),b=f(3407),O=f(72395),m=f(67294);function ce(V){let{suffixIcon:h,clearIcon:xe,menuItemSelectedIcon:ue,removeIcon:Le,loading:be,multiple:Oe,hasFeedback:Se,prefixCls:k,showSuffixIcon:Je,feedbackIcon:Ot,showArrow:ee,componentName:ne}=V;const p=xe!=null?xe:m.createElement(x.Z,null),c=N=>h===null&&!Se&&!ee?null:m.createElement(m.Fragment,null,Je!==!1&&N,Se&&Ot);let C=null;if(h!==void 0)C=c(h);else if(be)C=c(m.createElement(b.Z,{spin:!0}));else{const N=`${k}-suffix`;C=j=>{let{open:te,showSearch:ke}=j;return c(te&&ke?m.createElement(O.Z,{className:N}):m.createElement(z.Z,{className:N}))}}let T=null;ue!==void 0?T=ue:Oe?T=m.createElement(L.Z,null):T=null;let Q=null;return Le!==void 0?Q=Le:Q=m.createElement(E.Z,null),{clearIcon:p,suffixIcon:C,itemIcon:T,removeIcon:Q}}},33507:function(sn,he){"use strict";const f=L=>({[L.componentCls]:{[`${L.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${L.motionDurationMid} ${L.motionEaseInOut},
opacity ${L.motionDurationMid} ${L.motionEaseInOut} !important`}},[`${L.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${L.motionDurationMid} ${L.motionEaseInOut},
opacity ${L.motionDurationMid} ${L.motionEaseInOut} !important`}}});he.Z=f},33297:function(sn,he,f){"use strict";f.d(he,{Fm:function(){return ue}});var L=f(34367),x=f(93590);const E=new L.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),z=new L.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),b=new L.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),O=new L.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),m=new L.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ce=new L.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),V=new L.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),h=new L.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),xe={"move-up":{inKeyframes:V,outKeyframes:h},"move-down":{inKeyframes:E,outKeyframes:z},"move-left":{inKeyframes:b,outKeyframes:O},"move-right":{inKeyframes:m,outKeyframes:ce}},ue=(Le,be)=>{const{antCls:Oe}=Le,Se=`${Oe}-${be}`,{inKeyframes:k,outKeyframes:Je}=xe[be];return[(0,x.R)(Se,k,Je,Le.motionDurationMid),{[`
${Se}-enter,
${Se}-appear
`]:{opacity:0,animationTimingFunction:Le.motionEaseOutCirc},[`${Se}-leave`]:{animationTimingFunction:Le.motionEaseInOutCirc}}]}},67771:function(sn,he,f){"use strict";f.d(he,{Qt:function(){return b},Uw:function(){return z},fJ:function(){return E},ly:function(){return O},oN:function(){return ue}});var L=f(34367),x=f(93590);const E=new L.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),z=new L.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),b=new L.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),O=new L.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),m=new L.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ce=new L.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),V=new L.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),h=new L.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),xe={"slide-up":{inKeyframes:E,outKeyframes:z},"slide-down":{inKeyframes:b,outKeyframes:O},"slide-left":{inKeyframes:m,outKeyframes:ce},"slide-right":{inKeyframes:V,outKeyframes:h}},ue=(Le,be)=>{const{antCls:Oe}=Le,Se=`${Oe}-${be}`,{inKeyframes:k,outKeyframes:Je}=xe[be];return[(0,x.R)(Se,k,Je,Le.motionDurationMid),{[`
${Se}-enter,
${Se}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:Le.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Se}-leave`]:{animationTimingFunction:Le.motionEaseInQuint}}]}},41771:function(sn,he){"use strict";var f;var L=typeof Symbol=="function"&&Symbol.for,x=L?Symbol.for("react.element"):60103,E=L?Symbol.for("react.portal"):60106,z=L?Symbol.for("react.fragment"):60107,b=L?Symbol.for("react.strict_mode"):60108,O=L?Symbol.for("react.profiler"):60114,m=L?Symbol.for("react.provider"):60109,ce=L?Symbol.for("react.context"):60110,V=L?Symbol.for("react.async_mode"):60111,h=L?Symbol.for("react.concurrent_mode"):60111,xe=L?Symbol.for("react.forward_ref"):60112,ue=L?Symbol.for("react.suspense"):60113,Le=L?Symbol.for("react.suspense_list"):60120,be=L?Symbol.for("react.memo"):60115,Oe=L?Symbol.for("react.lazy"):60116,Se=L?Symbol.for("react.block"):60121,k=L?Symbol.for("react.fundamental"):60117,Je=L?Symbol.for("react.responder"):60118,Ot=L?Symbol.for("react.scope"):60119;function ee(p){if(typeof p=="object"&&p!==null){var c=p.$$typeof;switch(c){case x:switch(p=p.type,p){case V:case h:case z:case O:case b:case ue:return p;default:switch(p=p&&p.$$typeof,p){case ce:case xe:case Oe:case be:case m:return p;default:return c}}case E:return c}}}function ne(p){return ee(p)===h}f=V,f=h,f=ce,f=m,f=x,f=xe,f=z,f=Oe,f=be,f=E,f=O,f=b,f=ue,f=function(p){return ne(p)||ee(p)===V},f=ne,f=function(p){return ee(p)===ce},f=function(p){return ee(p)===m},f=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===x},f=function(p){return ee(p)===xe},he.isFragment=function(p){return ee(p)===z},f=function(p){return ee(p)===Oe},f=function(p){return ee(p)===be},f=function(p){return ee(p)===E},f=function(p){return ee(p)===O},f=function(p){return ee(p)===b},f=function(p){return ee(p)===ue},f=function(p){return typeof p=="string"||typeof p=="function"||p===z||p===h||p===O||p===b||p===ue||p===Le||typeof p=="object"&&p!==null&&(p.$$typeof===Oe||p.$$typeof===be||p.$$typeof===m||p.$$typeof===ce||p.$$typeof===xe||p.$$typeof===k||p.$$typeof===Je||p.$$typeof===Ot||p.$$typeof===Se)},f=ee},47655:function(sn,he,f){"use strict";sn.exports=f(41771)},64701:function(sn,he,f){"use strict";f.r(he),f.d(he,{ResizableTextArea:function(){return It},default:function(){return Hn}});var L=f(87462),x=f(1413),E=f(4942),z=f(71002),b=f(97685),O=f(45987),m=f(74902),ce=f(94184),V=f.n(ce),h=f(67656),xe=f(87887),ue=f(67294);function Le(Ee){var de=ue.useRef();de.current=Ee;var He=ue.useCallback(function(){for(var me,ut=arguments.length,Mt=new Array(ut),dt=0;dt<ut;dt++)Mt[dt]=arguments[dt];return(me=de.current)===null||me===void 0?void 0:me.call.apply(me,[de].concat(Mt))},[]);return He}function be(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Oe=be()?ue.useLayoutEffect:ue.useEffect,Se=Oe,k=function(de,He){var me=ue.useRef(!0);Oe(function(){if(!me.current)return de()},He),Oe(function(){return me.current=!1,function(){me.current=!0}},[])};function Je(Ee){var de=ue.useRef(!1),He=ue.useState(Ee),me=(0,b.Z)(He,2),ut=me[0],Mt=me[1];ue.useEffect(function(){return de.current=!1,function(){de.current=!0}},[]);function dt(P,W){W&&de.current||Mt(P)}return[ut,dt]}function Ot(Ee){return Ee!==void 0}function ee(Ee,de){var He=de||{},me=He.defaultValue,ut=He.value,Mt=He.onChange,dt=He.postState,P=Je(function(){return Ot(ut)?ut:Ot(me)?typeof me=="function"?me():me:typeof Ee=="function"?Ee():Ee}),W=(0,b.Z)(P,2),H=W[0],re=W[1],bt=ut!==void 0?ut:H,lt=dt?dt(bt):bt,De=Le(Mt),ht=Je([bt]),ye=(0,b.Z)(ht,2),it=ye[0],In=ye[1];k(function(){var Nt=it[0];H!==Nt&&De(H,Nt)},[it]),k(function(){Ot(ut)||re(ut)},[ut]);var Rt=Le(function(Nt,oe){re(Nt,oe),In([bt],oe)});return[lt,Rt]}var ne=f(48555),p=function(de){return+setTimeout(de,16)},c=function(de){return clearTimeout(de)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(p=function(de){return window.requestAnimationFrame(de)},c=function(de){return window.cancelAnimationFrame(de)});var C=0,T=new Map;function Q(Ee){T.delete(Ee)}var N=function(de){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;C+=1;var me=C;function ut(Mt){if(Mt===0)Q(me),de();else{var dt=p(function(){ut(Mt-1)});T.set(me,dt)}}return ut(He),me};N.cancel=function(Ee){var de=T.get(Ee);return Q(de),c(de)};var j=N,te=`
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;
`,ke=["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"],ge={},tt;function qe(Ee){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,He=Ee.getAttribute("id")||Ee.getAttribute("data-reactid")||Ee.getAttribute("name");if(de&&ge[He])return ge[He];var me=window.getComputedStyle(Ee),ut=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),Mt=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),dt=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),P=ke.map(function(H){return"".concat(H,":").concat(me.getPropertyValue(H))}).join(";"),W={sizingStyle:P,paddingSize:Mt,borderSize:dt,boxSizing:ut};return de&&He&&(ge[He]=W),W}function _e(Ee){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,He=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;tt||(tt=document.createElement("textarea"),tt.setAttribute("tab-index","-1"),tt.setAttribute("aria-hidden","true"),document.body.appendChild(tt)),Ee.getAttribute("wrap")?tt.setAttribute("wrap",Ee.getAttribute("wrap")):tt.removeAttribute("wrap");var ut=qe(Ee,de),Mt=ut.paddingSize,dt=ut.borderSize,P=ut.boxSizing,W=ut.sizingStyle;tt.setAttribute("style","".concat(W,";").concat(te)),tt.value=Ee.value||Ee.placeholder||"";var H=void 0,re=void 0,bt,lt=tt.scrollHeight;if(P==="border-box"?lt+=dt:P==="content-box"&&(lt-=Mt),He!==null||me!==null){tt.value=" ";var De=tt.scrollHeight-Mt;He!==null&&(H=De*He,P==="border-box"&&(H=H+Mt+dt),lt=Math.max(H,lt)),me!==null&&(re=De*me,P==="border-box"&&(re=re+Mt+dt),bt=lt>re?"":"hidden",lt=Math.min(re,lt))}var ht={height:lt,overflowY:bt,resize:"none"};return H&&(ht.minHeight=H),re&&(ht.maxHeight=re),ht}var mt=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],yt=0,at=1,Ue=2,Ke=ue.forwardRef(function(Ee,de){var He=Ee,me=He.prefixCls,ut=He.onPressEnter,Mt=He.defaultValue,dt=He.value,P=He.autoSize,W=He.onResize,H=He.className,re=He.style,bt=He.disabled,lt=He.onChange,De=He.onInternalAutoSize,ht=(0,O.Z)(He,mt),ye=ee(Mt,{value:dt,postState:function(X){return X!=null?X:""}}),it=(0,b.Z)(ye,2),In=it[0],Rt=it[1],Nt=function(X){Rt(X.target.value),lt==null||lt(X)},oe=ue.useRef();ue.useImperativeHandle(de,function(){return{textArea:oe.current}});var Ge=ue.useMemo(function(){return P&&(0,z.Z)(P)==="object"?[P.minRows,P.maxRows]:[]},[P]),_t=(0,b.Z)(Ge,2),Yt=_t[0],Qt=_t[1],vt=!!P,Be=function(){try{if(document.activeElement===oe.current){var X=oe.current,We=X.selectionStart,we=X.selectionEnd,Ie=X.scrollTop;oe.current.setSelectionRange(We,we),oe.current.scrollTop=Ie}}catch(ct){}},Jt=ue.useState(Ue),Ht=(0,b.Z)(Jt,2),er=Ht[0],jr=Ht[1],kr=ue.useState(),Si=(0,b.Z)(kr,2),li=Si[0],Mi=Si[1],_r=function(){jr(yt)};Se(function(){vt&&_r()},[dt,Yt,Qt,vt]),Se(function(){if(er===yt)jr(at);else if(er===at){var _=_e(oe.current,!1,Yt,Qt);jr(Ue),Mi(_)}else Be()},[er]);var Ci=ue.useRef(),si=function(){j.cancel(Ci.current)},Pi=function(X){er===Ue&&(W==null||W(X),P&&(si(),Ci.current=j(function(){_r()})))};ue.useEffect(function(){return si},[]);var I=vt?li:null,Y=(0,x.Z)((0,x.Z)({},re),I);return(er===yt||er===at)&&(Y.overflowY="hidden",Y.overflowX="hidden"),ue.createElement(ne.Z,{onResize:Pi,disabled:!(P||W)},ue.createElement("textarea",(0,L.Z)({},ht,{ref:oe,style:Y,className:V()(me,H,(0,E.Z)({},"".concat(me,"-disabled"),bt)),disabled:bt,value:In,onChange:Nt})))}),It=Ke,At=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ve(Ee,de){return(0,m.Z)(Ee||"").slice(0,de).join("")}function rt(Ee,de,He,me){var ut=He;return Ee?ut=Ve(He,me):(0,m.Z)(de||"").length<He.length&&(0,m.Z)(He||"").length>me&&(ut=de),ut}var Ye=ue.forwardRef(function(Ee,de){var He,me=Ee.defaultValue,ut=Ee.value,Mt=Ee.onFocus,dt=Ee.onBlur,P=Ee.onChange,W=Ee.allowClear,H=Ee.maxLength,re=Ee.onCompositionStart,bt=Ee.onCompositionEnd,lt=Ee.suffix,De=Ee.prefixCls,ht=De===void 0?"rc-textarea":De,ye=Ee.classes,it=Ee.showCount,In=Ee.className,Rt=Ee.style,Nt=Ee.disabled,oe=Ee.hidden,Ge=Ee.classNames,_t=Ee.styles,Yt=Ee.onResize,Qt=(0,O.Z)(Ee,At),vt=ee(me,{value:ut,defaultValue:me}),Be=(0,b.Z)(vt,2),Jt=Be[0],Ht=Be[1],er=(0,ue.useRef)(null),jr=ue.useState(!1),kr=(0,b.Z)(jr,2),Si=kr[0],li=kr[1],Mi=ue.useState(!1),_r=(0,b.Z)(Mi,2),Ci=_r[0],si=_r[1],Pi=ue.useRef(),I=ue.useRef(0),Y=ue.useState(null),_=(0,b.Z)(Y,2),X=_[0],We=_[1],we=function(){var Te;(Te=er.current)===null||Te===void 0||Te.textArea.focus()};(0,ue.useImperativeHandle)(de,function(){return{resizableTextArea:er.current,focus:we,blur:function(){var Te;(Te=er.current)===null||Te===void 0||Te.textArea.blur()}}}),(0,ue.useEffect)(function(){li(function(Ce){return!Nt&&Ce})},[Nt]);var Ie=Number(H)>0,ct=function(Te){si(!0),Pi.current=Jt,I.current=Te.currentTarget.selectionStart,re==null||re(Te)},Dt=function(Te){si(!1);var Pe=Te.currentTarget.value;if(Ie){var Vt,U=I.current>=H+1||I.current===((Vt=Pi.current)===null||Vt===void 0?void 0:Vt.length);Pe=rt(U,Pi.current,Pe,H)}Pe!==Jt&&(Ht(Pe),(0,xe.rJ)(Te.currentTarget,Te,P,Pe)),bt==null||bt(Te)},Ut=function(Te){var Pe=Te.target.value;if(!Ci&&Ie){var Vt=Te.target.selectionStart>=H+1||Te.target.selectionStart===Pe.length||!Te.target.selectionStart;Pe=rt(Vt,Jt,Pe,H)}Ht(Pe),(0,xe.rJ)(Te.currentTarget,Te,P,Pe)},pt=function(Te){var Pe=Qt.onPressEnter,Vt=Qt.onKeyDown;Te.key==="Enter"&&Pe&&Pe(Te),Vt==null||Vt(Te)},Qe=function(Te){li(!0),Mt==null||Mt(Te)},y=function(Te){li(!1),dt==null||dt(Te)},F=function(Te){var Pe;Ht(""),we(),(0,xe.rJ)((Pe=er.current)===null||Pe===void 0?void 0:Pe.textArea,Te,P)},$=(0,xe.D7)(Jt);!Ci&&Ie&&ut==null&&($=Ve($,H));var A=lt,Z;if(it){var B=(0,m.Z)($).length;(0,z.Z)(it)==="object"?Z=it.formatter({value:$,count:B,maxLength:H}):Z="".concat(B).concat(Ie?" / ".concat(H):""),A=ue.createElement(ue.Fragment,null,A,ue.createElement("span",{className:V()("".concat(ht,"-data-count"),Ge==null?void 0:Ge.count),style:_t==null?void 0:_t.count},Z))}var $e=function(Te){var Pe;Yt==null||Yt(Te),(Pe=er.current)!==null&&Pe!==void 0&&Pe.textArea.style.height&&We(!0)},Ct=!Qt.autoSize&&!it&&!W,et=ue.createElement(h.BaseInput,{value:$,allowClear:W,handleReset:F,suffix:A,prefixCls:ht,classes:{affixWrapper:V()(ye==null?void 0:ye.affixWrapper,(He={},(0,E.Z)(He,"".concat(ht,"-show-count"),it),(0,E.Z)(He,"".concat(ht,"-textarea-allow-clear"),W),He))},disabled:Nt,focused:Si,className:In,style:(0,x.Z)((0,x.Z)({},Rt),X&&!Ct?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Z=="string"?Z:void 0}},hidden:oe,inputElement:ue.createElement(It,(0,L.Z)({},Qt,{onKeyDown:pt,onChange:Ut,onFocus:Qe,onBlur:y,onCompositionStart:ct,onCompositionEnd:Dt,className:Ge==null?void 0:Ge.textarea,style:(0,x.Z)((0,x.Z)({},_t==null?void 0:_t.textarea),{},{resize:Rt==null?void 0:Rt.resize}),disabled:Nt,prefixCls:ht,onResize:$e,ref:er}))});return et}),vn=Ye,Hn=vn},4631:function(sn){(function(he,f){sn.exports=f()})(this,function(){"use strict";var he=navigator.userAgent,f=navigator.platform,L=/gecko\/\d/i.test(he),x=/MSIE \d/.test(he),E=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(he),z=/Edge\/(\d+)/.exec(he),b=x||E||z,O=b&&(x?document.documentMode||6:+(z||E)[1]),m=!z&&/WebKit\//.test(he),ce=m&&/Qt\/\d+\.\d+/.test(he),V=!z&&/Chrome\//.test(he),h=/Opera\//.test(he),xe=/Apple Computer/.test(navigator.vendor),ue=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(he),Le=/PhantomJS/.test(he),be=!z&&/AppleWebKit/.test(he)&&/Mobile\/\w+/.test(he),Oe=/Android/.test(he),Se=be||Oe||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(he),k=be||/Mac/.test(f),Je=/\bCrOS\b/.test(he),Ot=/win/i.test(f),ee=h&&he.match(/Version\/(\d*\.\d*)/);ee&&(ee=Number(ee[1])),ee&&ee>=15&&(h=!1,m=!0);var ne=k&&(ce||h&&(ee==null||ee<12.11)),p=L||b&&O>=9;function c(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C=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 T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Q(e,t){return T(e).appendChild(t)}function N(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 j(e,t,r,n){var i=N(e,t,r,n);return i.setAttribute("role","presentation"),i}var te;document.createRange?te=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:te=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 ke(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 ge(){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 tt(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 _e=function(e){e.select()};be?_e=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:b&&(_e=function(e){try{e.select()}catch(t){}});function mt(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function yt(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 at(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 Ue=function(){this.id=null,this.f=null,this.time=0,this.handler=mt(this.onTimeout,this)};Ue.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ue.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 Ke(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var It=50,At={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},rt={origin:"*mouse"},Ye={origin:"+move"};function vn(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 Hn=[""];function Ee(e){for(;Hn.length<=e;)Hn.push(de(Hn)+" ");return Hn[e]}function de(e){return e[e.length-1]}function He(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function me(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function ut(){}function Mt(e,t){var r;return Object.create?r=Object.create(e):(ut.prototype=e,r=new ut),t&&yt(t,r),r}var dt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function P(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||dt.test(e))}function W(e,t){return t?t.source.indexOf("\\w")>-1&&P(e)?!0:t.test(e):P(e)}function H(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\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 bt(e){return e.charCodeAt(0)>=768&&re.test(e)}function lt(e,t,r){for(;(r<0?t>0:t<e.length)&&bt(e.charAt(t));)t+=r;return t}function De(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 ht(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 ye=null;function it(e,t,r){var n;ye=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:ye=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:ye=i)}return n!=null?n:ye}var In=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,g,S){this.level=u,this.from=g,this.to=S}return function(u,g){var S=g=="ltr"?"L":"R";if(u.length==0||g=="ltr"&&!n.test(u))return!1;for(var R=u.length,w=[],K=0;K<R;++K)w.push(r(u.charCodeAt(K)));for(var q=0,fe=S;q<R;++q){var Re=w[q];Re=="m"?w[q]=fe:fe=Re}for(var Ze=0,Fe=S;Ze<R;++Ze){var Xe=w[Ze];Xe=="1"&&Fe=="r"?w[Ze]="n":o.test(Xe)&&(Fe=Xe,Xe=="r"&&(w[Ze]="R"))}for(var wt=1,gt=w[0];wt<R-1;++wt){var nn=w[wt];nn=="+"&&gt=="1"&&w[wt+1]=="1"?w[wt]="1":nn==","&&gt==w[wt+1]&&(gt=="1"||gt=="n")&&(w[wt]=gt),gt=nn}for(var _n=0;_n<R;++_n){var Ar=w[_n];if(Ar==",")w[_n]="N";else if(Ar=="%"){var ur=void 0;for(ur=_n+1;ur<R&&w[ur]=="%";++ur);for(var Oi=_n&&w[_n-1]=="!"||ur<R&&w[ur]=="1"?"1":"N",mi=_n;mi<ur;++mi)w[mi]=Oi;_n=ur-1}}for(var Mr=0,yi=S;Mr<R;++Mr){var Wr=w[Mr];yi=="L"&&Wr=="1"?w[Mr]="L":o.test(Wr)&&(yi=Wr)}for(var Pr=0;Pr<R;++Pr)if(i.test(w[Pr])){var Ir=void 0;for(Ir=Pr+1;Ir<R&&i.test(w[Ir]);++Ir);for(var fr=(Pr?w[Pr-1]:S)=="L",bi=(Ir<R?w[Ir]:S)=="L",jo=fr==bi?fr?"L":"R":S,So=Pr;So<Ir;++So)w[So]=jo;Pr=Ir-1}for(var Kr=[],Ji,Nr=0;Nr<R;)if(a.test(w[Nr])){var Ja=Nr;for(++Nr;Nr<R&&a.test(w[Nr]);++Nr);Kr.push(new s(0,Ja,Nr))}else{var so=Nr,Mo=Kr.length,Io=g=="rtl"?1:0;for(++Nr;Nr<R&&w[Nr]!="L";++Nr);for(var ai=so;ai<Nr;)if(l.test(w[ai])){so<ai&&(Kr.splice(Mo,0,new s(1,so,ai)),Mo+=Io);var ko=ai;for(++ai;ai<Nr&&l.test(w[ai]);++ai);Kr.splice(Mo,0,new s(2,ko,ai)),Mo+=Io,so=ai}else++ai;so<Nr&&Kr.splice(Mo,0,new s(1,so,Nr))}return g=="ltr"&&(Kr[0].level==1&&(Ji=u.match(/^\s+/))&&(Kr[0].from=Ji[0].length,Kr.unshift(new s(0,0,Ji[0].length))),de(Kr).level==1&&(Ji=u.match(/\s+$/))&&(de(Kr).to-=Ji[0].length,Kr.push(new s(0,R-Ji[0].length,R)))),g=="rtl"?Kr.reverse():Kr}}();function Rt(e,t){var r=e.order;return r==null&&(r=e.order=In(e.text,t)),r}var Nt=[],oe=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]||Nt).concat(r)}};function Ge(e,t){return e._handlers&&e._handlers[t]||Nt}function _t(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=Ke(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Yt(e,t){var r=Ge(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 Qt(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Yt(e,r||t.type,e,t),jr(t)||t.codemirrorIgnore}function vt(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)Ke(r,t[n])==-1&&r.push(t[n])}function Be(e,t){return Ge(e,t).length>0}function Jt(e){e.prototype.on=function(t,r){oe(this,t,r)},e.prototype.off=function(t,r){_t(this,t,r)}}function Ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function er(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function jr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function kr(e){Ht(e),er(e)}function Si(e){return e.target||e.srcElement}function li(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),k&&e.ctrlKey&&t==1&&(t=3),t}var Mi=function(){if(b&&O<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}(),_r;function Ci(e){if(_r==null){var t=N("span","\u200B");Q(e,N("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(_r=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&O<8))}var r=_r?N("span","\u200B"):N("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var si;function Pi(e){if(si!=null)return si;var t=Q(e,document.createTextNode("A\u062EA")),r=te(t,0,1).getBoundingClientRect(),n=te(t,1,2).getBoundingClientRect();return T(e),!r||r.left==r.right?!1:si=n.right-r.right<3}var I=`
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/)},Y=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},_=function(){var e=N("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),X=null;function We(e){if(X!=null)return X;var t=Q(e,N("span","x")),r=t.getBoundingClientRect(),n=te(t,0,1).getBoundingClientRect();return X=Math.abs(r.left-n.left)>1}var we={},Ie={};function ct(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),we[e]=t}function Dt(e,t){Ie[e]=t}function Ut(e){if(typeof e=="string"&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&typeof e.name=="string"&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];typeof t=="string"&&(t={name:t}),e=Mt(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ut("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ut("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function pt(e,t){t=Ut(t);var r=we[t.name];if(!r)return pt(e,"text/plain");var n=r(e,t);if(Qe.hasOwnProperty(t.name)){var i=Qe[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 Qe={};function y(e,t){var r=Qe.hasOwnProperty(e)?Qe[e]:Qe[e]={};yt(t,r)}function F(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 $(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 A(e,t,r){return e.startState?e.startState(t,r):!0}var Z=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};Z.prototype.eol=function(){return this.pos>=this.string.length},Z.prototype.sol=function(){return this.pos==this.lineStart},Z.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Z.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Z.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},Z.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Z.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Z.prototype.skipToEnd=function(){this.pos=this.string.length},Z.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Z.prototype.backUp=function(e){this.pos-=e},Z.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=at(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?at(this.string,this.lineStart,this.tabSize):0)},Z.prototype.indentation=function(){return at(this.string,null,this.tabSize)-(this.lineStart?at(this.string,this.lineStart,this.tabSize):0)},Z.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)}},Z.prototype.current=function(){return this.string.slice(this.start,this.pos)},Z.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Z.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Z.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function B(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 $e(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 Ct(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function et(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Ce(e){if(e.parent==null)return null;for(var t=e.parent,r=Ke(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 Te(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 Pe(e,t){return t>=e.first&&t<e.first+e.size}function Vt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function U(e,t,r){if(r===void 0&&(r=null),!(this instanceof U))return new U(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ze(e,t){return e.line-t.line||e.ch-t.ch}function rn(e,t){return e.sticky==t.sticky&&ze(e,t)==0}function xn(e){return U(e.line,e.ch)}function Pt(e,t){return ze(e,t)<0?t:e}function xt(e,t){return ze(e,t)<0?e:t}function On(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ne(e,t){if(t.line<e.first)return U(e.first,0);var r=e.first+e.size-1;return t.line>r?U(r,B(e,r).text.length):cn(t,B(e,t.line).text.length)}function cn(e,t){var r=e.ch;return r==null||r>t?U(e.line,t):r<0?U(e.line,0):e}function on(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Ne(e,t[n]);return r}var Rn=function(e,t){this.state=e,this.lookAhead=t},Sn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Sn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Sn.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}},Sn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Sn.fromSaved=function(e,t,r){return t instanceof Rn?new Sn(e,F(e.mode,t.state),r,t.lookAhead):new Sn(e,F(e.mode,t),r)},Sn.prototype.save=function(e){var t=e!==!1?F(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Rn(t,this.maxLookAhead):t};function Sr(e,t,r,n){var i=[e.state.modeGen],o={};Mn(e,t.text,e.doc.mode,r,function(u,g){return i.push(u,g)},o,n);for(var a=r.state,l=function(u){r.baseTokens=i;var g=e.state.overlays[u],S=1,R=0;r.state=!0,Mn(e,t.text,g.mode,r,function(w,K){for(var q=S;R<w;){var fe=i[S];fe>w&&i.splice(S,1,w,i[S+1],fe),S+=2,R=Math.min(w,fe)}if(K)if(g.opaque)i.splice(q,S-q,w,"overlay "+K),S=q+2;else for(;q<S;q+=2){var Re=i[q+1];i[q+1]=(Re?Re+" ":"")+"overlay "+K}},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 Vn(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Wn(e,Ce(t)),i=t.text.length>e.options.maxHighlightLength&&F(e.doc.mode,n.state),o=Sr(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 Wn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Sn(n,!0,t);var o=ar(e,t,r),a=o>n.first&&B(n,o-1).stateAfter,l=a?Sn.fromSaved(n,a,o):new Sn(n,A(n.mode),o);return n.iter(o,t,function(s){Rr(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 Rr(e,t,r,n){var i=e.doc.mode,o=new Z(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&Fr(i,r.state);!o.eol();)An(i,o,r.state),o.start=o.pos}function Fr(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=$(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function An(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=$(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 Cr=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function dr(e,t,r,n){var i=e.doc,o=i.mode,a;t=Ne(i,t);var l=B(i,t.line),s=Wn(e,t.line,r),u=new Z(l.text,e.options.tabSize,s),g;for(n&&(g=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=An(o,u,s.state),n&&g.push(new Cr(u,a,F(i.mode,s.state)));return n?g:new Cr(u,a,s.state)}function xr(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 Mn(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,g=new Z(t,e.options.tabSize,n),S,R=e.options.addModeClass&&[null];for(t==""&&xr(Fr(r,n.state),o);!g.eol();){if(g.pos>e.options.maxHighlightLength?(l=!1,a&&Rr(e,t,n,g.pos),g.pos=t.length,S=null):S=xr(An(r,g,n.state,R),o),R){var w=R[0].name;w&&(S="m-"+(S?w+" "+S:w))}if(!l||u!=S){for(;s<g.start;)s=Math.min(g.start,s+5e3),i(s,u);u=S}g.start=g.pos}for(;s<g.pos;){var K=Math.min(g.pos,s+5e3);i(K,u),s=K}}function ar(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=B(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof Rn?u.lookAhead:0)<=o.modeFrontier))return l;var g=at(s.text,null,e.options.tabSize);(i==null||n>g)&&(i=l-1,n=g)}return i}function Gn(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=B(e,n).stateAfter;if(i&&(!(i instanceof Rn)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Xn=!1,tr=!1;function hr(){Xn=!0}function En(){tr=!0}function Zn(e,t,r){this.marker=e,this.from=t,this.to=r}function Yn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Lr(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function ui(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Vr(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 Zn(a,o.from,s?null:o.to))}}return n}function Gr(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 Zn(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function ci(e,t){if(t.full)return null;var r=Pe(e,t.from.line)&&B(e,t.from.line).markedSpans,n=Pe(e,t.to.line)&&B(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=ze(t.from,t.to)==0,l=Vr(r,i,a),s=Gr(n,o,a),u=t.text.length==1,g=de(t.text).length+(u?i:0);if(l)for(var S=0;S<l.length;++S){var R=l[S];if(R.to==null){var w=Yn(s,R.marker);w?u&&(R.to=w.to==null?null:w.to+g):R.to=i}}if(s)for(var K=0;K<s.length;++K){var q=s[K];if(q.to!=null&&(q.to+=g),q.from==null){var fe=Yn(l,q.marker);fe||(q.from=g,u&&(l||(l=[])).push(q))}else q.from+=g,u&&(l||(l=[])).push(q)}l&&(l=Bn(l)),s&&s!=l&&(s=Bn(s));var Re=[l];if(!u){var Ze=t.text.length-2,Fe;if(Ze>0&&l)for(var Xe=0;Xe<l.length;++Xe)l[Xe].to==null&&(Fe||(Fe=[])).push(new Zn(l[Xe].marker,null,null));for(var wt=0;wt<Ze;++wt)Re.push(Fe);Re.push(s)}return Re}function Bn(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 Xr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(w){if(w.markedSpans)for(var K=0;K<w.markedSpans.length;++K){var q=w.markedSpans[K].marker;q.readOnly&&(!n||Ke(n,q)==-1)&&(n||(n=[])).push(q)}}),!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(!(ze(u.to,l.from)<0||ze(u.from,l.to)>0)){var g=[s,1],S=ze(u.from,l.from),R=ze(u.to,l.to);(S<0||!a.inclusiveLeft&&!S)&&g.push({from:u.from,to:l.from}),(R>0||!a.inclusiveRight&&!R)&&g.push({from:l.to,to:u.to}),i.splice.apply(i,g),s+=g.length-3}}return i}function $r(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Br(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Ai(e){return e.inclusiveLeft?-1:0}function zi(e){return e.inclusiveRight?1:0}function xi(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=ze(n.from,i.from)||Ai(e)-Ai(t);if(o)return-o;var a=ze(n.to,i.to)||zi(e)-zi(t);return a||t.id-e.id}function Yr(e,t){var r=tr&&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||xi(n,i.marker)<0)&&(n=i.marker);return n}function _i(e){return Yr(e,!0)}function Hi(e){return Yr(e,!1)}function Vi(e,t){var r=tr&&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||xi(n,o.marker)<0)&&(n=o.marker)}return n}function Ni(e,t,r,n,i){var o=B(e,t),a=tr&&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),g=ze(u.from,r)||Ai(s.marker)-Ai(i),S=ze(u.to,n)||zi(s.marker)-zi(i);if(!(g>=0&&S<=0||g<=0&&S>=0)&&(g<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ze(u.to,r)>=0:ze(u.to,r)>0)||g>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ze(u.from,n)<=0:ze(u.from,n)<0)))return!0}}}function fi(e){for(var t;t=_i(e);)e=t.find(-1,!0).line;return e}function _o(e){for(var t;t=Hi(e);)e=t.find(1,!0).line;return e}function Co(e){for(var t,r;t=Hi(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function qi(e,t){var r=B(e,t),n=fi(r);return r==n?t:Ce(n)}function Ro(e,t){if(t>e.lastLine())return t;var r=B(e,t),n;if(!Ii(e,r))return t;for(;n=Hi(r);)r=n.find(1,!0).line;return Ce(r)+1}function Ii(e,t){var r=tr&&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&&uo(e,t,n))return!0}}}function uo(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return uo(e,n.line,Yn(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)&&uo(e,t,i))return!0}function Ri(e){e=fi(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 Gi(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=_i(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Hi(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 eo(e){var t=e.display,r=e.doc;t.maxLine=B(r,r.first),t.maxLineLength=Gi(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Gi(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var $i=function(e,t,r){this.text=e,Br(this,t),this.height=r?r(this):1};$i.prototype.lineNo=function(){return Ce(this)},Jt($i);function Fo(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),$r(e),Br(e,r);var i=n?n(e):1;i!=e.height&&et(e,i)}function Lo(e){e.parent=null,$r(e)}var xo={},Xi={};function To(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Xi:xo;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Eo(e,t){var r=j("span",null,null,m?"padding-right: .1px":null),n={pre:j("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=v,Pi(e.display.measure)&&(a=Rt(o,e.doc.direction))&&(n.addToken=M(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&Ce(o);J(o,n,Vn(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(Ci(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(m){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 Yt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=qe(n.pre.className,n.textClass||"")),n}function d(e){var t=N("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function v(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?D(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,g;if(!s.test(t))e.col+=t.length,g=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,g),b&&O<9&&(u=!0),e.pos+=t.length;else{g=document.createDocumentFragment();for(var S=0;;){s.lastIndex=S;var R=s.exec(t),w=R?R.index-S:t.length-S;if(w){var K=document.createTextNode(l.slice(S,S+w));b&&O<9?g.appendChild(N("span",[K])):g.appendChild(K),e.map.push(e.pos,e.pos+w,K),e.col+=w,e.pos+=w}if(!R)break;S+=w+1;var q=void 0;if(R[0]==" "){var fe=e.cm.options.tabSize,Re=fe-e.col%fe;q=g.appendChild(N("span",Ee(Re),"cm-tab")),q.setAttribute("role","presentation"),q.setAttribute("cm-text"," "),e.col+=Re}else R[0]=="\r"||R[0]==`
`?(q=g.appendChild(N("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),q.setAttribute("cm-text",R[0]),e.col+=1):(q=e.cm.options.specialCharPlaceholder(R[0]),q.setAttribute("cm-text",R[0]),b&&O<9?g.appendChild(N("span",[q])):g.appendChild(q),e.col+=1);e.map.push(e.pos,e.pos+1,q),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var Ze=r||"";n&&(Ze+=n),i&&(Ze+=i);var Fe=N("span",[g],Ze,o);if(a)for(var Xe in a)a.hasOwnProperty(Xe)&&Xe!="style"&&Xe!="class"&&Fe.setAttribute(Xe,a[Xe]);return e.content.appendChild(Fe)}e.content.appendChild(g)}}function D(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 M(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,g=u+n.length;;){for(var S=void 0,R=0;R<t.length&&(S=t[R],!(S.to>u&&S.from<=u));R++);if(S.to>=g)return e(r,n,i,o,a,l,s);e(r,n.slice(0,S.to-u),i,o,null,l,s),o=null,n=n.slice(S.to-u),u=S.to}}}function G(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 J(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]),To(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,g="",S,R,w=0,K,q,fe,Re,Ze;;){if(w==s){K=q=fe=R="",Ze=null,Re=null,w=1/0;for(var Fe=[],Xe=void 0,wt=0;wt<n.length;++wt){var gt=n[wt],nn=gt.marker;if(nn.type=="bookmark"&&gt.from==s&&nn.widgetNode)Fe.push(nn);else if(gt.from<=s&&(gt.to==null||gt.to>s||nn.collapsed&&gt.to==s&&gt.from==s)){if(gt.to!=null&&gt.to!=s&&w>gt.to&&(w=gt.to,q=""),nn.className&&(K+=" "+nn.className),nn.css&&(R=(R?R+";":"")+nn.css),nn.startStyle&&gt.from==s&&(fe+=" "+nn.startStyle),nn.endStyle&&gt.to==w&&(Xe||(Xe=[])).push(nn.endStyle,gt.to),nn.title&&((Ze||(Ze={})).title=nn.title),nn.attributes)for(var _n in nn.attributes)(Ze||(Ze={}))[_n]=nn.attributes[_n];nn.collapsed&&(!Re||xi(Re.marker,nn)<0)&&(Re=gt)}else gt.from>s&&w>gt.from&&(w=gt.from)}if(Xe)for(var Ar=0;Ar<Xe.length;Ar+=2)Xe[Ar+1]==w&&(q+=" "+Xe[Ar]);if(!Re||Re.from==s)for(var ur=0;ur<Fe.length;++ur)G(t,0,Fe[ur]);if(Re&&(Re.from||0)==s){if(G(t,(Re.to==null?l+1:Re.to)-s,Re.marker,Re.from==null),Re.to==null)return;Re.to==s&&(Re=!1)}}if(s>=l)break;for(var Oi=Math.min(l,w);;){if(g){var mi=s+g.length;if(!Re){var Mr=mi>Oi?g.slice(0,Oi-s):g;t.addToken(t,Mr,S?S+K:K,fe,s+Mr.length==w?q:"",R,Ze)}if(mi>=Oi){g=g.slice(Oi-s),s=Oi;break}s=mi,fe=""}g=i.slice(o,o=r[u++]),S=To(r[u++],t.cm.options)}}}function ve(e,t,r){this.line=t,this.rest=Co(t),this.size=this.rest?Ce(de(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ii(e,t)}function Me(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new ve(e.doc,B(e.doc,o),o);i=o+a.size,n.push(a)}return n}var Ae=null;function ie(e){Ae?Ae.ops.push(e):e.ownsGroup=Ae={ops:[e],delayedCallbacks:[]}}function ae(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 le(e,t){var r=e.ownsGroup;if(r)try{ae(r)}finally{Ae=null,t(r)}}var je=null;function se(e,t){var r=Ge(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ae?i=Ae.delayedCallbacks:je?i=je:(i=je=[],setTimeout(st,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function st(){var e=je;je=null;for(var t=0;t<e.length;++t)e[t]()}function $t(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Bt(e,t):o=="gutter"?an(e,t,r,n):o=="class"?pn(e,t):o=="widget"&&Lt(e,t,n)}t.changes=null}function Wt(e){return e.node==e.text&&(e.node=N("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),b&&O<8&&(e.node.style.zIndex=2)),e.node}function zt(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=Wt(t);t.background=n.insertBefore(N("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ft(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Eo(e,t)}function Bt(e,t){var r=t.text.className,n=Ft(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,pn(e,t)):r&&(t.text.className=r)}function pn(e,t){zt(e,t),t.line.wrapClass?Wt(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 an(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=Wt(t);t.gutterBackground=N("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=Wt(t),l=t.gutter=N("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(N("div",Vt(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,g=o.hasOwnProperty(u)&&o[u];g&&l.appendChild(N("div",[g],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Lt(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);en(e,t,r)}function qt(e,t,r,n){var i=Ft(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),pn(e,t),an(e,t,r,n),en(e,t,n),t.node}function en(e,t,r){if(gn(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)gn(e,t.rest[n],t,r,!1)}function gn(e,t,r,n,i){if(t.widgets)for(var o=Wt(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=N("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),tn(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),se(s,"redraw")}}function tn(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 fn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!ke(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;"),Q(t.display.measure,N("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Fn(e,t){for(var r=Si(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 mn(e){return e.lineSpace.offsetTop}function yn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function bn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Q(e.measure,N("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 St(e){return It-e.display.nativeBarWidth}function Tt(e){return e.display.scroller.clientWidth-St(e)-e.display.barWidth}function Kt(e){return e.display.scroller.clientHeight-St(e)-e.display.barHeight}function un(e,t,r){var n=e.options.lineWrapping,i=n&&Tt(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 zr(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(Ce(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Er(e,t){t=fi(t);var r=Ce(t),n=e.display.externalMeasured=new ve(e.doc,t,r);n.lineN=r;var i=n.built=Eo(e,n);return n.text=i.pre,Q(e.display.lineMeasure,i.pre),n}function lr(e,t,r,n){return Qn(e,ln(e,t),r,n)}function wr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[gr(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function ln(e,t){var r=Ce(t),n=wr(e,r);n&&!n.text?n=null:n&&n.changes&&($t(e,n,r,hi(e)),e.curOp.forceUpdate=!0),n||(n=Er(e,t));var i=zr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Qn(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||(un(e,t.view,t.rect),t.hasHeights=!0),a=Gt(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 Qr={left:0,right:0,top:0,bottom:0};function Zt(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 ft(e,t){var r=Qr;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 Gt(e,t,r,n){var i=Zt(t.map,r,n),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var g=0;g<4;g++){for(;a&&bt(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&bt(t.line.text.charAt(i.coverStart+l));)++l;if(b&&O<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=ft(te(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}b&&O<11&&(u=Ln(e.display.measure,u))}else{a>0&&(s=n="right");var S;e.options.lineWrapping&&(S=o.getClientRects()).length>1?u=S[n=="right"?S.length-1:0]:u=o.getBoundingClientRect()}if(b&&O<9&&!a&&(!u||!u.left&&!u.right)){var R=o.parentNode.getClientRects()[0];R?u={left:R.left,right:R.left+ei(e.display),top:R.top,bottom:R.bottom}:u=Qr}for(var w=u.top-t.rect.top,K=u.bottom-t.rect.top,q=(w+K)/2,fe=t.view.measure.heights,Re=0;Re<fe.length-1&&!(q<fe[Re]);Re++);var Ze=Re?fe[Re-1]:0,Fe=fe[Re],Xe={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:Ze,bottom:Fe};return!u.left&&!u.right&&(Xe.bogus=!0),e.options.singleCursorHeightPerLine||(Xe.rtop=w,Xe.rbottom=K),Xe}function Ln(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!We(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 Cn(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 dn(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Cn(e.display.view[t])}function jt(e){dn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Nn(){return V&&Oe?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function nr(){return V&&Oe?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Jn(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=fn(e.widgets[r]));return t}function cr(e,t,r,n,i){if(!i){var o=Jn(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Ri(t);if(n=="local"?a+=mn(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(n=="window"?0:nr());var s=l.left+(n=="window"?0:Nn());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function qn(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=Nn(),i-=nr();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 sr(e,t,r,n,i){return n||(n=B(e.doc,t.line)),cr(e,n,lr(e,n,t.ch,i),r)}function Dn(e,t,r,n,i,o){n=n||B(e.doc,t.line),i||(i=ln(e,n));function a(K,q){var fe=Qn(e,i,K,q?"right":"left",o);return q?fe.left=fe.right:fe.right=fe.left,cr(e,n,fe,r)}var l=Rt(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 g(K,q,fe){var Re=l[q],Ze=Re.level==1;return a(fe?K-1:K,Ze!=fe)}var S=it(l,s,u),R=ye,w=g(s,S,u=="before");return R!=null&&(w.other=g(s,R,u!="before")),w}function jn(e,t){var r=0;t=Ne(e.doc,t),e.options.lineWrapping||(r=ei(e.display)*t.ch);var n=B(e.doc,t.line),i=Ri(n)+mn(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Zr(e,t,r,n,i){var o=U(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Jr(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return Zr(n.first,0,null,-1,-1);var i=Te(n,r),o=n.first+n.size-1;if(i>o)return Zr(n.first+n.size-1,B(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=B(n,i);;){var l=Or(e,a,i,t,r),s=Vi(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=B(n,i=u.line)}}function qr(e,t,r,n){n-=Jn(t);var i=t.text.length,o=De(function(a){return Qn(e,r,a-1).bottom<=n},i,0);return i=De(function(a){return Qn(e,r,a).top>n},o,i),{begin:o,end:i}}function vr(e,t,r,n){r||(r=ln(e,t));var i=cr(e,t,Qn(e,r,n),"line").top;return qr(e,t,r,i)}function $n(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Or(e,t,r,n,i){i-=Ri(t);var o=ln(e,t),a=Jn(t),l=0,s=t.text.length,u=!0,g=Rt(t,e.doc.direction);if(g){var S=(e.options.lineWrapping?Tr:di)(e,t,r,o,g,n,i);u=S.level!=1,l=u?S.from:S.to-1,s=u?S.to:S.from-1}var R=null,w=null,K=De(function(wt){var gt=Qn(e,o,wt);return gt.top+=a,gt.bottom+=a,$n(gt,n,i,!1)?(gt.top<=i&&gt.left<=n&&(R=wt,w=gt),!0):!1},l,s),q,fe,Re=!1;if(w){var Ze=n-w.left<w.right-n,Fe=Ze==u;K=R+(Fe?0:1),fe=Fe?"after":"before",q=Ze?w.left:w.right}else{!u&&(K==s||K==l)&&K++,fe=K==0?"after":K==t.text.length?"before":Qn(e,o,K-(u?1:0)).bottom+a<=i==u?"after":"before";var Xe=Dn(e,U(r,K,fe),"line",t,o);q=Xe.left,Re=i<Xe.top?-1:i>=Xe.bottom?1:0}return K=lt(t.text,K,1),Zr(r,K,fe,Re,n-q)}function di(e,t,r,n,i,o,a){var l=De(function(S){var R=i[S],w=R.level!=1;return $n(Dn(e,U(r,w?R.to:R.from,w?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,g=Dn(e,U(r,u?s.from:s.to,u?"after":"before"),"line",t,n);$n(g,o,a,!0)&&g.top>a&&(s=i[l-1])}return s}function Tr(e,t,r,n,i,o,a){var l=qr(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var g=null,S=null,R=0;R<i.length;R++){var w=i[R];if(!(w.from>=u||w.to<=s)){var K=w.level!=1,q=Qn(e,n,K?Math.min(u,w.to)-1:Math.max(s,w.from)).right,fe=q<o?o-q+1e9:q-o;(!g||S>fe)&&(g=w,S=fe)}}return g||(g=i[i.length-1]),g.from<s&&(g={from:s,to:g.to,level:g.level}),g.to>u&&(g={from:g.from,to:u,level:g.level}),g}var rr;function pr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(rr==null){rr=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rr.appendChild(document.createTextNode("x")),rr.appendChild(N("br"));rr.appendChild(document.createTextNode("x"))}Q(e.measure,rr);var r=rr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),T(e.measure),r||1}function ei(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),r=N("pre",[t],"CodeMirror-line-like");Q(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function hi(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:Wi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Wi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Bi(e){var t=pr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/ei(e.display)-3);return function(i){if(Ii(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 ti(e){var t=e.doc,r=Bi(e);t.iter(function(n){var i=r(n);i!=n.height&&et(n,i)})}function vi(e,t,r,n){var i=e.display;if(!r&&Si(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(S){return null}var s=Jr(e,o,a),u;if(n&&s.xRel>0&&(u=B(e.doc,s.line).text).length==s.ch){var g=at(u,u.length,e.options.tabSize)-u.length;s=U(s.line,Math.max(0,Math.round((o-bn(e.display).left)/ei(e.display))-g))}return s}function gr(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 mr(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)tr&&qi(e.doc,t)<i.viewTo&&Dr(e);else if(r<=i.viewFrom)tr&&Ro(e.doc,r+n)>i.viewFrom?Dr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Dr(e);else if(t<=i.viewFrom){var o=Fi(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Dr(e)}else if(r>=i.viewTo){var a=Fi(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Dr(e)}else{var l=Fi(e,t,t,-1),s=Fi(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(Me(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Dr(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function ni(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[gr(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);Ke(a,r)==-1&&a.push(r)}}}function Dr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fi(e,t,r,n){var i=gr(e,t),o,a=e.display.view;if(!tr||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(;qi(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 Yi(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Me(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Me(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(gr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Me(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,gr(e,r)))),n.viewTo=r}function to(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 Ei(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Zi(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)&&kt(e,l.head,i),s||nt(e,l,o)}}return n}function kt(e,t,r){var n=Dn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(N("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(N("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 pe(e,t){return e.top-t.top||e.left-t.left}function nt(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=bn(e.display),l=a.left,s=Math.max(n.sizerWidth,Tt(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function g(Fe,Xe,wt,gt){Xe<0&&(Xe=0),Xe=Math.round(Xe),gt=Math.round(gt),o.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+Fe+`px;
top: `+Xe+"px; width: "+(wt==null?s-Fe:wt)+`px;
height: `+(gt-Xe)+"px"))}function S(Fe,Xe,wt){var gt=B(i,Fe),nn=gt.text.length,_n,Ar;function ur(Mr,yi){return sr(e,U(Fe,Mr),"div",gt,yi)}function Oi(Mr,yi,Wr){var Pr=vr(e,gt,null,Mr),Ir=yi=="ltr"==(Wr=="after")?"left":"right",fr=Wr=="after"?Pr.begin:Pr.end-(/\s/.test(gt.text.charAt(Pr.end-1))?2:1);return ur(fr,Ir)[Ir]}var mi=Rt(gt,i.direction);return ht(mi,Xe||0,wt==null?nn:wt,function(Mr,yi,Wr,Pr){var Ir=Wr=="ltr",fr=ur(Mr,Ir?"left":"right"),bi=ur(yi-1,Ir?"right":"left"),jo=Xe==null&&Mr==0,So=wt==null&&yi==nn,Kr=Pr==0,Ji=!mi||Pr==mi.length-1;if(bi.top-fr.top<=3){var Nr=(u?jo:So)&&Kr,Ja=(u?So:jo)&&Ji,so=Nr?l:(Ir?fr:bi).left,Mo=Ja?s:(Ir?bi:fr).right;g(so,fr.top,Mo-so,fr.bottom)}else{var Io,ai,ko,qa;Ir?(Io=u&&jo&&Kr?l:fr.left,ai=u?s:Oi(Mr,Wr,"before"),ko=u?l:Oi(yi,Wr,"after"),qa=u&&So&&Ji?s:bi.right):(Io=u?Oi(Mr,Wr,"before"):l,ai=!u&&jo&&Kr?s:fr.right,ko=!u&&So&&Ji?l:bi.left,qa=u?Oi(yi,Wr,"after"):s),g(Io,fr.top,ai-Io,fr.bottom),fr.bottom<bi.top&&g(l,fr.bottom,null,bi.top),g(ko,bi.top,qa-ko,bi.bottom)}(!_n||pe(fr,_n)<0)&&(_n=fr),pe(bi,_n)<0&&(_n=bi),(!Ar||pe(fr,Ar)<0)&&(Ar=fr),pe(bi,Ar)<0&&(Ar=bi)}),{start:_n,end:Ar}}var R=t.from(),w=t.to();if(R.line==w.line)S(R.line,R.ch,w.ch);else{var K=B(i,R.line),q=B(i,w.line),fe=fi(K)==fi(q),Re=S(R.line,R.ch,fe?K.text.length+1:null).end,Ze=S(w.line,fe?0:null,w.ch).start;fe&&(Re.top<Ze.top-2?(g(Re.right,Re.top,null,Re.bottom),g(l,Ze.top,Ze.left,Ze.bottom)):g(Re.right,Re.top,Ze.left-Re.right,Re.bottom)),Re.bottom<Ze.top&&g(l,Re.bottom,null,Ze.top)}r.appendChild(o)}function ot(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()||ri(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Et(e){e.state.focused||(e.display.input.focus(),Kn(e))}function Un(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ri(e))},100)}function Kn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Yt(e,"focus",e,t),e.state.focused=!0,tt(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),m&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ot(e))}function ri(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Yt(e,"blur",e,t),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function pi(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(b&&O<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 g=i.line.height-a;if((g>.005||g<-.005)&&(et(i.line,a),Ui(i.line),i.rest))for(var S=0;S<i.rest.length;S++)Ui(i.rest[S]);if(l>e.display.sizerWidth){var R=Math.ceil(l/ei(e.display));R>e.display.maxLineLength&&(e.display.maxLineLength=R,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ui(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 yr(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-mn(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=Te(t,n),a=Te(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=Te(t,Ri(B(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=Te(t,Ri(B(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Qi(e,t){if(!Qt(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&&!Le){var o=N("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-mn(e.display))+`px;
height: `+(t.bottom-t.top+St(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 Do(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?U(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?U(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Dn(e,t),s=!r||r==t?l:Dn(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=Po(e,i),g=e.doc.scrollTop,S=e.doc.scrollLeft;if(u.scrollTop!=null&&(Oo(e,u.scrollTop),Math.abs(e.doc.scrollTop-g)>1&&(a=!0)),u.scrollLeft!=null&&(no(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-S)>1&&(a=!0)),!a)break}return i}function Vo(e,t){var r=Po(e,t);r.scrollTop!=null&&Oo(e,r.scrollTop),r.scrollLeft!=null&&no(e,r.scrollLeft)}function Po(e,t){var r=e.display,n=pr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=Kt(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+yn(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 g=Math.min(t.top,(u?l:t.bottom)-o);g!=i&&(a.scrollTop=g)}var S=e.options.fixedGutter?0:r.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-S,w=Tt(e)-r.gutters.offsetWidth,K=t.right-t.left>w;return K&&(t.right=t.left+w),t.left<10?a.scrollLeft=0:t.left<R?a.scrollLeft=Math.max(0,t.left+S-(K?0:10)):t.right>w+R-3&&(a.scrollLeft=t.right+(K?0:10)-w),a}function Ki(e,t){t!=null&&(Ao(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ii(e){Ao(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function wo(e,t,r){(t!=null||r!=null)&&Ao(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function co(e,t){Ao(e),e.curOp.scrollToPos=t}function Ao(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=jn(e,t.from),n=jn(e,t.to);fa(e,r,n,t.margin)}}function fa(e,t,r,n){var i=Po(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});wo(e,i.scrollLeft,i.scrollTop)}function Oo(e,t){Math.abs(e.doc.scrollTop-t)<2||(L||Pa(e,{top:t}),da(e,t,!0),L&&Pa(e),wi(e,100))}function da(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 no(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,tl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function fo(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+yn(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+St(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var ro=function(e,t,r){this.cm=r;var n=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),oe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),oe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&O<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ro.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}},ro.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ro.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ro.prototype.zeroWidthHack=function(){var e=k&&!ue?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ue,this.disableVert=new Ue},ro.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)},ro.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ho=function(){};ho.prototype.update=function(){return{bottom:0,right:0}},ho.prototype.setScrollLeft=function(){},ho.prototype.setScrollTop=function(){},ho.prototype.clear=function(){};function io(e,t){t||(t=fo(e));var r=e.display.barWidth,n=e.display.barHeight;ha(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&pi(e),ha(e,fo(e)),r=e.display.barWidth,n=e.display.barHeight}function ha(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 Go={native:ro,null:ho};function va(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Go[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),oe(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"?no(e,t):Oo(e,t)},e),e.display.scrollbars.addClass&&tt(e.display.wrapper,e.display.scrollbars.addClass)}var Ta=0;function oo(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:++Ta},ie(e.curOp)}function ao(e){var t=e.curOp;t&&le(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;pa(r)})}function pa(e){for(var t=e.ops,r=0;r<t.length;r++)Xo(t[r]);for(var n=0;n<t.length;n++)hn(t[n]);for(var i=0;i<t.length;i++)Xt(t[i]);for(var o=0;o<t.length;o++)Hr(t[o]);for(var a=0;a<t.length;a++)oi(t[a])}function Xo(e){var t=e.cm,r=t.display;ga(t),e.updateMaxLine&&eo(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 Li(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function hn(e){e.updatedDisplay=e.mustUpdate&&Da(e.cm,e.update)}function Xt(e){var t=e.cm,r=t.display;e.updatedDisplay&&pi(t),e.barMeasure=fo(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=lr(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+St(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Tt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Hr(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&no(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==ge();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&io(t,e.barMeasure),e.updatedDisplay&&Na(t,e.barMeasure),e.selectionChanged&&ot(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Et(e.cm)}function oi(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&el(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&da(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&no(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Do(t,Ne(n,e.scrollToPos.from),Ne(n,e.scrollToPos.to),e.scrollToPos.margin);Qi(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||Yt(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Yt(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Yt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function wn(e,t){if(e.curOp)return t();oo(e);try{return t()}finally{ao(e)}}function Tn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);oo(e);try{return t.apply(e,arguments)}finally{ao(e)}}}function kn(e){return function(){if(this.curOp)return e.apply(this,arguments);oo(this);try{return e.apply(this,arguments)}finally{ao(this)}}}function ir(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);oo(t);try{return e.apply(this,arguments)}finally{ao(t)}}}function wi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,mt(vo,e))}function vo(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Wn(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?F(t.mode,n.state):null,s=Sr(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,g=s.classes;g?o.styleClasses=g:u&&(o.styleClasses=null);for(var S=!a||a.length!=o.styles.length||u!=g&&(!u||!g||u.bgClass!=g.bgClass||u.textClass!=g.textClass),R=0;!S&&R<a.length;++R)S=a[R]!=o.styles[R];S&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Rr(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return wi(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&wn(e,function(){for(var o=0;o<i.length;o++)ni(e,i[o],"text")})}}var Li=function(e,t,r){var n=e.display;this.viewport=t,this.visible=yr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Tt(e),this.force=r,this.dims=hi(e),this.events=[]};Li.prototype.signal=function(e,t){Be(e,t)&&this.events.push(arguments)},Li.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Yt.apply(null,this.events[e])};function ga(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=St(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=St(e)+"px",t.scrollbarsClipped=!0)}function os(e){if(e.hasFocus())return null;var t=ge();if(!t||!ke(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&ke(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==ge())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&ke(document.body,e.anchorNode)&&ke(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 Da(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Dr(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&&to(e)==0)return!1;nl(e)&&(Dr(e),t.dims=hi(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)),tr&&(o=qi(e.doc,o),a=Ro(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Yi(e,o,a),r.viewOffset=Ri(B(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=to(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),T(r.cursorDiv),T(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,wi(e,400)),r.updateLineNumbers=null,!0}function el(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Tt(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+yn(e.display)-Kt(e),r.top)}),t.visible=yr(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=yr(e.display,e.doc,r));if(!Da(e,t))break;pi(e);var i=fo(e);Ei(e),io(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 Pa(e,t){var r=new Li(e,t);if(Da(e,r)){pi(e),el(e,r);var n=fo(e);Ei(e),io(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(K){var q=K.nextSibling;return m&&k&&e.display.currentWheelTarget==K?K.style.display="none":K.parentNode.removeChild(K),q}for(var s=n.view,u=n.viewFrom,g=0;g<s.length;g++){var S=s[g];if(!S.hidden)if(!S.node||S.node.parentNode!=o){var R=qt(e,S,u,r);o.insertBefore(R,a)}else{for(;a!=S.node;)a=l(a);var w=i&&t!=null&&t<=u&&S.lineNumber;S.changes&&(Ke(S.changes,"gutter")>-1&&(w=!1),$t(e,S,u,r)),w&&(T(S.lineNumber),S.lineNumber.appendChild(document.createTextNode(Vt(e.options,u)))),a=S.node.nextSibling}u+=S.size}for(;a;)a=l(a)}function Aa(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+St(e)+"px"}function tl(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=Wi(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 nl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Vt(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(N("div",[N("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",Aa(e.display),!0}return!1}function $a(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 rl(e){var t=e.gutters,r=e.gutterSpecs;T(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(N("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",Aa(e)}function Yo(e){rl(e.display),mr(e),tl(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=j("div",null,"CodeMirror-code"),i.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=N("div",null,"CodeMirror-cursors"),i.measure=N("div",null,"CodeMirror-measure"),i.lineMeasure=N("div",null,"CodeMirror-measure"),i.lineSpace=j("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=j("div",[i.lineSpace],"CodeMirror-lines");i.mover=N("div",[o],null,"position: relative"),i.sizer=N("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=N("div",null,null,"position: absolute; height: "+It+"px; width: 1px;"),i.gutters=N("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=N("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=N("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),b&&O<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!m&&!(L&&Se)&&(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=$a(n.gutters,n.lineNumbers),rl(i),r.init(i)}var ma=0,Ti=null;b?Ti=-.53:L?Ti=15:V?Ti=-.7:xe&&(Ti=-1/3);function il(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=il(e);return t.x*=Ti,t.y*=Ti,t}function ol(e,t){var r=il(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&&k&&m){e:for(var u=t.target,g=o.view;u!=a;u=u.parentNode)for(var S=0;S<g.length;S++)if(g[S].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!L&&!h&&Ti!=null){i&&s&&Oo(e,Math.max(0,a.scrollTop+i*Ti)),no(e,Math.max(0,a.scrollLeft+n*Ti)),(!i||i&&s)&&Ht(t),o.wheelStartX=null;return}if(i&&Ti!=null){var R=i*Ti,w=e.doc.scrollTop,K=w+o.wrapper.clientHeight;R<0?w=Math.max(0,w+R-50):K=Math.min(e.doc.height,K+R+50),Pa(e,{top:w,bottom:K})}ma<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 q=a.scrollLeft-o.wheelStartX,fe=a.scrollTop-o.wheelStartY,Re=fe&&o.wheelDY&&fe/o.wheelDY||q&&o.wheelDX&&q/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Re&&(Ti=(Ti*ma+Re)/(ma+1),++ma)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Di=function(e,t){this.ranges=e,this.primIndex=t};Di.prototype.primary=function(){return this.ranges[this.primIndex]},Di.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(!rn(r.anchor,n.anchor)||!rn(r.head,n.head))return!1}return!0},Di.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Pn(xn(this.ranges[t].anchor),xn(this.ranges[t].head));return new Di(e,this.primIndex)},Di.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Di.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ze(t,n.from())>=0&&ze(e,n.to())<=0)return r}return-1};var Pn=function(e,t){this.anchor=e,this.head=t};Pn.prototype.from=function(){return xt(this.anchor,this.head)},Pn.prototype.to=function(){return Pt(this.anchor,this.head)},Pn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ji(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(R,w){return ze(R.from(),w.from())}),r=Ke(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=ze(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=xt(l.from(),a.from()),g=Pt(l.to(),a.to()),S=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new Pn(S?g:u,S?u:g))}}return new Di(t,r)}function po(e,t){return new Di([new Pn(e,t||e)],0)}function go(e){return e.text?U(e.from.line+e.text.length-1,de(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function al(e,t){if(ze(e,t.from)<0)return e;if(ze(e,t.to)<=0)return go(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+=go(t).ch-t.to.ch),U(r,n)}function Ba(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new Pn(al(i.anchor,t),al(i.head,t)))}return ji(e.cm,r,e.sel.primIndex)}function ll(e,t,r){return e.line==t.line?U(r.line,e.ch-t.ch+r.ch):U(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=U(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=ll(l.from,i,o),u=ll(go(l),i,o);if(i=l.to,o=u,r=="around"){var g=e.sel.ranges[a],S=ze(g.head,g.anchor)<0;n[a]=new Pn(S?u:s,S?s:u)}else n[a]=new Pn(s,s)}return new Di(n,e.sel.primIndex)}function za(e){e.doc.mode=pt(e.options,e.doc.modeOption),Qo(e)}function Qo(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,wi(e,100),e.state.modeGen++,e.curOp&&mr(e)}function sl(e,t){return t.from.ch==0&&t.to.ch==0&&de(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ha(e,t,r,n){function i(Ze){return r?r[Ze]:null}function o(Ze,Fe,Xe){Fo(Ze,Fe,Xe,n),se(Ze,"change",Ze,t)}function a(Ze,Fe){for(var Xe=[],wt=Ze;wt<Fe;++wt)Xe.push(new $i(u[wt],i(wt),n));return Xe}var l=t.from,s=t.to,u=t.text,g=B(e,l.line),S=B(e,s.line),R=de(u),w=i(u.length-1),K=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(sl(e,t)){var q=a(0,u.length-1);o(S,S.text,w),K&&e.remove(l.line,K),q.length&&e.insert(l.line,q)}else if(g==S)if(u.length==1)o(g,g.text.slice(0,l.ch)+R+g.text.slice(s.ch),w);else{var fe=a(1,u.length-1);fe.push(new $i(R+g.text.slice(s.ch),w,n)),o(g,g.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,fe)}else if(u.length==1)o(g,g.text.slice(0,l.ch)+u[0]+S.text.slice(s.ch),i(0)),e.remove(l.line+1,K);else{o(g,g.text.slice(0,l.ch)+u[0],i(0)),o(S,R+S.text.slice(s.ch),w);var Re=a(1,u.length-1);K>1&&e.remove(l.line+1,K-1),e.insert(l.line+1,Re)}se(e,"change",e,t)}function mo(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 ul(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ti(e),za(e),cl(e),e.options.lineWrapping||eo(e),e.options.mode=t.modeOption,mr(e)}function cl(e){(e.doc.direction=="rtl"?tt:C)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){wn(e,function(){cl(e),mr(e)})}function ya(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 Wa(e,t){var r={from:xn(t.from),to:go(t),text:$e(e,t.from,t.to)};return hl(e,r,t.from.line,t.to.line+1),mo(e,function(n){return hl(n,r,t.from.line,t.to.line+1)},!0),r}function fl(e){for(;e.length;){var t=de(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return fl(e.done),de(e.done);if(e.done.length&&!de(e.done).ranges)return de(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),de(e.done)}function dl(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=de(a.changes),ze(t.from,t.to)==0&&ze(t.from,l.to)==0?l.to=go(t):a.changes.push(Wa(e,t));else{var s=de(i.done);for((!s||!s.ranges)&&ba(e.sel,i.done),a={changes:[Wa(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||Yt(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,de(i.done),t))?i.done[i.done.length-1]=t:ba(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&fl(i.undone)}function ba(e,t){var r=de(t);r&&r.ranges&&r.equals(e)||t.push(e)}function hl(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 vl(e,t){var r=gs(e,t),n=ci(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 No(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?Di.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],g=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var S in u)(g=S.match(/^spans_(\d+)$/))&&Ke(t,Number(g[1]))>-1&&(de(l)[S]=u[S],delete u[S])}}return n}function Za(e,t,r,n){if(n){var i=e.anchor;if(r){var o=ze(t,i)<0;o!=ze(r,i)<0?(i=t,t=r):o!=ze(t,r)<0&&(t=r)}return new Pn(i,t)}else return new Pn(r||t,t)}function Sa(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ur(e,new Di([Za(e.sel.primary(),t,r,i)],0),n)}function pl(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]=Za(e.sel.ranges[o],t[o],null,i);var a=ji(e.cm,n,e.sel.primIndex);Ur(e,a,r)}function Ua(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Ur(e,ji(e.cm,i,e.sel.primIndex),n)}function gl(e,t,r,n){Ur(e,po(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 Pn(Ne(e,i[o].anchor),Ne(e,i[o].head))},origin:r&&r.origin};return Yt(e,"beforeSelectionChange",e,n),e.cm&&Yt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?ji(e.cm,n.ranges,n.ranges.length-1):t}function ml(e,t,r){var n=e.history.done,i=de(n);i&&i.ranges?(n[n.length-1]=t,Ca(e,t,r)):Ur(e,t,r)}function Ur(e,t,r){Ca(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Ca(e,t,r){(Be(e,"beforeSelectionChange")||e.cm&&Be(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(ze(t.primary().head,e.sel.primary().head)<0?-1:1);yl(e,Sl(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&ii(e.cm)}function yl(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,vt(e.cm)),se(e,"cursorActivity",e))}function bl(e){yl(e,Sl(e,e.sel,null,!1))}function Sl(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=xa(e,a.anchor,l&&l.anchor,r,n),u=xa(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 Pn(s,u))}return i?ji(e.cm,i,t.primIndex):t}function $o(e,t,r,n,i){var o=B(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,g="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(g?l.to>=t.ch:l.to>t.ch))){if(i&&(Yt(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var S=s.find(n<0?1:-1),R=void 0;if((n<0?g:u)&&(S=Cl(e,S,-n,S&&S.line==t.line?o:null)),S&&S.line==t.line&&(R=ze(S,r))&&(n<0?R<0:R>0))return $o(e,S,t,n,i)}var w=s.find(n<0?-1:1);return(n<0?u:g)&&(w=Cl(e,w,n,w.line==t.line?o:null)),w?$o(e,w,t,n,i):null}}return t}function xa(e,t,r,n,i){var o=n||1,a=$o(e,t,r,o,i)||!i&&$o(e,t,r,o,!0)||$o(e,t,r,-o,i)||!i&&$o(e,t,r,-o,!0);return a||(e.cantEdit=!0,U(e.first,0))}function Cl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?Ne(e,U(t.line-1)):null:r>0&&t.ch==(n||B(e,t.line)).text.length?t.line<e.first+e.size-1?U(t.line+1,0):null:new U(t.line,t.ch+r)}function xl(e){e.setSelection(U(e.firstLine(),0),U(e.lastLine()),Ve)}function El(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=Ne(e,i)),o&&(n.to=Ne(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),Yt(e,"beforeChange",e,n),e.cm&&Yt(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 Bo(e,t,r){if(e.cm){if(!e.cm.curOp)return Tn(e.cm,Bo)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((Be(e,"beforeChange")||e.cm&&Be(e.cm,"beforeChange"))&&(t=El(e,t,!0),!t))){var n=Xn&&!r&&Xr(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)wl(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else wl(e,t)}}function wl(e,t){if(!(t.text.length==1&&t.text[0]==""&&ze(t.from,t.to)==0)){var r=Ba(e,t);dl(e,t,r,e.cm?e.cm.curOp.id:NaN),Jo(e,t,r,ci(e,t));var n=[];mo(e,function(i,o){!o&&Ke(n,i.history)==-1&&(Rl(i.history,t),n.push(i.history)),Jo(i,t,null,ci(i,t))})}}function Ea(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(ba(o,s),r&&!o.equals(e.sel)){Ur(e,o,{clearRedo:!1});return}a=o}else if(n){l.push(o);return}else break;var g=[];ba(a,s),s.push({changes:g,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var S=Be(e,"beforeChange")||e.cm&&Be(e.cm,"beforeChange"),R=function(q){var fe=o.changes[q];if(fe.origin=t,S&&!El(e,fe,!1))return l.length=0,{};g.push(Wa(e,fe));var Re=q?Ba(e,fe):de(l);Jo(e,fe,Re,vl(e,fe)),!q&&e.cm&&e.cm.scrollIntoView({from:fe.from,to:go(fe)});var Ze=[];mo(e,function(Fe,Xe){!Xe&&Ke(Ze,Fe.history)==-1&&(Rl(Fe.history,fe),Ze.push(Fe.history)),Jo(Fe,fe,null,vl(Fe,fe))})},w=o.changes.length-1;w>=0;--w){var K=R(w);if(K)return K.v}}}}function Ol(e,t){if(t!=0&&(e.first+=t,e.sel=new Di(He(e.sel.ranges,function(i){return new Pn(U(i.anchor.line+t,i.anchor.ch),U(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){mr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)ni(e.cm,n,"gutter")}}function Jo(e,t,r,n){if(e.cm&&!e.cm.curOp)return Tn(e.cm,Jo)(e,t,r,n);if(t.to.line<e.first){Ol(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);Ol(e,i),t={from:U(e.first,0),to:U(t.to.line+i,t.to.ch),text:[de(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:U(o,B(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=$e(e,t.from,t.to),r||(r=Ba(e,t)),e.cm?ys(e.cm,t,n):Ha(e,t,n),Ca(e,r,Ve),e.cantEdit&&xa(e,U(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=Ce(fi(B(n,o.line))),n.iter(s,a.line+1,function(w){if(w==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&vt(e),Ha(n,t,r,Bi(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(w){var K=Gi(w);K>i.maxLineLength&&(i.maxLine=w,i.maxLineLength=K,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Gn(n,o.line),wi(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?mr(e):o.line==a.line&&t.text.length==1&&!sl(e.doc,t)?ni(e,o.line,"text"):mr(e,o.line,a.line+1,u);var g=Be(e,"changes"),S=Be(e,"change");if(S||g){var R={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};S&&se(e,"change",e,R),g&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function zo(e,t,r,n,i){var o;n||(n=r),ze(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Bo(e,{from:r,to:n,text:t,origin:i})}function Ml(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Il(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++)Ml(o.ranges[l].anchor,t,r,n),Ml(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=U(u.from.line+n,u.from.ch),u.to=U(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 Rl(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Il(e.done,r,n,i),Il(e.undone,r,n,i)}function qo(e,t,r,n){var i=t,o=t;return typeof t=="number"?o=B(e,On(e,t)):i=Ce(t),i==null?null:(n(o,i)&&e.cm&&ni(e.cm,i,r),o)}function ea(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}ea.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,Lo(i),se(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 ta(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}ta.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 ea))){var l=[];this.collapse(l),this.children=[new ea(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 ea(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 ta(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=Ke(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ta(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 na=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};na.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=Ce(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=fn(this);et(r,Math.max(0,r.height-o)),e&&(wn(e,function(){Fl(e,r,-o),ni(e,n,"widget")}),se(e,"lineWidgetCleared",e,this,n))}},na.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=fn(this)-t;i&&(Ii(this.doc,n)||et(n,n.height+i),r&&wn(r,function(){r.curOp.forceUpdate=!0,Fl(r,n,i),se(r,"lineWidgetChanged",r,e,Ce(n))}))},Jt(na);function Fl(e,t,r){Ri(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ki(e,r)}function bs(e,t,r,n){var i=new na(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),qo(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&&!Ii(e,a)){var s=Ri(a)<e.scrollTop;et(a,a.height+fn(i)),s&&Ki(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&se(o,"lineWidgetAdded",o,i,typeof t=="number"?t:Ce(t)),i}var Ll=0,yo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ll};yo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&oo(e),Be(this,"clear")){var r=this.find();r&&se(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=Yn(a.markedSpans,this);e&&!this.collapsed?ni(e,Ce(a),"text"):e&&(l.to!=null&&(i=Ce(a)),l.from!=null&&(n=Ce(a))),a.markedSpans=Lr(a.markedSpans,l),l.from==null&&this.collapsed&&!Ii(this.doc,a)&&e&&et(a,pr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=fi(this.lines[s]),g=Gi(u);g>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=g,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&mr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&bl(e.doc)),e&&se(e,"markerCleared",e,this,n,i),t&&ao(e),this.parent&&this.parent.clear()}},yo.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=Yn(o.markedSpans,this);if(a.from!=null&&(r=U(t?o:Ce(o),a.from),e==-1))return r;if(a.to!=null&&(n=U(t?o:Ce(o),a.to),e==1))return n}return r&&{from:r,to:n}},yo.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||wn(n,function(){var i=t.line,o=Ce(t.line),a=wr(n,o);if(a&&(Cn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ii(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=fn(r)-l;s&&et(i,i.height+s)}se(n,"markerChanged",n,e)})},yo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Ke(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},yo.prototype.detachLine=function(e){if(this.lines.splice(Ke(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Jt(yo);function Ho(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Tn(e.cm,Ho)(e,t,r,n,i);var o=new yo(e,i),a=ze(t,r);if(n&&yt(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=j("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ni(e,t.line,t,r,o)||t.line!=r.line&&Ni(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");En()}o.addToHistory&&dl(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(S){s&&o.collapsed&&!s.options.lineWrapping&&fi(S)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&et(S,0),ui(S,new Zn(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(S){Ii(e,S)&&et(S,0)}),o.clearOnEnter&&oe(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(hr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Ll,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)mr(s,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var g=t.line;g<=r.line;g++)ni(s,g,"text");o.atomic&&bl(s.doc),se(s,"markerAdded",s,o)}return o}var ra=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};ra.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();se(this,"clear")}},ra.prototype.find=function(e,t){return this.primary.find(e,t)},Jt(ra);function Ss(e,t,r,n,i){n=yt(n),n.shared=!1;var o=[Ho(e,t,r,n,i)],a=o[0],l=n.widgetNode;return mo(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Ho(s,Ne(s,t),Ne(s,r),n,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=de(o)}),new ra(o,a)}function Tl(e){return e.findMarks(U(e.first,0),e.clipPos(U(e.lastLine())),function(t){return t.parent})}function Cs(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(ze(o,a)){var l=Ho(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function xs(e){for(var t=function(n){var i=e[n],o=[i.primary.doc];mo(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];Ke(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var Es=0,gi=function(e,t,r,n,i){if(!(this instanceof gi))return new gi(e,t,r,n,i);r==null&&(r=0),ta.call(this,[new ea([new $i("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=U(r,0);this.sel=po(o),this.history=new ya(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)),Ha(this,{from:o,to:o,text:e}),Ur(this,po(o),Ve)};gi.prototype=Mt(ta.prototype,{constructor:gi,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=Ct(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:ir(function(e){var t=U(this.first,0),r=this.first+this.size-1;Bo(this,{from:t,to:U(r,B(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&wo(this.cm,0,0),Ur(this,po(t),Ve)}),replaceRange:function(e,t,r,n){t=Ne(this,t),r=r?Ne(this,r):t,zo(this,e,t,r,n)},getRange:function(e,t,r){var n=$e(this,Ne(this,e),Ne(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(Pe(this,e))return B(this,e)},getLineNumber:function(e){return Ce(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=B(this,e)),fi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ne(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:ir(function(e,t,r){gl(this,Ne(this,typeof e=="number"?U(e,t||0):e),null,r)}),setSelection:ir(function(e,t,r){gl(this,Ne(this,e),Ne(this,t||e),r)}),extendSelection:ir(function(e,t,r){Sa(this,Ne(this,e),t&&Ne(this,t),r)}),extendSelections:ir(function(e,t){pl(this,on(this,e),t)}),extendSelectionsBy:ir(function(e,t){var r=He(this.sel.ranges,e);pl(this,on(this,r),t)}),setSelections:ir(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new Pn(Ne(this,e[i].anchor),Ne(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Ur(this,ji(this.cm,n,t),r)}}),addSelection:ir(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Pn(Ne(this,e),Ne(this,t||e))),Ur(this,ji(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=$e(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=$e(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:ir(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--)Bo(this,n[s]);l?ml(this,l):this.cm&&ii(this.cm)}),undo:ir(function(){Ea(this,"undo")}),redo:ir(function(){Ea(this,"redo")}),undoSelection:ir(function(){Ea(this,"undo",!0)}),redoSelection:ir(function(){Ea(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 ya(this.history.maxGeneration),mo(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:No(this.history.done),undone:No(this.history.undone)}},setHistory:function(e){var t=this.history=new ya(this.history.maxGeneration);t.done=No(e.done.slice(0),null,!0),t.undone=No(e.undone.slice(0),null,!0)},setGutterMarker:ir(function(e,t,r){return qo(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&H(i)&&(n.gutterMarkers=null),!0})}),clearGutter:ir(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&qo(t,r,"gutter",function(){return r.gutterMarkers[e]=null,H(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Pe(this,e)||(t=e,e=B(this,e),!e))return null}else if(t=Ce(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:ir(function(e,t,r){return qo(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:ir(function(e,t,r){return qo(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:ir(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ho(this,Ne(this,e),Ne(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=Ne(this,e),Ho(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Ne(this,e);var t=[],r=B(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=Ne(this,e),t=Ne(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}),Ne(this,U(r,t))},indexFromPos:function(e){e=Ne(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 gi(Ct(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 gi(Ct(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}],Cs(n,Tl(this)),n},unlinkDoc:function(e){if(e instanceof or&&(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),xs(Tl(this));break}}if(e.history==this.history){var n=[e.id];mo(e,function(i){return n.push(i.id)},!0),e.history=new ya(null),e.history.done=No(this.history.done,n),e.history.undone=No(this.history.undone,n)}},iterLinkedDocs:function(e){mo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):I(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ir(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))})}),gi.prototype.eachLine=gi.prototype.iter;var Dl=0;function ws(e){var t=this;if(Pl(t),!(Qt(t,e)||Fn(t.display,e))){Ht(e),b&&(Dl=+new Date);var r=vi(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&&Tn(t,function(){r=Ne(t.doc,r);var w={from:r,to:r,text:t.doc.splitLines(o.filter(function(K){return K!=null}).join(t.doc.lineSeparator())),origin:"paste"};Bo(t.doc,w),ml(t.doc,po(Ne(t.doc,r),Ne(t.doc,go(w))))})()},s=function(w,K){if(t.options.allowDropFileTypes&&Ke(t.options.allowDropFileTypes,w.type)==-1){l();return}var q=new FileReader;q.onerror=function(){return l()},q.onload=function(){var fe=q.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(fe)){l();return}o[K]=fe,l()},q.readAsText(w)},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 g=e.dataTransfer.getData("Text");if(g){var S;if(t.state.draggingText&&!t.state.draggingText.copy&&(S=t.listSelections()),Ca(t.doc,po(r,r)),S)for(var R=0;R<S.length;++R)zo(t.doc,"",S[R].anchor,S[R].head,"drag");t.replaceSelection(g,"around","paste"),t.display.input.focus()}}catch(w){}}}}function Os(e,t){if(b&&(!e.state.draggingText||+new Date-Dl<100)){kr(t);return}if(!(Qt(e,t)||Fn(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!xe)){var r=N("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}function Ms(e,t){var r=vi(e,t);if(r){var n=document.createDocumentFragment();kt(e,r,n),e.display.dragCursor||(e.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Q(e.display.dragCursor,n)}}function Pl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Al(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 Nl=!1;function Is(){Nl||(Rs(),Nl=!0)}function Rs(){var e;oe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Al(Fs)},100))}),oe(window,"blur",function(){return Al(ri)})}function Fs(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var bo={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"},ia=0;ia<10;ia++)bo[ia+48]=bo[ia+96]=String(ia);for(var wa=65;wa<=90;wa++)bo[wa]=String.fromCharCode(wa);for(var oa=1;oa<=12;oa++)bo[oa+111]=bo[oa+63235]="F"+oa;var lo={};lo.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"},lo.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"},lo.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"},lo.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"]},lo.default=k?lo.macDefault:lo.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 Ts(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=He(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 Wo(e,t,r,n){t=Oa(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 Wo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Wo(e,t.fallthrough[o],r,n);if(a)return a}}}function $l(e){var t=typeof e=="string"?e:bo[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),(ne?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(ne?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function zl(e,t){if(h&&e.keyCode==34&&e.char)return!1;var r=bo[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),Bl(r,e,t))}function Oa(e){return typeof e=="string"?lo[e]:e}function Zo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&ze(o.from,de(n).to)<=0;){var a=n.pop();if(ze(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}wn(e,function(){for(var l=n.length-1;l>=0;l--)zo(e.doc,"",n[l].from,n[l].to,"+delete");ii(e)})}function Ka(e,t,r){var n=lt(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ja(e,t,r){var n=Ka(e,t.ch,r);return n==null?null:new U(t.line,n,r<0?"after":"before")}function ka(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Rt(r,t.doc.direction);if(o){var a=i<0?de(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var g=ln(t,r);u=i<0?r.text.length-1:0;var S=Qn(t,g,u).top;u=De(function(R){return Qn(t,g,R).top==S},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=Ka(r,u,1))}else u=i<0?a.to:a.from;return new U(n,u,s)}}return new U(n,i<0?r.text.length:0,i<0?"before":"after")}function Ds(e,t,r,n){var i=Rt(t,e.doc.direction);if(!i)return ja(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=it(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 ja(t,r,n);var l=function(Re,Ze){return Ka(t,Re instanceof U?Re.ch:Re,Ze)},s,u=function(Re){return e.options.lineWrapping?(s=s||ln(e,t),vr(e,t,s,Re)):{begin:0,end:t.text.length}},g=u(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var S=a.level==1==n<0,R=l(r,S?1:-1);if(R!=null&&(S?R<=a.to&&R<=g.end:R>=a.from&&R>=g.begin)){var w=S?"before":"after";return new U(r.line,R,w)}}var K=function(Re,Ze,Fe){for(var Xe=function(_n,Ar){return Ar?new U(r.line,l(_n,1),"before"):new U(r.line,_n,"after")};Re>=0&&Re<i.length;Re+=Ze){var wt=i[Re],gt=Ze>0==(wt.level!=1),nn=gt?Fe.begin:l(Fe.end,-1);if(wt.from<=nn&&nn<wt.to||(nn=gt?wt.from:l(wt.to,-1),Fe.begin<=nn&&nn<Fe.end))return Xe(nn,gt)}},q=K(o+n,n,g);if(q)return q;var fe=n>0?g.end:l(g.begin,-1);return fe!=null&&!(n>0&&fe==t.text.length)&&(q=K(n>0?0:i.length-1,n,u(fe)),q)?q:null}var aa={selectAll:xl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ve)},killLine:function(e){return Zo(e,function(t){if(t.empty()){var r=B(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:U(t.head.line+1,0)}:{from:t.head,to:U(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Zo(e,function(t){return{from:U(t.from().line,0),to:Ne(e.doc,U(t.to().line+1,0))}})},delLineLeft:function(e){return Zo(e,function(t){return{from:U(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Zo(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 Zo(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(U(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(U(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Hl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Wl(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")},Ye)},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")},Ye)},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/)?Wl(e,t.head):n},Ye)},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=at(e.getLine(o.line),o.ch,n);t.push(Ee(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=B(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new U(i.line,i.ch-1)),i.ch>0)i=new U(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),U(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=B(e.doc,i.line-1).text;a&&(i=new U(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),U(i.line-1,a.length-1),i,"+transpose"))}}r.push(new Pn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return wn(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);ii(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Hl(e,t){var r=B(e.doc,t),n=fi(r);return n!=r&&(t=Ce(n)),ka(!0,e,n,t,1)}function Ps(e,t){var r=B(e.doc,t),n=_o(r);return n!=r&&(t=Ce(n)),ka(!0,e,r,t,-1)}function Wl(e,t){var r=Hl(e,t.line),n=B(e.doc,r.line),i=Rt(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 U(r.line,a?0:o,r.sticky)}return r}function Ma(e,t,r){if(typeof t=="string"&&(t=aa[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)!=At}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=Wo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Wo(t,e.options.extraKeys,r,e)||Wo(t,e.options.keyMap,r,e)}var Ns=new Ue;function la(e,t,r,n){var i=e.state.keySeq;if(i){if($l(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())}),Zl(e,i+" "+t,r,n))return!0}return Zl(e,t,r,n)}function Zl(e,t,r,n){var i=As(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&se(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(Ht(r),ot(e)),!!i}function Ul(e,t){var r=zl(t,!0);return r?t.shiftKey&&!e.state.keySeq?la(e,"Shift-"+r,t,function(n){return Ma(e,n,!0)})||la(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Ma(e,n)}):la(e,r,t,function(n){return Ma(e,n)}):!1}function $s(e,t,r){return la(e,"'"+r+"'",t,function(n){return Ma(e,n,!0)})}var _a=null;function Kl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ge(),!Qt(t,e))){b&&O<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=Ul(t,e);h&&(_a=n?r:null,!n&&r==88&&!_&&(k?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),L&&!k&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bs(t)}}function Bs(e){var t=e.display.lineDiv;tt(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(C(t,"CodeMirror-crosshair"),_t(document,"keyup",r),_t(document,"mouseover",r))}oe(document,"keyup",r),oe(document,"mouseover",r)}function jl(e){e.keyCode==16&&(this.doc.sel.shift=!1),Qt(this,e)}function kl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Fn(t.display,e)||Qt(t,e)||e.ctrlKey&&!e.altKey||k&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(h&&r==_a){_a=null,Ht(e);return}if(!(h&&(!e.which||e.which<10)&&Ul(t,e))){var i=String.fromCharCode(n==null?r:n);i!="\b"&&($s(t,e,i)||t.display.input.onKeyPress(e))}}}var zs=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+zs>e&&ze(t,this.pos)==0&&r==this.button};var sa,ua;function Hs(e,t){var r=+new Date;return ua&&ua.compare(r,e,t)?(sa=ua=null,"triple"):sa&&sa.compare(r,e,t)?(ua=new Va(r,e,t),sa=null,"double"):(sa=new Va(r,e,t),ua=null,"single")}function _l(e){var t=this,r=t.display;if(!(Qt(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,Fn(r,e)){m||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!Ga(t,e)){var n=vi(t,e),i=li(e),o=n?Hs(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Ws(t,i,n,o,e))&&(i==1?n?Us(t,n,o,e):Si(e)==r.scroller&&Ht(e):i==2?(n&&Sa(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(p?t.display.input.onContextMenu(e):Un(t)))}}}function Ws(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,la(e,Bl(o,i),i,function(a){if(typeof a=="string"&&(a=aa[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,r)!=At}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=Je?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=k?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(k?r.altKey:r.ctrlKey)),i}function Us(e,t,r,n){b?setTimeout(mt(Et,e),0):e.curOp.focus=ge();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&Mi&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(ze((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(ze(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=Tn(e,function(u){m&&(i.scroller.draggable=!1),e.state.draggingText=!1,_t(i.wrapper.ownerDocument,"mouseup",a),_t(i.wrapper.ownerDocument,"mousemove",l),_t(i.scroller,"dragstart",s),_t(i.scroller,"drop",a),o||(Ht(u),n.addNew||Sa(e.doc,r,null,null,n.extend),m&&!xe||b&&O==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};m&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),oe(i.wrapper.ownerDocument,"mouseup",a),oe(i.wrapper.ownerDocument,"mousemove",l),oe(i.scroller,"dragstart",s),oe(i.scroller,"drop",a),Un(e),setTimeout(function(){return i.input.focus()},20)}function Vl(e,t,r){if(r=="char")return new Pn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Pn(U(t.line,0),Ne(e.doc,U(t.line+1,0)));var n=r(e,t);return new Pn(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;Ht(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 Pn(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new Pn(r,r)),r=vi(e,t,!0,!0),l=-1;else{var g=Vl(e,r,n.unit);n.extend?a=Za(a,g.anchor,g.head,n.extend):a=g}n.addNew?l==-1?(l=u.length,Ur(o,ji(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(Ur(o,ji(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):Ua(o,l,a,rt):(l=0,Ur(o,new Di([a],0),rt),s=o.sel);var S=r;function R(Fe){if(ze(S,Fe)!=0)if(S=Fe,n.unit=="rectangle"){for(var Xe=[],wt=e.options.tabSize,gt=at(B(o,r.line).text,r.ch,wt),nn=at(B(o,Fe.line).text,Fe.ch,wt),_n=Math.min(gt,nn),Ar=Math.max(gt,nn),ur=Math.min(r.line,Fe.line),Oi=Math.min(e.lastLine(),Math.max(r.line,Fe.line));ur<=Oi;ur++){var mi=B(o,ur).text,Mr=vn(mi,_n,wt);_n==Ar?Xe.push(new Pn(U(ur,Mr),U(ur,Mr))):mi.length>Mr&&Xe.push(new Pn(U(ur,Mr),U(ur,vn(mi,Ar,wt))))}Xe.length||Xe.push(new Pn(r,r)),Ur(o,ji(e,s.ranges.slice(0,l).concat(Xe),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Fe)}else{var yi=a,Wr=Vl(e,Fe,n.unit),Pr=yi.anchor,Ir;ze(Wr.anchor,Pr)>0?(Ir=Wr.head,Pr=xt(yi.from(),Wr.anchor)):(Ir=Wr.anchor,Pr=Pt(yi.to(),Wr.head));var fr=s.ranges.slice(0);fr[l]=ks(e,new Pn(Ne(o,Pr),Ir)),Ur(o,ji(e,fr,l),rt)}}var w=i.wrapper.getBoundingClientRect(),K=0;function q(Fe){var Xe=++K,wt=vi(e,Fe,!0,n.unit=="rectangle");if(wt)if(ze(wt,S)!=0){e.curOp.focus=ge(),R(wt);var gt=yr(i,o);(wt.line>=gt.to||wt.line<gt.from)&&setTimeout(Tn(e,function(){K==Xe&&q(Fe)}),150)}else{var nn=Fe.clientY<w.top?-20:Fe.clientY>w.bottom?20:0;nn&&setTimeout(Tn(e,function(){K==Xe&&(i.scroller.scrollTop+=nn,q(Fe))}),50)}}function fe(Fe){e.state.selectingText=!1,K=1/0,Fe&&(Ht(Fe),i.input.focus()),_t(i.wrapper.ownerDocument,"mousemove",Re),_t(i.wrapper.ownerDocument,"mouseup",Ze),o.history.lastSelOrigin=null}var Re=Tn(e,function(Fe){Fe.buttons===0||!li(Fe)?fe(Fe):q(Fe)}),Ze=Tn(e,fe);e.state.selectingText=Ze,oe(i.wrapper.ownerDocument,"mousemove",Re),oe(i.wrapper.ownerDocument,"mouseup",Ze)}function ks(e,t){var r=t.anchor,n=t.head,i=B(e.doc,r.line);if(ze(r,n)==0&&r.sticky==n.sticky)return t;var o=Rt(i);if(!o)return t;var a=it(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 g=it(o,n.ch,n.sticky),S=g-a||(n.ch-r.ch)*(l.level==1?-1:1);g==s-1||g==s?u=S<0:u=S>0}var R=o[s+(u?-1:0)],w=u==(R.level==1),K=w?R.from:R.to,q=w?"after":"before";return r.ch==K&&r.sticky==q?t:new Pn(new U(r.line,K,q),n)}function Gl(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&&Ht(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Be(e,r))return jr(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 g=Te(e.doc,o),S=e.display.gutterSpecs[s];return Yt(e,r,e,g,S.className,t),jr(t)}}}function Ga(e,t){return Gl(e,t,"gutterClick",!0)}function Xl(e,t){Fn(e.display,t)||_s(e,t)||Qt(e,t,"contextmenu")||p||e.display.input.onContextMenu(t)}function _s(e,t){return Be(e,"gutterContextMenu")?Gl(e,t,"gutterContextMenu",!1):!1}function Yl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jt(e)}var Uo={toString:function(){return"CodeMirror.Init"}},Ql={},Ia={};function Vs(e){var t=e.optionHandlers;function r(n,i,o,a){e.defaults[n]=i,o&&(t[n]=a?function(l,s,u){u!=Uo&&o(l,s,u)}:o)}e.defineOption=r,e.Init=Uo,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,za(n)},!0),r("indentUnit",2,za,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){Qo(n),jt(n),mr(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 g=s.text.indexOf(i,u);if(g==-1)break;u=g+i.length,o.push(U(a,g))}a++});for(var l=o.length-1;l>=0;l--)zo(n.doc,i,o[l],U(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!=Uo&&n.refresh()}),r("specialCharPlaceholder",d,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",Se?"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",!Ot),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Yl(n),Yo(n)},!0),r("keyMap","default",function(n,i,o){var a=Oa(i),l=o!=Uo&&Oa(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=$a(i,n.options.lineNumbers),Yo(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?Wi(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return io(n)},!0),r("scrollbarStyle","native",function(n){va(n),io(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=$a(n.options.gutters,i),Yo(n)},!0),r("firstLineNumber",1,Yo,!0),r("lineNumberFormatter",function(n){return n},Yo,!0),r("showCursorWhenSelecting",!1,Ei,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(ri(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,Gs),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Ei,!0),r("singleCursorHeightPerLine",!0,Ei,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Qo,!0),r("addModeClass",!1,Qo,!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,Qo,!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 Gs(e,t,r){var n=r&&r!=Uo;if(!t!=!n){var i=e.display.dragFunctions,o=t?oe:_t;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?(tt(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),eo(e)),ti(e),mr(e),jt(e),setTimeout(function(){return io(e)},100)}function or(e,t){var r=this;if(!(this instanceof or))return new or(e,t);this.options=t=t?yt(t):{},yt(Ql,t,!1);var n=t.value;typeof n=="string"?n=new gi(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new or.inputStyles[t.inputStyle](this),o=this.display=new ss(e,n,i,t);o.wrapper.CodeMirror=this,Yl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),va(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 Ue,keySeq:null,specialChars:null},t.autofocus&&!Se&&o.input.focus(),b&&O<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Is(),oo(this),this.curOp.forceUpdate=!0,ul(this,n),t.autofocus&&!Se||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Kn(r)},20):ri(this);for(var a in Ia)Ia.hasOwnProperty(a)&&Ia[a](this,t[a],Uo);nl(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Xa.length;++l)Xa[l](this);ao(this),m&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}or.defaults=Ql,or.optionHandlers=Ia;function Ys(e){var t=e.display;oe(t.scroller,"mousedown",Tn(e,_l)),b&&O<11?oe(t.scroller,"dblclick",Tn(e,function(s){if(!Qt(e,s)){var u=vi(e,s);if(!(!u||Ga(e,s)||Fn(e.display,s))){Ht(s);var g=e.findWordAt(u);Sa(e.doc,g.anchor,g.head)}}})):oe(t.scroller,"dblclick",function(s){return Qt(e,s)||Ht(s)}),oe(t.scroller,"contextmenu",function(s){return Xl(e,s)}),oe(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Xl(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 g=u.left-s.left,S=u.top-s.top;return g*g+S*S>20*20}oe(t.scroller,"touchstart",function(s){if(!Qt(e,s)&&!o(s)&&!Ga(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)}}),oe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),oe(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!Fn(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var g=e.coordsChar(t.activeTouch,"page"),S;!u.prev||a(u,u.prev)?S=new Pn(g,g):!u.prev.prev||a(u,u.prev.prev)?S=e.findWordAt(g):S=new Pn(U(g.line,0),Ne(e.doc,U(g.line+1,0))),e.setSelection(S.anchor,S.head),e.focus(),Ht(s)}i()}),oe(t.scroller,"touchcancel",i),oe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Oo(e,t.scroller.scrollTop),no(e,t.scroller.scrollLeft,!0),Yt(e,"scroll",e))}),oe(t.scroller,"mousewheel",function(s){return ol(e,s)}),oe(t.scroller,"DOMMouseScroll",function(s){return ol(e,s)}),oe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Qt(e,s)||kr(s)},over:function(s){Qt(e,s)||(Ms(e,s),kr(s))},start:function(s){return Os(e,s)},drop:Tn(e,ws),leave:function(s){Qt(e,s)||Pl(e)}};var l=t.input.getField();oe(l,"keyup",function(s){return jl.call(e,s)}),oe(l,"keydown",Tn(e,Kl)),oe(l,"keypress",Tn(e,kl)),oe(l,"focus",function(s){return Kn(e,s)}),oe(l,"blur",function(s){return ri(e,s)})}var Xa=[];or.defineInitHook=function(e){return Xa.push(e)};function ca(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=Wn(e,t).state:r="prev");var a=e.options.tabSize,l=B(i,t),s=at(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],g;if(!n&&!/\S/.test(l.text))g=0,r="not";else if(r=="smart"&&(g=i.mode.indent(o,l.text.slice(u.length),l.text),g==At||g>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?g=at(B(i,t-1).text,null,a):g=0:r=="add"?g=s+e.options.indentUnit:r=="subtract"?g=s-e.options.indentUnit:typeof r=="number"&&(g=s+r),g=Math.max(0,g);var S="",R=0;if(e.options.indentWithTabs)for(var w=Math.floor(g/a);w;--w)R+=a,S+=" ";if(R<g&&(S+=Ee(g-R)),S!=u)return zo(i,S,U(t,0),U(t,u.length),"+input"),l.stateAfter=null,!0;for(var K=0;K<i.sel.ranges.length;K++){var q=i.sel.ranges[K];if(q.head.line==t&&q.head.ch<u.length){var fe=U(t,u.length);Ua(i,K,new Pn(fe,fe));break}}}var ki=null;function Ra(e){ki=e}function Ya(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=I(t),u=null;if(l&&n.ranges.length>1)if(ki&&ki.text.join(`
`)==t){if(n.ranges.length%ki.text.length==0){u=[];for(var g=0;g<ki.text.length;g++)u.push(o.splitLines(ki.text[g]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=He(s,function(Re){return[Re]}));for(var S=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var w=n.ranges[R],K=w.from(),q=w.to();w.empty()&&(r&&r>0?K=U(K.line,K.ch-r):e.state.overwrite&&!l?q=U(q.line,Math.min(B(o,q.line).text.length,q.ch+de(s).length)):l&&ki&&ki.lineWise&&ki.text.join(`
`)==s.join(`
`)&&(K=q=U(K.line,0)));var fe={from:K,to:q,text:u?u[R%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Bo(e.doc,fe),se(e,"inputRead",e,fe)}t&&!l&&ql(e,t),ii(e),e.curOp.updateInput<2&&(e.curOp.updateInput=S),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Jl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&wn(t,function(){return Ya(t,r,0,null,"paste")}),!0}function ql(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=ca(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(B(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=ca(e,i.head.line,"smart"));a&&se(e,"electricInput",e,i.head.line)}}}function es(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:U(i,0),head:U(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function ts(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function ns(){var e=N("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=N("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return m?e.style.width="1000px":e.setAttribute("wrap","off"),be&&(e.style.border="1px solid black"),ts(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)&&Tn(this,t[n])(this,i,a),Yt(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"](Oa(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:kn(function(n,i){var o=n.token?n:e.getMode(this.options,n);if(o.startState)throw new Error("Overlays may not be stateful.");me(this.state.overlays,{mode:o,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,mr(this)}),removeOverlay:kn(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++,mr(this);return}}}),indentLine:kn(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Pe(this.doc,n)&&ca(this,n,i,o)}),indentSelection:kn(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&&(ca(this,l.head.line,n,!0),o=l.head.line,a==this.doc.sel.primIndex&&ii(this));else{var s=l.from(),u=l.to(),g=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var S=g;S<o;++S)ca(this,S,n);var R=this.doc.sel.ranges;s.ch==0&&i.length==R.length&&R[a].from().ch>0&&Ua(this.doc,a,new Pn(s,R[a].to()),Ve)}}}),getTokenAt:function(n,i){return dr(this,n,i)},getLineTokens:function(n,i){return dr(this,U(n),i,!0)},getTokenTypeAt:function(n){n=Ne(this.doc,n);var i=Vn(this,B(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 g=s?s.indexOf("overlay "):-1;return g<0?s:g==0?null:s.slice(0,g-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 g=0;g<a._global.length;g++){var S=a._global[g];S.pred(l,this)&&Ke(o,S.val)==-1&&o.push(S.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=On(o,n==null?o.first+o.size-1:n),Wn(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=Ne(this.doc,n):o=n?a.from():a.to(),Dn(this,o,i||"page")},charCoords:function(n,i){return sr(this,Ne(this.doc,n),i||"page")},coordsChar:function(n,i){return n=qn(this,n,i||"page"),Jr(this,n.left,n.top)},lineAtHeight:function(n,i){return n=qn(this,{top:n,left:0},i||"page").top,Te(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=B(this.doc,n)}else l=n;return cr(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Ri(l):0)},defaultTextHeight:function(){return pr(this.display)},defaultCharWidth:function(){return ei(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=Dn(this,Ne(this.doc,n));var u=n.bottom,g=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 S=Math.max(s.wrapper.clientHeight,this.doc.height),R=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>S)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=S&&(u=n.bottom),g+i.offsetWidth>R&&(g=R-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(g=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?g=0:l=="middle"&&(g=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=g+"px"),o&&Vo(this,{left:g,top:u,right:g+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:kn(Kl),triggerOnKeyPress:kn(kl),triggerOnKeyUp:jl,triggerOnMouseDown:kn(_l),execCommand:function(n){if(aa.hasOwnProperty(n))return aa[n].call(null,this)},triggerElectric:kn(function(n){ql(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=Ne(this.doc,n),u=0;u<i&&(s=Qa(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:kn(function(n,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?Qa(o.doc,a.head,n,i,o.options.rtlMoveVisually):n<0?a.from():a.to()},Ye)}),deleteH:kn(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Zo(this,function(l){var s=Qa(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=Ne(this.doc,n),g=0;g<i;++g){var S=Dn(this,u,"div");if(s==null?s=S.left:S.left=s,u=rs(this,S,l,o),u.hitSide)break}return u},moveV:kn(function(n,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(g){if(s)return n<0?g.from():g.to();var S=Dn(o,g.head,"div");g.goalColumn!=null&&(S.left=g.goalColumn),l.push(S.left);var R=rs(o,S,n,i);return i=="page"&&g==a.sel.primary()&&Ki(o,sr(o,R,"div").top-S.top),R},Ye),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=B(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),g=W(u,s)?function(S){return W(S,s)}:/\s/.test(u)?function(S){return/\s/.test(S)}:function(S){return!/\s/.test(S)&&!W(S)};a>0&&g(o.charAt(a-1));)--a;for(;l<o.length&&g(o.charAt(l));)++l}return new Pn(U(n.line,a),U(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?tt(this.display.cursorDiv,"CodeMirror-overwrite"):C(this.display.cursorDiv,"CodeMirror-overwrite"),Yt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ge()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:kn(function(n,i){wo(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-St(this)-this.display.barHeight,width:n.scrollWidth-St(this)-this.display.barWidth,clientHeight:Kt(this),clientWidth:Tt(this)}},scrollIntoView:kn(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:U(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?co(this,n):fa(this,n.from,n.to,n.margin)}),setSize:kn(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&&dn(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){ni(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,Yt(this,"refresh",this)}),operation:function(n){return wn(this,n)},startOperation:function(){return oo(this)},endOperation:function(){return ao(this)},refresh:kn(function(){var n=this.display.cachedTextHeight;mr(this),this.curOp.forceUpdate=!0,jt(this),wo(this,this.doc.scrollLeft,this.doc.scrollTop),Aa(this.display),(n==null||Math.abs(n-pr(this.display))>.5||this.options.lineWrapping)&&ti(this),Yt(this,"refresh",this)}),swapDoc:kn(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ul(this,n),jt(this),this.display.input.reset(),wo(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,se(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}},Jt(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 Qa(e,t,r,n,i){var o=t,a=r,l=B(e,t.line),s=i&&e.direction=="rtl"?-r:r;function u(){var Ze=t.line+s;return Ze<e.first||Ze>=e.first+e.size?!1:(t=new U(Ze,t.ch,t.sticky),l=B(e,Ze))}function g(Ze){var Fe;if(n=="codepoint"){var Xe=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Xe)?Fe=null:Fe=new U(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(Xe>=55296&&Xe<56320?2:1))),-r)}else i?Fe=Ds(e.cm,l,t,r):Fe=ja(l,t,r);if(Fe==null)if(!Ze&&u())t=ka(i,e.cm,l,t.line,s);else return!1;else t=Fe;return!0}if(n=="char"||n=="codepoint")g();else if(n=="column")g(!0);else if(n=="word"||n=="group")for(var S=null,R=n=="group",w=e.cm&&e.cm.getHelper(t,"wordChars"),K=!0;!(r<0&&!g(!K));K=!1){var q=l.text.charAt(t.ch)||`
`,fe=W(q,w)?"w":R&&q==`
`?"n":!R||/\s/.test(q)?null:"p";if(R&&!K&&!fe&&(fe="s"),S&&S!=fe){r<0&&(r=1,g(),t.sticky="after");break}if(fe&&(S=fe),r>0&&!g(!K))break}var Re=xa(e,t,o,a,!0);return rn(o,Re)&&(Re.hitSide=!0),Re}function rs(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*pr(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=Jr(e,o,a),!!u.outside;){if(r<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=r*5}return u}var zn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ue,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};zn.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;ts(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}oe(i,"paste",function(l){!o(l)||Qt(n,l)||Jl(l,n)||O<=11&&setTimeout(Tn(n,function(){return t.updateFromDOM()}),20)}),oe(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),oe(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),oe(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),oe(i,"touchstart",function(){return r.forceCompositionEnd()}),oe(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||Qt(n,l))){if(n.somethingSelected())Ra({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var s=es(n);Ra({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,Ve),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=ki.text.join(`
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var g=ns(),S=g.firstChild;n.display.lineSpace.insertBefore(g,n.display.lineSpace.firstChild),S.value=ki.text.join(`
`);var R=document.activeElement;_e(S),setTimeout(function(){n.display.lineSpace.removeChild(g),R.focus(),R==i&&r.showPrimarySelection()},50)}}oe(i,"copy",a),oe(i,"cut",a)},zn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},zn.prototype.prepareSelection=function(){var e=Zi(this.cm,!1);return e.focus=document.activeElement==this.div,e},zn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},zn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},zn.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=Fa(t,e.anchorNode,e.anchorOffset),a=Fa(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&ze(xt(o,a),n)==0&&ze(Pt(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&is(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&is(t,i);if(!u){var g=l[l.length-1].measure,S=g.maps?g.maps[g.maps.length-1]:g.map;u={node:S[S.length-1],offset:S[S.length-2]-S[S.length-3]}}if(!s||!u){e.removeAllRanges();return}var R=e.rangeCount&&e.getRangeAt(0),w;try{w=te(s.node,s.offset,u.offset,u.node)}catch(K){}w&&(!L&&t.state.focused?(e.collapse(s.node,s.offset),w.collapsed||(e.removeAllRanges(),e.addRange(w))):(e.removeAllRanges(),e.addRange(w)),R&&e.anchorNode==null?e.addRange(R):L&&this.startGracePeriod()),this.rememberSelection()}},zn.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)},zn.prototype.showMultipleSelections=function(e){Q(this.cm.display.cursorDiv,e.cursors),Q(this.cm.display.selectionDiv,e.selection)},zn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},zn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return ke(this.div,t)},zn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},zn.prototype.blur=function(){this.div.blur()},zn.prototype.getField=function(){return this.div},zn.prototype.supportsTouch=function(){return!0},zn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():wn(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)},zn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},zn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(Oe&&V&&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=Fa(t,e.anchorNode,e.anchorOffset),n=Fa(t,e.focusNode,e.focusOffset);r&&n&&wn(t,function(){Ur(t.doc,po(r,n),Ve),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},zn.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=U(n.line-1,B(e.doc,n.line-1).length)),i.ch==B(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=U(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||(o=gr(e,n.line))==0?(a=Ce(t.view[0].line),l=t.view[0].node):(a=Ce(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=gr(e,i.line),u,g;if(s==t.view.length-1?(u=t.viewTo-1,g=t.lineDiv.lastChild):(u=Ce(t.view[s+1].line)-1,g=t.view[s+1].node.previousSibling),!l)return!1;for(var S=e.doc.splitLines(qs(e,l,g,a,u)),R=$e(e.doc,U(a,0),U(u,B(e.doc,u).text.length));S.length>1&&R.length>1;)if(de(S)==de(R))S.pop(),R.pop(),u--;else if(S[0]==R[0])S.shift(),R.shift(),a++;else break;for(var w=0,K=0,q=S[0],fe=R[0],Re=Math.min(q.length,fe.length);w<Re&&q.charCodeAt(w)==fe.charCodeAt(w);)++w;for(var Ze=de(S),Fe=de(R),Xe=Math.min(Ze.length-(S.length==1?w:0),Fe.length-(R.length==1?w:0));K<Xe&&Ze.charCodeAt(Ze.length-K-1)==Fe.charCodeAt(Fe.length-K-1);)++K;if(S.length==1&&R.length==1&&a==n.line)for(;w&&w>n.ch&&Ze.charCodeAt(Ze.length-K-1)==Fe.charCodeAt(Fe.length-K-1);)w--,K++;S[S.length-1]=Ze.slice(0,Ze.length-K).replace(/^\u200b+/,""),S[0]=S[0].slice(w).replace(/\u200b+$/,"");var wt=U(a,w),gt=U(u,R.length?de(R).length-K:0);if(S.length>1||S[0]||ze(wt,gt))return zo(e.doc,S,wt,gt,"+input"),!0},zn.prototype.ensurePolled=function(){this.forceCompositionEnd()},zn.prototype.reset=function(){this.forceCompositionEnd()},zn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},zn.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))},zn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&wn(this.cm,function(){return mr(e.cm)})},zn.prototype.setUneditable=function(e){e.contentEditable="false"},zn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Tn(this.cm,Ya)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},zn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},zn.prototype.onContextMenu=function(){},zn.prototype.resetPosition=function(){},zn.prototype.needsContentAttribute=!0;function is(e,t){var r=wr(e,t.line);if(!r||r.hidden)return null;var n=B(e.doc,t.line),i=zr(r,n,t.line),o=Rt(n,e.doc.direction),a="left";if(o){var l=it(o,t.ch);a=l%2?"right":"left"}var s=Zt(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 Ko(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(w){return function(K){return K.id==w}}function g(){a&&(o+=l,s&&(o+=l),a=s=!1)}function S(w){w&&(g(),o+=w)}function R(w){if(w.nodeType==1){var K=w.getAttribute("cm-text");if(K){S(K);return}var q=w.getAttribute("cm-marker"),fe;if(q){var Re=e.findMarks(U(n,0),U(i+1,0),u(+q));Re.length&&(fe=Re[0].find(0))&&S($e(e.doc,fe.from,fe.to).join(l));return}if(w.getAttribute("contenteditable")=="false")return;var Ze=/^(pre|div|p|li|table|br)$/i.test(w.nodeName);if(!/^br$/i.test(w.nodeName)&&w.textContent.length==0)return;Ze&&g();for(var Fe=0;Fe<w.childNodes.length;Fe++)R(w.childNodes[Fe]);/^(pre|p)$/i.test(w.nodeName)&&(s=!0),Ze&&(a=!0)}else w.nodeType==3&&S(w.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;R(t),t!=r;)t=t.nextSibling,s=!1;return o}function Fa(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Ko(e.clipPos(U(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||!ke(n,t))return Ko(U(Ce(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?de(e.rest):e.line;return Ko(U(Ce(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 g(fe,Re,Ze){for(var Fe=-1;Fe<(u?u.length:0);Fe++)for(var Xe=Fe<0?s.map:u[Fe],wt=0;wt<Xe.length;wt+=3){var gt=Xe[wt+2];if(gt==fe||gt==Re){var nn=Ce(Fe<0?e.line:e.rest[Fe]),_n=Xe[wt]+Ze;return(Ze<0||gt!=fe)&&(_n=Xe[wt+(Ze?1:0)]),U(nn,_n)}}}var S=g(a,l,r);if(S)return Ko(S,i);for(var R=l.nextSibling,w=a?a.nodeValue.length-r:0;R;R=R.nextSibling){if(S=g(R,R.firstChild,0),S)return Ko(U(S.line,S.ch-w),i);w+=R.textContent.length}for(var K=l.previousSibling,q=r;K;K=K.previousSibling){if(S=g(K,K.firstChild,-1),S)return Ko(U(S.line,S.ch+q),i);q+=K.textContent.length}}var br=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ue,this.hasSelection=!1,this.composing=null};br.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),be&&(i.style.width="0px"),oe(i,"input",function(){b&&O>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),oe(i,"paste",function(a){Qt(n,a)||Jl(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!Qt(n,a)){if(n.somethingSelected())Ra({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=es(n);Ra({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,Ve):(r.prevInput="",i.value=l.text.join(`
`),_e(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}oe(i,"cut",o),oe(i,"copy",o),oe(e.scroller,"paste",function(a){if(!(Fn(e,a)||Qt(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)}}),oe(e.lineSpace,"selectstart",function(a){Fn(e,a)||Ht(a)}),oe(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"})}}),oe(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},br.prototype.createField=function(e){this.wrapper=ns(),this.textarea=this.wrapper.firstChild},br.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},br.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Zi(e);if(e.options.moveInputWithCursor){var i=Dn(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},br.prototype.showSelection=function(e){var t=this.cm,r=t.display;Q(r.cursorDiv,e.cursors),Q(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},br.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&&_e(this.textarea),b&&O>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",b&&O>=9&&(this.hasSelection=null))}},br.prototype.getField=function(){return this.textarea},br.prototype.supportsTouch=function(){return!1},br.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Se||ge()!=this.textarea))try{this.textarea.focus()}catch(e){}},br.prototype.blur=function(){this.textarea.blur()},br.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},br.prototype.receivedFocus=function(){this.slowPoll()},br.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},br.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)},br.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Y(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(b&&O>=9&&this.hasSelection===i||k&&/[\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 wn(t,function(){Ya(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},br.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},br.prototype.onKeyPress=function(){b&&O>=9&&(this.hasSelection=null),this.fastPoll()},br.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=vi(r,e),a=n.scroller.scrollTop;if(!o||h)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Tn(r,Ur)(r.doc,po(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+`px;
z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var S;m&&(S=window.scrollY),n.input.focus(),m&&window.scrollTo(null,S),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=w,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(i.selectionStart!=null){var q=r.somethingSelected(),fe="\u200B"+(q?i.value:"");i.value="\u21DA",i.value=fe,t.prevInput=q?"":"\u200B",i.selectionStart=1,i.selectionEnd=fe.length,n.selForContextMenu=r.doc.sel}}function w(){if(t.contextMenuPending==w&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&O<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!b||b&&O<9)&&R();var q=0,fe=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Tn(r,xl)(r):q++<10?n.detectingSelectAll=setTimeout(fe,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(fe,200)}}if(b&&O>=9&&R(),p){kr(e);var K=function(){_t(window,"mouseup",K),setTimeout(w,20)};oe(window,"mouseup",K)}else setTimeout(w,50)},br.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},br.prototype.setUneditable=function(){},br.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?yt(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=ge();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(oe(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&&(_t(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=or(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=_t,e.on=oe,e.wheelEventPixels=us,e.Doc=gi,e.splitLines=I,e.countColumn=at,e.findColumn=vn,e.isWordChar=P,e.Pass=At,e.signal=Yt,e.Line=$i,e.changeEnd=go,e.scrollbarModel=Go,e.Pos=U,e.cmpPos=ze,e.modes=we,e.mimeModes=Ie,e.resolveMode=Ut,e.getMode=pt,e.modeExtensions=Qe,e.extendMode=y,e.copyState=F,e.startState=A,e.innerMode=$,e.commands=aa,e.keyMap=lo,e.keyName=zl,e.isModifierKey=$l,e.lookupKey=Wo,e.normalizeKeyMap=Ts,e.StringStream=Z,e.SharedTextMarker=ra,e.TextMarker=yo,e.LineWidget=na,e.e_preventDefault=Ht,e.e_stopPropagation=er,e.e_stop=kr,e.addClass=tt,e.contains=ke,e.rmClass=C,e.keyNames=bo}Vs(or),Qs(or);var ru="iter insert remove copy getEditor constructor".split(" ");for(var La in gi.prototype)gi.prototype.hasOwnProperty(La)&&Ke(ru,La)<0&&(or.prototype[La]=function(e){return function(){return e.apply(this.doc,arguments)}}(gi.prototype[La]));return Jt(gi),or.inputStyles={textarea:br,contenteditable:zn},or.defineMode=function(e){!or.defaults.mode&&e!="null"&&(or.defaults.mode=e),ct.apply(this,arguments)},or.defineMIME=Dt,or.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),or.defineMIME("text/plain","null"),or.defineExtension=function(e,t){or.prototype[e]=t},or.defineDocExtension=function(e,t){gi.prototype[e]=t},or.fromTextArea=tu,nu(or),or.version="5.58.2",or})},67656:function(sn,he,f){"use strict";f.r(he),f.d(he,{BaseInput:function(){return h},default:function(){return Ot}});var L=f(87462),x=f(1413),E=f(4942),z=f(71002),b=f(94184),O=f.n(b),m=f(67294),ce=f(87887),V=function(ne){var p,c,C=ne.inputElement,T=ne.prefixCls,Q=ne.prefix,N=ne.suffix,j=ne.addonBefore,te=ne.addonAfter,ke=ne.className,ge=ne.style,tt=ne.disabled,qe=ne.readOnly,_e=ne.focused,mt=ne.triggerFocus,yt=ne.allowClear,at=ne.value,Ue=ne.handleReset,Ke=ne.hidden,It=ne.classes,At=ne.classNames,Ve=ne.dataAttrs,rt=ne.styles,Ye=ne.components,vn=(Ye==null?void 0:Ye.affixWrapper)||"span",Hn=(Ye==null?void 0:Ye.groupWrapper)||"span",Ee=(Ye==null?void 0:Ye.wrapper)||"span",de=(Ye==null?void 0:Ye.groupAddon)||"span",He=(0,m.useRef)(null),me=function(ye){var it;(it=He.current)!==null&&it!==void 0&&it.contains(ye.target)&&(mt==null||mt())},ut=function(){var ye;if(!yt)return null;var it=!tt&&!qe&&at,In="".concat(T,"-clear-icon"),Rt=(0,z.Z)(yt)==="object"&&yt!==null&&yt!==void 0&&yt.clearIcon?yt.clearIcon:"\u2716";return m.createElement("span",{onClick:Ue,onMouseDown:function(oe){return oe.preventDefault()},className:O()(In,(ye={},(0,E.Z)(ye,"".concat(In,"-hidden"),!it),(0,E.Z)(ye,"".concat(In,"-has-suffix"),!!N),ye)),role:"button",tabIndex:-1},Rt)},Mt=(0,m.cloneElement)(C,{value:at,hidden:Ke,className:O()((p=C.props)===null||p===void 0?void 0:p.className,!(0,ce.X3)(ne)&&!(0,ce.He)(ne)&&ke)||null,style:(0,x.Z)((0,x.Z)({},(c=C.props)===null||c===void 0?void 0:c.style),!(0,ce.X3)(ne)&&!(0,ce.He)(ne)?ge:{})});if((0,ce.X3)(ne)){var dt,P="".concat(T,"-affix-wrapper"),W=O()(P,(dt={},(0,E.Z)(dt,"".concat(P,"-disabled"),tt),(0,E.Z)(dt,"".concat(P,"-focused"),_e),(0,E.Z)(dt,"".concat(P,"-readonly"),qe),(0,E.Z)(dt,"".concat(P,"-input-with-clear-btn"),N&&yt&&at),dt),!(0,ce.He)(ne)&&ke,It==null?void 0:It.affixWrapper,At==null?void 0:At.affixWrapper),H=(N||yt)&&m.createElement("span",{className:O()("".concat(T,"-suffix"),At==null?void 0:At.suffix),style:rt==null?void 0:rt.suffix},ut(),N);Mt=m.createElement(vn,(0,L.Z)({className:W,style:(0,x.Z)((0,x.Z)({},(0,ce.He)(ne)?void 0:ge),rt==null?void 0:rt.affixWrapper),hidden:!(0,ce.He)(ne)&&Ke,onClick:me},Ve==null?void 0:Ve.affixWrapper,{ref:He}),Q&&m.createElement("span",{className:O()("".concat(T,"-prefix"),At==null?void 0:At.prefix),style:rt==null?void 0:rt.prefix},Q),(0,m.cloneElement)(C,{value:at,hidden:null}),H)}if((0,ce.He)(ne)){var re="".concat(T,"-group"),bt="".concat(re,"-addon"),lt=O()("".concat(T,"-wrapper"),re,It==null?void 0:It.wrapper),De=O()("".concat(T,"-group-wrapper"),ke,It==null?void 0:It.group);return m.createElement(Hn,{className:De,style:ge,hidden:Ke},m.createElement(Ee,{className:lt},j&&m.createElement(de,{className:bt},j),(0,m.cloneElement)(Mt,{hidden:null}),te&&m.createElement(de,{className:bt},te)))}return Mt},h=V,xe=f(74902),ue=f(97685),Le=f(45987),be=f(21770),Oe=f(98423),Se=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],k=(0,m.forwardRef)(function(ee,ne){var p=ee.autoComplete,c=ee.onChange,C=ee.onFocus,T=ee.onBlur,Q=ee.onPressEnter,N=ee.onKeyDown,j=ee.prefixCls,te=j===void 0?"rc-input":j,ke=ee.disabled,ge=ee.htmlSize,tt=ee.className,qe=ee.maxLength,_e=ee.suffix,mt=ee.showCount,yt=ee.type,at=yt===void 0?"text":yt,Ue=ee.classes,Ke=ee.classNames,It=ee.styles,At=(0,Le.Z)(ee,Se),Ve=(0,be.Z)(ee.defaultValue,{value:ee.value}),rt=(0,ue.Z)(Ve,2),Ye=rt[0],vn=rt[1],Hn=(0,m.useState)(!1),Ee=(0,ue.Z)(Hn,2),de=Ee[0],He=Ee[1],me=(0,m.useRef)(null),ut=function(De){me.current&&(0,ce.nH)(me.current,De)};(0,m.useImperativeHandle)(ne,function(){return{focus:ut,blur:function(){var De;(De=me.current)===null||De===void 0||De.blur()},setSelectionRange:function(De,ht,ye){var it;(it=me.current)===null||it===void 0||it.setSelectionRange(De,ht,ye)},select:function(){var De;(De=me.current)===null||De===void 0||De.select()},input:me.current}}),(0,m.useEffect)(function(){He(function(lt){return lt&&ke?!1:lt})},[ke]);var Mt=function(De){ee.value===void 0&&vn(De.target.value),me.current&&(0,ce.rJ)(me.current,De,c)},dt=function(De){Q&&De.key==="Enter"&&Q(De),N==null||N(De)},P=function(De){He(!0),C==null||C(De)},W=function(De){He(!1),T==null||T(De)},H=function(De){vn(""),ut(),me.current&&(0,ce.rJ)(me.current,De,c)},re=function(){var De=(0,Oe.Z)(ee,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return m.createElement("input",(0,L.Z)({autoComplete:p},De,{onChange:Mt,onFocus:P,onBlur:W,onKeyDown:dt,className:O()(te,(0,E.Z)({},"".concat(te,"-disabled"),ke),Ke==null?void 0:Ke.input),style:It==null?void 0:It.input,ref:me,size:ge,type:at}))},bt=function(){var De=Number(qe)>0;if(_e||mt){var ht=(0,ce.D7)(Ye),ye=(0,xe.Z)(ht).length,it=(0,z.Z)(mt)==="object"?mt.formatter({value:ht,count:ye,maxLength:qe}):"".concat(ye).concat(De?" / ".concat(qe):"");return m.createElement(m.Fragment,null,!!mt&&m.createElement("span",{className:O()("".concat(te,"-show-count-suffix"),(0,E.Z)({},"".concat(te,"-show-count-has-suffix"),!!_e),Ke==null?void 0:Ke.count),style:(0,x.Z)({},It==null?void 0:It.count)},it),_e)}return null};return m.createElement(h,(0,L.Z)({},At,{prefixCls:te,className:tt,inputElement:re(),handleReset:H,value:(0,ce.D7)(Ye),focused:de,triggerFocus:ut,suffix:bt(),disabled:ke,classes:Ue,classNames:Ke,styles:It}))}),Je=k,Ot=Je},87887:function(sn,he,f){"use strict";f.d(he,{D7:function(){return b},He:function(){return L},X3:function(){return x},nH:function(){return z},rJ:function(){return E}});function L(O){return!!(O.addonBefore||O.addonAfter)}function x(O){return!!(O.prefix||O.suffix||O.allowClear)}function E(O,m,ce,V){if(ce){var h=m;if(m.type==="click"){var xe=O.cloneNode(!0);h=Object.create(m,{target:{value:xe},currentTarget:{value:xe}}),xe.value="",ce(h);return}if(V!==void 0){h=Object.create(m,{target:{value:O},currentTarget:{value:O}}),O.value=V,ce(h);return}ce(h)}}function z(O,m){if(O){O.focus(m);var ce=m||{},V=ce.cursor;if(V){var h=O.value.length;switch(V){case"start":O.setSelectionRange(0,0);break;case"end":O.setSelectionRange(h,h);break;default:O.setSelectionRange(0,h)}}}}function b(O){return typeof O=="undefined"||O===null?"":String(O)}},66680:function(sn,he,f){"use strict";f.d(he,{Z:function(){return x}});var L=f(67294);function x(E){var z=L.useRef();z.current=E;var b=L.useCallback(function(){for(var O,m=arguments.length,ce=new Array(m),V=0;V<m;V++)ce[V]=arguments[V];return(O=z.current)===null||O===void 0?void 0:O.call.apply(O,[z].concat(ce))},[]);return b}},21770:function(sn,he,f){"use strict";f.d(he,{Z:function(){return O}});var L=f(97685),x=f(66680),E=f(8410),z=f(63896);function b(m){return m!==void 0}function O(m,ce){var V=ce||{},h=V.defaultValue,xe=V.value,ue=V.onChange,Le=V.postState,be=(0,z.Z)(function(){return b(xe)?xe:b(h)?typeof h=="function"?h():h:typeof m=="function"?m():m}),Oe=(0,L.Z)(be,2),Se=Oe[0],k=Oe[1],Je=xe!==void 0?xe:Se,Ot=Le?Le(Je):Je,ee=(0,x.Z)(ue),ne=(0,z.Z)([Je]),p=(0,L.Z)(ne,2),c=p[0],C=p[1];(0,E.o)(function(){var Q=c[0];Se!==Q&&ee(Se,Q)},[c]),(0,E.o)(function(){b(xe)||k(xe)},[xe]);var T=(0,x.Z)(function(Q,N){k(Q,N),C([Je],N)});return[Ot,T]}},98423:function(sn,he,f){"use strict";f.d(he,{Z:function(){return x}});var L=f(1413);function x(E,z){var b=(0,L.Z)({},E);return Array.isArray(z)&&z.forEach(function(O){delete b[O]}),b}},73299:function(sn,he,f){"use strict";f.d(he,{Z:function(){return Pi}});var L=f(87462),x=f(1413),E=f(71002),z=f(97685),b=f(4942),O=f(45987),m=f(67294),ce=f(73935),V=f(94184),h=f.n(V),xe=f(48555),ue=m.forwardRef(function(I,Y){var _=I.height,X=I.offsetY,We=I.offsetX,we=I.children,Ie=I.prefixCls,ct=I.onInnerResize,Dt=I.innerProps,Ut=I.rtl,pt=I.extra,Qe={},y={display:"flex",flexDirection:"column"};if(X!==void 0){var F;Qe={height:_,position:"relative",overflow:"hidden"},y=(0,x.Z)((0,x.Z)({},y),{},(F={transform:"translateY(".concat(X,"px)")},(0,b.Z)(F,Ut?"marginRight":"marginLeft",-We),(0,b.Z)(F,"position","absolute"),(0,b.Z)(F,"left",0),(0,b.Z)(F,"right",0),(0,b.Z)(F,"top",0),F))}return m.createElement("div",{style:Qe},m.createElement(xe.Z,{onResize:function(A){var Z=A.offsetHeight;Z&&ct&&ct()}},m.createElement("div",(0,L.Z)({style:y,className:h()((0,b.Z)({},"".concat(Ie,"-holder-inner"),Ie)),ref:Y},Dt),we,pt)))});ue.displayName="Filler";var Le=ue,be=function(Y){return+setTimeout(Y,16)},Oe=function(Y){return clearTimeout(Y)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(be=function(Y){return window.requestAnimationFrame(Y)},Oe=function(Y){return window.cancelAnimationFrame(Y)});var Se=0,k=new Map;function Je(I){k.delete(I)}var Ot=function(Y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Se+=1;var X=Se;function We(we){if(we===0)Je(X),Y();else{var Ie=be(function(){We(we-1)});k.set(X,Ie)}}return We(_),X};Ot.cancel=function(I){var Y=k.get(I);return Je(Y),Oe(Y)};var ee=Ot;function ne(I,Y){var _="touches"in I?I.touches[0]:I;return _[Y?"pageX":"pageY"]}var p=m.forwardRef(function(I,Y){var _,X=I.prefixCls,We=I.rtl,we=I.scrollOffset,Ie=I.scrollRange,ct=I.onStartMove,Dt=I.onStopMove,Ut=I.onScroll,pt=I.horizontal,Qe=I.spinSize,y=I.containerSize,F=I.style,$=I.thumbStyle,A=m.useState(!1),Z=(0,z.Z)(A,2),B=Z[0],$e=Z[1],Ct=m.useState(null),et=(0,z.Z)(Ct,2),Ce=et[0],Te=et[1],Pe=m.useState(null),Vt=(0,z.Z)(Pe,2),U=Vt[0],ze=Vt[1],rn=!We,xn=m.useRef(),Pt=m.useRef(),xt=m.useState(!1),On=(0,z.Z)(xt,2),Ne=On[0],cn=On[1],on=m.useRef(),Rn=function(){clearTimeout(on.current),cn(!0),on.current=setTimeout(function(){cn(!1)},3e3)},Sn=Ie-y||0,Sr=y-Qe||0,Vn=Sn>0,Wn=m.useMemo(function(){if(we===0||Sn===0)return 0;var Gn=we/Sn;return Gn*Sr},[we,Sn,Sr]),Rr=function(Xn){Xn.stopPropagation(),Xn.preventDefault()},Fr=m.useRef({top:Wn,dragging:B,pageY:Ce,startTop:U});Fr.current={top:Wn,dragging:B,pageY:Ce,startTop:U};var An=function(Xn){$e(!0),Te(ne(Xn,pt)),ze(Fr.current.top),ct(),Xn.stopPropagation(),Xn.preventDefault()};m.useEffect(function(){var Gn=function(En){En.preventDefault()},Xn=xn.current,tr=Pt.current;return Xn.addEventListener("touchstart",Gn),tr.addEventListener("touchstart",An),function(){Xn.removeEventListener("touchstart",Gn),tr.removeEventListener("touchstart",An)}},[]);var Cr=m.useRef();Cr.current=Sn;var dr=m.useRef();dr.current=Sr,m.useEffect(function(){if(B){var Gn,Xn=function(En){var Zn=Fr.current,Yn=Zn.dragging,Lr=Zn.pageY,ui=Zn.startTop;if(ee.cancel(Gn),Yn){var Vr=ne(En,pt)-Lr,Gr=ui;!rn&&pt?Gr-=Vr:Gr+=Vr;var ci=Cr.current,Bn=dr.current,Xr=Bn?Gr/Bn:0,$r=Math.ceil(Xr*ci);$r=Math.max($r,0),$r=Math.min($r,ci),Gn=ee(function(){Ut($r,pt)})}},tr=function(){$e(!1),Dt()};return window.addEventListener("mousemove",Xn),window.addEventListener("touchmove",Xn),window.addEventListener("mouseup",tr),window.addEventListener("touchend",tr),function(){window.removeEventListener("mousemove",Xn),window.removeEventListener("touchmove",Xn),window.removeEventListener("mouseup",tr),window.removeEventListener("touchend",tr),ee.cancel(Gn)}}},[B]),m.useEffect(function(){Rn()},[we]),m.useImperativeHandle(Y,function(){return{delayHidden:Rn}});var xr="".concat(X,"-scrollbar"),Mn={position:"absolute",visibility:Ne&&Vn?null:"hidden"},ar={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return pt?(Mn.height=8,Mn.left=0,Mn.right=0,Mn.bottom=0,ar.height="100%",ar.width=Qe,rn?ar.left=Wn:ar.right=Wn):(Mn.width=8,Mn.top=0,Mn.bottom=0,rn?Mn.right=0:Mn.left=0,ar.width="100%",ar.height=Qe,ar.top=Wn),m.createElement("div",{ref:xn,className:h()(xr,(_={},(0,b.Z)(_,"".concat(xr,"-horizontal"),pt),(0,b.Z)(_,"".concat(xr,"-vertical"),!pt),(0,b.Z)(_,"".concat(xr,"-visible"),Ne),_)),style:(0,x.Z)((0,x.Z)({},Mn),F),onMouseDown:Rr,onMouseMove:Rn},m.createElement("div",{ref:Pt,className:h()("".concat(xr,"-thumb"),(0,b.Z)({},"".concat(xr,"-thumb-moving"),B)),style:(0,x.Z)((0,x.Z)({},ar),$),onMouseDown:An}))}),c=p;function C(I){var Y=I.children,_=I.setRef,X=m.useCallback(function(We){_(We)},[]);return m.cloneElement(Y,{ref:X})}function T(I,Y,_,X,We,we,Ie){var ct=Ie.getKey;return I.slice(Y,_+1).map(function(Dt,Ut){var pt=Y+Ut,Qe=we(Dt,pt,{style:{width:X}}),y=ct(Dt);return m.createElement(C,{key:y,setRef:function($){return We(Dt,$)}},Qe)})}function Q(I){return I instanceof HTMLElement||I instanceof SVGElement}function N(I){return Q(I)?I:I instanceof m.Component?ce.findDOMNode(I):null}var j=f(15671),te=f(43144),ke=function(){function I(){(0,j.Z)(this,I),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,te.Z)(I,[{key:"set",value:function(_,X){this.maps[_]=X,this.id+=1}},{key:"get",value:function(_){return this.maps[_]}}]),I}(),ge=ke;function tt(I,Y,_){var X=m.useState(0),We=(0,z.Z)(X,2),we=We[0],Ie=We[1],ct=(0,m.useRef)(new Map),Dt=(0,m.useRef)(new ge),Ut=(0,m.useRef)();function pt(){ee.cancel(Ut.current)}function Qe(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;pt();var $=function(){ct.current.forEach(function(Z,B){if(Z&&Z.offsetParent){var $e=N(Z),Ct=$e.offsetHeight;Dt.current.get(B)!==Ct&&Dt.current.set(B,$e.offsetHeight)}}),Ie(function(Z){return Z+1})};F?$():Ut.current=ee($)}function y(F,$){var A=I(F),Z=ct.current.get(A);$?(ct.current.set(A,$),Qe()):ct.current.delete(A),!Z!=!$&&($?Y==null||Y(F):_==null||_(F))}return(0,m.useEffect)(function(){return pt},[]),[y,Qe,Dt.current,we]}function qe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var _e=qe()?m.useLayoutEffect:m.useEffect,mt=function(Y,_){var X=m.useRef(!0);_e(function(){return Y(X.current)},_),_e(function(){return X.current=!1,function(){X.current=!0}},[])},yt=function(Y,_){mt(function(X){if(!X)return Y()},_)},at=mt;function Ue(I){var Y=m.useRef();Y.current=I;var _=m.useCallback(function(){for(var X,We=arguments.length,we=new Array(We),Ie=0;Ie<We;Ie++)we[Ie]=arguments[Ie];return(X=Y.current)===null||X===void 0?void 0:X.call.apply(X,[Y].concat(we))},[]);return _}function Ke(I){var Y=React.useRef(!1),_=React.useState(I),X=_slicedToArray(_,2),We=X[0],we=X[1];React.useEffect(function(){return Y.current=!1,function(){Y.current=!0}},[]);function Ie(ct,Dt){Dt&&Y.current||we(ct)}return[We,Ie]}function It(I){return I!==void 0}function At(I,Y){var _=Y||{},X=_.defaultValue,We=_.value,we=_.onChange,Ie=_.postState,ct=useState(function(){return It(We)?We:It(X)?typeof X=="function"?X():X:typeof I=="function"?I():I}),Dt=_slicedToArray(ct,2),Ut=Dt[0],pt=Dt[1],Qe=We!==void 0?We:Ut,y=Ie?Ie(Qe):Qe,F=useEvent(we),$=useState([Qe]),A=_slicedToArray($,2),Z=A[0],B=A[1];useLayoutUpdateEffect(function(){var Ct=Z[0];Ut!==Ct&&F(Ut,Ct)},[Z]),useLayoutUpdateEffect(function(){It(We)||pt(We)},[We]);var $e=useEvent(function(Ct,et){pt(Ct,et),B([Qe],et)});return[y,$e]}var Ve=f(31461);function rt(I,Y,_){var X=React.useRef({});return(!("value"in X.current)||_(X.current.condition,Y))&&(X.current.value=I(),X.current.condition=Y),X.current.value}function Ye(I,Y){typeof I=="function"?I(Y):_typeof(I)==="object"&&I&&"current"in I&&(I.current=Y)}function vn(){for(var I=arguments.length,Y=new Array(I),_=0;_<I;_++)Y[_]=arguments[_];var X=Y.filter(function(We){return We});return X.length<=1?X[0]:function(We){Y.forEach(function(we){Ye(we,We)})}}function Hn(){for(var I=arguments.length,Y=new Array(I),_=0;_<I;_++)Y[_]=arguments[_];return useMemo(function(){return vn.apply(void 0,Y)},Y,function(X,We){return X.length!==We.length||X.every(function(we,Ie){return we!==We[Ie]})})}function Ee(I){var Y,_,X=isMemo(I)?I.type.type:I.type;return!(typeof X=="function"&&!((Y=X.prototype)!==null&&Y!==void 0&&Y.render)||typeof I=="function"&&!((_=I.prototype)!==null&&_!==void 0&&_.render))}function de(I){return!isValidElement(I)||isFragment(I)?!1:Ee(I)}function He(I,Y,_,X){if(!Y.length)return _;var We=_toArray(Y),we=We[0],Ie=We.slice(1),ct;return!I&&typeof we=="number"?ct=[]:Array.isArray(I)?ct=_toConsumableArray(I):ct=_objectSpread({},I),X&&_===void 0&&Ie.length===1?delete ct[we][Ie[0]]:ct[we]=He(ct[we],Ie,_,X),ct}function me(I,Y,_){var X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Y.length&&X&&_===void 0&&!get(I,Y.slice(0,-1))?I:He(I,Y,_,X)}function ut(I){return _typeof(I)==="object"&&I!==null&&Object.getPrototypeOf(I)===Object.prototype}function Mt(I){return Array.isArray(I)?[]:{}}var dt=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function P(){for(var I=arguments.length,Y=new Array(I),_=0;_<I;_++)Y[_]=arguments[_];var X=Mt(Y[0]);return Y.forEach(function(We){function we(Ie,ct){var Dt=new Set(ct),Ut=get(We,Ie),pt=Array.isArray(Ut);if(pt||ut(Ut)){if(!Dt.has(Ut)){Dt.add(Ut);var Qe=get(X,Ie);pt?X=me(X,Ie,[]):(!Qe||_typeof(Qe)!=="object")&&(X=me(X,Ie,Mt(Ut))),dt(Ut).forEach(function(y){we([].concat(_toConsumableArray(Ie),[y]),Dt)})}}else X=me(X,Ie,Ut)}we([])}),X}var W={},H=[],re=function(Y){H.push(Y)};function bt(I,Y){if(0)var _}function lt(I,Y){if(0)var _}function De(){W={}}function ht(I,Y,_){!Y&&!W[_]&&(I(!1,_),W[_]=!0)}function ye(I,Y){ht(bt,I,Y)}function it(I,Y){ht(lt,I,Y)}ye.preMessage=re,ye.resetWarned=De,ye.noteOnce=it;var In=null,Rt=10;function Nt(I,Y,_,X,We,we,Ie,ct){var Dt=m.useRef(),Ut=m.useState(null),pt=(0,z.Z)(Ut,2),Qe=pt[0],y=pt[1];return at(function(){if(Qe&&Qe.times<Rt){if(!I.current){y(function(Rn){return(0,x.Z)({},Rn)});return}we();var F=Qe.targetAlign,$=Qe.originAlign,A=Qe.index,Z=Qe.offset,B=I.current.clientHeight,$e=!1,Ct=F,et=null;if(B){for(var Ce=F||$,Te=0,Pe=0,Vt=0,U=Math.min(Y.length-1,A),ze=0;ze<=U;ze+=1){var rn=We(Y[ze]);Pe=Te;var xn=_.get(rn);Vt=Pe+(xn===void 0?X:xn),Te=Vt}for(var Pt=Ce==="top"?Z:B-Z,xt=U;xt>=0;xt-=1){var On=We(Y[xt]),Ne=_.get(On);if(Ne===void 0){$e=!0;break}if(Pt-=Ne,Pt<=0)break}switch(Ce){case"top":et=Pe-Z;break;case"bottom":et=Vt-B+Z;break;default:{var cn=I.current.scrollTop,on=cn+B;Pe<cn?Ct="top":Vt>on&&(Ct="bottom")}}et!==null&&Ie(et),et!==Qe.lastTop&&($e=!0)}$e&&y(function(Rn){return(0,x.Z)((0,x.Z)({},Rn),{},{times:Rn.times+1,targetAlign:Ct,lastTop:et})})}},[Qe,I.current]),function(F){if(F==null){ct();return}if(ee.cancel(Dt.current),typeof F=="number")Ie(F);else if(F&&(0,E.Z)(F)==="object"){var $,A=F.align;"index"in F?$=F.index:$=Y.findIndex(function($e){return We($e)===F.key});var Z=F.offset,B=Z===void 0?0:Z;y({times:0,index:$,offset:B,originAlign:A})}}}function oe(I,Y,_,X){var We=_-I,we=Y-_,Ie=Math.min(We,we)*2;if(X<=Ie){var ct=Math.floor(X/2);return X%2?_+ct+1:_-ct}return We>we?_-(X-we):_+(X-We)}function Ge(I,Y,_){var X=I.length,We=Y.length,we,Ie;if(X===0&&We===0)return null;X<We?(we=I,Ie=Y):(we=Y,Ie=I);var ct={__EMPTY_ITEM__:!0};function Dt($){return $!==void 0?_($):ct}for(var Ut=null,pt=Math.abs(X-We)!==1,Qe=0;Qe<Ie.length;Qe+=1){var y=Dt(we[Qe]),F=Dt(Ie[Qe]);if(y!==F){Ut=Qe,pt=pt||y!==Dt(Ie[Qe+1]);break}}return Ut===null?null:{index:Ut,multiple:pt}}function _t(I,Y,_){var X=m.useState(I),We=(0,z.Z)(X,2),we=We[0],Ie=We[1],ct=m.useState(null),Dt=(0,z.Z)(ct,2),Ut=Dt[0],pt=Dt[1];return m.useEffect(function(){var Qe=Ge(we||[],I||[],Y);(Qe==null?void 0:Qe.index)!==void 0&&(_==null||_(Qe.index),pt(I[Qe.index])),Ie(I)},[I]),[Ut]}var Yt=(typeof navigator=="undefined"?"undefined":(0,E.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Qt=Yt,vt=function(I,Y){var _=(0,m.useRef)(!1),X=(0,m.useRef)(null);function We(){clearTimeout(X.current),_.current=!0,X.current=setTimeout(function(){_.current=!1},50)}var we=(0,m.useRef)({top:I,bottom:Y});return we.current.top=I,we.current.bottom=Y,function(Ie){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dt=Ie<0&&we.current.top||Ie>0&&we.current.bottom;return ct&&Dt?(clearTimeout(X.current),_.current=!1):(!Dt||_.current)&&We(),!_.current&&Dt}};function Be(I,Y,_,X,We){var we=(0,m.useRef)(0),Ie=(0,m.useRef)(null),ct=(0,m.useRef)(null),Dt=(0,m.useRef)(!1),Ut=vt(Y,_);function pt(Z,B){ee.cancel(Ie.current),we.current+=B,ct.current=B,!Ut(B)&&(Qt||Z.preventDefault(),Ie.current=ee(function(){var $e=Dt.current?10:1;We(we.current*$e),we.current=0}))}function Qe(Z,B){We(B,!0),Qt||Z.preventDefault()}var y=(0,m.useRef)(null),F=(0,m.useRef)(null);function $(Z){if(I){ee.cancel(F.current),F.current=ee(function(){y.current=null},2);var B=Z.deltaX,$e=Z.deltaY,Ct=Z.shiftKey,et=B,Ce=$e;(y.current==="sx"||!y.current&&Ct&&$e&&!B)&&(et=$e,Ce=0,y.current="sx");var Te=Math.abs(et),Pe=Math.abs(Ce);y.current===null&&(y.current=X&&Te>Pe?"x":"y"),y.current==="y"?pt(Z,Ce):Qe(Z,et)}}function A(Z){I&&(Dt.current=Z.detail===ct.current)}return[$,A]}var Jt=14/15;function Ht(I,Y,_){var X=(0,m.useRef)(!1),We=(0,m.useRef)(0),we=(0,m.useRef)(null),Ie=(0,m.useRef)(null),ct,Dt=function(y){if(X.current){var F=Math.ceil(y.touches[0].pageY),$=We.current-F;We.current=F,_($)&&y.preventDefault(),clearInterval(Ie.current),Ie.current=setInterval(function(){$*=Jt,(!_($,!0)||Math.abs($)<=.1)&&clearInterval(Ie.current)},16)}},Ut=function(){X.current=!1,ct()},pt=function(y){ct(),y.touches.length===1&&!X.current&&(X.current=!0,We.current=Math.ceil(y.touches[0].pageY),we.current=y.target,we.current.addEventListener("touchmove",Dt),we.current.addEventListener("touchend",Ut))};ct=function(){we.current&&(we.current.removeEventListener("touchmove",Dt),we.current.removeEventListener("touchend",Ut))},at(function(){return I&&Y.current.addEventListener("touchstart",pt),function(){var Qe;(Qe=Y.current)===null||Qe===void 0||Qe.removeEventListener("touchstart",pt),ct(),clearInterval(Ie.current)}},[I])}var er=20;function jr(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_=I/Y*100;return isNaN(_)&&(_=0),_=Math.max(_,er),_=Math.min(_,I/2),Math.floor(_)}function kr(I,Y,_,X){var We=m.useMemo(function(){return[new Map,[]]},[I,_.id,X]),we=(0,z.Z)(We,2),Ie=we[0],ct=we[1],Dt=function(pt){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt,y=Ie.get(pt),F=Ie.get(Qe);if(y===void 0||F===void 0)for(var $=I.length,A=ct.length;A<$;A+=1){var Z,B=I[A],$e=Y(B);Ie.set($e,A);var Ct=(Z=_.get($e))!==null&&Z!==void 0?Z:X;if(ct[A]=(ct[A-1]||0)+Ct,$e===pt&&(y=A),$e===Qe&&(F=A),y!==void 0&&F!==void 0)break}return{top:ct[y-1]||0,bottom:ct[F]}};return Dt}var Si=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],li=[],Mi={overflowY:"auto",overflowAnchor:"none"};function _r(I,Y){var _=I.prefixCls,X=_===void 0?"rc-virtual-list":_,We=I.className,we=I.height,Ie=I.itemHeight,ct=I.fullHeight,Dt=ct===void 0?!0:ct,Ut=I.style,pt=I.data,Qe=I.children,y=I.itemKey,F=I.virtual,$=I.direction,A=I.scrollWidth,Z=I.component,B=Z===void 0?"div":Z,$e=I.onScroll,Ct=I.onVirtualScroll,et=I.onVisibleChange,Ce=I.innerProps,Te=I.extraRender,Pe=I.styles,Vt=(0,O.Z)(I,Si),U=!!(F!==!1&&we&&Ie),ze=U&&pt&&(Ie*pt.length>we||!!A),rn=$==="rtl",xn=h()(X,(0,b.Z)({},"".concat(X,"-rtl"),rn),We),Pt=pt||li,xt=(0,m.useRef)(),On=(0,m.useRef)(),Ne=(0,m.useState)(0),cn=(0,z.Z)(Ne,2),on=cn[0],Rn=cn[1],Sn=(0,m.useState)(0),Sr=(0,z.Z)(Sn,2),Vn=Sr[0],Wn=Sr[1],Rr=(0,m.useState)(!1),Fr=(0,z.Z)(Rr,2),An=Fr[0],Cr=Fr[1],dr=function(){Cr(!0)},xr=function(){Cr(!1)},Mn=m.useCallback(function(ie){return typeof y=="function"?y(ie):ie==null?void 0:ie[y]},[y]),ar={getKey:Mn};function Gn(ie){Rn(function(ae){var le;typeof ie=="function"?le=ie(ae):le=ie;var je=Ro(le);return xt.current.scrollTop=je,je})}var Xn=(0,m.useRef)({start:0,end:Pt.length}),tr=(0,m.useRef)(),hr=_t(Pt,Mn),En=(0,z.Z)(hr,1),Zn=En[0];tr.current=Zn;var Yn=tt(Mn,null,null),Lr=(0,z.Z)(Yn,4),ui=Lr[0],Vr=Lr[1],Gr=Lr[2],ci=Lr[3],Bn=m.useMemo(function(){if(!U)return{scrollHeight:void 0,start:0,end:Pt.length-1,offset:void 0};if(!ze){var ie;return{scrollHeight:((ie=On.current)===null||ie===void 0?void 0:ie.offsetHeight)||0,start:0,end:Pt.length-1,offset:void 0}}for(var ae=0,le,je,se,st=Pt.length,$t=0;$t<st;$t+=1){var Wt=Pt[$t],zt=Mn(Wt),Ft=Gr.get(zt),Bt=ae+(Ft===void 0?Ie:Ft);Bt>=on&&le===void 0&&(le=$t,je=ae),Bt>on+we&&se===void 0&&(se=$t),ae=Bt}return le===void 0&&(le=0,je=0,se=Math.ceil(we/Ie)),se===void 0&&(se=Pt.length-1),se=Math.min(se+1,Pt.length-1),{scrollHeight:ae,start:le,end:se,offset:je}},[ze,U,on,Pt,ci,we]),Xr=Bn.scrollHeight,$r=Bn.start,Br=Bn.end,Ai=Bn.offset;Xn.current.start=$r,Xn.current.end=Br;var zi=m.useState({width:0,height:we}),xi=(0,z.Z)(zi,2),Yr=xi[0],_i=xi[1],Hi=function(ae){_i({width:ae.width||ae.offsetWidth,height:ae.height||ae.offsetHeight})},Vi=(0,m.useRef)(),Ni=(0,m.useRef)(),fi=m.useMemo(function(){return jr(Yr.width,A)},[Yr.width,A]),_o=m.useMemo(function(){return jr(Yr.height,Xr)},[Yr.height,Xr]),Co=Xr-we,qi=(0,m.useRef)(Co);qi.current=Co;function Ro(ie){var ae=ie;return Number.isNaN(qi.current)||(ae=Math.min(ae,qi.current)),ae=Math.max(ae,0),ae}var Ii=on<=0,uo=on>=Co,Ri=vt(Ii,uo),Gi=function(){return{x:rn?-Vn:Vn,y:on}},eo=(0,m.useRef)(Gi()),$i=Ue(function(){if(Ct){var ie=Gi();(eo.current.x!==ie.x||eo.current.y!==ie.y)&&(Ct(ie),eo.current=ie)}});function Fo(ie,ae){var le=ie;ae?((0,ce.flushSync)(function(){Wn(le)}),$i()):Gn(le)}function Lo(ie){var ae=ie.currentTarget.scrollTop;ae!==on&&Gn(ae),$e==null||$e(ie),$i()}var xo=function(ae){var le=ae,je=A-Yr.width;return le=Math.max(le,0),le=Math.min(le,je),le},Xi=Ue(function(ie,ae){ae?((0,ce.flushSync)(function(){Wn(function(le){var je=le+(rn?-ie:ie);return xo(je)})}),$i()):Gn(function(le){var je=le+ie;return je})}),To=Be(U,Ii,uo,!!A,Xi),Eo=(0,z.Z)(To,2),d=Eo[0],v=Eo[1];Ht(U,xt,function(ie,ae){return Ri(ie,ae)?!1:(d({preventDefault:function(){},deltaY:ie}),!0)}),at(function(){function ie(le){U&&le.preventDefault()}var ae=xt.current;return ae.addEventListener("wheel",d),ae.addEventListener("DOMMouseScroll",v),ae.addEventListener("MozMousePixelScroll",ie),function(){ae.removeEventListener("wheel",d),ae.removeEventListener("DOMMouseScroll",v),ae.removeEventListener("MozMousePixelScroll",ie)}},[U]),at(function(){A&&Wn(function(ie){return xo(ie)})},[Yr.width,A]);var D=function(){var ae,le;(ae=Vi.current)===null||ae===void 0||ae.delayHidden(),(le=Ni.current)===null||le===void 0||le.delayHidden()},M=Nt(xt,Pt,Gr,Ie,Mn,function(){return Vr(!0)},Gn,D);m.useImperativeHandle(Y,function(){return{getScrollInfo:Gi,scrollTo:function(ae){function le(je){return je&&(0,E.Z)(je)==="object"&&("left"in je||"top"in je)}le(ae)?(ae.left!==void 0&&Wn(xo(ae.left)),M(ae.top)):M(ae)}}}),at(function(){if(et){var ie=Pt.slice($r,Br+1);et(ie,Pt)}},[$r,Br,Pt]);var G=kr(Pt,Mn,Gr,Ie),J=Te==null?void 0:Te({start:$r,end:Br,virtual:ze,offsetX:Vn,offsetY:Ai,rtl:rn,getSize:G}),ve=T(Pt,$r,Br,A,ui,Qe,ar),Me=null;we&&(Me=(0,x.Z)((0,b.Z)({},Dt?"height":"maxHeight",we),Mi),U&&(Me.overflowY="hidden",A&&(Me.overflowX="hidden"),An&&(Me.pointerEvents="none")));var Ae={};return rn&&(Ae.dir="rtl"),m.createElement("div",(0,L.Z)({style:(0,x.Z)((0,x.Z)({},Ut),{},{position:"relative"}),className:xn},Ae,Vt),m.createElement(xe.Z,{onResize:Hi},m.createElement(B,{className:"".concat(X,"-holder"),style:Me,ref:xt,onScroll:Lo,onMouseEnter:D},m.createElement(Le,{prefixCls:X,height:Xr,offsetX:Vn,offsetY:Ai,scrollWidth:A,onInnerResize:Vr,ref:On,innerProps:Ce,rtl:rn,extra:J},ve))),ze&&Xr>we&&m.createElement(c,{ref:Vi,prefixCls:X,scrollOffset:on,scrollRange:Xr,rtl:rn,onScroll:Fo,onStartMove:dr,onStopMove:xr,spinSize:_o,containerSize:Yr.height,style:Pe==null?void 0:Pe.verticalScrollBar,thumbStyle:Pe==null?void 0:Pe.verticalScrollBarThumb}),ze&&A&&m.createElement(c,{ref:Ni,prefixCls:X,scrollOffset:Vn,scrollRange:A,rtl:rn,onScroll:Fo,onStartMove:dr,onStopMove:xr,spinSize:fi,containerSize:Yr.width,horizontal:!0,style:Pe==null?void 0:Pe.horizontalScrollBar,thumbStyle:Pe==null?void 0:Pe.horizontalScrollBarThumb}))}var Ci=m.forwardRef(_r);Ci.displayName="List";var si=Ci,Pi=si},66392:function(sn,he){"use strict";var f;var L=Symbol.for("react.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),m=Symbol.for("react.context"),ce=Symbol.for("react.server_context"),V=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),xe=Symbol.for("react.suspense_list"),ue=Symbol.for("react.memo"),Le=Symbol.for("react.lazy"),be=Symbol.for("react.offscreen"),Oe;Oe=Symbol.for("react.module.reference");function Se(k){if(typeof k=="object"&&k!==null){var Je=k.$$typeof;switch(Je){case L:switch(k=k.type,k){case E:case b:case z:case h:case xe:return k;default:switch(k=k&&k.$$typeof,k){case ce:case m:case V:case Le:case ue:case O:return k;default:return Je}}case x:return Je}}}f=m,f=O,f=L,f=V,f=E,f=Le,f=ue,f=x,f=b,f=z,f=h,f=xe,f=function(){return!1},f=function(){return!1},f=function(k){return Se(k)===m},f=function(k){return Se(k)===O},f=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===L},f=function(k){return Se(k)===V},f=function(k){return Se(k)===E},f=function(k){return Se(k)===Le},f=function(k){return Se(k)===ue},f=function(k){return Se(k)===x},f=function(k){return Se(k)===b},f=function(k){return Se(k)===z},f=function(k){return Se(k)===h},f=function(k){return Se(k)===xe},f=function(k){return typeof k=="string"||typeof k=="function"||k===E||k===b||k===z||k===h||k===xe||k===be||typeof k=="object"&&k!==null&&(k.$$typeof===Le||k.$$typeof===ue||k.$$typeof===O||k.$$typeof===m||k.$$typeof===V||k.$$typeof===Oe||k.getModuleId!==void 0)},f=Se},31461:function(sn,he,f){"use strict";f(66392)},17423:function(sn,he,f){"use strict";f.d(he,{Z:function(){return ce}});const L=V=>typeof V=="object"&&V!=null&&V.nodeType===1,x=(V,h)=>(!h||V!=="hidden")&&V!=="visible"&&V!=="clip",E=(V,h)=>{if(V.clientHeight<V.scrollHeight||V.clientWidth<V.scrollWidth){const xe=getComputedStyle(V,null);return x(xe.overflowY,h)||x(xe.overflowX,h)||(ue=>{const Le=(be=>{if(!be.ownerDocument||!be.ownerDocument.defaultView)return null;try{return be.ownerDocument.defaultView.frameElement}catch(Oe){return null}})(ue);return!!Le&&(Le.clientHeight<ue.scrollHeight||Le.clientWidth<ue.scrollWidth)})(V)}return!1},z=(V,h,xe,ue,Le,be,Oe,Se)=>be<V&&Oe>h||be>V&&Oe<h?0:be<=V&&Se<=xe||Oe>=h&&Se>=xe?be-V-ue:Oe>h&&Se<xe||be<V&&Se>xe?Oe-h+Le:0,b=V=>{const h=V.parentElement;return h==null?V.getRootNode().host||null:h},O=(V,h)=>{var xe,ue,Le,be;if(typeof document=="undefined")return[];const{scrollMode:Oe,block:Se,inline:k,boundary:Je,skipOverflowHiddenElements:Ot}=h,ee=typeof Je=="function"?Je:At=>At!==Je;if(!L(V))throw new TypeError("Invalid target");const ne=document.scrollingElement||document.documentElement,p=[];let c=V;for(;L(c)&&ee(c);){if(c=b(c),c===ne){p.push(c);break}c!=null&&c===document.body&&E(c)&&!E(document.documentElement)||c!=null&&E(c,Ot)&&p.push(c)}const C=(ue=(xe=window.visualViewport)==null?void 0:xe.width)!=null?ue:innerWidth,T=(be=(Le=window.visualViewport)==null?void 0:Le.height)!=null?be:innerHeight,{scrollX:Q,scrollY:N}=window,{height:j,width:te,top:ke,right:ge,bottom:tt,left:qe}=V.getBoundingClientRect(),{top:_e,right:mt,bottom:yt,left:at}=(At=>{const Ve=window.getComputedStyle(At);return{top:parseFloat(Ve.scrollMarginTop)||0,right:parseFloat(Ve.scrollMarginRight)||0,bottom:parseFloat(Ve.scrollMarginBottom)||0,left:parseFloat(Ve.scrollMarginLeft)||0}})(V);let Ue=Se==="start"||Se==="nearest"?ke-_e:Se==="end"?tt+yt:ke+j/2-_e+yt,Ke=k==="center"?qe+te/2-at+mt:k==="end"?ge+mt:qe-at;const It=[];for(let At=0;At<p.length;At++){const Ve=p[At],{height:rt,width:Ye,top:vn,right:Hn,bottom:Ee,left:de}=Ve.getBoundingClientRect();if(Oe==="if-needed"&&ke>=0&&qe>=0&&tt<=T&&ge<=C&&ke>=vn&&tt<=Ee&&qe>=de&&ge<=Hn)return It;const He=getComputedStyle(Ve),me=parseInt(He.borderLeftWidth,10),ut=parseInt(He.borderTopWidth,10),Mt=parseInt(He.borderRightWidth,10),dt=parseInt(He.borderBottomWidth,10);let P=0,W=0;const H="offsetWidth"in Ve?Ve.offsetWidth-Ve.clientWidth-me-Mt:0,re="offsetHeight"in Ve?Ve.offsetHeight-Ve.clientHeight-ut-dt:0,bt="offsetWidth"in Ve?Ve.offsetWidth===0?0:Ye/Ve.offsetWidth:0,lt="offsetHeight"in Ve?Ve.offsetHeight===0?0:rt/Ve.offsetHeight:0;if(ne===Ve)P=Se==="start"?Ue:Se==="end"?Ue-T:Se==="nearest"?z(N,N+T,T,ut,dt,N+Ue,N+Ue+j,j):Ue-T/2,W=k==="start"?Ke:k==="center"?Ke-C/2:k==="end"?Ke-C:z(Q,Q+C,C,me,Mt,Q+Ke,Q+Ke+te,te),P=Math.max(0,P+N),W=Math.max(0,W+Q);else{P=Se==="start"?Ue-vn-ut:Se==="end"?Ue-Ee+dt+re:Se==="nearest"?z(vn,Ee,rt,ut,dt+re,Ue,Ue+j,j):Ue-(vn+rt/2)+re/2,W=k==="start"?Ke-de-me:k==="center"?Ke-(de+Ye/2)+H/2:k==="end"?Ke-Hn+Mt+H:z(de,Hn,Ye,me,Mt+H,Ke,Ke+te,te);const{scrollLeft:De,scrollTop:ht}=Ve;P=lt===0?0:Math.max(0,Math.min(ht+P/lt,Ve.scrollHeight-rt/lt+re)),W=bt===0?0:Math.max(0,Math.min(De+W/bt,Ve.scrollWidth-Ye/bt+H)),Ue+=ht-P,Ke+=De-W}It.push({el:Ve,top:P,left:W})}return It},m=V=>V===!1?{block:"end",inline:"nearest"}:(h=>h===Object(h)&&Object.keys(h).length!==0)(V)?V:{block:"start",inline:"nearest"};function ce(V,h){if(!V.isConnected||!(Le=>{let be=Le;for(;be&&be.parentNode;){if(be.parentNode===document)return!0;be=be.parentNode instanceof ShadowRoot?be.parentNode.host:be.parentNode}return!1})(V))return;const xe=(Le=>{const be=window.getComputedStyle(Le);return{top:parseFloat(be.scrollMarginTop)||0,right:parseFloat(be.scrollMarginRight)||0,bottom:parseFloat(be.scrollMarginBottom)||0,left:parseFloat(be.scrollMarginLeft)||0}})(V);if((Le=>typeof Le=="object"&&typeof Le.behavior=="function")(h))return h.behavior(O(V,h));const ue=typeof h=="boolean"||h==null?void 0:h.behavior;for(const{el:Le,top:be,left:Oe}of O(V,m(h))){const Se=be-xe.top+xe.bottom,k=Oe-xe.left+xe.right;Le.scroll({top:Se,left:k,behavior:ue})}}}}]);