aldehyde 0.2.32 → 0.2.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.022b9d9e54b55ad6267e.js +1 -0
- package/dist/bundle.022b9d9e54b55ad6267e.js.gz +0 -0
- package/dist/bundle.03c8826fed3306e7bca7.js +1 -0
- package/dist/bundle.17695fcdfc4d8b13d695.js +2 -0
- package/dist/bundle.17695fcdfc4d8b13d695.js.LICENSE.txt +8 -0
- package/dist/bundle.17695fcdfc4d8b13d695.js.gz +0 -0
- package/dist/bundle.1bc3fad9b6dda01db2dc.js +1 -0
- package/dist/bundle.1bc3fad9b6dda01db2dc.js.gz +0 -0
- package/dist/bundle.26e8ea213610dd77dfc5.js +2 -0
- package/dist/bundle.26e8ea213610dd77dfc5.js.LICENSE.txt +22 -0
- package/dist/bundle.26e8ea213610dd77dfc5.js.gz +0 -0
- package/dist/bundle.2e0aa3d0288f29cd9bdb.js +1 -0
- package/dist/bundle.2e0aa3d0288f29cd9bdb.js.gz +0 -0
- package/dist/bundle.3afd92d0051920d083b8.js +1 -0
- package/dist/bundle.3afd92d0051920d083b8.js.gz +0 -0
- package/dist/bundle.3b47a72a98819ce207b4.js +2 -0
- package/dist/bundle.3b47a72a98819ce207b4.js.LICENSE.txt +14 -0
- package/dist/bundle.3b47a72a98819ce207b4.js.gz +0 -0
- package/dist/bundle.4d91709f680596b4b0ac.js +2 -0
- package/dist/bundle.4d91709f680596b4b0ac.js.LICENSE.txt +9 -0
- package/dist/bundle.4d91709f680596b4b0ac.js.gz +0 -0
- package/dist/bundle.4e6573855d62c2c61293.js +1 -0
- package/dist/bundle.4e6573855d62c2c61293.js.gz +0 -0
- package/dist/bundle.51344a730efffedb67a3.js +2 -0
- package/dist/bundle.51344a730efffedb67a3.js.LICENSE.txt +8 -0
- package/dist/bundle.51344a730efffedb67a3.js.gz +0 -0
- package/dist/bundle.59446aa1a6e81028b0f3.js +1 -0
- package/dist/bundle.59446aa1a6e81028b0f3.js.gz +0 -0
- package/dist/bundle.5c631f42a0bc32bcee42.js +1 -0
- package/dist/bundle.5cc46bd3e80bed3462d0.js +2 -0
- package/dist/bundle.5cc46bd3e80bed3462d0.js.LICENSE.txt +1 -0
- package/dist/bundle.5cc46bd3e80bed3462d0.js.gz +0 -0
- package/dist/bundle.5fc1d01501a8fadd2680.js +2 -0
- package/dist/bundle.5fc1d01501a8fadd2680.js.LICENSE.txt +7 -0
- package/dist/bundle.5fc1d01501a8fadd2680.js.gz +0 -0
- package/dist/bundle.6bf28a6aa5ba025b9cbe.js +2 -0
- package/dist/bundle.6bf28a6aa5ba025b9cbe.js.LICENSE.txt +18 -0
- package/dist/bundle.6bf28a6aa5ba025b9cbe.js.gz +0 -0
- package/dist/bundle.6c63d1f8fd32a2e9ca6c.js +75 -0
- package/dist/bundle.6c63d1f8fd32a2e9ca6c.js.LICENSE.txt +17 -0
- package/dist/bundle.6c63d1f8fd32a2e9ca6c.js.gz +0 -0
- package/dist/bundle.75ca758485013fe73c8a.js +1 -0
- package/dist/bundle.75ca758485013fe73c8a.js.gz +0 -0
- package/dist/bundle.79c75972bdb84e2526a0.js +1 -0
- package/dist/bundle.79c75972bdb84e2526a0.js.gz +0 -0
- package/dist/bundle.7c07c768d6aa85f8cb7f.js +1 -0
- package/dist/bundle.7c07c768d6aa85f8cb7f.js.gz +0 -0
- package/dist/bundle.7e85c36e04f1428d40ae.js +2 -0
- package/dist/bundle.7e85c36e04f1428d40ae.js.LICENSE.txt +17 -0
- package/dist/bundle.7e85c36e04f1428d40ae.js.gz +0 -0
- package/dist/bundle.7fe4c9d6d1fad1b785b4.js +1 -0
- package/dist/bundle.7fe4c9d6d1fad1b785b4.js.gz +0 -0
- package/dist/bundle.8a46aaa80505db8f0a31.js +1 -0
- package/dist/bundle.8a46aaa80505db8f0a31.js.gz +0 -0
- package/dist/bundle.8a6c3026f7b0ad7bdc84.js +2 -0
- package/dist/bundle.8a6c3026f7b0ad7bdc84.js.LICENSE.txt +25 -0
- package/dist/bundle.8a6c3026f7b0ad7bdc84.js.gz +0 -0
- package/dist/bundle.9a888a685a8dc8795cb1.js +1 -0
- package/dist/bundle.9d12b63336a9c8d44a9d.js +1 -0
- package/dist/bundle.9d12b63336a9c8d44a9d.js.gz +0 -0
- package/dist/bundle.a7dfe1231cfa8ef5b0d3.js +2 -0
- package/dist/bundle.a7dfe1231cfa8ef5b0d3.js.LICENSE.txt +5 -0
- package/dist/bundle.a7dfe1231cfa8ef5b0d3.js.gz +0 -0
- package/dist/bundle.be6aaf07219b3f9a361f.js +1 -0
- package/dist/bundle.be6aaf07219b3f9a361f.js.gz +0 -0
- package/dist/bundle.c015ad492469b8a18b36.js +1 -0
- package/dist/bundle.c015ad492469b8a18b36.js.gz +0 -0
- package/dist/bundle.c31ad04e1e30564fea70.js +1 -0
- package/dist/bundle.c560447b006cce1238b6.js +2 -0
- package/dist/bundle.c560447b006cce1238b6.js.LICENSE.txt +1 -0
- package/dist/bundle.c560447b006cce1238b6.js.gz +0 -0
- package/dist/bundle.cad48ecfb6c9304f8477.js +2 -0
- package/dist/bundle.cad48ecfb6c9304f8477.js.LICENSE.txt +5 -0
- package/dist/bundle.cad48ecfb6c9304f8477.js.gz +0 -0
- package/dist/bundle.d7eaee8d9bcfcf8b0bd0.js +1 -0
- package/dist/bundle.d7eaee8d9bcfcf8b0bd0.js.gz +0 -0
- package/dist/bundle.d8256eaa6fe575fb9d01.js +8 -0
- package/dist/bundle.d8256eaa6fe575fb9d01.js.LICENSE.txt +8 -0
- package/dist/bundle.d8256eaa6fe575fb9d01.js.gz +0 -0
- package/dist/bundle.dbb253f3029c97475380.js +1 -0
- package/dist/bundle.dbb253f3029c97475380.js.gz +0 -0
- package/dist/bundle.df7845990c0fed52fca8.js +2 -0
- package/dist/bundle.df7845990c0fed52fca8.js.LICENSE.txt +29 -0
- package/dist/bundle.df7845990c0fed52fca8.js.gz +0 -0
- package/dist/bundle.e1ac7a74c5a25a07424c.js +1 -0
- package/dist/bundle.e1ac7a74c5a25a07424c.js.gz +0 -0
- package/dist/bundle.e9b7939a81971b04ce61.js +1 -0
- package/dist/bundle.e9b7939a81971b04ce61.js.gz +0 -0
- package/dist/bundle.eb8b12c34556f700f59a.js +2 -0
- package/dist/bundle.eb8b12c34556f700f59a.js.LICENSE.txt +30 -0
- package/dist/bundle.eb8b12c34556f700f59a.js.gz +0 -0
- package/dist/bundle.f4f8e071565f4dff4698.js +2 -0
- package/dist/bundle.f4f8e071565f4dff4698.js.LICENSE.txt +5 -0
- package/dist/bundle.f4f8e071565f4dff4698.js.gz +0 -0
- package/dist/css/chemstruc-graph-15d5053934e613f20d2b.css +11 -0
- package/dist/css/chemstruc-graph-15d5053934e613f20d2b.css.gz +0 -0
- package/dist/css/common-131a1a93b3a3dde25f8f.css +90 -0
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css +886 -0
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css.gz +0 -0
- package/dist/css/main-4bd110a5b2a4a3fbef88.css +803 -0
- package/dist/css/main-4bd110a5b2a4a3fbef88.css.gz +0 -0
- package/dist/images/development-30de07a0.png +0 -0
- package/dist/images/pain-point-8f02421e.png +0 -0
- package/dist/images/target-13a5b4b9.png +0 -0
- package/dist/images/time-cost-cb40d2c2.png +0 -0
- package/dist/images/time-prograss-44b86b36.png +0 -0
- package/dist/index.html +4 -0
- package/lib/controls/code-editor/sql-code-editor.d.ts.map +1 -1
- package/lib/controls/code-editor/sql-code-editor.js.map +1 -1
- package/lib/controls/date-picker/index.d.ts +2 -2
- package/lib/controls/entry-control.d.ts.map +1 -1
- package/lib/controls/entry-control.js +2 -2
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +3 -3
- package/lib/controls/view-control.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/layout/MainPage.js +1 -1
- package/lib/layout/MainPage.js.map +1 -1
- package/lib/layout/header/index.d.ts.map +1 -1
- package/lib/layout/header/index.js.map +1 -1
- package/lib/tmpl/superagent.d.ts.map +1 -1
- package/lib/tmpl/superagent.js +2 -1
- package/lib/tmpl/superagent.js.map +1 -1
- package/lib/welcome/workbench.js.map +1 -1
- package/package.json +2 -3
- package/src/aldehyde/controls/code-editor/sql-code-editor.tsx +1 -2
- package/src/aldehyde/controls/date-picker/index.tsx +2 -2
- package/src/aldehyde/controls/entry-control.tsx +4 -2
- package/src/aldehyde/controls/view-control.tsx +7 -6
- package/src/aldehyde/index.tsx +5 -2
- package/src/aldehyde/layout/MainPage.tsx +1 -1
- package/src/aldehyde/layout/header/index.tsx +0 -1
- package/src/aldehyde/tmpl/superagent.js +3 -1
- package/src/aldehyde/welcome/workbench.tsx +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[867],{34790:function(e,t,n){n.d(t,{B1:function(){return se},GA:function(){return H},Mb:function(){return a},eC:function(){return c},vQ:function(){return Z},ys:function(){return ie}});var o=n(78120),r=n(47421),i=n(59119);class s{constructor(e,t,n){this.state=e,this.pos=t,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let t=(0,i.qz)(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),o=t.text.slice(n-t.from,this.pos-t.from),r=o.search(h(e,!1));return r<0?null:{from:n+r,to:this.pos,text:o.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function l(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function a(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[n,o]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:o}of e){t[o[0]]=!0;for(let e=1;e<o.length;e++)n[o[e]]=!0}let o=l(t)+l(n)+"*$";return[new RegExp("^"+o),new RegExp(o)]}(t);return e=>{let r=e.matchBefore(o);return r||e.explicit?{from:r?r.from:e.pos,options:t,validFor:n}:null}}function c(e,t){return n=>{for(let t=(0,i.qz)(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}class u{constructor(e,t,n){this.completion=e,this.source=t,this.match=n}}function f(e){return e.selection.main.head}function h(e,t){var n;let{source:o}=e,r=t&&"^"!=o[0],i="$"!=o[o.length-1];return r||i?new RegExp(`${r?"^":""}(?:${o})${i?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const d=o.q6.define();function p(e,t){const n=t.completion.apply||t.completion.label;let r=t.source;var i,s,l,a;"string"==typeof n?e.dispatch(Object.assign(Object.assign({},(i=e.state,s=n,l=r.from,a=r.to,Object.assign(Object.assign({},i.changeByRange((e=>{if(e==i.selection.main)return{changes:{from:l,to:a,insert:s},range:o.jT.cursor(l+s.length)};let t=a-l;return!e.empty||t&&i.sliceDoc(e.from-t,e.from)!=i.sliceDoc(l,a)?{range:e}:{changes:{from:e.from-t,to:e.from,insert:s},range:o.jT.cursor(e.from-t+s.length)}}))),{userEvent:"input.complete"}))),{annotations:d.of(t.completion)})):n(e,t.completion,r.from,r.to)}const m=new WeakMap;function g(e){if(!Array.isArray(e))return e;let t=m.get(e);return t||m.set(e,t=a(e)),t}class v{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t<e.length;){let n=(0,o.gm)(e,t),r=(0,o.nZ)(n);this.chars.push(n);let i=e.slice(t,t+r),s=i.toUpperCase();this.folded.push((0,o.gm)(s==i?i.toLowerCase():s,0)),t+=r}this.astral=e.length!=this.chars.length}match(e){if(0==this.pattern.length)return[0];if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:s}=this;if(1==t.length){let r=(0,o.gm)(e,0),i=(0,o.nZ)(r),s=i==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;s+=-200}return[s,0,i]}let l=e.indexOf(this.pattern);if(0==l)return[e.length==this.pattern.length?0:-100,0,this.pattern.length];let a=t.length,c=0;if(l<0){for(let i=0,s=Math.min(e.length,200);i<s&&c<a;){let s=(0,o.gm)(e,i);s!=t[c]&&s!=n[c]||(r[c++]=i),i+=(0,o.nZ)(s)}if(c<a)return null}let u=0,f=0,h=!1,d=0,p=-1,m=-1,g=/[a-z]/.test(e),v=!0;for(let r=0,c=Math.min(e.length,200),k=0;r<c&&f<a;){let c=(0,o.gm)(e,r);l<0&&(u<a&&c==t[u]&&(i[u++]=r),d<a&&(c==t[d]||c==n[d]?(0==d&&(p=r),m=r+1,d++):d=0));let y,w=c<255?c>=48&&c<=57||c>=97&&c<=122?2:c>=65&&c<=90?1:0:(y=(0,o.bg)(c))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!r||1==w&&g||0==k&&0!=w)&&(t[f]==c||n[f]==c&&(h=!0)?s[f++]=r:s.length&&(v=!1)),k=w,r+=(0,o.nZ)(c)}return f==a&&0==s[0]&&v?this.result((h?-200:0)-100,s,e):d==a&&0==p?[-200-e.length+(m==e.length?0:-100),0,m]:l>-1?[-700-e.length,l,l+this.pattern.length]:d==a?[-900-e.length,p,m]:f==a?this.result((h?-200:0)-100-700+(v?0:-1100),s,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[e-n.length],i=1;for(let e of t){let t=e+(this.astral?(0,o.nZ)((0,o.gm)(n,e)):1);i>1&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return r}}const k=o.r$.define({combine(e){return(0,o.BO)(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>y(e(n),t(n)),optionClass:(e,t)=>n=>y(e(n),t(n)),addToOptions:(e,t)=>e.concat(t)})}});function y(e,t){return e?t?e+" "+t:e:t}function w(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let o=Math.floor((e-t)/n);return{from:e-(o+1)*n,to:e-o*n}}class b{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:e=>this.positionInfo(e),key:this},this.space=null,this.currentClass="";let n=e.state.field(t),{options:o,selected:r}=n.open,i=e.state.facet(k);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n){let o=document.createElement("span");o.className="cm-completionLabel";let{label:r}=e,i=0;for(let e=1;e<n.length;){let t=n[e++],s=n[e++];t>i&&o.appendChild(document.createTextNode(r.slice(i,t)));let l=o.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(r.slice(t,s))),l.className="cm-completionMatchedText",i=s}return i<r.length&&o.appendChild(document.createTextNode(r.slice(i))),o},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort(((e,t)=>e.position-t.position)).map((e=>e.render))}(i),this.optionClass=i.optionClass,this.tooltipClass=i.tooltipClass,this.range=w(o.length,r,i.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(t=>{for(let n,r=t.target;r&&r!=this.dom;r=r.parentNode)if("LI"==r.nodeName&&(n=/-(\d+)$/.exec(r.id))&&+n[1]<o.length)return p(e,o[+n[1]]),void t.preventDefault()})),this.list=this.dom.appendChild(this.createListBox(o,n.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))}mount(){this.updateSel()}update(e){var t,n,o;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);this.updateTooltipClass(e.state),r!=i&&(this.updateSel(),(null===(t=r.open)||void 0===t?void 0:t.disabled)!=(null===(n=i.open)||void 0===n?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(o=r.open)||void 0===o?void 0:o.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=w(t.options.length,t.selected,this.view.state.facet(k).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:n}=t.options[t.selected],{info:o}=n;if(!o)return;let i="string"==typeof o?document.createTextNode(o):o(n);if(!i)return;"then"in i?i.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t)})).catch((e=>(0,r.OO)(this.view.state,e,"completion info"))):this.addInfoPane(i)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,o=this.range.from;n;n=n.nextSibling,o++)o==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&function(e,t){let n=e.getBoundingClientRect(),o=t.getBoundingClientRect();o.top<n.top?e.scrollTop-=n.top-o.top:o.bottom>n.bottom&&(e.scrollTop+=o.bottom-n.bottom)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),o=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}if(o.top>Math.min(i.bottom,t.bottom)-10||o.bottom<Math.max(i.top,t.top)+10)return null;let s,l=this.view.textDirection==r.Nm.RTL,a=l,c=!1,u="",f="",h=t.left-i.left,d=i.right-t.right;if(a&&h<Math.min(n.width,d)?a=!1:!a&&d<Math.min(n.width,h)&&(a=!0),n.width<=(a?h:d))u=Math.max(i.top,Math.min(o.top,i.bottom-n.height))-t.top+"px",s=Math.min(400,a?h:d)+"px";else{c=!0,s=Math.min(400,(l?t.right:i.right-t.left)-30)+"px";let e=i.bottom-t.bottom;e>=n.height||e>t.top?u=o.bottom-t.top+"px":f=t.bottom-o.top+"px"}return{top:u,bottom:f,maxWidth:s,class:c?l?"left-narrow":"right-narrow":a?"left":"right"}}positionInfo(e){this.info&&(e?(this.info.style.top=e.top,this.info.style.bottom=e.bottom,this.info.style.maxWidth=e.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+e.class):this.info.style.top="-1e6px")}createListBox(e,t,n){const o=document.createElement("ul");o.id=t,o.setAttribute("role","listbox"),o.setAttribute("aria-expanded","true"),o.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let r=n.from;r<n.to;r++){let{completion:n,match:i}=e[r];const s=o.appendChild(document.createElement("li"));s.id=t+"-"+r,s.setAttribute("role","option");let l=this.optionClass(n);l&&(s.className=l);for(let e of this.optionContent){let t=e(n,this.view.state,i);t&&s.appendChild(t)}}return n.from&&o.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&o.classList.add("cm-completionListIncompleteBottom"),o}}function x(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class O{constructor(e,t,n,o,r,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=o,this.selected=r,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new O(this.options,A(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,o,r){let i=function(e,t){let n=[],o=0;for(let r of e)if(r.hasResult())if(!1===r.result.filter){let e=r.result.getMatch;for(let t of r.result.options){let i=[1e9-o++];if(e)for(let n of e(t))i.push(n);n.push(new u(t,r,i))}}else{let e,o=new v(t.sliceDoc(r.from,r.to));for(let t of r.result.options)(e=o.match(t.label))&&(null!=t.boost&&(e[0]+=t.boost),n.push(new u(t,r,e)))}let r=[],i=null,s=t.facet(k).compareCompletions;for(let e of n.sort(((e,t)=>t.match[0]-e.match[0]||s(e.completion,t.completion))))!i||i.label!=e.completion.label||i.detail!=e.completion.detail||null!=i.type&&null!=e.completion.type&&i.type!=e.completion.type||i.apply!=e.completion.apply?r.push(e):x(e.completion)>x(i)&&(r[r.length-1]=e),i=e.completion;return r}(e,t);if(!i.length)return o&&e.some((e=>1==e.state))?new O(o.options,o.attrs,o.tooltip,o.timestamp,o.selected,!0):null;let s=t.facet(k).selectOnOpen?0:-1;if(o&&o.selected!=s&&-1!=o.selected){let e=o.options[o.selected].completion;for(let t=0;t<i.length;t++)if(i[t].completion==e){s=t;break}}return new O(i,A(n,s),{pos:e.reduce(((e,t)=>t.hasResult()?Math.min(e,t.from):e),1e8),create:(l=j,e=>new b(e,l)),above:r.aboveCursor},o?o.timestamp:Date.now(),s,!1);var l}map(e){return new O(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class C{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new C(T,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(k),o=(n.override||t.languageDataAt("autocomplete",f(t)).map(g)).map((t=>(this.active.find((e=>e.source==t))||new D(t,this.active.some((e=>0!=e.state))?1:0)).update(e,n)));o.length==this.active.length&&o.every(((e,t)=>e==this.active[t]))&&(o=this.active);let r=this.open;r&&e.docChanged&&(r=r.map(e.changes)),e.selection||o.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let n=0,o=0;;){for(;n<e.length&&!e[n].hasResult;)n++;for(;o<t.length&&!t[o].hasResult;)o++;let r=n==e.length,i=o==t.length;if(r||i)return r==i;if(e[n++].result!=t[o++].result)return!1}}(o,this.active)?r=O.build(o,t,this.id,r,n):r&&r.disabled&&!o.some((e=>1==e.state))&&(r=null),!r&&o.every((e=>1!=e.state))&&o.some((e=>e.hasResult()))&&(o=o.map((e=>e.hasResult()?new D(e.source,0):e)));for(let t of e.effects)t.is(R)&&(r=r&&r.setSelected(t.value,this.id));return o==this.active&&r==this.open?this:new C(o,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:S}}const S={"aria-autocomplete":"list"};function A(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const T=[];function P(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class D{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=P(e),o=this;n?o=o.handleUserEvent(e,n,t):e.docChanged?o=o.handleChange(e):e.selection&&0!=o.state&&(o=new D(o.source,0));for(let t of e.effects)if(t.is(I))o=new D(o.source,1,t.value?f(e.state):-1);else if(t.is(Q))o=new D(o.source,0);else if(t.is(M))for(let e of t.value)e.source==o.source&&(o=e);return o}handleUserEvent(e,t,n){return"delete"!=t&&n.activateOnTyping?new D(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(f(e.startState))?new D(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new D(this.source,this.state,e.mapPos(this.explicitPos))}}class B extends D{constructor(e,t,n,o,r){super(e,2,t),this.result=n,this.from=o,this.to=r}hasResult(){return!0}handleUserEvent(e,t,n){var o;let r=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),l=f(e.state);if((this.explicitPos<0?l<=r:l<this.from)||l>i||"delete"==t&&f(e.startState)==this.from)return new D(this.source,"input"==t&&n.activateOnTyping?1:0);let a,c=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,o){if(!e)return!1;let r=t.sliceDoc(n,o);return"function"==typeof e?e(r,n,o,t):h(e,!0).test(r)}(this.result.validFor,e.state,r,i)?new B(this.source,c,this.result,r,i):this.result.update&&(a=this.result.update(this.result,r,i,new s(e.state,l,c>=0)))?new B(this.source,c,a,a.from,null!==(o=a.to)&&void 0!==o?o:f(e.state)):new D(this.source,1,c)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new D(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new B(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const I=o.Py.define(),Q=o.Py.define(),M=o.Py.define({map(e,t){return e.map((e=>e.map(t)))}}),R=o.Py.define(),j=o.QQ.define({create(){return C.start()},update(e,t){return e.update(t)},provide:e=>[r.hJ.from(e,(e=>e.tooltip)),r.tk.contentAttributes.from(e,(e=>e.attrs))]});function E(e,t="option"){return n=>{let o=n.state.field(j,!1);if(!o||!o.open||o.open.disabled||Date.now()-o.open.timestamp<n.state.facet(k).interactionDelay)return!1;let i,s=1;"page"==t&&(i=(0,r.gB)(n,o.open.tooltip))&&(s=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:l}=o.open.options,a=o.open.selected>-1?o.open.selected+s*(e?1:-1):e?0:l-1;return a<0?a="page"==t?0:l-1:a>=l&&(a="page"==t?l-1:0),n.dispatch({effects:R.of(a)}),!0}}class U{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const J=r.lg.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of e.state.field(j).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(j);if(!e.selectionSet&&!e.docChanged&&e.startState.field(j)==t)return;let n=e.transactions.some((e=>(e.selection||e.docChanged)&&!P(e)));for(let t=0;t<this.running.length;t++){let o=this.running[t];if(n||o.updates.length+e.transactions.length>50&&Date.now()-o.time>1e3){for(let e of o.context.abortListeners)try{e()}catch(e){(0,r.OO)(this.view.state,e)}o.context.abortListeners=null,this.running.splice(t--,1)}else o.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let t of e.transactions)"input"==P(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(j);for(let e of t.active)1!=e.state||this.running.some((t=>t.active.source==e.source))||this.startQuery(e)}startQuery(e){let{state:t}=this.view,n=f(t),o=new s(t,n,e.explicitPos==n),i=new U(e,o);this.running.push(i),Promise.resolve(e.source(o)).then((e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:Q.of(null)}),(0,r.OO)(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),50))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(k);for(let o=0;o<this.running.length;o++){let r=this.running[o];if(void 0===r.done)continue;if(this.running.splice(o--,1),r.done){let o=new B(r.active.source,r.active.explicitPos,r.done,r.done.from,null!==(e=r.done.to)&&void 0!==e?e:f(r.updates.length?r.updates[0].startState:this.view.state));for(let e of r.updates)o=o.update(e,n);if(o.hasResult()){t.push(o);continue}}let i=this.view.state.field(j).active.find((e=>e.source==r.active.source));if(i&&1==i.state)if(null==r.done){let e=new D(r.active.source,0);for(let t of r.updates)e=e.update(t,n);1!=e.state&&t.push(e)}else this.startQuery(i)}t.length&&this.view.dispatch({effects:M.of(t)})}},{eventHandlers:{blur(){let e=this.view.state.field(j,!1);e&&e.tooltip&&this.view.state.facet(k).closeOnBlur&&this.view.dispatch({effects:Q.of(null)})},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:I.of(!1)})),20),this.composing=0}}}),L=r.tk.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),N={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},$=o.Py.define({map(e,t){let n=t.mapPos(e,-1,o.gc.TrackAfter);return null==n?void 0:n}}),q=o.Py.define({map(e,t){return t.mapPos(e)}}),W=new class extends o.uU{};W.startSide=1,W.endSide=-1;const V=o.QQ.define({create(){return o.Xs.empty},update(e,t){if(t.selection){let n=t.state.doc.lineAt(t.selection.main.head).from,r=t.startState.doc.lineAt(t.startState.selection.main.head).from;n!=t.changes.mapPos(r,-1)&&(e=o.Xs.empty)}e=e.map(t.changes);for(let n of t.effects)n.is($)?e=e.update({add:[W.range(n.value,n.value+1)]}):n.is(q)&&(e=e.update({filter:e=>e!=n.value}));return e}});function Z(){return[G,V]}const z="()[]{}<>";function X(e){for(let t=0;t<z.length;t+=2)if(z.charCodeAt(t)==e)return z.charAt(t+1);return(0,o.bg)(e<128?e:e+1)}function _(e,t){return e.languageDataAt("closeBrackets",t)[0]||N}const F="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),G=r.tk.inputHandler.of(((e,t,n,r)=>{if((F?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==(0,o.nZ)((0,o.gm)(r,0))||t!=i.from||n!=i.to)return!1;let s=function(e,t){let n=_(e,e.selection.main.head),r=n.brackets||N.brackets;for(let i of r){let s=X((0,o.gm)(i,0));if(t==i)return s==i?ne(e,i,r.indexOf(i+i+i)>-1,n):ee(e,i,s,n.before||N.before);if(t==s&&Y(e,e.selection.main.from))return te(e,0,s)}return null}(e.state,r);return!!s&&(e.dispatch(s),!0)})),H=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=_(e,e.selection.main.head).brackets||N.brackets,r=null,i=e.changeByRange((t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return(0,o.nZ)((0,o.gm)(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let i of n)if(i==r&&K(e.doc,t.head)==X((0,o.gm)(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:o.jT.cursor(t.head-i.length)}}return{range:r=t}}));return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function Y(e,t){let n=!1;return e.field(V).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function K(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,o.nZ)((0,o.gm)(n,0)))}function ee(e,t,n,r){let i=null,s=e.changeByRange((s=>{if(!s.empty)return{changes:[{insert:t,from:s.from},{insert:n,from:s.to}],effects:$.of(s.to+t.length),range:o.jT.range(s.anchor+t.length,s.head+t.length)};let l=K(e.doc,s.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:t+n,from:s.head},effects:$.of(s.head+t.length),range:o.jT.cursor(s.head+t.length)}:{range:i=s}}));return i?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function te(e,t,n){let r=null,i=e.selection.ranges.map((t=>t.empty&&K(e.doc,t.head)==n?o.jT.cursor(t.head+n.length):r=t));return r?null:e.update({selection:o.jT.create(i,e.selection.mainIndex),scrollIntoView:!0,effects:e.selection.ranges.map((({from:e})=>q.of(e)))})}function ne(e,t,n,r){let s=r.stringPrefixes||N.stringPrefixes,l=null,a=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:$.of(r.to+t.length),range:o.jT.range(r.anchor+t.length,r.head+t.length)};let a,c=r.head,u=K(e.doc,c);if(u==t){if(oe(e,c))return{changes:{insert:t+t,from:c},effects:$.of(c+t.length),range:o.jT.cursor(c+t.length)};if(Y(e,c)){let r=n&&e.sliceDoc(c,c+3*t.length)==t+t+t;return{range:o.jT.cursor(c+t.length*(r?3:1)),effects:q.of(c)}}}else{if(n&&e.sliceDoc(c-2*t.length,c)==t+t&&(a=re(e,c-2*t.length,s))>-1&&oe(e,a))return{changes:{insert:t+t+t+t,from:c},effects:$.of(c+t.length),range:o.jT.cursor(c+t.length)};if(e.charCategorizer(c)(u)!=o.D0.Word&&re(e,c,s)>-1&&!function(e,t,n,o){let r=(0,i.qz)(e).resolveInner(t,-1),s=o.reduce(((e,t)=>Math.max(e,t.length)),0);for(let i=0;i<5;i++){let i=e.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),l=i.indexOf(n);if(!l||l>-1&&o.indexOf(i.slice(0,l))>-1){let t=r.firstChild;for(;t&&t.from==r.from&&t.to-t.from>n.length+l;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let a=r.to==t&&r.parent;if(!a)break;r=a}return!1}(e,c,t,s))return{changes:{insert:t+t,from:c},effects:$.of(c+t.length),range:o.jT.cursor(c+t.length)}}return{range:l=r}}));return l?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function oe(e,t){let n=(0,i.qz)(e).resolveInner(t+1);return n.parent&&n.from==t}function re(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=o.D0.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=o.D0.Word)return n}return-1}function ie(e={}){return[j,k.of(e),J,le,L]}const se=[{key:"Ctrl-Space",run:e=>!!e.state.field(j,!1)&&(e.dispatch({effects:I.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(j,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:Q.of(null)}),0))}},{key:"ArrowDown",run:E(!0)},{key:"ArrowUp",run:E(!1)},{key:"PageDown",run:E(!0,"page")},{key:"PageUp",run:E(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(j,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||Date.now()-t.open.timestamp<e.state.facet(k).interactionDelay||(t.open.disabled||p(e,t.open.options[t.open.selected]),0))}}],le=o.Wl.highest(r.$f.computeN([k],(e=>e.facet(k).defaultKeymap?[se]:[])))},21390:function(e,t,n){n.d(t,{i6:function(){return U}});var o=n(59119),r=n(35524),i=n(53105),s=n(34790);const l=20,a=21;function c(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function u(e,t,n){for(let o=!1;;){if(e.next<0)return;if(e.next==t&&!o)return void e.advance();o=n&&!o&&92==e.next,e.advance()}}function f(e,t){for(;95==e.next||c(e.next);)null!=t&&(t+=String.fromCharCode(e.next)),e.advance();return t}function h(e,t){for(;48==e.next||49==e.next;)e.advance();t&&e.next==t&&e.advance()}function d(e,t){for(;;){if(46==e.next){if(t)break;t=!0}else if(e.next<48||e.next>57)break;e.advance()}if(69==e.next||101==e.next)for(e.advance(),43!=e.next&&45!=e.next||e.advance();e.next>=48&&e.next<=57;)e.advance()}function p(e){for(;!(e.next<0||10==e.next);)e.advance()}function m(e,t){for(let n=0;n<t.length;n++)if(t.charCodeAt(n)==e)return!0;return!1}const g=" \t\r\n";function v(e,t,n){let o=Object.create(null);o.true=o.false=5,o.null=o.unknown=6;for(let t of e.split(" "))t&&(o[t]=l);for(let e of t.split(" "))e&&(o[e]=a);for(let e of(n||"").split(" "))e&&(o[e]=24);return o}const k={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',words:v("absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ","array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ")};function y(e){return new i.Jq((t=>{var n;let{next:o}=t;if(t.advance(),m(o,g)){for(;m(t.next,g);)t.advance();t.acceptToken(36)}else if(36==o&&36==t.next&&e.doubleDollarQuotedStrings)!function(e){for(;;){if(e.next<0||e.peek(1)<0)return;if(36==e.next&&36==e.peek(1))return void e.advance(2);e.advance()}}(t),t.acceptToken(3);else if(39==o||34==o&&e.doubleQuotedStrings)u(t,o,e.backslashEscapes),t.acceptToken(3);else if(35==o&&e.hashComments||47==o&&47==t.next&&e.slashComments)p(t),t.acceptToken(1);else if(45!=o||45!=t.next||e.spaceAfterDashes&&32!=t.peek(1))if(47==o&&42==t.next){t.advance();for(let e=-1,n=1;!(t.next<0);)if(t.advance(),42==e&&47==t.next){if(n--,!n){t.advance();break}e=-1}else 47==e&&42==t.next?(n++,e=-1):e=t.next;t.acceptToken(2)}else if(101!=o&&69!=o||39!=t.next)if(110!=o&&78!=o||39!=t.next||!e.charSetCasts)if(95==o&&e.charSetCasts)for(let n=0;;n++){if(39==t.next&&n>1){t.advance(),u(t,39,e.backslashEscapes),t.acceptToken(3);break}if(!c(t.next))break;t.advance()}else if(40==o)t.acceptToken(7);else if(41==o)t.acceptToken(8);else if(123==o)t.acceptToken(9);else if(125==o)t.acceptToken(10);else if(91==o)t.acceptToken(11);else if(93==o)t.acceptToken(12);else if(59==o)t.acceptToken(13);else if(e.unquotedBitLiterals&&48==o&&98==t.next)t.advance(),h(t),t.acceptToken(22);else if(98!=o&&66!=o||39!=t.next&&34!=t.next){if(48==o&&(120==t.next||88==t.next)||(120==o||88==o)&&39==t.next){let e=39==t.next;for(t.advance();(r=t.next)>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70;)t.advance();e&&39==t.next&&t.advance(),t.acceptToken(4)}else if(46==o&&t.next>=48&&t.next<=57)d(t,!0),t.acceptToken(4);else if(46==o)t.acceptToken(14);else if(o>=48&&o<=57)d(t,!1),t.acceptToken(4);else if(m(o,e.operatorChars)){for(;m(t.next,e.operatorChars);)t.advance();t.acceptToken(15)}else if(m(o,e.specialVar))t.next==o&&t.advance(),function(e){if(39==e.next||34==e.next||96==e.next){let t=e.next;e.advance(),u(e,t,!1)}else f(e)}(t),t.acceptToken(17);else if(m(o,e.identifierQuotes))u(t,o,!1),t.acceptToken(19);else if(58==o||44==o)t.acceptToken(16);else if(c(o)){let r=f(t,String.fromCharCode(o));t.acceptToken(46==t.next?18:null!==(n=e.words[r.toLowerCase()])&&void 0!==n?n:18)}}else{const n=t.next;t.advance(),e.treatBitsAsBytes?(u(t,n,e.backslashEscapes),t.acceptToken(23)):(h(t,n),t.acceptToken(22))}else t.advance(),u(t,39,e.backslashEscapes),t.acceptToken(3);else t.advance(),u(t,39,!0);else p(t),t.acceptToken(1);var r}))}const w=y(k),b=i.WQ.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,w],topRules:{Script:[0,25]},tokenPrec:0});function x(e){let t=e.cursor().moveTo(e.from,-1);for(;/Comment/.test(t.name);)t.moveTo(t.from,-1);return t.node}function O(e,t){let n=e.sliceString(t.from,t.to),o=/^([`'"])(.*)\1$/.exec(n);return o?o[2]:n}function C(e){return e&&("Identifier"==e.name||"QuotedIdentifier"==e.name)}function S(e,t){if("CompositeIdentifier"==t.name){let n=[];for(let o=t.firstChild;o;o=o.nextSibling)C(o)&&n.push(O(e,o));return n}return[O(e,t)]}function A(e,t){for(let n=[];;){if(!t||"."!=t.name)return n;let o=x(t);if(!C(o))return n;n.unshift(O(e,o)),t=x(o)}}const T=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" ")),P=/^\w*$/,D=/^[`'"]?\w*[`'"]?$/;class B{constructor(){this.list=[],this.children=void 0}child(e){let t=this.children||(this.children=Object.create(null));return t[e]||(t[e]=new B)}childCompletions(e){return this.children?Object.keys(this.children).filter((e=>e)).map((t=>({label:t,type:e}))):[]}}let I=b.configure({props:[o.uj.add({Statement:(0,o.tC)()}),o.x0.add({Statement(e){return{from:e.firstChild.to,to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}}),(0,r.Gv)({Keyword:r.pJ.keyword,Type:r.pJ.typeName,Builtin:r.pJ.standard(r.pJ.name),Bits:r.pJ.number,Bytes:r.pJ.string,Bool:r.pJ.bool,Null:r.pJ.null,Number:r.pJ.number,String:r.pJ.string,Identifier:r.pJ.name,QuotedIdentifier:r.pJ.special(r.pJ.string),SpecialVar:r.pJ.special(r.pJ.name),LineComment:r.pJ.lineComment,BlockComment:r.pJ.blockComment,Operator:r.pJ.operator,"Semi Punctuation":r.pJ.punctuation,"( )":r.pJ.paren,"{ }":r.pJ.brace,"[ ]":r.pJ.squareBracket})]});class Q{constructor(e,t){this.dialect=e,this.language=t}get extension(){return this.language.extension}static define(e){let t=function(e,t,n,o){let r={};for(let t in k)r[t]=(e.hasOwnProperty(t)?e:k)[t];return t&&(r.words=v(t,n||"",o)),r}(e,e.keywords,e.types,e.builtin),n=o.qp.define({name:"sql",parser:I.configure({tokenizers:[{from:w,to:y(t)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new Q(t,n)}}function M(e,t=!1){return function(e,t){let n=Object.keys(e).map((n=>({label:t?n.toUpperCase():n,type:e[n]==a?"type":e[n]==l?"keyword":"variable",boost:-1})));return(0,s.eC)(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],(0,s.Mb)(n))}(e.dialect.words,t)}function R(e,t=!1){return e.language.data.of({autocomplete:M(e,t)})}function j(e){return e.schema?function(e,t,n,r,i){let s=new B,l=s.child(i||"");for(let t in e){let n=t.indexOf(".");(n>-1?s.child(t.slice(0,n)):l).child(n>-1?t.slice(n+1):t).list=e[t].map((e=>"string"==typeof e?{label:e,type:"property"}:e))}l.list=(t||l.childCompletions("type")).concat(r?l.child(r).list:[]);for(let e in s.children){let t=s.child(e);t.list.length||(t.list=t.childCompletions("type"))}return s.list=l.list.concat(n||s.childCompletions("type")),e=>{let{parents:t,from:n,quoted:i,empty:a,aliases:c}=function(e,t){let n=(0,o.qz)(e).resolveInner(t,-1),r=function(e,t){let n;for(let e=t;!n;e=e.parent){if(!e)return null;"Statement"==e.name&&(n=e)}let o=null;for(let t=n.firstChild,r=!1,i=null;t;t=t.nextSibling){let n="Keyword"==t.name?e.sliceString(t.from,t.to).toLowerCase():null,s=null;if(r)if("as"==n&&i&&C(t.nextSibling))s=O(e,t.nextSibling);else{if(n&&T.has(n))break;i&&C(t)&&(s=O(e,t))}else r="from"==n;s&&(o||(o=Object.create(null)),o[s]=S(e,i)),i=/Identifier$/.test(t.name)?t:null}return o}(e.doc,n);return"Identifier"==n.name||"QuotedIdentifier"==n.name||"Keyword"==n.name?{from:n.from,quoted:"QuotedIdentifier"==n.name?e.doc.sliceString(n.from,n.from+1):null,parents:A(e.doc,x(n)),aliases:r}:"."==n.name?{from:t,quoted:null,parents:A(e.doc,n),aliases:r}:{from:t,quoted:null,parents:[],empty:!0,aliases:r}}(e.state,e.pos);if(a&&!e.explicit)return null;c&&1==t.length&&(t=c[t[0]]||t);let u=s;for(let e of t){for(;!u.children||!u.children[e];)if(u==s)u=l;else{if(u!=l||!r)return null;u=u.child(r)}u=u.child(e)}let f=i&&e.state.sliceDoc(e.pos,e.pos+1)==i,h=u.list;return u==s&&c&&(h=h.concat(Object.keys(c).map((e=>({label:e,type:"constant"}))))),{from:n,to:f?e.pos+1:void 0,options:(d=i,p=h,d?p.map((e=>Object.assign(Object.assign({},e),{label:d+e.label+d,apply:void 0}))):p),validFor:i?D:P};var d,p}}(e.schema,e.tables,e.schemas,e.defaultTable,e.defaultSchema):()=>null}function E(e){return e.schema?(e.dialect||J).language.data.of({autocomplete:j(e)}):[]}function U(e={}){let t=e.dialect||J;return new o.ri(t.language,[E(e),R(t,!!e.upperCaseKeywords)])}const J=Q.define({})},59119:function(e,t,n){n.d(t,{Gn:function(){return B},K0:function(){return D},R_:function(){return me},SS:function(){return P},Um:function(){return Pe},c:function(){return A},e7:function(){return K},mi:function(){return se},n$:function(){return Ce},nF:function(){return he},nY:function(){return L},qp:function(){return d},qz:function(){return p},ri:function(){return C},tC:function(){return U},uj:function(){return I},x0:function(){return $},y1:function(){return T}});var o,r=n(41113),i=n(78120),s=n(47421),l=n(35524),a=n(28699);const c=new r.md;const u=new r.md;class f{constructor(e,t,n=[],o=""){this.data=e,this.name=o,i.yy.prototype.hasOwnProperty("tree")||Object.defineProperty(i.yy.prototype,"tree",{get(){return p(this)}}),this.parser=t,this.extension=[O.of(this),i.yy.languageData.of(((e,t,n)=>{let o=h(e,t,n),r=o.type.prop(c);if(!r)return[];let i=e.facet(r),s=o.type.prop(u);if(s){let r=o.resolve(t-o.from,n);for(let t of s)if(t.test(r,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(i)}}return i}))].concat(n)}isActiveAt(e,t,n=-1){return h(e,t,n).type.prop(c)==this.data}findRegions(e){let t=e.facet(O);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],o=(e,t)=>{if(e.prop(c)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(r.md.mounted);if(i){if(i.tree.prop(c)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(o(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof r.mp&&o(i,e.positions[n]+t)}};return o(p(e),0),n}get allowsNesting(){return!0}}function h(e,t,n){let o=e.facet(O),i=p(e).topNode;if(!o||o.allowsNesting)for(let e=i;e;e=e.enter(t,n,r.vj.ExcludeBuffers))e.type.isTop&&(i=e);return i}f.setState=i.Py.define();class d extends f{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=(n=e.languageData,i.r$.define({combine:n?e=>e.concat(n):void 0}));var n;return new d(t,e.parser.configure({props:[c.add((e=>e.isTop?t:void 0))]}),e.name)}configure(e,t){return new d(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function p(e){let t=e.field(f.state,!1);return t?t.tree:r.mp.empty}class m{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let g=null;class v{constructor(e,t,n=[],o,r,i,s,l){this.parser=e,this.state=t,this.fragments=n,this.tree=o,this.treeLen=r,this.viewport=i,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new v(e,t,[],r.mp.empty,0,n,[],null)}startParse(){return this.parser.startParse(new m(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=r.mp.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let o=this.parse.advance();if(o){if(this.fragments=this.withoutTempSkipped(r.i9.addTree(o,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=o,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}}))}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(r.i9.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=g;g=this;try{return e()}finally{g=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=k(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:o,treeLen:i,viewport:s,skipped:l}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,o,r)=>t.push({fromA:e,toA:n,fromB:o,toB:r}))),n=r.i9.applyChanges(n,t),o=r.mp.empty,i=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){l=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),o=e.mapPos(t.to,-1);n<o&&l.push({from:n,to:o})}}}return new v(this.parser,t,n,o,i,s,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:o}=this.skipped[t];n<e.to&&o>e.from&&(this.fragments=k(this.fragments,n,o),this.skipped.splice(t--,1))}return!(this.skipped.length>=t||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends r._b{createParse(t,n,o){let i=o[0].from,s=o[o.length-1].to;return{parsedPos:i,advance(){let t=g;if(t){for(let e of o)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=s,new r.mp(r.Jq.none,[],[],s-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return g}}function k(e,t,n){return r.i9.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class y{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new y(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=v.create(e.facet(O).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new y(n)}}f.state=i.QQ.define({create:y.init,update(e,t){for(let e of t.effects)if(e.is(f.setState))return e.value;return t.startState.facet(O)!=t.state.facet(O)?y.init(t.state):e.apply(t)}});let w=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(w=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const b="undefined"!=typeof navigator&&(null===(o=navigator.scheduling)||void 0===o?void 0:o.isInputPending)?()=>navigator.scheduling.isInputPending():null,x=s.lg.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(f.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(f.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=w(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:o}}=this.view,r=n.field(f.state);if(r.tree==r.context.tree&&r.context.isDone(o+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,e&&!b?Math.max(25,e.timeRemaining()-5):1e9),s=r.context.treeLen<o&&n.doc.length>o+1e3,l=r.context.work((()=>b&&b()||Date.now()>i),o+(s?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:f.setState.of(new y(r.context))})),this.chunkBudget>0&&(!l||s)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>(0,s.OO)(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),O=i.r$.define({combine(e){return e.length?e[0]:null},enables:e=>[f.state,x,s.tk.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class C{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const S=i.r$.define(),A=i.r$.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function T(e){let t=e.facet(A);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function P(e,t){let n="",o=e.tabSize,r=e.facet(A)[0];if("\t"==r){for(;t>=o;)n+="\t",t-=o;r=" "}for(let e=0;e<t;e++)n+=r;return n}function D(e,t){e instanceof i.yy&&(e=new B(e));for(let n of e.state.facet(S)){let o=n(e,t);if(void 0!==o)return o}let n=p(e.state);return n?function(e,t,n){return M(t.resolveInner(n).enterUnfinishedNodesBefore(n),n,e)}(e,n,t):null}class B{constructor(e,t={}){this.state=e,this.options=t,this.unit=T(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:r}=this.options;return null!=o&&o>=n.from&&o<=n.to?r&&o==e?{text:"",from:e}:(t<0?o<e:o<=e)?{text:n.text.slice(o-n.from),from:o}:{text:n.text.slice(0,o-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:o}=this.lineAt(e,t);return n.slice(e-o,Math.min(n.length,e+100-o))}column(e,t=1){let{text:n,from:o}=this.lineAt(e,t),r=this.countColumn(n,e-o),i=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return i>-1&&(r+=i-this.countColumn(n,n.search(/\S|$/))),r}countColumn(e,t=e.length){return(0,i.IS)(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:o}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let e=r(o);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const I=new r.md;function Q(e){let t=e.type.prop(I);if(t)return t;let n,o=e.firstChild;if(o&&(n=o.type.prop(r.md.closedBy))){let t=e.lastChild,o=t&&n.indexOf(t.name)>-1;return e=>function(e,t,n,o,r){let i=e.textAfter,s=i.match(/^\s*/)[0].length,l=o&&i.slice(s,s+o.length)==o||r==e.pos+s,a=t?function(e){let t=e.node,n=t.childAfter(t.from),o=t.lastChild;if(!n)return null;let r=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),s=null==r||r<=i.from?i.to:Math.min(i.to,r);for(let e=n.to;;){let r=t.childAfter(e);if(!r||r==o)return null;if(!r.type.isSkipped)return r.from<s?n:null;e=r.to}}(e):null;return a?l?e.column(a.from):e.column(a.to):e.baseIndent+(l?0:e.unit*n)}(e,!0,1,void 0,o&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?R:null}function M(e,t,n){for(;e;e=e.parent){let o=Q(e);if(o)return o(j.create(n,t,e))}return null}function R(){return 0}class j extends B{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.node=n}static create(e,t,n){return new j(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(E(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?M(e,this.pos,this.base):0}}function E(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function U({except:e,units:t=1}={}){return n=>{let o=e&&e.test(n.textAfter);return n.baseIndent+(o?0:t*n.unit)}}const J=200;function L(){return i.yy.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:o}=e.newSelection.main,r=n.lineAt(o);if(o>r.from+J)return e;let i=n.sliceString(r.from,o);if(!t.some((e=>e.test(i))))return e;let{state:s}=e,l=-1,a=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==l)continue;l=t.from;let n=D(s,t.from);if(null==n)continue;let o=/^\s*/.exec(t.text)[0],r=P(s,n);o!=r&&a.push({from:t.from,to:t.from+o.length,insert:r})}return a.length?[e,{changes:a,sequential:!0}]:e}))}const N=i.r$.define(),$=new r.md;function q(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function W(e,t,n){for(let o of e.facet(N)){let r=o(e,t,n);if(r)return r}return function(e,t,n){let o=p(e);if(o.length<n)return null;let r=null;for(let i=o.resolveInner(n,1);i;i=i.parent){if(i.to<=n||i.from>n)continue;if(r&&i.from<t)break;let s=i.type.prop($);if(s&&(i.to<o.length-50||o.length==e.doc.length||!q(i))){let o=s(i,e);o&&o.from<=n&&o.from>=t&&o.to>n&&(r=o)}}return r}(e,t,n)}function V(e,t){let n=t.mapPos(e.from,1),o=t.mapPos(e.to,-1);return n>=o?void 0:{from:n,to:o}}const Z=i.Py.define({map:V}),z=i.Py.define({map:V});function X(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some((e=>e.from<=n&&e.to>=n))||t.push(e.lineBlockAt(n));return t}const _=i.QQ.define({create(){return s.p.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)n.is(Z)&&!G(e,n.value.from,n.value.to)?e=e.update({add:[oe.range(n.value.from,n.value.to)]}):n.is(z)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:o}=t.selection.main;e.between(o,o,((e,t)=>{e<o&&t>o&&(n=!0)})),n&&(e=e.update({filterFrom:o,filterTo:o,filter:(e,t)=>t<=o||e>=o}))}return e},provide:e=>s.tk.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,((e,t)=>{n.push(e,t)})),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let o=e[n++],r=e[n++];if("number"!=typeof o||"number"!=typeof r)throw new RangeError("Invalid JSON for fold state");t.push(oe.range(o,r))}return s.p.set(t,!0)}});function F(e,t,n){var o;let r=null;return null===(o=e.field(_,!1))||void 0===o||o.between(t,n,((e,t)=>{(!r||r.from>e)&&(r={from:e,to:t})})),r}function G(e,t,n){let o=!1;return e.between(t,t,((e,r)=>{e==t&&r==n&&(o=!0)})),o}function H(e,t){return e.field(_,!1)?t:t.concat(i.Py.appendConfig.of(ne()))}function Y(e,t,n=!0){let o=e.state.doc.lineAt(t.from).number,r=e.state.doc.lineAt(t.to).number;return s.tk.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${o} ${e.state.phrase("to")} ${r}.`)}const K=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of X(e)){let n=W(e.state,t.from,t.to);if(n)return e.dispatch({effects:H(e.state,[Z.of(n),Y(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(_,!1))return!1;let t=[];for(let n of X(e)){let o=F(e.state,n.from,n.to);o&&t.push(z.of(o),Y(e,o,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let o=0;o<t.doc.length;){let r=e.lineBlockAt(o),i=W(t,r.from,r.to);i&&n.push(Z.of(i)),o=(i?e.lineBlockAt(i.to):r).to+1}return n.length&&e.dispatch({effects:H(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(_,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,((e,t)=>{n.push(z.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],ee={placeholderDOM:null,placeholderText:"…"},te=i.r$.define({combine(e){return(0,i.BO)(e,ee)}});function ne(e){let t=[_,le];return e&&t.push(te.of(e)),t}const oe=s.p.replace({widget:new class extends s.l9{toDOM(e){let{state:t}=e,n=t.facet(te),o=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),o=F(e.state,n.from,n.to);o&&e.dispatch({effects:z.of(o)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,o);let r=document.createElement("span");return r.textContent=n.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=o,r}}}),re={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class ie extends s.SJ{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function se(e={}){let t=Object.assign(Object.assign({},re),e),n=new ie(t,!0),o=new ie(t,!1),r=s.lg.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(O)!=e.state.facet(O)||e.startState.field(_,!1)!=e.state.field(_,!1)||p(e.startState)!=p(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new i.f_;for(let r of e.viewportLineBlocks){let i=F(e.state,r.from,r.to)?o:W(e.state,r.from,r.to)?n:null;i&&t.add(r.from,r.from,i)}return t.finish()}}),{domEventHandlers:l}=t;return[r,(0,s.v5)({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.markers)||i.Xs.empty},initialSpacer(){return new ie(t,!1)},domEventHandlers:Object.assign(Object.assign({},l),{click:(e,t,n)=>{if(l.click&&l.click(e,t,n))return!0;let o=F(e.state,t.from,t.to);if(o)return e.dispatch({effects:z.of(o)}),!0;let r=W(e.state,t.from,t.to);return!!r&&(e.dispatch({effects:Z.of(r)}),!0)}})}),ne()]}const le=s.tk.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ae{constructor(e,t){let n;function o(e){let t=a.V.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const r="string"==typeof t.all?t.all:t.all?o(t.all):void 0,i=t.scope;this.scope=i instanceof f?e=>e.prop(c)==i.data:i?e=>e==i:void 0,this.style=(0,l.QR)(e.map((e=>({tag:e.tag,class:e.class||o(Object.assign({},e,{tag:null}))}))),{all:r}).style,this.module=n?new a.V(n):null,this.themeType=t.themeType}static define(e,t){return new ae(e,t||{})}}const ce=i.r$.define(),ue=i.r$.define({combine(e){return e.length?[e[0]]:null}});function fe(e){let t=e.facet(ce);return t.length?t:e.facet(ue)}function he(e,t){let n,o=[pe];return e instanceof ae&&(e.module&&o.push(s.tk.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?o.push(ue.of(e)):n?o.push(ce.computeN([s.tk.darkTheme],(t=>t.facet(s.tk.darkTheme)==("dark"==n)?[e]:[]))):o.push(ce.of(e)),o}class de{constructor(e){this.markCache=Object.create(null),this.tree=p(e.state),this.decorations=this.buildDeco(e,fe(e.state))}update(e){let t=p(e.state),n=fe(e.state),o=n!=fe(e.startState);t.length<e.view.viewport.to&&!o&&t.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(t!=this.tree||e.viewportChanged||o)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n))}buildDeco(e,t){if(!t||!this.tree.length)return s.p.none;let n=new i.f_;for(let{from:o,to:r}of e.visibleRanges)(0,l.bW)(this.tree,t,((e,t,o)=>{n.add(e,t,this.markCache[o]||(this.markCache[o]=s.p.mark({class:o})))}),o,r);return n.finish()}}const pe=i.Wl.high(s.lg.fromClass(de,{decorations:e=>e.decorations})),me=ae.define([{tag:l.pJ.meta,color:"#404740"},{tag:l.pJ.link,textDecoration:"underline"},{tag:l.pJ.heading,textDecoration:"underline",fontWeight:"bold"},{tag:l.pJ.emphasis,fontStyle:"italic"},{tag:l.pJ.strong,fontWeight:"bold"},{tag:l.pJ.strikethrough,textDecoration:"line-through"},{tag:l.pJ.keyword,color:"#708"},{tag:[l.pJ.atom,l.pJ.bool,l.pJ.url,l.pJ.contentSeparator,l.pJ.labelName],color:"#219"},{tag:[l.pJ.literal,l.pJ.inserted],color:"#164"},{tag:[l.pJ.string,l.pJ.deleted],color:"#a11"},{tag:[l.pJ.regexp,l.pJ.escape,l.pJ.special(l.pJ.string)],color:"#e40"},{tag:l.pJ.definition(l.pJ.variableName),color:"#00f"},{tag:l.pJ.local(l.pJ.variableName),color:"#30a"},{tag:[l.pJ.typeName,l.pJ.namespace],color:"#085"},{tag:l.pJ.className,color:"#167"},{tag:[l.pJ.special(l.pJ.variableName),l.pJ.macroName],color:"#256"},{tag:l.pJ.definition(l.pJ.propertyName),color:"#00c"},{tag:l.pJ.comment,color:"#940"},{tag:l.pJ.invalid,color:"#f00"}]),ge=s.tk.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),ve=1e4,ke="()[]{}",ye=i.r$.define({combine(e){return(0,i.BO)(e,{afterCursor:!0,brackets:ke,maxScanDistance:ve,renderMatch:xe})}}),we=s.p.mark({class:"cm-matchingBracket"}),be=s.p.mark({class:"cm-nonmatchingBracket"});function xe(e){let t=[],n=e.matched?we:be;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const Oe=[i.QQ.define({create(){return s.p.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],o=t.state.facet(ye);for(let e of t.state.selection.ranges){if(!e.empty)continue;let r=Pe(t.state,e.head,-1,o)||e.head>0&&Pe(t.state,e.head-1,1,o)||o.afterCursor&&(Pe(t.state,e.head,1,o)||e.head<t.state.doc.length&&Pe(t.state,e.head+1,-1,o));r&&(n=n.concat(o.renderMatch(r,t.state)))}return s.p.set(n,!0)},provide:e=>s.tk.decorations.from(e)}),ge];function Ce(e={}){return[ye.of(e),Oe]}const Se=new r.md;function Ae(e,t,n){let o=e.prop(t<0?r.md.openedBy:r.md.closedBy);if(o)return o;if(1==e.name.length){let o=n.indexOf(e.name);if(o>-1&&o%2==(t<0?1:0))return[n[o+t]]}return null}function Te(e){let t=e.type.prop(Se);return t?t(e.node):e}function Pe(e,t,n,o={}){let r=o.maxScanDistance||ve,i=o.brackets||ke,s=p(e),l=s.resolveInner(t,n);for(let e=l;e;e=e.parent){let o=Ae(e.type,n,i);if(o&&e.from<e.to){let r=Te(e);if(r&&(n>0?t>=r.from&&t<r.to:t>r.from&&t<=r.to))return De(0,0,n,e,r,o,i)}}return function(e,t,n,o,r,i,s){let l=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),a=s.indexOf(l);if(a<0||a%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),f=0;for(let e=0;!u.next().done&&e<=i;){let i=u.value;n<0&&(e+=i.length);let l=t+e*n;for(let e=n>0?0:i.length-1,t=n>0?i.length:-1;e!=t;e+=n){let t=s.indexOf(i[e]);if(!(t<0||o.resolveInner(l+e,1).type!=r))if(t%2==0==n>0)f++;else{if(1==f)return{start:c,end:{from:l+e,to:l+e+1},matched:t>>1==a>>1};f--}}n>0&&(e+=i.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,s,l.type,r,i)}function De(e,t,n,o,r,i,s){let l=o.parent,a={from:r.from,to:r.to},c=0,u=null==l?void 0:l.cursor();if(u&&(n<0?u.childBefore(o.from):u.childAfter(o.to)))do{if(n<0?u.to<=o.from:u.from>=o.to){if(0==c&&i.indexOf(u.type.name)>-1&&u.from<u.to){let e=Te(u);return{start:a,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(Ae(u.type,n,s))c++;else if(Ae(u.type,-n,s)){if(0==c){let e=Te(u);return{start:a,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:a,matched:!1}}const Be=Object.create(null),Ie=[r.Jq.none],Qe=[],Me=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Me[e]=je(Be,t);function Re(e,t){Qe.indexOf(e)>-1||(Qe.push(e),console.warn(t))}function je(e,t){let n=null;for(let o of t.split(".")){let t=e[o]||l.pJ[o];t?"function"==typeof t?n?n=t(n):Re(o,`Modifier ${o} used at start of tag`):n?Re(o,`Tag ${o} used as modifier`):n=t:Re(o,`Unknown highlighting tag ${o}`)}if(!n)return 0;let o=t.replace(/ /g,"_"),i=r.Jq.define({id:Ie.length,name:o,props:[(0,l.Gv)({[o]:n})]});return Ie.push(i),i.id}},7170:function(e,t,n){n.d(t,{Xy:function(){return st}});var o=n(47421),r=n(78120),i=n(59119),s=n(41113);function l(e,t){return({state:n,dispatch:o})=>{if(n.readOnly)return!1;let r=e(t,n);return!!r&&(o(n.update(r)),!0)}}const a=l(p,0),c=l(d,0),u=l(((e,t)=>d(e,t,function(e){let t=[];for(let n of e.selection.ranges){let o=e.doc.lineAt(n.from),r=n.to<=o.to?o:e.doc.lineAt(n.to),i=t.length-1;i>=0&&t[i].to>o.from?t[i].to=r.to:t.push({from:o.from,to:r.to})}return t}(t))),0);function f(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const h=50;function d(e,t,n=t.selection.ranges){let o=n.map((e=>f(t,e.from).block));if(!o.every((e=>e)))return null;let r=n.map(((e,n)=>function(e,{open:t,close:n},o,r){let i,s,l=e.sliceDoc(o-h,o),a=e.sliceDoc(r,r+h),c=/\s*$/.exec(l)[0].length,u=/^\s*/.exec(a)[0].length,f=l.length-c;if(l.slice(f-t.length,f)==t&&a.slice(u,u+n.length)==n)return{open:{pos:o-c,margin:c&&1},close:{pos:r+u,margin:u&&1}};r-o<=2*h?i=s=e.sliceDoc(o,r):(i=e.sliceDoc(o,o+h),s=e.sliceDoc(r-h,r));let d=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(s)[0].length,m=s.length-p-n.length;return i.slice(d,d+t.length)==t&&s.slice(m,m+n.length)==n?{open:{pos:o+d+t.length,margin:/\s/.test(i.charAt(d+t.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(s.charAt(m-1))?1:0}}:null}(t,o[n],e.from,e.to)));if(2!=e&&!r.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>r[t]?[]:[{from:e.from,insert:o[t].open+" "},{from:e.to,insert:" "+o[t].close}])))};if(1!=e&&r.some((e=>e))){let e=[];for(let t,n=0;n<r.length;n++)if(t=r[n]){let r=o[n],{open:i,close:s}=t;e.push({from:i.pos-r.open.length,to:i.pos+i.margin},{from:s.pos-s.margin,to:s.pos+r.close.length})}return{changes:e}}return null}function p(e,t,n=t.selection.ranges){let o=[],r=-1;for(let{from:e,to:i}of n){let n=o.length,s=1e9,l=f(t,e).line;if(l){for(let n=e;n<=i;){let a=t.doc.lineAt(n);if(a.from>r&&(e==i||i>a.from)){r=a.from;let e=/^\s*/.exec(a.text)[0].length,t=e==a.length,n=a.text.slice(e,e+l.length)==l?e:-1;e<a.text.length&&e<s&&(s=e),o.push({line:a,comment:n,token:l,indent:e,empty:t,single:!1})}n=a.to+1}if(s<1e9)for(let e=n;e<o.length;e++)o[e].indent<o[e].line.text.length&&(o[e].indent=s);o.length==n+1&&(o[n].single=!0)}}if(2!=e&&o.some((e=>e.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:r,empty:i,single:s}of o)!s&&i||e.push({from:t.from+r,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&o.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:n,token:r}of o)if(n>=0){let o=t.from+n,i=o+r.length;" "==t.text[i-t.from]&&i++,e.push({from:o,to:i})}return{changes:e}}return null}const m=r.q6.define(),g=r.q6.define(),v=r.r$.define(),k=r.r$.define({combine(e){return(0,r.BO)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,o)=>e(n,o)||t(n,o)})}}),y=r.QQ.define({create(){return E.empty},update(e,t){let n=t.state.facet(k),o=t.annotation(m);if(o){let i=t.docChanged?r.jT.single(function(e){let t=0;return e.iterChangedRanges(((e,n)=>t=n)),t}(t.changes)):void 0,s=A.fromTransaction(t,i),l=o.side,a=0==l?e.undone:e.done;return a=s?T(a,a.length,n.minDepth,s):I(a,t.startState.selection),new E(0==l?o.rest:a,0==l?a:o.rest)}let i=t.annotation(g);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(r.YW.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let s=A.fromTransaction(t),l=t.annotation(r.YW.time),a=t.annotation(r.YW.userEvent);return s?e=e.addChanges(s,l,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,l,a,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON(e){return{done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}},fromJSON(e){return new E(e.done.map(A.fromJSON),e.undone.map(A.fromJSON))}});function w(e={}){return[y,k.of(e),o.tk.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?x:"historyRedo"==e.inputType?O:null;return!!n&&(e.preventDefault(),n(t))}})]}function b(e,t){return function({state:n,dispatch:o}){if(!t&&n.readOnly)return!1;let r=n.field(y,!1);if(!r)return!1;let i=r.pop(e,n,t);return!!i&&(o(i),!0)}}const x=b(0,!1),O=b(1,!1),C=b(0,!0),S=b(1,!0);class A{constructor(e,t,n,o,r){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=o,this.selectionsAfter=r}setSelAfter(e){return new A(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new A(e.changes&&r.as.fromJSON(e.changes),[],e.mapped&&r.n0.fromJSON(e.mapped),e.startSelection&&r.jT.fromJSON(e.startSelection),e.selectionsAfter.map(r.jT.fromJSON))}static fromTransaction(e,t){let n=D;for(let t of e.startState.facet(v)){let o=t(e);o.length&&(n=n.concat(o))}return!n.length&&e.changes.empty?null:new A(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,D)}static selection(e){return new A(void 0,D,void 0,void 0,e)}}function T(e,t,n,o){let r=t+1>n+20?t-n-1:0,i=e.slice(r,t);return i.push(o),i}function P(e,t){return e.length?t.length?e.concat(t):e:t}const D=[],B=200;function I(e,t){if(e.length){let n=e[e.length-1],o=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-B));return o.length&&o[o.length-1].eq(t)?e:(o.push(t),T(e,e.length-1,1e9,n.setSelAfter(o)))}return[A.selection([t])]}function Q(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function M(e,t){if(!e.length)return e;let n=e.length,o=D;for(;n;){let r=R(e[n-1],t,o);if(r.changes&&!r.changes.empty||r.effects.length){let t=e.slice(0,n);return t[n-1]=r,t}t=r.mapped,n--,o=r.selectionsAfter}return o.length?[A.selection(o)]:D}function R(e,t,n){let o=P(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):D,n);if(!e.changes)return A.selection(o);let i=e.changes.map(t),s=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(s):s;return new A(i,r.Py.mapEffects(e.effects,t),l,e.startSelection.map(s),o)}const j=/^(input\.type|delete)($|\.)/;class E{constructor(e,t,n=0,o=undefined){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=o}isolate(){return this.prevTime?new E(this.done,this.undone):this}addChanges(e,t,n,o,r){let i=this.done,s=i[i.length-1];return i=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||j.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime<o.newGroupDelay&&o.joinToEvent(r,function(e,t){let n=[],o=!1;return e.iterChangedRanges(((e,t)=>n.push(e,t))),t.iterChangedRanges(((e,t,r,i)=>{for(let e=0;e<n.length;){let t=n[e++],s=n[e++];i>=t&&r<=s&&(o=!0)}})),o}(s.changes,e.changes))||"input.type.compose"==n)?T(i,i.length-1,o.minDepth,new A(e.changes.compose(s.changes),P(e.effects,s.effects),s.mapped,s.startSelection,D)):T(i,i.length,o.minDepth,e),new E(i,D,t,n)}addSelection(e,t,n,o){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:D;return r.length>0&&t-this.prevTime<o&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=r[r.length-1],s=e,i.ranges.length==s.ranges.length&&0===i.ranges.filter(((e,t)=>e.empty!=s.ranges[t].empty)).length)?this:new E(I(this.done,e),this.undone,t,n);var i,s}addMapping(e){return new E(M(this.done,e),M(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let o=0==e?this.done:this.undone;if(0==o.length)return null;let r=o[o.length-1];if(n&&r.selectionsAfter.length)return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:m.of({side:e,rest:Q(o)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let n=1==o.length?D:o.slice(0,o.length-1);return r.mapped&&(n=M(n,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:m.of({side:e,rest:n}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}E.empty=new E(D,D);const U=[{key:"Mod-z",run:x,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:O,preventDefault:!0},{linux:"Ctrl-Shift-z",run:O,preventDefault:!0},{key:"Mod-u",run:C,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:S,preventDefault:!0}];function J(e,t){return r.jT.create(e.ranges.map(t),e.mainIndex)}function L(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function N({state:e,dispatch:t},n){let o=J(e.selection,n);return!o.eq(e.selection)&&(t(L(e,o)),!0)}function $(e,t){return r.jT.cursor(t?e.to:e.from)}function q(e,t){return N(e,(n=>n.empty?e.moveByChar(n,t):$(n,t)))}function W(e){return e.textDirectionAt(e.state.selection.main.head)==o.Nm.LTR}const V=e=>q(e,!W(e)),Z=e=>q(e,W(e));function z(e,t){return N(e,(n=>n.empty?e.moveByGroup(n,t):$(n,t)))}function X(e,t,n){if(t.type.prop(n))return!0;let o=t.to-t.from;return o&&(o>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function _(e,t,n){let o,l,a=(0,i.qz)(e).resolveInner(t.head),c=n?s.md.closedBy:s.md.openedBy;for(let o=t.head;;){let t=n?a.childAfter(o):a.childBefore(o);if(!t)break;X(e,t,c)?a=t:o=n?t.to:t.from}return l=a.type.prop(c)&&(o=n?(0,i.Um)(e,a.from,1):(0,i.Um)(e,a.to,-1))&&o.matched?n?o.end.to:o.end.from:n?a.to:a.from,r.jT.cursor(l,n?-1:1)}function F(e,t){return N(e,(n=>{if(!n.empty)return $(n,t);let o=e.moveVertically(n,t);return o.head!=n.head?o:e.moveToLineBoundary(n,t)}))}const G=e=>F(e,!1),H=e=>F(e,!0);function Y(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){for(let t of e.state.facet(o.tk.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(i=Math.max(null==n?void 0:n.bottom,i))}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function K(e,t){let n,r=Y(e),{state:i}=e,s=J(i.selection,(n=>n.empty?e.moveVertically(n,t,r.height):$(n,t)));if(s.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),l=e.scrollDOM.getBoundingClientRect(),a=l.top+r.marginTop,c=l.bottom-r.marginBottom;t&&t.top>a&&t.bottom<c&&(n=o.tk.scrollIntoView(s.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(L(i,s),{effects:n}),!0}const ee=e=>K(e,!1),te=e=>K(e,!0);function ne(e,t,n){let o=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?o.to:o.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==o.from&&o.length){let n=/^\s*/.exec(e.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;n&&t.head!=o.from+n&&(i=r.jT.cursor(o.from+n))}return i}function oe(e,t){let n=J(e.state.selection,(e=>{let n=t(e);return r.jT.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(L(e.state,n)),!0)}function re(e,t){return oe(e,(n=>e.moveByChar(n,t)))}const ie=e=>re(e,!W(e)),se=e=>re(e,W(e));function le(e,t){return oe(e,(n=>e.moveByGroup(n,t)))}function ae(e,t){return oe(e,(n=>e.moveVertically(n,t)))}const ce=e=>ae(e,!1),ue=e=>ae(e,!0);function fe(e,t){return oe(e,(n=>e.moveVertically(n,t,Y(e).height)))}const he=e=>fe(e,!1),de=e=>fe(e,!0),pe=({state:e,dispatch:t})=>(t(L(e,{anchor:0})),!0),me=({state:e,dispatch:t})=>(t(L(e,{anchor:e.doc.length})),!0),ge=({state:e,dispatch:t})=>(t(L(e,{anchor:e.selection.main.anchor,head:0})),!0),ve=({state:e,dispatch:t})=>(t(L(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function ke(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:i}=e,s=i.changeByRange((o=>{let{from:i,to:s}=o;if(i==s){let o=t(i);o<i?(n="delete.backward",o=ye(e,o,!1)):o>i&&(n="delete.forward",o=ye(e,o,!0)),i=Math.min(i,o),s=Math.max(s,o)}else i=ye(e,i,!1),s=ye(e,s,!0);return i==s?{range:o}:{changes:{from:i,to:s},range:r.jT.cursor(i)}}));return!s.changes.empty&&(e.dispatch(i.update(s,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?o.tk.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function ye(e,t,n){if(e instanceof o.tk)for(let r of e.state.facet(o.tk.atomicRanges).map((t=>t(e))))r.between(t,t,((e,o)=>{e<t&&o>t&&(t=n?o:e)}));return t}const we=(e,t)=>ke(e,(n=>{let o,s,{state:l}=e,a=l.doc.lineAt(n);if(!t&&n>a.from&&n<a.from+200&&!/[^ \t]/.test(o=a.text.slice(0,n-a.from))){if("\t"==o[o.length-1])return n-1;let e=(0,r.IS)(o,l.tabSize)%(0,i.y1)(l)||(0,i.y1)(l);for(let t=0;t<e&&" "==o[o.length-1-t];t++)n--;s=n}else s=(0,r.cp)(a.text,n-a.from,t,t)+a.from,s==n&&a.number!=(t?l.doc.lines:1)&&(s+=t?1:-1);return s})),be=e=>we(e,!1),xe=e=>we(e,!0),Oe=(e,t)=>ke(e,(n=>{let o=n,{state:i}=e,s=i.doc.lineAt(o),l=i.charCategorizer(o);for(let e=null;;){if(o==(t?s.to:s.from)){o==n&&s.number!=(t?i.doc.lines:1)&&(o+=t?1:-1);break}let a=(0,r.cp)(s.text,o-s.from,t)+s.from,c=s.text.slice(Math.min(o,a)-s.from,Math.max(o,a)-s.from),u=l(c);if(null!=e&&u!=e)break;" "==c&&o==n||(e=u),o=a}return o})),Ce=e=>Oe(e,!1),Se=e=>ke(e,(t=>{let n=e.lineBlockAt(t).to;return t<n?n:Math.min(e.state.doc.length,t+1)}));function Ae(e){let t=[],n=-1;for(let o of e.selection.ranges){let r=e.doc.lineAt(o.from),i=e.doc.lineAt(o.to);if(o.empty||o.to!=i.from||(i=e.doc.lineAt(o.to-1)),n>=r.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(o)}else t.push({from:r.from,to:i.to,ranges:[o]});n=i.number+1}return t}function Te(e,t,n){if(e.readOnly)return!1;let o=[],i=[];for(let t of Ae(e)){if(n?t.to==e.doc.length:0==t.from)continue;let s=e.doc.lineAt(n?t.to+1:t.from-1),l=s.length+1;if(n){o.push({from:t.to,to:s.to},{from:t.from,insert:s.text+e.lineBreak});for(let n of t.ranges)i.push(r.jT.range(Math.min(e.doc.length,n.anchor+l),Math.min(e.doc.length,n.head+l)))}else{o.push({from:s.from,to:t.from},{from:t.to,insert:e.lineBreak+s.text});for(let e of t.ranges)i.push(r.jT.range(e.anchor-l,e.head-l))}}return!!o.length&&(t(e.update({changes:o,scrollIntoView:!0,selection:r.jT.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function Pe(e,t,n){if(e.readOnly)return!1;let o=[];for(let t of Ae(e))n?o.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):o.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const De=Be(!1);function Be(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let o=t.changeByRange((n=>{let{from:o,to:l}=n,a=t.doc.lineAt(o),c=!e&&o==l&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,o=(0,i.qz)(e).resolveInner(t),r=o.childBefore(t),l=o.childAfter(t);return r&&l&&r.to<=t&&l.from>=t&&(n=r.type.prop(s.md.closedBy))&&n.indexOf(l.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(l.from).from?{from:r.to,to:l.from}:null}(t,o);e&&(o=l=(l<=a.to?a:t.doc.lineAt(l)).to);let u=new i.Gn(t,{simulateBreak:o,simulateDoubleBreak:!!c}),f=(0,i.K0)(u,o);for(null==f&&(f=/^\s*/.exec(t.doc.lineAt(o).text)[0].length);l<a.to&&/\s/.test(a.text[l-a.from]);)l++;c?({from:o,to:l}=c):o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let h=["",(0,i.SS)(t,f)];return c&&h.push((0,i.SS)(t,u.lineIndent(a.from,-1))),{changes:{from:o,to:l,insert:r.xv.of(h)},range:r.jT.cursor(o+1+h[1].length)}}));return n(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}}function Ie(e,t){let n=-1;return e.changeByRange((o=>{let i=[];for(let r=o.from;r<=o.to;){let s=e.doc.lineAt(r);s.number>n&&(o.empty||o.to>s.from)&&(t(s,i,o),n=s.number),r=s.to+1}let s=e.changes(i);return{changes:i,range:r.jT.range(s.mapPos(o.anchor,1),s.mapPos(o.head,1))}}))}const Qe=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>N(e,(t=>_(e.state,t,!W(e)))),shift:e=>oe(e,(t=>_(e.state,t,!W(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>N(e,(t=>_(e.state,t,W(e)))),shift:e=>oe(e,(t=>_(e.state,t,W(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Te(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>Pe(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Te(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>Pe(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,o=null;return n.ranges.length>1?o=r.jT.create([n.main]):n.main.empty||(o=r.jT.create([r.jT.cursor(n.main.head)])),!!o&&(t(L(e,o)),!0)}},{key:"Mod-Enter",run:Be(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=Ae(e).map((({from:t,to:n})=>r.jT.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:r.jT.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=J(e.selection,(t=>{var n;let o=(0,i.qz)(e).resolveInner(t.head,1);for(;!(o.from<t.from&&o.to>=t.to||o.to>t.to&&o.from<=t.from)&&(null===(n=o.parent)||void 0===n?void 0:n.parent);)o=o.parent;return r.jT.range(o.to,o.from)}));return t(L(e,n)),!0},preventDefault:!0},{key:"Mod-[",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Ie(e,((t,n)=>{let o=/^\s*/.exec(t.text)[0];if(!o)return;let s=(0,r.IS)(o,e.tabSize),l=0,a=(0,i.SS)(e,Math.max(0,s-(0,i.y1)(e)));for(;l<o.length&&l<a.length&&o.charCodeAt(l)==a.charCodeAt(l);)l++;n.push({from:t.from+l,to:t.from+o.length,insert:a.slice(l)})})),{userEvent:"delete.dedent"})),!0)},{key:"Mod-]",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Ie(e,((t,n)=>{n.push({from:t.from,insert:e.facet(i.c)})})),{userEvent:"input.indent"})),!0)},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),o=new i.Gn(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),r=Ie(e,((t,r,s)=>{let l=(0,i.K0)(o,t.from);if(null==l)return;/\S/.test(t.text)||(l=0);let a=/^\s*/.exec(t.text)[0],c=(0,i.SS)(e,l);(a!=c||s.from<t.from+a.length)&&(n[t.from]=l,r.push({from:t.from,to:t.from+a.length,insert:c}))}));return r.changes.empty||t(e.update(r,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Ae(t).map((({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n})))),o=J(t.selection,(t=>e.moveVertically(t,!0))).map(n);return e.dispatch({changes:n,selection:o,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,n){let o=!1,s=J(e.selection,(t=>{let s=(0,i.Um)(e,t.head,-1)||(0,i.Um)(e,t.head,1)||t.head>0&&(0,i.Um)(e,t.head-1,1)||t.head<e.doc.length&&(0,i.Um)(e,t.head+1,-1);if(!s||!s.end)return t;o=!0;let l=s.start.from==t.head?s.end.to:s.end.from;return n?r.jT.range(t.anchor,l):r.jT.cursor(l)}));return!!o&&(t(L(e,s)),!0)}(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),o=f(e.state,n.from);return o.line?a(e):!!o.block&&u(e)}},{key:"Alt-A",run:c}].concat([{key:"ArrowLeft",run:V,shift:ie,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>z(e,!W(e)),shift:e=>le(e,!W(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>N(e,(t=>ne(e,t,!W(e)))),shift:e=>oe(e,(t=>ne(e,t,!W(e)))),preventDefault:!0},{key:"ArrowRight",run:Z,shift:se,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>z(e,W(e)),shift:e=>le(e,W(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>N(e,(t=>ne(e,t,W(e)))),shift:e=>oe(e,(t=>ne(e,t,W(e)))),preventDefault:!0},{key:"ArrowUp",run:G,shift:ce,preventDefault:!0},{mac:"Cmd-ArrowUp",run:pe,shift:ge},{mac:"Ctrl-ArrowUp",run:ee,shift:he},{key:"ArrowDown",run:H,shift:ue,preventDefault:!0},{mac:"Cmd-ArrowDown",run:me,shift:ve},{mac:"Ctrl-ArrowDown",run:te,shift:de},{key:"PageUp",run:ee,shift:he},{key:"PageDown",run:te,shift:de},{key:"Home",run:e=>N(e,(t=>ne(e,t,!1))),shift:e=>oe(e,(t=>ne(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:pe,shift:ge},{key:"End",run:e=>N(e,(t=>ne(e,t,!0))),shift:e=>oe(e,(t=>ne(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:me,shift:ve},{key:"Enter",run:De},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:be,shift:be},{key:"Delete",run:xe},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ce},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>Oe(e,!0)},{mac:"Mod-Backspace",run:e=>ke(e,(t=>{let n=e.lineBlockAt(t).from;return t>n?n:Math.max(0,t-1)}))},{mac:"Mod-Delete",run:Se}].concat([{key:"Ctrl-b",run:V,shift:ie,preventDefault:!0},{key:"Ctrl-f",run:Z,shift:se},{key:"Ctrl-p",run:G,shift:ce},{key:"Ctrl-n",run:H,shift:ue},{key:"Ctrl-a",run:e=>N(e,(t=>r.jT.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>oe(e,(t=>r.jT.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>N(e,(t=>r.jT.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>oe(e,(t=>r.jT.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:xe},{key:"Ctrl-h",run:be},{key:"Ctrl-k",run:Se},{key:"Ctrl-Alt-h",run:Ce},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:r.xv.of(["",""])},range:r.jT.cursor(e.from)})));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,o=e.doc.lineAt(n),i=n==o.from?n-1:(0,r.cp)(o.text,n-o.from,!1)+o.from,s=n==o.to?n+1:(0,r.cp)(o.text,n-o.from,!0)+o.from;return{changes:{from:i,to:s,insert:e.doc.slice(n,s).append(e.doc.slice(i,n))},range:r.jT.cursor(s)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:te}].map((e=>({mac:e.key,run:e.run,shift:e.shift})))));var Me=n(49892),Re=n(34790),je=n(39306);class Ee{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class Ue{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(He).markerFilter;i&&(r=i(r));let s=o.p.set(r.map((e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?o.p.widget({widget:new et(e),diagnostic:e}).range(e.from):o.p.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity},diagnostic:e}).range(e.from,e.to))),!0);return new Ue(s,t,Je(s))}}function Je(e,t=null,n=0){let o=null;return e.between(n,1e9,((e,n,{spec:r})=>{if(!t||r.diagnostic==t)return o=new Ee(e,n,r.diagnostic),!1})),o}function Le(e,t){return!(!e.effects.some((e=>e.is($e)))&&!e.changes.touchesRange(t.pos))}function Ne(e,t){return e.field(Ve,!1)?t:t.concat(r.Py.appendConfig.of([Ve,o.tk.decorations.compute([Ve],(e=>{let{selected:t,panel:n}=e.field(Ve);return t&&n&&t.from!=t.to?o.p.set([Ze.range(t.from,t.to)]):o.p.none})),(0,o.bF)(ze,{hideOn:Le}),rt]))}const $e=r.Py.define(),qe=r.Py.define(),We=r.Py.define(),Ve=r.QQ.define({create(){return new Ue(o.p.none,null,null)},update(e,t){if(t.docChanged){let n=e.diagnostics.map(t.changes),o=null;if(e.selected){let r=t.changes.mapPos(e.selected.from,1);o=Je(n,e.selected.diagnostic,r)||Je(n,null,r)}e=new Ue(n,e.panel,o)}for(let n of t.effects)n.is($e)?e=Ue.init(n.value,e.panel,t.state):n.is(qe)?e=new Ue(e.diagnostics,n.value?nt.open:null,e.selected):n.is(We)&&(e=new Ue(e.diagnostics,e.panel,n.value));return e},provide:e=>[o.mH.from(e,(e=>e.panel)),o.tk.decorations.from(e,(e=>e.diagnostics))]}),Ze=o.p.mark({class:"cm-lintRange cm-lintRange-active"});function ze(e,t,n){let{diagnostics:o}=e.state.field(Ve),r=[],i=2e8,s=0;o.between(t-(n<0?1:0),t+(n>0?1:0),((e,o,{spec:l})=>{t>=e&&t<=o&&(e==o||(t>e||n>0)&&(t<o||n<0))&&(r.push(l.diagnostic),i=Math.min(e,i),s=Math.max(o,s))}));let l=e.state.facet(He).tooltipFilter;return l&&(r=l(r)),r.length?{pos:i,end:s,above:e.state.doc.lineAt(i).to<s,create(){return{dom:Xe(e,r)}}}:null}function Xe(e,t){return(0,je.Z)("ul",{class:"cm-tooltip-lint"},t.map((t=>Ke(e,t,!1))))}const _e=e=>{let t=e.state.field(Ve,!1);return!(!t||!t.panel||(e.dispatch({effects:qe.of(!1)}),0))},Fe=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(Ve,!1);t&&t.panel||e.dispatch({effects:Ne(e.state,[qe.of(!0)])});let n=(0,o.Sd)(e,nt.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(Ve,!1);if(!t)return!1;let n=e.state.selection.main,o=t.diagnostics.iter(n.to+1);return!(!o.value&&(o=t.diagnostics.iter(0),!o.value||o.from==n.from&&o.to==n.to)||(e.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0}),0))}}],Ge=o.lg.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(He);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){let e=Date.now();if(e<this.lintTime-10)setTimeout(this.run,this.lintTime-e);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(He);Promise.all(t.map((e=>Promise.resolve(e(this.view))))).then((t=>{let n=t.reduce(((e,t)=>e.concat(t)));this.view.state.doc==e.doc&&this.view.dispatch(function(e,t){return{effects:Ne(e,[$e.of(t)])}}(this.view.state,n))}),(e=>{(0,o.OO)(this.view.state,e)}))}}update(e){let t=e.state.facet(He);(e.docChanged||t!=e.startState.facet(He)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),He=r.r$.define({combine(e){return Object.assign({sources:e.map((e=>e.source))},(0,r.BO)(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))},enables:Ge});function Ye(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;e<n.length;e++){let o=n[e];if(/[a-zA-Z]/.test(o)&&!t.some((e=>e.toLowerCase()==o.toLowerCase()))){t.push(o);continue e}}t.push("")}return t}function Ke(e,t,n){var o;let r=n?Ye(t.actions):[];return(0,je.Z)("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},(0,je.Z)("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(o=t.actions)||void 0===o?void 0:o.map(((n,o)=>{let i=!1,s=o=>{if(o.preventDefault(),i)return;i=!0;let r=Je(e.state.field(Ve).diagnostics,t);r&&n.apply(e,r.from,r.to)},{name:l}=n,a=r[o]?l.indexOf(r[o]):-1,c=a<0?l:[l.slice(0,a),(0,je.Z)("u",l.slice(a,a+1)),l.slice(a+1)];return(0,je.Z)("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${l}${a<0?"":` (access key "${r[o]})"`}.`},c)})),t.source&&(0,je.Z)("div",{class:"cm-diagnosticSource"},t.source))}class et extends o.l9{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return(0,je.Z)("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class tt{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Ke(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class nt{constructor(e){this.view=e,this.items=[],this.list=(0,je.Z)("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)_e(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],o=Ye(n.actions);for(let r=0;r<o.length;r++)if(o[r].toUpperCase().charCodeAt(0)==t.keyCode){let t=Je(this.view.state.field(Ve).diagnostics,n);t&&n.actions[r].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=(0,je.Z)("div",{class:"cm-panel-lint"},this.list,(0,je.Z)("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>_e(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ve).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Ve),n=0,o=!1,r=null;for(e.between(0,this.view.state.doc.length,((e,i,{spec:s})=>{let l,a=-1;for(let e=n;e<this.items.length;e++)if(this.items[e].diagnostic==s.diagnostic){a=e;break}a<0?(l=new tt(this.view,s.diagnostic),this.items.splice(n,0,l),o=!0):(l=this.items[a],a>n&&(this.items.splice(n,a-n),o=!0)),t&&l.diagnostic==t.diagnostic?l.dom.hasAttribute("aria-selected")||(l.dom.setAttribute("aria-selected","true"),r=l):l.dom.hasAttribute("aria-selected")&&l.dom.removeAttribute("aria-selected"),n++}));n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)o=!0,this.items.pop();0==this.items.length&&(this.items.push(new tt(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),o=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{e.top<t.top?this.list.scrollTop-=t.top-e.top:e.bottom>t.bottom&&(this.list.scrollTop+=e.bottom-t.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=Je(this.view.state.field(Ve).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:We.of(t)})}static open(e){return new nt(e)}}function ot(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const rt=o.tk.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:ot("#d11")},".cm-lintRange-warning":{backgroundImage:ot("orange")},".cm-lintRange-info":{backgroundImage:ot("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});class it extends o.SJ{constructor(e){super(),this.diagnostics=e,this.severity=e.reduce(((e,t)=>{let n=t.severity;return"error"==n||"warning"==n&&"info"==e?n:e}),"info")}toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,o=e.state.facet(lintGutterConfig).tooltipFilter;return o&&o(n),n.length&&(t.onmouseover=()=>function(e,t,n){function o(){let o=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(o.from)&&e.dispatch({effects:setLintGutterTooltip.of({pos:o.from,above:!1,create(){return{dom:Xe(e,n),getCoords:()=>t.getBoundingClientRect()}}})}),t.onmouseout=t.onmousemove=null,function(e,t){let n=o=>{let r=t.getBoundingClientRect();if(!(o.clientX>r.left-10&&o.clientX<r.right+10&&o.clientY>r.top-10&&o.clientY<r.bottom+10)){for(let e=o.target;e;e.parentNode)if(1==e.nodeType&&e.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",n),e.state.field(lintGutterTooltip)&&e.dispatch({effects:setLintGutterTooltip.of(null)})}};window.addEventListener("mousemove",n)}(e,t)}let{hoverTime:r}=e.state.facet(lintGutterConfig),i=setTimeout(o,r);t.onmouseout=()=>{clearTimeout(i),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(i),setTimeout(o,r)}}(e,t,n)),t}}const st=(()=>[(0,o.Eu)(),(0,o.HQ)(),(0,o.AE)(),w(),(0,i.mi)(),(0,o.Uw)(),(0,o.qr)(),r.yy.allowMultipleSelections.of(!0),(0,i.nY)(),(0,i.nF)(i.R_,{fallback:!0}),(0,i.n$)(),(0,Re.vQ)(),(0,Re.ys)(),(0,o.Zs)(),(0,o.S2)(),(0,o.ZO)(),(0,Me.sW)(),o.$f.of([...Re.GA,...Qe,...Me.Lp,...U,...i.e7,...Re.B1,...Fe])])()}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[309],{38828:function(e,n,t){t.d(n,{Z:function(){return S}});var r=t(87462),o=t(4942),a=t(71002),i=t(29439),u=t(45987),l=t(67294),c=t(94184),s=t.n(c),f=t(15105),d=t(8410),p=t(42550),v=t(98847),m=t(55252),h=t(42048),g=t(38182);function y(e){var n=e.prefixCls,t=e.upNode,a=e.downNode,i=e.upDisabled,u=e.downDisabled,c=e.onStep,f=l.useRef(),d=l.useRef();d.current=c;var p=function(e,n){e.preventDefault(),d.current(n),f.current=setTimeout((function e(){d.current(n),f.current=setTimeout(e,200)}),600)},v=function(){clearTimeout(f.current)};if(l.useEffect((function(){return v}),[]),(0,g.Z)())return null;var m="".concat(n,"-handler"),h=s()(m,"".concat(m,"-up"),(0,o.Z)({},"".concat(m,"-up-disabled"),i)),y=s()(m,"".concat(m,"-down"),(0,o.Z)({},"".concat(m,"-down-disabled"),u)),Z={unselectable:"on",role:"button",onMouseUp:v,onMouseLeave:v};return l.createElement("div",{className:"".concat(m,"-wrap")},l.createElement("span",(0,r.Z)({},Z,{onMouseDown:function(e){p(e,!0)},"aria-label":"Increase Value","aria-disabled":i,className:h}),t||l.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner")})),l.createElement("span",(0,r.Z)({},Z,{onMouseDown:function(e){p(e,!1)},"aria-label":"Decrease Value","aria-disabled":u,className:y}),a||l.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner")})))}function Z(e){var n="number"==typeof e?(0,m.vP)(e):(0,m._V)(e).fullStr;return n.includes(".")?(0,m._V)(n.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var b=t(80334),C=t(75164),E=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],w=function(e,n){return e||n.isEmpty()?n.toString():n.toNumber()},N=function(e){var n=(0,v.ZP)(e);return n.isInvalidate()?null:n},x=l.forwardRef((function(e,n){var t,c=e.prefixCls,g=void 0===c?"rc-input-number":c,x=e.className,S=e.style,k=e.min,P=e.max,I=e.step,R=void 0===I?1:I,M=e.defaultValue,D=e.value,T=e.disabled,O=e.readOnly,K=e.upHandler,A=e.downHandler,V=e.keyboard,L=e.controls,_=void 0===L||L,z=e.stringMode,F=e.parser,j=e.formatter,W=e.precision,H=e.decimalSeparator,B=e.onChange,U=e.onInput,Y=e.onPressEnter,G=e.onStep,J=(0,u.Z)(e,E),q="".concat(g,"-input"),X=l.useRef(null),Q=l.useState(!1),$=(0,i.Z)(Q,2),ee=$[0],ne=$[1],te=l.useRef(!1),re=l.useRef(!1),oe=l.useRef(!1),ae=l.useState((function(){return(0,v.ZP)(null!=D?D:M)})),ie=(0,i.Z)(ae,2),ue=ie[0],le=ie[1],ce=l.useCallback((function(e,n){if(!n)return W>=0?W:Math.max((0,m.NX)(e),(0,m.NX)(R))}),[W,R]),se=l.useCallback((function(e){var n=String(e);if(F)return F(n);var t=n;return H&&(t=t.replace(H,".")),t.replace(/[^\w.-]+/g,"")}),[F,H]),fe=l.useRef(""),de=l.useCallback((function(e,n){if(j)return j(e,{userTyping:n,input:String(fe.current)});var t="number"==typeof e?(0,m.vP)(e):e;if(!n){var r=ce(t,n);if((0,m.mE)(t)&&(H||r>=0)){var o=H||".";t=(0,h.FH)(t,o,r)}}return t}),[j,ce,H]),pe=l.useState((function(){var e=null!=M?M:D;return ue.isInvalidate()&&["string","number"].includes((0,a.Z)(e))?Number.isNaN(e)?"":e:de(ue.toString(),!1)})),ve=(0,i.Z)(pe,2),me=ve[0],he=ve[1];function ge(e,n){he(de(e.isInvalidate()?e.toString(!1):e.toString(!n),n))}fe.current=me;var ye,Ze,be,Ce,Ee,we=l.useMemo((function(){return N(P)}),[P,W]),Ne=l.useMemo((function(){return N(k)}),[k,W]),xe=l.useMemo((function(){return!(!we||!ue||ue.isInvalidate())&&we.lessEquals(ue)}),[we,ue]),Se=l.useMemo((function(){return!(!Ne||!ue||ue.isInvalidate())&&ue.lessEquals(Ne)}),[Ne,ue]),ke=(ye=X.current,Ze=ee,be=(0,l.useRef)(null),[function(){try{var e=ye.selectionStart,n=ye.selectionEnd,t=ye.value,r=t.substring(0,e),o=t.substring(n);be.current={start:e,end:n,value:t,beforeTxt:r,afterTxt:o}}catch(e){}},function(){if(ye&&be.current&&Ze)try{var e=ye.value,n=be.current,t=n.beforeTxt,r=n.afterTxt,o=n.start,a=e.length;if(e.endsWith(r))a=e.length-be.current.afterTxt.length;else if(e.startsWith(t))a=t.length;else{var i=t[o-1],u=e.indexOf(i,o-1);-1!==u&&(a=u+1)}ye.setSelectionRange(a,a)}catch(e){(0,b.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(e.message))}}]),Pe=(0,i.Z)(ke,2),Ie=Pe[0],Re=Pe[1],Me=function(e){return we&&!e.lessEquals(we)?we:Ne&&!Ne.lessEquals(e)?Ne:null},De=function(e){return!Me(e)},Te=function(e,n){var t=e,r=De(t)||t.isEmpty();if(t.isEmpty()||n||(t=Me(t)||t,r=!0),!O&&!T&&r){var o=t.toString(),a=ce(o,n);return a>=0&&(t=(0,v.ZP)((0,h.FH)(o,".",a)),De(t)||(t=(0,v.ZP)((0,h.FH)(o,".",a,!0)))),t.equals(ue)||(void 0===D&&le(t),null==B||B(t.isEmpty()?null:w(z,t)),void 0===D&&ge(t,n)),t}return ue},Oe=(Ce=(0,l.useRef)(0),Ee=function(){C.Z.cancel(Ce.current)},(0,l.useEffect)((function(){return Ee}),[]),function(e){Ee(),Ce.current=(0,C.Z)((function(){e()}))}),Ke=function e(n){if(Ie(),he(n),!re.current){var t=se(n),r=(0,v.ZP)(t);r.isNaN()||Te(r,!0)}null==U||U(n),Oe((function(){var t=n;F||(t=n.replace(/。/g,".")),t!==n&&e(t)}))},Ae=function(e){var n;if(!(e&&xe||!e&&Se)){te.current=!1;var t=(0,v.ZP)(oe.current?Z(R):R);e||(t=t.negate());var r=(ue||(0,v.ZP)(0)).add(t.toString()),o=Te(r,!1);null==G||G(w(z,o),{offset:oe.current?Z(R):R,type:e?"up":"down"}),null===(n=X.current)||void 0===n||n.focus()}},Ve=function(e){var n=(0,v.ZP)(se(me)),t=n;t=n.isNaN()?ue:Te(n,e),void 0!==D?ge(ue,!1):t.isNaN()||ge(t,!1)};return(0,d.o)((function(){ue.isInvalidate()||ge(ue,!1)}),[W]),(0,d.o)((function(){var e=(0,v.ZP)(D);le(e);var n=(0,v.ZP)(se(me));e.equals(n)&&te.current&&!j||ge(e,te.current)}),[D]),(0,d.o)((function(){j&&Re()}),[me]),l.createElement("div",{className:s()(g,x,(t={},(0,o.Z)(t,"".concat(g,"-focused"),ee),(0,o.Z)(t,"".concat(g,"-disabled"),T),(0,o.Z)(t,"".concat(g,"-readonly"),O),(0,o.Z)(t,"".concat(g,"-not-a-number"),ue.isNaN()),(0,o.Z)(t,"".concat(g,"-out-of-range"),!ue.isInvalidate()&&!De(ue)),t)),style:S,onFocus:function(){ne(!0)},onBlur:function(){Ve(!1),ne(!1),te.current=!1},onKeyDown:function(e){var n=e.which,t=e.shiftKey;te.current=!0,oe.current=!!t,n===f.Z.ENTER&&(re.current||(te.current=!1),Ve(!1),null==Y||Y(e)),!1!==V&&!re.current&&[f.Z.UP,f.Z.DOWN].includes(n)&&(Ae(f.Z.UP===n),e.preventDefault())},onKeyUp:function(){te.current=!1,oe.current=!1},onCompositionStart:function(){re.current=!0},onCompositionEnd:function(){re.current=!1,Ke(X.current.value)},onBeforeInput:function(){te.current=!0}},_&&l.createElement(y,{prefixCls:g,upNode:K,downNode:A,upDisabled:xe,downDisabled:Se,onStep:Ae}),l.createElement("div",{className:"".concat(q,"-wrap")},l.createElement("input",(0,r.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":k,"aria-valuemax":P,"aria-valuenow":ue.isInvalidate()?null:ue.toString(),step:R},J,{ref:(0,p.sQ)(X,n),className:q,value:me,onChange:function(e){Ke(e.target.value)},disabled:T,readOnly:O}))))}));x.displayName="InputNumber";var S=x},35612:function(e,n,t){t.d(n,{Q:function(){return s},Z:function(){return y}});var r=t(1413),o=t(4942),a=t(71002),i=t(67294),u=t(94184),l=t.n(u),c=t(87887),s=function(e){var n,t=e.inputElement,u=e.prefixCls,s=e.prefix,f=e.suffix,d=e.addonBefore,p=e.addonAfter,v=e.className,m=e.style,h=e.affixWrapperClassName,g=e.groupClassName,y=e.wrapperClassName,Z=e.disabled,b=e.readOnly,C=e.focused,E=e.triggerFocus,w=e.allowClear,N=e.value,x=e.handleReset,S=e.hidden,k=e.inputStyle,P=e.classes,I=(0,i.useRef)(null),R=(0,i.cloneElement)(t,{value:N,hidden:S,style:(0,r.Z)((0,r.Z)({},null===(n=t.props)||void 0===n?void 0:n.style),k)});if((0,c.X3)(e)){var M,D="".concat(u,"-affix-wrapper"),T=l()(D,(M={},(0,o.Z)(M,"".concat(D,"-disabled"),Z),(0,o.Z)(M,"".concat(D,"-focused"),C),(0,o.Z)(M,"".concat(D,"-readonly"),b),(0,o.Z)(M,"".concat(D,"-input-with-clear-btn"),f&&w&&N),M),!(0,c.He)(e)&&v,h,null==P?void 0:P.affixWrapper),O=(f||w)&&i.createElement("span",{className:"".concat(u,"-suffix")},function(){var e;if(!w)return null;var n=!Z&&!b&&N,t="".concat(u,"-clear-icon"),r="object"===(0,a.Z)(w)&&null!=w&&w.clearIcon?w.clearIcon:"✖";return i.createElement("span",{onClick:x,onMouseDown:function(e){return e.preventDefault()},className:l()(t,(e={},(0,o.Z)(e,"".concat(t,"-hidden"),!n),(0,o.Z)(e,"".concat(t,"-has-suffix"),!!f),e)),role:"button",tabIndex:-1},r)}(),f);R=i.createElement("span",{className:T,style:m,hidden:!(0,c.He)(e)&&S,onClick:function(e){var n;null!==(n=I.current)&&void 0!==n&&n.contains(e.target)&&(null==E||E())},ref:I},s&&i.createElement("span",{className:"".concat(u,"-prefix")},s),(0,i.cloneElement)(t,{style:null!=k?k:null,value:N,hidden:null}),O)}if((0,c.He)(e)){var K="".concat(u,"-group"),A="".concat(K,"-addon"),V=l()("".concat(u,"-wrapper"),K,y,null==P?void 0:P.wrapper),L=l()("".concat(u,"-group-wrapper"),v,g,null==P?void 0:P.group);return i.createElement("span",{className:L,style:m,hidden:S},i.createElement("span",{className:V},d&&i.createElement("span",{className:A},d),(0,i.cloneElement)(R,{style:null!=k?k:null,hidden:null}),p&&i.createElement("span",{className:A},p)))}return R},f=t(93433),d=t(87462),p=t(29439),v=t(45987),m=t(98423),h=t(21770),g=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","inputClassName","classes"],y=(0,i.forwardRef)((function(e,n){var t=e.autoComplete,r=e.onChange,u=e.onFocus,y=e.onBlur,Z=e.onPressEnter,b=e.onKeyDown,C=e.prefixCls,E=void 0===C?"rc-input":C,w=e.disabled,N=e.htmlSize,x=e.className,S=e.maxLength,k=e.suffix,P=e.showCount,I=e.type,R=void 0===I?"text":I,M=e.inputClassName,D=e.classes,T=(0,v.Z)(e,g),O=(0,h.Z)(e.defaultValue,{value:e.value}),K=(0,p.Z)(O,2),A=K[0],V=K[1],L=(0,i.useState)(!1),_=(0,p.Z)(L,2),z=_[0],F=_[1],j=(0,i.useRef)(null),W=function(e){j.current&&(0,c.nH)(j.current,e)};(0,i.useImperativeHandle)(n,(function(){return{focus:W,blur:function(){var e;null===(e=j.current)||void 0===e||e.blur()},setSelectionRange:function(e,n,t){var r;null===(r=j.current)||void 0===r||r.setSelectionRange(e,n,t)},select:function(){var e;null===(e=j.current)||void 0===e||e.select()},input:j.current}})),(0,i.useEffect)((function(){F((function(e){return(!e||!w)&&e}))}),[w]);var H;return i.createElement(s,(0,d.Z)({},T,{prefixCls:E,className:x,inputElement:(H=(0,m.Z)(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","affixWrapperClassName","groupClassName","inputClassName","classes","wrapperClassName","htmlSize"]),i.createElement("input",(0,d.Z)({autoComplete:t},H,{onChange:function(n){void 0===e.value&&V(n.target.value),j.current&&(0,c.rJ)(j.current,n,r)},onFocus:function(e){F(!0),null==u||u(e)},onBlur:function(e){F(!1),null==y||y(e)},onKeyDown:function(e){Z&&"Enter"===e.key&&Z(e),null==b||b(e)},className:l()(E,(0,o.Z)({},"".concat(E,"-disabled"),w),M,null==D?void 0:D.input,!(0,c.He)(e)&&!(0,c.X3)(e)&&x),ref:j,size:N,type:R}))),handleReset:function(e){V(""),W(),j.current&&(0,c.rJ)(j.current,e,r)},value:(0,c.D7)(A),focused:z,triggerFocus:W,suffix:function(){var e=Number(S)>0;if(k||P){var n=(0,c.D7)(A),t=(0,f.Z)(n).length,r="object"===(0,a.Z)(P)?P.formatter({value:n,count:t,maxLength:S}):"".concat(t).concat(e?" / ".concat(S):"");return i.createElement(i.Fragment,null,!!P&&i.createElement("span",{className:l()("".concat(E,"-show-count-suffix"),(0,o.Z)({},"".concat(E,"-show-count-has-suffix"),!!k))},r),k)}return null}(),disabled:w,classes:D}))}))},87887:function(e,n,t){function r(e){return!(!e.addonBefore&&!e.addonAfter)}function o(e){return!!(e.prefix||e.suffix||e.allowClear)}function a(e,n,t,r){if(t){var o=n;if("click"===n.type){var a=e.cloneNode(!0);return o=Object.create(n,{target:{value:a},currentTarget:{value:a}}),a.value="",void t(o)}if(void 0!==r)return o=Object.create(n,{target:{value:e},currentTarget:{value:e}}),e.value=r,void t(o);t(o)}}function i(e,n){if(e){e.focus(n);var t=(n||{}).cursor;if(t){var r=e.value.length;switch(t){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}function u(e){return null==e?"":String(e)}t.d(n,{D7:function(){return u},He:function(){return r},X3:function(){return o},nH:function(){return i},rJ:function(){return a}})},94423:function(e,n,t){t.d(n,{iz:function(){return We},ck:function(){return de},BW:function(){return je},sN:function(){return de},GP:function(){return je},Wd:function(){return Ke},ZP:function(){return Be},Xl:function(){return P}});var r=t(87462),o=t(4942),a=t(1413),i=t(93433),u=t(29439),l=t(45987),c=t(94184),s=t.n(c),f=t(26120),d=t(21770),p=t(80334),v=t(67294),m=t(73935),h=t(91881),g=v.createContext(null);function y(e,n){return void 0===e?null:"".concat(e,"-").concat(n)}function Z(e){return y(v.useContext(g),e)}var b=t(56982),C=["children","locked"],E=v.createContext(null);function w(e){var n=e.children,t=e.locked,r=(0,l.Z)(e,C),o=v.useContext(E),i=(0,b.Z)((function(){return e=o,n=r,t=(0,a.Z)({},e),Object.keys(n).forEach((function(e){var r=n[e];void 0!==r&&(t[e]=r)})),t;var e,n,t}),[o,r],(function(e,n){return!(t||e[0]===n[0]&&(0,h.Z)(e[1],n[1],!0))}));return v.createElement(E.Provider,{value:i},n)}var N=[],x=v.createContext(null);function S(){return v.useContext(x)}var k=v.createContext(N);function P(e){var n=v.useContext(k);return v.useMemo((function(){return void 0!==e?[].concat((0,i.Z)(n),[e]):n}),[n,e])}var I=v.createContext(null),R=v.createContext({}),M=t(15105),D=t(75164),T=t(88603),O=M.Z.LEFT,K=M.Z.RIGHT,A=M.Z.UP,V=M.Z.DOWN,L=M.Z.ENTER,_=M.Z.ESC,z=M.Z.HOME,F=M.Z.END,j=[A,V,O,K];function W(e,n){return(0,T.tS)(e,!0).filter((function(e){return n.has(e)}))}function H(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var o=W(e,n),a=o.length,i=o.findIndex((function(e){return t===e}));return r<0?-1===i?i=a-1:i-=1:r>0&&(i+=1),o[i=(i+a)%a]}var B="__RC_UTIL_PATH_SPLIT__",U=function(e){return e.join(B)},Y="rc-menu-more";function G(e){var n=v.useRef(e);n.current=e;var t=v.useCallback((function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return null===(e=n.current)||void 0===e?void 0:e.call.apply(e,[n].concat(r))}),[]);return e?t:void 0}var J=Math.random().toFixed(5).toString().slice(2),q=0,X=t(15671),Q=t(43144),$=t(60136),ee=t(29388),ne=t(98423);function te(e,n,t,r){var o=v.useContext(E),a=o.activeKey,i=o.onActive,u=o.onInactive,l={active:a===e};return n||(l.onMouseEnter=function(n){null==t||t({key:e,domEvent:n}),i(e)},l.onMouseLeave=function(n){null==r||r({key:e,domEvent:n}),u(e)}),l}var re=["item"];function oe(e){var n=e.item,t=(0,l.Z)(e,re);return Object.defineProperty(t,"item",{get:function(){return(0,p.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),n}}),t}function ae(e){var n=e.icon,t=e.props,r=e.children;return("function"==typeof n?v.createElement(n,(0,a.Z)({},t)):n)||r||null}function ie(e){var n=v.useContext(E),t=n.mode,r=n.rtl,o=n.inlineIndent;return"inline"!==t?null:r?{paddingRight:e*o}:{paddingLeft:e*o}}var ue=["title","attribute","elementRef"],le=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],ce=["active"],se=function(e){(0,$.Z)(t,e);var n=(0,ee.Z)(t);function t(){return(0,X.Z)(this,t),n.apply(this,arguments)}return(0,Q.Z)(t,[{key:"render",value:function(){var e=this.props,n=e.title,t=e.attribute,o=e.elementRef,a=(0,l.Z)(e,ue),i=(0,ne.Z)(a,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,p.ZP)(!t,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),v.createElement(f.Z.Item,(0,r.Z)({},t,{title:"string"==typeof n?n:void 0},i,{ref:o}))}}]),t}(v.Component),fe=function(e){var n,t=e.style,u=e.className,c=e.eventKey,f=(e.warnKey,e.disabled),d=e.itemIcon,p=e.children,m=e.role,h=e.onMouseEnter,g=e.onMouseLeave,y=e.onClick,b=e.onKeyDown,C=e.onFocus,w=(0,l.Z)(e,le),N=Z(c),x=v.useContext(E),S=x.prefixCls,k=x.onItemClick,I=x.disabled,D=x.overflowDisabled,T=x.itemIcon,O=x.selectedKeys,K=x.onActive,A=v.useContext(R)._internalRenderMenuItem,V="".concat(S,"-item"),L=v.useRef(),_=v.useRef(),z=I||f,F=P(c),j=function(e){return{key:c,keyPath:(0,i.Z)(F).reverse(),item:L.current,domEvent:e}},W=d||T,H=te(c,z,h,g),B=H.active,U=(0,l.Z)(H,ce),Y=O.includes(c),G=ie(F.length),J={};"option"===e.role&&(J["aria-selected"]=Y);var q=v.createElement(se,(0,r.Z)({ref:L,elementRef:_,role:null===m?"none":m||"menuitem",tabIndex:f?null:-1,"data-menu-id":D&&N?null:N},w,U,J,{component:"li","aria-disabled":f,style:(0,a.Z)((0,a.Z)({},G),t),className:s()(V,(n={},(0,o.Z)(n,"".concat(V,"-active"),B),(0,o.Z)(n,"".concat(V,"-selected"),Y),(0,o.Z)(n,"".concat(V,"-disabled"),z),n),u),onClick:function(e){if(!z){var n=j(e);null==y||y(oe(n)),k(n)}},onKeyDown:function(e){if(null==b||b(e),e.which===M.Z.ENTER){var n=j(e);null==y||y(oe(n)),k(n)}},onFocus:function(e){K(c),null==C||C(e)}}),p,v.createElement(ae,{props:(0,a.Z)((0,a.Z)({},e),{},{isSelected:Y}),icon:W}));return A&&(q=A(q,e,{selected:Y})),q},de=function(e){var n=e.eventKey,t=S(),r=P(n);return v.useEffect((function(){if(t)return t.registerPath(n,r),function(){t.unregisterPath(n,r)}}),[r]),t?null:v.createElement(fe,e)},pe=["className","children"],ve=function(e,n){var t=e.className,o=e.children,a=(0,l.Z)(e,pe),i=v.useContext(E),u=i.prefixCls,c=i.mode,f=i.rtl;return v.createElement("ul",(0,r.Z)({className:s()(u,f&&"".concat(u,"-rtl"),"".concat(u,"-sub"),"".concat(u,"-").concat("inline"===c?"inline":"vertical"),t),role:"menu"},a,{"data-menu-list":!0,ref:n}),o)},me=v.forwardRef(ve);me.displayName="SubMenuList";var he=me,ge=t(71002),ye=t(50344),Ze=["label","children","key","type"];function be(e,n){return(0,ye.Z)(e).map((function(e,t){if(v.isValidElement(e)){var r,o,a=e.key,u=null!==(r=null===(o=e.props)||void 0===o?void 0:o.eventKey)&&void 0!==r?r:a;null==u&&(u="tmp_key-".concat([].concat((0,i.Z)(n),[t]).join("-")));var l={key:u,eventKey:u};return v.cloneElement(e,l)}return e}))}function Ce(e){return(e||[]).map((function(e,n){if(e&&"object"===(0,ge.Z)(e)){var t=e,o=t.label,a=t.children,i=t.key,u=t.type,c=(0,l.Z)(t,Ze),s=null!=i?i:"tmp-".concat(n);return a||"group"===u?"group"===u?v.createElement(je,(0,r.Z)({key:s},c,{title:o}),Ce(a)):v.createElement(Ke,(0,r.Z)({key:s},c,{title:o}),Ce(a)):"divider"===u?v.createElement(We,(0,r.Z)({key:s},c)):v.createElement(de,(0,r.Z)({key:s},c),o)}return null})).filter((function(e){return e}))}function Ee(e,n,t){var r=e;return n&&(r=Ce(n)),be(r,t)}var we=t(85456),Ne={adjustX:1,adjustY:1},xe={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}},Se={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}};function ke(e,n,t){return n||(t?t[e]||t.other:void 0)}var Pe={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Ie(e){var n=e.prefixCls,t=e.visible,r=e.children,i=e.popup,l=e.popupClassName,c=e.popupOffset,f=e.disabled,d=e.mode,p=e.onVisibleChange,m=v.useContext(E),h=m.getPopupContainer,g=m.rtl,y=m.subMenuOpenDelay,Z=m.subMenuCloseDelay,b=m.builtinPlacements,C=m.triggerSubMenuAction,w=m.forceSubMenuRender,N=m.rootClassName,x=m.motion,S=m.defaultMotions,k=v.useState(!1),P=(0,u.Z)(k,2),I=P[0],R=P[1],M=g?(0,a.Z)((0,a.Z)({},Se),b):(0,a.Z)((0,a.Z)({},xe),b),T=Pe[d],O=ke(d,x,S),K=v.useRef(O);"inline"!==d&&(K.current=O);var A=(0,a.Z)((0,a.Z)({},K.current),{},{leavedClassName:"".concat(n,"-hidden"),removeOnLeave:!1,motionAppear:!0}),V=v.useRef();return v.useEffect((function(){return V.current=(0,D.Z)((function(){R(t)})),function(){D.Z.cancel(V.current)}}),[t]),v.createElement(we.Z,{prefixCls:n,popupClassName:s()("".concat(n,"-popup"),(0,o.Z)({},"".concat(n,"-rtl"),g),l,N),stretch:"horizontal"===d?"minWidth":null,getPopupContainer:h,builtinPlacements:M,popupPlacement:T,popupVisible:I,popup:i,popupAlign:c&&{offset:c},action:f?[]:[C],mouseEnterDelay:y,mouseLeaveDelay:Z,onPopupVisibleChange:p,forceRender:w,popupMotion:A},r)}var Re=t(63441);function Me(e){var n=e.id,t=e.open,o=e.keyPath,i=e.children,l="inline",c=v.useContext(E),s=c.prefixCls,f=c.forceSubMenuRender,d=c.motion,p=c.defaultMotions,m=c.mode,h=v.useRef(!1);h.current=m===l;var g=v.useState(!h.current),y=(0,u.Z)(g,2),Z=y[0],b=y[1],C=!!h.current&&t;v.useEffect((function(){h.current&&b(!1)}),[m]);var N=(0,a.Z)({},ke(l,d,p));o.length>1&&(N.motionAppear=!1);var x=N.onVisibleChanged;return N.onVisibleChanged=function(e){return h.current||e||b(!0),null==x?void 0:x(e)},Z?null:v.createElement(w,{mode:l,locked:!h.current},v.createElement(Re.Z,(0,r.Z)({visible:C},N,{forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),(function(e){var t=e.className,r=e.style;return v.createElement(he,{id:n,className:t,style:r},i)})))}var De=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Te=["active"],Oe=function(e){var n,t=e.style,i=e.className,c=e.title,d=e.eventKey,p=(e.warnKey,e.disabled),m=e.internalPopupClose,h=e.children,g=e.itemIcon,y=e.expandIcon,b=e.popupClassName,C=e.popupOffset,N=e.onClick,x=e.onMouseEnter,S=e.onMouseLeave,k=e.onTitleClick,M=e.onTitleMouseEnter,D=e.onTitleMouseLeave,T=(0,l.Z)(e,De),O=Z(d),K=v.useContext(E),A=K.prefixCls,V=K.mode,L=K.openKeys,_=K.disabled,z=K.overflowDisabled,F=K.activeKey,j=K.selectedKeys,W=K.itemIcon,H=K.expandIcon,B=K.onItemClick,U=K.onOpenChange,Y=K.onActive,J=v.useContext(R)._internalRenderSubMenuItem,q=v.useContext(I).isSubPathKey,X=P(),Q="".concat(A,"-submenu"),$=_||p,ee=v.useRef(),ne=v.useRef(),re=g||W,ue=y||H,le=L.includes(d),ce=!z&&le,se=q(j,d),fe=te(d,$,M,D),de=fe.active,pe=(0,l.Z)(fe,Te),ve=v.useState(!1),me=(0,u.Z)(ve,2),ge=me[0],ye=me[1],Ze=function(e){$||ye(e)},be=v.useMemo((function(){return de||"inline"!==V&&(ge||q([F],d))}),[V,de,F,ge,d,q]),Ce=ie(X.length),Ee=G((function(e){null==N||N(oe(e)),B(e)})),we=O&&"".concat(O,"-popup"),Ne=v.createElement("div",(0,r.Z)({role:"menuitem",style:Ce,className:"".concat(Q,"-title"),tabIndex:$?null:-1,ref:ee,title:"string"==typeof c?c:null,"data-menu-id":z&&O?null:O,"aria-expanded":ce,"aria-haspopup":!0,"aria-controls":we,"aria-disabled":$,onClick:function(e){$||(null==k||k({key:d,domEvent:e}),"inline"===V&&U(d,!le))},onFocus:function(){Y(d)}},pe),c,v.createElement(ae,{icon:"horizontal"!==V?ue:null,props:(0,a.Z)((0,a.Z)({},e),{},{isOpen:ce,isSubMenu:!0})},v.createElement("i",{className:"".concat(Q,"-arrow")}))),xe=v.useRef(V);if("inline"!==V&&X.length>1?xe.current="vertical":xe.current=V,!z){var Se=xe.current;Ne=v.createElement(Ie,{mode:Se,prefixCls:Q,visible:!m&&ce&&"inline"!==V,popupClassName:b,popupOffset:C,popup:v.createElement(w,{mode:"horizontal"===Se?"vertical":Se},v.createElement(he,{id:we,ref:ne},h)),disabled:$,onVisibleChange:function(e){"inline"!==V&&U(d,e)}},Ne)}var ke=v.createElement(f.Z.Item,(0,r.Z)({role:"none"},T,{component:"li",style:t,className:s()(Q,"".concat(Q,"-").concat(V),i,(n={},(0,o.Z)(n,"".concat(Q,"-open"),ce),(0,o.Z)(n,"".concat(Q,"-active"),be),(0,o.Z)(n,"".concat(Q,"-selected"),se),(0,o.Z)(n,"".concat(Q,"-disabled"),$),n)),onMouseEnter:function(e){Ze(!0),null==x||x({key:d,domEvent:e})},onMouseLeave:function(e){Ze(!1),null==S||S({key:d,domEvent:e})}}),Ne,!z&&v.createElement(Me,{id:we,open:ce,keyPath:X},h));return J&&(ke=J(ke,e,{selected:se,active:be,open:ce,disabled:$})),v.createElement(w,{onItemClick:Ee,mode:"horizontal"===V?"vertical":V,itemIcon:re,expandIcon:ue},ke)};function Ke(e){var n,t=e.eventKey,r=e.children,o=P(t),a=be(r,o),i=S();return v.useEffect((function(){if(i)return i.registerPath(t,o),function(){i.unregisterPath(t,o)}}),[o]),n=i?a:v.createElement(Oe,e,a),v.createElement(k.Provider,{value:o},n)}var Ae=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],Ve=[],Le=v.forwardRef((function(e,n){var t,c,p=e,Z=p.prefixCls,b=void 0===Z?"rc-menu":Z,C=p.rootClassName,E=p.style,N=p.className,S=p.tabIndex,k=void 0===S?0:S,P=p.items,M=p.children,T=p.direction,X=p.id,Q=p.mode,$=void 0===Q?"vertical":Q,ee=p.inlineCollapsed,ne=p.disabled,te=p.disabledOverflow,re=p.subMenuOpenDelay,ae=void 0===re?.1:re,ie=p.subMenuCloseDelay,ue=void 0===ie?.1:ie,le=p.forceSubMenuRender,ce=p.defaultOpenKeys,se=p.openKeys,fe=p.activeKey,pe=p.defaultActiveFirst,ve=p.selectable,me=void 0===ve||ve,he=p.multiple,ge=void 0!==he&&he,ye=p.defaultSelectedKeys,Ze=p.selectedKeys,be=p.onSelect,Ce=p.onDeselect,we=p.inlineIndent,Ne=void 0===we?24:we,xe=p.motion,Se=p.defaultMotions,ke=p.triggerSubMenuAction,Pe=void 0===ke?"hover":ke,Ie=p.builtinPlacements,Re=p.itemIcon,Me=p.expandIcon,De=p.overflowedIndicator,Te=void 0===De?"...":De,Oe=p.overflowedIndicatorPopupClassName,Le=p.getPopupContainer,_e=p.onClick,ze=p.onOpenChange,Fe=p.onKeyDown,je=(p.openAnimation,p.openTransitionName,p._internalRenderMenuItem),We=p._internalRenderSubMenuItem,He=(0,l.Z)(p,Ae),Be=v.useMemo((function(){return Ee(M,P,Ve)}),[M,P]),Ue=v.useState(!1),Ye=(0,u.Z)(Ue,2),Ge=Ye[0],Je=Ye[1],qe=v.useRef(),Xe=function(e){var n=(0,d.Z)(e,{value:e}),t=(0,u.Z)(n,2),r=t[0],o=t[1];return v.useEffect((function(){q+=1;var e="".concat(J,"-").concat(q);o("rc-menu-uuid-".concat(e))}),[]),r}(X),Qe="rtl"===T,$e=(0,d.Z)(ce,{value:se,postState:function(e){return e||Ve}}),en=(0,u.Z)($e,2),nn=en[0],tn=en[1],rn=function(e){function n(){tn(e),null==ze||ze(e)}arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(0,m.flushSync)(n):n()},on=v.useState(nn),an=(0,u.Z)(on,2),un=an[0],ln=an[1],cn=v.useRef(!1),sn=v.useMemo((function(){return"inline"!==$&&"vertical"!==$||!ee?[$,!1]:["vertical",ee]}),[$,ee]),fn=(0,u.Z)(sn,2),dn=fn[0],pn=fn[1],vn="inline"===dn,mn=v.useState(dn),hn=(0,u.Z)(mn,2),gn=hn[0],yn=hn[1],Zn=v.useState(pn),bn=(0,u.Z)(Zn,2),Cn=bn[0],En=bn[1];v.useEffect((function(){yn(dn),En(pn),cn.current&&(vn?tn(un):rn(Ve))}),[dn,pn]);var wn=v.useState(0),Nn=(0,u.Z)(wn,2),xn=Nn[0],Sn=Nn[1],kn=xn>=Be.length-1||"horizontal"!==gn||te;v.useEffect((function(){vn&&ln(nn)}),[nn]),v.useEffect((function(){return cn.current=!0,function(){cn.current=!1}}),[]);var Pn=function(){var e=v.useState({}),n=(0,u.Z)(e,2)[1],t=(0,v.useRef)(new Map),r=(0,v.useRef)(new Map),o=v.useState([]),a=(0,u.Z)(o,2),l=a[0],c=a[1],s=(0,v.useRef)(0),f=(0,v.useRef)(!1),d=(0,v.useCallback)((function(e,o){var a=U(o);r.current.set(a,e),t.current.set(e,a),s.current+=1;var i,u=s.current;i=function(){u===s.current&&(f.current||n({}))},Promise.resolve().then(i)}),[]),p=(0,v.useCallback)((function(e,n){var o=U(n);r.current.delete(o),t.current.delete(e)}),[]),m=(0,v.useCallback)((function(e){c(e)}),[]),h=(0,v.useCallback)((function(e,n){var r=(t.current.get(e)||"").split(B);return n&&l.includes(r[0])&&r.unshift(Y),r}),[l]),g=(0,v.useCallback)((function(e,n){return e.some((function(e){return h(e,!0).includes(n)}))}),[h]),y=(0,v.useCallback)((function(e){var n="".concat(t.current.get(e)).concat(B),o=new Set;return(0,i.Z)(r.current.keys()).forEach((function(e){e.startsWith(n)&&o.add(r.current.get(e))})),o}),[]);return v.useEffect((function(){return function(){f.current=!0}}),[]),{registerPath:d,unregisterPath:p,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:h,getKeys:function(){var e=(0,i.Z)(t.current.keys());return l.length&&e.push(Y),e},getSubPathKeys:y}}(),In=Pn.registerPath,Rn=Pn.unregisterPath,Mn=Pn.refreshOverflowKeys,Dn=Pn.isSubPathKey,Tn=Pn.getKeyPath,On=Pn.getKeys,Kn=Pn.getSubPathKeys,An=v.useMemo((function(){return{registerPath:In,unregisterPath:Rn}}),[In,Rn]),Vn=v.useMemo((function(){return{isSubPathKey:Dn}}),[Dn]);v.useEffect((function(){Mn(kn?Ve:Be.slice(xn+1).map((function(e){return e.key})))}),[xn,kn]);var Ln=(0,d.Z)(fe||pe&&(null===(t=Be[0])||void 0===t?void 0:t.key),{value:fe}),_n=(0,u.Z)(Ln,2),zn=_n[0],Fn=_n[1],jn=G((function(e){Fn(e)})),Wn=G((function(){Fn(void 0)}));(0,v.useImperativeHandle)(n,(function(){return{list:qe.current,focus:function(e){var n,t,r,o,a=null!=zn?zn:null===(n=Be.find((function(e){return!e.props.disabled})))||void 0===n?void 0:n.key;a&&(null===(t=qe.current)||void 0===t||null===(r=t.querySelector("li[data-menu-id='".concat(y(Xe,a),"']")))||void 0===r||null===(o=r.focus)||void 0===o||o.call(r,e))}}}));var Hn=(0,d.Z)(ye||[],{value:Ze,postState:function(e){return Array.isArray(e)?e:null==e?Ve:[e]}}),Bn=(0,u.Z)(Hn,2),Un=Bn[0],Yn=Bn[1],Gn=G((function(e){null==_e||_e(oe(e)),function(e){if(me){var n,t=e.key,r=Un.includes(t);n=ge?r?Un.filter((function(e){return e!==t})):[].concat((0,i.Z)(Un),[t]):[t],Yn(n);var o=(0,a.Z)((0,a.Z)({},e),{},{selectedKeys:n});r?null==Ce||Ce(o):null==be||be(o)}!ge&&nn.length&&"inline"!==gn&&rn(Ve)}(e)})),Jn=G((function(e,n){var t=nn.filter((function(n){return n!==e}));if(n)t.push(e);else if("inline"!==gn){var r=Kn(e);t=t.filter((function(e){return!r.has(e)}))}(0,h.Z)(nn,t,!0)||rn(t,!0)})),qn=G(Le),Xn=function(e,n,t,r,a,i,u,l,c,s){var f=v.useRef(),d=v.useRef();d.current=n;var p=function(){D.Z.cancel(f.current)};return v.useEffect((function(){return function(){p()}}),[]),function(v){var m=v.which;if([].concat(j,[L,_,z,F]).includes(m)){var h,g,Z,b=function(){return h=new Set,g=new Map,Z=new Map,i().forEach((function(e){var n=document.querySelector("[data-menu-id='".concat(y(r,e),"']"));n&&(h.add(n),Z.set(n,e),g.set(e,n))})),h};b();var C=function(e,n){for(var t=e||document.activeElement;t;){if(n.has(t))return t;t=t.parentElement}return null}(g.get(n),h),E=Z.get(C),w=function(e,n,t,r){var a,i,u,l,c="prev",s="next",f="children",d="parent";if("inline"===e&&r===L)return{inlineTrigger:!0};var p=(a={},(0,o.Z)(a,A,c),(0,o.Z)(a,V,s),a),v=(i={},(0,o.Z)(i,O,t?s:c),(0,o.Z)(i,K,t?c:s),(0,o.Z)(i,V,f),(0,o.Z)(i,L,f),i),m=(u={},(0,o.Z)(u,A,c),(0,o.Z)(u,V,s),(0,o.Z)(u,L,f),(0,o.Z)(u,_,d),(0,o.Z)(u,O,t?f:d),(0,o.Z)(u,K,t?d:f),u);switch(null===(l={inline:p,horizontal:v,vertical:m,inlineSub:p,horizontalSub:m,verticalSub:m}["".concat(e).concat(n?"":"Sub")])||void 0===l?void 0:l[r]){case c:return{offset:-1,sibling:!0};case s:return{offset:1,sibling:!0};case d:return{offset:-1,sibling:!1};case f:return{offset:1,sibling:!1};default:return null}}(e,1===u(E,!0).length,t,m);if(!w&&m!==z&&m!==F)return;(j.includes(m)||[z,F].includes(m))&&v.preventDefault();var N=function(e){if(e){var n=e,t=e.querySelector("a");null!=t&&t.getAttribute("href")&&(n=t);var r=Z.get(e);l(r),p(),f.current=(0,D.Z)((function(){d.current===r&&n.focus()}))}};if([z,F].includes(m)||w.sibling||!C){var x,S,k=W(x=C&&"inline"!==e?function(e){for(var n=e;n;){if(n.getAttribute("data-menu-list"))return n;n=n.parentElement}return null}(C):a.current,h);S=m===z?k[0]:m===F?k[k.length-1]:H(x,h,C,w.offset),N(S)}else if(w.inlineTrigger)c(E);else if(w.offset>0)c(E,!0),p(),f.current=(0,D.Z)((function(){b();var e=C.getAttribute("aria-controls"),n=H(document.getElementById(e),h);N(n)}),5);else if(w.offset<0){var P=u(E,!0),I=P[P.length-2],R=g.get(I);c(I,!1),N(R)}}null==s||s(v)}}(gn,zn,Qe,Xe,qe,On,Tn,Fn,(function(e,n){var t=null!=n?n:!nn.includes(e);Jn(e,t)}),Fe);v.useEffect((function(){Je(!0)}),[]);var Qn=v.useMemo((function(){return{_internalRenderMenuItem:je,_internalRenderSubMenuItem:We}}),[je,We]),$n="horizontal"!==gn||te?Be:Be.map((function(e,n){return v.createElement(w,{key:e.key,overflowDisabled:n>xn},e)})),et=v.createElement(f.Z,(0,r.Z)({id:X,ref:qe,prefixCls:"".concat(b,"-overflow"),component:"ul",itemComponent:de,className:s()(b,"".concat(b,"-root"),"".concat(b,"-").concat(gn),N,(c={},(0,o.Z)(c,"".concat(b,"-inline-collapsed"),Cn),(0,o.Z)(c,"".concat(b,"-rtl"),Qe),c),C),dir:T,style:E,role:"menu",tabIndex:k,data:$n,renderRawItem:function(e){return e},renderRawRest:function(e){var n=e.length,t=n?Be.slice(-n):null;return v.createElement(Ke,{eventKey:Y,title:Te,disabled:kn,internalPopupClose:0===n,popupClassName:Oe},t)},maxCount:"horizontal"!==gn||te?f.Z.INVALIDATE:f.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){Sn(e)},onKeyDown:Xn},He));return v.createElement(R.Provider,{value:Qn},v.createElement(g.Provider,{value:Xe},v.createElement(w,{prefixCls:b,rootClassName:C,mode:gn,openKeys:nn,rtl:Qe,disabled:ne,motion:Ge?xe:null,defaultMotions:Ge?Se:null,activeKey:zn,onActive:jn,onInactive:Wn,selectedKeys:Un,inlineIndent:Ne,subMenuOpenDelay:ae,subMenuCloseDelay:ue,forceSubMenuRender:le,builtinPlacements:Ie,triggerSubMenuAction:Pe,getPopupContainer:qn,itemIcon:Re,expandIcon:Me,onItemClick:Gn,onOpenChange:Jn},v.createElement(I.Provider,{value:Vn},et),v.createElement("div",{style:{display:"none"},"aria-hidden":!0},v.createElement(x.Provider,{value:An},Be)))))})),_e=["className","title","eventKey","children"],ze=["children"],Fe=function(e){var n=e.className,t=e.title,o=(e.eventKey,e.children),a=(0,l.Z)(e,_e),i=v.useContext(E).prefixCls,u="".concat(i,"-item-group");return v.createElement("li",(0,r.Z)({role:"presentation"},a,{onClick:function(e){return e.stopPropagation()},className:s()(u,n)}),v.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:"string"==typeof t?t:void 0},t),v.createElement("ul",{role:"group",className:"".concat(u,"-list")},o))};function je(e){var n=e.children,t=(0,l.Z)(e,ze),r=be(n,P(t.eventKey));return S()?r:v.createElement(Fe,(0,ne.Z)(t,["warnKey"]),r)}function We(e){var n=e.className,t=e.style,r=v.useContext(E).prefixCls;return S()?null:v.createElement("li",{className:s()("".concat(r,"-item-divider"),n),style:t})}var He=Le;He.Item=de,He.SubMenu=Ke,He.ItemGroup=je,He.Divider=We;var Be=He},63441:function(e,n,t){t.d(n,{V:function(){return ue},Z:function(){return le}});var r=t(4942),o=t(1413),a=t(29439),i=t(71002),u=t(67294),l=t(34203),c=t(42550),s=t(94184),f=t.n(s),d=t(98924);function p(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit".concat(e)]="webkit".concat(n),t["Moz".concat(e)]="moz".concat(n),t["ms".concat(e)]="MS".concat(n),t["O".concat(e)]="o".concat(n.toLowerCase()),t}var v,m,h,g=(v=(0,d.Z)(),m="undefined"!=typeof window?window:{},h={animationend:p("Animation","AnimationEnd"),transitionend:p("Transition","TransitionEnd")},v&&("AnimationEvent"in m||delete h.animationend.animation,"TransitionEvent"in m||delete h.transitionend.transition),h),y={};if((0,d.Z)()){var Z=document.createElement("div");y=Z.style}var b={};function C(e){if(b[e])return b[e];var n=g[e];if(n)for(var t=Object.keys(n),r=t.length,o=0;o<r;o+=1){var a=t[o];if(Object.prototype.hasOwnProperty.call(n,a)&&a in y)return b[e]=n[a],b[e]}return""}var E=C("animationend"),w=C("transitionend"),N=!(!E||!w),x=E||"animationend",S=w||"transitionend";function k(e,n){return e?"object"===(0,i.Z)(e)?e[n.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(n):null}var P="none",I="appear",R="enter",M="leave",D="none",T="prepare",O="start",K="active",A="end",V=t(30470),L=t(75164),_=(0,d.Z)()?u.useLayoutEffect:u.useEffect,z=[T,O,K,A];function F(e){return e===K||e===A}var j=t(15671),W=t(43144),H=t(60136),B=t(29388),U=function(e){(0,H.Z)(t,e);var n=(0,B.Z)(t);function t(){return(0,j.Z)(this,t),n.apply(this,arguments)}return(0,W.Z)(t,[{key:"render",value:function(){return this.props.children}}]),t}(u.Component),Y=U,G=function(e){var n=e;function t(e){return!(!e.motionName||!n)}"object"===(0,i.Z)(e)&&(n=e.transitionSupport);var s=u.forwardRef((function(e,n){var i=e.visible,s=void 0===i||i,d=e.removeOnLeave,p=void 0===d||d,v=e.forceRender,m=e.children,h=e.motionName,g=e.leavedClassName,y=e.eventProps,Z=t(e),b=(0,u.useRef)(),C=(0,u.useRef)(),E=function(e,n,t,i){var l=i.motionEnter,c=void 0===l||l,s=i.motionAppear,f=void 0===s||s,d=i.motionLeave,p=void 0===d||d,v=i.motionDeadline,m=i.motionLeaveImmediately,h=i.onAppearPrepare,g=i.onEnterPrepare,y=i.onLeavePrepare,Z=i.onAppearStart,b=i.onEnterStart,C=i.onLeaveStart,E=i.onAppearActive,w=i.onEnterActive,N=i.onLeaveActive,k=i.onAppearEnd,j=i.onEnterEnd,W=i.onLeaveEnd,H=i.onVisibleChanged,B=(0,V.Z)(),U=(0,a.Z)(B,2),Y=U[0],G=U[1],J=(0,V.Z)(P),q=(0,a.Z)(J,2),X=q[0],Q=q[1],$=(0,V.Z)(null),ee=(0,a.Z)($,2),ne=ee[0],te=ee[1],re=(0,u.useRef)(!1),oe=(0,u.useRef)(null);function ae(){return t()}var ie=(0,u.useRef)(!1);function ue(e){var n=ae();if(!e||e.deadline||e.target===n){var t,r=ie.current;X===I&&r?t=null==k?void 0:k(n,e):X===R&&r?t=null==j?void 0:j(n,e):X===M&&r&&(t=null==W?void 0:W(n,e)),X!==P&&r&&!1!==t&&(Q(P,!0),te(null,!0))}}var le=function(e){var n=(0,u.useRef)(),t=(0,u.useRef)(e);t.current=e;var r=u.useCallback((function(e){t.current(e)}),[]);function o(e){e&&(e.removeEventListener(S,r),e.removeEventListener(x,r))}return u.useEffect((function(){return function(){o(n.current)}}),[]),[function(e){n.current&&n.current!==e&&o(n.current),e&&e!==n.current&&(e.addEventListener(S,r),e.addEventListener(x,r),n.current=e)},o]}(ue),ce=(0,a.Z)(le,1)[0],se=u.useMemo((function(){var e,n,t;switch(X){case I:return e={},(0,r.Z)(e,T,h),(0,r.Z)(e,O,Z),(0,r.Z)(e,K,E),e;case R:return n={},(0,r.Z)(n,T,g),(0,r.Z)(n,O,b),(0,r.Z)(n,K,w),n;case M:return t={},(0,r.Z)(t,T,y),(0,r.Z)(t,O,C),(0,r.Z)(t,K,N),t;default:return{}}}),[X]),fe=function(e,n){var t=(0,V.Z)(D),r=(0,a.Z)(t,2),o=r[0],i=r[1],l=function(){var e=u.useRef(null);function n(){L.Z.cancel(e.current)}return u.useEffect((function(){return function(){n()}}),[]),[function t(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;n();var a=(0,L.Z)((function(){o<=1?r({isCanceled:function(){return a!==e.current}}):t(r,o-1)}));e.current=a},n]}(),c=(0,a.Z)(l,2),s=c[0],f=c[1];return _((function(){if(o!==D&&o!==A){var e=z.indexOf(o),t=z[e+1],r=n(o);!1===r?i(t,!0):s((function(e){function n(){e.isCanceled()||i(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,o]),u.useEffect((function(){return function(){f()}}),[]),[function(){i(T,!0)},o]}(X,(function(e){if(e===T){var n=se[T];return!!n&&n(ae())}var t;return ve in se&&te((null===(t=se[ve])||void 0===t?void 0:t.call(se,ae(),null))||null),ve===K&&(ce(ae()),v>0&&(clearTimeout(oe.current),oe.current=setTimeout((function(){ue({deadline:!0})}),v))),true})),de=(0,a.Z)(fe,2),pe=de[0],ve=de[1],me=F(ve);ie.current=me,_((function(){G(n);var t,r=re.current;re.current=!0,e&&(!r&&n&&f&&(t=I),r&&n&&c&&(t=R),(r&&!n&&p||!r&&m&&!n&&p)&&(t=M),t&&(Q(t),pe()))}),[n]),(0,u.useEffect)((function(){(X===I&&!f||X===R&&!c||X===M&&!p)&&Q(P)}),[f,c,p]),(0,u.useEffect)((function(){return function(){re.current=!1,clearTimeout(oe.current)}}),[]);var he=u.useRef(!1);(0,u.useEffect)((function(){Y&&(he.current=!0),void 0!==Y&&X===P&&((he.current||Y)&&(null==H||H(Y)),he.current=!0)}),[Y,X]);var ge=ne;return se[T]&&ve===O&&(ge=(0,o.Z)({transition:"none"},ge)),[X,ve,ge,null!=Y?Y:n]}(Z,s,(function(){try{return b.current instanceof HTMLElement?b.current:(0,l.Z)(C.current)}catch(e){return null}}),e),w=(0,a.Z)(E,4),N=w[0],j=w[1],W=w[2],H=w[3],B=u.useRef(H);H&&(B.current=!0);var U,G=u.useCallback((function(e){b.current=e,(0,c.mH)(n,e)}),[n]),J=(0,o.Z)((0,o.Z)({},y),{},{visible:s});if(m)if(N!==P&&t(e)){var q,X;j===T?X="prepare":F(j)?X="active":j===O&&(X="start"),U=m((0,o.Z)((0,o.Z)({},J),{},{className:f()(k(h,N),(q={},(0,r.Z)(q,k(h,"".concat(N,"-").concat(X)),X),(0,r.Z)(q,h,"string"==typeof h),q)),style:W}),G)}else U=H?m((0,o.Z)({},J),G):!p&&B.current&&g?m((0,o.Z)((0,o.Z)({},J),{},{className:g}),G):v||!p&&!g?m((0,o.Z)((0,o.Z)({},J),{},{style:{display:"none"}}),G):null;else U=null;return u.isValidElement(U)&&(0,c.Yr)(U)&&(U.ref||(U=u.cloneElement(U,{ref:G}))),u.createElement(Y,{ref:C},U)}));return s.displayName="CSSMotion",s}(N),J=t(87462),q=t(45987),X=t(97326),Q="add",$="keep",ee="remove",ne="removed";function te(e){var n;return n=e&&"object"===(0,i.Z)(e)&&"key"in e?e:{key:e},(0,o.Z)((0,o.Z)({},n),{},{key:String(n.key)})}function re(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(te)}var oe=["component","children","onVisibleChanged","onAllRemoved"],ae=["status"],ie=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"],ue=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G,t=function(e){(0,H.Z)(a,e);var t=(0,B.Z)(a);function a(){var e;(0,j.Z)(this,a);for(var n=arguments.length,i=new Array(n),u=0;u<n;u++)i[u]=arguments[u];return e=t.call.apply(t,[this].concat(i)),(0,r.Z)((0,X.Z)(e),"state",{keyEntities:[]}),(0,r.Z)((0,X.Z)(e),"removeKey",(function(n){var t=e.state.keyEntities.map((function(e){return e.key!==n?e:(0,o.Z)((0,o.Z)({},e),{},{status:ne})}));return e.setState({keyEntities:t}),t.filter((function(e){return e.status!==ne})).length})),e}return(0,W.Z)(a,[{key:"render",value:function(){var e=this,t=this.state.keyEntities,r=this.props,o=r.component,a=r.children,i=r.onVisibleChanged,l=r.onAllRemoved,c=(0,q.Z)(r,oe),s=o||u.Fragment,f={};return ie.forEach((function(e){f[e]=c[e],delete c[e]})),delete c.keys,u.createElement(s,c,t.map((function(t){var r=t.status,o=(0,q.Z)(t,ae),c=r===Q||r===$;return u.createElement(n,(0,J.Z)({},f,{key:o.key,visible:c,eventProps:o,onVisibleChanged:function(n){null==i||i(n,{key:o.key}),n||0===e.removeKey(o.key)&&l&&l()}}),a)})))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var t=e.keys,r=n.keyEntities,a=re(t),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=[],r=0,a=n.length,i=re(e),u=re(n);i.forEach((function(e){for(var n=!1,i=r;i<a;i+=1){var l=u[i];if(l.key===e.key){r<i&&(t=t.concat(u.slice(r,i).map((function(e){return(0,o.Z)((0,o.Z)({},e),{},{status:Q})}))),r=i),t.push((0,o.Z)((0,o.Z)({},l),{},{status:$})),r+=1,n=!0;break}}n||t.push((0,o.Z)((0,o.Z)({},e),{},{status:ee}))})),r<a&&(t=t.concat(u.slice(r).map((function(e){return(0,o.Z)((0,o.Z)({},e),{},{status:Q})}))));var l={};return t.forEach((function(e){var n=e.key;l[n]=(l[n]||0)+1})),Object.keys(l).filter((function(e){return l[e]>1})).forEach((function(e){(t=t.filter((function(n){var t=n.key,r=n.status;return t!==e||r!==ee}))).forEach((function(n){n.key===e&&(n.status=$)}))})),t}(r,a);return{keyEntities:i.filter((function(e){var n=r.find((function(n){var t=n.key;return e.key===t}));return!n||n.status!==ne||e.status!==ee}))}}}]),a}(u.Component);return(0,r.Z)(t,"defaultProps",{component:"div"}),t}(N),le=G},35637:function(e,n,t){t.d(n,{q:function(){return m},l:function(){return b}});var r=t(93433),o=t(29439),a=t(45987),i=t(67294),u=t(87462),l=t(1413),c=t(73935),s=t(63441),f=t(94184),d=t.n(f),p=t(4942),v=t(15105),m=i.forwardRef((function(e,n){var t=e.prefixCls,r=e.style,a=e.className,l=e.duration,c=void 0===l?4.5:l,s=e.eventKey,f=e.content,m=e.closable,h=e.closeIcon,g=void 0===h?"x":h,y=e.props,Z=e.onClick,b=e.onNoticeClose,C=e.times,E=i.useState(!1),w=(0,o.Z)(E,2),N=w[0],x=w[1],S=function(){b(s)};i.useEffect((function(){if(!N&&c>0){var e=setTimeout((function(){S()}),1e3*c);return function(){clearTimeout(e)}}}),[c,N,C]);var k="".concat(t,"-notice");return i.createElement("div",(0,u.Z)({},y,{ref:n,className:d()(k,a,(0,p.Z)({},"".concat(k,"-closable"),m)),style:r,onMouseEnter:function(){x(!0)},onMouseLeave:function(){x(!1)},onClick:Z}),i.createElement("div",{className:"".concat(k,"-content")},f),m&&i.createElement("a",{tabIndex:0,className:"".concat(k,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==v.Z.ENTER||S()},onClick:function(e){e.preventDefault(),e.stopPropagation(),S()}},g))})),h=i.forwardRef((function(e,n){var t=e.prefixCls,a=void 0===t?"rc-notification":t,f=e.container,p=e.motion,v=e.maxCount,h=e.className,g=e.style,y=e.onAllRemoved,Z=i.useState([]),b=(0,o.Z)(Z,2),C=b[0],E=b[1],w=function(e){var n,t=C.find((function(n){return n.key===e}));null==t||null===(n=t.onClose)||void 0===n||n.call(t),E((function(n){return n.filter((function(n){return n.key!==e}))}))};i.useImperativeHandle(n,(function(){return{open:function(e){E((function(n){var t,o=(0,r.Z)(n),a=o.findIndex((function(n){return n.key===e.key})),i=(0,l.Z)({},e);return a>=0?(i.times=((null===(t=n[a])||void 0===t?void 0:t.times)||0)+1,o[a]=i):(i.times=0,o.push(i)),v>0&&o.length>v&&(o=o.slice(-v)),o}))},close:function(e){w(e)},destroy:function(){E([])}}}));var N=i.useState({}),x=(0,o.Z)(N,2),S=x[0],k=x[1];i.useEffect((function(){var e={};C.forEach((function(n){var t=n.placement,r=void 0===t?"topRight":t;r&&(e[r]=e[r]||[],e[r].push(n))})),Object.keys(S).forEach((function(n){e[n]=e[n]||[]})),k(e)}),[C]);var P=i.useRef(!1);if(i.useEffect((function(){Object.keys(S).length>0?P.current=!0:P.current&&(null==y||y(),P.current=!1)}),[S]),!f)return null;var I=Object.keys(S);return(0,c.createPortal)(i.createElement(i.Fragment,null,I.map((function(e){var n=S[e].map((function(e){return{config:e,key:e.key}})),t="function"==typeof p?p(e):p;return i.createElement(s.V,(0,u.Z)({key:e,className:d()(a,"".concat(a,"-").concat(e),null==h?void 0:h(e)),style:null==g?void 0:g(e),keys:n,motionAppear:!0},t,{onAllRemoved:function(){!function(e){k((function(n){var t=(0,l.Z)({},n);return(t[e]||[]).length||delete t[e],t}))}(e)}}),(function(e,n){var t=e.config,r=e.className,o=e.style,c=t.key,s=t.times,f=t.className,p=t.style;return i.createElement(m,(0,u.Z)({},t,{ref:n,prefixCls:a,className:d()(r,f),style:(0,l.Z)((0,l.Z)({},o),p),times:s,key:c,eventKey:c,onNoticeClose:w}))}))}))),f)})),g=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved"],y=function(){return document.body},Z=0;function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.getContainer,t=void 0===n?y:n,u=e.motion,l=e.prefixCls,c=e.maxCount,s=e.className,f=e.style,d=e.onAllRemoved,p=(0,a.Z)(e,g),v=i.useState(),m=(0,o.Z)(v,2),b=m[0],C=m[1],E=i.useRef(),w=i.createElement(h,{container:b,ref:E,prefixCls:l,motion:u,maxCount:c,className:s,style:f,onAllRemoved:d}),N=i.useState([]),x=(0,o.Z)(N,2),S=x[0],k=x[1],P=i.useMemo((function(){return{open:function(e){var n=function(){for(var e={},n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return t.forEach((function(n){n&&Object.keys(n).forEach((function(t){var r=n[t];void 0!==r&&(e[t]=r)}))})),e}(p,e);null!==n.key&&void 0!==n.key||(n.key="rc-notification-".concat(Z),Z+=1),k((function(e){return[].concat((0,r.Z)(e),[{type:"open",config:n}])}))},close:function(e){k((function(n){return[].concat((0,r.Z)(n),[{type:"close",key:e}])}))},destroy:function(){k((function(e){return[].concat((0,r.Z)(e),[{type:"destroy"}])}))}}}),[]);return i.useEffect((function(){C(t())})),i.useEffect((function(){E.current&&S.length&&(S.forEach((function(e){switch(e.type){case"open":E.current.open(e.config);break;case"close":E.current.close(e.key);break;case"destroy":E.current.destroy()}})),k([]))}),[S]),[P,w]}},26120:function(e,n,t){t.d(n,{Z:function(){return O}});var r=t(87462),o=t(1413),a=t(29439),i=t(45987),u=t(67294),l=t(94184),c=t.n(l),s=t(48717),f=t(8410),d=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],p=void 0;function v(e,n){var t=e.prefixCls,a=e.invalidate,l=e.item,f=e.renderItem,v=e.responsive,m=e.responsiveDisabled,h=e.registerSize,g=e.itemKey,y=e.className,Z=e.style,b=e.children,C=e.display,E=e.order,w=e.component,N=void 0===w?"div":w,x=(0,i.Z)(e,d),S=v&&!C;function k(e){h(g,e)}u.useEffect((function(){return function(){k(null)}}),[]);var P,I=f&&l!==p?f(l):b;a||(P={opacity:S?0:1,height:S?0:p,overflowY:S?"hidden":p,order:v?E:p,pointerEvents:S?"none":p,position:S?"absolute":p});var R={};S&&(R["aria-hidden"]=!0);var M=u.createElement(N,(0,r.Z)({className:c()(!a&&t,y),style:(0,o.Z)((0,o.Z)({},P),Z)},R,x,{ref:n}),I);return v&&(M=u.createElement(s.Z,{onResize:function(e){k(e.offsetWidth)},disabled:m},M)),M}var m=u.forwardRef(v);m.displayName="Item";var h=m,g=t(66680),y=t(73935),Z=t(75164);function b(e,n){var t=u.useState(n),r=(0,a.Z)(t,2),o=r[0],i=r[1];return[o,(0,g.Z)((function(n){e((function(){i(n)}))}))]}var C=["component"],E=["className"],w=["className"],N=function(e,n){var t=u.useContext(P);if(!t){var o=e.component,a=void 0===o?"div":o,l=(0,i.Z)(e,C);return u.createElement(a,(0,r.Z)({},l,{ref:n}))}var s=t.className,f=(0,i.Z)(t,E),d=e.className,p=(0,i.Z)(e,w);return u.createElement(P.Provider,{value:null},u.createElement(h,(0,r.Z)({ref:n,className:c()(s,d)},f,p)))},x=u.forwardRef(N);x.displayName="RawItem";var S=x,k=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],P=u.createContext(null),I="responsive",R="invalidate";function M(e){return"+ ".concat(e.length," ...")}function D(e,n){var t,l=e.prefixCls,d=void 0===l?"rc-overflow":l,p=e.data,v=void 0===p?[]:p,m=e.renderItem,g=e.renderRawItem,C=e.itemKey,E=e.itemWidth,w=void 0===E?10:E,N=e.ssr,x=e.style,S=e.className,D=e.maxCount,T=e.renderRest,O=e.renderRawRest,K=e.suffix,A=e.component,V=void 0===A?"div":A,L=e.itemComponent,_=e.onVisibleChange,z=(0,i.Z)(e,k),F="full"===N,j=(t=u.useRef(null),function(e){t.current||(t.current=[],function(e){if("undefined"==typeof MessageChannel)(0,Z.Z)(e);else{var n=new MessageChannel;n.port1.onmessage=function(){return e()},n.port2.postMessage(void 0)}}((function(){(0,y.unstable_batchedUpdates)((function(){t.current.forEach((function(e){e()})),t.current=null}))}))),t.current.push(e)}),W=b(j,null),H=(0,a.Z)(W,2),B=H[0],U=H[1],Y=B||0,G=b(j,new Map),J=(0,a.Z)(G,2),q=J[0],X=J[1],Q=b(j,0),$=(0,a.Z)(Q,2),ee=$[0],ne=$[1],te=b(j,0),re=(0,a.Z)(te,2),oe=re[0],ae=re[1],ie=b(j,0),ue=(0,a.Z)(ie,2),le=ue[0],ce=ue[1],se=(0,u.useState)(null),fe=(0,a.Z)(se,2),de=fe[0],pe=fe[1],ve=(0,u.useState)(null),me=(0,a.Z)(ve,2),he=me[0],ge=me[1],ye=u.useMemo((function(){return null===he&&F?Number.MAX_SAFE_INTEGER:he||0}),[he,B]),Ze=(0,u.useState)(!1),be=(0,a.Z)(Ze,2),Ce=be[0],Ee=be[1],we="".concat(d,"-item"),Ne=Math.max(ee,oe),xe=D===I,Se=v.length&&xe,ke=D===R,Pe=Se||"number"==typeof D&&v.length>D,Ie=(0,u.useMemo)((function(){var e=v;return Se?e=null===B&&F?v:v.slice(0,Math.min(v.length,Y/w)):"number"==typeof D&&(e=v.slice(0,D)),e}),[v,w,B,D,Se]),Re=(0,u.useMemo)((function(){return Se?v.slice(ye+1):v.slice(Ie.length)}),[v,Ie,Se,ye]),Me=(0,u.useCallback)((function(e,n){var t;return"function"==typeof C?C(e):null!==(t=C&&(null==e?void 0:e[C]))&&void 0!==t?t:n}),[C]),De=(0,u.useCallback)(m||function(e){return e},[m]);function Te(e,n,t){(he!==e||void 0!==n&&n!==de)&&(ge(e),t||(Ee(e<v.length-1),null==_||_(e)),void 0!==n&&pe(n))}function Oe(e,n){X((function(t){var r=new Map(t);return null===n?r.delete(e):r.set(e,n),r}))}function Ke(e){return q.get(Me(Ie[e],e))}(0,f.Z)((function(){if(Y&&"number"==typeof Ne&&Ie){var e=le,n=Ie.length,t=n-1;if(!n)return void Te(0,null);for(var r=0;r<n;r+=1){var o=Ke(r);if(F&&(o=o||0),void 0===o){Te(r-1,void 0,!0);break}if(e+=o,0===t&&e<=Y||r===t-1&&e+Ke(t)<=Y){Te(t,null);break}if(e+Ne>Y){Te(r-1,e-o-le+oe);break}}K&&Ke(0)+le>Y&&pe(null)}}),[Y,q,oe,le,Me,Ie]);var Ae=Ce&&!!Re.length,Ve={};null!==de&&Se&&(Ve={position:"absolute",left:de,top:0});var Le,_e={prefixCls:we,responsive:Se,component:L,invalidate:ke},ze=g?function(e,n){var t=Me(e,n);return u.createElement(P.Provider,{key:t,value:(0,o.Z)((0,o.Z)({},_e),{},{order:n,item:e,itemKey:t,registerSize:Oe,display:n<=ye})},g(e,n))}:function(e,n){var t=Me(e,n);return u.createElement(h,(0,r.Z)({},_e,{order:n,key:t,item:e,renderItem:De,itemKey:t,registerSize:Oe,display:n<=ye}))},Fe={order:Ae?ye:Number.MAX_SAFE_INTEGER,className:"".concat(we,"-rest"),registerSize:function(e,n){ae(n),ne(oe)},display:Ae};if(O)O&&(Le=u.createElement(P.Provider,{value:(0,o.Z)((0,o.Z)({},_e),Fe)},O(Re)));else{var je=T||M;Le=u.createElement(h,(0,r.Z)({},_e,Fe),"function"==typeof je?je(Re):je)}var We=u.createElement(V,(0,r.Z)({className:c()(!ke&&d,S),style:x,ref:n},z),Ie.map(ze),Pe?Le:null,K&&u.createElement(h,(0,r.Z)({},_e,{responsive:xe,responsiveDisabled:!Se,order:ye,className:"".concat(we,"-suffix"),registerSize:function(e,n){ce(n)},display:!0,style:Ve}),K));return xe&&(We=u.createElement(s.Z,{onResize:function(e,n){U(n.clientWidth)},disabled:!Se},We)),We}var T=u.forwardRef(D);T.displayName="Overflow",T.Item=S,T.RESPONSIVE=I,T.INVALIDATE=R;var O=T},72874:function(e,n,t){t.d(n,{Z:function(){return w}});var r=t(87462),o=t(4942),a=t(1413),i=t(15671),u=t(43144),l=t(60136),c=t(29388),s=t(94184),f=t.n(s),d=t(67294),p=13,v=38,m=40,h=function(e){(0,l.Z)(t,e);var n=(0,c.Z)(t);function t(){var e;(0,i.Z)(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=n.call.apply(n,[this].concat(o))).state={goInputText:""},e.getValidValue=function(){var n=e.state.goInputText;return!n||Number.isNaN(n)?void 0:Number(n)},e.buildOptionText=function(n){return"".concat(n," ").concat(e.props.locale.items_per_page)},e.changeSize=function(n){e.props.changeSize(Number(n))},e.handleChange=function(n){e.setState({goInputText:n.target.value})},e.handleBlur=function(n){var t=e.props,r=t.goButton,o=t.quickGo,a=t.rootPrefixCls,i=e.state.goInputText;r||""===i||(e.setState({goInputText:""}),n.relatedTarget&&(n.relatedTarget.className.indexOf("".concat(a,"-item-link"))>=0||n.relatedTarget.className.indexOf("".concat(a,"-item"))>=0)||o(e.getValidValue()))},e.go=function(n){""!==e.state.goInputText&&(n.keyCode!==p&&"click"!==n.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return(0,u.Z)(t,[{key:"getPageSizeOptions",value:function(){var e=this.props,n=e.pageSize,t=e.pageSizeOptions;return t.some((function(e){return e.toString()===n.toString()}))?t:t.concat([n.toString()]).sort((function(e,n){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(n))?0:Number(n))}))}},{key:"render",value:function(){var e=this,n=this.props,t=n.pageSize,r=n.locale,o=n.rootPrefixCls,a=n.changeSize,i=n.quickGo,u=n.goButton,l=n.selectComponentClass,c=n.buildOptionText,s=n.selectPrefixCls,f=n.disabled,p=this.state.goInputText,v="".concat(o,"-options"),m=l,h=null,g=null,y=null;if(!a&&!i)return null;var Z=this.getPageSizeOptions();if(a&&m){var b=Z.map((function(n,t){return d.createElement(m.Option,{key:t,value:n.toString()},(c||e.buildOptionText)(n))}));h=d.createElement(m,{disabled:f,prefixCls:s,showSearch:!1,className:"".concat(v,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(t||Z[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode},"aria-label":r.page_size,defaultOpen:!1},b)}return i&&(u&&(y="boolean"==typeof u?d.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:f,className:"".concat(v,"-quick-jumper-button")},r.jump_to_confirm):d.createElement("span",{onClick:this.go,onKeyUp:this.go},u)),g=d.createElement("div",{className:"".concat(v,"-quick-jumper")},r.jump_to,d.createElement("input",{disabled:f,type:"text",value:p,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":r.page}),r.page,y)),d.createElement("li",{className:"".concat(v)},h,g)}}]),t}(d.Component);h.defaultProps={pageSizeOptions:["10","20","50","100"]};var g=h,y=function(e){var n,t=e.rootPrefixCls,r=e.page,a=e.active,i=e.className,u=e.showTitle,l=e.onClick,c=e.onKeyPress,s=e.itemRender,p="".concat(t,"-item"),v=f()(p,"".concat(p,"-").concat(r),(n={},(0,o.Z)(n,"".concat(p,"-active"),a),(0,o.Z)(n,"".concat(p,"-disabled"),!r),(0,o.Z)(n,e.className,i),n));return d.createElement("li",{title:u?r.toString():null,className:v,onClick:function(){l(r)},onKeyPress:function(e){c(e,l,r)},tabIndex:0},s(r,"page",d.createElement("a",{rel:"nofollow"},r)))};function Z(){}function b(e){var n=Number(e);return"number"==typeof n&&!Number.isNaN(n)&&isFinite(n)&&Math.floor(n)===n}function C(e,n,t){var r=void 0===e?n.pageSize:e;return Math.floor((t.total-1)/r)+1}var E=function(e){(0,l.Z)(t,e);var n=(0,c.Z)(t);function t(e){var r;(0,i.Z)(this,t),(r=n.call(this,e)).paginationNode=d.createRef(),r.getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(C(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,n){var t=r.props.prefixCls,o=e||d.createElement("button",{type:"button","aria-label":n,className:"".concat(t,"-item-link")});return"function"==typeof e&&(o=d.createElement(e,(0,a.Z)({},r.props))),o},r.isValid=function(e){var n=r.props.total;return b(e)&&e!==r.state.current&&b(n)&&n>0},r.shouldDisplayQuickJumper=function(){var e=r.props,n=e.showQuickJumper;return!(e.total<=r.state.pageSize)&&n},r.handleKeyDown=function(e){e.keyCode!==v&&e.keyCode!==m||e.preventDefault()},r.handleKeyUp=function(e){var n=r.getValidValue(e);n!==r.state.currentInputValue&&r.setState({currentInputValue:n}),e.keyCode===p?r.handleChange(n):e.keyCode===v?r.handleChange(n-1):e.keyCode===m&&r.handleChange(n+1)},r.handleBlur=function(e){var n=r.getValidValue(e);r.handleChange(n)},r.changePageSize=function(e){var n=r.state.current,t=C(e,r.state,r.props);n=n>t?t:n,0===t&&(n=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:n,currentInputValue:n})),r.props.onShowSizeChange(n,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(n,e)},r.handleChange=function(e){var n=r.props,t=n.disabled,o=n.onChange,a=r.state,i=a.pageSize,u=a.current,l=a.currentInputValue;if(r.isValid(e)&&!t){var c=C(void 0,r.state,r.props),s=e;return e>c?s=c:e<1&&(s=1),"current"in r.props||r.setState({current:s}),s!==l&&r.setState({currentInputValue:s}),o(s,i),s}return u},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<C(void 0,r.state,r.props)},r.runIfEnter=function(e,n){if("Enter"===e.key||13===e.charCode){for(var t=arguments.length,r=new Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];n.apply(void 0,r)}},r.runIfEnterPrev=function(e){r.runIfEnter(e,r.prev)},r.runIfEnterNext=function(e){r.runIfEnter(e,r.next)},r.runIfEnterJumpPrev=function(e){r.runIfEnter(e,r.jumpPrev)},r.runIfEnterJumpNext=function(e){r.runIfEnter(e,r.jumpNext)},r.handleGoTO=function(e){e.keyCode!==p&&"click"!==e.type||r.handleChange(r.state.currentInputValue)},r.renderPrev=function(e){var n=r.props,t=n.prevIcon,o=(0,n.itemRender)(e,"prev",r.getItemIcon(t,"prev page")),a=!r.hasPrev();return(0,d.isValidElement)(o)?(0,d.cloneElement)(o,{disabled:a}):o},r.renderNext=function(e){var n=r.props,t=n.nextIcon,o=(0,n.itemRender)(e,"next",r.getItemIcon(t,"next page")),a=!r.hasNext();return(0,d.isValidElement)(o)?(0,d.cloneElement)(o,{disabled:a}):o};var o=e.onChange!==Z;"current"in e&&!o&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var u=e.defaultCurrent;"current"in e&&(u=e.current);var l=e.defaultPageSize;return"pageSize"in e&&(l=e.pageSize),u=Math.min(u,C(l,void 0,e)),r.state={current:u,currentInputValue:u,pageSize:l},r}return(0,u.Z)(t,[{key:"componentDidUpdate",value:function(e,n){var t=this.props.prefixCls;if(n.current!==this.state.current&&this.paginationNode.current){var r,o=this.paginationNode.current.querySelector(".".concat(t,"-item-").concat(n.current));o&&document.activeElement===o&&(null==o||null===(r=o.blur)||void 0===r||r.call(o))}}},{key:"getValidValue",value:function(e){var n=e.target.value,t=C(void 0,this.state,this.props),r=this.state.currentInputValue;return""===n?n:Number.isNaN(Number(n))?r:n>=t?t:Number(n)}},{key:"getShowSizeChanger",value:function(){var e=this.props,n=e.showSizeChanger,t=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==n?n:t>r}},{key:"render",value:function(){var e=this,n=this.props,t=n.prefixCls,a=n.className,i=n.style,u=n.disabled,l=n.hideOnSinglePage,c=n.total,s=n.locale,p=n.showQuickJumper,v=n.showLessItems,m=n.showTitle,h=n.showTotal,Z=n.simple,b=n.itemRender,E=n.showPrevNextJumpers,w=n.jumpPrevIcon,N=n.jumpNextIcon,x=n.selectComponentClass,S=n.selectPrefixCls,k=n.pageSizeOptions,P=this.state,I=P.current,R=P.pageSize,M=P.currentInputValue;if(!0===l&&c<=R)return null;var D=C(void 0,this.state,this.props),T=[],O=null,K=null,A=null,V=null,L=null,_=p&&p.goButton,z=v?1:2,F=I-1>0?I-1:0,j=I+1<D?I+1:D,W=Object.keys(this.props).reduce((function(n,t){return"data-"!==t.substr(0,5)&&"aria-"!==t.substr(0,5)&&"role"!==t||(n[t]=e.props[t]),n}),{}),H=h&&d.createElement("li",{className:"".concat(t,"-total-text")},h(c,[0===c?0:(I-1)*R+1,I*R>c?c:I*R]));if(Z)return _&&(L="boolean"==typeof _?d.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},s.jump_to_confirm):d.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},_),L=d.createElement("li",{title:m?"".concat(s.jump_to).concat(I,"/").concat(D):null,className:"".concat(t,"-simple-pager")},L)),d.createElement("ul",(0,r.Z)({className:f()(t,"".concat(t,"-simple"),(0,o.Z)({},"".concat(t,"-disabled"),u),a),style:i,ref:this.paginationNode},W),H,d.createElement("li",{title:m?s.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:f()("".concat(t,"-prev"),(0,o.Z)({},"".concat(t,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(F)),d.createElement("li",{title:m?"".concat(I,"/").concat(D):null,className:"".concat(t,"-simple-pager")},d.createElement("input",{type:"text",value:M,disabled:u,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),d.createElement("span",{className:"".concat(t,"-slash")},"/"),D),d.createElement("li",{title:m?s.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:f()("".concat(t,"-next"),(0,o.Z)({},"".concat(t,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(j)),L);if(D<=3+2*z){var B={locale:s,rootPrefixCls:t,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:m,itemRender:b};D||T.push(d.createElement(y,(0,r.Z)({},B,{key:"noPager",page:1,className:"".concat(t,"-item-disabled")})));for(var U=1;U<=D;U+=1){var Y=I===U;T.push(d.createElement(y,(0,r.Z)({},B,{key:U,page:U,active:Y})))}}else{var G=v?s.prev_3:s.prev_5,J=v?s.next_3:s.next_5;E&&(O=d.createElement("li",{title:m?G:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:f()("".concat(t,"-jump-prev"),(0,o.Z)({},"".concat(t,"-jump-prev-custom-icon"),!!w))},b(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(w,"prev page"))),K=d.createElement("li",{title:m?J:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:f()("".concat(t,"-jump-next"),(0,o.Z)({},"".concat(t,"-jump-next-custom-icon"),!!N))},b(this.getJumpNextPage(),"jump-next",this.getItemIcon(N,"next page")))),V=d.createElement(y,{locale:s,last:!0,rootPrefixCls:t,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:D,page:D,active:!1,showTitle:m,itemRender:b}),A=d.createElement(y,{locale:s,rootPrefixCls:t,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:m,itemRender:b});var q=Math.max(1,I-z),X=Math.min(I+z,D);I-1<=z&&(X=1+2*z),D-I<=z&&(q=D-2*z);for(var Q=q;Q<=X;Q+=1){var $=I===Q;T.push(d.createElement(y,{locale:s,rootPrefixCls:t,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Q,page:Q,active:$,showTitle:m,itemRender:b}))}I-1>=2*z&&3!==I&&(T[0]=(0,d.cloneElement)(T[0],{className:"".concat(t,"-item-after-jump-prev")}),T.unshift(O)),D-I>=2*z&&I!==D-2&&(T[T.length-1]=(0,d.cloneElement)(T[T.length-1],{className:"".concat(t,"-item-before-jump-next")}),T.push(K)),1!==q&&T.unshift(A),X!==D&&T.push(V)}var ee=!this.hasPrev()||!D,ne=!this.hasNext()||!D;return d.createElement("ul",(0,r.Z)({className:f()(t,a,(0,o.Z)({},"".concat(t,"-disabled"),u)),style:i,ref:this.paginationNode},W),H,d.createElement("li",{title:m?s.prev_page:null,onClick:this.prev,tabIndex:ee?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(t,"-prev"),(0,o.Z)({},"".concat(t,"-disabled"),ee)),"aria-disabled":ee},this.renderPrev(F)),T,d.createElement("li",{title:m?s.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(t,"-next"),(0,o.Z)({},"".concat(t,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(j)),d.createElement(g,{disabled:u,locale:s,rootPrefixCls:t,selectComponentClass:x,selectPrefixCls:S,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:I,pageSize:R,pageSizeOptions:k,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:_}))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var t={};if("current"in e&&(t.current=e.current,e.current!==n.current&&(t.currentInputValue=t.current)),"pageSize"in e&&e.pageSize!==n.pageSize){var r=n.current,o=C(e.pageSize,n,e);r=r>o?o:r,"current"in e||(t.current=r,t.currentInputValue=r),t.pageSize=e.pageSize}return t}}]),t}(d.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Z,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Z,locale:{items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},style:{},itemRender:function(e,n,t){return t},totalBoundaryShowSizeChanger:50};var w=E},62906:function(e,n){n.Z={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"}},18758:function(e,n){n.Z={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}},43094:function(e,n,t){t.d(n,{Cd:function(){return E}});var r=t(87462),o=t(45987),a=t(67294),i=t(94184),u=t.n(i),l={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},c=function(){var e=(0,a.useRef)([]),n=(0,a.useRef)(null);return(0,a.useEffect)((function(){var t=Date.now(),r=!1;e.current.forEach((function(e){if(e){r=!0;var o=e.style;o.transitionDuration=".3s, .3s, .3s, .06s",n.current&&t-n.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),e.current},s=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],f=function(e){var n=e.className,t=e.percent,i=e.prefixCls,l=e.strokeColor,f=e.strokeLinecap,d=e.strokeWidth,p=e.style,v=e.trailColor,m=e.trailWidth,h=e.transition,g=(0,o.Z)(e,s);delete g.gapPosition;var y=Array.isArray(t)?t:[t],Z=Array.isArray(l)?l:[l],b=c(),C=d/2,E=100-d/2,w="M ".concat("round"===f?C:0,",").concat(C,"\n L ").concat("round"===f?E:100,",").concat(C),N="0 0 100 ".concat(d),x=0;return a.createElement("svg",(0,r.Z)({className:u()("".concat(i,"-line"),n),viewBox:N,preserveAspectRatio:"none",style:p},g),a.createElement("path",{className:"".concat(i,"-line-trail"),d:w,strokeLinecap:f,stroke:v,strokeWidth:m||d,fillOpacity:"0"}),y.map((function(e,n){var t=1;switch(f){case"round":t=1-d/100;break;case"square":t=1-d/2/100;break;default:t=1}var r={strokeDasharray:"".concat(e*t,"px, 100px"),strokeDashoffset:"-".concat(x,"px"),transition:h||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},o=Z[n]||Z[Z.length-1];return x+=e,a.createElement("path",{key:n,className:"".concat(i,"-line-path"),d:w,strokeLinecap:f,stroke:o,strokeWidth:d,fillOpacity:"0",ref:function(e){b[n]=e},style:r})})))};f.defaultProps=l,f.displayName="Line";var d=t(71002),p=t(29439),v=t(98924),m=0,h=(0,v.Z)(),g=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function y(e){return+e.replace("%","")}function Z(e){var n=null!=e?e:[];return Array.isArray(n)?n:[n]}var b=function(e,n,t,r,o,a,i,u,l,c){var s=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,f=t/100*360*((360-a)/360),d=0===a?0:{bottom:0,top:180,left:90,right:-90}[i],p=(100-r)/100*n;return"round"===l&&100!==r&&(p+=c/2)>=n&&(p=n-.01),{stroke:"string"==typeof u?u:void 0,strokeDasharray:"".concat(n,"px ").concat(e),strokeDashoffset:p+s,transform:"rotate(".concat(o+f+d,"deg)"),transformOrigin:"0 0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},C=function(e){var n,t,i,l=e.id,s=e.prefixCls,f=e.steps,v=e.strokeWidth,C=e.trailWidth,E=e.gapDegree,w=void 0===E?0:E,N=e.gapPosition,x=e.trailColor,S=e.strokeLinecap,k=e.style,P=e.className,I=e.strokeColor,R=e.percent,M=(0,o.Z)(e,g),D=function(e){var n=a.useState(),t=(0,p.Z)(n,2),r=t[0],o=t[1];return a.useEffect((function(){var e;o("rc_progress_".concat((h?(e=m,m+=1):e="TEST_OR_SSR",e)))}),[]),e||r}(l),T="".concat(D,"-gradient"),O=50-v/2,K=2*Math.PI*O,A=w>0?90+w/2:-90,V=K*((360-w)/360),L="object"===(0,d.Z)(f)?f:{count:f,space:2},_=L.count,z=L.space,F=b(K,V,0,100,A,w,N,x,S,v),j=Z(R),W=Z(I),H=W.find((function(e){return e&&"object"===(0,d.Z)(e)})),B=c();return a.createElement("svg",(0,r.Z)({className:u()("".concat(s,"-circle"),P),viewBox:"".concat(-50," ").concat(-50," ").concat(100," ").concat(100),style:k,id:l,role:"presentation"},M),H&&a.createElement("defs",null,a.createElement("linearGradient",{id:T,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(H).sort((function(e,n){return y(e)-y(n)})).map((function(e,n){return a.createElement("stop",{key:n,offset:e,stopColor:H[e]})})))),!_&&a.createElement("circle",{className:"".concat(s,"-circle-trail"),r:O,cx:0,cy:0,stroke:x,strokeLinecap:S,strokeWidth:C||v,style:F}),_?(n=Math.round(_*(j[0]/100)),t=100/_,i=0,new Array(_).fill(null).map((function(e,r){var o=r<=n-1?W[0]:x,u=o&&"object"===(0,d.Z)(o)?"url(#".concat(T,")"):void 0,l=b(K,V,i,t,A,w,N,o,"butt",v,z);return i+=100*(V-l.strokeDashoffset+z)/V,a.createElement("circle",{key:r,className:"".concat(s,"-circle-path"),r:O,cx:0,cy:0,stroke:u,strokeWidth:v,opacity:1,style:l,ref:function(e){B[r]=e}})}))):function(){var e=0;return j.map((function(n,t){var r=W[t]||W[W.length-1],o=r&&"object"===(0,d.Z)(r)?"url(#".concat(T,")"):void 0,i=b(K,V,e,n,A,w,N,r,S,v);return e+=n,a.createElement("circle",{key:t,className:"".concat(s,"-circle-path"),r:O,cx:0,cy:0,stroke:o,strokeLinecap:S,strokeWidth:v,opacity:0===n?0:1,style:i,ref:function(e){B[t]=e}})})).reverse()}())};C.defaultProps=l,C.displayName="Circle";var E=C},48717:function(e,n,t){t.d(n,{Z:function(){return E}});var r=t(87462),o=t(67294),a=t(50344),i=(t(80334),t(1413)),u=t(42550),l=t(34203),c=t(91033),s=new Map,f=new c.Z((function(e){e.forEach((function(e){var n,t=e.target;null===(n=s.get(t))||void 0===n||n.forEach((function(e){return e(t)}))}))})),d=t(15671),p=t(43144),v=t(60136),m=t(29388),h=function(e){(0,v.Z)(t,e);var n=(0,m.Z)(t);function t(){return(0,d.Z)(this,t),n.apply(this,arguments)}return(0,p.Z)(t,[{key:"render",value:function(){return this.props.children}}]),t}(o.Component),g=o.createContext(null);function y(e,n){var t=e.children,r=e.disabled,a=o.useRef(null),c=o.useRef(null),d=o.useContext(g),p="function"==typeof t,v=p?t(a):t,m=o.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),y=!p&&o.isValidElement(v)&&(0,u.Yr)(v),Z=y?v.ref:null,b=o.useMemo((function(){return(0,u.sQ)(Z,a)}),[Z,a]),C=function(){return(0,l.Z)(a.current)||(0,l.Z)(c.current)};o.useImperativeHandle(n,(function(){return C()}));var E=o.useRef(e);E.current=e;var w=o.useCallback((function(e){var n=E.current,t=n.onResize,r=n.data,o=e.getBoundingClientRect(),a=o.width,u=o.height,l=e.offsetWidth,c=e.offsetHeight,s=Math.floor(a),f=Math.floor(u);if(m.current.width!==s||m.current.height!==f||m.current.offsetWidth!==l||m.current.offsetHeight!==c){var p={width:s,height:f,offsetWidth:l,offsetHeight:c};m.current=p;var v=l===Math.round(a)?a:l,h=c===Math.round(u)?u:c,g=(0,i.Z)((0,i.Z)({},p),{},{offsetWidth:v,offsetHeight:h});null==d||d(g,e,r),t&&Promise.resolve().then((function(){t(g,e)}))}}),[]);return o.useEffect((function(){var e,n,t=C();return t&&!r&&(e=t,n=w,s.has(e)||(s.set(e,new Set),f.observe(e)),s.get(e).add(n)),function(){return function(e,n){s.has(e)&&(s.get(e).delete(n),s.get(e).size||(f.unobserve(e),s.delete(e)))}(t,w)}}),[a.current,r]),o.createElement(h,{ref:c},y?o.cloneElement(v,{ref:b}):v)}var Z=o.forwardRef(y);function b(e,n){var t=e.children;return("function"==typeof t?[t]:(0,a.Z)(t)).map((function(t,a){var i=(null==t?void 0:t.key)||"".concat("rc-observer-key","-").concat(a);return o.createElement(Z,(0,r.Z)({},e,{key:i,ref:0===a?n:void 0}),t)}))}var C=o.forwardRef(b);C.Collection=function(e){var n=e.children,t=e.onBatchResize,r=o.useRef(0),a=o.useRef([]),i=o.useContext(g),u=o.useCallback((function(e,n,o){r.current+=1;var u=r.current;a.current.push({size:e,element:n,data:o}),Promise.resolve().then((function(){u===r.current&&(null==t||t(a.current),a.current=[])})),null==i||i(e,n,o)}),[t,i]);return o.createElement(g.Provider,{value:u},n)};var E=C},88708:function(e,n,t){t.d(n,{ZP:function(){return l}});var r=t(29439),o=t(67294),a=t(98924),i=0,u=(0,a.Z)();function l(e){var n=o.useState(),t=(0,r.Z)(n,2),a=t[0],l=t[1];return o.useEffect((function(){var e;l("rc_select_".concat((u?(e=i,i+=1):e="TEST_OR_SSR",e)))}),[]),e||a}},74484:function(e,n,t){t.d(n,{Ac:function(){return Q},Xo:function(){return ue},Wx:function(){return ce},ZP:function(){return we},lk:function(){return b}});var r=t(87462),o=t(93433),a=t(4942),i=t(1413),u=t(29439),l=t(45987),c=t(71002),s=t(21770),f=t(80334),d=t(67294),p=t(94184),v=t.n(p),m=t(8410),h=t(31131),g=t(15105),y=t(42550),Z=d.createContext(null);function b(){return d.useContext(Z)}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,n=d.useRef(null),t=d.useRef(null);return d.useEffect((function(){return function(){window.clearTimeout(t.current)}}),[]),[function(){return n.current},function(r){(r||null===n.current)&&(n.current=r),window.clearTimeout(t.current),t.current=window.setTimeout((function(){n.current=null}),e)}]}var E=t(64217),w=t(26120),N=function(e){var n,t=e.className,r=e.customizeIcon,o=e.customizeIconProps,a=e.onMouseDown,i=e.onClick,u=e.children;return n="function"==typeof r?r(o):r,d.createElement("span",{className:t,onMouseDown:function(e){e.preventDefault(),a&&a(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:i,"aria-hidden":!0},void 0!==n?n:d.createElement("span",{className:v()(t.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},u))},x=function(e,n){var t,r,o=e.prefixCls,a=e.id,u=e.inputElement,l=e.disabled,c=e.tabIndex,s=e.autoFocus,p=e.autoComplete,m=e.editable,h=e.activeDescendantId,g=e.value,Z=e.maxLength,b=e.onKeyDown,C=e.onMouseDown,E=e.onChange,w=e.onPaste,N=e.onCompositionStart,x=e.onCompositionEnd,S=e.open,k=e.attrs,P=u||d.createElement("input",null),I=P,R=I.ref,M=I.props,D=M.onKeyDown,T=M.onChange,O=M.onMouseDown,K=M.onCompositionStart,A=M.onCompositionEnd,V=M.style;return(0,f.Kp)(!("maxLength"in P.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),d.cloneElement(P,(0,i.Z)((0,i.Z)((0,i.Z)({type:"search"},M),{},{id:a,ref:(0,y.sQ)(n,R),disabled:l,tabIndex:c,autoComplete:p||"off",autoFocus:s,className:v()("".concat(o,"-selection-search-input"),null===(t=P)||void 0===t||null===(r=t.props)||void 0===r?void 0:r.className),role:"combobox","aria-expanded":S,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":h},k),{},{value:m?g:"",maxLength:Z,readOnly:!m,unselectable:m?null:"on",style:(0,i.Z)((0,i.Z)({},V),{},{opacity:m?null:0}),onKeyDown:function(e){b(e),D&&D(e)},onMouseDown:function(e){C(e),O&&O(e)},onChange:function(e){E(e),T&&T(e)},onCompositionStart:function(e){N(e),K&&K(e)},onCompositionEnd:function(e){x(e),A&&A(e)},onPaste:w}))},S=d.forwardRef(x);S.displayName="Input";var k=S;function P(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var I="undefined"!=typeof window&&window.document&&window.document.documentElement;function R(e){return["string","number"].includes((0,c.Z)(e))}function M(e){var n=void 0;return e&&(R(e.title)?n=e.title.toString():R(e.label)&&(n=e.label.toString())),n}function D(e){var n;return null!==(n=e.key)&&void 0!==n?n:e.value}var T=function(e){e.preventDefault(),e.stopPropagation()},O=function(e){var n,t,r=e.id,o=e.prefixCls,i=e.values,l=e.open,c=e.searchValue,s=e.autoClearSearchValue,f=e.inputRef,p=e.placeholder,m=e.disabled,h=e.mode,g=e.showSearch,y=e.autoFocus,Z=e.autoComplete,b=e.activeDescendantId,C=e.tabIndex,x=e.removeIcon,S=e.maxTagCount,P=e.maxTagTextLength,R=e.maxTagPlaceholder,O=void 0===R?function(e){return"+ ".concat(e.length," ...")}:R,K=e.tagRender,A=e.onToggleOpen,V=e.onRemove,L=e.onInputChange,_=e.onInputPaste,z=e.onInputKeyDown,F=e.onInputMouseDown,j=e.onInputCompositionStart,W=e.onInputCompositionEnd,H=d.useRef(null),B=(0,d.useState)(0),U=(0,u.Z)(B,2),Y=U[0],G=U[1],J=(0,d.useState)(!1),q=(0,u.Z)(J,2),X=q[0],Q=q[1],$="".concat(o,"-selection"),ee=l||"multiple"===h&&!1===s||"tags"===h?c:"",ne="tags"===h||"multiple"===h&&!1===s||g&&(l||X);function te(e,n,t,r,o){return d.createElement("span",{className:v()("".concat($,"-item"),(0,a.Z)({},"".concat($,"-item-disabled"),t)),title:M(e)},d.createElement("span",{className:"".concat($,"-item-content")},n),r&&d.createElement(N,{className:"".concat($,"-item-remove"),onMouseDown:T,onClick:o,customizeIcon:x},"×"))}n=function(){G(H.current.scrollWidth)},t=[ee],I?d.useLayoutEffect(n,t):d.useEffect(n,t);var re=d.createElement("div",{className:"".concat($,"-search"),style:{width:Y},onFocus:function(){Q(!0)},onBlur:function(){Q(!1)}},d.createElement(k,{ref:f,open:l,prefixCls:o,id:r,inputElement:null,disabled:m,autoFocus:y,autoComplete:Z,editable:ne,activeDescendantId:b,value:ee,onKeyDown:z,onMouseDown:F,onChange:L,onPaste:_,onCompositionStart:j,onCompositionEnd:W,tabIndex:C,attrs:(0,E.Z)(e,!0)}),d.createElement("span",{ref:H,className:"".concat($,"-search-mirror"),"aria-hidden":!0},ee," ")),oe=d.createElement(w.Z,{prefixCls:"".concat($,"-overflow"),data:i,renderItem:function(e){var n=e.disabled,t=e.label,r=e.value,o=!m&&!n,a=t;if("number"==typeof P&&("string"==typeof t||"number"==typeof t)){var i=String(a);i.length>P&&(a="".concat(i.slice(0,P),"..."))}var u=function(n){n&&n.stopPropagation(),V(e)};return"function"==typeof K?function(e,n,t,r,o){return d.createElement("span",{onMouseDown:function(e){T(e),A(!l)}},K({label:n,value:e,disabled:t,closable:r,onClose:o}))}(r,a,n,o,u):te(e,a,n,o,u)},renderRest:function(e){var n="function"==typeof O?O(e):O;return te({title:n},n,!1)},suffix:re,itemKey:D,maxCount:S});return d.createElement(d.Fragment,null,oe,!i.length&&!ee&&d.createElement("span",{className:"".concat($,"-placeholder")},p))},K=function(e){var n=e.inputElement,t=e.prefixCls,r=e.id,o=e.inputRef,a=e.disabled,i=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,s=e.mode,f=e.open,p=e.values,v=e.placeholder,m=e.tabIndex,h=e.showSearch,g=e.searchValue,y=e.activeValue,Z=e.maxLength,b=e.onInputKeyDown,C=e.onInputMouseDown,w=e.onInputChange,N=e.onInputPaste,x=e.onInputCompositionStart,S=e.onInputCompositionEnd,P=d.useState(!1),I=(0,u.Z)(P,2),R=I[0],D=I[1],T="combobox"===s,O=T||h,K=p[0],A=g||"";T&&y&&!R&&(A=y),d.useEffect((function(){T&&D(!1)}),[T,y]);var V=!("combobox"!==s&&!f&&!h||!A),L=M(K);return d.createElement(d.Fragment,null,d.createElement("span",{className:"".concat(t,"-selection-search")},d.createElement(k,{ref:o,prefixCls:t,id:r,open:f,inputElement:n,disabled:a,autoFocus:i,autoComplete:l,editable:O,activeDescendantId:c,value:A,onKeyDown:b,onMouseDown:C,onChange:function(e){D(!0),w(e)},onPaste:N,onCompositionStart:x,onCompositionEnd:S,tabIndex:m,attrs:(0,E.Z)(e,!0),maxLength:T?Z:void 0})),!T&&K&&!V&&d.createElement("span",{className:"".concat(t,"-selection-item"),title:L},K.label),function(){if(K)return null;var e=V?{visibility:"hidden"}:void 0;return d.createElement("span",{className:"".concat(t,"-selection-placeholder"),style:e},v)}())},A=function(e,n){var t=(0,d.useRef)(null),o=(0,d.useRef)(!1),a=e.prefixCls,i=e.open,l=e.mode,c=e.showSearch,s=e.tokenWithEnter,f=e.autoClearSearchValue,p=e.onSearch,v=e.onSearchSubmit,m=e.onToggleOpen,h=e.onInputKeyDown,y=e.domRef;d.useImperativeHandle(n,(function(){return{focus:function(){t.current.focus()},blur:function(){t.current.blur()}}}));var Z=C(0),b=(0,u.Z)(Z,2),E=b[0],w=b[1],N=(0,d.useRef)(null),x=function(e){!1!==p(e,!0,o.current)&&m(!0)},S={inputRef:t,onInputKeyDown:function(e){var n,t=e.which;t!==g.Z.UP&&t!==g.Z.DOWN||e.preventDefault(),h&&h(e),t!==g.Z.ENTER||"tags"!==l||o.current||i||null==v||v(e.target.value),n=t,[g.Z.ESC,g.Z.SHIFT,g.Z.BACKSPACE,g.Z.TAB,g.Z.WIN_KEY,g.Z.ALT,g.Z.META,g.Z.WIN_KEY_RIGHT,g.Z.CTRL,g.Z.SEMICOLON,g.Z.EQUALS,g.Z.CAPS_LOCK,g.Z.CONTEXT_MENU,g.Z.F1,g.Z.F2,g.Z.F3,g.Z.F4,g.Z.F5,g.Z.F6,g.Z.F7,g.Z.F8,g.Z.F9,g.Z.F10,g.Z.F11,g.Z.F12].includes(n)||m(!0)},onInputMouseDown:function(){w(!0)},onInputChange:function(e){var n=e.target.value;if(s&&N.current&&/[\r\n]/.test(N.current)){var t=N.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");n=n.replace(t,N.current)}N.current=null,x(n)},onInputPaste:function(e){var n=e.clipboardData.getData("text");N.current=n},onInputCompositionStart:function(){o.current=!0},onInputCompositionEnd:function(e){o.current=!1,"combobox"!==l&&x(e.target.value)}},k="multiple"===l||"tags"===l?d.createElement(O,(0,r.Z)({},e,S)):d.createElement(K,(0,r.Z)({},e,S));return d.createElement("div",{ref:y,className:"".concat(a,"-selector"),onClick:function(e){e.target!==t.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){t.current.focus()})):t.current.focus())},onMouseDown:function(e){var n=E();e.target===t.current||n||"combobox"===l||e.preventDefault(),("combobox"===l||c&&n)&&i||(i&&!1!==f&&p("",!0,!1),m())}},k)},V=d.forwardRef(A);V.displayName="Selector";var L=V,_=t(9699),z=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],F=function(e,n){var t=e.prefixCls,o=(e.disabled,e.visible),u=e.children,c=e.popupElement,s=e.containerWidth,f=e.animation,p=e.transitionName,m=e.dropdownStyle,h=e.dropdownClassName,g=e.direction,y=void 0===g?"ltr":g,Z=e.placement,b=e.dropdownMatchSelectWidth,C=e.dropdownRender,E=e.dropdownAlign,w=e.getPopupContainer,N=e.empty,x=e.getTriggerDOMNode,S=e.onPopupVisibleChange,k=e.onPopupMouseEnter,P=(0,l.Z)(e,z),I="".concat(t,"-dropdown"),R=c;C&&(R=C(c));var M=d.useMemo((function(){return function(e){var n=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}}(b)}),[b]),D=f?"".concat(I,"-").concat(f):p,T=d.useRef(null);d.useImperativeHandle(n,(function(){return{getPopupElement:function(){return T.current}}}));var O=(0,i.Z)({minWidth:s},m);return"number"==typeof b?O.width=b:b&&(O.width=s),d.createElement(_.Z,(0,r.Z)({},P,{showAction:S?["click"]:[],hideAction:S?["click"]:[],popupPlacement:Z||("rtl"===y?"bottomRight":"bottomLeft"),builtinPlacements:M,prefixCls:I,popupTransitionName:D,popup:d.createElement("div",{ref:T,onMouseEnter:k},R),popupAlign:E,popupVisible:o,getPopupContainer:w,popupClassName:v()(h,(0,a.Z)({},"".concat(I,"-empty"),N)),popupStyle:O,getTriggerDOMNode:x,onPopupVisibleChange:S}),u)},j=d.forwardRef(F);j.displayName="SelectTrigger";var W=j,H=t(84506);function B(e,n){var t,r=e.key;return"value"in e&&(t=e.value),null!=r?r:void 0!==t?t:"rc-index-key-".concat(n)}function U(e,n){var t=e||{};return{label:t.label||(n?"children":"label"),value:t.value||"value",options:t.options||"options"}}function Y(e){var n=(0,i.Z)({},e);return"props"in n||Object.defineProperty(n,"props",{get:function(){return(0,f.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),n}}),n}var G=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],J=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function q(e){return"tags"===e||"multiple"===e}var X=d.forwardRef((function(e,n){var t,f,p=e.id,b=e.prefixCls,E=e.className,w=e.showSearch,x=e.tagRender,S=e.direction,k=e.omitDomProps,P=e.displayValues,I=e.onDisplayValuesChange,R=e.emptyOptions,M=e.notFoundContent,D=void 0===M?"Not Found":M,T=e.onClear,O=e.mode,K=e.disabled,A=e.loading,V=e.getInputElement,_=e.getRawInputElement,z=e.open,F=e.defaultOpen,j=e.onDropdownVisibleChange,B=e.activeValue,U=e.onActiveValueChange,Y=e.activeDescendantId,X=e.searchValue,Q=e.autoClearSearchValue,$=e.onSearch,ee=e.onSearchSplit,ne=e.tokenSeparators,te=e.allowClear,re=e.showArrow,oe=e.inputIcon,ae=e.clearIcon,ie=e.OptionList,ue=e.animation,le=e.transitionName,ce=e.dropdownStyle,se=e.dropdownClassName,fe=e.dropdownMatchSelectWidth,de=e.dropdownRender,pe=e.dropdownAlign,ve=e.placement,me=e.getPopupContainer,he=e.showAction,ge=void 0===he?[]:he,ye=e.onFocus,Ze=e.onBlur,be=e.onKeyUp,Ce=e.onKeyDown,Ee=e.onMouseDown,we=(0,l.Z)(e,G),Ne=q(O),xe=(void 0!==w?w:Ne)||"combobox"===O,Se=(0,i.Z)({},we);J.forEach((function(e){delete Se[e]})),null==k||k.forEach((function(e){delete Se[e]}));var ke=d.useState(!1),Pe=(0,u.Z)(ke,2),Ie=Pe[0],Re=Pe[1];d.useEffect((function(){Re((0,h.Z)())}),[]);var Me=d.useRef(null),De=d.useRef(null),Te=d.useRef(null),Oe=d.useRef(null),Ke=d.useRef(null),Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=d.useState(!1),t=(0,u.Z)(n,2),r=t[0],o=t[1],a=d.useRef(null),i=function(){window.clearTimeout(a.current)};return d.useEffect((function(){return i}),[]),[r,function(n,t){i(),a.current=window.setTimeout((function(){o(n),t&&t()}),e)},i]}(),Ve=(0,u.Z)(Ae,3),Le=Ve[0],_e=Ve[1],ze=Ve[2];d.useImperativeHandle(n,(function(){var e,n;return{focus:null===(e=Oe.current)||void 0===e?void 0:e.focus,blur:null===(n=Oe.current)||void 0===n?void 0:n.blur,scrollTo:function(e){var n;return null===(n=Ke.current)||void 0===n?void 0:n.scrollTo(e)}}}));var Fe=d.useMemo((function(){var e;if("combobox"!==O)return X;var n=null===(e=P[0])||void 0===e?void 0:e.value;return"string"==typeof n||"number"==typeof n?String(n):""}),[X,O,P]),je="combobox"===O&&"function"==typeof V&&V()||null,We="function"==typeof _&&_(),He=(0,y.x1)(De,null==We||null===(t=We.props)||void 0===t?void 0:t.ref),Be=(0,s.Z)(void 0,{defaultValue:F,value:z}),Ue=(0,u.Z)(Be,2),Ye=Ue[0],Ge=Ue[1],Je=Ye,qe=!D&&R;(K||qe&&Je&&"combobox"===O)&&(Je=!1);var Xe=!qe&&Je,Qe=d.useCallback((function(e){var n=void 0!==e?e:!Je;K||(Ge(n),Je!==n&&(null==j||j(n)))}),[K,Je,Ge,j]),$e=d.useMemo((function(){return(ne||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[ne]),en=function(e,n,t){var r=!0,a=e;null==U||U(null);var i=t?null:function(e,n){if(!n||!n.length)return null;var t=!1,r=function e(n,r){var a=(0,H.Z)(r),i=a[0],u=a.slice(1);if(!i)return[n];var l=n.split(i);return t=t||l.length>1,l.reduce((function(n,t){return[].concat((0,o.Z)(n),(0,o.Z)(e(t,u)))}),[]).filter((function(e){return e}))}(e,n);return t?r:null}(e,ne);return"combobox"!==O&&i&&(a="",null==ee||ee(i),Qe(!1),r=!1),$&&Fe!==a&&$(a,{source:n?"typing":"effect"}),r};d.useEffect((function(){Je||Ne||"combobox"===O||en("",!1,!1)}),[Je]),d.useEffect((function(){Ye&&K&&Ge(!1),K&&_e(!1)}),[K]);var nn=C(),tn=(0,u.Z)(nn,2),rn=tn[0],on=tn[1],an=d.useRef(!1),un=[];d.useEffect((function(){return function(){un.forEach((function(e){return clearTimeout(e)})),un.splice(0,un.length)}}),[]);var ln,cn=d.useState(null),sn=(0,u.Z)(cn,2),fn=sn[0],dn=sn[1],pn=d.useState({}),vn=(0,u.Z)(pn,2)[1];(0,m.Z)((function(){if(Xe){var e,n=Math.ceil(null===(e=Me.current)||void 0===e?void 0:e.offsetWidth);fn===n||Number.isNaN(n)||dn(n)}}),[Xe]),We&&(ln=function(e){Qe(e)}),function(e,n,t,r){var o=d.useRef(null);o.current={open:n,triggerOpen:t,customizedTrigger:r},d.useEffect((function(){function e(e){var n,t;if(null===(n=o.current)||void 0===n||!n.customizedTrigger){var r=e.target;r.shadowRoot&&e.composed&&(r=e.composedPath()[0]||r),o.current.open&&[Me.current,null===(t=Te.current)||void 0===t?void 0:t.getPopupElement()].filter((function(e){return e})).every((function(e){return!e.contains(r)&&e!==r}))&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}}),[])}(0,Xe,Qe,!!We);var mn,hn,gn=d.useMemo((function(){return(0,i.Z)((0,i.Z)({},e),{},{notFoundContent:D,open:Je,triggerOpen:Xe,id:p,showSearch:xe,multiple:Ne,toggleOpen:Qe})}),[e,D,Xe,Je,p,xe,Ne,Qe]),yn=void 0!==re?re:A||!Ne&&"combobox"!==O;yn&&(mn=d.createElement(N,{className:v()("".concat(b,"-arrow"),(0,a.Z)({},"".concat(b,"-arrow-loading"),A)),customizeIcon:oe,customizeIconProps:{loading:A,searchValue:Fe,open:Je,focused:Le,showSearch:xe}})),K||!te||!P.length&&!Fe||"combobox"===O&&""===Fe||(hn=d.createElement(N,{className:"".concat(b,"-clear"),onMouseDown:function(){var e;null==T||T(),null===(e=Oe.current)||void 0===e||e.focus(),I([],{type:"clear",values:P}),en("",!1,!1)},customizeIcon:ae},"×"));var Zn,bn=d.createElement(ie,{ref:Ke}),Cn=v()(b,E,(f={},(0,a.Z)(f,"".concat(b,"-focused"),Le),(0,a.Z)(f,"".concat(b,"-multiple"),Ne),(0,a.Z)(f,"".concat(b,"-single"),!Ne),(0,a.Z)(f,"".concat(b,"-allow-clear"),te),(0,a.Z)(f,"".concat(b,"-show-arrow"),yn),(0,a.Z)(f,"".concat(b,"-disabled"),K),(0,a.Z)(f,"".concat(b,"-loading"),A),(0,a.Z)(f,"".concat(b,"-open"),Je),(0,a.Z)(f,"".concat(b,"-customize-input"),je),(0,a.Z)(f,"".concat(b,"-show-search"),xe),f)),En=d.createElement(W,{ref:Te,disabled:K,prefixCls:b,visible:Xe,popupElement:bn,containerWidth:fn,animation:ue,transitionName:le,dropdownStyle:ce,dropdownClassName:se,direction:S,dropdownMatchSelectWidth:fe,dropdownRender:de,dropdownAlign:pe,placement:ve,getPopupContainer:me,empty:R,getTriggerDOMNode:function(){return De.current},onPopupVisibleChange:ln,onPopupMouseEnter:function(){vn({})}},We?d.cloneElement(We,{ref:He}):d.createElement(L,(0,r.Z)({},e,{domRef:De,prefixCls:b,inputElement:je,ref:Oe,id:p,showSearch:xe,autoClearSearchValue:Q,mode:O,activeDescendantId:Y,tagRender:x,values:P,open:Je,onToggleOpen:Qe,activeValue:B,searchValue:Fe,onSearch:en,onSearchSubmit:function(e){e&&e.trim()&&$(e,{source:"submit"})},onRemove:function(e){var n=P.filter((function(n){return n!==e}));I(n,{type:"remove",values:[e]})},tokenWithEnter:$e})));return Zn=We?En:d.createElement("div",(0,r.Z)({className:Cn},Se,{ref:Me,onMouseDown:function(e){var n,t=e.target,r=null===(n=Te.current)||void 0===n?void 0:n.getPopupElement();if(r&&r.contains(t)){var o=setTimeout((function(){var e,n=un.indexOf(o);-1!==n&&un.splice(n,1),ze(),Ie||r.contains(document.activeElement)||null===(e=Oe.current)||void 0===e||e.focus()}));un.push(o)}for(var a=arguments.length,i=new Array(a>1?a-1:0),u=1;u<a;u++)i[u-1]=arguments[u];null==Ee||Ee.apply(void 0,[e].concat(i))},onKeyDown:function(e){var n,t=rn(),r=e.which;if(r===g.Z.ENTER&&("combobox"!==O&&e.preventDefault(),Je||Qe(!0)),on(!!Fe),r===g.Z.BACKSPACE&&!t&&Ne&&!Fe&&P.length){for(var a=(0,o.Z)(P),i=null,u=a.length-1;u>=0;u-=1){var l=a[u];if(!l.disabled){a.splice(u,1),i=l;break}}i&&I(a,{type:"remove",values:[i]})}for(var c=arguments.length,s=new Array(c>1?c-1:0),f=1;f<c;f++)s[f-1]=arguments[f];Je&&Ke.current&&(n=Ke.current).onKeyDown.apply(n,[e].concat(s)),null==Ce||Ce.apply(void 0,[e].concat(s))},onKeyUp:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];var o;Je&&Ke.current&&(o=Ke.current).onKeyUp.apply(o,[e].concat(t)),null==be||be.apply(void 0,[e].concat(t))},onFocus:function(){_e(!0),K||(ye&&!an.current&&ye.apply(void 0,arguments),ge.includes("focus")&&Qe(!0)),an.current=!0},onBlur:function(){_e(!1,(function(){an.current=!1,Qe(!1)})),K||(Fe&&("tags"===O?$(Fe,{source:"submit"}):"multiple"===O&&$("",{source:"blur"})),Ze&&Ze.apply(void 0,arguments))}}),Le&&!Je&&d.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(P.map((function(e){var n=e.label,t=e.value;return["number","string"].includes((0,c.Z)(n))?n:t})).join(", "))),En,mn,hn),d.createElement(Z.Provider,{value:gn},Zn)})),Q=X;function $(e,n){return P(e).join("").toUpperCase().includes(n)}var ee=t(88708),ne=t(50344),te=["children","value"],re=["children"];function oe(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,ne.Z)(e).map((function(e,t){if(!d.isValidElement(e)||!e.type)return null;var r=e,o=r.type.isSelectOptGroup,a=r.key,u=r.props,c=u.children,s=(0,l.Z)(u,re);return n||!o?function(e){var n=e,t=n.key,r=n.props,o=r.children,a=r.value,u=(0,l.Z)(r,te);return(0,i.Z)({key:t,value:void 0!==a?a:t,children:o},u)}(e):(0,i.Z)((0,i.Z)({key:"__RC_SELECT_GRP__".concat(null===a?t:a,"__"),label:a},s),{},{options:oe(c)})})).filter((function(e){return e}))}function ae(e){var n=d.useRef();n.current=e;var t=d.useCallback((function(){return n.current.apply(n,arguments)}),[]);return t}var ie=function(){return null};ie.isSelectOptGroup=!0;var ue=ie,le=function(){return null};le.isSelectOption=!0;var ce=le,se=t(56982),fe=t(98423),de=t(7606),pe=d.createContext(null),ve=["disabled","title","children","style","className"];function me(e){return"string"==typeof e||"number"==typeof e}var he=function(e,n){var t=b(),i=t.prefixCls,c=t.id,s=t.open,f=t.multiple,p=t.mode,m=t.searchValue,h=t.toggleOpen,y=t.notFoundContent,Z=t.onPopupScroll,C=d.useContext(pe),w=C.flattenOptions,x=C.onActiveValue,S=C.defaultActiveFirstOption,k=C.onSelect,P=C.menuItemSelectedIcon,I=C.rawValues,R=C.fieldNames,M=C.virtual,D=C.listHeight,T=C.listItemHeight,O="".concat(i,"-item"),K=(0,se.Z)((function(){return w}),[s,w],(function(e,n){return n[0]&&e[1]!==n[1]})),A=d.useRef(null),V=function(e){e.preventDefault()},L=function(e){A.current&&A.current.scrollTo("number"==typeof e?{index:e}:e)},_=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=K.length,r=0;r<t;r+=1){var o=(e+r*n+t)%t,a=K[o],i=a.group,u=a.data;if(!i&&!u.disabled)return o}return-1},z=d.useState((function(){return _(0)})),F=(0,u.Z)(z,2),j=F[0],W=F[1],H=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];W(e);var t={source:n?"keyboard":"mouse"},r=K[e];r?x(r.value,e,t):x(null,-1,t)};(0,d.useEffect)((function(){H(!1!==S?_(0):-1)}),[K.length,m]);var B=d.useCallback((function(e){return I.has(e)&&"combobox"!==p}),[p,(0,o.Z)(I).toString(),I.size]);(0,d.useEffect)((function(){var e,n=setTimeout((function(){if(!f&&s&&1===I.size){var e=Array.from(I)[0],n=K.findIndex((function(n){return n.data.value===e}));-1!==n&&(H(n),L(n))}}));return s&&(null===(e=A.current)||void 0===e||e.scrollTo(void 0)),function(){return clearTimeout(n)}}),[s,m,w.length]);var U=function(e){void 0!==e&&k(e,{selected:!I.has(e)}),f||h(!1)};if(d.useImperativeHandle(n,(function(){return{onKeyDown:function(e){var n=e.which,t=e.ctrlKey;switch(n){case g.Z.N:case g.Z.P:case g.Z.UP:case g.Z.DOWN:var r=0;if(n===g.Z.UP?r=-1:n===g.Z.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&t&&(n===g.Z.N?r=1:n===g.Z.P&&(r=-1)),0!==r){var o=_(j+r,r);L(o),H(o,!0)}break;case g.Z.ENTER:var a=K[j];a&&!a.data.disabled?U(a.value):U(void 0),s&&e.preventDefault();break;case g.Z.ESC:h(!1),s&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){L(e)}}})),0===K.length)return d.createElement("div",{role:"listbox",id:"".concat(c,"_list"),className:"".concat(O,"-empty"),onMouseDown:V},y);var Y=Object.keys(R).map((function(e){return R[e]})),G=function(e){return e.label};function J(e,n){return{role:e.group?"presentation":"option",id:"".concat(c,"_list_").concat(n)}}var q=function(e){var n=K[e];if(!n)return null;var t=n.data||{},o=t.value,a=n.group,i=(0,E.Z)(t,!0),u=G(n);return n?d.createElement("div",(0,r.Z)({"aria-label":"string"!=typeof u||a?null:u},i,{key:e},J(n,e),{"aria-selected":B(o)}),o):null},X={role:"listbox",id:"".concat(c,"_list")};return d.createElement(d.Fragment,null,M&&d.createElement("div",(0,r.Z)({},X,{style:{height:0,width:0,overflow:"hidden"}}),q(j-1),q(j),q(j+1)),d.createElement(de.Z,{itemKey:"key",ref:A,data:K,height:D,itemHeight:T,fullHeight:!1,onMouseDown:V,onScroll:Z,virtual:M,innerProps:M?null:X},(function(e,n){var t,o=e.group,i=e.groupOption,u=e.data,c=e.label,s=e.value,f=u.key;if(o){var p,m=null!==(p=u.title)&&void 0!==p?p:me(c)?c.toString():void 0;return d.createElement("div",{className:v()(O,"".concat(O,"-group")),title:m},void 0!==c?c:f)}var h=u.disabled,g=u.title,y=(u.children,u.style),Z=u.className,b=(0,l.Z)(u,ve),C=(0,fe.Z)(b,Y),w=B(s),x="".concat(O,"-option"),S=v()(O,x,Z,(t={},(0,a.Z)(t,"".concat(x,"-grouped"),i),(0,a.Z)(t,"".concat(x,"-active"),j===n&&!h),(0,a.Z)(t,"".concat(x,"-disabled"),h),(0,a.Z)(t,"".concat(x,"-selected"),w),t)),k=G(e),I=!P||"function"==typeof P||w,R="number"==typeof k?k:k||s,D=me(R)?R.toString():void 0;return void 0!==g&&(D=g),d.createElement("div",(0,r.Z)({},(0,E.Z)(C),M?{}:J(e,n),{"aria-selected":w,className:S,title:D,onMouseMove:function(){j===n||h||H(n)},onClick:function(){h||U(s)},style:y}),d.createElement("div",{className:"".concat(x,"-content")},R),d.isValidElement(P)||w,I&&d.createElement(N,{className:"".concat(O,"-option-state"),customizeIcon:P,customizeIconProps:{isSelected:w}},w?"✓":null))})))},ge=d.forwardRef(he);ge.displayName="OptionList";var ye=ge,Ze=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],be=["inputValue"],Ce=d.forwardRef((function(e,n){var t=e.id,f=e.mode,p=e.prefixCls,v=void 0===p?"rc-select":p,m=e.backfill,h=e.fieldNames,g=e.inputValue,y=e.searchValue,Z=e.onSearch,b=e.autoClearSearchValue,C=void 0===b||b,E=e.onSelect,w=e.onDeselect,N=e.dropdownMatchSelectWidth,x=void 0===N||N,S=e.filterOption,k=e.filterSort,I=e.optionFilterProp,R=e.optionLabelProp,M=e.options,D=e.children,T=e.defaultActiveFirstOption,O=e.menuItemSelectedIcon,K=e.virtual,A=e.listHeight,V=void 0===A?200:A,L=e.listItemHeight,_=void 0===L?20:L,z=e.value,F=e.defaultValue,j=e.labelInValue,W=e.onChange,H=(0,l.Z)(e,Ze),G=(0,ee.ZP)(t),J=q(f),X=!(M||!D),ne=d.useMemo((function(){return(void 0!==S||"combobox"!==f)&&S}),[S,f]),te=d.useMemo((function(){return U(h,X)}),[JSON.stringify(h),X]),re=(0,s.Z)("",{value:void 0!==y?y:g,postState:function(e){return e||""}}),ie=(0,u.Z)(re,2),ue=ie[0],le=ie[1],ce=function(e,n,t,r,o){return d.useMemo((function(){var a=e;!e&&(a=oe(n));var i=new Map,u=new Map,l=function(e,n,t){t&&"string"==typeof t&&e.set(n[t],n)};return function e(n){for(var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c<n.length;c+=1){var s=n[c];!s[t.options]||a?(i.set(s[t.value],s),l(u,s,t.label),l(u,s,r),l(u,s,o)):e(s[t.options],!0)}}(a),{options:a,valueOptions:i,labelOptions:u}}),[e,n,t,r,o])}(M,D,te,I,R),se=ce.valueOptions,fe=ce.labelOptions,de=ce.options,ve=d.useCallback((function(e){return P(e).map((function(e){var n,t,r,o,a,i;!function(e){return!e||"object"!==(0,c.Z)(e)}(e)?(r=e.key,t=e.label,n=null!==(i=e.value)&&void 0!==i?i:r):n=e;var u,l=se.get(n);return l&&(void 0===t&&(t=null==l?void 0:l[R||te.label]),void 0===r&&(r=null!==(u=null==l?void 0:l.key)&&void 0!==u?u:n),o=null==l?void 0:l.disabled,a=null==l?void 0:l.title),{label:t,value:n,key:r,disabled:o,title:a}}))}),[te,R,se]),me=(0,s.Z)(F,{value:z}),he=(0,u.Z)(me,2),ge=he[0],Ce=he[1],Ee=function(e,n){var t=d.useRef({values:new Map,options:new Map});return[d.useMemo((function(){var r=t.current,o=r.values,a=r.options,u=e.map((function(e){var n;return void 0===e.label?(0,i.Z)((0,i.Z)({},e),{},{label:null===(n=o.get(e.value))||void 0===n?void 0:n.label}):e})),l=new Map,c=new Map;return u.forEach((function(e){l.set(e.value,e),c.set(e.value,n.get(e.value)||a.get(e.value))})),t.current.values=l,t.current.options=c,u}),[e,n]),d.useCallback((function(e){return n.get(e)||t.current.options.get(e)}),[n])]}(d.useMemo((function(){var e,n=ve(ge);return"combobox"!==f||null!==(e=n[0])&&void 0!==e&&e.value?n:[]}),[ge,ve,f]),se),we=(0,u.Z)(Ee,2),Ne=we[0],xe=we[1],Se=d.useMemo((function(){if(!f&&1===Ne.length){var e=Ne[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return Ne.map((function(e){var n;return(0,i.Z)((0,i.Z)({},e),{},{label:null!==(n=e.label)&&void 0!==n?n:e.value})}))}),[f,Ne]),ke=d.useMemo((function(){return new Set(Ne.map((function(e){return e.value})))}),[Ne]);d.useEffect((function(){if("combobox"===f){var e,n=null===(e=Ne[0])||void 0===e?void 0:e.value;le(function(e){return null!=e}(n)?String(n):"")}}),[Ne]);var Pe=ae((function(e,n){var t,r=null!=n?n:e;return t={},(0,a.Z)(t,te.value,e),(0,a.Z)(t,te.label,r),t})),Ie=function(e,n,t,r,o){return d.useMemo((function(){if(!t||!1===r)return e;var u=n.options,l=n.label,c=n.value,s=[],f="function"==typeof r,d=t.toUpperCase(),p=f?r:function(e,n){return o?$(n[o],d):n[u]?$(n["children"!==l?l:"label"],d):$(n[c],d)},v=f?function(e){return Y(e)}:function(e){return e};return e.forEach((function(e){if(e[u])if(p(t,v(e)))s.push(e);else{var n=e[u].filter((function(e){return p(t,v(e))}));n.length&&s.push((0,i.Z)((0,i.Z)({},e),{},(0,a.Z)({},u,n)))}else p(t,v(e))&&s.push(e)})),s}),[e,r,o,t,n])}(d.useMemo((function(){if("tags"!==f)return de;var e=(0,o.Z)(de);return(0,o.Z)(Ne).sort((function(e,n){return e.value<n.value?-1:1})).forEach((function(n){var t=n.value;(function(e){return se.has(e)})(t)||e.push(Pe(t,n.label))})),e}),[Pe,de,se,Ne,f]),te,ue,ne,I),Re=d.useMemo((function(){return"tags"!==f||!ue||Ie.some((function(e){return e[I||"value"]===ue}))?Ie:[Pe(ue)].concat((0,o.Z)(Ie))}),[Pe,I,f,Ie,ue]),Me=d.useMemo((function(){return k?(0,o.Z)(Re).sort((function(e,n){return k(e,n)})):Re}),[Re,k]),De=d.useMemo((function(){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fieldNames,r=n.childrenAsData,o=[],a=U(t,!1),i=a.label,u=a.value,l=a.options;return function e(n,t){n.forEach((function(n){var a=n[i];if(t||!(l in n)){var c=n[u];o.push({key:B(n,o.length),groupOption:t,data:n,label:a,value:c})}else{var s=a;void 0===s&&r&&(s=n.label),o.push({key:B(n,o.length),group:!0,data:n,label:s}),e(n[l],!0)}}))}(e,!1),o}(Me,{fieldNames:te,childrenAsData:X})}),[Me,te,X]),Te=function(e){var n=ve(e);if(Ce(n),W&&(n.length!==Ne.length||n.some((function(e,n){var t;return(null===(t=Ne[n])||void 0===t?void 0:t.value)!==(null==e?void 0:e.value)})))){var t=j?n:n.map((function(e){return e.value})),r=n.map((function(e){return Y(xe(e.value))}));W(J?t:t[0],J?r:r[0])}},Oe=d.useState(null),Ke=(0,u.Z)(Oe,2),Ae=Ke[0],Ve=Ke[1],Le=d.useState(0),_e=(0,u.Z)(Le,2),ze=_e[0],Fe=_e[1],je=void 0!==T?T:"combobox"!==f,We=d.useCallback((function(e,n){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,r=void 0===t?"keyboard":t;Fe(n),m&&"combobox"===f&&null!==e&&"keyboard"===r&&Ve(String(e))}),[m,f]),He=function(e,n,t){var r=function(){var n,t=xe(e);return[j?{label:null==t?void 0:t[te.label],value:e,key:null!==(n=null==t?void 0:t.key)&&void 0!==n?n:e}:e,Y(t)]};if(n&&E){var o=r(),a=(0,u.Z)(o,2),i=a[0],l=a[1];E(i,l)}else if(!n&&w&&"clear"!==t){var c=r(),s=(0,u.Z)(c,2),f=s[0],d=s[1];w(f,d)}},Be=ae((function(e,n){var t,r=!J||n.selected;t=r?J?[].concat((0,o.Z)(Ne),[e]):[e]:Ne.filter((function(n){return n.value!==e})),Te(t),He(e,r),"combobox"===f?Ve(""):q&&!C||(le(""),Ve(""))})),Ue=d.useMemo((function(){var e=!1!==K&&!1!==x;return(0,i.Z)((0,i.Z)({},ce),{},{flattenOptions:De,onActiveValue:We,defaultActiveFirstOption:je,onSelect:Be,menuItemSelectedIcon:O,rawValues:ke,fieldNames:te,virtual:e,listHeight:V,listItemHeight:_,childrenAsData:X})}),[ce,De,We,je,Be,O,ke,te,K,x,V,_,X]);return d.createElement(pe.Provider,{value:Ue},d.createElement(Q,(0,r.Z)({},H,{id:G,prefixCls:v,ref:n,omitDomProps:be,mode:f,displayValues:Se,onDisplayValuesChange:function(e,n){Te(e);var t=n.type,r=n.values;"remove"!==t&&"clear"!==t||r.forEach((function(e){He(e.value,!1,t)}))},searchValue:ue,onSearch:function(e,n){if(le(e),Ve(null),"submit"!==n.source)"blur"!==n.source&&("combobox"===f&&Te(e),null==Z||Z(e));else{var t=(e||"").trim();if(t){var r=Array.from(new Set([].concat((0,o.Z)(ke),[t])));Te(r),He(t,!0),le("")}}},autoClearSearchValue:C,onSearchSplit:function(e){var n=e;"tags"!==f&&(n=e.map((function(e){var n=fe.get(e);return null==n?void 0:n.value})).filter((function(e){return void 0!==e})));var t=Array.from(new Set([].concat((0,o.Z)(ke),(0,o.Z)(n))));Te(t),t.forEach((function(e){He(e,!0)}))},dropdownMatchSelectWidth:x,OptionList:ye,emptyOptions:!De.length,activeValue:Ae,activeDescendantId:"".concat(G,"_list_").concat(ze)})))})),Ee=Ce;Ee.Option=ce,Ee.OptGroup=ue;var we=Ee}}]);
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see bundle.7e85c36e04f1428d40ae.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[958],{99889:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var o=n(1413),i=n(67294),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z"}}]},name:"highlight",theme:"outlined"},a=n(28826),s=function(t,e){return i.createElement(a.Z,(0,o.Z)((0,o.Z)({},t),{},{ref:e,icon:r}))};s.displayName="HighlightOutlined";var h=i.forwardRef(s)},58877:function(t,e,n){var o,i,r,a;t.exports=(o=n(45697),i=n(67294),r=n(21518),a=n(41400),function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=o(n(1)),h=n(2),u=o(h),c=o(n(3)),l=o(n(4)),d=function(t){function e(){var t,n,o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];return n=o=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),o._sigPad=null,o._excludeOurProps=function(){var t=o.props;return t.canvasProps,t.clearOnResize,function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(t,["canvasProps","clearOnResize"])},o.getCanvas=function(){return o._canvas},o.getTrimmedCanvas=function(){var t=document.createElement("canvas");return t.width=o._canvas.width,t.height=o._canvas.height,t.getContext("2d").drawImage(o._canvas,0,0),(0,l.default)(t)},o.getSignaturePad=function(){return o._sigPad},o._checkClearOnResize=function(){o.props.clearOnResize&&o._resizeCanvas()},o._resizeCanvas=function(){var t=o.props.canvasProps||{},e=t.width,n=t.height;if(!e||!n){var i=o._canvas,r=Math.max(window.devicePixelRatio||1,1);e||(i.width=i.offsetWidth*r),n||(i.height=i.offsetHeight*r),i.getContext("2d").scale(r,r),o.clear()}},o.on=function(){return window.addEventListener("resize",o._checkClearOnResize),o._sigPad.on()},o.off=function(){return window.removeEventListener("resize",o._checkClearOnResize),o._sigPad.off()},o.clear=function(){return o._sigPad.clear()},o.isEmpty=function(){return o._sigPad.isEmpty()},o.fromDataURL=function(t,e){return o._sigPad.fromDataURL(t,e)},o.toDataURL=function(t,e){return o._sigPad.toDataURL(t,e)},o.fromData=function(t){return o._sigPad.fromData(t)},o.toData=function(){return o._sigPad.toData()},i(o,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),a(e,[{key:"componentDidMount",value:function(){this._sigPad=new c.default(this._canvas,this._excludeOurProps()),this._resizeCanvas(),this.on()}},{key:"componentWillUnmount",value:function(){this.off()}},{key:"componentDidUpdate",value:function(){Object.assign(this._sigPad,this._excludeOurProps())}},{key:"render",value:function(){var t=this,e=this.props.canvasProps;return u.default.createElement("canvas",r({ref:function(e){t._canvas=e}},e))}}]),e}(h.Component);d.propTypes={velocityFilterWeight:s.default.number,minWidth:s.default.number,maxWidth:s.default.number,minDistance:s.default.number,dotSize:s.default.oneOfType([s.default.number,s.default.func]),penColor:s.default.string,throttle:s.default.number,onEnd:s.default.func,onBegin:s.default.func,canvasProps:s.default.object,clearOnResize:s.default.bool},d.defaultProps={clearOnResize:!0},e.default=d},function(t,e){t.exports=o},function(t,e){t.exports=i},function(t,e){t.exports=r},function(t,e){t.exports=a}]))},41400:function(t){t.exports=function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e){"use strict";function n(t,e,n,o){return function(t,e,n,o){return{red:o[4*(n*e+t)],green:o[4*(n*e+t)+1],blue:o[4*(n*e+t)+2],alpha:o[4*(n*e+t)+3]}}(t,e,n,o).alpha}function o(t,e,o,i){for(var r=t?1:-1,a=t?0:o-1;t?a<o:a>-1;a+=r)for(var s=0;s<e;s++)if(n(s,a,e,i))return a;return null}function i(t,e,o,i){for(var r=t?1:-1,a=t?0:e-1;t?a<e:a>-1;a+=r)for(var s=0;s<o;s++)if(n(a,s,e,i))return a;return null}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.getContext("2d"),n=t.width,r=t.height,a=e.getImageData(0,0,n,r).data,s=o(!0,n,r,a),h=o(!1,n,r,a),u=i(!0,n,r,a),c=i(!1,n,r,a)-u+1,l=h-s+1,d=e.getImageData(u,s,c,l);return t.width=c,t.height=l,e.clearRect(0,0,c,l),e.putImageData(d,0,0),t}}])},21518:function(t,e,n){"use strict";function o(t,e,n){this.x=t,this.y=e,this.time=n||(new Date).getTime()}function i(t,e,n,o){this.startPoint=t,this.control1=e,this.control2=n,this.endPoint=o}function r(t,e){var n=this,o=e||{};this.velocityFilterWeight=o.velocityFilterWeight||.7,this.minWidth=o.minWidth||.5,this.maxWidth=o.maxWidth||2.5,this.throttle="throttle"in o?o.throttle:16,this.minDistance="minDistance"in o?o.minDistance:5,this.throttle?this._strokeMoveUpdate=function(t,e,n){var o,i,r,a=null,s=0;n||(n={});var h=function(){s=!1===n.leading?0:Date.now(),a=null,r=t.apply(o,i),a||(o=i=null)};return function(){var u=Date.now();s||!1!==n.leading||(s=u);var c=e-(u-s);return o=this,i=arguments,c<=0||c>e?(a&&(clearTimeout(a),a=null),s=u,r=t.apply(o,i),a||(o=i=null)):a||!1===n.trailing||(a=setTimeout(h,c)),r}}(r.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=r.prototype._strokeUpdate,this.dotSize=o.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=o.penColor||"black",this.backgroundColor=o.backgroundColor||"rgba(0,0,0,0)",this.onBegin=o.onBegin,this.onEnd=o.onEnd,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(t){1===t.which&&(n._mouseButtonDown=!0,n._strokeBegin(t))},this._handleMouseMove=function(t){n._mouseButtonDown&&n._strokeMoveUpdate(t)},this._handleMouseUp=function(t){1===t.which&&n._mouseButtonDown&&(n._mouseButtonDown=!1,n._strokeEnd(t))},this._handleTouchStart=function(t){if(1===t.targetTouches.length){var e=t.changedTouches[0];n._strokeBegin(e)}},this._handleTouchMove=function(t){t.preventDefault();var e=t.targetTouches[0];n._strokeMoveUpdate(e)},this._handleTouchEnd=function(t){t.target===n._canvas&&(t.preventDefault(),n._strokeEnd(t))},this.on()}n.r(e),o.prototype.velocityFrom=function(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):1},o.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},o.prototype.equals=function(t){return this.x===t.x&&this.y===t.y&&this.time===t.time},i.prototype.length=function(){for(var t=0,e=void 0,n=void 0,o=0;o<=10;o+=1){var i=o/10,r=this._point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){var s=r-e,h=a-n;t+=Math.sqrt(s*s+h*h)}e=r,n=a}return t},i.prototype._point=function(t,e,n,o,i){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*o*(1-t)*t*t+i*t*t*t},r.prototype.clear=function(){var t=this._ctx,e=this._canvas;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(),this._isEmpty=!0},r.prototype.fromDataURL=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=new Image,i=n.ratio||window.devicePixelRatio||1,r=n.width||this._canvas.width/i,a=n.height||this._canvas.height/i;this._reset(),o.src=t,o.onload=function(){e._ctx.drawImage(o,0,0,r,a)},this._isEmpty=!1},r.prototype.toDataURL=function(t){var e;if("image/svg+xml"===t)return this._toSVG();for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return(e=this._canvas).toDataURL.apply(e,[t].concat(o))},r.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},r.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},r.prototype.isEmpty=function(){return this._isEmpty},r.prototype._strokeBegin=function(t){this._data.push([]),this._reset(),this._strokeUpdate(t),"function"==typeof this.onBegin&&this.onBegin(t)},r.prototype._strokeUpdate=function(t){var e=t.clientX,n=t.clientY,o=this._createPoint(e,n),i=this._data[this._data.length-1],r=i&&i[i.length-1],a=r&&o.distanceTo(r)<this.minDistance;if(!r||!a){var s=this._addPoint(o),h=s.curve,u=s.widths;h&&u&&this._drawCurve(h,u.start,u.end),this._data[this._data.length-1].push({x:o.x,y:o.y,time:o.time,color:this.penColor})}},r.prototype._strokeEnd=function(t){var e=this.points.length>2,n=this.points[0];if(!e&&n&&this._drawDot(n),n){var o=this._data[this._data.length-1],i=o[o.length-1];n.equals(i)||o.push({x:n.x,y:n.y,time:n.time,color:this.penColor})}"function"==typeof this.onEnd&&this.onEnd(t)},r.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},r.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},r.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},r.prototype._createPoint=function(t,e,n){var i=this._canvas.getBoundingClientRect();return new o(t-i.left,e-i.top,n||(new Date).getTime())},r.prototype._addPoint=function(t){var e=this.points;if(e.push(t),e.length>2){3===e.length&&e.unshift(e[0]);var n=this._calculateCurveControlPoints(e[0],e[1],e[2]).c2,o=this._calculateCurveControlPoints(e[1],e[2],e[3]).c1,r=new i(e[1],n,o,e[2]),a=this._calculateCurveWidths(r);return e.shift(),{curve:r,widths:a}}return{}},r.prototype._calculateCurveControlPoints=function(t,e,n){var i=t.x-e.x,r=t.y-e.y,a=e.x-n.x,s=e.y-n.y,h=(t.x+e.x)/2,u=(t.y+e.y)/2,c=(e.x+n.x)/2,l=(e.y+n.y)/2,d=Math.sqrt(i*i+r*r),f=Math.sqrt(a*a+s*s),p=f/(d+f),v=c+(h-c)*p,_=l+(u-l)*p,m=e.x-v,y=e.y-_;return{c1:new o(h+m,u+y),c2:new o(c+m,l+y)}},r.prototype._calculateCurveWidths=function(t){var e=t.startPoint,n=t.endPoint,o={start:null,end:null},i=this.velocityFilterWeight*n.velocityFrom(e)+(1-this.velocityFilterWeight)*this._lastVelocity,r=this._strokeWidth(i);return o.start=this._lastWidth,o.end=r,this._lastVelocity=i,this._lastWidth=r,o},r.prototype._strokeWidth=function(t){return Math.max(this.maxWidth/(t+1),this.minWidth)},r.prototype._drawPoint=function(t,e,n){var o=this._ctx;o.moveTo(t,e),o.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1},r.prototype._drawCurve=function(t,e,n){var o=this._ctx,i=n-e,r=Math.floor(t.length());o.beginPath();for(var a=0;a<r;a+=1){var s=a/r,h=s*s,u=h*s,c=1-s,l=c*c,d=l*c,f=d*t.startPoint.x;f+=3*l*s*t.control1.x,f+=3*c*h*t.control2.x,f+=u*t.endPoint.x;var p=d*t.startPoint.y;p+=3*l*s*t.control1.y,p+=3*c*h*t.control2.y,p+=u*t.endPoint.y;var v=e+u*i;this._drawPoint(f,p,v)}o.closePath(),o.fill()},r.prototype._drawDot=function(t){var e=this._ctx,n="function"==typeof this.dotSize?this.dotSize():this.dotSize;e.beginPath(),this._drawPoint(t.x,t.y,n),e.closePath(),e.fill()},r.prototype._fromData=function(t,e,n){for(var i=0;i<t.length;i+=1){var r=t[i];if(r.length>1)for(var a=0;a<r.length;a+=1){var s=r[a],h=new o(s.x,s.y,s.time),u=s.color;if(0===a)this.penColor=u,this._reset(),this._addPoint(h);else if(a!==r.length-1){var c=this._addPoint(h),l=c.curve,d=c.widths;l&&d&&e(l,d,u)}}else this._reset(),n(r[0])}},r.prototype._toSVG=function(){var t=this,e=this._data,n=this._canvas,o=Math.max(window.devicePixelRatio||1,1),i=n.width/o,r=n.height/o,a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"width",n.width),a.setAttributeNS(null,"height",n.height),this._fromData(e,(function(t,e,n){var o=document.createElement("path");if(!(isNaN(t.control1.x)||isNaN(t.control1.y)||isNaN(t.control2.x)||isNaN(t.control2.y))){var i="M "+t.startPoint.x.toFixed(3)+","+t.startPoint.y.toFixed(3)+" C "+t.control1.x.toFixed(3)+","+t.control1.y.toFixed(3)+" "+t.control2.x.toFixed(3)+","+t.control2.y.toFixed(3)+" "+t.endPoint.x.toFixed(3)+","+t.endPoint.y.toFixed(3);o.setAttribute("d",i),o.setAttribute("stroke-width",(2.25*e.end).toFixed(3)),o.setAttribute("stroke",n),o.setAttribute("fill","none"),o.setAttribute("stroke-linecap","round"),a.appendChild(o)}}),(function(e){var n=document.createElement("circle"),o="function"==typeof t.dotSize?t.dotSize():t.dotSize;n.setAttribute("r",o),n.setAttribute("cx",e.x),n.setAttribute("cy",e.y),n.setAttribute("fill",e.color),a.appendChild(n)}));var s='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+i+" "+r+'" width="'+i+'" height="'+r+'">',h=a.innerHTML;if(void 0===h){var u=document.createElement("dummy"),c=a.childNodes;u.innerHTML="";for(var l=0;l<c.length;l+=1)u.appendChild(c[l].cloneNode(!0));h=u.innerHTML}return"data:image/svg+xml;base64,"+btoa(s+h+"</svg>")},r.prototype.fromData=function(t){var e=this;this.clear(),this._fromData(t,(function(t,n){return e._drawCurve(t,n.start,n.end)}),(function(t){return e._drawDot(t)})),this._data=t},r.prototype.toData=function(){return this._data},e.default=r}}]);
|