|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7046],{18299:function(hn,he,h){"use strict";h.d(he,{Z:function(){return m}});var T=h(87462),Y=h(67294),O={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"},q=O,C=h(74643),E=function(V,v){return Y.createElement(C.Z,(0,T.Z)({},V,{ref:v,icon:q}))},m=Y.forwardRef(E)},42922:function(hn,he,h){"use strict";h.d(he,{Z:function(){return m}});var T=h(87462),Y=h(67294),O={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"},q=O,C=h(74643),E=function(V,v){return Y.createElement(C.Z,(0,T.Z)({},V,{ref:v,icon:q}))},m=Y.forwardRef(E)},63237:function(hn,he,h){"use strict";h.d(he,{Z:function(){return m}});var T=h(87462),Y=h(67294),O={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"},q=O,C=h(74643),E=function(V,v){return Y.createElement(C.Z,(0,T.Z)({},V,{ref:v,icon:q}))},m=Y.forwardRef(E)},99569:function(hn,he,h){"use strict";h.d(he,{Z:function(){return m}});var T=h(87462),Y=h(67294),O={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"},q=O,C=h(74643),E=function(V,v){return Y.createElement(C.Z,(0,T.Z)({},V,{ref:v,icon:q}))},m=Y.forwardRef(E)},17663:function(hn,he,h){"use strict";h.d(he,{Z:function(){return m}});var T=h(87462),Y=h(67294),O={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"},q=O,C=h(74643),E=function(V,v){return Y.createElement(C.Z,(0,T.Z)({},V,{ref:v,icon:q}))},m=Y.forwardRef(E)},72395:function(hn,he,h){"use strict";h.d(he,{Z:function(){return m}});var T=h(87462),Y=h(67294),O={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"},q=O,C=h(74643),E=function(V,v){return Y.createElement(C.Z,(0,T.Z)({},V,{ref:v,icon:q}))},m=Y.forwardRef(E)},71749:function(){"use strict"},30483:function(){"use strict"},96670:function(hn,he,h){"use strict";h.d(he,{t:function(){return se}});var T=h(67294),Y=h(71577),O={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},q=h(94184),C=h.n(q),E=Object.defineProperty,m=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,v=(pe,ye,we)=>ye in pe?E(pe,ye,{enumerable:!0,configurable:!0,writable:!0,value:we}):pe[ye]=we,xe=(pe,ye)=>{for(var we in ye||(ye={}))ce.call(ye,we)&&v(pe,we,ye[we]);if(m)for(var we of m(ye))V.call(ye,we)&&v(pe,we,ye[we]);return pe};const se=({cancelText:pe="\u53D6\u6D88",okText:ye="\u786E\u5B9A",loading:we=!1,hasOkBtn:fe=!0,hasCancelBtn:P=!0,okButtonProps:Ee={},onCancel:ot=()=>{},onOk:_=()=>{},className:ie=""})=>T.createElement("div",{className:C()(O.buttonFixed,ie)},T.createElement("div",{className:O.buttonWrap},P&&T.createElement(Y.ZP,{size:"middle",className:`${O.button} mr20`,onClick:ot},pe),fe&&T.createElement(Y.ZP,xe({size:"middle",type:"primary",className:`${O.button} mr20`,loading:we,onClick:_},Ee),ye)))},57444:function(hn,he,h){"use strict";h.d(he,{h:function(){return ie}});var T=h(67294),Y=h(42563),O=h(22150),q=h(71577),C=h(4631),E=h.n(C),m=h(71749),ce=h(30483),V=Object.defineProperty,v=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,we=(y,g,I)=>g in y?V(y,g,{enumerable:!0,configurable:!0,writable:!0,value:I}):y[g]=I,fe=(y,g)=>{for(var I in g||(g={}))pe.call(g,I)&&we(y,I,g[I]);if(se)for(var I of se(g))ye.call(g,I)&&we(y,I,g[I]);return y},P=(y,g)=>v(y,xe(g));const Ee=Y.default.Option,ot={labelCol:{span:4},wrapperCol:{span:20}},_={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:y,onCancel:g})=>{const[I,F]=(0,T.useState)("python");function ee($e){F(_[$e][1])}function $($e){y($e)}return T.createElement(O.default,P(fe({},ot),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:$,style:{width:500}}),T.createElement(O.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},T.createElement(Y.default,{getPopupContainer:$e=>$e.parentNode,onChange:ee},Object.keys(_).map($e=>T.createElement(Ee,{key:$e,value:$e},_[$e][0])))),T.createElement(O.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},T.createElement(ie,{mode:I})),T.createElement("div",{className:"flex-container flex-end"},T.createElement(q.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.createElement(q.ZP,{type:"ghost",onClick:g},"\u53D6\u6D88")))};function ie({value:y,onChange:g,mode:I,options:F={}}){const ee=(0,T.useRef)(),[$,$e]=(0,T.useState)();return(0,T.useEffect)(()=>{if($){let ne=function(ae){const be=ae.getValue();g&&g(be)};return $.on("change",ne),()=>{$.off("change",ne)}}},[$,g]),(0,T.useEffect)(()=>{$&&$.setOption("mode",I)},[$,I]),(0,T.useEffect)(()=>{$&&(y!==$.getValue()||y==="")&&setTimeout(()=>{$.setValue(y||"")},300)},[$,y]),(0,T.useEffect)(()=>{if(ee.current&&!$){const ne=E().fromTextArea(ee.current,fe({mode:I,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},F));$e(ne)}},[ee.current,$]),T.createElement("div",{className:"my-codemirror-container"},T.createElement("textarea",{ref:ee}))}},74131:function(hn,he,h){"use strict";h.r(he),h.d(he,{default:function(){return P}});var T=h(67294),Y=h(35973),O=h(22150),q=h(69677),C=h(57444),E=h(96670),m={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},ce=Object.defineProperty,V=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,se=(Ee,ot,_)=>ot in Ee?ce(Ee,ot,{enumerable:!0,configurable:!0,writable:!0,value:_}):Ee[ot]=_,pe=(Ee,ot)=>{for(var _ in ot||(ot={}))v.call(ot,_)&&se(Ee,_,ot[_]);if(V)for(var _ of V(ot))xe.call(ot,_)&&se(Ee,_,ot[_]);return Ee},ye=(Ee,ot)=>{var _={};for(var ie in Ee)v.call(Ee,ie)&&ot.indexOf(ie)<0&&(_[ie]=Ee[ie]);if(Ee!=null&&V)for(var ie of V(Ee))ot.indexOf(ie)<0&&xe.call(Ee,ie)&&(_[ie]=Ee[ie]);return _},we=(Ee,ot,_)=>new Promise((ie,y)=>{var g=ee=>{try{F(_.next(ee))}catch($){y($)}},I=ee=>{try{F(_.throw(ee))}catch($){y($)}},F=ee=>ee.done?ie(ee.value):Promise.resolve(ee.value).then(g,I);F((_=_.apply(Ee,ot)).next())});const fe=Ee=>{var ot=Ee,{shixunsDetail:_,globalSetting:ie,loading:y,user:g,dispatch:I}=ot,F=ye(ot,["shixunsDetail","globalSetting","loading","user","dispatch"]);const ee=(0,Y.useLocation)(),[$,$e]=(0,T.useState)({}),ne=(0,T.useRef)(),ae=(0,T.useRef)(),[be]=O.default.useForm(),[at,gt]=(0,T.useState)("");(0,T.useEffect)(()=>(I({type:"globalSetting/footerToggle",payload:!1}),()=>{I({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,T.useEffect)(()=>{const ut=sessionStorage.getItem("pathArray");if(ut){const rt=ut.split(",").join("/"),Ze=rt.indexOf("/")===0?rt.substr(1):rt;gt(Ze)}},[]),(0,T.useEffect)(()=>{var ut,rt,Ze,_e;ae.current=(rt=(ut=ee.pathname)==null?void 0:ut.split("/"))==null?void 0:rt[2],ne.current=((_e=(Ze=ee.pathname)==null?void 0:Ze.split("/"))==null?void 0:_e[3])==="repository"},[]);const nt=(...ut)=>we(void 0,[...ut],function*(rt={}){if(yield I({type:"shixunsDetail/addRepositoryFile",payload:{id:ae.current,message:rt.commitMessage,content:rt.codeMirror,path:`${at?`${at}/`:""}${rt.path||""}`,secret_repository:ne.current?void 0:!0}})){const _e=ne.current?`/shixuns/${ae.current}/repository${at?`/master/shixun_show/${at}`:""}`:`/shixuns/${ae.current}/secret_repository`;Y.history.replace(_e)}}),Ot=()=>{var ut,rt;Y.history.push(`/shixuns/${ae.current}/${(rt=(ut=ee.pathname)==null?void 0:ut.split("/"))==null?void 0:rt[3]}${at?`/master/shixun_show/${at}`:""}`)};return T.createElement("section",{className:m.bg},T.createElement("div",{className:m.wrap},T.createElement("div",{className:m.title},"\u65B0\u5EFA\u6587\u4EF6"),T.createElement(O.default,{className:"mt10",form:be,scrollToFirstError:!0,layout:"vertical",onFinish:nt,onValuesChange:()=>$e(pe({},be.getFieldsValue()))},T.createElement(O.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},T.createElement(O.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},T.createElement("span",null,T.createElement("span",{className:"mr5"},at?`${at}/`:""),T.createElement(q.default,{className:m.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),T.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")),T.createElement(O.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"}]},T.createElement(q.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"})),T.createElement("div",{className:"mt10 mb20"},T.createElement(O.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},T.createElement(C.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"]}}))),T.createElement(O.default.Item,{noStyle:!0},T.createElement(E.t,{okButtonProps:{htmlType:"submit"},onCancel:Ot})))))};var P=(0,Y.connect)(({shixunsDetail:Ee,loading:ot,globalSetting:_,user:ie})=>({shixunsDetail:Ee,globalSetting:_,user:ie,loading:ot.models.index}))(fe)},9708:function(hn,he,h){"use strict";h.d(he,{F:function(){return C},Z:function(){return q}});var T=h(94184),Y=h.n(T);const O=null;function q(E,m,ce){return Y()({[`${E}-status-success`]:m==="success",[`${E}-status-warning`]:m==="warning",[`${E}-status-error`]:m==="error",[`${E}-status-validating`]:m==="validating",[`${E}-has-feedback`]:ce})}const C=(E,m)=>m||E},88258:function(hn,he,h){"use strict";var T=h(67294),Y=h(53124),O=h(32983);const q=C=>{const{componentName:E}=C,{getPrefixCls:m}=(0,T.useContext)(Y.E_),ce=m("empty");switch(E){case"Table":case"List":return T.createElement(O.Z,{image:O.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return T.createElement(O.Z,{image:O.Z.PRESENTED_IMAGE_SIMPLE,className:`${ce}-small`});default:return T.createElement(O.Z,null)}};he.Z=q},32983:function(hn,he,h){"use strict";h.d(he,{Z:function(){return _}});var T=h(94184),Y=h.n(T),O=h(67294),q=h(53124),C=h(10110),E=h(84780),m=h(46605),V=()=>{const[,ie]=(0,m.Z)(),g=new E.C(ie.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return O.createElement("svg",{style:g,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},O.createElement("g",{fill:"none",fillRule:"evenodd"},O.createElement("g",{transform:"translate(24 31.67)"},O.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),O.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"}),O.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)"}),O.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"}),O.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"})),O.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"}),O.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},O.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),O.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},xe=()=>{const[,ie]=(0,m.Z)(),{colorFill:y,colorFillTertiary:g,colorFillQuaternary:I,colorBgContainer:F}=ie,{borderColor:ee,shadowColor:$,contentColor:$e}=(0,O.useMemo)(()=>({borderColor:new E.C(y).onBackground(F).toHexShortString(),shadowColor:new E.C(g).onBackground(F).toHexShortString(),contentColor:new E.C(I).onBackground(F).toHexShortString()}),[y,g,I,F]);return O.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},O.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},O.createElement("ellipse",{fill:$,cx:"32",cy:"33",rx:"32",ry:"7"}),O.createElement("g",{fillRule:"nonzero",stroke:ee},O.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"}),O.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:$e}))))},se=h(67968),pe=h(45503);const ye=ie=>{const{componentCls:y,margin:g,marginXS:I,marginXL:F,fontSize:ee,lineHeight:$}=ie;return{[y]:{marginInline:I,fontSize:ee,lineHeight:$,textAlign:"center",[`${y}-image`]:{height:ie.emptyImgHeight,marginBottom:I,opacity:ie.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${y}-description`]:{color:ie.colorText},[`${y}-footer`]:{marginTop:g},"&-normal":{marginBlock:F,color:ie.colorTextDisabled,[`${y}-description`]:{color:ie.colorTextDisabled},[`${y}-image`]:{height:ie.emptyImgHeightMD}},"&-small":{marginBlock:I,color:ie.colorTextDisabled,[`${y}-image`]:{height:ie.emptyImgHeightSM}}}}};var we=(0,se.Z)("Empty",ie=>{const{componentCls:y,controlHeightLG:g}=ie,I=(0,pe.TS)(ie,{emptyImgCls:`${y}-img`,emptyImgHeight:g*2.5,emptyImgHeightMD:g,emptyImgHeightSM:g*.875});return[ye(I)]}),fe=function(ie,y){var g={};for(var I in ie)Object.prototype.hasOwnProperty.call(ie,I)&&y.indexOf(I)<0&&(g[I]=ie[I]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var F=0,I=Object.getOwnPropertySymbols(ie);F<I.length;F++)y.indexOf(I[F])<0&&Object.prototype.propertyIsEnumerable.call(ie,I[F])&&(g[I[F]]=ie[I[F]]);return g};const P=O.createElement(V,null),Ee=O.createElement(xe,null),ot=ie=>{var{className:y,rootClassName:g,prefixCls:I,image:F=P,description:ee,children:$,imageStyle:$e,style:ne}=ie,ae=fe(ie,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:be,direction:at,empty:gt}=O.useContext(q.E_),nt=be("empty",I),[Ot,ut]=we(nt),[rt]=(0,C.Z)("Empty"),Ze=typeof ee!="undefined"?ee:rt==null?void 0:rt.description,_e=typeof Ze=="string"?Ze:"empty";let Zt=null;return typeof F=="string"?Zt=O.createElement("img",{alt:_e,src:F}):Zt=F,Ot(O.createElement("div",Object.assign({className:Y()(ut,nt,gt==null?void 0:gt.className,{[`${nt}-normal`]:F===Ee,[`${nt}-rtl`]:at==="rtl"},y,g),style:Object.assign(Object.assign({},gt==null?void 0:gt.style),ne)},ae),O.createElement("div",{className:`${nt}-image`,style:$e},Zt),Ze&&O.createElement("div",{className:`${nt}-description`},Ze),$&&O.createElement("div",{className:`${nt}-footer`},$)))};ot.PRESENTED_IMAGE_DEFAULT=P,ot.PRESENTED_IMAGE_SIMPLE=Ee;var _=ot},22150:function(hn,he,h){"use strict";h.d(he,{default:function(){return ft}});var T=h(74902),Y=h(94184),O=h.n(Y),q=h(38379),C=h(67294),E=h(33603),m=h(65223);function ce(x){const[A,H]=C.useState(x);return C.useEffect(()=>{const W=setTimeout(()=>{H(x)},x.length?0:10);return()=>{clearTimeout(W)}},[x]),A}var V=h(14747),v=h(50438),xe=h(33507),se=h(45503),pe=h(67968),we=x=>{const{componentCls:A}=x,H=`${A}-show-help`,W=`${A}-show-help-item`;return{[H]:{transition:`opacity ${x.motionDurationSlow} ${x.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[W]:{overflow:"hidden",transition:`height ${x.motionDurationSlow} ${x.motionEaseInOut},
|
|
|
opacity ${x.motionDurationSlow} ${x.motionEaseInOut},
|
|
|
transform ${x.motionDurationSlow} ${x.motionEaseInOut} !important`,[`&${W}-appear, &${W}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${W}-leave-active`]:{transform:"translateY(-5px)"}}}}};const fe=x=>({legend:{display:"block",width:"100%",marginBottom:x.marginLG,padding:0,color:x.colorTextDescription,fontSize:x.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${x.lineWidth}px ${x.lineType} ${x.colorBorder}`},label:{fontSize:x.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 ${x.controlOutlineWidth}px ${x.controlOutline}`},output:{display:"block",paddingTop:15,color:x.colorText,fontSize:x.fontSize,lineHeight:x.lineHeight}}),P=(x,A)=>{const{formItemCls:H}=x;return{[H]:{[`${H}-label > label`]:{height:A},[`${H}-control-input`]:{minHeight:A}}}},Ee=x=>{const{componentCls:A}=x;return{[x.componentCls]:Object.assign(Object.assign(Object.assign({},(0,V.Wf)(x)),fe(x)),{[`${A}-text`]:{display:"inline-block",paddingInlineEnd:x.paddingSM},"&-small":Object.assign({},P(x,x.controlHeightSM)),"&-large":Object.assign({},P(x,x.controlHeightLG))})}},ot=x=>{const{formItemCls:A,iconCls:H,componentCls:W,rootPrefixCls:B,labelRequiredMarkColor:Z,labelColor:Ke,labelFontSize:At,labelHeight:dt,labelColonMarginInlineStart:Re,labelColonMarginInlineEnd:De,itemMarginBottom:ze}=x;return{[A]:Object.assign(Object.assign({},(0,V.Wf)(x)),{marginBottom:ze,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${B}-row`]:{display:"none"},"&-has-warning":{[`${A}-split`]:{color:x.colorError}},"&-has-error":{[`${A}-split`]:{color:x.colorWarning}},[`${A}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${x.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:dt,color:Ke,fontSize:At,[`> ${H}`]:{fontSize:x.fontSize,verticalAlign:"top"},[`&${A}-required:not(${A}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:x.marginXXS,color:Z,fontSize:x.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${W}-hide-required-mark &`]:{display:"none"}},[`${A}-optional`]:{display:"inline-block",marginInlineStart:x.marginXXS,color:x.colorTextDescription,[`${W}-hide-required-mark &`]:{display:"none"}},[`${A}-tooltip`]:{color:x.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:x.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Re,marginInlineEnd:De},[`&${A}-no-colon::after`]:{content:'"\\a0"'}}},[`${A}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${B}-col-'"]):not([class*="' ${B}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:x.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[A]:{"&-explain, &-extra":{clear:"both",color:x.colorTextDescription,fontSize:x.fontSize,lineHeight:x.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:x.controlHeightSM,transition:`color ${x.motionDurationMid} ${x.motionEaseOut}`},"&-explain":{"&-error":{color:x.colorError},"&-warning":{color:x.colorWarning}}},[`&-with-help ${A}-explain`]:{height:"auto",opacity:1},[`${A}-feedback-icon`]:{fontSize:x.fontSize,textAlign:"center",visibility:"visible",animationName:v.kr,animationDuration:x.motionDurationMid,animationTimingFunction:x.motionEaseOutBack,pointerEvents:"none","&-success":{color:x.colorSuccess},"&-error":{color:x.colorError},"&-warning":{color:x.colorWarning},"&-validating":{color:x.colorPrimary}}})}},_=x=>{const{componentCls:A,formItemCls:H}=x;return{[`${A}-horizontal`]:{[`${H}-label`]:{flexGrow:0},[`${H}-control`]:{flex:"1 1 0",minWidth:0},[`${H}-label[class$='-24'], ${H}-label[class*='-24 ']`]:{[`& + ${H}-control`]:{minWidth:"unset"}}}}},ie=x=>{const{componentCls:A,formItemCls:H}=x;return{[`${A}-inline`]:{display:"flex",flexWrap:"wrap",[H]:{flex:"none",marginInlineEnd:x.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${H}-label,
|
|
|
> ${H}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${H}-label`]:{flex:"none"},[`${A}-text`]:{display:"inline-block"},[`${H}-has-feedback`]:{display:"inline-block"}}}}},y=x=>({padding:x.verticalLabelPadding,margin:x.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),g=x=>{const{componentCls:A,formItemCls:H,rootPrefixCls:W}=x;return{[`${H} ${H}-label`]:y(x),[A]:{[H]:{flexWrap:"wrap",[`${H}-label, ${H}-control`]:{[`&:not([class*=" ${W}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},I=x=>{const{componentCls:A,formItemCls:H,rootPrefixCls:W}=x;return{[`${A}-vertical`]:{[H]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${A}-item-control`]:{width:"100%"}}},[`${A}-vertical ${H}-label,
|
|
|
.${W}-col-24${H}-label,
|
|
|
.${W}-col-xl-24${H}-label`]:y(x),[`@media (max-width: ${x.screenXSMax}px)`]:[g(x),{[A]:{[`.${W}-col-xs-24${H}-label`]:y(x)}}],[`@media (max-width: ${x.screenSMMax}px)`]:{[A]:{[`.${W}-col-sm-24${H}-label`]:y(x)}},[`@media (max-width: ${x.screenMDMax}px)`]:{[A]:{[`.${W}-col-md-24${H}-label`]:y(x)}},[`@media (max-width: ${x.screenLGMax}px)`]:{[A]:{[`.${W}-col-lg-24${H}-label`]:y(x)}}}},F=(x,A)=>(0,se.TS)(x,{formItemCls:`${x.componentCls}-item`,rootPrefixCls:A});var ee=(0,pe.Z)("Form",(x,A)=>{let{rootPrefixCls:H}=A;const W=F(x,H);return[Ee(W),ot(W),we(W),_(W),ie(W),I(W),(0,xe.Z)(W),v.kr]},x=>({labelRequiredMarkColor:x.colorError,labelColor:x.colorTextHeading,labelFontSize:x.fontSize,labelHeight:x.controlHeight,labelColonMarginInlineStart:x.marginXXS/2,labelColonMarginInlineEnd:x.marginXS,itemMarginBottom:x.marginLG,verticalLabelPadding:`0 0 ${x.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const $=[];function $e(x,A,H){let W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof x=="string"?x:`${A}-${W}`,error:x,errorStatus:H}}var ae=x=>{let{help:A,helpStatus:H,errors:W=$,warnings:B=$,className:Z,fieldId:Ke,onVisibleChanged:At}=x;const{prefixCls:dt}=C.useContext(m.Rk),Re=`${dt}-item-explain`,[,De]=ee(dt),ze=(0,C.useMemo)(()=>(0,E.Z)(dt),[dt]),en=ce(W),k=ce(B),Ue=C.useMemo(()=>A!=null?[$e(A,"help",H)]:[].concat((0,T.Z)(en.map((Wn,Bt)=>$e(Wn,"error","error",Bt))),(0,T.Z)(k.map((Wn,Bt)=>$e(Wn,"warning","warning",Bt)))),[A,H,en,k]),gn={};return Ke&&(gn.id=`${Ke}_help`),C.createElement(q.default,{motionDeadline:ze.motionDeadline,motionName:`${dt}-show-help`,visible:!!Ue.length,onVisibleChanged:At},Wn=>{const{className:Bt,style:Ft}=Wn;return C.createElement("div",Object.assign({},gn,{className:O()(Re,Bt,Z,De),style:Ft,role:"alert"}),C.createElement(q.CSSMotionList,Object.assign({keys:Ue},(0,E.Z)(dt),{motionName:`${dt}-show-help-item`,component:!1}),Kn=>{const{key:je,error:Sn,errorStatus:Mn,className:Hn,style:Pn}=Kn;return C.createElement("div",{key:je,className:O()(Hn,{[`${Re}-${Mn}`]:Mn}),style:Pn},Sn)}))})},be=h(58083),at=h(53124),gt=h(98866),nt=h(97647),Ot=h(98675),ut=h(17423);const rt=["parentNode"],Ze="form_item";function _e(x){return x===void 0||x===!1?[]:Array.isArray(x)?x:[x]}function Zt(x,A){if(!x.length)return;const H=x.join("_");return A?`${A}_${H}`:rt.includes(H)?`${Ze}_${H}`:H}function an(x,A,H,W,B,Z){let Ke=W;return Z!==void 0?Ke=Z:H.validating?Ke="validating":x.length?Ke="error":A.length?Ke="warning":(H.touched||B&&H.validated)&&(Ke="success"),Ke}function ct(x){return _e(x).join("_")}function It(x){const[A]=(0,be.useForm)(),H=C.useRef({}),W=C.useMemo(()=>x!=null?x:Object.assign(Object.assign({},A),{__INTERNAL__:{itemRef:B=>Z=>{const Ke=ct(B);Z?H.current[Ke]=Z:delete H.current[Ke]}},scrollToField:function(B){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Ke=_e(B),At=Zt(Ke,W.__INTERNAL__.name),dt=At?document.getElementById(At):null;dt&&(0,ut.Z)(dt,Object.assign({scrollMode:"if-needed",block:"nearest"},Z))},getFieldInstance:B=>{const Z=ct(B);return H.current[Z]}}),[x,A]);return[W]}var vt=h(37920),$n=function(x,A){var H={};for(var W in x)Object.prototype.hasOwnProperty.call(x,W)&&A.indexOf(W)<0&&(H[W]=x[W]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,W=Object.getOwnPropertySymbols(x);B<W.length;B++)A.indexOf(W[B])<0&&Object.prototype.propertyIsEnumerable.call(x,W[B])&&(H[W[B]]=x[W[B]]);return H};const hr=(x,A)=>{const H=C.useContext(gt.Z),{getPrefixCls:W,direction:B,form:Z}=C.useContext(at.E_),{prefixCls:Ke,className:At,rootClassName:dt,size:Re,disabled:De=H,form:ze,colon:en,labelAlign:k,labelWrap:Ue,labelCol:gn,wrapperCol:Wn,hideRequiredMark:Bt,layout:Ft="horizontal",scrollToFirstError:Kn,requiredMark:je,onFinishFailed:Sn,name:Mn,style:Hn,feedbackIcons:Pn}=x,kr=$n(x,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),wr=(0,Ot.Z)(Re),Jn=C.useContext(vt.Z),Jr=(0,C.useMemo)(()=>je!==void 0?je:Z&&Z.requiredMark!==void 0?Z.requiredMark:!Bt,[Bt,je,Z]),Ur=en!=null?en:Z==null?void 0:Z.colon,qn=W("form",Ke),[$r,Kr]=ee(qn),qr=O()(qn,`${qn}-${Ft}`,{[`${qn}-hide-required-mark`]:Jr===!1,[`${qn}-rtl`]:B==="rtl",[`${qn}-${wr}`]:wr},Kr,Z==null?void 0:Z.className,At,dt),[Zn]=It(ze),{__INTERNAL__:mr}=Zn;mr.name=Mn;const Er=(0,C.useMemo)(()=>({name:Mn,labelAlign:k,labelCol:gn,labelWrap:Ue,wrapperCol:Wn,vertical:Ft==="vertical",colon:Ur,requiredMark:Jr,itemRef:mr.itemRef,form:Zn,feedbackIcons:Pn}),[Mn,k,gn,Wn,Ft,Ur,Jr,Zn,Pn]);C.useImperativeHandle(A,()=>Zn);const ir=(Rr,In)=>{if(Rr){let er={block:"nearest"};typeof Rr=="object"&&(er=Rr),Zn.scrollToField(In,er)}},yr=Rr=>{if(Sn==null||Sn(Rr),Rr.errorFields.length){const In=Rr.errorFields[0].name;if(Kn!==void 0){ir(Kn,In);return}Z&&Z.scrollToFirstError!==void 0&&ir(Z.scrollToFirstError,In)}};return $r(C.createElement(gt.n,{disabled:De},C.createElement(nt.q,{size:wr},C.createElement(m.RV,Object.assign({},{validateMessages:Jn}),C.createElement(m.q3.Provider,{value:Er},C.createElement(be.default,Object.assign({id:Mn},kr,{name:Mn,onFinishFailed:yr,form:Zn,style:Object.assign(Object.assign({},Z==null?void 0:Z.style),Hn),className:qr})))))))};var Se=C.forwardRef(hr),Ye=h(9475),Me=h(17799),wt=h(96159),$t=h(37419);function Dt(x){if(typeof x=="function")return x;const A=(0,$t.Z)(x);return A.length<=1?A[0]:A}const pt=()=>{const{status:x,errors:A=[],warnings:H=[]}=(0,C.useContext)(m.aM);return{status:x,errors:A,warnings:H}};pt.Context=m.aM;var Nt=pt,Wt=h(96523);function Jt(x){const[A,H]=C.useState(x),W=(0,C.useRef)(null),B=(0,C.useRef)([]),Z=(0,C.useRef)(!1);C.useEffect(()=>(Z.current=!1,()=>{Z.current=!0,Wt.Z.cancel(W.current),W.current=null}),[]);function Ke(At){Z.current||(W.current===null&&(B.current=[],W.current=(0,Wt.Z)(()=>{W.current=null,H(dt=>{let Re=dt;return B.current.forEach(De=>{Re=De(Re)}),Re})})),B.current.push(At))}return[A,Ke]}function ln(){const{itemRef:x}=C.useContext(m.q3),A=C.useRef({});function H(W,B){const Z=B&&typeof B=="object"&&B.ref,Ke=W.join("_");return(A.current.name!==Ke||A.current.originRef!==Z)&&(A.current.name=Ke,A.current.originRef=Z,A.current.ref=(0,Me.sQ)(x(W),Z)),A.current.ref}return H}var Kt=h(48130),Et=h(14075),wn=h(10366),un=h(92820),bn=h(21584);const gr=x=>{const{formItemCls:A}=x;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${A}-control`]:{display:"flex"}}}};var En=(0,pe.b)(["Form","item-item"],(x,A)=>{let{rootPrefixCls:H}=A;const W=F(x,H);return[gr(W)]}),me=x=>{const{prefixCls:A,status:H,wrapperCol:W,children:B,errors:Z,warnings:Ke,_internalItemRender:At,extra:dt,help:Re,fieldId:De,marginBottom:ze,onErrorVisibleChanged:en}=x,k=`${A}-item`,Ue=C.useContext(m.q3),gn=W||Ue.wrapperCol||{},Wn=O()(`${k}-control`,gn.className),Bt=C.useMemo(()=>Object.assign({},Ue),[Ue]);delete Bt.labelCol,delete Bt.wrapperCol;const Ft=C.createElement("div",{className:`${k}-control-input`},C.createElement("div",{className:`${k}-control-input-content`},B)),Kn=C.useMemo(()=>({prefixCls:A,status:H}),[A,H]),je=ze!==null||Z.length||Ke.length?C.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},C.createElement(m.Rk.Provider,{value:Kn},C.createElement(ae,{fieldId:De,errors:Z,warnings:Ke,help:Re,helpStatus:H,className:`${k}-explain-connected`,onVisibleChanged:en})),!!ze&&C.createElement("div",{style:{width:0,height:ze}})):null,Sn={};De&&(Sn.id=`${De}_extra`);const Mn=dt?C.createElement("div",Object.assign({},Sn,{className:`${k}-extra`}),dt):null,Hn=At&&At.mark==="pro_table_render"&&At.render?At.render(x,{input:Ft,errorList:je,extra:Mn}):C.createElement(C.Fragment,null,Ft,je,Mn);return C.createElement(m.q3.Provider,{value:Bt},C.createElement(bn.Z,Object.assign({},gn,{className:Wn}),Hn),C.createElement(En,{prefixCls:A}))},Dn=h(17663),On=h(24457),Nn=h(10110),zn=h(83062),Ai=function(x,A){var H={};for(var W in x)Object.prototype.hasOwnProperty.call(x,W)&&A.indexOf(W)<0&&(H[W]=x[W]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,W=Object.getOwnPropertySymbols(x);B<W.length;B++)A.indexOf(W[B])<0&&Object.prototype.propertyIsEnumerable.call(x,W[B])&&(H[W[B]]=x[W[B]]);return H};function Ir(x){return x?typeof x=="object"&&!C.isValidElement(x)?x:{title:x}:null}var rr=x=>{let{prefixCls:A,label:H,htmlFor:W,labelCol:B,labelAlign:Z,colon:Ke,required:At,requiredMark:dt,tooltip:Re}=x;var De;const[ze]=(0,Nn.Z)("Form"),{vertical:en,labelAlign:k,labelCol:Ue,labelWrap:gn,colon:Wn}=C.useContext(m.q3);if(!H)return null;const Bt=B||Ue||{},Ft=Z||k,Kn=`${A}-item-label`,je=O()(Kn,Ft==="left"&&`${Kn}-left`,Bt.className,{[`${Kn}-wrap`]:!!gn});let Sn=H;const Mn=Ke===!0||Wn!==!1&&Ke!==!1;Mn&&!en&&typeof H=="string"&&H.trim()!==""&&(Sn=H.replace(/[:|:]\s*$/,""));const Pn=Ir(Re);if(Pn){const{icon:Jr=C.createElement(Dn.Z,null)}=Pn,Ur=Ai(Pn,["icon"]),qn=C.createElement(zn.Z,Object.assign({},Ur),C.cloneElement(Jr,{className:`${A}-item-tooltip`,title:""}));Sn=C.createElement(C.Fragment,null,Sn,qn)}const kr=dt==="optional",wr=typeof dt=="function";wr?Sn=dt(Sn,{required:!!At}):kr&&!At&&(Sn=C.createElement(C.Fragment,null,Sn,C.createElement("span",{className:`${A}-item-optional`,title:""},(ze==null?void 0:ze.optional)||((De=On.Z.Form)===null||De===void 0?void 0:De.optional))));const Jn=O()({[`${A}-item-required`]:At,[`${A}-item-required-mark-optional`]:kr||wr,[`${A}-item-no-colon`]:!Mn});return C.createElement(bn.Z,Object.assign({},Bt,{className:je}),C.createElement("label",{htmlFor:W,className:Jn,title:typeof H=="string"?H:""},Sn))},Fr=h(87725),Qr=h(16646),Ei=h(87995),Yi=h(3407);const Qi={success:Fr.Z,warning:Ei.Z,error:Qr.Z,validating:Yi.Z};function io(x){let{children:A,errors:H,warnings:W,hasFeedback:B,validateStatus:Z,prefixCls:Ke,meta:At,noStyle:dt}=x;const Re=`${Ke}-item`,{feedbackIcons:De}=C.useContext(m.q3),ze=an(H,W,At,null,!!B,Z),{isFormItemInput:en,status:k}=C.useContext(m.aM),Ue=C.useMemo(()=>{var gn;let Wn;if(B){const Kn=B!==!0&&B.icons||De,je=ze&&((gn=Kn==null?void 0:Kn({status:ze,errors:H,warnings:W}))===null||gn===void 0?void 0:gn[ze]),Sn=ze&&Qi[ze];Wn=je!==!1&&Sn?C.createElement("span",{className:O()(`${Re}-feedback-icon`,`${Re}-feedback-icon-${ze}`)},je||C.createElement(Sn,null)):null}let Bt=!0,Ft=ze||"";return dt&&(Bt=en,Ft=(ze!=null?ze:k)||""),{status:Ft,errors:H,warnings:W,hasFeedback:!!B,feedbackIcon:Wn,isFormItemInput:Bt}},[ze,B,dt,en,k]);return C.createElement(m.aM.Provider,{value:Ue},A)}var Mi=function(x,A){var H={};for(var W in x)Object.prototype.hasOwnProperty.call(x,W)&&A.indexOf(W)<0&&(H[W]=x[W]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,W=Object.getOwnPropertySymbols(x);B<W.length;B++)A.indexOf(W[B])<0&&Object.prototype.propertyIsEnumerable.call(x,W[B])&&(H[W[B]]=x[W[B]]);return H};function Fi(x){const{prefixCls:A,className:H,rootClassName:W,style:B,help:Z,errors:Ke,warnings:At,validateStatus:dt,meta:Re,hasFeedback:De,hidden:ze,children:en,fieldId:k,required:Ue,isRequired:gn,onSubItemMetaChange:Wn}=x,Bt=Mi(x,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Ft=`${A}-item`,{requiredMark:Kn}=C.useContext(m.q3),je=C.useRef(null),Sn=ce(Ke),Mn=ce(At),Hn=Z!=null,Pn=!!(Hn||Ke.length||At.length),kr=!!je.current&&(0,Kt.Z)(je.current),[wr,Jn]=C.useState(null);(0,Et.Z)(()=>{if(Pn&&je.current){const Kr=getComputedStyle(je.current);Jn(parseInt(Kr.marginBottom,10))}},[Pn,kr]);const Jr=Kr=>{Kr||Jn(null)},qn=function(){let Kr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const qr=Kr?Sn:Re.errors,Zn=Kr?Mn:Re.warnings;return an(qr,Zn,Re,"",!!De,dt)}(),$r=O()(Ft,H,W,{[`${Ft}-with-help`]:Hn||Sn.length||Mn.length,[`${Ft}-has-feedback`]:qn&&De,[`${Ft}-has-success`]:qn==="success",[`${Ft}-has-warning`]:qn==="warning",[`${Ft}-has-error`]:qn==="error",[`${Ft}-is-validating`]:qn==="validating",[`${Ft}-hidden`]:ze});return C.createElement("div",{className:$r,style:B,ref:je},C.createElement(un.Z,Object.assign({className:`${Ft}-row`},(0,wn.Z)(Bt,["_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"])),C.createElement(rr,Object.assign({htmlFor:k},x,{requiredMark:Kn,required:Ue!=null?Ue:gn,prefixCls:A})),C.createElement(me,Object.assign({},x,Re,{errors:Sn,warnings:Mn,prefixCls:A,status:qn,help:Z,marginBottom:wr,onErrorVisibleChanged:Jr}),C.createElement(m.qI.Provider,{value:Wn},C.createElement(io,{prefixCls:A,meta:Re,errors:Re.errors,warnings:Re.warnings,hasFeedback:De,validateStatus:qn},en)))),!!wr&&C.createElement("div",{className:`${Ft}-margin-offset`,style:{marginBottom:-wr}}))}const $i="__SPLIT__",vo=null,N=C.memo(x=>{let{children:A}=x;return A},(x,A)=>x.value===A.value&&x.update===A.update&&x.childProps.length===A.childProps.length&&x.childProps.every((H,W)=>H===A.childProps[W]));function re(x){return x!=null}function J(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function te(x){const{name:A,noStyle:H,className:W,dependencies:B,prefixCls:Z,shouldUpdate:Ke,rules:At,children:dt,required:Re,label:De,messageVariables:ze,trigger:en="onChange",validateTrigger:k,hidden:Ue,help:gn}=x,{getPrefixCls:Wn}=C.useContext(at.E_),{name:Bt}=C.useContext(m.q3),Ft=Dt(dt),Kn=typeof Ft=="function",je=C.useContext(m.qI),{validateTrigger:Sn}=C.useContext(be.FieldContext),Mn=k!==void 0?k:Sn,Hn=re(A),Pn=Wn("form",Z),[kr,wr]=ee(Pn),Jn=C.useContext(be.ListContext),Jr=C.useRef(),[Ur,qn]=Jt({}),[$r,Kr]=(0,Ye.Z)(()=>J()),qr=In=>{const er=Jn==null?void 0:Jn.getKey(In.name);if(Kr(In.destroy?J():In,!0),H&&gn!==!1&&je){let or=In.name;if(In.destroy)or=Jr.current||or;else if(er!==void 0){const[fi,Ii]=er;or=[fi].concat((0,T.Z)(Ii)),Jr.current=or}je(In,or)}},Zn=(In,er)=>{qn(or=>{const fi=Object.assign({},or),zi=[].concat((0,T.Z)(In.name.slice(0,-1)),(0,T.Z)(er)).join($i);return In.destroy?delete fi[zi]:fi[zi]=In,fi})},[mr,Er]=C.useMemo(()=>{const In=(0,T.Z)($r.errors),er=(0,T.Z)($r.warnings);return Object.values(Ur).forEach(or=>{In.push.apply(In,(0,T.Z)(or.errors||[])),er.push.apply(er,(0,T.Z)(or.warnings||[]))}),[In,er]},[Ur,$r.errors,$r.warnings]),ir=ln();function yr(In,er,or){return H&&!Ue?C.createElement(io,{prefixCls:Pn,hasFeedback:x.hasFeedback,validateStatus:x.validateStatus,meta:$r,errors:mr,warnings:Er,noStyle:!0},In):C.createElement(Fi,Object.assign({key:"row"},x,{className:O()(W,wr),prefixCls:Pn,fieldId:er,isRequired:or,errors:mr,warnings:Er,meta:$r,onSubItemMetaChange:Zn}),In)}if(!Hn&&!Kn&&!B)return kr(yr(Ft));let Rr={};return typeof De=="string"?Rr.label=De:A&&(Rr.label=String(A)),ze&&(Rr=Object.assign(Object.assign({},Rr),ze)),kr(C.createElement(be.Field,Object.assign({},x,{messageVariables:Rr,trigger:en,validateTrigger:Mn,onMetaChange:qr}),(In,er,or)=>{const fi=_e(A).length&&er?er.name:[],Ii=Zt(fi,Bt),zi=Re!==void 0?Re:!!(At&&At.some(_n=>{if(_n&&typeof _n=="object"&&_n.required&&!_n.warningOnly)return!0;if(typeof _n=="function"){const Oi=_n(or);return Oi&&Oi.required&&!Oi.warningOnly}return!1})),Ri=Object.assign({},In);let mi=null;if(Array.isArray(Ft)&&Hn)mi=Ft;else if(!(Kn&&(!(Ke||B)||Hn))){if(!(B&&!Kn&&!Hn))if((0,wt.l$)(Ft)){const _n=Object.assign(Object.assign({},Ft.props),Ri);if(_n.id||(_n.id=Ii),gn||mr.length>0||Er.length>0||x.extra){const di=[];(gn||mr.length>0)&&di.push(`${Ii}_help`),x.extra&&di.push(`${Ii}_extra`),_n["aria-describedby"]=di.join(" ")}mr.length>0&&(_n["aria-invalid"]="true"),zi&&(_n["aria-required"]="true"),(0,Me.Yr)(Ft)&&(_n.ref=ir(fi,Ft)),new Set([].concat((0,T.Z)(_e(en)),(0,T.Z)(_e(Mn)))).forEach(di=>{_n[di]=function(){for(var ho,go,oo,Li,Ao,Eo=arguments.length,Fo=new Array(Eo),ao=0;ao<Eo;ao++)Fo[ao]=arguments[ao];(oo=Ri[di])===null||oo===void 0||(ho=oo).call.apply(ho,[Ri].concat(Fo)),(Ao=(Li=Ft.props)[di])===null||Ao===void 0||(go=Ao).call.apply(go,[Li].concat(Fo))}});const ur=[_n["aria-required"],_n["aria-invalid"],_n["aria-describedby"]];mi=C.createElement(N,{value:Ri[x.valuePropName||"value"],update:Ft,childProps:ur},(0,wt.Tm)(Ft,_n))}else Kn&&(Ke||B)&&!Hn?mi=Ft(or):mi=Ft}return yr(mi,Ii,zi)}))}const Xe=te;Xe.useStatus=Nt;var Le=Xe,Te=function(x,A){var H={};for(var W in x)Object.prototype.hasOwnProperty.call(x,W)&&A.indexOf(W)<0&&(H[W]=x[W]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,W=Object.getOwnPropertySymbols(x);B<W.length;B++)A.indexOf(W[B])<0&&Object.prototype.propertyIsEnumerable.call(x,W[B])&&(H[W[B]]=x[W[B]]);return H},jt=x=>{var{prefixCls:A,children:H}=x,W=Te(x,["prefixCls","children"]);const{getPrefixCls:B}=C.useContext(at.E_),Z=B("form",A),Ke=C.useMemo(()=>({prefixCls:Z,status:"error"}),[Z]);return C.createElement(be.List,Object.assign({},W),(At,dt,Re)=>C.createElement(m.Rk.Provider,{value:Ke},H(At.map(De=>Object.assign(Object.assign({},De),{fieldKey:De.key})),dt,{errors:Re.errors,warnings:Re.warnings})))};function qt(){const{form:x}=(0,C.useContext)(m.q3);return x}const Lt=Se;Lt.Item=Le,Lt.List=jt,Lt.ErrorList=ae,Lt.useForm=It,Lt.useFormInstance=qt,Lt.useWatch=be.useWatch,Lt.Provider=m.RV,Lt.create=()=>{};var ft=Lt},82586:function(hn,he,h){"use strict";h.d(he,{Z:function(){return ot},n:function(){return P}});var T=h(16646),Y=h(94184),O=h.n(Y),q=h(67656),C=h(17799),E=h(67294),m=h(9708),ce=h(53124),V=h(98866),v=h(98675),xe=h(65223),se=h(4173),pe=h(72922),ye=h(47673);function we(_){return!!(_.prefix||_.suffix||_.allowClear)}var fe=function(_,ie){var y={};for(var g in _)Object.prototype.hasOwnProperty.call(_,g)&&ie.indexOf(g)<0&&(y[g]=_[g]);if(_!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,g=Object.getOwnPropertySymbols(_);I<g.length;I++)ie.indexOf(g[I])<0&&Object.prototype.propertyIsEnumerable.call(_,g[I])&&(y[g[I]]=_[g[I]]);return y};function P(_,ie){if(!_)return;_.focus(ie);const{cursor:y}=ie||{};if(y){const g=_.value.length;switch(y){case"start":_.setSelectionRange(0,0);break;case"end":_.setSelectionRange(g,g);break;default:_.setSelectionRange(0,g);break}}}var ot=(0,E.forwardRef)((_,ie)=>{var y;const{prefixCls:g,bordered:I=!0,status:F,size:ee,disabled:$,onBlur:$e,onFocus:ne,suffix:ae,allowClear:be,addonAfter:at,addonBefore:gt,className:nt,style:Ot,styles:ut,rootClassName:rt,onChange:Ze,classNames:_e}=_,Zt=fe(_,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:an,direction:ct,input:It}=E.useContext(ce.E_),vt=an("input",g),$n=(0,E.useRef)(null),[hr,Pe]=(0,ye.ZP)(vt),{compactSize:Se,compactItemClassnames:Ye}=(0,se.ri)(vt,ct),Me=(0,v.Z)(En=>{var pr;return(pr=ee!=null?ee:Se)!==null&&pr!==void 0?pr:En}),wt=E.useContext(V.Z),$t=$!=null?$:wt,{status:Dt,hasFeedback:pt,feedbackIcon:Nt}=(0,E.useContext)(xe.aM),Wt=(0,m.F)(Dt,F),Jt=we(_)||!!pt,ln=(0,E.useRef)(Jt);(0,E.useEffect)(()=>{var En;Jt&&ln.current,ln.current=Jt},[Jt]);const Kt=(0,pe.Z)($n,!0),Et=En=>{Kt(),$e==null||$e(En)},wn=En=>{Kt(),ne==null||ne(En)},un=En=>{Kt(),Ze==null||Ze(En)},bn=(pt||ae)&&E.createElement(E.Fragment,null,ae,pt&&Nt);let gr;return typeof be=="object"&&(be!=null&&be.clearIcon)?gr=be:be&&(gr={clearIcon:E.createElement(T.Z,null)}),hr(E.createElement(q.default,Object.assign({ref:(0,C.sQ)(ie,$n),prefixCls:vt,autoComplete:It==null?void 0:It.autoComplete},Zt,{disabled:$t,onBlur:Et,onFocus:wn,style:Object.assign(Object.assign({},It==null?void 0:It.style),Ot),styles:Object.assign(Object.assign({},It==null?void 0:It.styles),ut),suffix:bn,allowClear:gr,className:O()(nt,rt,Ye,It==null?void 0:It.className),onChange:un,addonAfter:at&&E.createElement(se.BR,null,E.createElement(xe.Ux,{override:!0,status:!0},at)),addonBefore:gt&&E.createElement(se.BR,null,E.createElement(xe.Ux,{override:!0,status:!0},gt)),classNames:Object.assign(Object.assign(Object.assign({},_e),It==null?void 0:It.classNames),{input:O()({[`${vt}-sm`]:Me==="small",[`${vt}-lg`]:Me==="large",[`${vt}-rtl`]:ct==="rtl",[`${vt}-borderless`]:!I},!Jt&&(0,m.Z)(vt,Wt),_e==null?void 0:_e.input,(y=It==null?void 0:It.classNames)===null||y===void 0?void 0:y.input,Pe)}),classes:{affixWrapper:O()({[`${vt}-affix-wrapper-sm`]:Me==="small",[`${vt}-affix-wrapper-lg`]:Me==="large",[`${vt}-affix-wrapper-rtl`]:ct==="rtl",[`${vt}-affix-wrapper-borderless`]:!I},(0,m.Z)(`${vt}-affix-wrapper`,Wt,pt),Pe),wrapper:O()({[`${vt}-group-rtl`]:ct==="rtl"},Pe),group:O()({[`${vt}-group-wrapper-sm`]:Me==="small",[`${vt}-group-wrapper-lg`]:Me==="large",[`${vt}-group-wrapper-rtl`]:ct==="rtl",[`${vt}-group-wrapper-disabled`]:$t},(0,m.Z)(`${vt}-group-wrapper`,Wt,pt),Pe)}})))})},96330:function(hn,he,h){"use strict";var T=h(16646),Y=h(94184),O=h.n(Y),q=h(64701),C=h(67294),E=h(9708),m=h(53124),ce=h(98866),V=h(98675),v=h(65223),xe=h(82586),se=h(47673),pe=function(we,fe){var P={};for(var Ee in we)Object.prototype.hasOwnProperty.call(we,Ee)&&fe.indexOf(Ee)<0&&(P[Ee]=we[Ee]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,Ee=Object.getOwnPropertySymbols(we);ot<Ee.length;ot++)fe.indexOf(Ee[ot])<0&&Object.prototype.propertyIsEnumerable.call(we,Ee[ot])&&(P[Ee[ot]]=we[Ee[ot]]);return P};const ye=(0,C.forwardRef)((we,fe)=>{const{prefixCls:P,bordered:Ee=!0,size:ot,disabled:_,status:ie,allowClear:y,showCount:g,classNames:I,rootClassName:F,className:ee}=we,$=pe(we,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:$e,direction:ne}=C.useContext(m.E_),ae=(0,V.Z)(ot),be=C.useContext(ce.Z),at=_!=null?_:be,{status:gt,hasFeedback:nt,feedbackIcon:Ot}=C.useContext(v.aM),ut=(0,E.F)(gt,ie),rt=C.useRef(null);C.useImperativeHandle(fe,()=>{var ct;return{resizableTextArea:(ct=rt.current)===null||ct===void 0?void 0:ct.resizableTextArea,focus:It=>{var vt,$n;(0,xe.n)(($n=(vt=rt.current)===null||vt===void 0?void 0:vt.resizableTextArea)===null||$n===void 0?void 0:$n.textArea,It)},blur:()=>{var It;return(It=rt.current)===null||It===void 0?void 0:It.blur()}}});const Ze=$e("input",P);let _e;typeof y=="object"&&(y!=null&&y.clearIcon)?_e=y:y&&(_e={clearIcon:C.createElement(T.Z,null)});const[Zt,an]=(0,se.ZP)(Ze);return Zt(C.createElement(q.default,Object.assign({},$,{disabled:at,allowClear:_e,className:O()(ee,F),classes:{affixWrapper:O()(`${Ze}-textarea-affix-wrapper`,{[`${Ze}-affix-wrapper-rtl`]:ne==="rtl",[`${Ze}-affix-wrapper-borderless`]:!Ee,[`${Ze}-affix-wrapper-sm`]:ae==="small",[`${Ze}-affix-wrapper-lg`]:ae==="large",[`${Ze}-textarea-show-count`]:g},(0,E.Z)(`${Ze}-affix-wrapper`,ut),an)},classNames:Object.assign(Object.assign({},I),{textarea:O()({[`${Ze}-borderless`]:!Ee,[`${Ze}-sm`]:ae==="small",[`${Ze}-lg`]:ae==="large"},(0,E.Z)(Ze,ut),an,I==null?void 0:I.textarea)}),prefixCls:Ze,suffix:nt&&C.createElement("span",{className:`${Ze}-textarea-suffix`},Ot),showCount:g,ref:rt})))});he.Z=ye},72922:function(hn,he,h){"use strict";h.d(he,{Z:function(){return Y}});var T=h(67294);function Y(O,q){const C=(0,T.useRef)([]),E=()=>{C.current.push(setTimeout(()=>{var m,ce,V,v;!((m=O.current)===null||m===void 0)&&m.input&&((ce=O.current)===null||ce===void 0?void 0:ce.input.getAttribute("type"))==="password"&&(!((V=O.current)===null||V===void 0)&&V.input.hasAttribute("value"))&&((v=O.current)===null||v===void 0||v.input.removeAttribute("value"))}))};return(0,T.useEffect)(()=>(q&&E(),()=>C.current.forEach(m=>{m&&clearTimeout(m)})),[]),E}},69677:function(hn,he,h){"use strict";h.d(he,{default:function(){return ae}});var T=h(94184),Y=h.n(T),O=h(67294),q=h(53124),C=h(65223),E=h(47673),ce=be=>{const{getPrefixCls:at,direction:gt}=(0,O.useContext)(q.E_),{prefixCls:nt,className:Ot}=be,ut=at("input-group",nt),rt=at("input"),[Ze,_e]=(0,E.ZP)(rt),Zt=Y()(ut,{[`${ut}-lg`]:be.size==="large",[`${ut}-sm`]:be.size==="small",[`${ut}-compact`]:be.compact,[`${ut}-rtl`]:gt==="rtl"},_e,Ot),an=(0,O.useContext)(C.aM),ct=(0,O.useMemo)(()=>Object.assign(Object.assign({},an),{isFormItemInput:!1}),[an]);return Ze(O.createElement("span",{className:Zt,style:be.style,onMouseEnter:be.onMouseEnter,onMouseLeave:be.onMouseLeave,onFocus:be.onFocus,onBlur:be.onBlur},O.createElement(C.aM.Provider,{value:ct},be.children)))},V=h(82586),v=h(63237),xe=h(99569),se=h(10366),pe=h(17799),ye=h(72922),we=function(be,at){var gt={};for(var nt in be)Object.prototype.hasOwnProperty.call(be,nt)&&at.indexOf(nt)<0&&(gt[nt]=be[nt]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ot=0,nt=Object.getOwnPropertySymbols(be);Ot<nt.length;Ot++)at.indexOf(nt[Ot])<0&&Object.prototype.propertyIsEnumerable.call(be,nt[Ot])&&(gt[nt[Ot]]=be[nt[Ot]]);return gt};const fe=be=>be?O.createElement(xe.Z,null):O.createElement(v.Z,null),P={click:"onClick",hover:"onMouseOver"};var ot=O.forwardRef((be,at)=>{const{visibilityToggle:gt=!0}=be,nt=typeof gt=="object"&>.visible!==void 0,[Ot,ut]=(0,O.useState)(()=>nt?gt.visible:!1),rt=(0,O.useRef)(null);O.useEffect(()=>{nt&&ut(gt.visible)},[nt,gt]);const Ze=(0,ye.Z)(rt),_e=()=>{const{disabled:$t}=be;$t||(Ot&&Ze(),ut(Dt=>{var pt;const Nt=!Dt;return typeof gt=="object"&&((pt=gt.onVisibleChange)===null||pt===void 0||pt.call(gt,Nt)),Nt}))},Zt=$t=>{const{action:Dt="click",iconRender:pt=fe}=be,Nt=P[Dt]||"",Wt=pt(Ot),Jt={[Nt]:_e,className:`${$t}-icon`,key:"passwordIcon",onMouseDown:ln=>{ln.preventDefault()},onMouseUp:ln=>{ln.preventDefault()}};return O.cloneElement(O.isValidElement(Wt)?Wt:O.createElement("span",null,Wt),Jt)},{className:an,prefixCls:ct,inputPrefixCls:It,size:vt}=be,$n=we(be,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:hr}=O.useContext(q.E_),Pe=hr("input",It),Se=hr("input-password",ct),Ye=gt&&Zt(Se),Me=Y()(Se,an,{[`${Se}-${vt}`]:!!vt}),wt=Object.assign(Object.assign({},(0,se.Z)($n,["suffix","iconRender","visibilityToggle"])),{type:Ot?"text":"password",className:Me,prefixCls:Pe,suffix:Ye});return vt&&(wt.size=vt),O.createElement(V.Z,Object.assign({ref:(0,pe.sQ)(at,rt)},wt))}),_=h(72395),ie=h(96159),y=h(71577),g=h(98675),I=h(4173),F=function(be,at){var gt={};for(var nt in be)Object.prototype.hasOwnProperty.call(be,nt)&&at.indexOf(nt)<0&&(gt[nt]=be[nt]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ot=0,nt=Object.getOwnPropertySymbols(be);Ot<nt.length;Ot++)at.indexOf(nt[Ot])<0&&Object.prototype.propertyIsEnumerable.call(be,nt[Ot])&&(gt[nt[Ot]]=be[nt[Ot]]);return gt},$=O.forwardRef((be,at)=>{const{prefixCls:gt,inputPrefixCls:nt,className:Ot,size:ut,suffix:rt,enterButton:Ze=!1,addonAfter:_e,loading:Zt,disabled:an,onSearch:ct,onChange:It,onCompositionStart:vt,onCompositionEnd:$n}=be,hr=F(be,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Pe,direction:Se}=O.useContext(q.E_),Ye=O.useRef(!1),Me=Pe("input-search",gt),wt=Pe("input",nt),{compactSize:$t}=(0,I.ri)(Me,Se),Dt=(0,g.Z)(me=>{var Dn;return(Dn=ut!=null?ut:$t)!==null&&Dn!==void 0?Dn:me}),pt=O.useRef(null),Nt=me=>{me&&me.target&&me.type==="click"&&ct&&ct(me.target.value,me,{source:"clear"}),It&&It(me)},Wt=me=>{var Dn;document.activeElement===((Dn=pt.current)===null||Dn===void 0?void 0:Dn.input)&&me.preventDefault()},Jt=me=>{var Dn,On;ct&&ct((On=(Dn=pt.current)===null||Dn===void 0?void 0:Dn.input)===null||On===void 0?void 0:On.value,me,{source:"input"})},ln=me=>{Ye.current||Zt||Jt(me)},Kt=typeof Ze=="boolean"?O.createElement(_.Z,null):null,Et=`${Me}-button`;let wn;const un=Ze||{},bn=un.type&&un.type.__ANT_BUTTON===!0;bn||un.type==="button"?wn=(0,ie.Tm)(un,Object.assign({onMouseDown:Wt,onClick:me=>{var Dn,On;(On=(Dn=un==null?void 0:un.props)===null||Dn===void 0?void 0:Dn.onClick)===null||On===void 0||On.call(Dn,me),Jt(me)},key:"enterButton"},bn?{className:Et,size:Dt}:{})):wn=O.createElement(y.ZP,{className:Et,type:Ze?"primary":void 0,size:Dt,disabled:an,key:"enterButton",onMouseDown:Wt,onClick:Jt,loading:Zt,icon:Kt},Ze),_e&&(wn=[wn,(0,ie.Tm)(_e,{key:"addonAfter"})]);const gr=Y()(Me,{[`${Me}-rtl`]:Se==="rtl",[`${Me}-${Dt}`]:!!Dt,[`${Me}-with-button`]:!!Ze},Ot),En=me=>{Ye.current=!0,vt==null||vt(me)},pr=me=>{Ye.current=!1,$n==null||$n(me)};return O.createElement(V.Z,Object.assign({ref:(0,pe.sQ)(pt,at),onPressEnter:ln},hr,{size:Dt,onCompositionStart:En,onCompositionEnd:pr,prefixCls:wt,addonAfter:wn,suffix:rt,onChange:Nt,className:gr,disabled:an}))}),$e=h(96330);const ne=V.Z;ne.Group=ce,ne.Search=$,ne.TextArea=$e.Z,ne.Password=ot;var ae=ne},47673:function(hn,he,h){"use strict";h.d(he,{M1:function(){return m},TM:function(){return ie},Xy:function(){return ce},bi:function(){return xe},e5:function(){return _},ik:function(){return se},nz:function(){return C},pU:function(){return E},s7:function(){return pe},x0:function(){return v}});var T=h(14747),Y=h(80110),O=h(45503),q=h(67968);const C=y=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:y,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),E=y=>({borderColor:y.hoverBorderColor}),m=y=>({borderColor:y.activeBorderColor,boxShadow:y.activeShadow,outline:0}),ce=y=>({color:y.colorTextDisabled,backgroundColor:y.colorBgContainerDisabled,borderColor:y.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},E((0,O.TS)(y,{hoverBorderColor:y.colorBorder})))}),V=y=>{const{paddingBlockLG:g,fontSizeLG:I,lineHeightLG:F,borderRadiusLG:ee,paddingInlineLG:$}=y;return{padding:`${g}px ${$}px`,fontSize:I,lineHeight:F,borderRadius:ee}},v=y=>({padding:`${y.paddingBlockSM}px ${y.paddingInlineSM}px`,borderRadius:y.borderRadiusSM}),xe=(y,g)=>{const{componentCls:I,colorError:F,colorWarning:ee,errorActiveShadow:$,warningActiveShadow:$e,colorErrorBorderHover:ne,colorWarningBorderHover:ae}=y;return{[`&-status-error:not(${g}-disabled):not(${g}-borderless)${g}`]:{borderColor:F,"&:hover":{borderColor:ne},"&:focus, &-focused":Object.assign({},m((0,O.TS)(y,{activeBorderColor:F,activeShadow:$}))),[`${I}-prefix, ${I}-suffix`]:{color:F}},[`&-status-warning:not(${g}-disabled):not(${g}-borderless)${g}`]:{borderColor:ee,"&:hover":{borderColor:ae},"&:focus, &-focused":Object.assign({},m((0,O.TS)(y,{activeBorderColor:ee,activeShadow:$e}))),[`${I}-prefix, ${I}-suffix`]:{color:ee}}}},se=y=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${y.paddingBlock}px ${y.paddingInline}px`,color:y.colorText,fontSize:y.fontSize,lineHeight:y.lineHeight,backgroundColor:y.colorBgContainer,backgroundImage:"none",borderWidth:y.lineWidth,borderStyle:y.lineType,borderColor:y.colorBorder,borderRadius:y.borderRadius,transition:`all ${y.motionDurationMid}`},C(y.colorTextPlaceholder)),{"&:hover":Object.assign({},E(y)),"&:focus, &-focused":Object.assign({},m(y)),"&-disabled, &[disabled]":Object.assign({},ce(y)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:y.controlHeight,lineHeight:y.lineHeight,verticalAlign:"bottom",transition:`all ${y.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},V(y)),"&-sm":Object.assign({},v(y)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),pe=y=>{const{componentCls:g,antCls:I}=y;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:y.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${g}, &-lg > ${g}-group-addon`]:Object.assign({},V(y)),[`&-sm ${g}, &-sm > ${g}-group-addon`]:Object.assign({},v(y)),[`&-lg ${I}-select-single ${I}-select-selector`]:{height:y.controlHeightLG},[`&-sm ${I}-select-single ${I}-select-selector`]:{height:y.controlHeightSM},[`> ${g}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${g}-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 ${y.paddingInline}px`,color:y.colorText,fontWeight:"normal",fontSize:y.fontSize,textAlign:"center",backgroundColor:y.colorFillAlter,border:`${y.lineWidth}px ${y.lineType} ${y.colorBorder}`,borderRadius:y.borderRadius,transition:`all ${y.motionDurationSlow}`,lineHeight:1,[`${I}-select`]:{margin:`-${y.paddingBlock+1}px -${y.paddingInline}px`,[`&${I}-select-single:not(${I}-select-customize-input)`]:{[`${I}-select-selector`]:{backgroundColor:"inherit",border:`${y.lineWidth}px ${y.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${I}-select-selector`]:{color:y.colorPrimary}}},[`${I}-cascader-picker`]:{margin:`-9px -${y.paddingInline}px`,backgroundColor:"transparent",[`${I}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${g}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${g}-search-with-button &`]:{zIndex:0}}},[`> ${g}:first-child, ${g}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${I}-select ${I}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${g}-affix-wrapper`]:{[`&:not(:first-child) ${g}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${g}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${g}:last-child, ${g}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${I}-select ${I}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${g}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${g}-search &`]:{borderStartStartRadius:y.borderRadius,borderEndStartRadius:y.borderRadius}},[`&:not(:first-child), ${g}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${g}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,T.dF)()),{[`${g}-group-addon, ${g}-group-wrap, > ${g}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:y.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${g}-affix-wrapper,
|
|
|
& > ${g}-number-affix-wrapper,
|
|
|
& > ${I}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-y.lineWidth,borderInlineEndWidth:y.lineWidth},[`${g}`]:{float:"none"},[`& > ${I}-select > ${I}-select-selector,
|
|
|
& > ${I}-select-auto-complete ${g},
|
|
|
& > ${I}-cascader-picker ${g},
|
|
|
& > ${g}-group-wrapper ${g}`]:{borderInlineEndWidth:y.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${I}-select-focused`]:{zIndex:1},[`& > ${I}-select > ${I}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${I}-select:first-child > ${I}-select-selector,
|
|
|
& > ${I}-select-auto-complete:first-child ${g},
|
|
|
& > ${I}-cascader-picker:first-child ${g}`]:{borderStartStartRadius:y.borderRadius,borderEndStartRadius:y.borderRadius},[`& > *:last-child,
|
|
|
& > ${I}-select:last-child > ${I}-select-selector,
|
|
|
& > ${I}-cascader-picker:last-child ${g},
|
|
|
& > ${I}-cascader-picker-focused:last-child ${g}`]:{borderInlineEndWidth:y.lineWidth,borderStartEndRadius:y.borderRadius,borderEndEndRadius:y.borderRadius},[`& > ${I}-select-auto-complete ${g}`]:{verticalAlign:"top"},[`${g}-group-wrapper + ${g}-group-wrapper`]:{marginInlineStart:-y.lineWidth,[`${g}-affix-wrapper`]:{borderRadius:0}},[`${g}-group-wrapper:not(:last-child)`]:{[`&${g}-search > ${g}-group`]:{[`& > ${g}-group-addon > ${g}-search-button`]:{borderRadius:0},[`& > ${g}`]:{borderStartStartRadius:y.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:y.borderRadius}}}})}},ye=y=>{const{componentCls:g,controlHeightSM:I,lineWidth:F}=y,$=(I-F*2-16)/2;return{[g]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,T.Wf)(y)),se(y)),xe(y,g)),{'&[type="color"]':{height:y.controlHeight,[`&${g}-lg`]:{height:y.controlHeightLG},[`&${g}-sm`]:{height:I,paddingTop:$,paddingBottom:$}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},we=y=>{const{componentCls:g}=y;return{[`${g}-clear-icon`]:{margin:0,color:y.colorTextQuaternary,fontSize:y.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${y.motionDurationSlow}`,"&:hover":{color:y.colorTextTertiary},"&:active":{color:y.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${y.inputAffixPadding}px`}}}},fe=y=>{const{componentCls:g,inputAffixPadding:I,colorTextDescription:F,motionDurationSlow:ee,colorIcon:$,colorIconHover:$e,iconCls:ne}=y;return{[`${g}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},se(y)),{display:"inline-flex",[`&:not(${g}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},E(y)),{zIndex:1,[`${g}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${g}[disabled]`]:{background:"transparent"}},[`> input${g}`]:{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"'},[`${g}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:y.paddingXS}},"&-show-count-suffix":{color:F},"&-show-count-has-suffix":{marginInlineEnd:y.paddingXXS},"&-prefix":{marginInlineEnd:I},"&-suffix":{marginInlineStart:I}}}),we(y)),{[`${ne}${g}-password-icon`]:{color:$,cursor:"pointer",transition:`all ${ee}`,"&:hover":{color:$e}}}),xe(y,`${g}-affix-wrapper`))}},P=y=>{const{componentCls:g,colorError:I,colorWarning:F,borderRadiusLG:ee,borderRadiusSM:$}=y;return{[`${g}-group`]:Object.assign(Object.assign(Object.assign({},(0,T.Wf)(y)),pe(y)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${g}-group-addon`]:{borderRadius:ee,fontSize:y.fontSizeLG}},"&-sm":{[`${g}-group-addon`]:{borderRadius:$}},"&-status-error":{[`${g}-group-addon`]:{color:I,borderColor:I}},"&-status-warning":{[`${g}-group-addon`]:{color:F,borderColor:F}},"&-disabled":{[`${g}-group-addon`]:Object.assign({},ce(y))},[`&:not(${g}-compact-first-item):not(${g}-compact-last-item)${g}-compact-item`]:{[`${g}, ${g}-group-addon`]:{borderRadius:0}},[`&:not(${g}-compact-last-item)${g}-compact-first-item`]:{[`${g}, ${g}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${g}-compact-first-item)${g}-compact-last-item`]:{[`${g}, ${g}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Ee=y=>{const{componentCls:g,antCls:I}=y,F=`${g}-search`;return{[F]:{[`${g}`]:{"&:hover, &:focus":{borderColor:y.colorPrimaryHover,[`+ ${g}-group-addon ${F}-button:not(${I}-btn-primary)`]:{borderInlineStartColor:y.colorPrimaryHover}}},[`${g}-affix-wrapper`]:{borderRadius:0},[`${g}-lg`]:{lineHeight:y.lineHeightLG-2e-4},[`> ${g}-group`]:{[`> ${g}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${F}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:y.borderRadius,borderEndEndRadius:y.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${F}-button:not(${I}-btn-primary)`]:{color:y.colorTextDescription,"&:hover":{color:y.colorPrimaryHover},"&:active":{color:y.colorPrimaryActive},[`&${I}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${F}-button`]:{height:y.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${F}-button`]:{height:y.controlHeightLG},[`&-small ${F}-button`]:{height:y.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${g}-compact-item`]:{[`&:not(${g}-compact-last-item)`]:{[`${g}-group-addon`]:{[`${g}-search-button`]:{marginInlineEnd:-y.lineWidth,borderRadius:0}}},[`&:not(${g}-compact-first-item)`]:{[`${g},${g}-affix-wrapper`]:{borderRadius:0}},[`> ${g}-group-addon ${g}-search-button,
|
|
|
> ${g},
|
|
|
${g}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${g}-affix-wrapper-focused`]:{zIndex:2}}}}},ot=y=>{const{componentCls:g,paddingLG:I}=y,F=`${g}-textarea`;return{[F]:{position:"relative","&-show-count":{[`> ${g}`]:{height:"100%"},[`${g}-data-count`]:{position:"absolute",bottom:-y.fontSize*y.lineHeight,insetInlineEnd:0,color:y.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${g}`]:{paddingInlineEnd:I}},[`&-affix-wrapper${F}-has-feedback`]:{[`${g}`]:{paddingInlineEnd:I}},[`&-affix-wrapper${g}-affix-wrapper`]:{padding:0,[`> textarea${g}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${g}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${g}-clear-icon`]:{position:"absolute",insetInlineEnd:y.paddingXS,insetBlockStart:y.paddingXS},[`${F}-suffix`]:{position:"absolute",top:0,insetInlineEnd:y.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function _(y){return(0,O.TS)(y,{inputAffixPadding:y.paddingXXS})}const ie=y=>{const{controlHeight:g,fontSize:I,lineHeight:F,lineWidth:ee,controlHeightSM:$,controlHeightLG:$e,fontSizeLG:ne,lineHeightLG:ae,paddingSM:be,controlPaddingHorizontalSM:at,controlPaddingHorizontal:gt,colorFillAlter:nt,colorPrimaryHover:Ot,controlOutlineWidth:ut,controlOutline:rt,colorErrorOutline:Ze,colorWarningOutline:_e}=y;return{paddingBlock:Math.max(Math.round((g-I*F)/2*10)/10-ee,3),paddingBlockSM:Math.max(Math.round(($-I*F)/2*10)/10-ee,0),paddingBlockLG:Math.ceil(($e-ne*ae)/2*10)/10-ee,paddingInline:be-ee,paddingInlineSM:at-ee,paddingInlineLG:gt-ee,addonBg:nt,activeBorderColor:Ot,hoverBorderColor:Ot,activeShadow:`0 0 0 ${ut}px ${rt}`,errorActiveShadow:`0 0 0 ${ut}px ${Ze}`,warningActiveShadow:`0 0 0 ${ut}px ${_e}`}};he.ZP=(0,q.Z)("Input",y=>{const g=(0,O.TS)(y,_(y));return[ye(g),ot(g),fe(g),P(g),Ee(g),(0,Y.c)(g)]},ie)},42563:function(hn,he,h){"use strict";h.d(he,{default:function(){return eu}});var T=h(94184),Y=h.n(T),O=h(87462),q=h(74902),C=h(4942),E=h(1413),m=h(97685),ce=h(45987),V=h(71002),v=h(67294),xe=h.t(v,2);function se(l){var u=v.useRef();u.current=l;var d=v.useCallback(function(){for(var p,S=arguments.length,M=new Array(S),R=0;R<S;R++)M[R]=arguments[R];return(p=u.current)===null||p===void 0?void 0:p.call.apply(p,[u].concat(M))},[]);return d}function pe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ye=pe()?v.useLayoutEffect:v.useEffect,we=ye,fe=function(u,d){var p=v.useRef(!0);ye(function(){if(!p.current)return u()},d),ye(function(){return p.current=!1,function(){p.current=!0}},[])};function P(l){var u=v.useRef(!1),d=v.useState(l),p=(0,m.Z)(d,2),S=p[0],M=p[1];v.useEffect(function(){return u.current=!1,function(){u.current=!0}},[]);function R(z,U){U&&u.current||M(z)}return[S,R]}function Ee(l){return l!==void 0}function ot(l,u){var d=u||{},p=d.defaultValue,S=d.value,M=d.onChange,R=d.postState,z=P(function(){return Ee(S)?S:Ee(p)?typeof p=="function"?p():p:typeof l=="function"?l():l}),U=(0,m.Z)(z,2),j=U[0],Q=U[1],G=S!==void 0?S:j,ue=R?R(G):G,K=se(M),le=P([G]),Fe=(0,m.Z)(le,2),Oe=Fe[0],We=Fe[1];fe(function(){var Ce=Oe[0];j!==Ce&&K(j,Ce)},[Oe]),fe(function(){Ee(S)||Q(S)},[S]);var He=se(function(Ce,de){Q(Ce,de),We([G],de)});return[ue,He]}var _={};function ie(l,u){}function y(l,u){}function g(){_={}}function I(l,u,d){!u&&!_[d]&&(l(!1,d),_[d]=!0)}function F(l,u){I(ie,l,u)}function ee(l,u){I(y,l,u)}var $=F,$e=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var l=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(l)||/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(l==null?void 0:l.substr(0,4))},ne={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(u){var d=u.keyCode;if(u.altKey&&!u.ctrlKey||u.metaKey||d>=ne.F1&&d<=ne.F12)return!1;switch(d){case ne.ALT:case ne.CAPS_LOCK:case ne.CONTEXT_MENU:case ne.CTRL:case ne.DOWN:case ne.END:case ne.ESC:case ne.HOME:case ne.INSERT:case ne.LEFT:case ne.MAC_FF_META:case ne.META:case ne.NUMLOCK:case ne.NUM_CENTER:case ne.PAGE_DOWN:case ne.PAGE_UP:case ne.PAUSE:case ne.PRINT_SCREEN:case ne.RIGHT:case ne.SHIFT:case ne.UP:case ne.WIN_KEY:case ne.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(u){if(u>=ne.ZERO&&u<=ne.NINE||u>=ne.NUM_ZERO&&u<=ne.NUM_MULTIPLY||u>=ne.A&&u<=ne.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&u===0)return!0;switch(u){case ne.SPACE:case ne.QUESTION_MARK:case ne.NUM_PLUS:case ne.NUM_MINUS:case ne.NUM_PERIOD:case ne.NUM_DIVISION:case ne.SEMICOLON:case ne.DASH:case ne.EQUALS:case ne.COMMA:case ne.PERIOD:case ne.SLASH:case ne.APOSTROPHE:case ne.SINGLE_QUOTE:case ne.OPEN_SQUARE_BRACKET:case ne.BACKSLASH:case ne.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ae=ne,be=h(47655);function at(l,u,d){var p=v.useRef({});return(!("value"in p.current)||d(p.current.condition,u))&&(p.current.value=l(),p.current.condition=u),p.current.value}function gt(l,u){typeof l=="function"?l(u):(0,V.Z)(l)==="object"&&l&&"current"in l&&(l.current=u)}function nt(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var p=u.filter(function(S){return S});return p.length<=1?p[0]:function(S){u.forEach(function(M){gt(M,S)})}}function Ot(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return at(function(){return nt.apply(void 0,u)},u,function(p,S){return p.length===S.length&&p.every(function(M,R){return M===S[R]})})}function ut(l){var u,d,p=(0,be.isMemo)(l)?l.type.type:l.type;return!(typeof p=="function"&&!((u=p.prototype)!==null&&u!==void 0&&u.render)||typeof l=="function"&&!((d=l.prototype)!==null&&d!==void 0&&d.render))}var rt=function(u){var d=u.className,p=u.customizeIcon,S=u.customizeIconProps,M=u.onMouseDown,R=u.onClick,z=u.children,U;return typeof p=="function"?U=p(S):U=p,v.createElement("span",{className:d,onMouseDown:function(Q){Q.preventDefault(),M&&M(Q)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:R,"aria-hidden":!0},U!==void 0?U:v.createElement("span",{className:Y()(d.split(/\s+/).map(function(j){return"".concat(j,"-icon")}))},z))},Ze=rt;function _e(l,u,d,p,S){var M=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,R=arguments.length>6?arguments[6]:void 0,z=arguments.length>7?arguments[7]:void 0,U=v.useMemo(function(){if((0,V.Z)(p)==="object")return p.clearIcon;if(S)return S},[p,S]),j=v.useMemo(function(){return!!(!M&&p&&(d.length||R)&&!(z==="combobox"&&R===""))},[p,M,d.length,R,z]);return{allowClear:j,clearIcon:v.createElement(Ze,{className:"".concat(l,"-clear"),onMouseDown:u,customizeIcon:U},"\xD7")}}var Zt=v.createContext(null);function an(){return v.useContext(Zt)}function ct(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,u=v.useState(!1),d=(0,m.Z)(u,2),p=d[0],S=d[1],M=v.useRef(null),R=function(){window.clearTimeout(M.current)};v.useEffect(function(){return R},[]);var z=function(j,Q){R(),M.current=window.setTimeout(function(){S(j),Q&&Q()},l)};return[p,z,R]}function It(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,u=v.useRef(null),d=v.useRef(null);v.useEffect(function(){return function(){window.clearTimeout(d.current)}},[]);function p(S){(S||u.current===null)&&(u.current=S),window.clearTimeout(d.current),d.current=window.setTimeout(function(){u.current=null},l)}return[function(){return u.current},p]}function vt(l,u,d,p){var S=v.useRef(null);S.current={open:u,triggerOpen:d,customizedTrigger:p},v.useEffect(function(){function M(R){var z;if(!((z=S.current)!==null&&z!==void 0&&z.customizedTrigger)){var U=R.target;U.shadowRoot&&R.composed&&(U=R.composedPath()[0]||U),S.current.open&&l().filter(function(j){return j}).every(function(j){return!j.contains(U)&&j!==U})&&S.current.triggerOpen(!1)}}return window.addEventListener("mousedown",M),function(){return window.removeEventListener("mousedown",M)}},[])}var $n=`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`,hr=`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`,Pe="".concat($n," ").concat(hr).split(/[\s\n]+/),Se="aria-",Ye="data-";function Me(l,u){return l.indexOf(u)===0}function wt(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d;u===!1?d={aria:!0,data:!0,attr:!0}:u===!0?d={aria:!0}:d=(0,E.Z)({},u);var p={};return Object.keys(l).forEach(function(S){(d.aria&&(S==="role"||Me(S,Se))||d.data&&Me(S,Ye)||d.attr&&Pe.includes(S))&&(p[S]=l[S])}),p}var $t=h(48555),Dt=h(14075),pt=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Nt=void 0;function Wt(l,u){var d=l.prefixCls,p=l.invalidate,S=l.item,M=l.renderItem,R=l.responsive,z=l.responsiveDisabled,U=l.registerSize,j=l.itemKey,Q=l.className,G=l.style,ue=l.children,K=l.display,le=l.order,Fe=l.component,Oe=Fe===void 0?"div":Fe,We=(0,ce.Z)(l,pt),He=R&&!K;function Ce(bt){U(j,bt)}v.useEffect(function(){return function(){Ce(null)}},[]);var de=M&&S!==Nt?M(S):ue,mt;p||(mt={opacity:He?0:1,height:He?0:Nt,overflowY:He?"hidden":Nt,order:R?le:Nt,pointerEvents:He?"none":Nt,position:He?"absolute":Nt});var Be={};He&&(Be["aria-hidden"]=!0);var yt=v.createElement(Oe,(0,O.Z)({className:Y()(!p&&d,Q),style:(0,E.Z)((0,E.Z)({},mt),G)},Be,We,{ref:u}),de);return R&&(yt=v.createElement($t.Z,{onResize:function(kt){var st=kt.offsetWidth;Ce(st)},disabled:z},yt)),yt}var Jt=v.forwardRef(Wt);Jt.displayName="Item";var ln=Jt,Kt=h(77527),Et=h(73935),wn=h(96523);function un(l){if(typeof MessageChannel=="undefined")(0,wn.Z)(l);else{var u=new MessageChannel;u.port1.onmessage=function(){return l()},u.port2.postMessage(void 0)}}function bn(){var l=v.useRef(null),u=function(p){l.current||(l.current=[],un(function(){(0,Et.unstable_batchedUpdates)(function(){l.current.forEach(function(S){S()}),l.current=null})})),l.current.push(p)};return u}function gr(l,u){var d=v.useState(u),p=(0,m.Z)(d,2),S=p[0],M=p[1],R=(0,Kt.Z)(function(z){l(function(){M(z)})});return[S,R]}var En=v.createContext(null),pr=["component"],me=["className"],Dn=["className"],On=function(u,d){var p=v.useContext(En);if(!p){var S=u.component,M=S===void 0?"div":S,R=(0,ce.Z)(u,pr);return v.createElement(M,(0,O.Z)({},R,{ref:d}))}var z=p.className,U=(0,ce.Z)(p,me),j=u.className,Q=(0,ce.Z)(u,Dn);return v.createElement(En.Provider,{value:null},v.createElement(ln,(0,O.Z)({ref:d,className:Y()(z,j)},U,Q)))},Nn=v.forwardRef(On);Nn.displayName="RawItem";var zn=Nn,Ai=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Ir="responsive",ii="invalidate";function rr(l){return"+ ".concat(l.length," ...")}function Fr(l,u){var d=l.prefixCls,p=d===void 0?"rc-overflow":d,S=l.data,M=S===void 0?[]:S,R=l.renderItem,z=l.renderRawItem,U=l.itemKey,j=l.itemWidth,Q=j===void 0?10:j,G=l.ssr,ue=l.style,K=l.className,le=l.maxCount,Fe=l.renderRest,Oe=l.renderRawRest,We=l.suffix,He=l.component,Ce=He===void 0?"div":He,de=l.itemComponent,mt=l.onVisibleChange,Be=(0,ce.Z)(l,Ai),yt=G==="full",bt=bn(),kt=gr(bt,null),st=(0,m.Z)(kt,2),it=st[0],Xt=st[1],Ht=it||0,Ct=gr(bt,new Map),qe=(0,m.Z)(Ct,2),Ve=qe[0],Ie=qe[1],xt=gr(bt,0),ht=(0,m.Z)(xt,2),An=ht[0],Rn=ht[1],cn=gr(bt,0),kn=(0,m.Z)(cn,2),rn=kn[0],jn=kn[1],Or=gr(bt,0),St=(0,m.Z)(Or,2),ke=St[0],et=St[1],tn=(0,v.useState)(null),sn=(0,m.Z)(tn,2),on=sn[0],Tt=sn[1],nn=(0,v.useState)(null),Tn=(0,m.Z)(nn,2),pn=Tn[0],Vt=Tn[1],Ge=v.useMemo(function(){return pn===null&&yt?Number.MAX_SAFE_INTEGER:pn||0},[pn,it]),fn=(0,v.useState)(!1),dn=(0,m.Z)(fn,2),mn=dn[0],br=dn[1],Sr="".concat(p,"-item"),cr=Math.max(An,rn),Cr=le===Ir,Cn=M.length&&Cr,Qn=le===ii,ar=Cn||typeof le=="number"&&M.length>le,Vn=(0,v.useMemo)(function(){var Ut=M;return Cn?it===null&&yt?Ut=M:Ut=M.slice(0,Math.min(M.length,Ht/Q)):typeof le=="number"&&(Ut=M.slice(0,le)),Ut},[M,Q,it,le,Cn]),xr=(0,v.useMemo)(function(){return Cn?M.slice(Ge+1):M.slice(Vn.length)},[M,Vn,Cn,Ge]),Xn=(0,v.useCallback)(function(Ut,ve){var tt;return typeof U=="function"?U(Ut):(tt=U&&(Ut==null?void 0:Ut[U]))!==null&&tt!==void 0?tt:ve},[U]),ei=(0,v.useCallback)(R||function(Ut){return Ut},[R]);function oi(Ut,ve,tt){pn===Ut&&(ve===void 0||ve===on)||(Vt(Ut),tt||(br(Ut<M.length-1),mt==null||mt(Ut)),ve!==void 0&&Tt(ve))}function gi(Ut,ve){Xt(ve.clientWidth)}function fr(Ut,ve){Ie(function(tt){var Qe=new Map(tt);return ve===null?Qe.delete(Ut):Qe.set(Ut,ve),Qe})}function Dr(Ut,ve){jn(ve),Rn(rn)}function bi(Ut,ve){et(ve)}function dr(Ut){return Ve.get(Xn(Vn[Ut],Ut))}(0,Dt.Z)(function(){if(Ht&&typeof cr=="number"&&Vn){var Ut=ke,ve=Vn.length,tt=ve-1;if(!ve){oi(0,null);return}for(var Qe=0;Qe<ve;Qe+=1){var Mt=dr(Qe);if(yt&&(Mt=Mt||0),Mt===void 0){oi(Qe-1,void 0,!0);break}if(Ut+=Mt,tt===0&&Ut<=Ht||Qe===tt-1&&Ut+dr(tt)<=Ht){oi(tt,null);break}else if(Ut+cr>Ht){oi(Qe-1,Ut-Mt-ke+rn);break}}We&&dr(0)+ke>Ht&&Tt(null)}},[Ht,Ve,rn,ke,Xn,Vn]);var zr=mn&&!!xr.length,Ui={};on!==null&&Cn&&(Ui={position:"absolute",left:on,top:0});var Wr={prefixCls:Sr,responsive:Cn,component:de,invalidate:Qn},ai=z?function(Ut,ve){var tt=Xn(Ut,ve);return v.createElement(En.Provider,{key:tt,value:(0,E.Z)((0,E.Z)({},Wr),{},{order:ve,item:Ut,itemKey:tt,registerSize:fr,display:ve<=Ge})},z(Ut,ve))}:function(Ut,ve){var tt=Xn(Ut,ve);return v.createElement(ln,(0,O.Z)({},Wr,{order:ve,key:tt,item:Ut,renderItem:ei,itemKey:tt,registerSize:fr,display:ve<=Ge}))},Yn,vn={order:zr?Ge:Number.MAX_SAFE_INTEGER,className:"".concat(Sr,"-rest"),registerSize:Dr,display:zr};if(Oe)Oe&&(Yn=v.createElement(En.Provider,{value:(0,E.Z)((0,E.Z)({},Wr),vn)},Oe(xr)));else{var Hr=Fe||rr;Yn=v.createElement(ln,(0,O.Z)({},Wr,vn),typeof Hr=="function"?Hr(xr):Hr)}var Zr=v.createElement(Ce,(0,O.Z)({className:Y()(!Qn&&p,K),style:ue,ref:u},Be),Vn.map(ai),ar?Yn:null,We&&v.createElement(ln,(0,O.Z)({},Wr,{responsive:Cr,responsiveDisabled:!Cn,order:Ge,className:"".concat(Sr,"-suffix"),registerSize:bi,display:!0,style:Ui}),We));return Cr&&(Zr=v.createElement($t.Z,{onResize:gi,disabled:!Cn},Zr)),Zr}var Qr=v.forwardRef(Fr);Qr.displayName="Overflow",Qr.Item=zn,Qr.RESPONSIVE=Ir,Qr.INVALIDATE=ii;var Ei=Qr,Yi=Ei,Qi=function(u,d){var p,S,M=u.prefixCls,R=u.id,z=u.inputElement,U=u.disabled,j=u.tabIndex,Q=u.autoFocus,G=u.autoComplete,ue=u.editable,K=u.activeDescendantId,le=u.value,Fe=u.maxLength,Oe=u.onKeyDown,We=u.onMouseDown,He=u.onChange,Ce=u.onPaste,de=u.onCompositionStart,mt=u.onCompositionEnd,Be=u.open,yt=u.attrs,bt=z||v.createElement("input",null),kt=bt,st=kt.ref,it=kt.props,Xt=it.onKeyDown,Ht=it.onChange,Ct=it.onMouseDown,qe=it.onCompositionStart,Ve=it.onCompositionEnd,Ie=it.style;return"maxLength"in bt.props,bt=v.cloneElement(bt,(0,E.Z)((0,E.Z)((0,E.Z)({type:"search"},it),{},{id:R,ref:nt(d,st),disabled:U,tabIndex:j,autoComplete:G||"off",autoFocus:Q,className:Y()("".concat(M,"-selection-search-input"),(p=bt)===null||p===void 0||(S=p.props)===null||S===void 0?void 0:S.className),role:"combobox","aria-label":"Search","aria-expanded":Be||!1,"aria-haspopup":"listbox","aria-owns":"".concat(R,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(R,"_list"),"aria-activedescendant":Be?K:void 0},yt),{},{value:ue?le:"",maxLength:Fe,readOnly:!ue,unselectable:ue?null:"on",style:(0,E.Z)((0,E.Z)({},Ie),{},{opacity:ue?null:0}),onKeyDown:function(ht){Oe(ht),Xt&&Xt(ht)},onMouseDown:function(ht){We(ht),Ct&&Ct(ht)},onChange:function(ht){He(ht),Ht&&Ht(ht)},onCompositionStart:function(ht){de(ht),qe&&qe(ht)},onCompositionEnd:function(ht){mt(ht),Ve&&Ve(ht)},onPaste:Ce})),bt},io=v.forwardRef(Qi);io.displayName="Input";var Mi=io;function Fi(l){return Array.isArray(l)?l:l!==void 0?[l]:[]}var $i=typeof window!="undefined"&&window.document&&window.document.documentElement,vo=$i;function N(l){return l!=null}function re(l){return!l&&l!==0}function J(l){return["string","number"].includes((0,V.Z)(l))}function te(l){var u=void 0;return l&&(J(l.title)?u=l.title.toString():J(l.label)&&(u=l.label.toString())),u}function Xe(l,u){vo?v.useLayoutEffect(l,u):v.useEffect(l,u)}function Le(l){var u;return(u=l.key)!==null&&u!==void 0?u:l.value}var Te=function(u){u.preventDefault(),u.stopPropagation()},Rt=function(u){var d=u.id,p=u.prefixCls,S=u.values,M=u.open,R=u.searchValue,z=u.autoClearSearchValue,U=u.inputRef,j=u.placeholder,Q=u.disabled,G=u.mode,ue=u.showSearch,K=u.autoFocus,le=u.autoComplete,Fe=u.activeDescendantId,Oe=u.tabIndex,We=u.removeIcon,He=u.maxTagCount,Ce=u.maxTagTextLength,de=u.maxTagPlaceholder,mt=de===void 0?function(Tt){return"+ ".concat(Tt.length," ...")}:de,Be=u.tagRender,yt=u.onToggleOpen,bt=u.onRemove,kt=u.onInputChange,st=u.onInputPaste,it=u.onInputKeyDown,Xt=u.onInputMouseDown,Ht=u.onInputCompositionStart,Ct=u.onInputCompositionEnd,qe=v.useRef(null),Ve=(0,v.useState)(0),Ie=(0,m.Z)(Ve,2),xt=Ie[0],ht=Ie[1],An=(0,v.useState)(!1),Rn=(0,m.Z)(An,2),cn=Rn[0],kn=Rn[1],rn="".concat(p,"-selection"),jn=M||G==="multiple"&&z===!1||G==="tags"?R:"",Or=G==="tags"||G==="multiple"&&z===!1||ue&&(M||cn);Xe(function(){ht(qe.current.scrollWidth)},[jn]);function St(Tt,nn,Tn,pn,Vt){return v.createElement("span",{className:Y()("".concat(rn,"-item"),(0,C.Z)({},"".concat(rn,"-item-disabled"),Tn)),title:te(Tt)},v.createElement("span",{className:"".concat(rn,"-item-content")},nn),pn&&v.createElement(Ze,{className:"".concat(rn,"-item-remove"),onMouseDown:Te,onClick:Vt,customizeIcon:We},"\xD7"))}function ke(Tt,nn,Tn,pn,Vt){var Ge=function(dn){Te(dn),yt(!M)};return v.createElement("span",{onMouseDown:Ge},Be({label:nn,value:Tt,disabled:Tn,closable:pn,onClose:Vt}))}function et(Tt){var nn=Tt.disabled,Tn=Tt.label,pn=Tt.value,Vt=!Q&&!nn,Ge=Tn;if(typeof Ce=="number"&&(typeof Tn=="string"||typeof Tn=="number")){var fn=String(Ge);fn.length>Ce&&(Ge="".concat(fn.slice(0,Ce),"..."))}var dn=function(br){br&&br.stopPropagation(),bt(Tt)};return typeof Be=="function"?ke(pn,Ge,nn,Vt,dn):St(Tt,Ge,nn,Vt,dn)}function tn(Tt){var nn=typeof mt=="function"?mt(Tt):mt;return St({title:nn},nn,!1)}var sn=v.createElement("div",{className:"".concat(rn,"-search"),style:{width:xt},onFocus:function(){kn(!0)},onBlur:function(){kn(!1)}},v.createElement(Mi,{ref:U,open:M,prefixCls:p,id:d,inputElement:null,disabled:Q,autoFocus:K,autoComplete:le,editable:Or,activeDescendantId:Fe,value:jn,onKeyDown:it,onMouseDown:Xt,onChange:kt,onPaste:st,onCompositionStart:Ht,onCompositionEnd:Ct,tabIndex:Oe,attrs:wt(u,!0)}),v.createElement("span",{ref:qe,className:"".concat(rn,"-search-mirror"),"aria-hidden":!0},jn,"\xA0")),on=v.createElement(Yi,{prefixCls:"".concat(rn,"-overflow"),data:S,renderItem:et,renderRest:tn,suffix:sn,itemKey:Le,maxCount:He});return v.createElement(v.Fragment,null,on,!S.length&&!jn&&v.createElement("span",{className:"".concat(rn,"-placeholder")},j))},jt=Rt,qt=function(u){var d=u.inputElement,p=u.prefixCls,S=u.id,M=u.inputRef,R=u.disabled,z=u.autoFocus,U=u.autoComplete,j=u.activeDescendantId,Q=u.mode,G=u.open,ue=u.values,K=u.placeholder,le=u.tabIndex,Fe=u.showSearch,Oe=u.searchValue,We=u.activeValue,He=u.maxLength,Ce=u.onInputKeyDown,de=u.onInputMouseDown,mt=u.onInputChange,Be=u.onInputPaste,yt=u.onInputCompositionStart,bt=u.onInputCompositionEnd,kt=u.title,st=v.useState(!1),it=(0,m.Z)(st,2),Xt=it[0],Ht=it[1],Ct=Q==="combobox",qe=Ct||Fe,Ve=ue[0],Ie=Oe||"";Ct&&We&&!Xt&&(Ie=We),v.useEffect(function(){Ct&&Ht(!1)},[Ct,We]);var xt=Q!=="combobox"&&!G&&!Fe?!1:!!Ie,ht=kt===void 0?te(Ve):kt,An=function(){if(Ve)return null;var cn=xt?{visibility:"hidden"}:void 0;return v.createElement("span",{className:"".concat(p,"-selection-placeholder"),style:cn},K)};return v.createElement(v.Fragment,null,v.createElement("span",{className:"".concat(p,"-selection-search")},v.createElement(Mi,{ref:M,prefixCls:p,id:S,open:G,inputElement:d,disabled:R,autoFocus:z,autoComplete:U,editable:qe,activeDescendantId:j,value:Ie,onKeyDown:Ce,onMouseDown:de,onChange:function(cn){Ht(!0),mt(cn)},onPaste:Be,onCompositionStart:yt,onCompositionEnd:bt,tabIndex:le,attrs:wt(u,!0),maxLength:Ct?He:void 0})),!Ct&&Ve?v.createElement("span",{className:"".concat(p,"-selection-item"),title:ht,style:xt?{visibility:"hidden"}:void 0},Ve.label):null,An())},Lt=qt;function ft(l){return![ae.ESC,ae.SHIFT,ae.BACKSPACE,ae.TAB,ae.WIN_KEY,ae.ALT,ae.META,ae.WIN_KEY_RIGHT,ae.CTRL,ae.SEMICOLON,ae.EQUALS,ae.CAPS_LOCK,ae.CONTEXT_MENU,ae.F1,ae.F2,ae.F3,ae.F4,ae.F5,ae.F6,ae.F7,ae.F8,ae.F9,ae.F10,ae.F11,ae.F12].includes(l)}var x=function(u,d){var p=(0,v.useRef)(null),S=(0,v.useRef)(!1),M=u.prefixCls,R=u.open,z=u.mode,U=u.showSearch,j=u.tokenWithEnter,Q=u.autoClearSearchValue,G=u.onSearch,ue=u.onSearchSubmit,K=u.onToggleOpen,le=u.onInputKeyDown,Fe=u.domRef;v.useImperativeHandle(d,function(){return{focus:function(){p.current.focus()},blur:function(){p.current.blur()}}});var Oe=It(0),We=(0,m.Z)(Oe,2),He=We[0],Ce=We[1],de=function(Ie){var xt=Ie.which;(xt===ae.UP||xt===ae.DOWN)&&Ie.preventDefault(),le&&le(Ie),xt===ae.ENTER&&z==="tags"&&!S.current&&!R&&(ue==null||ue(Ie.target.value)),ft(xt)&&K(!0)},mt=function(){Ce(!0)},Be=(0,v.useRef)(null),yt=function(Ie){G(Ie,!0,S.current)!==!1&&K(!0)},bt=function(){S.current=!0},kt=function(Ie){S.current=!1,z!=="combobox"&&yt(Ie.target.value)},st=function(Ie){var xt=Ie.target.value;if(j&&Be.current&&/[\r\n]/.test(Be.current)){var ht=Be.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");xt=xt.replace(ht,Be.current)}Be.current=null,yt(xt)},it=function(Ie){var xt=Ie.clipboardData,ht=xt.getData("text");Be.current=ht},Xt=function(Ie){var xt=Ie.target;if(xt!==p.current){var ht=document.body.style.msTouchAction!==void 0;ht?setTimeout(function(){p.current.focus()}):p.current.focus()}},Ht=function(Ie){var xt=He();Ie.target!==p.current&&!xt&&z!=="combobox"&&Ie.preventDefault(),(z!=="combobox"&&(!U||!xt)||!R)&&(R&&Q!==!1&&G("",!0,!1),K())},Ct={inputRef:p,onInputKeyDown:de,onInputMouseDown:mt,onInputChange:st,onInputPaste:it,onInputCompositionStart:bt,onInputCompositionEnd:kt},qe=z==="multiple"||z==="tags"?v.createElement(jt,(0,O.Z)({},u,Ct)):v.createElement(Lt,(0,O.Z)({},u,Ct));return v.createElement("div",{ref:Fe,className:"".concat(M,"-selector"),onClick:Xt,onMouseDown:Ht},qe)},A=v.forwardRef(x);A.displayName="Selector";var H=A,W=v.createContext(null),B=W,Z=[];function Ke(l,u){var d=v.useState(function(){if(!pe())return null;var le=document.createElement("div");return le}),p=(0,m.Z)(d,1),S=p[0],M=v.useRef(!1),R=v.useContext(B),z=v.useState(Z),U=(0,m.Z)(z,2),j=U[0],Q=U[1],G=R||(M.current?void 0:function(le){Q(function(Fe){var Oe=[le].concat((0,q.Z)(Fe));return Oe})});function ue(){S.parentElement||document.body.appendChild(S),M.current=!0}function K(){var le;(le=S.parentElement)===null||le===void 0||le.removeChild(S),M.current=!1}return we(function(){return l?R?R(ue):ue():K(),K},[l]),we(function(){j.length&&(j.forEach(function(le){return le()}),Q(Z))},[j]),[S,G]}function At(l,u){if(!l)return!1;if(l.contains)return l.contains(u);for(var d=u;d;){if(d===l)return!0;d=d.parentNode}return!1}var dt="data-rc-order",Re="rc-util-key",De=new Map;function ze(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=l.mark;return u?u.startsWith("data-")?u:"data-".concat(u):Re}function en(l){if(l.attachTo)return l.attachTo;var u=document.querySelector("head");return u||document.body}function k(l){return l==="queue"?"prependQueue":l?"prepend":"append"}function Ue(l){return Array.from((De.get(l)||l).children).filter(function(u){return u.tagName==="STYLE"})}function gn(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!pe())return null;var d=u.csp,p=u.prepend,S=document.createElement("style");S.setAttribute(dt,k(p)),d!=null&&d.nonce&&(S.nonce=d==null?void 0:d.nonce),S.innerHTML=l;var M=en(u),R=M.firstChild;if(p){if(p==="queue"){var z=Ue(M).filter(function(U){return["prepend","prependQueue"].includes(U.getAttribute(dt))});if(z.length)return M.insertBefore(S,z[z.length-1].nextSibling),S}M.insertBefore(S,R)}else M.appendChild(S);return S}function Wn(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=en(u);return Ue(d).find(function(p){return p.getAttribute(ze(u))===l})}function Bt(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=Wn(l,u);if(d){var p=en(u);p.removeChild(d)}}function Ft(l,u){var d=De.get(l);if(!d||!At(document,d)){var p=gn("",u),S=p.parentNode;De.set(l,S),l.removeChild(p)}}function Kn(){De.clear()}function je(l,u){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=en(d);Ft(p,d);var S=Wn(u,d);if(S){var M,R;if((M=d.csp)!==null&&M!==void 0&&M.nonce&&S.nonce!==((R=d.csp)===null||R===void 0?void 0:R.nonce)){var z;S.nonce=(z=d.csp)===null||z===void 0?void 0:z.nonce}return S.innerHTML!==l&&(S.innerHTML=l),S}var U=gn(l,d);return U.setAttribute(ze(d),u),U}var Sn;function Mn(l){if(typeof document=="undefined")return 0;if(l||Sn===void 0){var u=document.createElement("div");u.style.width="100%",u.style.height="200px";var d=document.createElement("div"),p=d.style;p.position="absolute",p.top="0",p.left="0",p.pointerEvents="none",p.visibility="hidden",p.width="200px",p.height="150px",p.overflow="hidden",d.appendChild(u),document.body.appendChild(d);var S=u.offsetWidth;d.style.overflow="scroll";var M=u.offsetWidth;S===M&&(M=d.clientWidth),document.body.removeChild(d),Sn=S-M}return Sn}function Hn(l){var u=l.match(/^(.*)px$/),d=Number(u==null?void 0:u[1]);return Number.isNaN(d)?Mn():d}function Pn(l){if(typeof document=="undefined"||!l||!(l instanceof Element))return{width:0,height:0};var u=getComputedStyle(l,"::-webkit-scrollbar"),d=u.width,p=u.height;return{width:Hn(d),height:Hn(p)}}function kr(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var wr="rc-util-locker-".concat(Date.now()),Jn=0;function Jr(l){var u=!!l,d=v.useState(function(){return Jn+=1,"".concat(wr,"_").concat(Jn)}),p=(0,m.Z)(d,1),S=p[0];we(function(){if(u){var M=Pn(document.body).width,R=kr();je(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(R?"width: calc(100% - ".concat(M,"px);"):"",`
|
|
|
}`),S)}else Bt(S);return function(){Bt(S)}},[u,S])}var Ur=!1;function qn(l){return typeof l=="boolean"&&(Ur=l),Ur}var $r=function(u){return u===!1?!1:!pe()||!u?null:typeof u=="string"?document.querySelector(u):typeof u=="function"?u():u},Kr=v.forwardRef(function(l,u){var d=l.open,p=l.autoLock,S=l.getContainer,M=l.debug,R=l.autoDestroy,z=R===void 0?!0:R,U=l.children,j=v.useState(d),Q=(0,m.Z)(j,2),G=Q[0],ue=Q[1],K=G||d;v.useEffect(function(){(z||d)&&ue(d)},[d,z]);var le=v.useState(function(){return $r(S)}),Fe=(0,m.Z)(le,2),Oe=Fe[0],We=Fe[1];v.useEffect(function(){var Xt=$r(S);We(Xt!=null?Xt:null)});var He=Ke(K&&!Oe,M),Ce=(0,m.Z)(He,2),de=Ce[0],mt=Ce[1],Be=Oe!=null?Oe:de;Jr(p&&d&&pe()&&(Be===de||Be===document.body));var yt=null;if(U&&ut(U)&&u){var bt=U;yt=bt.ref}var kt=Ot(yt,u);if(!K||!pe()||Oe===void 0)return null;var st=Be===!1||qn(),it=U;return u&&(it=v.cloneElement(U,{ref:kt})),v.createElement(B.Provider,{value:mt},st?it:(0,Et.createPortal)(it,Be))}),qr=Kr,Zn=qr;function mr(l){return l instanceof HTMLElement||l instanceof SVGElement}function Er(l){return mr(l)?l:l instanceof React.Component?ReactDOM.findDOMNode(l):null}function ir(l){var u;return l==null||(u=l.getRootNode)===null||u===void 0?void 0:u.call(l)}function yr(l){return ir(l)instanceof ShadowRoot}function Rr(l){return yr(l)?ir(l):null}function In(l){var u=v.useRef();u.current=l;var d=v.useCallback(function(){for(var p,S=arguments.length,M=new Array(S),R=0;R<S;R++)M[R]=arguments[R];return(p=u.current)===null||p===void 0?void 0:p.call.apply(p,[u].concat(M))},[]);return d}function er(){var l=(0,E.Z)({},xe);return l.useId}var or=0;function fi(){}var Ii=er(),zi=Ii?function(u){var d=Ii();return u||d}:function(u){var d=v.useState("ssr-id"),p=(0,m.Z)(d,2),S=p[0],M=p[1];return v.useEffect(function(){var R=or;or+=1,M("rc_unique_".concat(R))},[]),u||S};function Ri(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var mi=Ri()?v.useLayoutEffect:v.useEffect,_n=function(u,d){var p=v.useRef(!0);mi(function(){return u(p.current)},d),mi(function(){return p.current=!1,function(){p.current=!0}},[])},Oi=function(u,d){_n(function(p){if(!p)return u()},d)},ur=_n,di=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var l=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(l)||/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(l==null?void 0:l.substr(0,4))},ho=v.createContext(null),go=ho;function oo(l){return l?Array.isArray(l)?l:[l]:[]}function Li(l,u,d,p){return v.useMemo(function(){var S=oo(d!=null?d:u),M=oo(p!=null?p:u),R=new Set(S),z=new Set(M);return l&&(R.has("hover")&&(R.delete("hover"),R.add("click")),z.has("hover")&&(z.delete("hover"),z.add("click"))),[R,z]},[l,u,d,p])}var Ao=function(l){if(!l)return!1;if(l instanceof Element){if(l.offsetParent)return!0;if(l.getBBox){var u=l.getBBox(),d=u.width,p=u.height;if(d||p)return!0}if(l.getBoundingClientRect){var S=l.getBoundingClientRect(),M=S.width,R=S.height;if(M||R)return!0}}return!1};function Eo(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=arguments.length>2?arguments[2]:void 0;return d?l[0]===u[0]:l[0]===u[0]&&l[1]===u[1]}function Fo(l,u,d,p){for(var S=d.points,M=Object.keys(l),R=0;R<M.length;R+=1){var z,U=M[R];if(Eo((z=l[U])===null||z===void 0?void 0:z.points,S,p))return"".concat(u,"-placement-").concat(U)}return""}function ao(l,u,d,p){return u||(d?{motionName:"".concat(l,"-").concat(d)}:p?{motionName:p}:null)}function vi(l){return l.ownerDocument.defaultView}function Oa(l){for(var u=[],d=l==null?void 0:l.parentElement,p=["hidden","scroll","clip","auto"];d;){var S=vi(d).getComputedStyle(d),M=S.overflowX,R=S.overflowY,z=S.overflow;[M,R,z].some(function(U){return p.includes(U)})&&u.push(d),d=d.parentElement}return u}function Mo(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(l)?u:l}function lo(l){return Mo(parseFloat(l),0)}function La(l,u){var d=(0,E.Z)({},l);return(u||[]).forEach(function(p){if(!(p instanceof HTMLBodyElement||p instanceof HTMLHtmlElement)){var S=vi(p).getComputedStyle(p),M=S.overflow,R=S.overflowClipMargin,z=S.borderTopWidth,U=S.borderBottomWidth,j=S.borderLeftWidth,Q=S.borderRightWidth,G=p.getBoundingClientRect(),ue=p.offsetHeight,K=p.clientHeight,le=p.offsetWidth,Fe=p.clientWidth,Oe=lo(z),We=lo(U),He=lo(j),Ce=lo(Q),de=Mo(Math.round(G.width/le*1e3)/1e3),mt=Mo(Math.round(G.height/ue*1e3)/1e3),Be=(le-Fe-He-Ce)*de,yt=(ue-K-Oe-We)*mt,bt=Oe*mt,kt=We*mt,st=He*de,it=Ce*de,Xt=0,Ht=0;if(M==="clip"){var Ct=lo(R);Xt=Ct*de,Ht=Ct*mt}var qe=G.x+st-Xt,Ve=G.y+bt-Ht,Ie=qe+G.width+2*Xt-st-it-Be,xt=Ve+G.height+2*Ht-bt-kt-yt;d.left=Math.max(d.left,qe),d.top=Math.max(d.top,Ve),d.right=Math.min(d.right,Ie),d.bottom=Math.min(d.bottom,xt)}}),d}function Ji(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d="".concat(u),p=d.match(/^(.*)\%$/);return p?l*(parseFloat(p[1])/100):parseFloat(d)}function Xo(l,u){var d=u||[],p=(0,m.Z)(d,2),S=p[0],M=p[1];return[Ji(l.width,S),Ji(l.height,M)]}function qi(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[l[0],l[1]]}function Wi(l,u){var d=u[0],p=u[1],S,M;return d==="t"?M=l.y:d==="b"?M=l.y+l.height:M=l.y+l.height/2,p==="l"?S=l.x:p==="r"?S=l.x+l.width:S=l.x+l.width/2,{x:S,y:M}}function Ti(l,u){var d={t:"b",b:"t",l:"r",r:"l"};return l.map(function(p,S){return S===u?d[p]||"c":p}).join("")}function po(l,u,d,p,S,M,R){var z=v.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:S[p]||{}}),U=(0,m.Z)(z,2),j=U[0],Q=U[1],G=v.useRef(0),ue=v.useMemo(function(){return u?Oa(u):[]},[u]),K=v.useRef({}),le=function(){K.current={}};l||le();var Fe=In(function(){if(u&&d&&l){let xi=function(vr,fa){var Go=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fn,Va=ht.x+vr,No=ht.y+fa,e=Va+ke,t=No+St,r=Math.max(Va,Go.left),n=Math.max(No,Go.top),i=Math.min(e,Go.right),o=Math.min(t,Go.bottom);return Math.max(0,(i-r)*(o-n))},Do=function(){nr=ht.y+vn,si=nr+St,eo=ht.x+Yn,co=eo+ke};var He,Ce,de=u,mt=de.ownerDocument,Be=vi(de),yt=Be.getComputedStyle(de),bt=yt.width,kt=yt.height,st=yt.position,it=de.style.left,Xt=de.style.top,Ht=de.style.right,Ct=de.style.bottom,qe=(0,E.Z)((0,E.Z)({},S[p]),M),Ve=mt.createElement("div");(He=de.parentElement)===null||He===void 0||He.appendChild(Ve),Ve.style.left="".concat(de.offsetLeft,"px"),Ve.style.top="".concat(de.offsetTop,"px"),Ve.style.position=st,Ve.style.height="".concat(de.offsetHeight,"px"),Ve.style.width="".concat(de.offsetWidth,"px"),de.style.left="0",de.style.top="0",de.style.right="auto",de.style.bottom="auto";var Ie;if(Array.isArray(d))Ie={x:d[0],y:d[1],width:0,height:0};else{var xt=d.getBoundingClientRect();Ie={x:xt.x,y:xt.y,width:xt.width,height:xt.height}}var ht=de.getBoundingClientRect(),An=mt.documentElement,Rn=An.clientWidth,cn=An.clientHeight,kn=An.scrollWidth,rn=An.scrollHeight,jn=An.scrollTop,Or=An.scrollLeft,St=ht.height,ke=ht.width,et=Ie.height,tn=Ie.width,sn={left:0,top:0,right:Rn,bottom:cn},on={left:-Or,top:-jn,right:kn-Or,bottom:rn-jn},Tt=qe.htmlRegion,nn="visible",Tn="visibleFirst";Tt!=="scroll"&&Tt!==Tn&&(Tt=nn);var pn=Tt===Tn,Vt=La(on,ue),Ge=La(sn,ue),fn=Tt===nn?Ge:Vt,dn=pn?Ge:fn;de.style.left="auto",de.style.top="auto",de.style.right="0",de.style.bottom="0";var mn=de.getBoundingClientRect();de.style.left=it,de.style.top=Xt,de.style.right=Ht,de.style.bottom=Ct,(Ce=de.parentElement)===null||Ce===void 0||Ce.removeChild(Ve);var br=Mo(Math.round(ke/parseFloat(bt)*1e3)/1e3),Sr=Mo(Math.round(St/parseFloat(kt)*1e3)/1e3);if(br===0||Sr===0||mr(d)&&!Ao(d))return;var cr=qe.offset,Cr=qe.targetOffset,Cn=Xo(ht,cr),Qn=(0,m.Z)(Cn,2),ar=Qn[0],Vn=Qn[1],xr=Xo(Ie,Cr),Xn=(0,m.Z)(xr,2),ei=Xn[0],oi=Xn[1];Ie.x-=ei,Ie.y-=oi;var gi=qe.points||[],fr=(0,m.Z)(gi,2),Dr=fr[0],bi=fr[1],dr=qi(bi),zr=qi(Dr),Ui=Wi(Ie,dr),Wr=Wi(ht,zr),ai=(0,E.Z)({},qe),Yn=Ui.x-Wr.x+ar,vn=Ui.y-Wr.y+Vn,Hr=xi(Yn,vn),Zr=xi(Yn,vn,Ge),Ut=Wi(Ie,["t","l"]),ve=Wi(ht,["t","l"]),tt=Wi(Ie,["b","r"]),Qe=Wi(ht,["b","r"]),Mt=qe.overflow||{},Un=Mt.adjustX,Gn=Mt.adjustY,li=Mt.shiftX,Vr=Mt.shiftY,ti=function(fa){return typeof fa=="boolean"?fa:fa>=0},nr,si,eo,co;Do();var Uo=ti(Gn),to=zr[0]===dr[0];if(Uo&&zr[0]==="t"&&(si>dn.bottom||K.current.bt)){var Nr=vn;to?Nr-=St-et:Nr=Ut.y-Qe.y-Vn;var Ea=xi(Yn,Nr),Br=xi(Yn,Nr,Ge);Ea>Hr||Ea===Hr&&(!pn||Br>=Zr)?(K.current.bt=!0,vn=Nr,Vn=-Vn,ai.points=[Ti(zr,0),Ti(dr,0)]):K.current.bt=!1}if(Uo&&zr[0]==="b"&&(nr<dn.top||K.current.tb)){var Co=vn;to?Co+=St-et:Co=tt.y-ve.y-Vn;var Ko=xi(Yn,Co),Ma=xi(Yn,Co,Ge);Ko>Hr||Ko===Hr&&(!pn||Ma>=Zr)?(K.current.tb=!0,vn=Co,Vn=-Vn,ai.points=[Ti(zr,0),Ti(dr,0)]):K.current.tb=!1}var Ia=ti(Un),sa=zr[1]===dr[1];if(Ia&&zr[1]==="l"&&(co>dn.right||K.current.rl)){var Si=Yn;sa?Si-=ke-tn:Si=Ut.x-Qe.x-ar;var ua=xi(Si,vn),To=xi(Si,vn,Ge);ua>Hr||ua===Hr&&(!pn||To>=Zr)?(K.current.rl=!0,Yn=Si,ar=-ar,ai.points=[Ti(zr,1),Ti(dr,1)]):K.current.rl=!1}if(Ia&&zr[1]==="r"&&(eo<dn.left||K.current.lr)){var xo=Yn;sa?xo+=ke-tn:xo=tt.x-ve.x-ar;var Po=xi(xo,vn),jo=xi(xo,vn,Ge);Po>Hr||Po===Hr&&(!pn||jo>=Zr)?(K.current.lr=!0,Yn=xo,ar=-ar,ai.points=[Ti(zr,1),Ti(dr,1)]):K.current.lr=!1}Do();var Fn=li===!0?0:li;typeof Fn=="number"&&(eo<Ge.left&&(Yn-=eo-Ge.left-ar,Ie.x+tn<Ge.left+Fn&&(Yn+=Ie.x-Ge.left+tn-Fn)),co>Ge.right&&(Yn-=co-Ge.right-ar,Ie.x>Ge.right-Fn&&(Yn+=Ie.x-Ge.right+Fn)));var wo=Vr===!0?0:Vr;typeof wo=="number"&&(nr<Ge.top&&(vn-=nr-Ge.top-Vn,Ie.y+et<Ge.top+wo&&(vn+=Ie.y-Ge.top+et-wo)),si>Ge.bottom&&(vn-=si-Ge.bottom-Vn,Ie.y>Ge.bottom-wo&&(vn+=Ie.y-Ge.bottom+wo)));var no=ht.x+Yn,Ki=no+ke,Gr=ht.y+vn,ji=Gr+St,Gt=Ie.x,Qt=Gt+tn,Lr=Ie.y,_r=Lr+et,lr=Math.max(no,Gt),ni=Math.min(Ki,Qt),Ci=(lr+ni)/2,fo=Ci-no,Di=Math.max(Gr,Lr),xn=Math.min(ji,_r),Vi=(Di+xn)/2,ca=Vi-Gr;R==null||R(u,ai);var Vo=mn.right-ht.x-(Yn+ht.width),Jl=mn.bottom-ht.y-(vn+ht.height);Q({ready:!0,offsetX:Yn/br,offsetY:vn/Sr,offsetR:Vo/br,offsetB:Jl/Sr,arrowX:fo/br,arrowY:ca/Sr,scaleX:br,scaleY:Sr,align:ai})}}),Oe=function(){G.current+=1;var Ce=G.current;Promise.resolve().then(function(){G.current===Ce&&Fe()})},We=function(){Q(function(Ce){return(0,E.Z)((0,E.Z)({},Ce),{},{ready:!1})})};return ur(We,[p]),ur(function(){l||We()},[l]),[j.ready,j.offsetX,j.offsetY,j.offsetR,j.offsetB,j.arrowX,j.arrowY,j.scaleX,j.scaleY,j.align,Oe]}function Xa(l,u,d,p,S){ur(function(){if(l&&u&&d){let G=function(){p(),S()};var M=u,R=d,z=Oa(M),U=Oa(R),j=vi(R),Q=new Set([j].concat((0,q.Z)(z),(0,q.Z)(U)));return Q.forEach(function(ue){ue.addEventListener("scroll",G,{passive:!0})}),j.addEventListener("resize",G,{passive:!0}),p(),function(){Q.forEach(function(ue){ue.removeEventListener("scroll",G),j.removeEventListener("resize",G)})}}},[l,u,d])}function ql(l){var u=React.useRef(!1),d=React.useState(l),p=_slicedToArray(d,2),S=p[0],M=p[1];React.useEffect(function(){return u.current=!1,function(){u.current=!0}},[]);function R(z,U){U&&u.current||M(z)}return[S,R]}function Yo(l){return l!==void 0}function es(l,u){var d=u||{},p=d.defaultValue,S=d.value,M=d.onChange,R=d.postState,z=useState(function(){return Yo(S)?S:Yo(p)?typeof p=="function"?p():p:typeof l=="function"?l():l}),U=_slicedToArray(z,2),j=U[0],Q=U[1],G=S!==void 0?S:j,ue=R?R(G):G,K=useEvent(M),le=useState([G]),Fe=_slicedToArray(le,2),Oe=Fe[0],We=Fe[1];useLayoutUpdateEffect(function(){var Ce=Oe[0];j!==Ce&&K(j,Ce)},[Oe]),useLayoutUpdateEffect(function(){Yo(S)||Q(S)},[S]);var He=useEvent(function(Ce,de){Q(Ce,de),We([G],de)});return[ue,He]}var Ya=h(71326);function Ta(l,u,d){var p=v.useRef({});return(!("value"in p.current)||d(p.current.condition,u))&&(p.current.value=l(),p.current.condition=u),p.current.value}function va(l,u){typeof l=="function"?l(u):(0,V.Z)(l)==="object"&&l&&"current"in l&&(l.current=u)}function Pa(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var p=u.filter(function(S){return S});return p.length<=1?p[0]:function(S){u.forEach(function(M){va(M,S)})}}function Qa(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return Ta(function(){return Pa.apply(void 0,u)},u,function(p,S){return p.length!==S.length||p.every(function(M,R){return M!==S[R]})})}function Da(l){var u,d,p=(0,Ya.isMemo)(l)?l.type.type:l.type;return!(typeof p=="function"&&!((u=p.prototype)!==null&&u!==void 0&&u.render)||typeof l=="function"&&!((d=l.prototype)!==null&&d!==void 0&&d.render))}function wl(l){return!isValidElement(l)||isFragment(l)?!1:Da(l)}function Ja(l,u,d,p){if(!u.length)return d;var S=_toArray(u),M=S[0],R=S.slice(1),z;return!l&&typeof M=="number"?z=[]:Array.isArray(l)?z=_toConsumableArray(l):z=_objectSpread({},l),p&&d===void 0&&R.length===1?delete z[M][R[0]]:z[M]=Ja(z[M],R,d,p),z}function ha(l,u,d){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return u.length&&p&&d===void 0&&!get(l,u.slice(0,-1))?l:Ja(l,u,d,p)}function mo(l){return _typeof(l)==="object"&&l!==null&&Object.getPrototypeOf(l)===Object.prototype}function yo(l){return Array.isArray(l)?[]:{}}var _t=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Yt(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var p=yo(u[0]);return u.forEach(function(S){function M(R,z){var U=new Set(z),j=get(S,R),Q=Array.isArray(j);if(Q||mo(j)){if(!U.has(j)){U.add(j);var G=get(p,R);Q?p=ha(p,R,[]):(!G||_typeof(G)!=="object")&&(p=ha(p,R,yo(j))),_t(j).forEach(function(ue){M([].concat(_toConsumableArray(R),[ue]),U)})}}else p=ha(p,R,j)}M([])}),p}var Ln={},Mr=[],tr=function(u){Mr.push(u)};function El(l,u){if(0)var d}function $o(l,u){if(0)var d}function Qo(){Ln={}}function qa(l,u,d){!u&&!Ln[d]&&(l(!1,d),Ln[d]=!0)}function Jo(l,u){qa(El,l,u)}function Na(l,u){qa($o,l,u)}Jo.preMessage=tr,Jo.resetWarned=Qo,Jo.noteOnce=Na;var ts=null,Ml=function(u){return+setTimeout(u,16)},ns=function(u){return clearTimeout(u)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ml=function(u){return window.requestAnimationFrame(u)},ns=function(u){return window.cancelAnimationFrame(u)});var rs=0,el=new Map;function Il(l){el.delete(l)}var is=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;rs+=1;var p=rs;function S(M){if(M===0)Il(p),u();else{var R=Ml(function(){S(M-1)});el.set(p,R)}}return S(d),p};is.cancel=function(l){var u=el.get(l);return Il(u),ns(u)};var ga=is;function Io(l,u,d,p,S,M,R,z){var U=v.useRef(l),j=v.useRef(!1);U.current!==l&&(j.current=!0,U.current=l),v.useEffect(function(){var Q=ga(function(){j.current=!1});return function(){ga.cancel(Q)}},[l]),v.useEffect(function(){if(u&&p&&(!S||M)){var Q=function(){var st=!1,it=function(Ct){var qe=Ct.target;st=R(qe)},Xt=function(Ct){var qe=Ct.target;!j.current&&U.current&&!st&&!R(qe)&&z(!1)};return[it,Xt]},G=Q(),ue=(0,m.Z)(G,2),K=ue[0],le=ue[1],Fe=Q(),Oe=(0,m.Z)(Fe,2),We=Oe[0],He=Oe[1],Ce=vi(p);Ce.addEventListener("mousedown",K,!0),Ce.addEventListener("click",le,!0),Ce.addEventListener("contextmenu",le,!0);var de=Rr(d);if(de&&(de.addEventListener("mousedown",We,!0),de.addEventListener("click",He,!0),de.addEventListener("contextmenu",He,!0)),0)var mt,Be,yt,bt;return function(){Ce.removeEventListener("mousedown",K,!0),Ce.removeEventListener("click",le,!0),Ce.removeEventListener("contextmenu",le,!0),de&&(de.removeEventListener("mousedown",We,!0),de.removeEventListener("click",He,!0),de.removeEventListener("contextmenu",He,!0))}}},[u,d,p,S,M])}function tl(l){return l instanceof HTMLElement||l instanceof SVGElement}function Rl(l){return tl(l)?l:l instanceof v.Component?Et.findDOMNode(l):null}function Ol(l,u){var d={};return d[l.toLowerCase()]=u.toLowerCase(),d["Webkit".concat(l)]="webkit".concat(u),d["Moz".concat(l)]="moz".concat(u),d["ms".concat(l)]="MS".concat(u),d["O".concat(l)]="o".concat(u.toLowerCase()),d}function bo(l,u){var d={animationend:Ol("Animation","AnimationEnd"),transitionend:Ol("Transition","TransitionEnd")};return l&&("AnimationEvent"in u||delete d.animationend.animation,"TransitionEvent"in u||delete d.transitionend.transition),d}var qo=bo(pe(),typeof window!="undefined"?window:{}),nl={};if(pe()){var Ns=document.createElement("div");nl=Ns.style}var Aa={};function os(l){if(Aa[l])return Aa[l];var u=qo[l];if(u)for(var d=Object.keys(u),p=d.length,S=0;S<p;S+=1){var M=d[S];if(Object.prototype.hasOwnProperty.call(u,M)&&M in nl)return Aa[l]=u[M],Aa[l]}return""}var Ll=os("animationend"),rl=os("transitionend"),ea=!!(Ll&&rl),so=Ll||"animationend",Tl=rl||"transitionend";function Pl(l,u){if(!l)return null;if((0,V.Z)(l)==="object"){var d=u.replace(/-\w/g,function(p){return p[1].toUpperCase()});return l[d]}return"".concat(l,"-").concat(u)}var pa="none",il="appear",ol="enter",Fa="leave",Dl="none",Hi="prepare",ta="start",na="active",$a="end",za=function(u){return+setTimeout(u,16)},Nl=function(u){return clearTimeout(u)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(za=function(u){return window.requestAnimationFrame(u)},Nl=function(u){return window.cancelAnimationFrame(u)});var al=0,Zi=new Map;function Al(l){Zi.delete(l)}var ll=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;al+=1;var p=al;function S(M){if(M===0)Al(p),u();else{var R=za(function(){S(M-1)});Zi.set(p,R)}}return S(d),p};ll.cancel=function(l){var u=Zi.get(l);return Al(u),Nl(u)};var sl=ll,as=function(){var l=v.useRef(null);function u(){sl.cancel(l.current)}function d(p){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;u();var M=sl(function(){S<=1?p({isCanceled:function(){return M!==l.current}}):d(p,S-1)});l.current=M}return v.useEffect(function(){return function(){u()}},[]),[d,u]},ls=pe()?v.useLayoutEffect:v.useEffect,ul=ls,ss=[Hi,ta,na,$a],us=!1,As=!0;function zo(l){return l===na||l===$a}var ma=function(l,u){var d=P(Dl),p=(0,m.Z)(d,2),S=p[0],M=p[1],R=as(),z=(0,m.Z)(R,2),U=z[0],j=z[1];function Q(){M(Hi,!0)}return ul(function(){if(S!==Dl&&S!==$a){var G=ss.indexOf(S),ue=ss[G+1],K=u(S);K===us?M(ue,!0):U(function(le){function Fe(){le.isCanceled()||M(ue,!0)}K===!0?Fe():Promise.resolve(K).then(Fe)})}},[l,S]),v.useEffect(function(){return function(){j()}},[]),[Q,S]},ya=function(l){var u=(0,v.useRef)(),d=(0,v.useRef)(l);d.current=l;var p=v.useCallback(function(R){d.current(R)},[]);function S(R){R&&(R.removeEventListener(Tl,p),R.removeEventListener(so,p))}function M(R){u.current&&u.current!==R&&S(u.current),R&&R!==u.current&&(R.addEventListener(Tl,p),R.addEventListener(so,p),u.current=R)}return v.useEffect(function(){return function(){S(u.current)}},[]),[M,S]};function Fl(l,u,d,p){var S=p.motionEnter,M=S===void 0?!0:S,R=p.motionAppear,z=R===void 0?!0:R,U=p.motionLeave,j=U===void 0?!0:U,Q=p.motionDeadline,G=p.motionLeaveImmediately,ue=p.onAppearPrepare,K=p.onEnterPrepare,le=p.onLeavePrepare,Fe=p.onAppearStart,Oe=p.onEnterStart,We=p.onLeaveStart,He=p.onAppearActive,Ce=p.onEnterActive,de=p.onLeaveActive,mt=p.onAppearEnd,Be=p.onEnterEnd,yt=p.onLeaveEnd,bt=p.onVisibleChanged,kt=P(),st=(0,m.Z)(kt,2),it=st[0],Xt=st[1],Ht=P(pa),Ct=(0,m.Z)(Ht,2),qe=Ct[0],Ve=Ct[1],Ie=P(null),xt=(0,m.Z)(Ie,2),ht=xt[0],An=xt[1],Rn=(0,v.useRef)(!1),cn=(0,v.useRef)(null);function kn(){return d()}var rn=(0,v.useRef)(!1);function jn(Vt){var Ge=kn();if(!(Vt&&!Vt.deadline&&Vt.target!==Ge)){var fn=rn.current,dn;qe===il&&fn?dn=mt==null?void 0:mt(Ge,Vt):qe===ol&&fn?dn=Be==null?void 0:Be(Ge,Vt):qe===Fa&&fn&&(dn=yt==null?void 0:yt(Ge,Vt)),qe!==pa&&fn&&dn!==!1&&(Ve(pa,!0),An(null,!0))}}var Or=ya(jn),St=(0,m.Z)(Or,1),ke=St[0],et=v.useMemo(function(){var Vt,Ge,fn;switch(qe){case il:return Vt={},(0,C.Z)(Vt,Hi,ue),(0,C.Z)(Vt,ta,Fe),(0,C.Z)(Vt,na,He),Vt;case ol:return Ge={},(0,C.Z)(Ge,Hi,K),(0,C.Z)(Ge,ta,Oe),(0,C.Z)(Ge,na,Ce),Ge;case Fa:return fn={},(0,C.Z)(fn,Hi,le),(0,C.Z)(fn,ta,We),(0,C.Z)(fn,na,de),fn;default:return{}}},[qe]),tn=ma(qe,function(Vt){if(Vt===Hi){var Ge=et[Hi];return Ge?Ge(kn()):us}if(Tt in et){var fn;An(((fn=et[Tt])===null||fn===void 0?void 0:fn.call(et,kn(),null))||null)}return Tt===na&&(ke(kn()),Q>0&&(clearTimeout(cn.current),cn.current=setTimeout(function(){jn({deadline:!0})},Q))),As}),sn=(0,m.Z)(tn,2),on=sn[0],Tt=sn[1],nn=zo(Tt);rn.current=nn,ul(function(){Xt(u);var Vt=Rn.current;if(Rn.current=!0,!!l){var Ge;!Vt&&u&&z&&(Ge=il),Vt&&u&&M&&(Ge=ol),(Vt&&!u&&j||!Vt&&G&&!u&&j)&&(Ge=Fa),Ge&&(Ve(Ge),on())}},[u]),(0,v.useEffect)(function(){(qe===il&&!z||qe===ol&&!M||qe===Fa&&!j)&&Ve(pa)},[z,M,j]),(0,v.useEffect)(function(){return function(){Rn.current=!1,clearTimeout(cn.current)}},[]);var Tn=v.useRef(!1);(0,v.useEffect)(function(){it&&(Tn.current=!0),it!==void 0&&qe===pa&&((Tn.current||it)&&(bt==null||bt(it)),Tn.current=!0)},[it,qe]);var pn=ht;return et[Hi]&&Tt===ta&&(pn=(0,E.Z)({transition:"none"},pn)),[qe,Tt,pn,it!=null?it:u]}var cl=h(15671),$l=h(43144),fl=h(60136),Wo=h(51630),ra=function(l){(0,fl.Z)(d,l);var u=(0,Wo.Z)(d);function d(){return(0,cl.Z)(this,d),u.apply(this,arguments)}return(0,$l.Z)(d,[{key:"render",value:function(){return this.props.children}}]),d}(v.Component),yi=ra;function Ho(l){var u=l;(0,V.Z)(l)==="object"&&(u=l.transitionSupport);function d(S){return!!(S.motionName&&u)}var p=v.forwardRef(function(S,M){var R=S.visible,z=R===void 0?!0:R,U=S.removeOnLeave,j=U===void 0?!0:U,Q=S.forceRender,G=S.children,ue=S.motionName,K=S.leavedClassName,le=S.eventProps,Fe=d(S),Oe=(0,v.useRef)(),We=(0,v.useRef)();function He(){try{return Oe.current instanceof HTMLElement?Oe.current:Rl(We.current)}catch(Ie){return null}}var Ce=Fl(Fe,z,He,S),de=(0,m.Z)(Ce,4),mt=de[0],Be=de[1],yt=de[2],bt=de[3],kt=v.useRef(bt);bt&&(kt.current=!0);var st=v.useCallback(function(Ie){Oe.current=Ie,gt(M,Ie)},[M]),it,Xt=(0,E.Z)((0,E.Z)({},le),{},{visible:z});if(!G)it=null;else if(mt===pa||!d(S))bt?it=G((0,E.Z)({},Xt),st):!j&&kt.current&&K?it=G((0,E.Z)((0,E.Z)({},Xt),{},{className:K}),st):Q||!j&&!K?it=G((0,E.Z)((0,E.Z)({},Xt),{},{style:{display:"none"}}),st):it=null;else{var Ht,Ct;Be===Hi?Ct="prepare":zo(Be)?Ct="active":Be===ta&&(Ct="start"),it=G((0,E.Z)((0,E.Z)({},Xt),{},{className:Y()(Pl(ue,mt),(Ht={},(0,C.Z)(Ht,Pl(ue,"".concat(mt,"-").concat(Ct)),Ct),(0,C.Z)(Ht,ue,typeof ue=="string"),Ht)),style:yt}),st)}if(v.isValidElement(it)&&ut(it)){var qe=it,Ve=qe.ref;Ve||(it=v.cloneElement(it,{ref:st}))}return v.createElement(yi,{ref:We},it)});return p.displayName="CSSMotion",p}var Ro=Ho(ea),Wa=h(97326),zl="add",dl="keep",ia="remove",vl="removed";function cs(l){var u;return l&&(0,V.Z)(l)==="object"&&"key"in l?u=l:u={key:l},(0,E.Z)((0,E.Z)({},u),{},{key:String(u.key)})}function ba(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return l.map(cs)}function Fs(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=[],p=0,S=u.length,M=ba(l),R=ba(u);M.forEach(function(j){for(var Q=!1,G=p;G<S;G+=1){var ue=R[G];if(ue.key===j.key){p<G&&(d=d.concat(R.slice(p,G).map(function(K){return(0,E.Z)((0,E.Z)({},K),{},{status:zl})})),p=G),d.push((0,E.Z)((0,E.Z)({},ue),{},{status:dl})),p+=1,Q=!0;break}}Q||d.push((0,E.Z)((0,E.Z)({},j),{},{status:ia}))}),p<S&&(d=d.concat(R.slice(p).map(function(j){return(0,E.Z)((0,E.Z)({},j),{},{status:zl})})));var z={};d.forEach(function(j){var Q=j.key;z[Q]=(z[Q]||0)+1});var U=Object.keys(z).filter(function(j){return z[j]>1});return U.forEach(function(j){d=d.filter(function(Q){var G=Q.key,ue=Q.status;return G!==j||ue!==ia}),d.forEach(function(Q){Q.key===j&&(Q.status=dl)})}),d}var Wl=["component","children","onVisibleChanged","onAllRemoved"],fs=["status"],ds=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Hl(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ro,d=function(p){(0,fl.Z)(M,p);var S=(0,Wo.Z)(M);function M(){var R;(0,cl.Z)(this,M);for(var z=arguments.length,U=new Array(z),j=0;j<z;j++)U[j]=arguments[j];return R=S.call.apply(S,[this].concat(U)),(0,C.Z)((0,Wa.Z)(R),"state",{keyEntities:[]}),(0,C.Z)((0,Wa.Z)(R),"removeKey",function(Q){var G=R.state.keyEntities,ue=G.map(function(K){return K.key!==Q?K:(0,E.Z)((0,E.Z)({},K),{},{status:vl})});return R.setState({keyEntities:ue}),ue.filter(function(K){var le=K.status;return le!==vl}).length}),R}return(0,$l.Z)(M,[{key:"render",value:function(){var z=this,U=this.state.keyEntities,j=this.props,Q=j.component,G=j.children,ue=j.onVisibleChanged,K=j.onAllRemoved,le=(0,ce.Z)(j,Wl),Fe=Q||v.Fragment,Oe={};return ds.forEach(function(We){Oe[We]=le[We],delete le[We]}),delete le.keys,v.createElement(Fe,le,U.map(function(We){var He=We.status,Ce=(0,ce.Z)(We,fs),de=He===zl||He===dl;return v.createElement(u,(0,O.Z)({},Oe,{key:Ce.key,visible:de,eventProps:Ce,onVisibleChanged:function(Be){if(ue==null||ue(Be,{key:Ce.key}),!Be){var yt=z.removeKey(Ce.key);yt===0&&K&&K()}}}),G)}))}}],[{key:"getDerivedStateFromProps",value:function(z,U){var j=z.keys,Q=U.keyEntities,G=ba(j),ue=Fs(Q,G);return{keyEntities:ue.filter(function(K){var le=Q.find(function(Fe){var Oe=Fe.key;return K.key===Oe});return!(le&&le.status===vl&&K.status===ia)})}}}]),M}(v.Component);return(0,C.Z)(d,"defaultProps",{component:"div"}),d}var Ha=Hl(ea),Za=Ro;function vs(l){var u=l.prefixCls,d=l.align,p=l.arrow,S=l.arrowPos,M=p||{},R=M.className,z=M.content,U=S.x,j=U===void 0?0:U,Q=S.y,G=Q===void 0?0:Q,ue=v.useRef();if(!d||!d.points)return null;var K={position:"absolute"};if(d.autoArrow!==!1){var le=d.points[0],Fe=d.points[1],Oe=le[0],We=le[1],He=Fe[0],Ce=Fe[1];Oe===He||!["t","b"].includes(Oe)?K.top=G:Oe==="t"?K.top=0:K.bottom=0,We===Ce||!["l","r"].includes(We)?K.left=j:We==="l"?K.left=0:K.right=0}return v.createElement("div",{ref:ue,className:Y()("".concat(u,"-arrow"),R),style:K},z)}function hl(l){var u=l.prefixCls,d=l.open,p=l.zIndex,S=l.mask,M=l.motion;return S?v.createElement(Za,(0,O.Z)({},M,{motionAppear:!0,visible:d,removeOnLeave:!0}),function(R){var z=R.className;return v.createElement("div",{style:{zIndex:p},className:Y()("".concat(u,"-mask"),z)})}):null}var $s=v.memo(function(l){var u=l.children;return u},function(l,u){return u.cache}),zs=$s,Ws=v.forwardRef(function(l,u){var d=l.popup,p=l.className,S=l.prefixCls,M=l.style,R=l.target,z=l.onVisibleChanged,U=l.open,j=l.keepDom,Q=l.fresh,G=l.onClick,ue=l.mask,K=l.arrow,le=l.arrowPos,Fe=l.align,Oe=l.motion,We=l.maskMotion,He=l.forceRender,Ce=l.getPopupContainer,de=l.autoDestroy,mt=l.portal,Be=l.zIndex,yt=l.onMouseEnter,bt=l.onMouseLeave,kt=l.onPointerEnter,st=l.ready,it=l.offsetX,Xt=l.offsetY,Ht=l.offsetR,Ct=l.offsetB,qe=l.onAlign,Ve=l.onPrepare,Ie=l.stretch,xt=l.targetWidth,ht=l.targetHeight,An=typeof d=="function"?d():d,Rn=U||j,cn=(Ce==null?void 0:Ce.length)>0,kn=v.useState(!Ce||!cn),rn=(0,m.Z)(kn,2),jn=rn[0],Or=rn[1];if(ur(function(){!jn&&cn&&R&&Or(!0)},[jn,cn,R]),!jn)return null;var St="auto",ke={left:"-1000vw",top:"-1000vh",right:St,bottom:St};if(st||!U){var et,tn=Fe.points,sn=Fe.dynamicInset||((et=Fe._experimental)===null||et===void 0?void 0:et.dynamicInset),on=sn&&tn[0][1]==="r",Tt=sn&&tn[0][0]==="b";on?(ke.right=Ht,ke.left=St):(ke.left=it,ke.right=St),Tt?(ke.bottom=Ct,ke.top=St):(ke.top=Xt,ke.bottom=St)}var nn={};return Ie&&(Ie.includes("height")&&ht?nn.height=ht:Ie.includes("minHeight")&&ht&&(nn.minHeight=ht),Ie.includes("width")&&xt?nn.width=xt:Ie.includes("minWidth")&&xt&&(nn.minWidth=xt)),U||(nn.pointerEvents="none"),v.createElement(mt,{open:He||Rn,getContainer:Ce&&function(){return Ce(R)},autoDestroy:de},v.createElement(hl,{prefixCls:S,open:U,zIndex:Be,mask:ue,motion:We}),v.createElement($t.Z,{onResize:qe,disabled:!U},function(Tn){return v.createElement(Za,(0,O.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:He,leavedClassName:"".concat(S,"-hidden")},Oe,{onAppearPrepare:Ve,onEnterPrepare:Ve,visible:U,onVisibleChanged:function(Vt){var Ge;Oe==null||(Ge=Oe.onVisibleChanged)===null||Ge===void 0||Ge.call(Oe,Vt),z(Vt)}}),function(pn,Vt){var Ge=pn.className,fn=pn.style,dn=Y()(S,Ge,p);return v.createElement("div",{ref:Pa(Tn,u,Vt),className:dn,style:(0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)({"--arrow-x":"".concat(le.x||0,"px"),"--arrow-y":"".concat(le.y||0,"px")},ke),nn),fn),{},{boxSizing:"border-box",zIndex:Be},M),onMouseEnter:yt,onMouseLeave:bt,onPointerEnter:kt,onClick:G},K&&v.createElement(vs,{prefixCls:S,arrow:K,arrowPos:le,align:Fe}),v.createElement(zs,{cache:!U&&!Q},An))})}))}),Zl=Ws,Bl=v.forwardRef(function(l,u){var d=l.children,p=l.getTriggerDOMNode,S=Da(d),M=v.useCallback(function(z){va(u,p?p(z):z)},[p]),R=Qa(M,d.ref);return S?v.cloneElement(d,{ref:R}):d}),Sa=Bl,Ba=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Hs(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zn,u=v.forwardRef(function(d,p){var S=d.prefixCls,M=S===void 0?"rc-trigger-popup":S,R=d.children,z=d.action,U=z===void 0?"hover":z,j=d.showAction,Q=d.hideAction,G=d.popupVisible,ue=d.defaultPopupVisible,K=d.onPopupVisibleChange,le=d.afterPopupVisibleChange,Fe=d.mouseEnterDelay,Oe=d.mouseLeaveDelay,We=Oe===void 0?.1:Oe,He=d.focusDelay,Ce=d.blurDelay,de=d.mask,mt=d.maskClosable,Be=mt===void 0?!0:mt,yt=d.getPopupContainer,bt=d.forceRender,kt=d.autoDestroy,st=d.destroyPopupOnHide,it=d.popup,Xt=d.popupClassName,Ht=d.popupStyle,Ct=d.popupPlacement,qe=d.builtinPlacements,Ve=qe===void 0?{}:qe,Ie=d.popupAlign,xt=d.zIndex,ht=d.stretch,An=d.getPopupClassNameFromAlign,Rn=d.fresh,cn=d.alignPoint,kn=d.onPopupClick,rn=d.onPopupAlign,jn=d.arrow,Or=d.popupMotion,St=d.maskMotion,ke=d.popupTransitionName,et=d.popupAnimation,tn=d.maskTransitionName,sn=d.maskAnimation,on=d.className,Tt=d.getTriggerDOMNode,nn=(0,ce.Z)(d,Ba),Tn=kt||st||!1,pn=v.useState(!1),Vt=(0,m.Z)(pn,2),Ge=Vt[0],fn=Vt[1];ur(function(){fn(di())},[]);var dn=v.useRef({}),mn=v.useContext(go),br=v.useMemo(function(){return{registerSubPopup:function(a,s){dn.current[a]=s,mn==null||mn.registerSubPopup(a,s)}}},[mn]),Sr=zi(),cr=v.useState(null),Cr=(0,m.Z)(cr,2),Cn=Cr[0],Qn=Cr[1],ar=In(function(o){mr(o)&&Cn!==o&&Qn(o),mn==null||mn.registerSubPopup(Sr,o)}),Vn=v.useState(null),xr=(0,m.Z)(Vn,2),Xn=xr[0],ei=xr[1],oi=In(function(o){mr(o)&&Xn!==o&&ei(o)}),gi=v.Children.only(R),fr=(gi==null?void 0:gi.props)||{},Dr={},bi=In(function(o){var a,s,c=Xn;return(c==null?void 0:c.contains(o))||((a=Rr(c))===null||a===void 0?void 0:a.host)===o||o===c||(Cn==null?void 0:Cn.contains(o))||((s=Rr(Cn))===null||s===void 0?void 0:s.host)===o||o===Cn||Object.values(dn.current).some(function(f){return(f==null?void 0:f.contains(o))||o===f})}),dr=ao(M,Or,et,ke),zr=ao(M,St,sn,tn),Ui=v.useState(ue||!1),Wr=(0,m.Z)(Ui,2),ai=Wr[0],Yn=Wr[1],vn=G!=null?G:ai,Hr=In(function(o){G===void 0&&Yn(o)});ur(function(){Yn(G||!1)},[G]);var Zr=v.useRef(vn);Zr.current=vn;var Ut=In(function(o){(0,Et.flushSync)(function(){vn!==o&&(Hr(o),K==null||K(o))})}),ve=v.useRef(),tt=function(){clearTimeout(ve.current)},Qe=function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;tt(),s===0?Ut(a):ve.current=setTimeout(function(){Ut(a)},s*1e3)};v.useEffect(function(){return tt},[]);var Mt=v.useState(!1),Un=(0,m.Z)(Mt,2),Gn=Un[0],li=Un[1];ur(function(o){(!o||vn)&&li(!0)},[vn]);var Vr=v.useState(null),ti=(0,m.Z)(Vr,2),nr=ti[0],si=ti[1],eo=v.useState([0,0]),co=(0,m.Z)(eo,2),Uo=co[0],to=co[1],Nr=function(a){to([a.clientX,a.clientY])},Ea=po(vn,Cn,cn?Uo:Xn,Ct,Ve,Ie,rn),Br=(0,m.Z)(Ea,11),Co=Br[0],Ko=Br[1],Ma=Br[2],Ia=Br[3],sa=Br[4],Si=Br[5],ua=Br[6],To=Br[7],xo=Br[8],Po=Br[9],jo=Br[10],Fn=Li(Ge,U,j,Q),wo=(0,m.Z)(Fn,2),no=wo[0],Ki=wo[1],Gr=no.has("click"),ji=Ki.has("click")||Ki.has("contextMenu"),Gt=In(function(){Gn||jo()}),Qt=function(){Zr.current&&cn&&ji&&Qe(!1)};Xa(vn,Xn,Cn,Gt,Qt),ur(function(){Gt()},[Uo,Ct]),ur(function(){vn&&!(Ve!=null&&Ve[Ct])&&Gt()},[JSON.stringify(Ie)]);var Lr=v.useMemo(function(){var o=Fo(Ve,M,Po,cn);return Y()(o,An==null?void 0:An(Po))},[Po,An,Ve,M,cn]);v.useImperativeHandle(p,function(){return{forceAlign:Gt}});var _r=v.useState(0),lr=(0,m.Z)(_r,2),ni=lr[0],Ci=lr[1],fo=v.useState(0),Di=(0,m.Z)(fo,2),xn=Di[0],Vi=Di[1],ca=function(){if(ht&&Xn){var a=Xn.getBoundingClientRect();Ci(a.width),Vi(a.height)}},Vo=function(){ca(),Gt()},Jl=function(a){li(!1),jo(),le==null||le(a)},xi=function(){return new Promise(function(a){ca(),si(function(){return a})})};ur(function(){nr&&(jo(),nr(),si(null))},[nr]);function Do(o,a,s,c){Dr[o]=function(f){var b;c==null||c(f),Qe(a,s);for(var w=arguments.length,D=new Array(w>1?w-1:0),L=1;L<w;L++)D[L-1]=arguments[L];(b=fr[o])===null||b===void 0||b.call.apply(b,[fr,f].concat(D))}}(Gr||ji)&&(Dr.onClick=function(o){var a;Zr.current&&ji?Qe(!1):!Zr.current&&Gr&&(Nr(o),Qe(!0));for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];(a=fr.onClick)===null||a===void 0||a.call.apply(a,[fr,o].concat(c))}),Io(vn,ji,Xn,Cn,de,Be,bi,Qe);var vr=no.has("hover"),fa=Ki.has("hover"),Go,Va;vr&&(Do("onMouseEnter",!0,Fe,function(o){Nr(o)}),Do("onPointerEnter",!0,Fe,function(o){Nr(o)}),Go=function(){(vn||Gn)&&Qe(!0,Fe)},cn&&(Dr.onMouseMove=function(o){var a;(a=fr.onMouseMove)===null||a===void 0||a.call(fr,o)})),fa&&(Do("onMouseLeave",!1,We),Do("onPointerLeave",!1,We),Va=function(){Qe(!1,We)}),no.has("focus")&&Do("onFocus",!0,He),Ki.has("focus")&&Do("onBlur",!1,Ce),no.has("contextMenu")&&(Dr.onContextMenu=function(o){var a;Zr.current&&Ki.has("contextMenu")?Qe(!1):(Nr(o),Qe(!0)),o.preventDefault();for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];(a=fr.onContextMenu)===null||a===void 0||a.call.apply(a,[fr,o].concat(c))}),on&&(Dr.className=Y()(fr.className,on));var No=(0,E.Z)((0,E.Z)({},fr),Dr),e={},t=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];t.forEach(function(o){nn[o]&&(e[o]=function(){for(var a,s=arguments.length,c=new Array(s),f=0;f<s;f++)c[f]=arguments[f];(a=No[o])===null||a===void 0||a.call.apply(a,[No].concat(c)),nn[o].apply(nn,c)})});var r=v.cloneElement(gi,(0,E.Z)((0,E.Z)({},No),e)),n={x:Si,y:ua},i=jn?(0,E.Z)({},jn!==!0?jn:{}):null;return v.createElement(v.Fragment,null,v.createElement($t.Z,{disabled:!vn,ref:oi,onResize:Vo},v.createElement(Sa,{getTriggerDOMNode:Tt},r)),v.createElement(go.Provider,{value:br},v.createElement(Zl,{portal:l,ref:ar,prefixCls:M,popup:it,className:Y()(Xt,Lr),style:Ht,target:Xn,onMouseEnter:Go,onMouseLeave:Va,onPointerEnter:Go,zIndex:xt,open:vn,keepDom:Gn,fresh:Rn,onClick:kn,mask:de,motion:dr,maskMotion:zr,onVisibleChanged:Jl,onPrepare:xi,forceRender:bt,autoDestroy:Tn,getPopupContainer:yt,align:Po,arrow:i,arrowPos:n,ready:Co,offsetX:Ko,offsetY:Ma,offsetR:Ia,offsetB:sa,onAlign:Gt,stretch:ht,targetWidth:ni/To,targetHeight:xn/xo})))});return u}var gl=Hs(Zn),hs=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ka=function(u){var d=u===!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"}}},gs=function(u,d){var p=u.prefixCls,S=u.disabled,M=u.visible,R=u.children,z=u.popupElement,U=u.animation,j=u.transitionName,Q=u.dropdownStyle,G=u.dropdownClassName,ue=u.direction,K=ue===void 0?"ltr":ue,le=u.placement,Fe=u.builtinPlacements,Oe=u.dropdownMatchSelectWidth,We=u.dropdownRender,He=u.dropdownAlign,Ce=u.getPopupContainer,de=u.empty,mt=u.getTriggerDOMNode,Be=u.onPopupVisibleChange,yt=u.onPopupMouseEnter,bt=(0,ce.Z)(u,hs),kt="".concat(p,"-dropdown"),st=z;We&&(st=We(z));var it=v.useMemo(function(){return Fe||ka(Oe)},[Fe,Oe]),Xt=U?"".concat(kt,"-").concat(U):j,Ht=typeof Oe=="number",Ct=v.useMemo(function(){return Ht?null:Oe===!1?"minWidth":"width"},[Oe,Ht]),qe=Q;Ht&&(qe=(0,E.Z)((0,E.Z)({},qe),{},{width:Oe}));var Ve=v.useRef(null);return v.useImperativeHandle(d,function(){return{getPopupElement:function(){return Ve.current}}}),v.createElement(gl,(0,O.Z)({},bt,{showAction:Be?["click"]:[],hideAction:Be?["click"]:[],popupPlacement:le||(K==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:it,prefixCls:kt,popupTransitionName:Xt,popup:v.createElement("div",{ref:Ve,onMouseEnter:yt},st),stretch:Ct,popupAlign:He,popupVisible:M,getPopupContainer:Ce,popupClassName:Y()(G,(0,C.Z)({},"".concat(kt,"-empty"),de)),popupStyle:qe,getTriggerDOMNode:mt,onPopupVisibleChange:Be}),R)},Zo=v.forwardRef(gs);Zo.displayName="SelectTrigger";var Ua=Zo,oa=h(84506);function Ca(l,u){var d=l.key,p;return"value"in l&&(p=l.value),d!=null?d:p!==void 0?p:"rc-index-key-".concat(u)}function aa(l,u){var d=l||{},p=d.label,S=d.value,M=d.options,R=d.groupLabel,z=p||(u?"children":"label");return{label:z,value:S||"value",options:M||"options",groupLabel:R||z}}function ps(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=u.fieldNames,p=u.childrenAsData,S=[],M=aa(d,!1),R=M.label,z=M.value,U=M.options,j=M.groupLabel;function Q(G,ue){G.forEach(function(K){if(ue||!(U in K)){var le=K[z];S.push({key:Ca(K,S.length),groupOption:ue,data:K,label:K[R],value:le})}else{var Fe=K[j];Fe===void 0&&p&&(Fe=K.label),S.push({key:Ca(K,S.length),group:!0,data:K,label:Fe}),Q(K[U],!0)}})}return Q(l,!1),S}function pl(l){var u=(0,E.Z)({},l);return"props"in u||Object.defineProperty(u,"props",{get:function(){return $(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),u}}),u}function ms(l,u){if(!u||!u.length)return null;var d=!1;function p(M,R){var z=(0,oa.Z)(R),U=z[0],j=z.slice(1);if(!U)return[M];var Q=M.split(U);return d=d||Q.length>1,Q.reduce(function(G,ue){return[].concat((0,q.Z)(G),(0,q.Z)(p(ue,j)))},[]).filter(function(G){return G})}var S=p(l,u);return d?S:null}var Zs=["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"],la=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Oo(l){return l==="tags"||l==="multiple"}var Bs=v.forwardRef(function(l,u){var d,p,S=l.id,M=l.prefixCls,R=l.className,z=l.showSearch,U=l.tagRender,j=l.direction,Q=l.omitDomProps,G=l.displayValues,ue=l.onDisplayValuesChange,K=l.emptyOptions,le=l.notFoundContent,Fe=le===void 0?"Not Found":le,Oe=l.onClear,We=l.mode,He=l.disabled,Ce=l.loading,de=l.getInputElement,mt=l.getRawInputElement,Be=l.open,yt=l.defaultOpen,bt=l.onDropdownVisibleChange,kt=l.activeValue,st=l.onActiveValueChange,it=l.activeDescendantId,Xt=l.searchValue,Ht=l.autoClearSearchValue,Ct=l.onSearch,qe=l.onSearchSplit,Ve=l.tokenSeparators,Ie=l.allowClear,xt=l.suffixIcon,ht=l.clearIcon,An=l.OptionList,Rn=l.animation,cn=l.transitionName,kn=l.dropdownStyle,rn=l.dropdownClassName,jn=l.dropdownMatchSelectWidth,Or=l.dropdownRender,St=l.dropdownAlign,ke=l.placement,et=l.builtinPlacements,tn=l.getPopupContainer,sn=l.showAction,on=sn===void 0?[]:sn,Tt=l.onFocus,nn=l.onBlur,Tn=l.onKeyUp,pn=l.onKeyDown,Vt=l.onMouseDown,Ge=(0,ce.Z)(l,Zs),fn=Oo(We),dn=(z!==void 0?z:fn)||We==="combobox",mn=(0,E.Z)({},Ge);la.forEach(function(Gt){delete mn[Gt]}),Q==null||Q.forEach(function(Gt){delete mn[Gt]});var br=v.useState(!1),Sr=(0,m.Z)(br,2),cr=Sr[0],Cr=Sr[1];v.useEffect(function(){Cr($e())},[]);var Cn=v.useRef(null),Qn=v.useRef(null),ar=v.useRef(null),Vn=v.useRef(null),xr=v.useRef(null),Xn=ct(),ei=(0,m.Z)(Xn,3),oi=ei[0],gi=ei[1],fr=ei[2];v.useImperativeHandle(u,function(){var Gt,Qt;return{focus:(Gt=Vn.current)===null||Gt===void 0?void 0:Gt.focus,blur:(Qt=Vn.current)===null||Qt===void 0?void 0:Qt.blur,scrollTo:function(_r){var lr;return(lr=xr.current)===null||lr===void 0?void 0:lr.scrollTo(_r)}}});var Dr=v.useMemo(function(){var Gt;if(We!=="combobox")return Xt;var Qt=(Gt=G[0])===null||Gt===void 0?void 0:Gt.value;return typeof Qt=="string"||typeof Qt=="number"?String(Qt):""},[Xt,We,G]),bi=We==="combobox"&&typeof de=="function"&&de()||null,dr=typeof mt=="function"&&mt(),zr=Ot(Qn,dr==null||(d=dr.props)===null||d===void 0?void 0:d.ref),Ui=v.useState(!1),Wr=(0,m.Z)(Ui,2),ai=Wr[0],Yn=Wr[1];we(function(){Yn(!0)},[]);var vn=ot(!1,{defaultValue:yt,value:Be}),Hr=(0,m.Z)(vn,2),Zr=Hr[0],Ut=Hr[1],ve=ai?Zr:!1,tt=!Fe&&K;(He||tt&&ve&&We==="combobox")&&(ve=!1);var Qe=tt?!1:ve,Mt=v.useCallback(function(Gt){var Qt=Gt!==void 0?Gt:!ve;He||(Ut(Qt),ve!==Qt&&(bt==null||bt(Qt)))},[He,ve,Ut,bt]),Un=v.useMemo(function(){return(Ve||[]).some(function(Gt){return[`
|
|
|
`,`\r
|
|
|
`].includes(Gt)})},[Ve]),Gn=function(Qt,Lr,_r){var lr=!0,ni=Qt;st==null||st(null);var Ci=_r?null:ms(Qt,Ve);return We!=="combobox"&&Ci&&(ni="",qe==null||qe(Ci),Mt(!1),lr=!1),Ct&&Dr!==ni&&Ct(ni,{source:Lr?"typing":"effect"}),lr},li=function(Qt){!Qt||!Qt.trim()||Ct(Qt,{source:"submit"})};v.useEffect(function(){!ve&&!fn&&We!=="combobox"&&Gn("",!1,!1)},[ve]),v.useEffect(function(){Zr&&He&&Ut(!1),He&&gi(!1)},[He]);var Vr=It(),ti=(0,m.Z)(Vr,2),nr=ti[0],si=ti[1],eo=function(Qt){var Lr=nr(),_r=Qt.which;if(_r===ae.ENTER&&(We!=="combobox"&&Qt.preventDefault(),ve||Mt(!0)),si(!!Dr),_r===ae.BACKSPACE&&!Lr&&fn&&!Dr&&G.length){for(var lr=(0,q.Z)(G),ni=null,Ci=lr.length-1;Ci>=0;Ci-=1){var fo=lr[Ci];if(!fo.disabled){lr.splice(Ci,1),ni=fo;break}}ni&&ue(lr,{type:"remove",values:[ni]})}for(var Di=arguments.length,xn=new Array(Di>1?Di-1:0),Vi=1;Vi<Di;Vi++)xn[Vi-1]=arguments[Vi];if(ve&&xr.current){var ca;(ca=xr.current).onKeyDown.apply(ca,[Qt].concat(xn))}pn==null||pn.apply(void 0,[Qt].concat(xn))},co=function(Qt){for(var Lr=arguments.length,_r=new Array(Lr>1?Lr-1:0),lr=1;lr<Lr;lr++)_r[lr-1]=arguments[lr];if(ve&&xr.current){var ni;(ni=xr.current).onKeyUp.apply(ni,[Qt].concat(_r))}Tn==null||Tn.apply(void 0,[Qt].concat(_r))},Uo=function(Qt){var Lr=G.filter(function(_r){return _r!==Qt});ue(Lr,{type:"remove",values:[Qt]})},to=v.useRef(!1),Nr=function(){gi(!0),He||(Tt&&!to.current&&Tt.apply(void 0,arguments),on.includes("focus")&&Mt(!0)),to.current=!0},Ea=function(){gi(!1,function(){to.current=!1,Mt(!1)}),!He&&(Dr&&(We==="tags"?Ct(Dr,{source:"submit"}):We==="multiple"&&Ct("",{source:"blur"})),nn&&nn.apply(void 0,arguments))},Br=[];v.useEffect(function(){return function(){Br.forEach(function(Gt){return clearTimeout(Gt)}),Br.splice(0,Br.length)}},[]);var Co=function(Qt){var Lr,_r=Qt.target,lr=(Lr=ar.current)===null||Lr===void 0?void 0:Lr.getPopupElement();if(lr&&lr.contains(_r)){var ni=setTimeout(function(){var xn=Br.indexOf(ni);if(xn!==-1&&Br.splice(xn,1),fr(),!cr&&!lr.contains(document.activeElement)){var Vi;(Vi=Vn.current)===null||Vi===void 0||Vi.focus()}});Br.push(ni)}for(var Ci=arguments.length,fo=new Array(Ci>1?Ci-1:0),Di=1;Di<Ci;Di++)fo[Di-1]=arguments[Di];Vt==null||Vt.apply(void 0,[Qt].concat(fo))},Ko=v.useState({}),Ma=(0,m.Z)(Ko,2),Ia=Ma[1];function sa(){Ia({})}var Si;dr&&(Si=function(Qt){Mt(Qt)}),vt(function(){var Gt;return[Cn.current,(Gt=ar.current)===null||Gt===void 0?void 0:Gt.getPopupElement()]},Qe,Mt,!!dr);var ua=v.useMemo(function(){return(0,E.Z)((0,E.Z)({},l),{},{notFoundContent:Fe,open:ve,triggerOpen:Qe,id:S,showSearch:dn,multiple:fn,toggleOpen:Mt})},[l,Fe,Qe,ve,S,dn,fn,Mt]),To=!!xt||Ce,xo;To&&(xo=v.createElement(Ze,{className:Y()("".concat(M,"-arrow"),(0,C.Z)({},"".concat(M,"-arrow-loading"),Ce)),customizeIcon:xt,customizeIconProps:{loading:Ce,searchValue:Dr,open:ve,focused:oi,showSearch:dn}}));var Po=function(){var Qt;Oe==null||Oe(),(Qt=Vn.current)===null||Qt===void 0||Qt.focus(),ue([],{type:"clear",values:G}),Gn("",!1,!1)},jo=_e(M,Po,G,Ie,ht,He,Dr,We),Fn=jo.allowClear,wo=jo.clearIcon,no=v.createElement(An,{ref:xr}),Ki=Y()(M,R,(p={},(0,C.Z)(p,"".concat(M,"-focused"),oi),(0,C.Z)(p,"".concat(M,"-multiple"),fn),(0,C.Z)(p,"".concat(M,"-single"),!fn),(0,C.Z)(p,"".concat(M,"-allow-clear"),Ie),(0,C.Z)(p,"".concat(M,"-show-arrow"),To),(0,C.Z)(p,"".concat(M,"-disabled"),He),(0,C.Z)(p,"".concat(M,"-loading"),Ce),(0,C.Z)(p,"".concat(M,"-open"),ve),(0,C.Z)(p,"".concat(M,"-customize-input"),bi),(0,C.Z)(p,"".concat(M,"-show-search"),dn),p)),Gr=v.createElement(Ua,{ref:ar,disabled:He,prefixCls:M,visible:Qe,popupElement:no,animation:Rn,transitionName:cn,dropdownStyle:kn,dropdownClassName:rn,direction:j,dropdownMatchSelectWidth:jn,dropdownRender:Or,dropdownAlign:St,placement:ke,builtinPlacements:et,getPopupContainer:tn,empty:K,getTriggerDOMNode:function(){return Qn.current},onPopupVisibleChange:Si,onPopupMouseEnter:sa},dr?v.cloneElement(dr,{ref:zr}):v.createElement(H,(0,O.Z)({},l,{domRef:Qn,prefixCls:M,inputElement:bi,ref:Vn,id:S,showSearch:dn,autoClearSearchValue:Ht,mode:We,activeDescendantId:it,tagRender:U,values:G,open:ve,onToggleOpen:Mt,activeValue:kt,searchValue:Dr,onSearch:Gn,onSearchSubmit:li,onRemove:Uo,tokenWithEnter:Un}))),ji;return dr?ji=Gr:ji=v.createElement("div",(0,O.Z)({className:Ki},mn,{ref:Cn,onMouseDown:Co,onKeyDown:eo,onKeyUp:co,onFocus:Nr,onBlur:Ea}),oi&&!ve&&v.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(G.map(function(Gt){var Qt=Gt.label,Lr=Gt.value;return["number","string"].includes((0,V.Z)(Qt))?Qt:Lr}).join(", "))),Gr,xo,Fn&&wo),v.createElement(Zt.Provider,{value:ua},ji)}),ks=Bs,Us=function(l,u){var d=v.useRef({values:new Map,options:new Map}),p=v.useMemo(function(){var M=d.current,R=M.values,z=M.options,U=l.map(function(G){if(G.label===void 0){var ue;return(0,E.Z)((0,E.Z)({},G),{},{label:(ue=R.get(G.value))===null||ue===void 0?void 0:ue.label})}return G}),j=new Map,Q=new Map;return U.forEach(function(G){j.set(G.value,G),Q.set(G.value,u.get(G.value)||z.get(G.value))}),d.current.values=j,d.current.options=Q,U},[l,u]),S=v.useCallback(function(M){return u.get(M)||d.current.options.get(M)},[u]);return[p,S]};function kl(l,u){return Fi(l).join("").toUpperCase().includes(u)}var Ks=function(l,u,d,p,S){return v.useMemo(function(){if(!d||p===!1)return l;var M=u.options,R=u.label,z=u.value,U=[],j=typeof p=="function",Q=d.toUpperCase(),G=j?p:function(K,le){return S?kl(le[S],Q):le[M]?kl(le[R!=="children"?R:"label"],Q):kl(le[z],Q)},ue=j?function(K){return pl(K)}:function(K){return K};return l.forEach(function(K){if(K[M]){var le=G(d,ue(K));if(le)U.push(K);else{var Fe=K[M].filter(function(Oe){return G(d,ue(Oe))});Fe.length&&U.push((0,E.Z)((0,E.Z)({},K),{},(0,C.Z)({},M,Fe)))}return}G(d,ue(K))&&U.push(K)}),U},[l,p,S,d,u])},ys=0,Pi=pe();function jr(){var l;return Pi?(l=ys,ys+=1):l="TEST_OR_SSR",l}function hi(l){var u=v.useState(),d=(0,m.Z)(u,2),p=d[0],S=d[1];return v.useEffect(function(){S("rc_select_".concat(jr()))},[]),l||p}function Pr(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=[];return v.Children.forEach(l,function(p){p==null&&!u.keepEmpty||(Array.isArray(p)?d=d.concat(Pr(p)):(0,be.isFragment)(p)&&p.props?d=d.concat(Pr(p.props.children,u)):d.push(p))}),d}var Ka=["children","value"],js=["children"];function ml(l){var u=l,d=u.key,p=u.props,S=p.children,M=p.value,R=(0,ce.Z)(p,Ka);return(0,E.Z)({key:d,value:M!==void 0?M:d,children:S},R)}function bs(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Pr(l).map(function(d,p){if(!v.isValidElement(d)||!d.type)return null;var S=d,M=S.type.isSelectOptGroup,R=S.key,z=S.props,U=z.children,j=(0,ce.Z)(z,js);return u||!M?ml(d):(0,E.Z)((0,E.Z)({key:"__RC_SELECT_GRP__".concat(R===null?p:R,"__"),label:R},j),{},{options:bs(U)})}).filter(function(d){return d})}function Vs(l,u,d,p,S){return v.useMemo(function(){var M=l,R=!l;R&&(M=bs(u));var z=new Map,U=new Map,j=function(ue,K,le){le&&typeof le=="string"&&ue.set(K[le],K)};function Q(G){for(var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,K=0;K<G.length;K+=1){var le=G[K];!le[d.options]||ue?(z.set(le[d.value],le),j(U,le,d.label),j(U,le,p),j(U,le,S)):Q(le[d.options],!0)}}return Q(M),{options:M,valueOptions:z,labelOptions:U}},[l,u,d,p,S])}function Ss(l){var u=v.useRef();u.current=l;var d=v.useCallback(function(){return u.current.apply(u,arguments)},[]);return d}var yl=function(){return null};yl.isSelectOptGroup=!0;var Ul=yl,bl=function(){return null};bl.isSelectOption=!0;var Cs=bl;function Kl(l,u){var d=(0,E.Z)({},l);return Array.isArray(u)&&u.forEach(function(p){delete d[p]}),d}var jl=h(73299),xs=v.createContext(null),Vl=xs;function Gl(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var ws=["disabled","title","children","style","className"];function xa(l){return typeof l=="string"||typeof l=="number"}var Gs=function(u,d){var p=an(),S=p.prefixCls,M=p.id,R=p.open,z=p.multiple,U=p.mode,j=p.searchValue,Q=p.toggleOpen,G=p.notFoundContent,ue=p.onPopupScroll,K=v.useContext(Vl),le=K.flattenOptions,Fe=K.onActiveValue,Oe=K.defaultActiveFirstOption,We=K.onSelect,He=K.menuItemSelectedIcon,Ce=K.rawValues,de=K.fieldNames,mt=K.virtual,Be=K.direction,yt=K.listHeight,bt=K.listItemHeight,kt="".concat(S,"-item"),st=at(function(){return le},[R,le],function(St,ke){return ke[0]&&St[1]!==ke[1]}),it=v.useRef(null),Xt=function(ke){ke.preventDefault()},Ht=function(ke){it.current&&it.current.scrollTo(typeof ke=="number"?{index:ke}:ke)},Ct=function(ke){for(var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,tn=st.length,sn=0;sn<tn;sn+=1){var on=(ke+sn*et+tn)%tn,Tt=st[on],nn=Tt.group,Tn=Tt.data;if(!nn&&!Tn.disabled)return on}return-1},qe=v.useState(function(){return Ct(0)}),Ve=(0,m.Z)(qe,2),Ie=Ve[0],xt=Ve[1],ht=function(ke){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;xt(ke);var tn={source:et?"keyboard":"mouse"},sn=st[ke];if(!sn){Fe(null,-1,tn);return}Fe(sn.value,ke,tn)};(0,v.useEffect)(function(){ht(Oe!==!1?Ct(0):-1)},[st.length,j]);var An=v.useCallback(function(St){return Ce.has(St)&&U!=="combobox"},[U,(0,q.Z)(Ce).toString(),Ce.size]);(0,v.useEffect)(function(){var St=setTimeout(function(){if(!z&&R&&Ce.size===1){var et=Array.from(Ce)[0],tn=st.findIndex(function(sn){var on=sn.data;return on.value===et});tn!==-1&&(ht(tn),Ht(tn))}});if(R){var ke;(ke=it.current)===null||ke===void 0||ke.scrollTo(void 0)}return function(){return clearTimeout(St)}},[R,j,le.length]);var Rn=function(ke){ke!==void 0&&We(ke,{selected:!Ce.has(ke)}),z||Q(!1)};if(v.useImperativeHandle(d,function(){return{onKeyDown:function(ke){var et=ke.which,tn=ke.ctrlKey;switch(et){case ae.N:case ae.P:case ae.UP:case ae.DOWN:{var sn=0;if(et===ae.UP?sn=-1:et===ae.DOWN?sn=1:Gl()&&tn&&(et===ae.N?sn=1:et===ae.P&&(sn=-1)),sn!==0){var on=Ct(Ie+sn,sn);Ht(on),ht(on,!0)}break}case ae.ENTER:{var Tt=st[Ie];Tt&&!Tt.data.disabled?Rn(Tt.value):Rn(void 0),R&&ke.preventDefault();break}case ae.ESC:Q(!1),R&&ke.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ke){Ht(ke)}}}),st.length===0)return v.createElement("div",{role:"listbox",id:"".concat(M,"_list"),className:"".concat(kt,"-empty"),onMouseDown:Xt},G);var cn=Object.keys(de).map(function(St){return de[St]}),kn=function(ke){return ke.label};function rn(St,ke){var et=St.group;return{role:et?"presentation":"option",id:"".concat(M,"_list_").concat(ke)}}var jn=function(ke){var et=st[ke];if(!et)return null;var tn=et.data||{},sn=tn.value,on=et.group,Tt=wt(tn,!0),nn=kn(et);return et?v.createElement("div",(0,O.Z)({"aria-label":typeof nn=="string"&&!on?nn:null},Tt,{key:ke},rn(et,ke),{"aria-selected":An(sn)}),sn):null},Or={role:"listbox",id:"".concat(M,"_list")};return v.createElement(v.Fragment,null,mt&&v.createElement("div",(0,O.Z)({},Or,{style:{height:0,width:0,overflow:"hidden"}}),jn(Ie-1),jn(Ie),jn(Ie+1)),v.createElement(jl.Z,{itemKey:"key",ref:it,data:st,height:yt,itemHeight:bt,fullHeight:!1,onMouseDown:Xt,onScroll:ue,virtual:mt,direction:Be,innerProps:mt?null:Or},function(St,ke){var et,tn=St.group,sn=St.groupOption,on=St.data,Tt=St.label,nn=St.value,Tn=on.key;if(tn){var pn,Vt=(pn=on.title)!==null&&pn!==void 0?pn:xa(Tt)?Tt.toString():void 0;return v.createElement("div",{className:Y()(kt,"".concat(kt,"-group")),title:Vt},Tt!==void 0?Tt:Tn)}var Ge=on.disabled,fn=on.title,dn=on.children,mn=on.style,br=on.className,Sr=(0,ce.Z)(on,ws),cr=Kl(Sr,cn),Cr=An(nn),Cn="".concat(kt,"-option"),Qn=Y()(kt,Cn,br,(et={},(0,C.Z)(et,"".concat(Cn,"-grouped"),sn),(0,C.Z)(et,"".concat(Cn,"-active"),Ie===ke&&!Ge),(0,C.Z)(et,"".concat(Cn,"-disabled"),Ge),(0,C.Z)(et,"".concat(Cn,"-selected"),Cr),et)),ar=kn(St),Vn=!He||typeof He=="function"||Cr,xr=typeof ar=="number"?ar:ar||nn,Xn=xa(xr)?xr.toString():void 0;return fn!==void 0&&(Xn=fn),v.createElement("div",(0,O.Z)({},wt(cr),mt?{}:rn(St,ke),{"aria-selected":Cr,className:Qn,title:Xn,onMouseMove:function(){Ie===ke||Ge||ht(ke)},onClick:function(){Ge||Rn(nn)},style:mn}),v.createElement("div",{className:"".concat(Cn,"-content")},xr),v.isValidElement(He)||Cr,Vn&&v.createElement(Ze,{className:"".concat(kt,"-option-state"),customizeIcon:He,customizeIconProps:{isSelected:Cr}},Cr?"\u2713":null))}))},ja=v.forwardRef(Gs);ja.displayName="OptionList";var Bi=ja;function _s(l){var u=l.mode,d=l.options,p=l.children,S=l.backfill,M=l.allowClear,R=l.placeholder,z=l.getInputElement,U=l.showSearch,j=l.onSearch,Q=l.defaultOpen,G=l.autoFocus,ue=l.labelInValue,K=l.value,le=l.inputValue,Fe=l.optionLabelProp,Oe=isMultiple(u),We=U!==void 0?U:Oe||u==="combobox",He=d||convertChildrenToData(p);if(warning(u!=="tags"||He.every(function(Be){return!Be.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),u==="tags"||u==="combobox"){var Ce=He.some(function(Be){return Be.options?Be.options.some(function(yt){return typeof("value"in yt?yt.value:yt.key)=="number"}):typeof("value"in Be?Be.value:Be.key)=="number"});warning(!Ce,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(u!=="combobox"||!Fe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(u==="combobox"||!S,"`backfill` only works with `combobox` mode."),warning(u==="combobox"||!z,"`getInputElement` only work with `combobox` mode."),noteOnce(u!=="combobox"||!z||!M||!R,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),j&&!We&&u!=="combobox"&&u!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Q||G,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),K!=null){var de=toArray(K);warning(!ue||de.every(function(Be){return _typeof(Be)==="object"&&("key"in Be||"value"in Be)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Oe||Array.isArray(K),"`value` should be array when `mode` is `multiple` or `tags`")}if(p){var mt=null;toNodeArray(p).some(function(Be){if(!React.isValidElement(Be)||!Be.type)return!1;var yt=Be,bt=yt.type;if(bt.isSelectOption)return!1;if(bt.isSelectOptGroup){var kt=toNodeArray(Be.props.children).every(function(st){return!React.isValidElement(st)||!Be.type||st.type.isSelectOption?!0:(mt=st.type,!1)});return!kt}return mt=bt,!0}),mt&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(mt.displayName||mt.name||mt,"`.")),warning(le===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function ru(l,u){if(l){var d=function p(S){for(var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,R=0;R<S.length;R++){var z=S[R];if(z[u==null?void 0:u.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!M&&Array.isArray(z[u==null?void 0:u.options])&&p(z[u==null?void 0:u.options],!0))break}};d(l)}}var Xs=null,ki=["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"],Bn=["inputValue"];function uo(l){return!l||(0,V.Z)(l)!=="object"}var Bo=v.forwardRef(function(l,u){var d=l.id,p=l.mode,S=l.prefixCls,M=S===void 0?"rc-select":S,R=l.backfill,z=l.fieldNames,U=l.inputValue,j=l.searchValue,Q=l.onSearch,G=l.autoClearSearchValue,ue=G===void 0?!0:G,K=l.onSelect,le=l.onDeselect,Fe=l.dropdownMatchSelectWidth,Oe=Fe===void 0?!0:Fe,We=l.filterOption,He=l.filterSort,Ce=l.optionFilterProp,de=l.optionLabelProp,mt=l.options,Be=l.children,yt=l.defaultActiveFirstOption,bt=l.menuItemSelectedIcon,kt=l.virtual,st=l.direction,it=l.listHeight,Xt=it===void 0?200:it,Ht=l.listItemHeight,Ct=Ht===void 0?20:Ht,qe=l.value,Ve=l.defaultValue,Ie=l.labelInValue,xt=l.onChange,ht=(0,ce.Z)(l,ki),An=hi(d),Rn=Oo(p),cn=!!(!mt&&Be),kn=v.useMemo(function(){return We===void 0&&p==="combobox"?!1:We},[We,p]),rn=v.useMemo(function(){return aa(z,cn)},[JSON.stringify(z),cn]),jn=ot("",{value:j!==void 0?j:U,postState:function(tt){return tt||""}}),Or=(0,m.Z)(jn,2),St=Or[0],ke=Or[1],et=Vs(mt,Be,rn,Ce,de),tn=et.valueOptions,sn=et.labelOptions,on=et.options,Tt=v.useCallback(function(ve){var tt=Fi(ve);return tt.map(function(Qe){var Mt,Un,Gn,li,Vr;if(uo(Qe))Mt=Qe;else{var ti;Gn=Qe.key,Un=Qe.label,Mt=(ti=Qe.value)!==null&&ti!==void 0?ti:Gn}var nr=tn.get(Mt);if(nr){var si;if(Un===void 0&&(Un=nr==null?void 0:nr[de||rn.label]),Gn===void 0&&(Gn=(si=nr==null?void 0:nr.key)!==null&&si!==void 0?si:Mt),li=nr==null?void 0:nr.disabled,Vr=nr==null?void 0:nr.title,0)var eo}return{label:Un,value:Mt,key:Gn,disabled:li,title:Vr}})},[rn,de,tn]),nn=ot(Ve,{value:qe}),Tn=(0,m.Z)(nn,2),pn=Tn[0],Vt=Tn[1],Ge=v.useMemo(function(){var ve,tt=Tt(pn);return p==="combobox"&&re((ve=tt[0])===null||ve===void 0?void 0:ve.value)?[]:tt},[pn,Tt,p]),fn=Us(Ge,tn),dn=(0,m.Z)(fn,2),mn=dn[0],br=dn[1],Sr=v.useMemo(function(){if(!p&&mn.length===1){var ve=mn[0];if(ve.value===null&&(ve.label===null||ve.label===void 0))return[]}return mn.map(function(tt){var Qe;return(0,E.Z)((0,E.Z)({},tt),{},{label:(Qe=tt.label)!==null&&Qe!==void 0?Qe:tt.value})})},[p,mn]),cr=v.useMemo(function(){return new Set(mn.map(function(ve){return ve.value}))},[mn]);v.useEffect(function(){if(p==="combobox"){var ve,tt=(ve=mn[0])===null||ve===void 0?void 0:ve.value;ke(N(tt)?String(tt):"")}},[mn]);var Cr=Ss(function(ve,tt){var Qe,Mt=tt!=null?tt:ve;return Qe={},(0,C.Z)(Qe,rn.value,ve),(0,C.Z)(Qe,rn.label,Mt),Qe}),Cn=v.useMemo(function(){if(p!=="tags")return on;var ve=(0,q.Z)(on),tt=function(Mt){return tn.has(Mt)};return(0,q.Z)(mn).sort(function(Qe,Mt){return Qe.value<Mt.value?-1:1}).forEach(function(Qe){var Mt=Qe.value;tt(Mt)||ve.push(Cr(Mt,Qe.label))}),ve},[Cr,on,tn,mn,p]),Qn=Ks(Cn,rn,St,kn,Ce),ar=v.useMemo(function(){return p!=="tags"||!St||Qn.some(function(ve){return ve[Ce||"value"]===St})||Qn.some(function(ve){return ve[rn.value]===St})?Qn:[Cr(St)].concat((0,q.Z)(Qn))},[Cr,Ce,p,Qn,St,rn]),Vn=v.useMemo(function(){return He?(0,q.Z)(ar).sort(function(ve,tt){return He(ve,tt)}):ar},[ar,He]),xr=v.useMemo(function(){return ps(Vn,{fieldNames:rn,childrenAsData:cn})},[Vn,rn,cn]),Xn=function(tt){var Qe=Tt(tt);if(Vt(Qe),xt&&(Qe.length!==mn.length||Qe.some(function(Gn,li){var Vr;return((Vr=mn[li])===null||Vr===void 0?void 0:Vr.value)!==(Gn==null?void 0:Gn.value)}))){var Mt=Ie?Qe:Qe.map(function(Gn){return Gn.value}),Un=Qe.map(function(Gn){return pl(br(Gn.value))});xt(Rn?Mt:Mt[0],Rn?Un:Un[0])}},ei=v.useState(null),oi=(0,m.Z)(ei,2),gi=oi[0],fr=oi[1],Dr=v.useState(0),bi=(0,m.Z)(Dr,2),dr=bi[0],zr=bi[1],Ui=yt!==void 0?yt:p!=="combobox",Wr=v.useCallback(function(ve,tt){var Qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Mt=Qe.source,Un=Mt===void 0?"keyboard":Mt;zr(tt),R&&p==="combobox"&&ve!==null&&Un==="keyboard"&&fr(String(ve))},[R,p]),ai=function(tt,Qe,Mt){var Un=function(){var to,Nr=br(tt);return[Ie?{label:Nr==null?void 0:Nr[rn.label],value:tt,key:(to=Nr==null?void 0:Nr.key)!==null&&to!==void 0?to:tt}:tt,pl(Nr)]};if(Qe&&K){var Gn=Un(),li=(0,m.Z)(Gn,2),Vr=li[0],ti=li[1];K(Vr,ti)}else if(!Qe&&le&&Mt!=="clear"){var nr=Un(),si=(0,m.Z)(nr,2),eo=si[0],co=si[1];le(eo,co)}},Yn=Ss(function(ve,tt){var Qe,Mt=Rn?tt.selected:!0;Mt?Qe=Rn?[].concat((0,q.Z)(mn),[ve]):[ve]:Qe=mn.filter(function(Un){return Un.value!==ve}),Xn(Qe),ai(ve,Mt),p==="combobox"?fr(""):(!Oo||ue)&&(ke(""),fr(""))}),vn=function(tt,Qe){Xn(tt);var Mt=Qe.type,Un=Qe.values;(Mt==="remove"||Mt==="clear")&&Un.forEach(function(Gn){ai(Gn.value,!1,Mt)})},Hr=function(tt,Qe){if(ke(tt),fr(null),Qe.source==="submit"){var Mt=(tt||"").trim();if(Mt){var Un=Array.from(new Set([].concat((0,q.Z)(cr),[Mt])));Xn(Un),ai(Mt,!0),ke("")}return}Qe.source!=="blur"&&(p==="combobox"&&Xn(tt),Q==null||Q(tt))},Zr=function(tt){var Qe=tt;p!=="tags"&&(Qe=tt.map(function(Un){var Gn=sn.get(Un);return Gn==null?void 0:Gn.value}).filter(function(Un){return Un!==void 0}));var Mt=Array.from(new Set([].concat((0,q.Z)(cr),(0,q.Z)(Qe))));Xn(Mt),Mt.forEach(function(Un){ai(Un,!0)})},Ut=v.useMemo(function(){var ve=kt!==!1&&Oe!==!1;return(0,E.Z)((0,E.Z)({},et),{},{flattenOptions:xr,onActiveValue:Wr,defaultActiveFirstOption:Ui,onSelect:Yn,menuItemSelectedIcon:bt,rawValues:cr,fieldNames:rn,virtual:ve,direction:st,listHeight:Xt,listItemHeight:Ct,childrenAsData:cn})},[et,xr,Wr,Ui,Yn,bt,cr,rn,kt,Oe,Xt,Ct,cn]);return v.createElement(Vl.Provider,{value:Ut},v.createElement(ks,(0,O.Z)({},ht,{id:An,prefixCls:M,ref:u,omitDomProps:Bn,mode:p,displayValues:Sr,onDisplayValuesChange:vn,direction:st,searchValue:St,onSearch:Hr,autoClearSearchValue:ue,onSearchSplit:Zr,dropdownMatchSelectWidth:Oe,OptionList:Bi,emptyOptions:!xr.length,activeValue:gi,activeDescendantId:"".concat(An,"_list_").concat(dr)})))}),So=Bo;So.Option=Cs,So.OptGroup=Ul;var Es=So,_l=Es,Ms=h(10366),Ys=h(8745),Xl=h(33603),wa=h(9708),Is=h(53124),Yl=h(98866),ko=h(88258),Rs=h(98675),Os=h(65223),Qs=h(4173),Sl=h(87244),Ql=h(13458),Ls=h(78642),Js=h(46163),Ts=function(l,u){var d={};for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&u.indexOf(p)<0&&(d[p]=l[p]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,p=Object.getOwnPropertySymbols(l);S<p.length;S++)u.indexOf(p[S])<0&&Object.prototype.propertyIsEnumerable.call(l,p[S])&&(d[p[S]]=l[p[S]]);return d};const Ps="SECRET_COMBOBOX_MODE_DO_NOT_USE",qs=(l,u)=>{var d,{prefixCls:p,bordered:S=!0,className:M,rootClassName:R,getPopupContainer:z,popupClassName:U,dropdownClassName:j,listHeight:Q=256,placement:G,listItemHeight:ue=24,size:K,disabled:le,notFoundContent:Fe,status:Oe,builtinPlacements:We,dropdownMatchSelectWidth:He,popupMatchSelectWidth:Ce,direction:de,style:mt,allowClear:Be}=l,yt=Ts(l,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:bt,getPrefixCls:kt,renderEmpty:st,direction:it,virtual:Xt,popupMatchSelectWidth:Ht,popupOverflow:Ct,select:qe}=v.useContext(Is.E_),Ve=kt("select",p),Ie=kt(),xt=de!=null?de:it,{compactSize:ht,compactItemClassnames:An}=(0,Qs.ri)(Ve,xt),[Rn,cn]=(0,Sl.Z)(Ve),kn=v.useMemo(()=>{const{mode:Cn}=yt;if(Cn!=="combobox")return Cn===Ps?"combobox":Cn},[yt.mode]),rn=kn==="multiple"||kn==="tags",jn=(0,Ls.Z)(yt.suffixIcon,yt.showArrow),Or=(d=Ce!=null?Ce:He)!==null&&d!==void 0?d:Ht,{status:St,hasFeedback:ke,isFormItemInput:et,feedbackIcon:tn}=v.useContext(Os.aM),sn=(0,wa.F)(St,Oe);let on;Fe!==void 0?on=Fe:kn==="combobox"?on=null:on=(st==null?void 0:st("Select"))||v.createElement(ko.Z,{componentName:"Select"});const{suffixIcon:Tt,itemIcon:nn,removeIcon:Tn,clearIcon:pn}=(0,Js.Z)(Object.assign(Object.assign({},yt),{multiple:rn,hasFeedback:ke,feedbackIcon:tn,showSuffixIcon:jn,prefixCls:Ve,showArrow:yt.showArrow,componentName:"Select"})),Vt=Be===!0?{clearIcon:pn}:Be,Ge=(0,Ms.Z)(yt,["suffixIcon","itemIcon"]),fn=Y()(U||j,{[`${Ve}-dropdown-${xt}`]:xt==="rtl"},R,cn),dn=(0,Rs.Z)(Cn=>{var Qn;return(Qn=K!=null?K:ht)!==null&&Qn!==void 0?Qn:Cn}),mn=v.useContext(Yl.Z),br=le!=null?le:mn,Sr=Y()({[`${Ve}-lg`]:dn==="large",[`${Ve}-sm`]:dn==="small",[`${Ve}-rtl`]:xt==="rtl",[`${Ve}-borderless`]:!S,[`${Ve}-in-form-item`]:et},(0,wa.Z)(Ve,sn,ke),An,qe==null?void 0:qe.className,M,R,cn),cr=v.useMemo(()=>G!==void 0?G:xt==="rtl"?"bottomRight":"bottomLeft",[G,xt]),Cr=(0,Ql.Z)(We,Ct);return Rn(v.createElement(_l,Object.assign({ref:u,virtual:Xt,showSearch:qe==null?void 0:qe.showSearch},Ge,{style:Object.assign(Object.assign({},qe==null?void 0:qe.style),mt),dropdownMatchSelectWidth:Or,builtinPlacements:Cr,transitionName:(0,Xl.m)(Ie,"slide-up",yt.transitionName),listHeight:Q,listItemHeight:ue,mode:kn,prefixCls:Ve,placement:cr,direction:xt,suffixIcon:Tt,menuItemSelectedIcon:nn,removeIcon:Tn,allowClear:Vt,notFoundContent:on,className:Sr,getPopupContainer:z||bt,dropdownClassName:fn,disabled:br})))},Lo=v.forwardRef(qs),Ds=(0,Ys.Z)(Lo);Lo.SECRET_COMBOBOX_MODE_DO_NOT_USE=Ps,Lo.Option=Cs,Lo.OptGroup=Ul,Lo._InternalPanelDoNotUseOrYouWillBeFired=Ds;var eu=Lo},87244:function(hn,he,h){"use strict";h.d(he,{Z:function(){return y}});var T=h(14747),Y=h(80110),O=h(45503),q=h(67968),C=h(67771),E=h(33297);const m=g=>{const{optionHeight:I,optionFontSize:F,optionLineHeight:ee,optionPadding:$}=g;return{position:"relative",display:"block",minHeight:I,padding:$,color:g.colorText,fontWeight:"normal",fontSize:F,lineHeight:ee,boxSizing:"border-box"}};var V=g=>{const{antCls:I,componentCls:F}=g,ee=`${F}-item`,$=`&${I}-slide-up-enter${I}-slide-up-enter-active`,$e=`&${I}-slide-up-appear${I}-slide-up-appear-active`,ne=`&${I}-slide-up-leave${I}-slide-up-leave-active`,ae=`${F}-dropdown-placement-`;return[{[`${F}-dropdown`]:Object.assign(Object.assign({},(0,T.Wf)(g)),{position:"absolute",top:-9999,zIndex:g.zIndexPopup,boxSizing:"border-box",padding:g.paddingXXS,overflow:"hidden",fontSize:g.fontSize,fontVariant:"initial",backgroundColor:g.colorBgElevated,borderRadius:g.borderRadiusLG,outline:"none",boxShadow:g.boxShadowSecondary,[`
|
|
|
${$}${ae}bottomLeft,
|
|
|
${$e}${ae}bottomLeft
|
|
|
`]:{animationName:C.fJ},[`
|
|
|
${$}${ae}topLeft,
|
|
|
${$e}${ae}topLeft,
|
|
|
${$}${ae}topRight,
|
|
|
${$e}${ae}topRight
|
|
|
`]:{animationName:C.Qt},[`${ne}${ae}bottomLeft`]:{animationName:C.Uw},[`
|
|
|
${ne}${ae}topLeft,
|
|
|
${ne}${ae}topRight
|
|
|
`]:{animationName:C.ly},"&-hidden":{display:"none"},[`${ee}`]:Object.assign(Object.assign({},m(g)),{cursor:"pointer",transition:`background ${g.motionDurationSlow} ease`,borderRadius:g.borderRadiusSM,"&-group":{color:g.colorTextDescription,fontSize:g.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},T.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${ee}-option-disabled)`]:{backgroundColor:g.optionActiveBg},[`&-selected:not(${ee}-option-disabled)`]:{color:g.optionSelectedColor,fontWeight:g.optionSelectedFontWeight,backgroundColor:g.optionSelectedBg,[`${ee}-option-state`]:{color:g.colorPrimary}},"&-disabled":{[`&${ee}-option-selected`]:{backgroundColor:g.colorBgContainerDisabled},color:g.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:g.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,C.oN)(g,"slide-up"),(0,C.oN)(g,"slide-down"),(0,E.Fm)(g,"move-up"),(0,E.Fm)(g,"move-down")]};const v=2,xe=g=>{let{controlHeightSM:I,controlHeight:F,lineWidth:ee}=g;const $=(F-I)/2-ee,$e=Math.ceil($/2);return[$,$e]};function se(g,I){const{componentCls:F,iconCls:ee}=g,$=`${F}-selection-overflow`,$e=g.multipleSelectItemHeight,[ne]=xe(g),ae=I?`${F}-${I}`:"";return{[`${F}-multiple${ae}`]:{fontSize:g.fontSize,[$]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${F}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${ne-v}px ${v*2}px`,borderRadius:g.borderRadius,[`${F}-show-search&`]:{cursor:"text"},[`${F}-disabled&`]:{background:g.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${v}px 0`,lineHeight:`${$e}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${F}-show-arrow ${F}-selector,
|
|
|
&${F}-allow-clear ${F}-selector
|
|
|
`]:{paddingInlineEnd:g.fontSizeIcon+g.controlPaddingHorizontal},[`${F}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:$e,marginTop:v,marginBottom:v,lineHeight:`${$e-g.lineWidth*2}px`,background:g.multipleItemBg,border:`${g.lineWidth}px ${g.lineType} ${g.multipleItemBorderColor}`,borderRadius:g.borderRadiusSM,cursor:"default",transition:`font-size ${g.motionDurationSlow}, line-height ${g.motionDurationSlow}, height ${g.motionDurationSlow}`,userSelect:"none",marginInlineEnd:v*2,paddingInlineStart:g.paddingXS,paddingInlineEnd:g.paddingXS/2,[`${F}-disabled&`]:{color:g.multipleItemColorDisabled,borderColor:g.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:g.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,T.Ro)()),{display:"inline-flex",alignItems:"center",color:g.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${ee}`]:{verticalAlign:"-0.2em"},"&:hover":{color:g.colorIconHover}})},[`${$}-item + ${$}-item`]:{[`${F}-selection-search`]:{marginInlineStart:0}},[`${F}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:g.inputPaddingHorizontalBase-ne,"\n &-input,\n &-mirror\n ":{height:$e,fontFamily:g.fontFamily,lineHeight:`${$e}px`,transition:`all ${g.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${F}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:g.inputPaddingHorizontalBase,insetInlineEnd:g.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${g.motionDurationSlow}`}}}}var ye=g=>{const{componentCls:I}=g,F=(0,O.TS)(g,{controlHeight:g.controlHeightSM,multipleSelectItemHeight:g.controlHeightXS,borderRadius:g.borderRadiusSM,borderRadiusSM:g.borderRadiusXS}),ee=(0,O.TS)(g,{fontSize:g.fontSizeLG,controlHeight:g.controlHeightLG,multipleSelectItemHeight:g.multipleItemHeightLG,borderRadius:g.borderRadiusLG,borderRadiusSM:g.borderRadius}),[,$]=xe(g);return[se(g),se(F,"sm"),{[`${I}-multiple${I}-sm`]:{[`${I}-selection-placeholder`]:{insetInline:g.controlPaddingHorizontalSM-g.lineWidth},[`${I}-selection-search`]:{marginInlineStart:$}}},se(ee,"lg")]};function we(g,I){const{componentCls:F,inputPaddingHorizontalBase:ee,borderRadius:$}=g,$e=g.controlHeight-g.lineWidth*2,ne=Math.ceil(g.fontSize*1.25),ae=I?`${F}-${I}`:"";return{[`${F}-single${ae}`]:{fontSize:g.fontSize,[`${F}-selector`]:Object.assign(Object.assign({},(0,T.Wf)(g)),{display:"flex",borderRadius:$,[`${F}-selection-search`]:{position:"absolute",top:0,insetInlineStart:ee,insetInlineEnd:ee,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${F}-selection-item,
|
|
|
${F}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${$e}px`,transition:`all ${g.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${$e}px`}},[`${F}-selection-item`]:{position:"relative",userSelect:"none"},[`${F}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${F}-selection-item:after`,`${F}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${F}-show-arrow ${F}-selection-item,
|
|
|
&${F}-show-arrow ${F}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:ne},[`&${F}-open ${F}-selection-item`]:{color:g.colorTextPlaceholder},[`&:not(${F}-customize-input)`]:{[`${F}-selector`]:{width:"100%",height:g.controlHeight,padding:`0 ${ee}px`,[`${F}-selection-search-input`]:{height:$e},"&:after":{lineHeight:`${$e}px`}}},[`&${F}-customize-input`]:{[`${F}-selector`]:{"&:after":{display:"none"},[`${F}-selection-search`]:{position:"static",width:"100%"},[`${F}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${ee}px`,"&:after":{display:"none"}}}}}}}function fe(g){const{componentCls:I}=g,F=g.controlPaddingHorizontalSM-g.lineWidth;return[we(g),we((0,O.TS)(g,{controlHeight:g.controlHeightSM,borderRadius:g.borderRadiusSM}),"sm"),{[`${I}-single${I}-sm`]:{[`&:not(${I}-customize-input)`]:{[`${I}-selection-search`]:{insetInlineStart:F,insetInlineEnd:F},[`${I}-selector`]:{padding:`0 ${F}px`},[`&${I}-show-arrow ${I}-selection-search`]:{insetInlineEnd:F+g.fontSize*1.5},[`
|
|
|
&${I}-show-arrow ${I}-selection-item,
|
|
|
&${I}-show-arrow ${I}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:g.fontSize*1.5}}}},we((0,O.TS)(g,{controlHeight:g.singleItemHeightLG,fontSize:g.fontSizeLG,borderRadius:g.borderRadiusLG}),"lg")]}const P=g=>{const{componentCls:I,selectorBg:F}=g;return{position:"relative",backgroundColor:F,border:`${g.lineWidth}px ${g.lineType} ${g.colorBorder}`,transition:`all ${g.motionDurationMid} ${g.motionEaseInOut}`,input:{cursor:"pointer"},[`${I}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${I}-disabled&`]:{color:g.colorTextDisabled,background:g.colorBgContainerDisabled,cursor:"not-allowed",[`${I}-multiple&`]:{background:g.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},Ee=function(g,I){let F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:ee,borderHoverColor:$,outlineColor:$e,antCls:ne}=I,ae=F?{[`${ee}-selector`]:{borderColor:$}}:{};return{[g]:{[`&:not(${ee}-disabled):not(${ee}-customize-input):not(${ne}-pagination-size-changer)`]:Object.assign(Object.assign({},ae),{[`${ee}-focused& ${ee}-selector`]:{borderColor:$,boxShadow:`0 0 0 ${I.controlOutlineWidth}px ${$e}`,outline:0},[`&:hover ${ee}-selector`]:{borderColor:$}})}}},ot=g=>{const{componentCls:I}=g;return{[`${I}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},_=g=>{const{componentCls:I,inputPaddingHorizontalBase:F,iconCls:ee}=g;return{[I]:Object.assign(Object.assign({},(0,T.Wf)(g)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${I}-customize-input) ${I}-selector`]:Object.assign(Object.assign({},P(g)),ot(g)),[`${I}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},T.vS),[`${I}-selection-placeholder`]:Object.assign(Object.assign({},T.vS),{flex:1,color:g.colorTextPlaceholder,pointerEvents:"none"}),[`${I}-arrow`]:Object.assign(Object.assign({},(0,T.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:F,height:g.fontSizeIcon,marginTop:-g.fontSizeIcon/2,color:g.colorTextQuaternary,fontSize:g.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[ee]:{verticalAlign:"top",transition:`transform ${g.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${I}-suffix)`]:{pointerEvents:"auto"}},[`${I}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${I}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:F,zIndex:1,display:"inline-block",width:g.fontSizeIcon,height:g.fontSizeIcon,marginTop:-g.fontSizeIcon/2,color:g.colorTextQuaternary,fontSize:g.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:g.clearBg,cursor:"pointer",opacity:0,transition:`color ${g.motionDurationMid} ease, opacity ${g.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:g.colorTextTertiary}},"&:hover":{[`${I}-clear`]:{opacity:1}}}),[`${I}-has-feedback`]:{[`${I}-clear`]:{insetInlineEnd:F+g.fontSize+g.paddingXS}}}},ie=g=>{const{componentCls:I}=g;return[{[I]:{[`&-borderless ${I}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${I}-in-form-item`]:{width:"100%"}}},_(g),fe(g),ye(g),V(g),{[`${I}-rtl`]:{direction:"rtl"}},Ee(I,(0,O.TS)(g,{borderHoverColor:g.colorPrimaryHover,outlineColor:g.controlOutline})),Ee(`${I}-status-error`,(0,O.TS)(g,{borderHoverColor:g.colorErrorHover,outlineColor:g.colorErrorOutline}),!0),Ee(`${I}-status-warning`,(0,O.TS)(g,{borderHoverColor:g.colorWarningHover,outlineColor:g.colorWarningOutline}),!0),(0,Y.c)(g,{borderElCls:`${I}-selector`,focusElCls:`${I}-focused`})]};var y=(0,q.Z)("Select",(g,I)=>{let{rootPrefixCls:F}=I;const ee=(0,O.TS)(g,{rootPrefixCls:F,inputPaddingHorizontalBase:g.paddingSM-1,multipleSelectItemHeight:g.multipleItemHeight});return[ie(ee)]},g=>{const{fontSize:I,lineHeight:F,controlHeight:ee,controlPaddingHorizontal:$,zIndexPopupBase:$e,colorText:ne,fontWeightStrong:ae,controlItemBgActive:be,controlItemBgHover:at,colorBgContainer:gt,colorFillSecondary:nt,controlHeightLG:Ot,controlHeightSM:ut,colorBgContainerDisabled:rt,colorTextDisabled:Ze}=g;return{zIndexPopup:$e+50,optionSelectedColor:ne,optionSelectedFontWeight:ae,optionSelectedBg:be,optionActiveBg:at,optionPadding:`${(ee-I*F)/2}px ${$}px`,optionFontSize:I,optionLineHeight:F,optionHeight:ee,selectorBg:gt,clearBg:gt,singleItemHeightLG:Ot,multipleItemBg:nt,multipleItemBorderColor:"transparent",multipleItemHeight:ut,multipleItemHeightLG:ee,multipleSelectorBgDisabled:rt,multipleItemColorDisabled:Ze,multipleItemBorderColorDisabled:"transparent"}})},13458:function(hn,he,h){"use strict";h.d(he,{Z:function(){return Y}});const T=O=>{const C={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:O==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},C),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},C),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},C),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},C),{points:["br","tr"],offset:[0,-4]})}};function Y(O,q){return O||T(q)}},78642:function(hn,he,h){"use strict";h.d(he,{Z:function(){return T}});function T(Y,O){return O!==void 0?O:Y!==null}},46163:function(hn,he,h){"use strict";h.d(he,{Z:function(){return ce}});var T=h(18299),Y=h(16646),O=h(73475),q=h(42922),C=h(3407),E=h(72395),m=h(67294);function ce(V){let{suffixIcon:v,clearIcon:xe,menuItemSelectedIcon:se,removeIcon:pe,loading:ye,multiple:we,hasFeedback:fe,prefixCls:P,showSuffixIcon:Ee,feedbackIcon:ot,showArrow:_,componentName:ie}=V;const y=xe!=null?xe:m.createElement(Y.Z,null),g=$=>v===null&&!fe&&!_?null:m.createElement(m.Fragment,null,Ee!==!1&&$,fe&&ot);let I=null;if(v!==void 0)I=g(v);else if(ye)I=g(m.createElement(C.Z,{spin:!0}));else{const $=`${P}-suffix`;I=$e=>{let{open:ne,showSearch:ae}=$e;return g(ne&&ae?m.createElement(E.Z,{className:$}):m.createElement(q.Z,{className:$}))}}let F=null;se!==void 0?F=se:we?F=m.createElement(T.Z,null):F=null;let ee=null;return pe!==void 0?ee=pe:ee=m.createElement(O.Z,null),{clearIcon:y,suffixIcon:I,itemIcon:F,removeIcon:ee}}},33507:function(hn,he){"use strict";const h=T=>({[T.componentCls]:{[`${T.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${T.motionDurationMid} ${T.motionEaseInOut},
|
|
|
opacity ${T.motionDurationMid} ${T.motionEaseInOut} !important`}},[`${T.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${T.motionDurationMid} ${T.motionEaseInOut},
|
|
|
opacity ${T.motionDurationMid} ${T.motionEaseInOut} !important`}}});he.Z=h},33297:function(hn,he,h){"use strict";h.d(he,{Fm:function(){return se}});var T=h(45930),Y=h(93590);const O=new T.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),q=new T.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),C=new T.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),E=new T.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 T.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 T.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 T.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),v=new T.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:v},"move-down":{inKeyframes:O,outKeyframes:q},"move-left":{inKeyframes:C,outKeyframes:E},"move-right":{inKeyframes:m,outKeyframes:ce}},se=(pe,ye)=>{const{antCls:we}=pe,fe=`${we}-${ye}`,{inKeyframes:P,outKeyframes:Ee}=xe[ye];return[(0,Y.R)(fe,P,Ee,pe.motionDurationMid),{[`
|
|
|
${fe}-enter,
|
|
|
${fe}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:pe.motionEaseOutCirc},[`${fe}-leave`]:{animationTimingFunction:pe.motionEaseInOutCirc}}]}},67771:function(hn,he,h){"use strict";h.d(he,{Qt:function(){return C},Uw:function(){return q},fJ:function(){return O},ly:function(){return E},oN:function(){return se}});var T=h(45930),Y=h(93590);const O=new T.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),q=new T.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),C=new T.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),E=new T.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),m=new T.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ce=new T.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),V=new T.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),v=new T.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:O,outKeyframes:q},"slide-down":{inKeyframes:C,outKeyframes:E},"slide-left":{inKeyframes:m,outKeyframes:ce},"slide-right":{inKeyframes:V,outKeyframes:v}},se=(pe,ye)=>{const{antCls:we}=pe,fe=`${we}-${ye}`,{inKeyframes:P,outKeyframes:Ee}=xe[ye];return[(0,Y.R)(fe,P,Ee,pe.motionDurationMid),{[`
|
|
|
${fe}-enter,
|
|
|
${fe}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:pe.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${fe}-leave`]:{animationTimingFunction:pe.motionEaseInQuint}}]}},56396:function(hn,he){"use strict";var h;var T=Symbol.for("react.element"),Y=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),m=Symbol.for("react.context"),ce=Symbol.for("react.server_context"),V=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),xe=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),we;we=Symbol.for("react.module.reference");function fe(P){if(typeof P=="object"&&P!==null){var Ee=P.$$typeof;switch(Ee){case T:switch(P=P.type,P){case O:case C:case q:case v:case xe:return P;default:switch(P=P&&P.$$typeof,P){case ce:case m:case V:case pe:case se:case E:return P;default:return Ee}}case Y:return Ee}}}h=m,h=E,h=T,h=V,h=O,h=pe,h=se,h=Y,h=C,h=q,h=v,h=xe,h=function(){return!1},h=function(){return!1},h=function(P){return fe(P)===m},h=function(P){return fe(P)===E},h=function(P){return typeof P=="object"&&P!==null&&P.$$typeof===T},h=function(P){return fe(P)===V},h=function(P){return fe(P)===O},h=function(P){return fe(P)===pe},he.isMemo=function(P){return fe(P)===se},h=function(P){return fe(P)===Y},h=function(P){return fe(P)===C},h=function(P){return fe(P)===q},h=function(P){return fe(P)===v},h=function(P){return fe(P)===xe},h=function(P){return typeof P=="string"||typeof P=="function"||P===O||P===C||P===q||P===v||P===xe||P===ye||typeof P=="object"&&P!==null&&(P.$$typeof===pe||P.$$typeof===se||P.$$typeof===E||P.$$typeof===m||P.$$typeof===V||P.$$typeof===we||P.getModuleId!==void 0)},h=fe},71326:function(hn,he,h){"use strict";hn.exports=h(56396)},41771:function(hn,he){"use strict";var h;var T=typeof Symbol=="function"&&Symbol.for,Y=T?Symbol.for("react.element"):60103,O=T?Symbol.for("react.portal"):60106,q=T?Symbol.for("react.fragment"):60107,C=T?Symbol.for("react.strict_mode"):60108,E=T?Symbol.for("react.profiler"):60114,m=T?Symbol.for("react.provider"):60109,ce=T?Symbol.for("react.context"):60110,V=T?Symbol.for("react.async_mode"):60111,v=T?Symbol.for("react.concurrent_mode"):60111,xe=T?Symbol.for("react.forward_ref"):60112,se=T?Symbol.for("react.suspense"):60113,pe=T?Symbol.for("react.suspense_list"):60120,ye=T?Symbol.for("react.memo"):60115,we=T?Symbol.for("react.lazy"):60116,fe=T?Symbol.for("react.block"):60121,P=T?Symbol.for("react.fundamental"):60117,Ee=T?Symbol.for("react.responder"):60118,ot=T?Symbol.for("react.scope"):60119;function _(y){if(typeof y=="object"&&y!==null){var g=y.$$typeof;switch(g){case Y:switch(y=y.type,y){case V:case v:case q:case E:case C:case se:return y;default:switch(y=y&&y.$$typeof,y){case ce:case xe:case we:case ye:case m:return y;default:return g}}case O:return g}}}function ie(y){return _(y)===v}h=V,h=v,h=ce,h=m,h=Y,h=xe,h=q,h=we,h=ye,h=O,h=E,h=C,h=se,h=function(y){return ie(y)||_(y)===V},h=ie,h=function(y){return _(y)===ce},h=function(y){return _(y)===m},h=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===Y},h=function(y){return _(y)===xe},he.isFragment=function(y){return _(y)===q},h=function(y){return _(y)===we},he.isMemo=function(y){return _(y)===ye},h=function(y){return _(y)===O},h=function(y){return _(y)===E},h=function(y){return _(y)===C},h=function(y){return _(y)===se},h=function(y){return typeof y=="string"||typeof y=="function"||y===q||y===v||y===E||y===C||y===se||y===pe||typeof y=="object"&&y!==null&&(y.$$typeof===we||y.$$typeof===ye||y.$$typeof===m||y.$$typeof===ce||y.$$typeof===xe||y.$$typeof===P||y.$$typeof===Ee||y.$$typeof===ot||y.$$typeof===fe)},h=_},47655:function(hn,he,h){"use strict";hn.exports=h(41771)},64701:function(hn,he,h){"use strict";h.r(he),h.d(he,{ResizableTextArea:function(){return Zt},default:function(){return hr}});var T=h(87462),Y=h(1413),O=h(4942),q=h(71002),C=h(97685),E=h(45987),m=h(74902),ce=h(94184),V=h.n(ce),v=h(67656),xe=h(87887),se=h(67294);function pe(Pe){var Se=se.useRef();Se.current=Pe;var Ye=se.useCallback(function(){for(var Me,wt=arguments.length,$t=new Array(wt),Dt=0;Dt<wt;Dt++)$t[Dt]=arguments[Dt];return(Me=Se.current)===null||Me===void 0?void 0:Me.call.apply(Me,[Se].concat($t))},[]);return Ye}function ye(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var we=ye()?se.useLayoutEffect:se.useEffect,fe=we,P=function(Se,Ye){var Me=se.useRef(!0);we(function(){if(!Me.current)return Se()},Ye),we(function(){return Me.current=!1,function(){Me.current=!0}},[])};function Ee(Pe){var Se=se.useRef(!1),Ye=se.useState(Pe),Me=(0,C.Z)(Ye,2),wt=Me[0],$t=Me[1];se.useEffect(function(){return Se.current=!1,function(){Se.current=!0}},[]);function Dt(pt,Nt){Nt&&Se.current||$t(pt)}return[wt,Dt]}function ot(Pe){return Pe!==void 0}function _(Pe,Se){var Ye=Se||{},Me=Ye.defaultValue,wt=Ye.value,$t=Ye.onChange,Dt=Ye.postState,pt=Ee(function(){return ot(wt)?wt:ot(Me)?typeof Me=="function"?Me():Me:typeof Pe=="function"?Pe():Pe}),Nt=(0,C.Z)(pt,2),Wt=Nt[0],Jt=Nt[1],ln=wt!==void 0?wt:Wt,Kt=Dt?Dt(ln):ln,Et=pe($t),wn=Ee([ln]),un=(0,C.Z)(wn,2),bn=un[0],gr=un[1];P(function(){var pr=bn[0];Wt!==pr&&Et(Wt,pr)},[bn]),P(function(){ot(wt)||Jt(wt)},[wt]);var En=pe(function(pr,me){Jt(pr,me),gr([ln],me)});return[Kt,En]}var ie=h(48555),y=function(Se){return+setTimeout(Se,16)},g=function(Se){return clearTimeout(Se)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(y=function(Se){return window.requestAnimationFrame(Se)},g=function(Se){return window.cancelAnimationFrame(Se)});var I=0,F=new Map;function ee(Pe){F.delete(Pe)}var $=function(Se){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;I+=1;var Me=I;function wt($t){if($t===0)ee(Me),Se();else{var Dt=y(function(){wt($t-1)});F.set(Me,Dt)}}return wt(Ye),Me};$.cancel=function(Pe){var Se=F.get(Pe);return ee(Se),g(Se)};var $e=$,ne=`
|
|
|
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;
|
|
|
`,ae=["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"],be={},at;function gt(Pe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ye=Pe.getAttribute("id")||Pe.getAttribute("data-reactid")||Pe.getAttribute("name");if(Se&&be[Ye])return be[Ye];var Me=window.getComputedStyle(Pe),wt=Me.getPropertyValue("box-sizing")||Me.getPropertyValue("-moz-box-sizing")||Me.getPropertyValue("-webkit-box-sizing"),$t=parseFloat(Me.getPropertyValue("padding-bottom"))+parseFloat(Me.getPropertyValue("padding-top")),Dt=parseFloat(Me.getPropertyValue("border-bottom-width"))+parseFloat(Me.getPropertyValue("border-top-width")),pt=ae.map(function(Wt){return"".concat(Wt,":").concat(Me.getPropertyValue(Wt))}).join(";"),Nt={sizingStyle:pt,paddingSize:$t,borderSize:Dt,boxSizing:wt};return Se&&Ye&&(be[Ye]=Nt),Nt}function nt(Pe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;at||(at=document.createElement("textarea"),at.setAttribute("tab-index","-1"),at.setAttribute("aria-hidden","true"),document.body.appendChild(at)),Pe.getAttribute("wrap")?at.setAttribute("wrap",Pe.getAttribute("wrap")):at.removeAttribute("wrap");var wt=gt(Pe,Se),$t=wt.paddingSize,Dt=wt.borderSize,pt=wt.boxSizing,Nt=wt.sizingStyle;at.setAttribute("style","".concat(Nt,";").concat(ne)),at.value=Pe.value||Pe.placeholder||"";var Wt=void 0,Jt=void 0,ln,Kt=at.scrollHeight;if(pt==="border-box"?Kt+=Dt:pt==="content-box"&&(Kt-=$t),Ye!==null||Me!==null){at.value=" ";var Et=at.scrollHeight-$t;Ye!==null&&(Wt=Et*Ye,pt==="border-box"&&(Wt=Wt+$t+Dt),Kt=Math.max(Wt,Kt)),Me!==null&&(Jt=Et*Me,pt==="border-box"&&(Jt=Jt+$t+Dt),ln=Kt>Jt?"":"hidden",Kt=Math.min(Jt,Kt))}var wn={height:Kt,overflowY:ln,resize:"none"};return Wt&&(wn.minHeight=Wt),Jt&&(wn.maxHeight=Jt),wn}var Ot=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ut=0,rt=1,Ze=2,_e=se.forwardRef(function(Pe,Se){var Ye=Pe,Me=Ye.prefixCls,wt=Ye.onPressEnter,$t=Ye.defaultValue,Dt=Ye.value,pt=Ye.autoSize,Nt=Ye.onResize,Wt=Ye.className,Jt=Ye.style,ln=Ye.disabled,Kt=Ye.onChange,Et=Ye.onInternalAutoSize,wn=(0,E.Z)(Ye,Ot),un=_($t,{value:Dt,postState:function(te){return te!=null?te:""}}),bn=(0,C.Z)(un,2),gr=bn[0],En=bn[1],pr=function(te){En(te.target.value),Kt==null||Kt(te)},me=se.useRef();se.useImperativeHandle(Se,function(){return{textArea:me.current}});var Dn=se.useMemo(function(){return pt&&(0,q.Z)(pt)==="object"?[pt.minRows,pt.maxRows]:[]},[pt]),On=(0,C.Z)(Dn,2),Nn=On[0],zn=On[1],Ai=!!pt,Ir=function(){try{if(document.activeElement===me.current){var te=me.current,Xe=te.selectionStart,Le=te.selectionEnd,Te=te.scrollTop;me.current.setSelectionRange(Xe,Le),me.current.scrollTop=Te}}catch(Rt){}},ii=se.useState(Ze),rr=(0,C.Z)(ii,2),Fr=rr[0],Qr=rr[1],Ei=se.useState(),Yi=(0,C.Z)(Ei,2),Qi=Yi[0],io=Yi[1],Mi=function(){Qr(ut)};fe(function(){Ai&&Mi()},[Dt,Nn,zn,Ai]),fe(function(){if(Fr===ut)Qr(rt);else if(Fr===rt){var J=nt(me.current,!1,Nn,zn);Qr(Ze),io(J)}else Ir()},[Fr]);var Fi=se.useRef(),$i=function(){$e.cancel(Fi.current)},vo=function(te){Fr===Ze&&(Nt==null||Nt(te),pt&&($i(),Fi.current=$e(function(){Mi()})))};se.useEffect(function(){return $i},[]);var N=Ai?Qi:null,re=(0,Y.Z)((0,Y.Z)({},Jt),N);return(Fr===ut||Fr===rt)&&(re.overflowY="hidden",re.overflowX="hidden"),se.createElement(ie.Z,{onResize:vo,disabled:!(pt||Nt)},se.createElement("textarea",(0,T.Z)({},wn,{ref:me,style:re,className:V()(Me,Wt,(0,O.Z)({},"".concat(Me,"-disabled"),ln)),disabled:ln,value:gr,onChange:pr})))}),Zt=_e,an=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function ct(Pe,Se){return(0,m.Z)(Pe||"").slice(0,Se).join("")}function It(Pe,Se,Ye,Me){var wt=Ye;return Pe?wt=ct(Ye,Me):(0,m.Z)(Se||"").length<Ye.length&&(0,m.Z)(Ye||"").length>Me&&(wt=Se),wt}var vt=se.forwardRef(function(Pe,Se){var Ye,Me=Pe.defaultValue,wt=Pe.value,$t=Pe.onFocus,Dt=Pe.onBlur,pt=Pe.onChange,Nt=Pe.allowClear,Wt=Pe.maxLength,Jt=Pe.onCompositionStart,ln=Pe.onCompositionEnd,Kt=Pe.suffix,Et=Pe.prefixCls,wn=Et===void 0?"rc-textarea":Et,un=Pe.classes,bn=Pe.showCount,gr=Pe.className,En=Pe.style,pr=Pe.disabled,me=Pe.hidden,Dn=Pe.classNames,On=Pe.styles,Nn=Pe.onResize,zn=(0,E.Z)(Pe,an),Ai=_(Me,{value:wt,defaultValue:Me}),Ir=(0,C.Z)(Ai,2),ii=Ir[0],rr=Ir[1],Fr=(0,se.useRef)(null),Qr=se.useState(!1),Ei=(0,C.Z)(Qr,2),Yi=Ei[0],Qi=Ei[1],io=se.useState(!1),Mi=(0,C.Z)(io,2),Fi=Mi[0],$i=Mi[1],vo=se.useRef(),N=se.useRef(0),re=se.useState(null),J=(0,C.Z)(re,2),te=J[0],Xe=J[1],Le=function(){var De;(De=Fr.current)===null||De===void 0||De.textArea.focus()};(0,se.useImperativeHandle)(Se,function(){return{resizableTextArea:Fr.current,focus:Le,blur:function(){var De;(De=Fr.current)===null||De===void 0||De.textArea.blur()}}}),(0,se.useEffect)(function(){Qi(function(Re){return!pr&&Re})},[pr]);var Te=Number(Wt)>0,Rt=function(De){$i(!0),vo.current=ii,N.current=De.currentTarget.selectionStart,Jt==null||Jt(De)},jt=function(De){$i(!1);var ze=De.currentTarget.value;if(Te){var en,k=N.current>=Wt+1||N.current===((en=vo.current)===null||en===void 0?void 0:en.length);ze=It(k,vo.current,ze,Wt)}ze!==ii&&(rr(ze),(0,xe.rJ)(De.currentTarget,De,pt,ze)),ln==null||ln(De)},qt=function(De){var ze=De.target.value;if(!Fi&&Te){var en=De.target.selectionStart>=Wt+1||De.target.selectionStart===ze.length||!De.target.selectionStart;ze=It(en,ii,ze,Wt)}rr(ze),(0,xe.rJ)(De.currentTarget,De,pt,ze)},Lt=function(De){var ze=zn.onPressEnter,en=zn.onKeyDown;De.key==="Enter"&&ze&&ze(De),en==null||en(De)},ft=function(De){Qi(!0),$t==null||$t(De)},x=function(De){Qi(!1),Dt==null||Dt(De)},A=function(De){var ze;rr(""),Le(),(0,xe.rJ)((ze=Fr.current)===null||ze===void 0?void 0:ze.textArea,De,pt)},H=(0,xe.D7)(ii);!Fi&&Te&&wt==null&&(H=ct(H,Wt));var W=Kt,B;if(bn){var Z=(0,m.Z)(H).length;(0,q.Z)(bn)==="object"?B=bn.formatter({value:H,count:Z,maxLength:Wt}):B="".concat(Z).concat(Te?" / ".concat(Wt):""),W=se.createElement(se.Fragment,null,W,se.createElement("span",{className:V()("".concat(wn,"-data-count"),Dn==null?void 0:Dn.count),style:On==null?void 0:On.count},B))}var Ke=function(De){var ze;Nn==null||Nn(De),(ze=Fr.current)!==null&&ze!==void 0&&ze.textArea.style.height&&Xe(!0)},At=!zn.autoSize&&!bn&&!Nt,dt=se.createElement(v.BaseInput,{value:H,allowClear:Nt,handleReset:A,suffix:W,prefixCls:wn,classes:{affixWrapper:V()(un==null?void 0:un.affixWrapper,(Ye={},(0,O.Z)(Ye,"".concat(wn,"-show-count"),bn),(0,O.Z)(Ye,"".concat(wn,"-textarea-allow-clear"),Nt),Ye))},disabled:pr,focused:Yi,className:gr,style:(0,Y.Z)((0,Y.Z)({},En),te&&!At?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof B=="string"?B:void 0}},hidden:me,inputElement:se.createElement(Zt,(0,T.Z)({},zn,{onKeyDown:Lt,onChange:qt,onFocus:ft,onBlur:x,onCompositionStart:Rt,onCompositionEnd:jt,className:Dn==null?void 0:Dn.textarea,style:(0,Y.Z)((0,Y.Z)({},On==null?void 0:On.textarea),{},{resize:En==null?void 0:En.resize}),disabled:pr,prefixCls:wn,onResize:Ke,ref:Fr}))});return dt}),$n=vt,hr=$n},4631:function(hn){(function(he,h){hn.exports=h()})(this,function(){"use strict";var he=navigator.userAgent,h=navigator.platform,T=/gecko\/\d/i.test(he),Y=/MSIE \d/.test(he),O=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(he),q=/Edge\/(\d+)/.exec(he),C=Y||O||q,E=C&&(Y?document.documentMode||6:+(q||O)[1]),m=!q&&/WebKit\//.test(he),ce=m&&/Qt\/\d+\.\d+/.test(he),V=!q&&/Chrome\//.test(he),v=/Opera\//.test(he),xe=/Apple Computer/.test(navigator.vendor),se=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(he),pe=/PhantomJS/.test(he),ye=!q&&/AppleWebKit/.test(he)&&/Mobile\/\w+/.test(he),we=/Android/.test(he),fe=ye||we||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(he),P=ye||/Mac/.test(h),Ee=/\bCrOS\b/.test(he),ot=/win/i.test(h),_=v&&he.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(v=!1,m=!0);var ie=P&&(ce||v&&(_==null||_<12.11)),y=T||C&&E>=9;function g(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var I=function(e,t){var r=e.className,n=g(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 F(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ee(e,t){return F(e).appendChild(t)}function $(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 $e(e,t,r,n){var i=$(e,t,r,n);return i.setAttribute("role","presentation"),i}var ne;document.createRange?ne=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:ne=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 ae(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 be(){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 at(e,t){var r=e.className;g(t).test(r)||(e.className+=(r?" ":"")+t)}function gt(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!g(r[n]).test(t)&&(t+=" "+r[n]);return t}var nt=function(e){e.select()};ye?nt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:C&&(nt=function(e){try{e.select()}catch(t){}});function Ot(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ut(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 rt(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 s=e.indexOf(" ",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=r-a%r,o=s+1}}var Ze=function(){this.id=null,this.f=null,this.time=0,this.handler=Ot(this.onTimeout,this)};Ze.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ze.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 _e(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Zt=50,an={toString:function(){return"CodeMirror.Pass"}},ct={scroll:!1},It={origin:"*mouse"},vt={origin:"+move"};function $n(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 hr=[""];function Pe(e){for(;hr.length<=e;)hr.push(Se(hr)+" ");return hr[e]}function Se(e){return e[e.length-1]}function Ye(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 wt(){}function $t(e,t){var r;return Object.create?r=Object.create(e):(wt.prototype=e,r=new wt),t&&ut(t,r),r}var Dt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function pt(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Dt.test(e))}function Nt(e,t){return t?t.source.indexOf("\\w")>-1&&pt(e)?!0:t.test(e):pt(e)}function Wt(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Jt=/[\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 ln(e){return e.charCodeAt(0)>=768&&Jt.test(e)}function Kt(e,t,r){for(;(r<0?t>0:t<e.length)&&ln(e.charAt(t));)t+=r;return t}function Et(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 wn(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 un=null;function bn(e,t,r){var n;un=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:un=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:un=i)}return n!=null?n:un}var gr=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(f){return f<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":f==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function c(f,b,w){this.level=f,this.from=b,this.to=w}return function(f,b){var w=b=="ltr"?"L":"R";if(f.length==0||b=="ltr"&&!n.test(f))return!1;for(var D=f.length,L=[],X=0;X<D;++X)L.push(r(f.charCodeAt(X)));for(var oe=0,ge=w;oe<D;++oe){var Ne=L[oe];Ne=="m"?L[oe]=ge:ge=Ne}for(var Je=0,Ae=w;Je<D;++Je){var lt=L[Je];lt=="1"&&Ae=="r"?L[Je]="n":o.test(lt)&&(Ae=lt,lt=="r"&&(L[Je]="R"))}for(var zt=1,Pt=L[0];zt<D-1;++zt){var yn=L[zt];yn=="+"&&Pt=="1"&&L[zt+1]=="1"?L[zt]="1":yn==","&&Pt==L[zt+1]&&(Pt=="1"||Pt=="n")&&(L[zt]=Pt),Pt=yn}for(var sr=0;sr<D;++sr){var ui=L[sr];if(ui==",")L[sr]="N";else if(ui=="%"){var Tr=void 0;for(Tr=sr+1;Tr<D&&L[Tr]=="%";++Tr);for(var ro=sr&&L[sr-1]=="!"||Tr<D&&L[Tr]=="1"?"1":"N",Gi=sr;Gi<Tr;++Gi)L[Gi]=ro;sr=Tr-1}}for(var Xr=0,_i=w;Xr<D;++Xr){var pi=L[Xr];_i=="L"&&pi=="1"?L[Xr]="L":o.test(pi)&&(_i=pi)}for(var ri=0;ri<D;++ri)if(i.test(L[ri])){var Yr=void 0;for(Yr=ri+1;Yr<D&&i.test(L[Yr]);++Yr);for(var Ar=(ri?L[ri-1]:w)=="L",Xi=(Yr<D?L[Yr]:w)=="L",Cl=Ar==Xi?Ar?"L":"R":w,Ra=ri;Ra<Yr;++Ra)L[Ra]=Cl;ri=Yr-1}for(var wi=[],_o,ci=0;ci<D;)if(a.test(L[ci])){var tu=ci;for(++ci;ci<D&&a.test(L[ci]);++ci);wi.push(new c(0,tu,ci))}else{var da=ci,Ga=wi.length,_a=b=="rtl"?1:0;for(++ci;ci<D&&L[ci]!="L";++ci);for(var Ni=da;Ni<ci;)if(s.test(L[Ni])){da<Ni&&(wi.splice(Ga,0,new c(1,da,Ni)),Ga+=_a);var xl=Ni;for(++Ni;Ni<ci&&s.test(L[Ni]);++Ni);wi.splice(Ga,0,new c(2,xl,Ni)),Ga+=_a,da=Ni}else++Ni;da<ci&&wi.splice(Ga,0,new c(1,da,ci))}return b=="ltr"&&(wi[0].level==1&&(_o=f.match(/^\s+/))&&(wi[0].from=_o[0].length,wi.unshift(new c(0,0,_o[0].length))),Se(wi).level==1&&(_o=f.match(/\s+$/))&&(Se(wi).to-=_o[0].length,wi.push(new c(0,D-_o[0].length,D)))),b=="rtl"?wi.reverse():wi}}();function En(e,t){var r=e.order;return r==null&&(r=e.order=gr(e.text,t)),r}var pr=[],me=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]||pr).concat(r)}};function Dn(e,t){return e._handlers&&e._handlers[t]||pr}function On(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=_e(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Nn(e,t){var r=Dn(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 zn(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Nn(e,r||t.type,e,t),Qr(t)||t.codemirrorIgnore}function Ai(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)_e(r,t[n])==-1&&r.push(t[n])}function Ir(e,t){return Dn(e,t).length>0}function ii(e){e.prototype.on=function(t,r){me(this,t,r)},e.prototype.off=function(t,r){On(this,t,r)}}function rr(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Fr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Qr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ei(e){rr(e),Fr(e)}function Yi(e){return e.target||e.srcElement}function Qi(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),P&&e.ctrlKey&&t==1&&(t=3),t}var io=function(){if(C&&E<9)return!1;var e=$("div");return"draggable"in e||"dragDrop"in e}(),Mi;function Fi(e){if(Mi==null){var t=$("span","\u200B");ee(e,$("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Mi=t.offsetWidth<=1&&t.offsetHeight>2&&!(C&&E<8))}var r=Mi?$("span","\u200B"):$("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var $i;function vo(e){if($i!=null)return $i;var t=ee(e,document.createTextNode("A\u062EA")),r=ne(t,0,1).getBoundingClientRect(),n=ne(t,1,2).getBoundingClientRect();return F(e),!r||r.left==r.right?!1:$i=n.right-r.right<3}var N=`
|
|
|
|
|
|
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/)},re=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},J=function(){var e=$("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),te=null;function Xe(e){if(te!=null)return te;var t=ee(e,$("span","x")),r=t.getBoundingClientRect(),n=ne(t,0,1).getBoundingClientRect();return te=Math.abs(r.left-n.left)>1}var Le={},Te={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Le[e]=t}function jt(e,t){Te[e]=t}function qt(e){if(typeof e=="string"&&Te.hasOwnProperty(e))e=Te[e];else if(e&&typeof e.name=="string"&&Te.hasOwnProperty(e.name)){var t=Te[e.name];typeof t=="string"&&(t={name:t}),e=$t(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return qt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return qt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Lt(e,t){t=qt(t);var r=Le[t.name];if(!r)return Lt(e,"text/plain");var n=r(e,t);if(ft.hasOwnProperty(t.name)){var i=ft[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 ft={};function x(e,t){var r=ft.hasOwnProperty(e)?ft[e]:ft[e]={};ut(t,r)}function A(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 H(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 W(e,t,r){return e.startState?e.startState(t,r):!0}var B=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};B.prototype.eol=function(){return this.pos>=this.string.length},B.prototype.sol=function(){return this.pos==this.lineStart},B.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},B.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},B.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},B.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},B.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},B.prototype.skipToEnd=function(){this.pos=this.string.length},B.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},B.prototype.backUp=function(e){this.pos-=e},B.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=rt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?rt(this.string,this.lineStart,this.tabSize):0)},B.prototype.indentation=function(){return rt(this.string,null,this.tabSize)-(this.lineStart?rt(this.string,this.lineStart,this.tabSize):0)},B.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)}},B.prototype.current=function(){return this.string.slice(this.start,this.pos)},B.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},B.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},B.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Z(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 Ke(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 At(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function dt(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Re(e){if(e.parent==null)return null;for(var t=e.parent,r=_e(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 De(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 s=e.lines[a],c=s.height;if(t<c)break;t-=c}return r+a}function ze(e,t){return t>=e.first&&t<e.first+e.size}function en(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function k(e,t,r){if(r===void 0&&(r=null),!(this instanceof k))return new k(e,t,r);this.line=e,this.ch=t,this.sticky=r}function Ue(e,t){return e.line-t.line||e.ch-t.ch}function gn(e,t){return e.sticky==t.sticky&&Ue(e,t)==0}function Wn(e){return k(e.line,e.ch)}function Bt(e,t){return Ue(e,t)<0?t:e}function Ft(e,t){return Ue(e,t)<0?e:t}function Kn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function je(e,t){if(t.line<e.first)return k(e.first,0);var r=e.first+e.size-1;return t.line>r?k(r,Z(e,r).text.length):Sn(t,Z(e,t.line).text.length)}function Sn(e,t){var r=e.ch;return r==null||r>t?k(e.line,t):r<0?k(e.line,0):e}function Mn(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=je(e,t[n]);return r}var Hn=function(e,t){this.state=e,this.lookAhead=t},Pn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Pn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Pn.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}},Pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pn.fromSaved=function(e,t,r){return t instanceof Hn?new Pn(e,A(e.mode,t.state),r,t.lookAhead):new Pn(e,A(e.mode,t),r)},Pn.prototype.save=function(e){var t=e!==!1?A(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Hn(t,this.maxLookAhead):t};function kr(e,t,r,n){var i=[e.state.modeGen],o={};Zn(e,t.text,e.doc.mode,r,function(f,b){return i.push(f,b)},o,n);for(var a=r.state,s=function(f){r.baseTokens=i;var b=e.state.overlays[f],w=1,D=0;r.state=!0,Zn(e,t.text,b.mode,r,function(L,X){for(var oe=w;D<L;){var ge=i[w];ge>L&&i.splice(w,1,L,i[w+1],ge),w+=2,D=Math.min(L,ge)}if(X)if(b.opaque)i.splice(oe,w-oe,L,"overlay "+X),w=oe+2;else for(;oe<w;oe+=2){var Ne=i[oe+1];i[oe+1]=(Ne?Ne+" ":"")+"overlay "+X}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},c=0;c<e.state.overlays.length;++c)s(c);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function wr(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Jn(e,Re(t)),i=t.text.length>e.options.maxHighlightLength&&A(e.doc.mode,n.state),o=kr(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 Jn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Pn(n,!0,t);var o=mr(e,t,r),a=o>n.first&&Z(n,o-1).stateAfter,s=a?Pn.fromSaved(n,a,o):new Pn(n,W(n.mode),o);return n.iter(o,t,function(c){Jr(e,c.text,s);var f=s.line;c.stateAfter=f==t-1||f%5==0||f>=i.viewFrom&&f<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Jr(e,t,r,n){var i=e.doc.mode,o=new B(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&Ur(i,r.state);!o.eol();)qn(i,o,r.state),o.start=o.pos}function Ur(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=H(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function qn(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=H(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 $r=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Kr(e,t,r,n){var i=e.doc,o=i.mode,a;t=je(i,t);var s=Z(i,t.line),c=Jn(e,t.line,r),f=new B(s.text,e.options.tabSize,c),b;for(n&&(b=[]);(n||f.pos<t.ch)&&!f.eol();)f.start=f.pos,a=qn(o,f,c.state),n&&b.push(new $r(f,a,A(i.mode,c.state)));return n?b:new $r(f,a,c.state)}function qr(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 Zn(e,t,r,n,i,o,a){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var c=0,f=null,b=new B(t,e.options.tabSize,n),w,D=e.options.addModeClass&&[null];for(t==""&&qr(Ur(r,n.state),o);!b.eol();){if(b.pos>e.options.maxHighlightLength?(s=!1,a&&Jr(e,t,n,b.pos),b.pos=t.length,w=null):w=qr(qn(r,b,n.state,D),o),D){var L=D[0].name;L&&(w="m-"+(w?L+" "+w:L))}if(!s||f!=w){for(;c<b.start;)c=Math.min(b.start,c+5e3),i(c,f);f=w}b.start=b.pos}for(;c<b.pos;){var X=Math.min(b.pos,c+5e3);i(X,f),c=X}}function mr(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var c=Z(o,s-1),f=c.stateAfter;if(f&&(!r||s+(f instanceof Hn?f.lookAhead:0)<=o.modeFrontier))return s;var b=rt(c.text,null,e.options.tabSize);(i==null||n>b)&&(i=s-1,n=b)}return i}function Er(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=Z(e,n).stateAfter;if(i&&(!(i instanceof Hn)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var ir=!1,yr=!1;function Rr(){ir=!0}function In(){yr=!0}function er(e,t,r){this.marker=e,this.from=t,this.to=r}function or(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function fi(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ii(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function zi(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,s=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&a.type=="bookmark"&&(!r||!o.marker.insertLeft)){var c=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new er(a,o.from,c?null:o.to))}}return n}function Ri(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&a.type=="bookmark"&&(!r||o.marker.insertLeft)){var c=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new er(a,c?null:o.from-t,o.to==null?null:o.to-t))}}return n}function mi(e,t){if(t.full)return null;var r=ze(e,t.from.line)&&Z(e,t.from.line).markedSpans,n=ze(e,t.to.line)&&Z(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=Ue(t.from,t.to)==0,s=zi(r,i,a),c=Ri(n,o,a),f=t.text.length==1,b=Se(t.text).length+(f?i:0);if(s)for(var w=0;w<s.length;++w){var D=s[w];if(D.to==null){var L=or(c,D.marker);L?f&&(D.to=L.to==null?null:L.to+b):D.to=i}}if(c)for(var X=0;X<c.length;++X){var oe=c[X];if(oe.to!=null&&(oe.to+=b),oe.from==null){var ge=or(s,oe.marker);ge||(oe.from=b,f&&(s||(s=[])).push(oe))}else oe.from+=b,f&&(s||(s=[])).push(oe)}s&&(s=_n(s)),c&&c!=s&&(c=_n(c));var Ne=[s];if(!f){var Je=t.text.length-2,Ae;if(Je>0&&s)for(var lt=0;lt<s.length;++lt)s[lt].to==null&&(Ae||(Ae=[])).push(new er(s[lt].marker,null,null));for(var zt=0;zt<Je;++zt)Ne.push(Ae);Ne.push(c)}return Ne}function _n(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 Oi(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(L){if(L.markedSpans)for(var X=0;X<L.markedSpans.length;++X){var oe=L.markedSpans[X].marker;oe.readOnly&&(!n||_e(n,oe)==-1)&&(n||(n=[])).push(oe)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],s=a.find(0),c=0;c<i.length;++c){var f=i[c];if(!(Ue(f.to,s.from)<0||Ue(f.from,s.to)>0)){var b=[c,1],w=Ue(f.from,s.from),D=Ue(f.to,s.to);(w<0||!a.inclusiveLeft&&!w)&&b.push({from:f.from,to:s.from}),(D>0||!a.inclusiveRight&&!D)&&b.push({from:s.to,to:f.to}),i.splice.apply(i,b),c+=b.length-3}}return i}function ur(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function di(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function ho(e){return e.inclusiveLeft?-1:0}function go(e){return e.inclusiveRight?1:0}function oo(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=Ue(n.from,i.from)||ho(e)-ho(t);if(o)return-o;var a=Ue(n.to,i.to)||go(e)-go(t);return a||t.id-e.id}function Li(e,t){var r=yr&&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||oo(n,i.marker)<0)&&(n=i.marker);return n}function Ao(e){return Li(e,!0)}function Eo(e){return Li(e,!1)}function Fo(e,t){var r=yr&&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||oo(n,o.marker)<0)&&(n=o.marker)}return n}function ao(e,t,r,n,i){var o=Z(e,t),a=yr&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var c=a[s];if(c.marker.collapsed){var f=c.marker.find(0),b=Ue(f.from,r)||ho(c.marker)-ho(i),w=Ue(f.to,n)||go(c.marker)-go(i);if(!(b>=0&&w<=0||b<=0&&w>=0)&&(b<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?Ue(f.to,r)>=0:Ue(f.to,r)>0)||b>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?Ue(f.from,n)<=0:Ue(f.from,n)<0)))return!0}}}function vi(e){for(var t;t=Ao(e);)e=t.find(-1,!0).line;return e}function Oa(e){for(var t;t=Eo(e);)e=t.find(1,!0).line;return e}function Mo(e){for(var t,r;t=Eo(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function lo(e,t){var r=Z(e,t),n=vi(r);return r==n?t:Re(n)}function La(e,t){if(t>e.lastLine())return t;var r=Z(e,t),n;if(!Ji(e,r))return t;for(;n=Eo(r);)r=n.find(1,!0).line;return Re(r)+1}function Ji(e,t){var r=yr&&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&&Xo(e,t,n))return!0}}}function Xo(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Xo(e,n.line,or(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)&&Xo(e,t,i))return!0}function qi(e){e=vi(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 s=o.children[a];if(s==r)break;t+=s.height}return t}function Wi(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ao(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Eo(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 Ti(e){var t=e.display,r=e.doc;t.maxLine=Z(r,r.first),t.maxLineLength=Wi(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Wi(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var po=function(e,t,r){this.text=e,di(this,t),this.height=r?r(this):1};po.prototype.lineNo=function(){return Re(this)},ii(po);function Xa(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ur(e),di(e,r);var i=n?n(e):1;i!=e.height&&dt(e,i)}function ql(e){e.parent=null,ur(e)}var Yo={},es={};function Ya(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?es:Yo;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Ta(e,t){var r=$e("span",null,null,m?"padding-right: .1px":null),n={pre:$e("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=Pa,vo(e.display.measure)&&(a=En(o,e.doc.direction))&&(n.addToken=Da(n.addToken,a)),n.map=[];var s=t!=e.display.externalMeasured&&Re(o);Ja(o,n,wr(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=gt(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=gt(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Fi(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 c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Nn(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=gt(n.pre.className,n.textClass||"")),n}function va(e){var t=$("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Pa(e,t,r,n,i,o,a){if(t){var s=e.splitSpaces?Qa(t,e.trailingSpace):t,c=e.cm.state.specialChars,f=!1,b;if(!c.test(t))e.col+=t.length,b=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,b),C&&E<9&&(f=!0),e.pos+=t.length;else{b=document.createDocumentFragment();for(var w=0;;){c.lastIndex=w;var D=c.exec(t),L=D?D.index-w:t.length-w;if(L){var X=document.createTextNode(s.slice(w,w+L));C&&E<9?b.appendChild($("span",[X])):b.appendChild(X),e.map.push(e.pos,e.pos+L,X),e.col+=L,e.pos+=L}if(!D)break;w+=L+1;var oe=void 0;if(D[0]==" "){var ge=e.cm.options.tabSize,Ne=ge-e.col%ge;oe=b.appendChild($("span",Pe(Ne),"cm-tab")),oe.setAttribute("role","presentation"),oe.setAttribute("cm-text"," "),e.col+=Ne}else D[0]=="\r"||D[0]==`
|
|
|
`?(oe=b.appendChild($("span",D[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),oe.setAttribute("cm-text",D[0]),e.col+=1):(oe=e.cm.options.specialCharPlaceholder(D[0]),oe.setAttribute("cm-text",D[0]),C&&E<9?b.appendChild($("span",[oe])):b.appendChild(oe),e.col+=1);e.map.push(e.pos,e.pos+1,oe),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||f||o||a){var Je=r||"";n&&(Je+=n),i&&(Je+=i);var Ae=$("span",[b],Je,o);if(a)for(var lt in a)a.hasOwnProperty(lt)&<!="style"&<!="class"&&Ae.setAttribute(lt,a[lt]);return e.content.appendChild(Ae)}e.content.appendChild(b)}}function Qa(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 Da(e,t){return function(r,n,i,o,a,s,c){i=i?i+" cm-force-border":"cm-force-border";for(var f=r.pos,b=f+n.length;;){for(var w=void 0,D=0;D<t.length&&(w=t[D],!(w.to>f&&w.from<=f));D++);if(w.to>=b)return e(r,n,i,o,a,s,c);e(r,n.slice(0,w.to-f),i,o,null,s,c),o=null,n=n.slice(w.to-f),f=w.to}}}function wl(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 Ja(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]),Ya(r[a+1],t.cm.options));return}for(var s=i.length,c=0,f=1,b="",w,D,L=0,X,oe,ge,Ne,Je;;){if(L==c){X=oe=ge=D="",Je=null,Ne=null,L=1/0;for(var Ae=[],lt=void 0,zt=0;zt<n.length;++zt){var Pt=n[zt],yn=Pt.marker;if(yn.type=="bookmark"&&Pt.from==c&&yn.widgetNode)Ae.push(yn);else if(Pt.from<=c&&(Pt.to==null||Pt.to>c||yn.collapsed&&Pt.to==c&&Pt.from==c)){if(Pt.to!=null&&Pt.to!=c&&L>Pt.to&&(L=Pt.to,oe=""),yn.className&&(X+=" "+yn.className),yn.css&&(D=(D?D+";":"")+yn.css),yn.startStyle&&Pt.from==c&&(ge+=" "+yn.startStyle),yn.endStyle&&Pt.to==L&&(lt||(lt=[])).push(yn.endStyle,Pt.to),yn.title&&((Je||(Je={})).title=yn.title),yn.attributes)for(var sr in yn.attributes)(Je||(Je={}))[sr]=yn.attributes[sr];yn.collapsed&&(!Ne||oo(Ne.marker,yn)<0)&&(Ne=Pt)}else Pt.from>c&&L>Pt.from&&(L=Pt.from)}if(lt)for(var ui=0;ui<lt.length;ui+=2)lt[ui+1]==L&&(oe+=" "+lt[ui]);if(!Ne||Ne.from==c)for(var Tr=0;Tr<Ae.length;++Tr)wl(t,0,Ae[Tr]);if(Ne&&(Ne.from||0)==c){if(wl(t,(Ne.to==null?s+1:Ne.to)-c,Ne.marker,Ne.from==null),Ne.to==null)return;Ne.to==c&&(Ne=!1)}}if(c>=s)break;for(var ro=Math.min(s,L);;){if(b){var Gi=c+b.length;if(!Ne){var Xr=Gi>ro?b.slice(0,ro-c):b;t.addToken(t,Xr,w?w+X:X,ge,c+Xr.length==L?oe:"",D,Je)}if(Gi>=ro){b=b.slice(ro-c),c=ro;break}c=Gi,ge=""}b=i.slice(o,o=r[f++]),w=Ya(r[f++],t.cm.options)}}}function ha(e,t,r){this.line=t,this.rest=Mo(t),this.size=this.rest?Re(Se(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ji(e,t)}function mo(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new ha(e.doc,Z(e.doc,o),o);i=o+a.size,n.push(a)}return n}var yo=null;function _t(e){yo?yo.ops.push(e):e.ownsGroup=yo={ops:[e],delayedCallbacks:[]}}function Yt(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 Ln(e,t){var r=e.ownsGroup;if(r)try{Yt(r)}finally{yo=null,t(r)}}var Mr=null;function tr(e,t){var r=Dn(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;yo?i=yo.delayedCallbacks:Mr?i=Mr:(i=Mr=[],setTimeout(El,0));for(var o=function(s){i.push(function(){return r[s].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function El(){var e=Mr;Mr=null;for(var t=0;t<e.length;++t)e[t]()}function $o(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Na(e,t):o=="gutter"?Ml(e,t,r,n):o=="class"?ts(e,t):o=="widget"&&ns(e,t,n)}t.changes=null}function Qo(e){return e.node==e.text&&(e.node=$("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),C&&E<8&&(e.node.style.zIndex=2)),e.node}function qa(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=Qo(t);t.background=n.insertBefore($("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Jo(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Ta(e,t)}function Na(e,t){var r=t.text.className,n=Jo(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,ts(e,t)):r&&(t.text.className=r)}function ts(e,t){qa(e,t),t.line.wrapClass?Qo(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 Ml(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=Qo(t);t.gutterBackground=$("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=Qo(t),s=t.gutter=$("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=s.appendChild($("div",en(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var c=0;c<e.display.gutterSpecs.length;++c){var f=e.display.gutterSpecs[c].className,b=o.hasOwnProperty(f)&&o[f];b&&s.appendChild($("div",[b],"CodeMirror-gutter-elt","left: "+n.gutterLeft[f]+"px; width: "+n.gutterWidth[f]+"px"))}}}function ns(e,t,r){t.alignable&&(t.alignable=null);for(var n=g("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);el(e,t,r)}function rs(e,t,r,n){var i=Jo(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ts(e,t),Ml(e,t,r,n),el(e,t,n),t.node}function el(e,t,r){if(Il(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Il(e,t.rest[n],t,r,!1)}function Il(e,t,r,n,i){if(t.widgets)for(var o=Qo(r),a=0,s=t.widgets;a<s.length;++a){var c=s[a],f=$("div",[c.node],"CodeMirror-linewidget"+(c.className?" "+c.className:""));c.handleMouseEvents||f.setAttribute("cm-ignore-events","true"),is(c,f,r,n),e.display.input.setUneditable(f),i&&c.above?o.insertBefore(f,r.gutter||r.text):o.appendChild(f),tr(c,"redraw")}}function is(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 ga(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!ae(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;"),ee(t.display.measure,$("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Io(e,t){for(var r=Yi(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 tl(e){return e.lineSpace.offsetTop}function Rl(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ol(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=ee(e.measure,$("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 bo(e){return Zt-e.display.nativeBarWidth}function qo(e){return e.display.scroller.clientWidth-bo(e)-e.display.barWidth}function nl(e){return e.display.scroller.clientHeight-bo(e)-e.display.barHeight}function Ns(e,t,r){var n=e.options.lineWrapping,i=n&&qo(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(),s=0;s<a.length-1;s++){var c=a[s],f=a[s+1];Math.abs(c.bottom-f.bottom)>2&&o.push((c.bottom+f.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Aa(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(Re(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function os(e,t){t=vi(t);var r=Re(t),n=e.display.externalMeasured=new ha(e.doc,t,r);n.lineN=r;var i=n.built=Ta(e,n);return n.text=i.pre,ee(e.display.lineMeasure,i.pre),n}function Ll(e,t,r,n){return so(e,ea(e,t),r,n)}function rl(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ra(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function ea(e,t){var r=Re(t),n=rl(e,r);n&&!n.text?n=null:n&&n.changes&&($o(e,n,r,Fl(e)),e.curOp.forceUpdate=!0),n||(n=os(e,t));var i=Aa(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function so(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||(Ns(e,t.view,t.rect),t.hasHeights=!0),a=il(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 Tl={left:0,right:0,top:0,bottom:0};function Pl(e,t,r){for(var n,i,o,a,s,c,f=0;f<e.length;f+=3)if(s=e[f],c=e[f+1],t<s?(i=0,o=1,a="left"):t<c?(i=t-s,o=i+1):(f==e.length-3||t==c&&e[f+3]>t)&&(o=c-s,i=o-1,t>=c&&(a="right")),i!=null){if(n=e[f+2],s==c&&r==(n.insertLeft?"left":"right")&&(a=r),r=="left"&&i==0)for(;f&&e[f-2]==e[f-3]&&e[f-1].insertLeft;)n=e[(f-=3)+2],a="left";if(r=="right"&&i==c-s)for(;f<e.length-3&&e[f+3]==e[f+4]&&!e[f+5].insertLeft;)n=e[(f+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:s,coverEnd:c}}function pa(e,t){var r=Tl;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 il(e,t,r,n){var i=Pl(t.map,r,n),o=i.node,a=i.start,s=i.end,c=i.collapse,f;if(o.nodeType==3){for(var b=0;b<4;b++){for(;a&&ln(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+s<i.coverEnd&&ln(t.line.text.charAt(i.coverStart+s));)++s;if(C&&E<9&&a==0&&s==i.coverEnd-i.coverStart?f=o.parentNode.getBoundingClientRect():f=pa(ne(o,a,s).getClientRects(),n),f.left||f.right||a==0)break;s=a,a=a-1,c="right"}C&&E<11&&(f=ol(e.display.measure,f))}else{a>0&&(c=n="right");var w;e.options.lineWrapping&&(w=o.getClientRects()).length>1?f=w[n=="right"?w.length-1:0]:f=o.getBoundingClientRect()}if(C&&E<9&&!a&&(!f||!f.left&&!f.right)){var D=o.parentNode.getClientRects()[0];D?f={left:D.left,right:D.left+ya(e.display),top:D.top,bottom:D.bottom}:f=Tl}for(var L=f.top-t.rect.top,X=f.bottom-t.rect.top,oe=(L+X)/2,ge=t.view.measure.heights,Ne=0;Ne<ge.length-1&&!(oe<ge[Ne]);Ne++);var Je=Ne?ge[Ne-1]:0,Ae=ge[Ne],lt={left:(c=="right"?f.right:f.left)-t.rect.left,right:(c=="left"?f.left:f.right)-t.rect.left,top:Je,bottom:Ae};return!f.left&&!f.right&&(lt.bogus=!0),e.options.singleCursorHeightPerLine||(lt.rtop=L,lt.rbottom=X),lt}function ol(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Xe(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 Fa(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 Dl(e){e.display.externalMeasure=null,F(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Fa(e.display.view[t])}function Hi(e){Dl(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ta(){return V&&we?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function na(){return V&&we?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function $a(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=ga(e.widgets[r]));return t}function za(e,t,r,n,i){if(!i){var o=$a(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=qi(t);if(n=="local"?a+=tl(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+(n=="window"?0:na());var c=s.left+(n=="window"?0:ta());r.left+=c,r.right+=c}return r.top+=a,r.bottom+=a,r}function Nl(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=ta(),i-=na();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 al(e,t,r,n,i){return n||(n=Z(e.doc,t.line)),za(e,n,Ll(e,n,t.ch,i),r)}function Zi(e,t,r,n,i,o){n=n||Z(e.doc,t.line),i||(i=ea(e,n));function a(X,oe){var ge=so(e,i,X,oe?"right":"left",o);return oe?ge.left=ge.right:ge.right=ge.left,za(e,n,ge,r)}var s=En(n,e.doc.direction),c=t.ch,f=t.sticky;if(c>=n.text.length?(c=n.text.length,f="before"):c<=0&&(c=0,f="after"),!s)return a(f=="before"?c-1:c,f=="before");function b(X,oe,ge){var Ne=s[oe],Je=Ne.level==1;return a(ge?X-1:X,Je!=ge)}var w=bn(s,c,f),D=un,L=b(c,w,f=="before");return D!=null&&(L.other=b(c,D,f!="before")),L}function Al(e,t){var r=0;t=je(e.doc,t),e.options.lineWrapping||(r=ya(e.display)*t.ch);var n=Z(e.doc,t.line),i=qi(n)+tl(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function ll(e,t,r,n,i){var o=k(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function sl(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return ll(n.first,0,null,-1,-1);var i=De(n,r),o=n.first+n.size-1;if(i>o)return ll(n.first+n.size-1,Z(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=Z(n,i);;){var s=ss(e,a,i,t,r),c=Fo(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!c)return s;var f=c.find(1);if(f.line==i)return f;a=Z(n,i=f.line)}}function as(e,t,r,n){n-=$a(t);var i=t.text.length,o=Et(function(a){return so(e,r,a-1).bottom<=n},i,0);return i=Et(function(a){return so(e,r,a).top>n},o,i),{begin:o,end:i}}function ls(e,t,r,n){r||(r=ea(e,t));var i=za(e,t,so(e,r,n),"line").top;return as(e,t,r,i)}function ul(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function ss(e,t,r,n,i){i-=qi(t);var o=ea(e,t),a=$a(t),s=0,c=t.text.length,f=!0,b=En(t,e.doc.direction);if(b){var w=(e.options.lineWrapping?As:us)(e,t,r,o,b,n,i);f=w.level!=1,s=f?w.from:w.to-1,c=f?w.to:w.from-1}var D=null,L=null,X=Et(function(zt){var Pt=so(e,o,zt);return Pt.top+=a,Pt.bottom+=a,ul(Pt,n,i,!1)?(Pt.top<=i&&Pt.left<=n&&(D=zt,L=Pt),!0):!1},s,c),oe,ge,Ne=!1;if(L){var Je=n-L.left<L.right-n,Ae=Je==f;X=D+(Ae?0:1),ge=Ae?"after":"before",oe=Je?L.left:L.right}else{!f&&(X==c||X==s)&&X++,ge=X==0?"after":X==t.text.length?"before":so(e,o,X-(f?1:0)).bottom+a<=i==f?"after":"before";var lt=Zi(e,k(r,X,ge),"line",t,o);oe=lt.left,Ne=i<lt.top?-1:i>=lt.bottom?1:0}return X=Kt(t.text,X,1),ll(r,X,ge,Ne,n-oe)}function us(e,t,r,n,i,o,a){var s=Et(function(w){var D=i[w],L=D.level!=1;return ul(Zi(e,k(r,L?D.to:D.from,L?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),c=i[s];if(s>0){var f=c.level!=1,b=Zi(e,k(r,f?c.from:c.to,f?"after":"before"),"line",t,n);ul(b,o,a,!0)&&b.top>a&&(c=i[s-1])}return c}function As(e,t,r,n,i,o,a){var s=as(e,t,n,a),c=s.begin,f=s.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var b=null,w=null,D=0;D<i.length;D++){var L=i[D];if(!(L.from>=f||L.to<=c)){var X=L.level!=1,oe=so(e,n,X?Math.min(f,L.to)-1:Math.max(c,L.from)).right,ge=oe<o?o-oe+1e9:oe-o;(!b||w>ge)&&(b=L,w=ge)}}return b||(b=i[i.length-1]),b.from<c&&(b={from:c,to:b.to,level:b.level}),b.to>f&&(b={from:b.from,to:f,level:b.level}),b}var zo;function ma(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(zo==null){zo=$("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)zo.appendChild(document.createTextNode("x")),zo.appendChild($("br"));zo.appendChild(document.createTextNode("x"))}ee(e.measure,zo);var r=zo.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),F(e.measure),r||1}function ya(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=$("span","xxxxxxxxxx"),r=$("pre",[t],"CodeMirror-line-like");ee(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Fl(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:cl(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function cl(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function $l(e){var t=ma(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/ya(e.display)-3);return function(i){if(Ji(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 fl(e){var t=e.doc,r=$l(e);t.iter(function(n){var i=r(n);i!=n.height&&dt(n,i)})}function Wo(e,t,r,n){var i=e.display;if(!r&&Yi(t).getAttribute("cm-not-content")=="true")return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(w){return null}var c=sl(e,o,a),f;if(n&&c.xRel>0&&(f=Z(e.doc,c.line).text).length==c.ch){var b=rt(f,f.length,e.options.tabSize)-f.length;c=k(c.line,Math.max(0,Math.round((o-Ol(e.display).left)/ya(e.display))-b))}return c}function ra(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 yi(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)yr&&lo(e.doc,t)<i.viewTo&&Ro(e);else if(r<=i.viewFrom)yr&&La(e.doc,r+n)>i.viewFrom?Ro(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Ro(e);else if(t<=i.viewFrom){var o=Wa(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Ro(e)}else if(r>=i.viewTo){var a=Wa(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Ro(e)}else{var s=Wa(e,t,t,-1),c=Wa(e,r,r+n,1);s&&c?(i.view=i.view.slice(0,s.index).concat(mo(e,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=n):Ro(e)}var f=i.externalMeasured;f&&(r<f.lineN?f.lineN+=n:t<f.lineN+f.size&&(i.externalMeasured=null))}function Ho(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[ra(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);_e(a,r)==-1&&a.push(r)}}}function Ro(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Wa(e,t,r,n){var i=ra(e,t),o,a=e.display.view;if(!yr||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var s=e.display.viewFrom,c=0;c<i;c++)s+=a[c].size;if(s!=t){if(n>0){if(i==a.length-1)return null;o=s+a[i].size-t,i++}else o=s-t;t+=o,r+=o}for(;lo(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 zl(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=mo(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=mo(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(ra(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(mo(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,ra(e,r)))),n.viewTo=r}function dl(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 ia(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vl(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 s=r.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var c=s.empty();(c||e.options.showCursorWhenSelecting)&&cs(e,s.head,i),c||Fs(e,s,o)}}return n}function cs(e,t,r){var n=Zi(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild($("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($("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 ba(e,t){return e.top-t.top||e.left-t.left}function Fs(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=Ol(e.display),s=a.left,c=Math.max(n.sizerWidth,qo(e)-n.sizer.offsetLeft)-a.right,f=i.direction=="ltr";function b(Ae,lt,zt,Pt){lt<0&&(lt=0),lt=Math.round(lt),Pt=Math.round(Pt),o.appendChild($("div",null,"CodeMirror-selected","position: absolute; left: "+Ae+`px;
|
|
|
top: `+lt+"px; width: "+(zt==null?c-Ae:zt)+`px;
|
|
|
height: `+(Pt-lt)+"px"))}function w(Ae,lt,zt){var Pt=Z(i,Ae),yn=Pt.text.length,sr,ui;function Tr(Xr,_i){return al(e,k(Ae,Xr),"div",Pt,_i)}function ro(Xr,_i,pi){var ri=ls(e,Pt,null,Xr),Yr=_i=="ltr"==(pi=="after")?"left":"right",Ar=pi=="after"?ri.begin:ri.end-(/\s/.test(Pt.text.charAt(ri.end-1))?2:1);return Tr(Ar,Yr)[Yr]}var Gi=En(Pt,i.direction);return wn(Gi,lt||0,zt==null?yn:zt,function(Xr,_i,pi,ri){var Yr=pi=="ltr",Ar=Tr(Xr,Yr?"left":"right"),Xi=Tr(_i-1,Yr?"right":"left"),Cl=lt==null&&Xr==0,Ra=zt==null&&_i==yn,wi=ri==0,_o=!Gi||ri==Gi.length-1;if(Xi.top-Ar.top<=3){var ci=(f?Cl:Ra)&&wi,tu=(f?Ra:Cl)&&_o,da=ci?s:(Yr?Ar:Xi).left,Ga=tu?c:(Yr?Xi:Ar).right;b(da,Ar.top,Ga-da,Ar.bottom)}else{var _a,Ni,xl,nu;Yr?(_a=f&&Cl&&wi?s:Ar.left,Ni=f?c:ro(Xr,pi,"before"),xl=f?s:ro(_i,pi,"after"),nu=f&&Ra&&_o?c:Xi.right):(_a=f?ro(Xr,pi,"before"):s,Ni=!f&&Cl&&wi?c:Ar.right,xl=!f&&Ra&&_o?s:Xi.left,nu=f?ro(_i,pi,"after"):c),b(_a,Ar.top,Ni-_a,Ar.bottom),Ar.bottom<Xi.top&&b(s,Ar.bottom,null,Xi.top),b(xl,Xi.top,nu-xl,Xi.bottom)}(!sr||ba(Ar,sr)<0)&&(sr=Ar),ba(Xi,sr)<0&&(sr=Xi),(!ui||ba(Ar,ui)<0)&&(ui=Ar),ba(Xi,ui)<0&&(ui=Xi)}),{start:sr,end:ui}}var D=t.from(),L=t.to();if(D.line==L.line)w(D.line,D.ch,L.ch);else{var X=Z(i,D.line),oe=Z(i,L.line),ge=vi(X)==vi(oe),Ne=w(D.line,D.ch,ge?X.text.length+1:null).end,Je=w(L.line,ge?0:null,L.ch).start;ge&&(Ne.top<Je.top-2?(b(Ne.right,Ne.top,null,Ne.bottom),b(s,Je.top,Je.left,Je.bottom)):b(Ne.right,Ne.top,Je.left-Ne.right,Ne.bottom)),Ne.bottom<Je.top&&b(s,Ne.bottom,null,Je.top)}r.appendChild(o)}function Wl(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()||Ha(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function fs(e){e.state.focused||(e.display.input.focus(),Hl(e))}function ds(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ha(e))},100)}function Hl(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Nn(e,"focus",e,t),e.state.focused=!0,at(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()),Wl(e))}function Ha(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Nn(e,"blur",e,t),e.state.focused=!1,I(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Za(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,s=0;if(!i.hidden){if(C&&E<8){var c=i.node.offsetTop+i.node.offsetHeight;a=c-r,r=c}else{var f=i.node.getBoundingClientRect();a=f.bottom-f.top,!o&&i.text.firstChild&&(s=i.text.firstChild.getBoundingClientRect().right-f.left-1)}var b=i.line.height-a;if((b>.005||b<-.005)&&(dt(i.line,a),vs(i.line),i.rest))for(var w=0;w<i.rest.length;w++)vs(i.rest[w]);if(s>e.display.sizerWidth){var D=Math.ceil(s/ya(e.display));D>e.display.maxLineLength&&(e.display.maxLineLength=D,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function vs(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 hl(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-tl(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=De(t,n),a=De(t,i);if(r&&r.ensure){var s=r.ensure.from.line,c=r.ensure.to.line;s<o?(o=s,a=De(t,qi(Z(t,s))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=a&&(o=De(t,qi(Z(t,c))-e.wrapper.clientHeight),a=c)}return{from:o,to:Math.max(a,o+1)}}function $s(e,t){if(!zn(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&&!pe){var o=$("div","\u200B",null,`position: absolute;
|
|
|
top: `+(t.top-r.viewOffset-tl(e.display))+`px;
|
|
|
height: `+(t.bottom-t.top+bo(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 zs(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?k(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?k(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Zi(e,t),c=!r||r==t?s:Zi(e,r);i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-n,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+n};var f=Zl(e,i),b=e.doc.scrollTop,w=e.doc.scrollLeft;if(f.scrollTop!=null&&(ka(e,f.scrollTop),Math.abs(e.doc.scrollTop-b)>1&&(a=!0)),f.scrollLeft!=null&&(Zo(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-w)>1&&(a=!0)),!a)break}return i}function Ws(e,t){var r=Zl(e,t);r.scrollTop!=null&&ka(e,r.scrollTop),r.scrollLeft!=null&&Zo(e,r.scrollLeft)}function Zl(e,t){var r=e.display,n=ma(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=nl(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Rl(r),c=t.top<n,f=t.bottom>s-n;if(t.top<i)a.scrollTop=c?0:t.top;else if(t.bottom>i+o){var b=Math.min(t.top,(f?s:t.bottom)-o);b!=i&&(a.scrollTop=b)}var w=e.options.fixedGutter?0:r.gutters.offsetWidth,D=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-w,L=qo(e)-r.gutters.offsetWidth,X=t.right-t.left>L;return X&&(t.right=t.left+L),t.left<10?a.scrollLeft=0:t.left<D?a.scrollLeft=Math.max(0,t.left+w-(X?0:10)):t.right>L+D-3&&(a.scrollLeft=t.right+(X?0:10)-L),a}function Bl(e,t){t!=null&&(gl(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Sa(e){gl(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ba(e,t,r){(t!=null||r!=null)&&gl(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Hs(e,t){gl(e),e.curOp.scrollToPos=t}function gl(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=Al(e,t.from),n=Al(e,t.to);hs(e,r,n,t.margin)}}function hs(e,t,r,n){var i=Zl(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});Ba(e,i.scrollLeft,i.scrollTop)}function ka(e,t){Math.abs(e.doc.scrollTop-t)<2||(T||bl(e,{top:t}),gs(e,t,!0),T&&bl(e),Ka(e,100))}function gs(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 Zo(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,xs(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ua(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Rl(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+bo(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var oa=function(e,t,r){this.cm=r;var n=this.vert=$("div",[$("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=$("div",[$("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),me(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),me(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&E<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};oa.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}},oa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},oa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},oa.prototype.zeroWidthHack=function(){var e=P&&!se?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ze,this.disableVert=new Ze},oa.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)},oa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ca=function(){};Ca.prototype.update=function(){return{bottom:0,right:0}},Ca.prototype.setScrollLeft=function(){},Ca.prototype.setScrollTop=function(){},Ca.prototype.clear=function(){};function aa(e,t){t||(t=Ua(e));var r=e.display.barWidth,n=e.display.barHeight;ps(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Za(e),ps(e,Ua(e)),r=e.display.barWidth,n=e.display.barHeight}function ps(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 pl={native:oa,null:Ca};function ms(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new pl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?Zo(e,t):ka(e,t)},e),e.display.scrollbars.addClass&&at(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function la(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:++Zs},_t(e.curOp)}function Oo(e){var t=e.curOp;t&&Ln(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Bs(r)})}function Bs(e){for(var t=e.ops,r=0;r<t.length;r++)ks(t[r]);for(var n=0;n<t.length;n++)Us(t[n]);for(var i=0;i<t.length;i++)kl(t[i]);for(var o=0;o<t.length;o++)Ks(t[o]);for(var a=0;a<t.length;a++)ys(t[a])}function ks(e){var t=e.cm,r=t.display;bs(t),e.updateMaxLine&&Ti(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 ml(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Us(e){e.updatedDisplay=e.mustUpdate&&yl(e.cm,e.update)}function kl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Za(t),e.barMeasure=Ua(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ll(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+bo(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-qo(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ks(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Zo(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==be();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&aa(t,e.barMeasure),e.updatedDisplay&&jl(t,e.barMeasure),e.selectionChanged&&Wl(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&fs(e.cm)}function ys(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&Ul(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&gs(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Zo(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=zs(t,je(n,e.scrollToPos.from),je(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||Nn(o[s],"hide");if(a)for(var c=0;c<a.length;++c)a[c].lines.length&&Nn(a[c],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Nn(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Pi(e,t){if(e.curOp)return t();la(e);try{return t()}finally{Oo(e)}}function jr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);la(e);try{return t.apply(e,arguments)}finally{Oo(e)}}}function hi(e){return function(){if(this.curOp)return e.apply(this,arguments);la(this);try{return e.apply(this,arguments)}finally{Oo(this)}}}function Pr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);la(t);try{return e.apply(this,arguments)}finally{Oo(t)}}}function Ka(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,Ot(js,e))}function js(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Jn(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,s=o.text.length>e.options.maxHighlightLength?A(t.mode,n.state):null,c=kr(e,o,n,!0);s&&(n.state=s),o.styles=c.styles;var f=o.styleClasses,b=c.classes;b?o.styleClasses=b:f&&(o.styleClasses=null);for(var w=!a||a.length!=o.styles.length||f!=b&&(!f||!b||f.bgClass!=b.bgClass||f.textClass!=b.textClass),D=0;!w&&D<a.length;++D)w=a[D]!=o.styles[D];w&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Jr(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Ka(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Pi(e,function(){for(var o=0;o<i.length;o++)Ho(e,i[o],"text")})}}var ml=function(e,t,r){var n=e.display;this.viewport=t,this.visible=hl(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=qo(e),this.force=r,this.dims=Fl(e),this.events=[]};ml.prototype.signal=function(e,t){Ir(e,t)&&this.events.push(arguments)},ml.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Nn.apply(null,this.events[e])};function bs(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=bo(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=bo(e)+"px",t.scrollbarsClipped=!0)}function Vs(e){if(e.hasFocus())return null;var t=be();if(!t||!ae(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&ae(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Ss(e){if(!(!e||!e.activeElt||e.activeElt==be())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&ae(document.body,e.anchorNode)&&ae(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 yl(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Ro(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&&dl(e)==0)return!1;Vl(e)&&(Ro(e),t.dims=Fl(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)),yr&&(o=lo(e.doc,o),a=La(e.doc,a));var s=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;zl(e,o,a),r.viewOffset=qi(Z(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=dl(e);if(!s&&c==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var f=Vs(e);return c>4&&(r.lineDiv.style.display="none"),Cs(e,r.updateLineNumbers,t.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Ss(f),F(r.cursorDiv),F(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Ka(e,400)),r.updateLineNumbers=null,!0}function Ul(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==qo(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+Rl(e.display)-nl(e),r.top)}),t.visible=hl(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=hl(e.display,e.doc,r));if(!yl(e,t))break;Za(e);var i=Ua(e);ia(e),aa(e,i),jl(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 bl(e,t){var r=new ml(e,t);if(yl(e,r)){Za(e),Ul(e,r);var n=Ua(e);ia(e),aa(e,n),jl(e,n),r.finish()}}function Cs(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function s(X){var oe=X.nextSibling;return m&&P&&e.display.currentWheelTarget==X?X.style.display="none":X.parentNode.removeChild(X),oe}for(var c=n.view,f=n.viewFrom,b=0;b<c.length;b++){var w=c[b];if(!w.hidden)if(!w.node||w.node.parentNode!=o){var D=rs(e,w,f,r);o.insertBefore(D,a)}else{for(;a!=w.node;)a=s(a);var L=i&&t!=null&&t<=f&&w.lineNumber;w.changes&&(_e(w.changes,"gutter")>-1&&(L=!1),$o(e,w,f,r)),L&&(F(w.lineNumber),w.lineNumber.appendChild(document.createTextNode(en(e.options,f)))),a=w.node.nextSibling}f+=w.size}for(;a;)a=s(a)}function Kl(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function jl(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+bo(e)+"px"}function xs(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=cl(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 s=r[a].alignable;if(s)for(var c=0;c<s.length;c++)s[c].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Vl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=en(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild($("div",[$("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",Kl(e.display),!0}return!1}function Gl(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 ws(e){var t=e.gutters,r=e.gutterSpecs;F(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,s=t.appendChild($("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),o=="CodeMirror-linenumbers"&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Kl(e)}function xa(e){ws(e.display),yi(e),xs(e)}function Gs(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=$("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=$("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=$e("div",null,"CodeMirror-code"),i.selectionDiv=$("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=$("div",null,"CodeMirror-cursors"),i.measure=$("div",null,"CodeMirror-measure"),i.lineMeasure=$("div",null,"CodeMirror-measure"),i.lineSpace=$e("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=$e("div",[i.lineSpace],"CodeMirror-lines");i.mover=$("div",[o],null,"position: relative"),i.sizer=$("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=$("div",null,null,"position: absolute; height: "+Zt+"px; width: 1px;"),i.gutters=$("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=$("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=$("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),C&&E<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!m&&!(T&&fe)&&(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=Gl(n.gutters,n.lineNumbers),ws(i),r.init(i)}var ja=0,Bi=null;C?Bi=-.53:T?Bi=15:V?Bi=-.7:xe&&(Bi=-1/3);function _s(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 ru(e){var t=_s(e);return t.x*=Bi,t.y*=Bi,t}function Xs(e,t){var r=_s(t),n=r.x,i=r.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,c=a.scrollHeight>a.clientHeight;if(n&&s||i&&c){if(i&&P&&m){e:for(var f=t.target,b=o.view;f!=a;f=f.parentNode)for(var w=0;w<b.length;w++)if(b[w].node==f){e.display.currentWheelTarget=f;break e}}if(n&&!T&&!v&&Bi!=null){i&&c&&ka(e,Math.max(0,a.scrollTop+i*Bi)),Zo(e,Math.max(0,a.scrollLeft+n*Bi)),(!i||i&&c)&&rr(t),o.wheelStartX=null;return}if(i&&Bi!=null){var D=i*Bi,L=e.doc.scrollTop,X=L+o.wrapper.clientHeight;D<0?L=Math.max(0,L+D-50):X=Math.min(e.doc.height,X+D+50),bl(e,{top:L,bottom:X})}ja<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 oe=a.scrollLeft-o.wheelStartX,ge=a.scrollTop-o.wheelStartY,Ne=ge&&o.wheelDY&&ge/o.wheelDY||oe&&o.wheelDX&&oe/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Ne&&(Bi=(Bi*ja+Ne)/(ja+1),++ja)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var ki=function(e,t){this.ranges=e,this.primIndex=t};ki.prototype.primary=function(){return this.ranges[this.primIndex]},ki.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(!gn(r.anchor,n.anchor)||!gn(r.head,n.head))return!1}return!0},ki.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Bn(Wn(this.ranges[t].anchor),Wn(this.ranges[t].head));return new ki(e,this.primIndex)},ki.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ki.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Ue(t,n.from())>=0&&Ue(e,n.to())<=0)return r}return-1};var Bn=function(e,t){this.anchor=e,this.head=t};Bn.prototype.from=function(){return Ft(this.anchor,this.head)},Bn.prototype.to=function(){return Bt(this.anchor,this.head)},Bn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function uo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(D,L){return Ue(D.from(),L.from())}),r=_e(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],c=Ue(s.to(),a.from());if(n&&!a.empty()?c>0:c>=0){var f=Ft(s.from(),a.from()),b=Bt(s.to(),a.to()),w=s.empty()?a.from()==a.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new Bn(w?b:f,w?f:b))}}return new ki(t,r)}function Bo(e,t){return new ki([new Bn(e,t||e)],0)}function So(e){return e.text?k(e.from.line+e.text.length-1,Se(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Es(e,t){if(Ue(e,t.from)<0)return e;if(Ue(e,t.to)<=0)return So(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+=So(t).ch-t.to.ch),k(r,n)}function _l(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new Bn(Es(i.anchor,t),Es(i.head,t)))}return uo(e.cm,r,e.sel.primIndex)}function Ms(e,t,r){return e.line==t.line?k(r.line,e.ch-t.ch+r.ch):k(r.line+(e.line-t.line),e.ch)}function Ys(e,t,r){for(var n=[],i=k(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],c=Ms(s.from,i,o),f=Ms(So(s),i,o);if(i=s.to,o=f,r=="around"){var b=e.sel.ranges[a],w=Ue(b.head,b.anchor)<0;n[a]=new Bn(w?f:c,w?c:f)}else n[a]=new Bn(c,c)}return new ki(n,e.sel.primIndex)}function Xl(e){e.doc.mode=Lt(e.options,e.doc.modeOption),wa(e)}function wa(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,Ka(e,100),e.state.modeGen++,e.curOp&&yi(e)}function Is(e,t){return t.from.ch==0&&t.to.ch==0&&Se(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Yl(e,t,r,n){function i(Je){return r?r[Je]:null}function o(Je,Ae,lt){Xa(Je,Ae,lt,n),tr(Je,"change",Je,t)}function a(Je,Ae){for(var lt=[],zt=Je;zt<Ae;++zt)lt.push(new po(f[zt],i(zt),n));return lt}var s=t.from,c=t.to,f=t.text,b=Z(e,s.line),w=Z(e,c.line),D=Se(f),L=i(f.length-1),X=c.line-s.line;if(t.full)e.insert(0,a(0,f.length)),e.remove(f.length,e.size-f.length);else if(Is(e,t)){var oe=a(0,f.length-1);o(w,w.text,L),X&&e.remove(s.line,X),oe.length&&e.insert(s.line,oe)}else if(b==w)if(f.length==1)o(b,b.text.slice(0,s.ch)+D+b.text.slice(c.ch),L);else{var ge=a(1,f.length-1);ge.push(new po(D+b.text.slice(c.ch),L,n)),o(b,b.text.slice(0,s.ch)+f[0],i(0)),e.insert(s.line+1,ge)}else if(f.length==1)o(b,b.text.slice(0,s.ch)+f[0]+w.text.slice(c.ch),i(0)),e.remove(s.line+1,X);else{o(b,b.text.slice(0,s.ch)+f[0],i(0)),o(w,D+w.text.slice(c.ch),L);var Ne=a(1,f.length-1);X>1&&e.remove(s.line+1,X-1),e.insert(s.line+1,Ne)}tr(e,"change",e,t)}function ko(e,t,r){function n(i,o,a){if(i.linked)for(var s=0;s<i.linked.length;++s){var c=i.linked[s];if(c.doc!=o){var f=a&&c.sharedHist;r&&!f||(t(c.doc,f),n(c.doc,i,f))}}}n(e,null,!0)}function Rs(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,fl(e),Xl(e),Os(e),e.options.lineWrapping||Ti(e),e.options.mode=t.modeOption,yi(e)}function Os(e){(e.doc.direction=="rtl"?at:I)(e.display.lineDiv,"CodeMirror-rtl")}function Qs(e){Pi(e,function(){Os(e),yi(e)})}function Sl(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 Ql(e,t){var r={from:Wn(t.from),to:So(t),text:Ke(e,t.from,t.to)};return Ds(e,r,t.from.line,t.to.line+1),ko(e,function(n){return Ds(n,r,t.from.line,t.to.line+1)},!0),r}function Ls(e){for(;e.length;){var t=Se(e);if(t.ranges)e.pop();else break}}function Js(e,t){if(t)return Ls(e.done),Se(e.done);if(e.done.length&&!Se(e.done).ranges)return Se(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Se(e.done)}function Ts(e,t,r,n){var i=e.history;i.undone.length=0;var o=+new Date,a,s;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=Js(i,i.lastOp==n)))s=Se(a.changes),Ue(t.from,t.to)==0&&Ue(t.from,s.to)==0?s.to=So(t):a.changes.push(Ql(e,t));else{var c=Se(i.done);for((!c||!c.ranges)&&Lo(e.sel,i.done),a={changes:[Ql(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,s||Nn(e,"historyAdded")}function Ps(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 qs(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||Ps(e,o,Se(i.done),t))?i.done[i.done.length-1]=t:Lo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Ls(i.undone)}function Lo(e,t){var r=Se(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ds(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 eu(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 l(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(eu(r[i]));return n}function u(e,t){var r=l(e,t),n=mi(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 s=0;s<a.length;++s){for(var c=a[s],f=0;f<o.length;++f)if(o[f].marker==c.marker)continue e;o.push(c)}else a&&(r[i]=a)}return r}function d(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?ki.prototype.deepCopy.call(o):o);continue}var a=o.changes,s=[];n.push({changes:s});for(var c=0;c<a.length;++c){var f=a[c],b=void 0;if(s.push({from:f.from,to:f.to,text:f.text}),t)for(var w in f)(b=w.match(/^spans_(\d+)$/))&&_e(t,Number(b[1]))>-1&&(Se(s)[w]=f[w],delete f[w])}}return n}function p(e,t,r,n){if(n){var i=e.anchor;if(r){var o=Ue(t,i)<0;o!=Ue(r,i)<0?(i=t,t=r):o!=Ue(t,r)<0&&(t=r)}return new Bn(i,t)}else return new Bn(r||t,t)}function S(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Q(e,new ki([p(e.sel.primary(),t,r,i)],0),n)}function M(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]=p(e.sel.ranges[o],t[o],null,i);var a=uo(e.cm,n,e.sel.primIndex);Q(e,a,r)}function R(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Q(e,uo(e.cm,i,e.sel.primIndex),n)}function z(e,t,r,n){Q(e,Bo(t,r),n)}function U(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 Bn(je(e,i[o].anchor),je(e,i[o].head))},origin:r&&r.origin};return Nn(e,"beforeSelectionChange",e,n),e.cm&&Nn(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?uo(e.cm,n.ranges,n.ranges.length-1):t}function j(e,t,r){var n=e.history.done,i=Se(n);i&&i.ranges?(n[n.length-1]=t,G(e,t,r)):Q(e,t,r)}function Q(e,t,r){G(e,t,r),qs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function G(e,t,r){(Ir(e,"beforeSelectionChange")||e.cm&&Ir(e.cm,"beforeSelectionChange"))&&(t=U(e,t,r));var n=r&&r.bias||(Ue(t.primary().head,e.sel.primary().head)<0?-1:1);ue(e,le(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Sa(e.cm)}function ue(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ai(e.cm)),tr(e,"cursorActivity",e))}function K(e){ue(e,le(e,e.sel,null,!1))}function le(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],c=Oe(e,a.anchor,s&&s.anchor,r,n),f=Oe(e,a.head,s&&s.head,r,n);(i||c!=a.anchor||f!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Bn(c,f))}return i?uo(e.cm,i,t.primIndex):t}function Fe(e,t,r,n,i){var o=Z(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],c=s.marker,f="selectLeft"in c?!c.selectLeft:c.inclusiveLeft,b="selectRight"in c?!c.selectRight:c.inclusiveRight;if((s.from==null||(f?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(b?s.to>=t.ch:s.to>t.ch))){if(i&&(Nn(c,"beforeCursorEnter"),c.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!c.atomic)continue;if(r){var w=c.find(n<0?1:-1),D=void 0;if((n<0?b:f)&&(w=We(e,w,-n,w&&w.line==t.line?o:null)),w&&w.line==t.line&&(D=Ue(w,r))&&(n<0?D<0:D>0))return Fe(e,w,t,n,i)}var L=c.find(n<0?-1:1);return(n<0?f:b)&&(L=We(e,L,n,L.line==t.line?o:null)),L?Fe(e,L,t,n,i):null}}return t}function Oe(e,t,r,n,i){var o=n||1,a=Fe(e,t,r,o,i)||!i&&Fe(e,t,r,o,!0)||Fe(e,t,r,-o,i)||!i&&Fe(e,t,r,-o,!0);return a||(e.cantEdit=!0,k(e.first,0))}function We(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?je(e,k(t.line-1)):null:r>0&&t.ch==(n||Z(e,t.line)).text.length?t.line<e.first+e.size-1?k(t.line+1,0):null:new k(t.line,t.ch+r)}function He(e){e.setSelection(k(e.firstLine(),0),k(e.lastLine()),ct)}function Ce(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,s){i&&(n.from=je(e,i)),o&&(n.to=je(e,o)),a&&(n.text=a),s!==void 0&&(n.origin=s)}),Nn(e,"beforeChange",e,n),e.cm&&Nn(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 de(e,t,r){if(e.cm){if(!e.cm.curOp)return jr(e.cm,de)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((Ir(e,"beforeChange")||e.cm&&Ir(e.cm,"beforeChange"))&&(t=Ce(e,t,!0),!t))){var n=ir&&!r&&Oi(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)mt(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else mt(e,t)}}function mt(e,t){if(!(t.text.length==1&&t.text[0]==""&&Ue(t.from,t.to)==0)){var r=_l(e,t);Ts(e,t,r,e.cm?e.cm.curOp.id:NaN),bt(e,t,r,mi(e,t));var n=[];ko(e,function(i,o){!o&&_e(n,i.history)==-1&&(Ht(i.history,t),n.push(i.history)),bt(i,t,null,mi(i,t))})}}function Be(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!r)){for(var i=e.history,o,a=e.sel,s=t=="undo"?i.done:i.undone,c=t=="undo"?i.undone:i.done,f=0;f<s.length&&(o=s[f],!(r?o.ranges&&!o.equals(e.sel):!o.ranges));f++);if(f!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=s.pop(),o.ranges){if(Lo(o,c),r&&!o.equals(e.sel)){Q(e,o,{clearRedo:!1});return}a=o}else if(n){s.push(o);return}else break;var b=[];Lo(a,c),c.push({changes:b,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var w=Ir(e,"beforeChange")||e.cm&&Ir(e.cm,"beforeChange"),D=function(oe){var ge=o.changes[oe];if(ge.origin=t,w&&!Ce(e,ge,!1))return s.length=0,{};b.push(Ql(e,ge));var Ne=oe?_l(e,ge):Se(s);bt(e,ge,Ne,u(e,ge)),!oe&&e.cm&&e.cm.scrollIntoView({from:ge.from,to:So(ge)});var Je=[];ko(e,function(Ae,lt){!lt&&_e(Je,Ae.history)==-1&&(Ht(Ae.history,ge),Je.push(Ae.history)),bt(Ae,ge,null,u(Ae,ge))})},L=o.changes.length-1;L>=0;--L){var X=D(L);if(X)return X.v}}}}function yt(e,t){if(t!=0&&(e.first+=t,e.sel=new ki(Ye(e.sel.ranges,function(i){return new Bn(k(i.anchor.line+t,i.anchor.ch),k(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){yi(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Ho(e.cm,n,"gutter")}}function bt(e,t,r,n){if(e.cm&&!e.cm.curOp)return jr(e.cm,bt)(e,t,r,n);if(t.to.line<e.first){yt(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);yt(e,i),t={from:k(e.first,0),to:k(t.to.line+i,t.to.ch),text:[Se(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:k(o,Z(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ke(e,t.from,t.to),r||(r=_l(e,t)),e.cm?kt(e.cm,t,n):Yl(e,t,n),G(e,r,ct),e.cantEdit&&Oe(e,k(e.firstLine(),0))&&(e.cantEdit=!1)}}function kt(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,s=!1,c=o.line;e.options.lineWrapping||(c=Re(vi(Z(n,o.line))),n.iter(c,a.line+1,function(L){if(L==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ai(e),Yl(n,t,r,$l(e)),e.options.lineWrapping||(n.iter(c,o.line+t.text.length,function(L){var X=Wi(L);X>i.maxLineLength&&(i.maxLine=L,i.maxLineLength=X,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Er(n,o.line),Ka(e,400);var f=t.text.length-(a.line-o.line)-1;t.full?yi(e):o.line==a.line&&t.text.length==1&&!Is(e.doc,t)?Ho(e,o.line,"text"):yi(e,o.line,a.line+1,f);var b=Ir(e,"changes"),w=Ir(e,"change");if(w||b){var D={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};w&&tr(e,"change",e,D),b&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(D)}e.display.selForContextMenu=null}function st(e,t,r,n,i){var o;n||(n=r),Ue(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),de(e,{from:r,to:n,text:t,origin:i})}function it(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Xt(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 s=0;s<o.ranges.length;s++)it(o.ranges[s].anchor,t,r,n),it(o.ranges[s].head,t,r,n);continue}for(var c=0;c<o.changes.length;++c){var f=o.changes[c];if(r<f.from.line)f.from=k(f.from.line+n,f.from.ch),f.to=k(f.to.line+n,f.to.ch);else if(t<=f.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function Ht(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Xt(e.done,r,n,i),Xt(e.undone,r,n,i)}function Ct(e,t,r,n){var i=t,o=t;return typeof t=="number"?o=Z(e,Kn(e,t)):i=Re(t),i==null?null:(n(o,i)&&e.cm&&Ho(e.cm,i,r),o)}function qe(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}qe.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,ql(i),tr(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 Ve(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}Ve.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 qe))){var s=[];this.collapse(s),this.children=[new qe(s)],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,s=a;s<i.lines.length;){var c=new qe(i.lines.slice(s,s+=25));i.height-=c.height,this.children.splice(++n,0,c),c.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 Ve(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=_e(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new Ve(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 Ie=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};Ie.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=Re(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=ga(this);dt(r,Math.max(0,r.height-o)),e&&(Pi(e,function(){xt(e,r,-o),Ho(e,n,"widget")}),tr(e,"lineWidgetCleared",e,this,n))}},Ie.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=ga(this)-t;i&&(Ji(this.doc,n)||dt(n,n.height+i),r&&Pi(r,function(){r.curOp.forceUpdate=!0,xt(r,n,i),tr(r,"lineWidgetChanged",r,e,Re(n))}))},ii(Ie);function xt(e,t,r){qi(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Bl(e,r)}function ht(e,t,r,n){var i=new Ie(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Ct(e,t,"widget",function(a){var s=a.widgets||(a.widgets=[]);if(i.insertAt==null?s.push(i):s.splice(Math.min(s.length-1,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!Ji(e,a)){var c=qi(a)<e.scrollTop;dt(a,a.height+ga(i)),c&&Bl(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&tr(o,"lineWidgetAdded",o,i,typeof t=="number"?t:Re(t)),i}var An=0,Rn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++An};Rn.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&la(e),Ir(this,"clear")){var r=this.find();r&&tr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=or(a.markedSpans,this);e&&!this.collapsed?Ho(e,Re(a),"text"):e&&(s.to!=null&&(i=Re(a)),s.from!=null&&(n=Re(a))),a.markedSpans=fi(a.markedSpans,s),s.from==null&&this.collapsed&&!Ji(this.doc,a)&&e&&dt(a,ma(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var f=vi(this.lines[c]),b=Wi(f);b>e.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=b,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&yi(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&K(e.doc)),e&&tr(e,"markerCleared",e,this,n,i),t&&Oo(e),this.parent&&this.parent.clear()}},Rn.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=or(o.markedSpans,this);if(a.from!=null&&(r=k(t?o:Re(o),a.from),e==-1))return r;if(a.to!=null&&(n=k(t?o:Re(o),a.to),e==1))return n}return r&&{from:r,to:n}},Rn.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||Pi(n,function(){var i=t.line,o=Re(t.line),a=rl(n,o);if(a&&(Fa(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ji(r.doc,i)&&r.height!=null){var s=r.height;r.height=null;var c=ga(r)-s;c&&dt(i,i.height+c)}tr(n,"markerChanged",n,e)})},Rn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||_e(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Rn.prototype.detachLine=function(e){if(this.lines.splice(_e(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ii(Rn);function cn(e,t,r,n,i){if(n&&n.shared)return rn(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return jr(e.cm,cn)(e,t,r,n,i);var o=new Rn(e,i),a=Ue(t,r);if(n&&ut(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=$e("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(ao(e,t.line,t,r,o)||t.line!=r.line&&ao(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");In()}o.addToHistory&&Ts(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,c=e.cm,f;if(e.iter(s,r.line+1,function(w){c&&o.collapsed&&!c.options.lineWrapping&&vi(w)==c.display.maxLine&&(f=!0),o.collapsed&&s!=t.line&&dt(w,0),Ii(w,new er(o,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),o.collapsed&&e.iter(t.line,r.line+1,function(w){Ji(e,w)&&dt(w,0)}),o.clearOnEnter&&me(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Rr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++An,o.atomic=!0),c){if(f&&(c.curOp.updateMaxLine=!0),o.collapsed)yi(c,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var b=t.line;b<=r.line;b++)Ho(c,b,"text");o.atomic&&K(c.doc),tr(c,"markerAdded",c,o)}return o}var kn=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};kn.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();tr(this,"clear")}},kn.prototype.find=function(e,t){return this.primary.find(e,t)},ii(kn);function rn(e,t,r,n,i){n=ut(n),n.shared=!1;var o=[cn(e,t,r,n,i)],a=o[0],s=n.widgetNode;return ko(e,function(c){s&&(n.widgetNode=s.cloneNode(!0)),o.push(cn(c,je(c,t),je(c,r),n,i));for(var f=0;f<c.linked.length;++f)if(c.linked[f].isParent)return;a=Se(o)}),new kn(o,a)}function jn(e){return e.findMarks(k(e.first,0),e.clipPos(k(e.lastLine())),function(t){return t.parent})}function Or(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(Ue(o,a)){var s=cn(e,o,a,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function St(e){for(var t=function(n){var i=e[n],o=[i.primary.doc];ko(i.primary.doc,function(c){return o.push(c)});for(var a=0;a<i.markers.length;a++){var s=i.markers[a];_e(o,s.doc)==-1&&(s.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var ke=0,et=function(e,t,r,n,i){if(!(this instanceof et))return new et(e,t,r,n,i);r==null&&(r=0),Ve.call(this,[new qe([new po("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=k(r,0);this.sel=Bo(o),this.history=new Sl(null),this.id=++ke,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Yl(this,{from:o,to:o,text:e}),Q(this,Bo(o),ct)};et.prototype=$t(Ve.prototype,{constructor:et,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=At(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Pr(function(e){var t=k(this.first,0),r=this.first+this.size-1;de(this,{from:t,to:k(r,Z(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ba(this.cm,0,0),Q(this,Bo(t),ct)}),replaceRange:function(e,t,r,n){t=je(this,t),r=r?je(this,r):t,st(this,e,t,r,n)},getRange:function(e,t,r){var n=Ke(this,je(this,e),je(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(ze(this,e))return Z(this,e)},getLineNumber:function(e){return Re(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Z(this,e)),vi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return je(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:Pr(function(e,t,r){z(this,je(this,typeof e=="number"?k(e,t||0):e),null,r)}),setSelection:Pr(function(e,t,r){z(this,je(this,e),je(this,t||e),r)}),extendSelection:Pr(function(e,t,r){S(this,je(this,e),t&&je(this,t),r)}),extendSelections:Pr(function(e,t){M(this,Mn(this,e),t)}),extendSelectionsBy:Pr(function(e,t){var r=Ye(this.sel.ranges,e);M(this,Mn(this,r),t)}),setSelections:Pr(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new Bn(je(this,e[i].anchor),je(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Q(this,uo(this.cm,n,t),r)}}),addSelection:Pr(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Bn(je(this,e),je(this,t||e))),Q(this,uo(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=Ke(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=Ke(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:Pr(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 s=t&&t!="end"&&Ys(this,n,t),c=n.length-1;c>=0;c--)de(this,n[c]);s?j(this,s):this.cm&&Sa(this.cm)}),undo:Pr(function(){Be(this,"undo")}),redo:Pr(function(){Be(this,"redo")}),undoSelection:Pr(function(){Be(this,"undo",!0)}),redoSelection:Pr(function(){Be(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 Sl(this.history.maxGeneration),ko(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:d(this.history.done),undone:d(this.history.undone)}},setHistory:function(e){var t=this.history=new Sl(this.history.maxGeneration);t.done=d(e.done.slice(0),null,!0),t.undone=d(e.undone.slice(0),null,!0)},setGutterMarker:Pr(function(e,t,r){return Ct(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Wt(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Pr(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&Ct(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Wt(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!ze(this,e)||(t=e,e=Z(this,e),!e))return null}else if(t=Re(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:Pr(function(e,t,r){return Ct(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(g(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Pr(function(e,t,r){return Ct(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(g(r));if(!a)return!1;var s=a.index+a[0].length;n[i]=o.slice(0,a.index)+(!a.index||s==o.length?"":" ")+o.slice(s)||null}else return!1;return!0})}),addLineWidget:Pr(function(e,t,r){return ht(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return cn(this,je(this,e),je(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=je(this,e),cn(this,e,e,r,"bookmark")},findMarksAt:function(e){e=je(this,e);var t=[],r=Z(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=je(this,e),t=je(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 s=0;s<a.length;s++){var c=a[s];!(c.to!=null&&i==e.line&&e.ch>=c.to||c.from==null&&i!=e.line||c.from!=null&&i==t.line&&c.from>=t.ch)&&(!r||r(c.marker))&&n.push(c.marker.parent||c.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}),je(this,k(r,t))},indexFromPos:function(e){e=je(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 et(At(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 et(At(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}],Or(n,jn(this)),n},unlinkDoc:function(e){if(e instanceof Fn&&(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),St(jn(this));break}}if(e.history==this.history){var n=[e.id];ko(e,function(i){return n.push(i.id)},!0),e.history=new Sl(null),e.history.done=d(this.history.done,n),e.history.undone=d(this.history.undone,n)}},iterLinkedDocs:function(e){ko(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):N(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Pr(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Qs(this.cm))})}),et.prototype.eachLine=et.prototype.iter;var tn=0;function sn(e){var t=this;if(nn(t),!(zn(t,e)||Io(t.display,e))){rr(e),C&&(tn=+new Date);var r=Wo(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,s=function(){++a==i&&jr(t,function(){r=je(t.doc,r);var L={from:r,to:r,text:t.doc.splitLines(o.filter(function(X){return X!=null}).join(t.doc.lineSeparator())),origin:"paste"};de(t.doc,L),j(t.doc,Bo(je(t.doc,r),je(t.doc,So(L))))})()},c=function(L,X){if(t.options.allowDropFileTypes&&_e(t.options.allowDropFileTypes,L.type)==-1){s();return}var oe=new FileReader;oe.onerror=function(){return s()},oe.onload=function(){var ge=oe.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ge)){s();return}o[X]=ge,s()},oe.readAsText(L)},f=0;f<n.length;f++)c(n[f],f);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 b=e.dataTransfer.getData("Text");if(b){var w;if(t.state.draggingText&&!t.state.draggingText.copy&&(w=t.listSelections()),G(t.doc,Bo(r,r)),w)for(var D=0;D<w.length;++D)st(t.doc,"",w[D].anchor,w[D].head,"drag");t.replaceSelection(b,"around","paste"),t.display.input.focus()}}catch(L){}}}}function on(e,t){if(C&&(!e.state.draggingText||+new Date-tn<100)){Ei(t);return}if(!(zn(e,t)||Io(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!xe)){var r=$("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",v&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),v&&r.parentNode.removeChild(r)}}function Tt(e,t){var r=Wo(e,t);if(r){var n=document.createDocumentFragment();cs(e,r,n),e.display.dragCursor||(e.display.dragCursor=$("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),ee(e.display.dragCursor,n)}}function nn(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Tn(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 pn=!1;function Vt(){pn||(Ge(),pn=!0)}function Ge(){var e;me(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Tn(fn)},100))}),me(window,"blur",function(){return Tn(Ha)})}function fn(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var dn={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"},mn=0;mn<10;mn++)dn[mn+48]=dn[mn+96]=String(mn);for(var br=65;br<=90;br++)dn[br]=String.fromCharCode(br);for(var Sr=1;Sr<=12;Sr++)dn[Sr+111]=dn[Sr+63235]="F"+Sr;var cr={};cr.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"},cr.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"},cr.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"},cr.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"]},cr.default=P?cr.macDefault:cr.pcDefault;function Cr(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var s=t[a];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw new Error("Unrecognized modifier name: "+s)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Cn(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=Ye(r.split(" "),Cr),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=n):(s=i.slice(0,o+1).join(" "),a="...");var c=t[s];if(!c)t[s]=a;else if(c!=a)throw new Error("Inconsistent bindings for "+s)}delete e[r]}for(var f in t)e[f]=t[f];return e}function Qn(e,t,r,n){t=Xn(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 Qn(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Qn(e,t.fallthrough[o],r,n);if(a)return a}}}function ar(e){var t=typeof e=="string"?e:dn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Vn(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(ie?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(ie?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function xr(e,t){if(v&&e.keyCode==34&&e.char)return!1;var r=dn[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),Vn(r,e,t))}function Xn(e){return typeof e=="string"?cr[e]:e}function ei(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&Ue(o.from,Se(n).to)<=0;){var a=n.pop();if(Ue(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}Pi(e,function(){for(var s=n.length-1;s>=0;s--)st(e.doc,"",n[s].from,n[s].to,"+delete");Sa(e)})}function oi(e,t,r){var n=Kt(e.text,t+r,r);return n<0||n>e.text.length?null:n}function gi(e,t,r){var n=oi(e,t.ch,r);return n==null?null:new k(t.line,n,r<0?"after":"before")}function fr(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=En(r,t.doc.direction);if(o){var a=i<0?Se(o):o[0],s=i<0==(a.level==1),c=s?"after":"before",f;if(a.level>0||t.doc.direction=="rtl"){var b=ea(t,r);f=i<0?r.text.length-1:0;var w=so(t,b,f).top;f=Et(function(D){return so(t,b,D).top==w},i<0==(a.level==1)?a.from:a.to-1,f),c=="before"&&(f=oi(r,f,1))}else f=i<0?a.to:a.from;return new k(n,f,c)}}return new k(n,i<0?r.text.length:0,i<0?"before":"after")}function Dr(e,t,r,n){var i=En(t,e.doc.direction);if(!i)return gi(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=bn(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 gi(t,r,n);var s=function(Ne,Je){return oi(t,Ne instanceof k?Ne.ch:Ne,Je)},c,f=function(Ne){return e.options.lineWrapping?(c=c||ea(e,t),ls(e,t,c,Ne)):{begin:0,end:t.text.length}},b=f(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var w=a.level==1==n<0,D=s(r,w?1:-1);if(D!=null&&(w?D<=a.to&&D<=b.end:D>=a.from&&D>=b.begin)){var L=w?"before":"after";return new k(r.line,D,L)}}var X=function(Ne,Je,Ae){for(var lt=function(sr,ui){return ui?new k(r.line,s(sr,1),"before"):new k(r.line,sr,"after")};Ne>=0&&Ne<i.length;Ne+=Je){var zt=i[Ne],Pt=Je>0==(zt.level!=1),yn=Pt?Ae.begin:s(Ae.end,-1);if(zt.from<=yn&&yn<zt.to||(yn=Pt?zt.from:s(zt.to,-1),Ae.begin<=yn&&yn<Ae.end))return lt(yn,Pt)}},oe=X(o+n,n,b);if(oe)return oe;var ge=n>0?b.end:s(b.begin,-1);return ge!=null&&!(n>0&&ge==t.text.length)&&(oe=X(n>0?0:i.length-1,n,f(ge)),oe)?oe:null}var bi={selectAll:He,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ct)},killLine:function(e){return ei(e,function(t){if(t.empty()){var r=Z(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:k(t.head.line+1,0)}:{from:t.head,to:k(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ei(e,function(t){return{from:k(t.from().line,0),to:je(e.doc,k(t.to().line+1,0))}})},delLineLeft:function(e){return ei(e,function(t){return{from:k(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ei(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 ei(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(k(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(k(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return dr(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ui(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return zr(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")},vt)},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")},vt)},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/)?Ui(e,t.head):n},vt)},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=rt(e.getLine(o.line),o.ch,n);t.push(Pe(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Pi(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=Z(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new k(i.line,i.ch-1)),i.ch>0)i=new k(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),k(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Z(e.doc,i.line-1).text;a&&(i=new k(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),k(i.line-1,a.length-1),i,"+transpose"))}}r.push(new Bn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return Pi(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);Sa(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function dr(e,t){var r=Z(e.doc,t),n=vi(r);return n!=r&&(t=Re(n)),fr(!0,e,n,t,1)}function zr(e,t){var r=Z(e.doc,t),n=Oa(r);return n!=r&&(t=Re(n)),fr(!0,e,r,t,-1)}function Ui(e,t){var r=dr(e,t.line),n=Z(e.doc,r.line),i=En(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 k(r.line,a?0:o,r.sticky)}return r}function Wr(e,t,r){if(typeof t=="string"&&(t=bi[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)!=an}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function ai(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Qn(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Qn(t,e.options.extraKeys,r,e)||Qn(t,e.options.keyMap,r,e)}var Yn=new Ze;function vn(e,t,r,n){var i=e.state.keySeq;if(i){if(ar(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Yn.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Hr(e,i+" "+t,r,n))return!0}return Hr(e,t,r,n)}function Hr(e,t,r,n){var i=ai(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&tr(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(rr(r),Wl(e)),!!i}function Zr(e,t){var r=xr(t,!0);return r?t.shiftKey&&!e.state.keySeq?vn(e,"Shift-"+r,t,function(n){return Wr(e,n,!0)})||vn(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Wr(e,n)}):vn(e,r,t,function(n){return Wr(e,n)}):!1}function Ut(e,t,r){return vn(e,"'"+r+"'",t,function(n){return Wr(e,n,!0)})}var ve=null;function tt(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=be(),!zn(t,e))){C&&E<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=Zr(t,e);v&&(ve=n?r:null,!n&&r==88&&!J&&(P?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),T&&!P&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Qe(t)}}function Qe(e){var t=e.display.lineDiv;at(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(I(t,"CodeMirror-crosshair"),On(document,"keyup",r),On(document,"mouseover",r))}me(document,"keyup",r),me(document,"mouseover",r)}function Mt(e){e.keyCode==16&&(this.doc.sel.shift=!1),zn(this,e)}function Un(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Io(t.display,e)||zn(t,e)||e.ctrlKey&&!e.altKey||P&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(v&&r==ve){ve=null,rr(e);return}if(!(v&&(!e.which||e.which<10)&&Zr(t,e))){var i=String.fromCharCode(n==null?r:n);i!="\b"&&(Ut(t,e,i)||t.display.input.onKeyPress(e))}}}var Gn=400,li=function(e,t,r){this.time=e,this.pos=t,this.button=r};li.prototype.compare=function(e,t,r){return this.time+Gn>e&&Ue(t,this.pos)==0&&r==this.button};var Vr,ti;function nr(e,t){var r=+new Date;return ti&&ti.compare(r,e,t)?(Vr=ti=null,"triple"):Vr&&Vr.compare(r,e,t)?(ti=new li(r,e,t),Vr=null,"double"):(Vr=new li(r,e,t),ti=null,"single")}function si(e){var t=this,r=t.display;if(!(zn(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,Io(r,e)){m||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!Ko(t,e)){var n=Wo(t,e),i=Qi(e),o=n?nr(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&eo(t,i,n,o,e))&&(i==1?n?Uo(t,n,o,e):Yi(e)==r.scroller&&rr(e):i==2?(n&&S(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(y?t.display.input.onContextMenu(e):ds(t)))}}}function eo(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,vn(e,Vn(o,i),i,function(a){if(typeof a=="string"&&(a=bi[a]),!a)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=a(e,r)!=an}finally{e.state.suppressEdits=!1}return s})}function co(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var o=Ee?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=P?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(P?r.altKey:r.ctrlKey)),i}function Uo(e,t,r,n){C?setTimeout(Ot(fs,e),0):e.curOp.focus=be();var i=co(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&io&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(Ue((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(Ue(a.to(),t)>0||t.xRel<0)?to(e,n,t,i):Ea(e,n,t,i)}function to(e,t,r,n){var i=e.display,o=!1,a=jr(e,function(f){m&&(i.scroller.draggable=!1),e.state.draggingText=!1,On(i.wrapper.ownerDocument,"mouseup",a),On(i.wrapper.ownerDocument,"mousemove",s),On(i.scroller,"dragstart",c),On(i.scroller,"drop",a),o||(rr(f),n.addNew||S(e.doc,r,null,null,n.extend),m&&!xe||C&&E==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),s=function(f){o=o||Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)>=10},c=function(){return o=!0};m&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),me(i.wrapper.ownerDocument,"mouseup",a),me(i.wrapper.ownerDocument,"mousemove",s),me(i.scroller,"dragstart",c),me(i.scroller,"drop",a),ds(e),setTimeout(function(){return i.input.focus()},20)}function Nr(e,t,r){if(r=="char")return new Bn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Bn(k(t.line,0),je(e.doc,k(t.line+1,0)));var n=r(e,t);return new Bn(n.from,n.to)}function Ea(e,t,r,n){var i=e.display,o=e.doc;rr(t);var a,s,c=o.sel,f=c.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),s>-1?a=f[s]:a=new Bn(r,r)):(a=o.sel.primary(),s=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new Bn(r,r)),r=Wo(e,t,!0,!0),s=-1;else{var b=Nr(e,r,n.unit);n.extend?a=p(a,b.anchor,b.head,n.extend):a=b}n.addNew?s==-1?(s=f.length,Q(o,uo(e,f.concat([a]),s),{scroll:!1,origin:"*mouse"})):f.length>1&&f[s].empty()&&n.unit=="char"&&!n.extend?(Q(o,uo(e,f.slice(0,s).concat(f.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):R(o,s,a,It):(s=0,Q(o,new ki([a],0),It),c=o.sel);var w=r;function D(Ae){if(Ue(w,Ae)!=0)if(w=Ae,n.unit=="rectangle"){for(var lt=[],zt=e.options.tabSize,Pt=rt(Z(o,r.line).text,r.ch,zt),yn=rt(Z(o,Ae.line).text,Ae.ch,zt),sr=Math.min(Pt,yn),ui=Math.max(Pt,yn),Tr=Math.min(r.line,Ae.line),ro=Math.min(e.lastLine(),Math.max(r.line,Ae.line));Tr<=ro;Tr++){var Gi=Z(o,Tr).text,Xr=$n(Gi,sr,zt);sr==ui?lt.push(new Bn(k(Tr,Xr),k(Tr,Xr))):Gi.length>Xr&<.push(new Bn(k(Tr,Xr),k(Tr,$n(Gi,ui,zt))))}lt.length||lt.push(new Bn(r,r)),Q(o,uo(e,c.ranges.slice(0,s).concat(lt),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ae)}else{var _i=a,pi=Nr(e,Ae,n.unit),ri=_i.anchor,Yr;Ue(pi.anchor,ri)>0?(Yr=pi.head,ri=Ft(_i.from(),pi.anchor)):(Yr=pi.anchor,ri=Bt(_i.to(),pi.head));var Ar=c.ranges.slice(0);Ar[s]=Br(e,new Bn(je(o,ri),Yr)),Q(o,uo(e,Ar,s),It)}}var L=i.wrapper.getBoundingClientRect(),X=0;function oe(Ae){var lt=++X,zt=Wo(e,Ae,!0,n.unit=="rectangle");if(zt)if(Ue(zt,w)!=0){e.curOp.focus=be(),D(zt);var Pt=hl(i,o);(zt.line>=Pt.to||zt.line<Pt.from)&&setTimeout(jr(e,function(){X==lt&&oe(Ae)}),150)}else{var yn=Ae.clientY<L.top?-20:Ae.clientY>L.bottom?20:0;yn&&setTimeout(jr(e,function(){X==lt&&(i.scroller.scrollTop+=yn,oe(Ae))}),50)}}function ge(Ae){e.state.selectingText=!1,X=1/0,Ae&&(rr(Ae),i.input.focus()),On(i.wrapper.ownerDocument,"mousemove",Ne),On(i.wrapper.ownerDocument,"mouseup",Je),o.history.lastSelOrigin=null}var Ne=jr(e,function(Ae){Ae.buttons===0||!Qi(Ae)?ge(Ae):oe(Ae)}),Je=jr(e,ge);e.state.selectingText=Je,me(i.wrapper.ownerDocument,"mousemove",Ne),me(i.wrapper.ownerDocument,"mouseup",Je)}function Br(e,t){var r=t.anchor,n=t.head,i=Z(e.doc,r.line);if(Ue(r,n)==0&&r.sticky==n.sticky)return t;var o=En(i);if(!o)return t;var a=bn(o,r.ch,r.sticky),s=o[a];if(s.from!=r.ch&&s.to!=r.ch)return t;var c=a+(s.from==r.ch==(s.level!=1)?0:1);if(c==0||c==o.length)return t;var f;if(n.line!=r.line)f=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var b=bn(o,n.ch,n.sticky),w=b-a||(n.ch-r.ch)*(s.level==1?-1:1);b==c-1||b==c?f=w<0:f=w>0}var D=o[c+(f?-1:0)],L=f==(D.level==1),X=L?D.from:D.to,oe=L?"after":"before";return r.ch==X&&r.sticky==oe?t:new Bn(new k(r.line,X,oe),n)}function Co(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(D){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&rr(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Ir(e,r))return Qr(t);o-=s.top-a.viewOffset;for(var c=0;c<e.display.gutterSpecs.length;++c){var f=a.gutters.childNodes[c];if(f&&f.getBoundingClientRect().right>=i){var b=De(e.doc,o),w=e.display.gutterSpecs[c];return Nn(e,r,e,b,w.className,t),Qr(t)}}}function Ko(e,t){return Co(e,t,"gutterClick",!0)}function Ma(e,t){Io(e.display,t)||Ia(e,t)||zn(e,t,"contextmenu")||y||e.display.input.onContextMenu(t)}function Ia(e,t){return Ir(e,"gutterContextMenu")?Co(e,t,"gutterContextMenu",!1):!1}function sa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hi(e)}var Si={toString:function(){return"CodeMirror.Init"}},ua={},To={};function xo(e){var t=e.optionHandlers;function r(n,i,o,a){e.defaults[n]=i,o&&(t[n]=a?function(s,c,f){f!=Si&&o(s,c,f)}:o)}e.defineOption=r,e.Init=Si,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,Xl(n)},!0),r("indentUnit",2,Xl,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){wa(n),Hi(n),yi(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!!i){var o=[],a=n.doc.first;n.doc.iter(function(c){for(var f=0;;){var b=c.text.indexOf(i,f);if(b==-1)break;f=b+i.length,o.push(k(a,b))}a++});for(var s=o.length-1;s>=0;s--)st(n.doc,i,o[s],k(o[s].line,o[s].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!=Si&&n.refresh()}),r("specialCharPlaceholder",va,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",fe?"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){sa(n),xa(n)},!0),r("keyMap","default",function(n,i,o){var a=Xn(i),s=o!=Si&&Xn(o);s&&s.detach&&s.detach(n,a),a.attach&&a.attach(n,s||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,jo,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=Gl(i,n.options.lineNumbers),xa(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?cl(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return aa(n)},!0),r("scrollbarStyle","native",function(n){ms(n),aa(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=Gl(n.options.gutters,i),xa(n)},!0),r("firstLineNumber",1,xa,!0),r("lineNumberFormatter",function(n){return n},xa,!0),r("showCursorWhenSelecting",!1,ia,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Ha(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,Po),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,ia,!0),r("singleCursorHeightPerLine",!0,ia,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,wa,!0),r("addModeClass",!1,wa,!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,wa,!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 Po(e,t,r){var n=r&&r!=Si;if(!t!=!n){var i=e.display.dragFunctions,o=t?me:On;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 jo(e){e.options.lineWrapping?(at(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(I(e.display.wrapper,"CodeMirror-wrap"),Ti(e)),fl(e),yi(e),Hi(e),setTimeout(function(){return aa(e)},100)}function Fn(e,t){var r=this;if(!(this instanceof Fn))return new Fn(e,t);this.options=t=t?ut(t):{},ut(ua,t,!1);var n=t.value;typeof n=="string"?n=new et(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Fn.inputStyles[t.inputStyle](this),o=this.display=new Gs(e,n,i,t);o.wrapper.CodeMirror=this,sa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ms(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 Ze,keySeq:null,specialChars:null},t.autofocus&&!fe&&o.input.focus(),C&&E<11&&setTimeout(function(){return r.display.input.reset(!0)},20),wo(this),Vt(),la(this),this.curOp.forceUpdate=!0,Rs(this,n),t.autofocus&&!fe||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Hl(r)},20):Ha(this);for(var a in To)To.hasOwnProperty(a)&&To[a](this,t[a],Si);Vl(this),t.finishInit&&t.finishInit(this);for(var s=0;s<no.length;++s)no[s](this);Oo(this),m&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Fn.defaults=ua,Fn.optionHandlers=To;function wo(e){var t=e.display;me(t.scroller,"mousedown",jr(e,si)),C&&E<11?me(t.scroller,"dblclick",jr(e,function(c){if(!zn(e,c)){var f=Wo(e,c);if(!(!f||Ko(e,c)||Io(e.display,c))){rr(c);var b=e.findWordAt(f);S(e.doc,b.anchor,b.head)}}})):me(t.scroller,"dblclick",function(c){return zn(e,c)||rr(c)}),me(t.scroller,"contextmenu",function(c){return Ma(e,c)}),me(t.input.getField(),"contextmenu",function(c){t.scroller.contains(c.target)||Ma(e,c)});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(c){if(c.touches.length!=1)return!1;var f=c.touches[0];return f.radiusX<=1&&f.radiusY<=1}function a(c,f){if(f.left==null)return!0;var b=f.left-c.left,w=f.top-c.top;return b*b+w*w>20*20}me(t.scroller,"touchstart",function(c){if(!zn(e,c)&&!o(c)&&!Ko(e,c)){t.input.ensurePolled(),clearTimeout(r);var f=+new Date;t.activeTouch={start:f,moved:!1,prev:f-n.end<=300?n:null},c.touches.length==1&&(t.activeTouch.left=c.touches[0].pageX,t.activeTouch.top=c.touches[0].pageY)}}),me(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),me(t.scroller,"touchend",function(c){var f=t.activeTouch;if(f&&!Io(t,c)&&f.left!=null&&!f.moved&&new Date-f.start<300){var b=e.coordsChar(t.activeTouch,"page"),w;!f.prev||a(f,f.prev)?w=new Bn(b,b):!f.prev.prev||a(f,f.prev.prev)?w=e.findWordAt(b):w=new Bn(k(b.line,0),je(e.doc,k(b.line+1,0))),e.setSelection(w.anchor,w.head),e.focus(),rr(c)}i()}),me(t.scroller,"touchcancel",i),me(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ka(e,t.scroller.scrollTop),Zo(e,t.scroller.scrollLeft,!0),Nn(e,"scroll",e))}),me(t.scroller,"mousewheel",function(c){return Xs(e,c)}),me(t.scroller,"DOMMouseScroll",function(c){return Xs(e,c)}),me(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(c){zn(e,c)||Ei(c)},over:function(c){zn(e,c)||(Tt(e,c),Ei(c))},start:function(c){return on(e,c)},drop:jr(e,sn),leave:function(c){zn(e,c)||nn(e)}};var s=t.input.getField();me(s,"keyup",function(c){return Mt.call(e,c)}),me(s,"keydown",jr(e,tt)),me(s,"keypress",jr(e,Un)),me(s,"focus",function(c){return Hl(e,c)}),me(s,"blur",function(c){return Ha(e,c)})}var no=[];Fn.defineInitHook=function(e){return no.push(e)};function Ki(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=Jn(e,t).state:r="prev");var a=e.options.tabSize,s=Z(i,t),c=rt(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var f=s.text.match(/^\s*/)[0],b;if(!n&&!/\S/.test(s.text))b=0,r="not";else if(r=="smart"&&(b=i.mode.indent(o,s.text.slice(f.length),s.text),b==an||b>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?b=rt(Z(i,t-1).text,null,a):b=0:r=="add"?b=c+e.options.indentUnit:r=="subtract"?b=c-e.options.indentUnit:typeof r=="number"&&(b=c+r),b=Math.max(0,b);var w="",D=0;if(e.options.indentWithTabs)for(var L=Math.floor(b/a);L;--L)D+=a,w+=" ";if(D<b&&(w+=Pe(b-D)),w!=f)return st(i,w,k(t,0),k(t,f.length),"+input"),s.stateAfter=null,!0;for(var X=0;X<i.sel.ranges.length;X++){var oe=i.sel.ranges[X];if(oe.head.line==t&&oe.head.ch<f.length){var ge=k(t,f.length);R(i,X,new Bn(ge,ge));break}}}var Gr=null;function ji(e){Gr=e}function Gt(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,s=i=="paste"||e.state.pasteIncoming>a,c=N(t),f=null;if(s&&n.ranges.length>1)if(Gr&&Gr.text.join(`
|
|
|
`)==t){if(n.ranges.length%Gr.text.length==0){f=[];for(var b=0;b<Gr.text.length;b++)f.push(o.splitLines(Gr.text[b]))}}else c.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(f=Ye(c,function(Ne){return[Ne]}));for(var w=e.curOp.updateInput,D=n.ranges.length-1;D>=0;D--){var L=n.ranges[D],X=L.from(),oe=L.to();L.empty()&&(r&&r>0?X=k(X.line,X.ch-r):e.state.overwrite&&!s?oe=k(oe.line,Math.min(Z(o,oe.line).text.length,oe.ch+Se(c).length)):s&&Gr&&Gr.lineWise&&Gr.text.join(`
|
|
|
`)==c.join(`
|
|
|
`)&&(X=oe=k(X.line,0)));var ge={from:X,to:oe,text:f?f[D%f.length]:c,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};de(e.doc,ge),tr(e,"inputRead",e,ge)}t&&!s&&Lr(e,t),Sa(e),e.curOp.updateInput<2&&(e.curOp.updateInput=w),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Qt(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Pi(t,function(){return Gt(t,r,0,null,"paste")}),!0}function Lr(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 s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Ki(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Z(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ki(e,i.head.line,"smart"));a&&tr(e,"electricInput",e,i.head.line)}}}function _r(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:k(i,0),head:k(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function lr(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function ni(){var e=$("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=$("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return m?e.style.width="1000px":e.setAttribute("wrap","off"),ye&&(e.style.border="1px solid black"),lr(e),t}function Ci(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)&&jr(this,t[n])(this,i,a),Nn(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"](Xn(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:hi(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++,yi(this)}),removeOverlay:hi(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++,yi(this);return}}}),indentLine:hi(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),ze(this.doc,n)&&Ki(this,n,i,o)}),indentSelection:hi(function(n){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var s=i[a];if(s.empty())s.head.line>o&&(Ki(this,s.head.line,n,!0),o=s.head.line,a==this.doc.sel.primIndex&&Sa(this));else{var c=s.from(),f=s.to(),b=Math.max(o,c.line);o=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var w=b;w<o;++w)Ki(this,w,n);var D=this.doc.sel.ranges;c.ch==0&&i.length==D.length&&D[a].from().ch>0&&R(this.doc,a,new Bn(c,D[a].to()),ct)}}}),getTokenAt:function(n,i){return Kr(this,n,i)},getLineTokens:function(n,i){return Kr(this,k(n),i,!0)},getTokenTypeAt:function(n){n=je(this.doc,n);var i=wr(this,Z(this.doc,n.line)),o=0,a=(i.length-1)/2,s=n.ch,c;if(s==0)c=i[2];else for(;;){var f=o+a>>1;if((f?i[f*2-1]:0)>=s)a=f;else if(i[f*2+1]<s)o=f+1;else{c=i[f*2+2];break}}var b=c?c.indexOf("overlay "):-1;return b<0?c:b==0?null:c.slice(0,b-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],s=this.getModeAt(n);if(typeof s[i]=="string")a[s[i]]&&o.push(a[s[i]]);else if(s[i])for(var c=0;c<s[i].length;c++){var f=a[s[i][c]];f&&o.push(f)}else s.helperType&&a[s.helperType]?o.push(a[s.helperType]):a[s.name]&&o.push(a[s.name]);for(var b=0;b<a._global.length;b++){var w=a._global[b];w.pred(s,this)&&_e(o,w.val)==-1&&o.push(w.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=Kn(o,n==null?o.first+o.size-1:n),Jn(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=je(this.doc,n):o=n?a.from():a.to(),Zi(this,o,i||"page")},charCoords:function(n,i){return al(this,je(this.doc,n),i||"page")},coordsChar:function(n,i){return n=Nl(this,n,i||"page"),sl(this,n.left,n.top)},lineAtHeight:function(n,i){return n=Nl(this,{top:n,left:0},i||"page").top,De(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,o){var a=!1,s;if(typeof n=="number"){var c=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>c&&(n=c,a=!0),s=Z(this.doc,n)}else s=n;return za(this,s,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-qi(s):0)},defaultTextHeight:function(){return ma(this.display)},defaultCharWidth:function(){return ya(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,o,a,s){var c=this.display;n=Zi(this,je(this.doc,n));var f=n.bottom,b=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),c.sizer.appendChild(i),a=="over")f=n.top;else if(a=="above"||a=="near"){var w=Math.max(c.wrapper.clientHeight,this.doc.height),D=Math.max(c.sizer.clientWidth,c.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>w)&&n.top>i.offsetHeight?f=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=w&&(f=n.bottom),b+i.offsetWidth>D&&(b=D-i.offsetWidth)}i.style.top=f+"px",i.style.left=i.style.right="",s=="right"?(b=c.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?b=0:s=="middle"&&(b=(c.sizer.clientWidth-i.offsetWidth)/2),i.style.left=b+"px"),o&&Ws(this,{left:b,top:f,right:b+i.offsetWidth,bottom:f+i.offsetHeight})},triggerOnKeyDown:hi(tt),triggerOnKeyPress:hi(Un),triggerOnKeyUp:Mt,triggerOnMouseDown:hi(si),execCommand:function(n){if(bi.hasOwnProperty(n))return bi[n].call(null,this)},triggerElectric:hi(function(n){Lr(this,n)}),findPosH:function(n,i,o,a){var s=1;i<0&&(s=-1,i=-i);for(var c=je(this.doc,n),f=0;f<i&&(c=fo(this.doc,c,s,o,a),!c.hitSide);++f);return c},moveH:hi(function(n,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?fo(o.doc,a.head,n,i,o.options.rtlMoveVisually):n<0?a.from():a.to()},vt)}),deleteH:hi(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):ei(this,function(s){var c=fo(a,s.head,n,i,!1);return n<0?{from:c,to:s.head}:{from:s.head,to:c}})}),findPosV:function(n,i,o,a){var s=1,c=a;i<0&&(s=-1,i=-i);for(var f=je(this.doc,n),b=0;b<i;++b){var w=Zi(this,f,"div");if(c==null?c=w.left:w.left=c,f=Di(this,w,s,o),f.hitSide)break}return f},moveV:hi(function(n,i){var o=this,a=this.doc,s=[],c=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(b){if(c)return n<0?b.from():b.to();var w=Zi(o,b.head,"div");b.goalColumn!=null&&(w.left=b.goalColumn),s.push(w.left);var D=Di(o,w,n,i);return i=="page"&&b==a.sel.primary()&&Bl(o,al(o,D,"div").top-w.top),D},vt),s.length)for(var f=0;f<a.sel.ranges.length;f++)a.sel.ranges[f].goalColumn=s[f]}),findWordAt:function(n){var i=this.doc,o=Z(i,n.line).text,a=n.ch,s=n.ch;if(o){var c=this.getHelper(n,"wordChars");(n.sticky=="before"||s==o.length)&&a?--a:++s;for(var f=o.charAt(a),b=Nt(f,c)?function(w){return Nt(w,c)}:/\s/.test(f)?function(w){return/\s/.test(w)}:function(w){return!/\s/.test(w)&&!Nt(w)};a>0&&b(o.charAt(a-1));)--a;for(;s<o.length&&b(o.charAt(s));)++s}return new Bn(k(n.line,a),k(n.line,s))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?at(this.display.cursorDiv,"CodeMirror-overwrite"):I(this.display.cursorDiv,"CodeMirror-overwrite"),Nn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==be()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:hi(function(n,i){Ba(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-bo(this)-this.display.barHeight,width:n.scrollWidth-bo(this)-this.display.barWidth,clientHeight:nl(this),clientWidth:qo(this)}},scrollIntoView:hi(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:k(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?Hs(this,n):hs(this,n.from,n.to,n.margin)}),setSize:hi(function(n,i){var o=this,a=function(c){return typeof c=="number"||/^\d+$/.test(String(c))?c+"px":c};n!=null&&(this.display.wrapper.style.width=a(n)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&Dl(this);var s=this.display.viewFrom;this.doc.iter(s,this.display.viewTo,function(c){if(c.widgets){for(var f=0;f<c.widgets.length;f++)if(c.widgets[f].noHScroll){Ho(o,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,Nn(this,"refresh",this)}),operation:function(n){return Pi(this,n)},startOperation:function(){return la(this)},endOperation:function(){return Oo(this)},refresh:hi(function(){var n=this.display.cachedTextHeight;yi(this),this.curOp.forceUpdate=!0,Hi(this),Ba(this,this.doc.scrollLeft,this.doc.scrollTop),Kl(this.display),(n==null||Math.abs(n-ma(this.display))>.5||this.options.lineWrapping)&&fl(this),Nn(this,"refresh",this)}),swapDoc:hi(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Rs(this,n),Hi(this),this.display.input.reset(),Ba(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,tr(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}},ii(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 fo(e,t,r,n,i){var o=t,a=r,s=Z(e,t.line),c=i&&e.direction=="rtl"?-r:r;function f(){var Je=t.line+c;return Je<e.first||Je>=e.first+e.size?!1:(t=new k(Je,t.ch,t.sticky),s=Z(e,Je))}function b(Je){var Ae;if(n=="codepoint"){var lt=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(lt)?Ae=null:Ae=new k(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(lt>=55296&<<56320?2:1))),-r)}else i?Ae=Dr(e.cm,s,t,r):Ae=gi(s,t,r);if(Ae==null)if(!Je&&f())t=fr(i,e.cm,s,t.line,c);else return!1;else t=Ae;return!0}if(n=="char"||n=="codepoint")b();else if(n=="column")b(!0);else if(n=="word"||n=="group")for(var w=null,D=n=="group",L=e.cm&&e.cm.getHelper(t,"wordChars"),X=!0;!(r<0&&!b(!X));X=!1){var oe=s.text.charAt(t.ch)||`
|
|
|
`,ge=Nt(oe,L)?"w":D&&oe==`
|
|
|
`?"n":!D||/\s/.test(oe)?null:"p";if(D&&!X&&!ge&&(ge="s"),w&&w!=ge){r<0&&(r=1,b(),t.sticky="after");break}if(ge&&(w=ge),r>0&&!b(!X))break}var Ne=Oe(e,t,o,a,!0);return gn(o,Ne)&&(Ne.hitSide=!0),Ne}function Di(e,t,r,n){var i=e.doc,o=t.left,a;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*ma(e.display),3);a=(r>0?t.bottom:t.top)+r*c}else n=="line"&&(a=r>0?t.bottom+3:t.top-3);for(var f;f=sl(e,o,a),!!f.outside;){if(r<0?a<=0:a>=i.height){f.hitSide=!0;break}a+=r*5}return f}var xn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ze,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};xn.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;lr(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function o(s){for(var c=s.target;c;c=c.parentNode){if(c==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(c.className))break}return!1}me(i,"paste",function(s){!o(s)||zn(n,s)||Qt(s,n)||E<=11&&setTimeout(jr(n,function(){return t.updateFromDOM()}),20)}),me(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),me(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),me(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),me(i,"touchstart",function(){return r.forceCompositionEnd()}),me(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(s){if(!(!o(s)||zn(n,s))){if(n.somethingSelected())ji({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var c=_r(n);ji({lineWise:!0,text:c.text}),s.type=="cut"&&n.operation(function(){n.setSelections(c.ranges,0,ct),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var f=Gr.text.join(`
|
|
|
`);if(s.clipboardData.setData("Text",f),s.clipboardData.getData("Text")==f){s.preventDefault();return}}var b=ni(),w=b.firstChild;n.display.lineSpace.insertBefore(b,n.display.lineSpace.firstChild),w.value=Gr.text.join(`
|
|
|
`);var D=document.activeElement;nt(w),setTimeout(function(){n.display.lineSpace.removeChild(b),D.focus(),D==i&&r.showPrimarySelection()},50)}}me(i,"copy",a),me(i,"cut",a)},xn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},xn.prototype.prepareSelection=function(){var e=vl(this.cm,!1);return e.focus=document.activeElement==this.div,e},xn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},xn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},xn.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=xi(t,e.anchorNode,e.anchorOffset),a=xi(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&Ue(Ft(o,a),n)==0&&Ue(Bt(o,a),i)==0)){var s=t.display.view,c=n.line>=t.display.viewFrom&&Vi(t,n)||{node:s[0].measure.map[2],offset:0},f=i.line<t.display.viewTo&&Vi(t,i);if(!f){var b=s[s.length-1].measure,w=b.maps?b.maps[b.maps.length-1]:b.map;f={node:w[w.length-1],offset:w[w.length-2]-w[w.length-3]}}if(!c||!f){e.removeAllRanges();return}var D=e.rangeCount&&e.getRangeAt(0),L;try{L=ne(c.node,c.offset,f.offset,f.node)}catch(X){}L&&(!T&&t.state.focused?(e.collapse(c.node,c.offset),L.collapsed||(e.removeAllRanges(),e.addRange(L))):(e.removeAllRanges(),e.addRange(L)),D&&e.anchorNode==null?e.addRange(D):T&&this.startGracePeriod()),this.rememberSelection()}},xn.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)},xn.prototype.showMultipleSelections=function(e){ee(this.cm.display.cursorDiv,e.cursors),ee(this.cm.display.selectionDiv,e.selection)},xn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},xn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return ae(this.div,t)},xn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},xn.prototype.blur=function(){this.div.blur()},xn.prototype.getField=function(){return this.div},xn.prototype.supportsTouch=function(){return!0},xn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Pi(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)},xn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},xn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(we&&V&&this.cm.display.gutterSpecs.length&&ca(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var r=xi(t,e.anchorNode,e.anchorOffset),n=xi(t,e.focusNode,e.focusOffset);r&&n&&Pi(t,function(){Q(t.doc,Bo(r,n),ct),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},xn.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=k(n.line-1,Z(e.doc,n.line-1).length)),i.ch==Z(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=k(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,s;n.line==t.viewFrom||(o=ra(e,n.line))==0?(a=Re(t.view[0].line),s=t.view[0].node):(a=Re(t.view[o].line),s=t.view[o-1].node.nextSibling);var c=ra(e,i.line),f,b;if(c==t.view.length-1?(f=t.viewTo-1,b=t.lineDiv.lastChild):(f=Re(t.view[c+1].line)-1,b=t.view[c+1].node.previousSibling),!s)return!1;for(var w=e.doc.splitLines(Jl(e,s,b,a,f)),D=Ke(e.doc,k(a,0),k(f,Z(e.doc,f).text.length));w.length>1&&D.length>1;)if(Se(w)==Se(D))w.pop(),D.pop(),f--;else if(w[0]==D[0])w.shift(),D.shift(),a++;else break;for(var L=0,X=0,oe=w[0],ge=D[0],Ne=Math.min(oe.length,ge.length);L<Ne&&oe.charCodeAt(L)==ge.charCodeAt(L);)++L;for(var Je=Se(w),Ae=Se(D),lt=Math.min(Je.length-(w.length==1?L:0),Ae.length-(D.length==1?L:0));X<lt&&Je.charCodeAt(Je.length-X-1)==Ae.charCodeAt(Ae.length-X-1);)++X;if(w.length==1&&D.length==1&&a==n.line)for(;L&&L>n.ch&&Je.charCodeAt(Je.length-X-1)==Ae.charCodeAt(Ae.length-X-1);)L--,X++;w[w.length-1]=Je.slice(0,Je.length-X).replace(/^\u200b+/,""),w[0]=w[0].slice(L).replace(/\u200b+$/,"");var zt=k(a,L),Pt=k(f,D.length?Se(D).length-X:0);if(w.length>1||w[0]||Ue(zt,Pt))return st(e.doc,w,zt,Pt,"+input"),!0},xn.prototype.ensurePolled=function(){this.forceCompositionEnd()},xn.prototype.reset=function(){this.forceCompositionEnd()},xn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},xn.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))},xn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Pi(this.cm,function(){return yi(e.cm)})},xn.prototype.setUneditable=function(e){e.contentEditable="false"},xn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||jr(this.cm,Gt)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},xn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},xn.prototype.onContextMenu=function(){},xn.prototype.resetPosition=function(){},xn.prototype.needsContentAttribute=!0;function Vi(e,t){var r=rl(e,t.line);if(!r||r.hidden)return null;var n=Z(e.doc,t.line),i=Aa(r,n,t.line),o=En(n,e.doc.direction),a="left";if(o){var s=bn(o,t.ch);a=s%2?"right":"left"}var c=Pl(i.map,t.ch,a);return c.offset=c.collapse=="right"?c.end:c.start,c}function ca(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Vo(e,t){return t&&(e.bad=!0),e}function Jl(e,t,r,n,i){var o="",a=!1,s=e.doc.lineSeparator(),c=!1;function f(L){return function(X){return X.id==L}}function b(){a&&(o+=s,c&&(o+=s),a=c=!1)}function w(L){L&&(b(),o+=L)}function D(L){if(L.nodeType==1){var X=L.getAttribute("cm-text");if(X){w(X);return}var oe=L.getAttribute("cm-marker"),ge;if(oe){var Ne=e.findMarks(k(n,0),k(i+1,0),f(+oe));Ne.length&&(ge=Ne[0].find(0))&&w(Ke(e.doc,ge.from,ge.to).join(s));return}if(L.getAttribute("contenteditable")=="false")return;var Je=/^(pre|div|p|li|table|br)$/i.test(L.nodeName);if(!/^br$/i.test(L.nodeName)&&L.textContent.length==0)return;Je&&b();for(var Ae=0;Ae<L.childNodes.length;Ae++)D(L.childNodes[Ae]);/^(pre|p)$/i.test(L.nodeName)&&(c=!0),Je&&(a=!0)}else L.nodeType==3&&w(L.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;D(t),t!=r;)t=t.nextSibling,c=!1;return o}function xi(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Vo(e.clipPos(k(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 Do(o,t,r)}}function Do(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!ae(n,t))return Vo(k(Re(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?Se(e.rest):e.line;return Vo(k(Re(o),o.text.length),i)}var a=t.nodeType==3?t:null,s=t;for(!a&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(a=t.firstChild,r&&(r=a.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var c=e.measure,f=c.maps;function b(ge,Ne,Je){for(var Ae=-1;Ae<(f?f.length:0);Ae++)for(var lt=Ae<0?c.map:f[Ae],zt=0;zt<lt.length;zt+=3){var Pt=lt[zt+2];if(Pt==ge||Pt==Ne){var yn=Re(Ae<0?e.line:e.rest[Ae]),sr=lt[zt]+Je;return(Je<0||Pt!=ge)&&(sr=lt[zt+(Je?1:0)]),k(yn,sr)}}}var w=b(a,s,r);if(w)return Vo(w,i);for(var D=s.nextSibling,L=a?a.nodeValue.length-r:0;D;D=D.nextSibling){if(w=b(D,D.firstChild,0),w)return Vo(k(w.line,w.ch-L),i);L+=D.textContent.length}for(var X=s.previousSibling,oe=r;X;X=X.previousSibling){if(w=b(X,X.firstChild,-1),w)return Vo(k(w.line,w.ch+oe),i);oe+=X.textContent.length}}var vr=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ze,this.hasSelection=!1,this.composing=null};vr.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),ye&&(i.style.width="0px"),me(i,"input",function(){C&&E>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),me(i,"paste",function(a){zn(n,a)||Qt(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!zn(n,a)){if(n.somethingSelected())ji({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=_r(n);ji({lineWise:!0,text:s.text}),a.type=="cut"?n.setSelections(s.ranges,null,ct):(r.prevInput="",i.value=s.text.join(`
|
|
|
`),nt(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}me(i,"cut",o),me(i,"copy",o),me(e.scroller,"paste",function(a){if(!(Io(e,a)||zn(n,a))){if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=a.clipboardData,i.dispatchEvent(s)}}),me(e.lineSpace,"selectstart",function(a){Io(e,a)||rr(a)}),me(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"})}}),me(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},vr.prototype.createField=function(e){this.wrapper=ni(),this.textarea=this.wrapper.firstChild},vr.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},vr.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=vl(e);if(e.options.moveInputWithCursor){var i=Zi(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},vr.prototype.showSelection=function(e){var t=this.cm,r=t.display;ee(r.cursorDiv,e.cursors),ee(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},vr.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&&nt(this.textarea),C&&E>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",C&&E>=9&&(this.hasSelection=null))}},vr.prototype.getField=function(){return this.textarea},vr.prototype.supportsTouch=function(){return!1},vr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!fe||be()!=this.textarea))try{this.textarea.focus()}catch(e){}},vr.prototype.blur=function(){this.textarea.blur()},vr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},vr.prototype.receivedFocus=function(){this.slowPoll()},vr.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},vr.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)},vr.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||re(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(C&&E>=9&&this.hasSelection===i||P&&/[\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,s=Math.min(n.length,i.length);a<s&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return Pi(t,function(){Gt(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},vr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},vr.prototype.onKeyPress=function(){C&&E>=9&&(this.hasSelection=null),this.fastPoll()},vr.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Wo(r,e),a=n.scroller.scrollTop;if(!o||v)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(o)==-1&&jr(r,Q)(r.doc,Bo(o),ct);var c=i.style.cssText,f=t.wrapper.style.cssText,b=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-b.top-5)+"px; left: "+(e.clientX-b.left-5)+`px;
|
|
|
z-index: 1000; background: `+(C?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var w;m&&(w=window.scrollY),n.input.focus(),m&&window.scrollTo(null,w),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=L,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function D(){if(i.selectionStart!=null){var oe=r.somethingSelected(),ge="\u200B"+(oe?i.value:"");i.value="\u21DA",i.value=ge,t.prevInput=oe?"":"\u200B",i.selectionStart=1,i.selectionEnd=ge.length,n.selForContextMenu=r.doc.sel}}function L(){if(t.contextMenuPending==L&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=c,C&&E<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!C||C&&E<9)&&D();var oe=0,ge=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?jr(r,He)(r):oe++<10?n.detectingSelectAll=setTimeout(ge,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ge,200)}}if(C&&E>=9&&D(),y){Ei(e);var X=function(){On(window,"mouseup",X),setTimeout(L,20)};me(window,"mouseup",X)}else setTimeout(L,50)},vr.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},vr.prototype.setUneditable=function(){},vr.prototype.needsContentAttribute=!1;function fa(e,t){if(t=t?ut(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=be();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(me(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(c){}}t.finishInit=function(c){c.save=n,c.getTextArea=function(){return e},c.toTextArea=function(){c.toTextArea=isNaN,n(),e.parentNode.removeChild(c.getWrapperElement()),e.style.display="",e.form&&(On(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var s=Fn(function(c){return e.parentNode.insertBefore(c,e.nextSibling)},t);return s}function Go(e){e.off=On,e.on=me,e.wheelEventPixels=ru,e.Doc=et,e.splitLines=N,e.countColumn=rt,e.findColumn=$n,e.isWordChar=pt,e.Pass=an,e.signal=Nn,e.Line=po,e.changeEnd=So,e.scrollbarModel=pl,e.Pos=k,e.cmpPos=Ue,e.modes=Le,e.mimeModes=Te,e.resolveMode=qt,e.getMode=Lt,e.modeExtensions=ft,e.extendMode=x,e.copyState=A,e.startState=W,e.innerMode=H,e.commands=bi,e.keyMap=cr,e.keyName=xr,e.isModifierKey=ar,e.lookupKey=Qn,e.normalizeKeyMap=Cn,e.StringStream=B,e.SharedTextMarker=kn,e.TextMarker=Rn,e.LineWidget=Ie,e.e_preventDefault=rr,e.e_stopPropagation=Fr,e.e_stop=Ei,e.addClass=at,e.contains=ae,e.rmClass=I,e.keyNames=dn}xo(Fn),Ci(Fn);var Va="iter insert remove copy getEditor constructor".split(" ");for(var No in et.prototype)et.prototype.hasOwnProperty(No)&&_e(Va,No)<0&&(Fn.prototype[No]=function(e){return function(){return e.apply(this.doc,arguments)}}(et.prototype[No]));return ii(et),Fn.inputStyles={textarea:vr,contenteditable:xn},Fn.defineMode=function(e){!Fn.defaults.mode&&e!="null"&&(Fn.defaults.mode=e),Rt.apply(this,arguments)},Fn.defineMIME=jt,Fn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Fn.defineMIME("text/plain","null"),Fn.defineExtension=function(e,t){Fn.prototype[e]=t},Fn.defineDocExtension=function(e,t){et.prototype[e]=t},Fn.fromTextArea=fa,Go(Fn),Fn.version="5.58.2",Fn})},67656:function(hn,he,h){"use strict";h.r(he),h.d(he,{BaseInput:function(){return v},default:function(){return ot}});var T=h(87462),Y=h(1413),O=h(4942),q=h(71002),C=h(94184),E=h.n(C),m=h(67294),ce=h(87887),V=function(ie){var y,g,I=ie.inputElement,F=ie.prefixCls,ee=ie.prefix,$=ie.suffix,$e=ie.addonBefore,ne=ie.addonAfter,ae=ie.className,be=ie.style,at=ie.disabled,gt=ie.readOnly,nt=ie.focused,Ot=ie.triggerFocus,ut=ie.allowClear,rt=ie.value,Ze=ie.handleReset,_e=ie.hidden,Zt=ie.classes,an=ie.classNames,ct=ie.dataAttrs,It=ie.styles,vt=ie.components,$n=(vt==null?void 0:vt.affixWrapper)||"span",hr=(vt==null?void 0:vt.groupWrapper)||"span",Pe=(vt==null?void 0:vt.wrapper)||"span",Se=(vt==null?void 0:vt.groupAddon)||"span",Ye=(0,m.useRef)(null),Me=function(un){var bn;(bn=Ye.current)!==null&&bn!==void 0&&bn.contains(un.target)&&(Ot==null||Ot())},wt=function(){var un;if(!ut)return null;var bn=!at&&!gt&&rt,gr="".concat(F,"-clear-icon"),En=(0,q.Z)(ut)==="object"&&ut!==null&&ut!==void 0&&ut.clearIcon?ut.clearIcon:"\u2716";return m.createElement("span",{onClick:Ze,onMouseDown:function(me){return me.preventDefault()},className:E()(gr,(un={},(0,O.Z)(un,"".concat(gr,"-hidden"),!bn),(0,O.Z)(un,"".concat(gr,"-has-suffix"),!!$),un)),role:"button",tabIndex:-1},En)},$t=(0,m.cloneElement)(I,{value:rt,hidden:_e,className:E()((y=I.props)===null||y===void 0?void 0:y.className,!(0,ce.X3)(ie)&&!(0,ce.He)(ie)&&ae)||null,style:(0,Y.Z)((0,Y.Z)({},(g=I.props)===null||g===void 0?void 0:g.style),!(0,ce.X3)(ie)&&!(0,ce.He)(ie)?be:{})});if((0,ce.X3)(ie)){var Dt,pt="".concat(F,"-affix-wrapper"),Nt=E()(pt,(Dt={},(0,O.Z)(Dt,"".concat(pt,"-disabled"),at),(0,O.Z)(Dt,"".concat(pt,"-focused"),nt),(0,O.Z)(Dt,"".concat(pt,"-readonly"),gt),(0,O.Z)(Dt,"".concat(pt,"-input-with-clear-btn"),$&&ut&&rt),Dt),!(0,ce.He)(ie)&&ae,Zt==null?void 0:Zt.affixWrapper,an==null?void 0:an.affixWrapper),Wt=($||ut)&&m.createElement("span",{className:E()("".concat(F,"-suffix"),an==null?void 0:an.suffix),style:It==null?void 0:It.suffix},wt(),$);$t=m.createElement($n,(0,T.Z)({className:Nt,style:(0,Y.Z)((0,Y.Z)({},(0,ce.He)(ie)?void 0:be),It==null?void 0:It.affixWrapper),hidden:!(0,ce.He)(ie)&&_e,onClick:Me},ct==null?void 0:ct.affixWrapper,{ref:Ye}),ee&&m.createElement("span",{className:E()("".concat(F,"-prefix"),an==null?void 0:an.prefix),style:It==null?void 0:It.prefix},ee),(0,m.cloneElement)(I,{value:rt,hidden:null}),Wt)}if((0,ce.He)(ie)){var Jt="".concat(F,"-group"),ln="".concat(Jt,"-addon"),Kt=E()("".concat(F,"-wrapper"),Jt,Zt==null?void 0:Zt.wrapper),Et=E()("".concat(F,"-group-wrapper"),ae,Zt==null?void 0:Zt.group);return m.createElement(hr,{className:Et,style:be,hidden:_e},m.createElement(Pe,{className:Kt},$e&&m.createElement(Se,{className:ln},$e),(0,m.cloneElement)($t,{hidden:null}),ne&&m.createElement(Se,{className:ln},ne)))}return $t},v=V,xe=h(74902),se=h(97685),pe=h(45987),ye=h(21770),we=h(98423),fe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],P=(0,m.forwardRef)(function(_,ie){var y=_.autoComplete,g=_.onChange,I=_.onFocus,F=_.onBlur,ee=_.onPressEnter,$=_.onKeyDown,$e=_.prefixCls,ne=$e===void 0?"rc-input":$e,ae=_.disabled,be=_.htmlSize,at=_.className,gt=_.maxLength,nt=_.suffix,Ot=_.showCount,ut=_.type,rt=ut===void 0?"text":ut,Ze=_.classes,_e=_.classNames,Zt=_.styles,an=(0,pe.Z)(_,fe),ct=(0,ye.Z)(_.defaultValue,{value:_.value}),It=(0,se.Z)(ct,2),vt=It[0],$n=It[1],hr=(0,m.useState)(!1),Pe=(0,se.Z)(hr,2),Se=Pe[0],Ye=Pe[1],Me=(0,m.useRef)(null),wt=function(Et){Me.current&&(0,ce.nH)(Me.current,Et)};(0,m.useImperativeHandle)(ie,function(){return{focus:wt,blur:function(){var Et;(Et=Me.current)===null||Et===void 0||Et.blur()},setSelectionRange:function(Et,wn,un){var bn;(bn=Me.current)===null||bn===void 0||bn.setSelectionRange(Et,wn,un)},select:function(){var Et;(Et=Me.current)===null||Et===void 0||Et.select()},input:Me.current}}),(0,m.useEffect)(function(){Ye(function(Kt){return Kt&&ae?!1:Kt})},[ae]);var $t=function(Et){_.value===void 0&&$n(Et.target.value),Me.current&&(0,ce.rJ)(Me.current,Et,g)},Dt=function(Et){ee&&Et.key==="Enter"&&ee(Et),$==null||$(Et)},pt=function(Et){Ye(!0),I==null||I(Et)},Nt=function(Et){Ye(!1),F==null||F(Et)},Wt=function(Et){$n(""),wt(),Me.current&&(0,ce.rJ)(Me.current,Et,g)},Jt=function(){var Et=(0,we.Z)(_,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return m.createElement("input",(0,T.Z)({autoComplete:y},Et,{onChange:$t,onFocus:pt,onBlur:Nt,onKeyDown:Dt,className:E()(ne,(0,O.Z)({},"".concat(ne,"-disabled"),ae),_e==null?void 0:_e.input),style:Zt==null?void 0:Zt.input,ref:Me,size:be,type:rt}))},ln=function(){var Et=Number(gt)>0;if(nt||Ot){var wn=(0,ce.D7)(vt),un=(0,xe.Z)(wn).length,bn=(0,q.Z)(Ot)==="object"?Ot.formatter({value:wn,count:un,maxLength:gt}):"".concat(un).concat(Et?" / ".concat(gt):"");return m.createElement(m.Fragment,null,!!Ot&&m.createElement("span",{className:E()("".concat(ne,"-show-count-suffix"),(0,O.Z)({},"".concat(ne,"-show-count-has-suffix"),!!nt),_e==null?void 0:_e.count),style:(0,Y.Z)({},Zt==null?void 0:Zt.count)},bn),nt)}return null};return m.createElement(v,(0,T.Z)({},an,{prefixCls:ne,className:at,inputElement:Jt(),handleReset:Wt,value:(0,ce.D7)(vt),focused:Se,triggerFocus:wt,suffix:ln(),disabled:ae,classes:Ze,classNames:_e,styles:Zt}))}),Ee=P,ot=Ee},87887:function(hn,he,h){"use strict";h.d(he,{D7:function(){return C},He:function(){return T},X3:function(){return Y},nH:function(){return q},rJ:function(){return O}});function T(E){return!!(E.addonBefore||E.addonAfter)}function Y(E){return!!(E.prefix||E.suffix||E.allowClear)}function O(E,m,ce,V){if(ce){var v=m;if(m.type==="click"){var xe=E.cloneNode(!0);v=Object.create(m,{target:{value:xe},currentTarget:{value:xe}}),xe.value="",ce(v);return}if(V!==void 0){v=Object.create(m,{target:{value:E},currentTarget:{value:E}}),E.value=V,ce(v);return}ce(v)}}function q(E,m){if(E){E.focus(m);var ce=m||{},V=ce.cursor;if(V){var v=E.value.length;switch(V){case"start":E.setSelectionRange(0,0);break;case"end":E.setSelectionRange(v,v);break;default:E.setSelectionRange(0,v)}}}}function C(E){return typeof E=="undefined"||E===null?"":String(E)}},66680:function(hn,he,h){"use strict";h.d(he,{Z:function(){return Y}});var T=h(67294);function Y(O){var q=T.useRef();q.current=O;var C=T.useCallback(function(){for(var E,m=arguments.length,ce=new Array(m),V=0;V<m;V++)ce[V]=arguments[V];return(E=q.current)===null||E===void 0?void 0:E.call.apply(E,[q].concat(ce))},[]);return C}},21770:function(hn,he,h){"use strict";h.d(he,{Z:function(){return E}});var T=h(97685),Y=h(66680),O=h(8410),q=h(63896);function C(m){return m!==void 0}function E(m,ce){var V=ce||{},v=V.defaultValue,xe=V.value,se=V.onChange,pe=V.postState,ye=(0,q.Z)(function(){return C(xe)?xe:C(v)?typeof v=="function"?v():v:typeof m=="function"?m():m}),we=(0,T.Z)(ye,2),fe=we[0],P=we[1],Ee=xe!==void 0?xe:fe,ot=pe?pe(Ee):Ee,_=(0,Y.Z)(se),ie=(0,q.Z)([Ee]),y=(0,T.Z)(ie,2),g=y[0],I=y[1];(0,O.o)(function(){var ee=g[0];fe!==ee&&_(fe,ee)},[g]),(0,O.o)(function(){C(xe)||P(xe)},[xe]);var F=(0,Y.Z)(function(ee,$){P(ee,$),I([Ee],$)});return[ot,F]}},98423:function(hn,he,h){"use strict";h.d(he,{Z:function(){return Y}});var T=h(1413);function Y(O,q){var C=(0,T.Z)({},O);return Array.isArray(q)&&q.forEach(function(E){delete C[E]}),C}},73299:function(hn,he,h){"use strict";h.d(he,{Z:function(){return vo}});var T=h(87462),Y=h(1413),O=h(71002),q=h(97685),C=h(4942),E=h(45987),m=h(67294),ce=h(73935),V=h(94184),v=h.n(V),xe=h(48555),se=m.forwardRef(function(N,re){var J=N.height,te=N.offsetY,Xe=N.offsetX,Le=N.children,Te=N.prefixCls,Rt=N.onInnerResize,jt=N.innerProps,qt=N.rtl,Lt=N.extra,ft={},x={display:"flex",flexDirection:"column"};if(te!==void 0){var A;ft={height:J,position:"relative",overflow:"hidden"},x=(0,Y.Z)((0,Y.Z)({},x),{},(A={transform:"translateY(".concat(te,"px)")},(0,C.Z)(A,qt?"marginRight":"marginLeft",-Xe),(0,C.Z)(A,"position","absolute"),(0,C.Z)(A,"left",0),(0,C.Z)(A,"right",0),(0,C.Z)(A,"top",0),A))}return m.createElement("div",{style:ft},m.createElement(xe.Z,{onResize:function(W){var B=W.offsetHeight;B&&Rt&&Rt()}},m.createElement("div",(0,T.Z)({style:x,className:v()((0,C.Z)({},"".concat(Te,"-holder-inner"),Te)),ref:re},jt),Le,Lt)))});se.displayName="Filler";var pe=se,ye=function(re){return+setTimeout(re,16)},we=function(re){return clearTimeout(re)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ye=function(re){return window.requestAnimationFrame(re)},we=function(re){return window.cancelAnimationFrame(re)});var fe=0,P=new Map;function Ee(N){P.delete(N)}var ot=function(re){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;fe+=1;var te=fe;function Xe(Le){if(Le===0)Ee(te),re();else{var Te=ye(function(){Xe(Le-1)});P.set(te,Te)}}return Xe(J),te};ot.cancel=function(N){var re=P.get(N);return Ee(re),we(re)};var _=ot;function ie(N,re){var J="touches"in N?N.touches[0]:N;return J[re?"pageX":"pageY"]}var y=m.forwardRef(function(N,re){var J,te=N.prefixCls,Xe=N.rtl,Le=N.scrollOffset,Te=N.scrollRange,Rt=N.onStartMove,jt=N.onStopMove,qt=N.onScroll,Lt=N.horizontal,ft=N.spinSize,x=N.containerSize,A=N.style,H=N.thumbStyle,W=m.useState(!1),B=(0,q.Z)(W,2),Z=B[0],Ke=B[1],At=m.useState(null),dt=(0,q.Z)(At,2),Re=dt[0],De=dt[1],ze=m.useState(null),en=(0,q.Z)(ze,2),k=en[0],Ue=en[1],gn=!Xe,Wn=m.useRef(),Bt=m.useRef(),Ft=m.useState(!1),Kn=(0,q.Z)(Ft,2),je=Kn[0],Sn=Kn[1],Mn=m.useRef(),Hn=function(){clearTimeout(Mn.current),Sn(!0),Mn.current=setTimeout(function(){Sn(!1)},3e3)},Pn=Te-x||0,kr=x-ft||0,wr=Pn>0,Jn=m.useMemo(function(){if(Le===0||Pn===0)return 0;var Er=Le/Pn;return Er*kr},[Le,Pn,kr]),Jr=function(ir){ir.stopPropagation(),ir.preventDefault()},Ur=m.useRef({top:Jn,dragging:Z,pageY:Re,startTop:k});Ur.current={top:Jn,dragging:Z,pageY:Re,startTop:k};var qn=function(ir){Ke(!0),De(ie(ir,Lt)),Ue(Ur.current.top),Rt(),ir.stopPropagation(),ir.preventDefault()};m.useEffect(function(){var Er=function(In){In.preventDefault()},ir=Wn.current,yr=Bt.current;return ir.addEventListener("touchstart",Er),yr.addEventListener("touchstart",qn),function(){ir.removeEventListener("touchstart",Er),yr.removeEventListener("touchstart",qn)}},[]);var $r=m.useRef();$r.current=Pn;var Kr=m.useRef();Kr.current=kr,m.useEffect(function(){if(Z){var Er,ir=function(In){var er=Ur.current,or=er.dragging,fi=er.pageY,Ii=er.startTop;if(_.cancel(Er),or){var zi=ie(In,Lt)-fi,Ri=Ii;!gn&&Lt?Ri-=zi:Ri+=zi;var mi=$r.current,_n=Kr.current,Oi=_n?Ri/_n:0,ur=Math.ceil(Oi*mi);ur=Math.max(ur,0),ur=Math.min(ur,mi),Er=_(function(){qt(ur,Lt)})}},yr=function(){Ke(!1),jt()};return window.addEventListener("mousemove",ir),window.addEventListener("touchmove",ir),window.addEventListener("mouseup",yr),window.addEventListener("touchend",yr),function(){window.removeEventListener("mousemove",ir),window.removeEventListener("touchmove",ir),window.removeEventListener("mouseup",yr),window.removeEventListener("touchend",yr),_.cancel(Er)}}},[Z]),m.useEffect(function(){Hn()},[Le]),m.useImperativeHandle(re,function(){return{delayHidden:Hn}});var qr="".concat(te,"-scrollbar"),Zn={position:"absolute",visibility:je&&wr?null:"hidden"},mr={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Lt?(Zn.height=8,Zn.left=0,Zn.right=0,Zn.bottom=0,mr.height="100%",mr.width=ft,gn?mr.left=Jn:mr.right=Jn):(Zn.width=8,Zn.top=0,Zn.bottom=0,gn?Zn.right=0:Zn.left=0,mr.width="100%",mr.height=ft,mr.top=Jn),m.createElement("div",{ref:Wn,className:v()(qr,(J={},(0,C.Z)(J,"".concat(qr,"-horizontal"),Lt),(0,C.Z)(J,"".concat(qr,"-vertical"),!Lt),(0,C.Z)(J,"".concat(qr,"-visible"),je),J)),style:(0,Y.Z)((0,Y.Z)({},Zn),A),onMouseDown:Jr,onMouseMove:Hn},m.createElement("div",{ref:Bt,className:v()("".concat(qr,"-thumb"),(0,C.Z)({},"".concat(qr,"-thumb-moving"),Z)),style:(0,Y.Z)((0,Y.Z)({},mr),H),onMouseDown:qn}))}),g=y;function I(N){var re=N.children,J=N.setRef,te=m.useCallback(function(Xe){J(Xe)},[]);return m.cloneElement(re,{ref:te})}function F(N,re,J,te,Xe,Le,Te){var Rt=Te.getKey;return N.slice(re,J+1).map(function(jt,qt){var Lt=re+qt,ft=Le(jt,Lt,{style:{width:te}}),x=Rt(jt);return m.createElement(I,{key:x,setRef:function(H){return Xe(jt,H)}},ft)})}function ee(N){return N instanceof HTMLElement||N instanceof SVGElement}function $(N){return ee(N)?N:N instanceof m.Component?ce.findDOMNode(N):null}var $e=h(15671),ne=h(43144),ae=function(){function N(){(0,$e.Z)(this,N),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,ne.Z)(N,[{key:"set",value:function(J,te){this.maps[J]=te,this.id+=1}},{key:"get",value:function(J){return this.maps[J]}}]),N}(),be=ae;function at(N,re,J){var te=m.useState(0),Xe=(0,q.Z)(te,2),Le=Xe[0],Te=Xe[1],Rt=(0,m.useRef)(new Map),jt=(0,m.useRef)(new be),qt=(0,m.useRef)();function Lt(){_.cancel(qt.current)}function ft(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Lt();var H=function(){Rt.current.forEach(function(B,Z){if(B&&B.offsetParent){var Ke=$(B),At=Ke.offsetHeight;jt.current.get(Z)!==At&&jt.current.set(Z,Ke.offsetHeight)}}),Te(function(B){return B+1})};A?H():qt.current=_(H)}function x(A,H){var W=N(A),B=Rt.current.get(W);H?(Rt.current.set(W,H),ft()):Rt.current.delete(W),!B!=!H&&(H?re==null||re(A):J==null||J(A))}return(0,m.useEffect)(function(){return Lt},[]),[x,ft,jt.current,Le]}function gt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var nt=gt()?m.useLayoutEffect:m.useEffect,Ot=function(re,J){var te=m.useRef(!0);nt(function(){return re(te.current)},J),nt(function(){return te.current=!1,function(){te.current=!0}},[])},ut=function(re,J){Ot(function(te){if(!te)return re()},J)},rt=Ot;function Ze(N){var re=m.useRef();re.current=N;var J=m.useCallback(function(){for(var te,Xe=arguments.length,Le=new Array(Xe),Te=0;Te<Xe;Te++)Le[Te]=arguments[Te];return(te=re.current)===null||te===void 0?void 0:te.call.apply(te,[re].concat(Le))},[]);return J}function _e(N){var re=React.useRef(!1),J=React.useState(N),te=_slicedToArray(J,2),Xe=te[0],Le=te[1];React.useEffect(function(){return re.current=!1,function(){re.current=!0}},[]);function Te(Rt,jt){jt&&re.current||Le(Rt)}return[Xe,Te]}function Zt(N){return N!==void 0}function an(N,re){var J=re||{},te=J.defaultValue,Xe=J.value,Le=J.onChange,Te=J.postState,Rt=useState(function(){return Zt(Xe)?Xe:Zt(te)?typeof te=="function"?te():te:typeof N=="function"?N():N}),jt=_slicedToArray(Rt,2),qt=jt[0],Lt=jt[1],ft=Xe!==void 0?Xe:qt,x=Te?Te(ft):ft,A=useEvent(Le),H=useState([ft]),W=_slicedToArray(H,2),B=W[0],Z=W[1];useLayoutUpdateEffect(function(){var At=B[0];qt!==At&&A(qt,At)},[B]),useLayoutUpdateEffect(function(){Zt(Xe)||Lt(Xe)},[Xe]);var Ke=useEvent(function(At,dt){Lt(At,dt),Z([ft],dt)});return[x,Ke]}var ct=h(31461);function It(N,re,J){var te=React.useRef({});return(!("value"in te.current)||J(te.current.condition,re))&&(te.current.value=N(),te.current.condition=re),te.current.value}function vt(N,re){typeof N=="function"?N(re):_typeof(N)==="object"&&N&&"current"in N&&(N.current=re)}function $n(){for(var N=arguments.length,re=new Array(N),J=0;J<N;J++)re[J]=arguments[J];var te=re.filter(function(Xe){return Xe});return te.length<=1?te[0]:function(Xe){re.forEach(function(Le){vt(Le,Xe)})}}function hr(){for(var N=arguments.length,re=new Array(N),J=0;J<N;J++)re[J]=arguments[J];return useMemo(function(){return $n.apply(void 0,re)},re,function(te,Xe){return te.length!==Xe.length||te.every(function(Le,Te){return Le!==Xe[Te]})})}function Pe(N){var re,J,te=isMemo(N)?N.type.type:N.type;return!(typeof te=="function"&&!((re=te.prototype)!==null&&re!==void 0&&re.render)||typeof N=="function"&&!((J=N.prototype)!==null&&J!==void 0&&J.render))}function Se(N){return!isValidElement(N)||isFragment(N)?!1:Pe(N)}function Ye(N,re,J,te){if(!re.length)return J;var Xe=_toArray(re),Le=Xe[0],Te=Xe.slice(1),Rt;return!N&&typeof Le=="number"?Rt=[]:Array.isArray(N)?Rt=_toConsumableArray(N):Rt=_objectSpread({},N),te&&J===void 0&&Te.length===1?delete Rt[Le][Te[0]]:Rt[Le]=Ye(Rt[Le],Te,J,te),Rt}function Me(N,re,J){var te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return re.length&&te&&J===void 0&&!get(N,re.slice(0,-1))?N:Ye(N,re,J,te)}function wt(N){return _typeof(N)==="object"&&N!==null&&Object.getPrototypeOf(N)===Object.prototype}function $t(N){return Array.isArray(N)?[]:{}}var Dt=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function pt(){for(var N=arguments.length,re=new Array(N),J=0;J<N;J++)re[J]=arguments[J];var te=$t(re[0]);return re.forEach(function(Xe){function Le(Te,Rt){var jt=new Set(Rt),qt=get(Xe,Te),Lt=Array.isArray(qt);if(Lt||wt(qt)){if(!jt.has(qt)){jt.add(qt);var ft=get(te,Te);Lt?te=Me(te,Te,[]):(!ft||_typeof(ft)!=="object")&&(te=Me(te,Te,$t(qt))),Dt(qt).forEach(function(x){Le([].concat(_toConsumableArray(Te),[x]),jt)})}}else te=Me(te,Te,qt)}Le([])}),te}var Nt={},Wt=[],Jt=function(re){Wt.push(re)};function ln(N,re){if(0)var J}function Kt(N,re){if(0)var J}function Et(){Nt={}}function wn(N,re,J){!re&&!Nt[J]&&(N(!1,J),Nt[J]=!0)}function un(N,re){wn(ln,N,re)}function bn(N,re){wn(Kt,N,re)}un.preMessage=Jt,un.resetWarned=Et,un.noteOnce=bn;var gr=null,En=10;function pr(N,re,J,te,Xe,Le,Te,Rt){var jt=m.useRef(),qt=m.useState(null),Lt=(0,q.Z)(qt,2),ft=Lt[0],x=Lt[1];return rt(function(){if(ft&&ft.times<En){if(!N.current){x(function(Hn){return(0,Y.Z)({},Hn)});return}Le();var A=ft.targetAlign,H=ft.originAlign,W=ft.index,B=ft.offset,Z=N.current.clientHeight,Ke=!1,At=A,dt=null;if(Z){for(var Re=A||H,De=0,ze=0,en=0,k=Math.min(re.length-1,W),Ue=0;Ue<=k;Ue+=1){var gn=Xe(re[Ue]);ze=De;var Wn=J.get(gn);en=ze+(Wn===void 0?te:Wn),De=en}for(var Bt=Re==="top"?B:Z-B,Ft=k;Ft>=0;Ft-=1){var Kn=Xe(re[Ft]),je=J.get(Kn);if(je===void 0){Ke=!0;break}if(Bt-=je,Bt<=0)break}switch(Re){case"top":dt=ze-B;break;case"bottom":dt=en-Z+B;break;default:{var Sn=N.current.scrollTop,Mn=Sn+Z;ze<Sn?At="top":en>Mn&&(At="bottom")}}dt!==null&&Te(dt),dt!==ft.lastTop&&(Ke=!0)}Ke&&x(function(Hn){return(0,Y.Z)((0,Y.Z)({},Hn),{},{times:Hn.times+1,targetAlign:At,lastTop:dt})})}},[ft,N.current]),function(A){if(A==null){Rt();return}if(_.cancel(jt.current),typeof A=="number")Te(A);else if(A&&(0,O.Z)(A)==="object"){var H,W=A.align;"index"in A?H=A.index:H=re.findIndex(function(Ke){return Xe(Ke)===A.key});var B=A.offset,Z=B===void 0?0:B;x({times:0,index:H,offset:Z,originAlign:W})}}}function me(N,re,J,te){var Xe=J-N,Le=re-J,Te=Math.min(Xe,Le)*2;if(te<=Te){var Rt=Math.floor(te/2);return te%2?J+Rt+1:J-Rt}return Xe>Le?J-(te-Le):J+(te-Xe)}function Dn(N,re,J){var te=N.length,Xe=re.length,Le,Te;if(te===0&&Xe===0)return null;te<Xe?(Le=N,Te=re):(Le=re,Te=N);var Rt={__EMPTY_ITEM__:!0};function jt(H){return H!==void 0?J(H):Rt}for(var qt=null,Lt=Math.abs(te-Xe)!==1,ft=0;ft<Te.length;ft+=1){var x=jt(Le[ft]),A=jt(Te[ft]);if(x!==A){qt=ft,Lt=Lt||x!==jt(Te[ft+1]);break}}return qt===null?null:{index:qt,multiple:Lt}}function On(N,re,J){var te=m.useState(N),Xe=(0,q.Z)(te,2),Le=Xe[0],Te=Xe[1],Rt=m.useState(null),jt=(0,q.Z)(Rt,2),qt=jt[0],Lt=jt[1];return m.useEffect(function(){var ft=Dn(Le||[],N||[],re);(ft==null?void 0:ft.index)!==void 0&&(J==null||J(ft.index),Lt(N[ft.index])),Te(N)},[N]),[qt]}var Nn=(typeof navigator=="undefined"?"undefined":(0,O.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),zn=Nn,Ai=function(N,re){var J=(0,m.useRef)(!1),te=(0,m.useRef)(null);function Xe(){clearTimeout(te.current),J.current=!0,te.current=setTimeout(function(){J.current=!1},50)}var Le=(0,m.useRef)({top:N,bottom:re});return Le.current.top=N,Le.current.bottom=re,function(Te){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,jt=Te<0&&Le.current.top||Te>0&&Le.current.bottom;return Rt&&jt?(clearTimeout(te.current),J.current=!1):(!jt||J.current)&&Xe(),!J.current&&jt}};function Ir(N,re,J,te,Xe){var Le=(0,m.useRef)(0),Te=(0,m.useRef)(null),Rt=(0,m.useRef)(null),jt=(0,m.useRef)(!1),qt=Ai(re,J);function Lt(B,Z){_.cancel(Te.current),Le.current+=Z,Rt.current=Z,!qt(Z)&&(zn||B.preventDefault(),Te.current=_(function(){var Ke=jt.current?10:1;Xe(Le.current*Ke),Le.current=0}))}function ft(B,Z){Xe(Z,!0),zn||B.preventDefault()}var x=(0,m.useRef)(null),A=(0,m.useRef)(null);function H(B){if(N){_.cancel(A.current),A.current=_(function(){x.current=null},2);var Z=B.deltaX,Ke=B.deltaY,At=B.shiftKey,dt=Z,Re=Ke;(x.current==="sx"||!x.current&&At&&Ke&&!Z)&&(dt=Ke,Re=0,x.current="sx");var De=Math.abs(dt),ze=Math.abs(Re);x.current===null&&(x.current=te&&De>ze?"x":"y"),x.current==="y"?Lt(B,Re):ft(B,dt)}}function W(B){N&&(jt.current=B.detail===Rt.current)}return[H,W]}var ii=14/15;function rr(N,re,J){var te=(0,m.useRef)(!1),Xe=(0,m.useRef)(0),Le=(0,m.useRef)(null),Te=(0,m.useRef)(null),Rt,jt=function(x){if(te.current){var A=Math.ceil(x.touches[0].pageY),H=Xe.current-A;Xe.current=A,J(H)&&x.preventDefault(),clearInterval(Te.current),Te.current=setInterval(function(){H*=ii,(!J(H,!0)||Math.abs(H)<=.1)&&clearInterval(Te.current)},16)}},qt=function(){te.current=!1,Rt()},Lt=function(x){Rt(),x.touches.length===1&&!te.current&&(te.current=!0,Xe.current=Math.ceil(x.touches[0].pageY),Le.current=x.target,Le.current.addEventListener("touchmove",jt),Le.current.addEventListener("touchend",qt))};Rt=function(){Le.current&&(Le.current.removeEventListener("touchmove",jt),Le.current.removeEventListener("touchend",qt))},rt(function(){return N&&re.current.addEventListener("touchstart",Lt),function(){var ft;(ft=re.current)===null||ft===void 0||ft.removeEventListener("touchstart",Lt),Rt(),clearInterval(Te.current)}},[N])}var Fr=20;function Qr(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,J=N/re*100;return isNaN(J)&&(J=0),J=Math.max(J,Fr),J=Math.min(J,N/2),Math.floor(J)}function Ei(N,re,J,te){var Xe=m.useMemo(function(){return[new Map,[]]},[N,J.id,te]),Le=(0,q.Z)(Xe,2),Te=Le[0],Rt=Le[1],jt=function(Lt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Lt,x=Te.get(Lt),A=Te.get(ft);if(x===void 0||A===void 0)for(var H=N.length,W=Rt.length;W<H;W+=1){var B,Z=N[W],Ke=re(Z);Te.set(Ke,W);var At=(B=J.get(Ke))!==null&&B!==void 0?B:te;if(Rt[W]=(Rt[W-1]||0)+At,Ke===Lt&&(x=W),Ke===ft&&(A=W),x!==void 0&&A!==void 0)break}return{top:Rt[x-1]||0,bottom:Rt[A]}};return jt}var Yi=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Qi=[],io={overflowY:"auto",overflowAnchor:"none"};function Mi(N,re){var J=N.prefixCls,te=J===void 0?"rc-virtual-list":J,Xe=N.className,Le=N.height,Te=N.itemHeight,Rt=N.fullHeight,jt=Rt===void 0?!0:Rt,qt=N.style,Lt=N.data,ft=N.children,x=N.itemKey,A=N.virtual,H=N.direction,W=N.scrollWidth,B=N.component,Z=B===void 0?"div":B,Ke=N.onScroll,At=N.onVirtualScroll,dt=N.onVisibleChange,Re=N.innerProps,De=N.extraRender,ze=N.styles,en=(0,E.Z)(N,Yi),k=!!(A!==!1&&Le&&Te),Ue=k&&Lt&&(Te*Lt.length>Le||!!W),gn=H==="rtl",Wn=v()(te,(0,C.Z)({},"".concat(te,"-rtl"),gn),Xe),Bt=Lt||Qi,Ft=(0,m.useRef)(),Kn=(0,m.useRef)(),je=(0,m.useState)(0),Sn=(0,q.Z)(je,2),Mn=Sn[0],Hn=Sn[1],Pn=(0,m.useState)(0),kr=(0,q.Z)(Pn,2),wr=kr[0],Jn=kr[1],Jr=(0,m.useState)(!1),Ur=(0,q.Z)(Jr,2),qn=Ur[0],$r=Ur[1],Kr=function(){$r(!0)},qr=function(){$r(!1)},Zn=m.useCallback(function(_t){return typeof x=="function"?x(_t):_t==null?void 0:_t[x]},[x]),mr={getKey:Zn};function Er(_t){Hn(function(Yt){var Ln;typeof _t=="function"?Ln=_t(Yt):Ln=_t;var Mr=La(Ln);return Ft.current.scrollTop=Mr,Mr})}var ir=(0,m.useRef)({start:0,end:Bt.length}),yr=(0,m.useRef)(),Rr=On(Bt,Zn),In=(0,q.Z)(Rr,1),er=In[0];yr.current=er;var or=at(Zn,null,null),fi=(0,q.Z)(or,4),Ii=fi[0],zi=fi[1],Ri=fi[2],mi=fi[3],_n=m.useMemo(function(){if(!k)return{scrollHeight:void 0,start:0,end:Bt.length-1,offset:void 0};if(!Ue){var _t;return{scrollHeight:((_t=Kn.current)===null||_t===void 0?void 0:_t.offsetHeight)||0,start:0,end:Bt.length-1,offset:void 0}}for(var Yt=0,Ln,Mr,tr,El=Bt.length,$o=0;$o<El;$o+=1){var Qo=Bt[$o],qa=Zn(Qo),Jo=Ri.get(qa),Na=Yt+(Jo===void 0?Te:Jo);Na>=Mn&&Ln===void 0&&(Ln=$o,Mr=Yt),Na>Mn+Le&&tr===void 0&&(tr=$o),Yt=Na}return Ln===void 0&&(Ln=0,Mr=0,tr=Math.ceil(Le/Te)),tr===void 0&&(tr=Bt.length-1),tr=Math.min(tr+1,Bt.length-1),{scrollHeight:Yt,start:Ln,end:tr,offset:Mr}},[Ue,k,Mn,Bt,mi,Le]),Oi=_n.scrollHeight,ur=_n.start,di=_n.end,ho=_n.offset;ir.current.start=ur,ir.current.end=di;var go=m.useState({width:0,height:Le}),oo=(0,q.Z)(go,2),Li=oo[0],Ao=oo[1],Eo=function(Yt){Ao({width:Yt.width||Yt.offsetWidth,height:Yt.height||Yt.offsetHeight})},Fo=(0,m.useRef)(),ao=(0,m.useRef)(),vi=m.useMemo(function(){return Qr(Li.width,W)},[Li.width,W]),Oa=m.useMemo(function(){return Qr(Li.height,Oi)},[Li.height,Oi]),Mo=Oi-Le,lo=(0,m.useRef)(Mo);lo.current=Mo;function La(_t){var Yt=_t;return Number.isNaN(lo.current)||(Yt=Math.min(Yt,lo.current)),Yt=Math.max(Yt,0),Yt}var Ji=Mn<=0,Xo=Mn>=Mo,qi=Ai(Ji,Xo),Wi=function(){return{x:gn?-wr:wr,y:Mn}},Ti=(0,m.useRef)(Wi()),po=Ze(function(){if(At){var _t=Wi();(Ti.current.x!==_t.x||Ti.current.y!==_t.y)&&(At(_t),Ti.current=_t)}});function Xa(_t,Yt){var Ln=_t;Yt?((0,ce.flushSync)(function(){Jn(Ln)}),po()):Er(Ln)}function ql(_t){var Yt=_t.currentTarget.scrollTop;Yt!==Mn&&Er(Yt),Ke==null||Ke(_t),po()}var Yo=function(Yt){var Ln=Yt,Mr=W-Li.width;return Ln=Math.max(Ln,0),Ln=Math.min(Ln,Mr),Ln},es=Ze(function(_t,Yt){Yt?((0,ce.flushSync)(function(){Jn(function(Ln){var Mr=Ln+(gn?-_t:_t);return Yo(Mr)})}),po()):Er(function(Ln){var Mr=Ln+_t;return Mr})}),Ya=Ir(k,Ji,Xo,!!W,es),Ta=(0,q.Z)(Ya,2),va=Ta[0],Pa=Ta[1];rr(k,Ft,function(_t,Yt){return qi(_t,Yt)?!1:(va({preventDefault:function(){},deltaY:_t}),!0)}),rt(function(){function _t(Ln){k&&Ln.preventDefault()}var Yt=Ft.current;return Yt.addEventListener("wheel",va),Yt.addEventListener("DOMMouseScroll",Pa),Yt.addEventListener("MozMousePixelScroll",_t),function(){Yt.removeEventListener("wheel",va),Yt.removeEventListener("DOMMouseScroll",Pa),Yt.removeEventListener("MozMousePixelScroll",_t)}},[k]),rt(function(){W&&Jn(function(_t){return Yo(_t)})},[Li.width,W]);var Qa=function(){var Yt,Ln;(Yt=Fo.current)===null||Yt===void 0||Yt.delayHidden(),(Ln=ao.current)===null||Ln===void 0||Ln.delayHidden()},Da=pr(Ft,Bt,Ri,Te,Zn,function(){return zi(!0)},Er,Qa);m.useImperativeHandle(re,function(){return{getScrollInfo:Wi,scrollTo:function(Yt){function Ln(Mr){return Mr&&(0,O.Z)(Mr)==="object"&&("left"in Mr||"top"in Mr)}Ln(Yt)?(Yt.left!==void 0&&Jn(Yo(Yt.left)),Da(Yt.top)):Da(Yt)}}}),rt(function(){if(dt){var _t=Bt.slice(ur,di+1);dt(_t,Bt)}},[ur,di,Bt]);var wl=Ei(Bt,Zn,Ri,Te),Ja=De==null?void 0:De({start:ur,end:di,virtual:Ue,offsetX:wr,offsetY:ho,rtl:gn,getSize:wl}),ha=F(Bt,ur,di,W,Ii,ft,mr),mo=null;Le&&(mo=(0,Y.Z)((0,C.Z)({},jt?"height":"maxHeight",Le),io),k&&(mo.overflowY="hidden",W&&(mo.overflowX="hidden"),qn&&(mo.pointerEvents="none")));var yo={};return gn&&(yo.dir="rtl"),m.createElement("div",(0,T.Z)({style:(0,Y.Z)((0,Y.Z)({},qt),{},{position:"relative"}),className:Wn},yo,en),m.createElement(xe.Z,{onResize:Eo},m.createElement(Z,{className:"".concat(te,"-holder"),style:mo,ref:Ft,onScroll:ql,onMouseEnter:Qa},m.createElement(pe,{prefixCls:te,height:Oi,offsetX:wr,offsetY:ho,scrollWidth:W,onInnerResize:zi,ref:Kn,innerProps:Re,rtl:gn,extra:Ja},ha))),Ue&&Oi>Le&&m.createElement(g,{ref:Fo,prefixCls:te,scrollOffset:Mn,scrollRange:Oi,rtl:gn,onScroll:Xa,onStartMove:Kr,onStopMove:qr,spinSize:Oa,containerSize:Li.height,style:ze==null?void 0:ze.verticalScrollBar,thumbStyle:ze==null?void 0:ze.verticalScrollBarThumb}),Ue&&W&&m.createElement(g,{ref:ao,prefixCls:te,scrollOffset:wr,scrollRange:W,rtl:gn,onScroll:Xa,onStartMove:Kr,onStopMove:qr,spinSize:vi,containerSize:Li.width,horizontal:!0,style:ze==null?void 0:ze.horizontalScrollBar,thumbStyle:ze==null?void 0:ze.horizontalScrollBarThumb}))}var Fi=m.forwardRef(Mi);Fi.displayName="List";var $i=Fi,vo=$i},66392:function(hn,he){"use strict";var h;var T=Symbol.for("react.element"),Y=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),m=Symbol.for("react.context"),ce=Symbol.for("react.server_context"),V=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),xe=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),we;we=Symbol.for("react.module.reference");function fe(P){if(typeof P=="object"&&P!==null){var Ee=P.$$typeof;switch(Ee){case T:switch(P=P.type,P){case O:case C:case q:case v:case xe:return P;default:switch(P=P&&P.$$typeof,P){case ce:case m:case V:case pe:case se:case E:return P;default:return Ee}}case Y:return Ee}}}h=m,h=E,h=T,h=V,h=O,h=pe,h=se,h=Y,h=C,h=q,h=v,h=xe,h=function(){return!1},h=function(){return!1},h=function(P){return fe(P)===m},h=function(P){return fe(P)===E},h=function(P){return typeof P=="object"&&P!==null&&P.$$typeof===T},h=function(P){return fe(P)===V},h=function(P){return fe(P)===O},h=function(P){return fe(P)===pe},h=function(P){return fe(P)===se},h=function(P){return fe(P)===Y},h=function(P){return fe(P)===C},h=function(P){return fe(P)===q},h=function(P){return fe(P)===v},h=function(P){return fe(P)===xe},h=function(P){return typeof P=="string"||typeof P=="function"||P===O||P===C||P===q||P===v||P===xe||P===ye||typeof P=="object"&&P!==null&&(P.$$typeof===pe||P.$$typeof===se||P.$$typeof===E||P.$$typeof===m||P.$$typeof===V||P.$$typeof===we||P.getModuleId!==void 0)},h=fe},31461:function(hn,he,h){"use strict";h(66392)},17423:function(hn,he,h){"use strict";h.d(he,{Z:function(){return ce}});const T=V=>typeof V=="object"&&V!=null&&V.nodeType===1,Y=(V,v)=>(!v||V!=="hidden")&&V!=="visible"&&V!=="clip",O=(V,v)=>{if(V.clientHeight<V.scrollHeight||V.clientWidth<V.scrollWidth){const xe=getComputedStyle(V,null);return Y(xe.overflowY,v)||Y(xe.overflowX,v)||(se=>{const pe=(ye=>{if(!ye.ownerDocument||!ye.ownerDocument.defaultView)return null;try{return ye.ownerDocument.defaultView.frameElement}catch(we){return null}})(se);return!!pe&&(pe.clientHeight<se.scrollHeight||pe.clientWidth<se.scrollWidth)})(V)}return!1},q=(V,v,xe,se,pe,ye,we,fe)=>ye<V&&we>v||ye>V&&we<v?0:ye<=V&&fe<=xe||we>=v&&fe>=xe?ye-V-se:we>v&&fe<xe||ye<V&&fe>xe?we-v+pe:0,C=V=>{const v=V.parentElement;return v==null?V.getRootNode().host||null:v},E=(V,v)=>{var xe,se,pe,ye;if(typeof document=="undefined")return[];const{scrollMode:we,block:fe,inline:P,boundary:Ee,skipOverflowHiddenElements:ot}=v,_=typeof Ee=="function"?Ee:an=>an!==Ee;if(!T(V))throw new TypeError("Invalid target");const ie=document.scrollingElement||document.documentElement,y=[];let g=V;for(;T(g)&&_(g);){if(g=C(g),g===ie){y.push(g);break}g!=null&&g===document.body&&O(g)&&!O(document.documentElement)||g!=null&&O(g,ot)&&y.push(g)}const I=(se=(xe=window.visualViewport)==null?void 0:xe.width)!=null?se:innerWidth,F=(ye=(pe=window.visualViewport)==null?void 0:pe.height)!=null?ye:innerHeight,{scrollX:ee,scrollY:$}=window,{height:$e,width:ne,top:ae,right:be,bottom:at,left:gt}=V.getBoundingClientRect(),{top:nt,right:Ot,bottom:ut,left:rt}=(an=>{const ct=window.getComputedStyle(an);return{top:parseFloat(ct.scrollMarginTop)||0,right:parseFloat(ct.scrollMarginRight)||0,bottom:parseFloat(ct.scrollMarginBottom)||0,left:parseFloat(ct.scrollMarginLeft)||0}})(V);let Ze=fe==="start"||fe==="nearest"?ae-nt:fe==="end"?at+ut:ae+$e/2-nt+ut,_e=P==="center"?gt+ne/2-rt+Ot:P==="end"?be+Ot:gt-rt;const Zt=[];for(let an=0;an<y.length;an++){const ct=y[an],{height:It,width:vt,top:$n,right:hr,bottom:Pe,left:Se}=ct.getBoundingClientRect();if(we==="if-needed"&&ae>=0&>>=0&&at<=F&&be<=I&&ae>=$n&&at<=Pe&>>=Se&&be<=hr)return Zt;const Ye=getComputedStyle(ct),Me=parseInt(Ye.borderLeftWidth,10),wt=parseInt(Ye.borderTopWidth,10),$t=parseInt(Ye.borderRightWidth,10),Dt=parseInt(Ye.borderBottomWidth,10);let pt=0,Nt=0;const Wt="offsetWidth"in ct?ct.offsetWidth-ct.clientWidth-Me-$t:0,Jt="offsetHeight"in ct?ct.offsetHeight-ct.clientHeight-wt-Dt:0,ln="offsetWidth"in ct?ct.offsetWidth===0?0:vt/ct.offsetWidth:0,Kt="offsetHeight"in ct?ct.offsetHeight===0?0:It/ct.offsetHeight:0;if(ie===ct)pt=fe==="start"?Ze:fe==="end"?Ze-F:fe==="nearest"?q($,$+F,F,wt,Dt,$+Ze,$+Ze+$e,$e):Ze-F/2,Nt=P==="start"?_e:P==="center"?_e-I/2:P==="end"?_e-I:q(ee,ee+I,I,Me,$t,ee+_e,ee+_e+ne,ne),pt=Math.max(0,pt+$),Nt=Math.max(0,Nt+ee);else{pt=fe==="start"?Ze-$n-wt:fe==="end"?Ze-Pe+Dt+Jt:fe==="nearest"?q($n,Pe,It,wt,Dt+Jt,Ze,Ze+$e,$e):Ze-($n+It/2)+Jt/2,Nt=P==="start"?_e-Se-Me:P==="center"?_e-(Se+vt/2)+Wt/2:P==="end"?_e-hr+$t+Wt:q(Se,hr,vt,Me,$t+Wt,_e,_e+ne,ne);const{scrollLeft:Et,scrollTop:wn}=ct;pt=Kt===0?0:Math.max(0,Math.min(wn+pt/Kt,ct.scrollHeight-It/Kt+Jt)),Nt=ln===0?0:Math.max(0,Math.min(Et+Nt/ln,ct.scrollWidth-vt/ln+Wt)),Ze+=wn-pt,_e+=Et-Nt}Zt.push({el:ct,top:pt,left:Nt})}return Zt},m=V=>V===!1?{block:"end",inline:"nearest"}:(v=>v===Object(v)&&Object.keys(v).length!==0)(V)?V:{block:"start",inline:"nearest"};function ce(V,v){if(!V.isConnected||!(pe=>{let ye=pe;for(;ye&&ye.parentNode;){if(ye.parentNode===document)return!0;ye=ye.parentNode instanceof ShadowRoot?ye.parentNode.host:ye.parentNode}return!1})(V))return;const xe=(pe=>{const ye=window.getComputedStyle(pe);return{top:parseFloat(ye.scrollMarginTop)||0,right:parseFloat(ye.scrollMarginRight)||0,bottom:parseFloat(ye.scrollMarginBottom)||0,left:parseFloat(ye.scrollMarginLeft)||0}})(V);if((pe=>typeof pe=="object"&&typeof pe.behavior=="function")(v))return v.behavior(E(V,v));const se=typeof v=="boolean"||v==null?void 0:v.behavior;for(const{el:pe,top:ye,left:we}of E(V,m(v))){const fe=ye-xe.top+xe.bottom,P=we-xe.left+xe.right;pe.scroll({top:fe,left:P,behavior:se})}}}}]);
|